diff --git a/.github/workflows/__all-platform-bundle.yml b/.github/workflows/__all-platform-bundle.yml index b0e3027659..f5bd76bd6a 100644 --- a/.github/workflows/__all-platform-bundle.yml +++ b/.github/workflows/__all-platform-bundle.yml @@ -35,7 +35,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml index 195a298629..de2be434ce 100644 --- a/.github/workflows/__analyze-ref-input.yml +++ b/.github/workflows/__analyze-ref-input.yml @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__autobuild-action.yml b/.github/workflows/__autobuild-action.yml index 1b28161864..e5c023c644 100644 --- a/.github/workflows/__autobuild-action.yml +++ b/.github/workflows/__autobuild-action.yml @@ -39,7 +39,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__config-export.yml b/.github/workflows/__config-export.yml index f0d14215c9..bca5b72cd0 100644 --- a/.github/workflows/__config-export.yml +++ b/.github/workflows/__config-export.yml @@ -45,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__diagnostics-export.yml b/.github/workflows/__diagnostics-export.yml index 2127957d91..f53a8ce665 100644 --- a/.github/workflows/__diagnostics-export.yml +++ b/.github/workflows/__diagnostics-export.yml @@ -51,7 +51,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index d430753230..6c4b637bff 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -39,7 +39,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__extractor-ram-threads.yml b/.github/workflows/__extractor-ram-threads.yml index 71e43ec574..ce23db9217 100644 --- a/.github/workflows/__extractor-ram-threads.yml +++ b/.github/workflows/__extractor-ram-threads.yml @@ -35,7 +35,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__go-custom-queries.yml b/.github/workflows/__go-custom-queries.yml index 4999271314..22f8385ce3 100644 --- a/.github/workflows/__go-custom-queries.yml +++ b/.github/workflows/__go-custom-queries.yml @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__go-tracing-autobuilder.yml b/.github/workflows/__go-tracing-autobuilder.yml index 8250e766a2..b9a87d0e69 100644 --- a/.github/workflows/__go-tracing-autobuilder.yml +++ b/.github/workflows/__go-tracing-autobuilder.yml @@ -61,7 +61,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__go-tracing-custom-build-steps.yml b/.github/workflows/__go-tracing-custom-build-steps.yml index 46b4df3acd..78104ddcd8 100644 --- a/.github/workflows/__go-tracing-custom-build-steps.yml +++ b/.github/workflows/__go-tracing-custom-build-steps.yml @@ -61,7 +61,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__go-tracing-legacy-workflow.yml b/.github/workflows/__go-tracing-legacy-workflow.yml index 06b1a21b25..40ac1d7361 100644 --- a/.github/workflows/__go-tracing-legacy-workflow.yml +++ b/.github/workflows/__go-tracing-legacy-workflow.yml @@ -61,7 +61,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__init-with-registries.yml b/.github/workflows/__init-with-registries.yml index 6969454488..cdfb23f427 100644 --- a/.github/workflows/__init-with-registries.yml +++ b/.github/workflows/__init-with-registries.yml @@ -52,7 +52,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__javascript-source-root.yml b/.github/workflows/__javascript-source-root.yml index 0eb4f09d2d..81913b2229 100644 --- a/.github/workflows/__javascript-source-root.yml +++ b/.github/workflows/__javascript-source-root.yml @@ -39,7 +39,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__ml-powered-queries.yml b/.github/workflows/__ml-powered-queries.yml index cfe25b2848..f8d21f8811 100644 --- a/.github/workflows/__ml-powered-queries.yml +++ b/.github/workflows/__ml-powered-queries.yml @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index d11a615b03..a8f0dc1b56 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -61,7 +61,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__packaging-codescanning-config-inputs-js.yml b/.github/workflows/__packaging-codescanning-config-inputs-js.yml index 6c2c8f2c27..2b62a7f798 100644 --- a/.github/workflows/__packaging-codescanning-config-inputs-js.yml +++ b/.github/workflows/__packaging-codescanning-config-inputs-js.yml @@ -51,7 +51,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__packaging-config-inputs-js.yml b/.github/workflows/__packaging-config-inputs-js.yml index e1b883feb1..d3a1cd9501 100644 --- a/.github/workflows/__packaging-config-inputs-js.yml +++ b/.github/workflows/__packaging-config-inputs-js.yml @@ -51,7 +51,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__packaging-config-js.yml b/.github/workflows/__packaging-config-js.yml index 873e64f001..316d899eee 100644 --- a/.github/workflows/__packaging-config-js.yml +++ b/.github/workflows/__packaging-config-js.yml @@ -51,7 +51,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__packaging-inputs-js.yml b/.github/workflows/__packaging-inputs-js.yml index ba2a2c1092..e549704fdf 100644 --- a/.github/workflows/__packaging-inputs-js.yml +++ b/.github/workflows/__packaging-inputs-js.yml @@ -51,7 +51,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__remote-config.yml b/.github/workflows/__remote-config.yml index d91f15137a..3b98ddba77 100644 --- a/.github/workflows/__remote-config.yml +++ b/.github/workflows/__remote-config.yml @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__resolve-environment-action.yml b/.github/workflows/__resolve-environment-action.yml index edf9f00cda..586795cfea 100644 --- a/.github/workflows/__resolve-environment-action.yml +++ b/.github/workflows/__resolve-environment-action.yml @@ -39,7 +39,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__rubocop-multi-language.yml b/.github/workflows/__rubocop-multi-language.yml index 34804eea7a..7dc0f31f2d 100644 --- a/.github/workflows/__rubocop-multi-language.yml +++ b/.github/workflows/__rubocop-multi-language.yml @@ -35,7 +35,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__ruby.yml b/.github/workflows/__ruby.yml index 847c9e5610..359ff243a1 100644 --- a/.github/workflows/__ruby.yml +++ b/.github/workflows/__ruby.yml @@ -45,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__scaling-reserved-ram.yml b/.github/workflows/__scaling-reserved-ram.yml index fa59317d74..5f73b24af8 100644 --- a/.github/workflows/__scaling-reserved-ram.yml +++ b/.github/workflows/__scaling-reserved-ram.yml @@ -61,7 +61,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__split-workflow.yml b/.github/workflows/__split-workflow.yml index 21b014f29a..f7680971c4 100644 --- a/.github/workflows/__split-workflow.yml +++ b/.github/workflows/__split-workflow.yml @@ -45,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__submit-sarif-failure.yml b/.github/workflows/__submit-sarif-failure.yml index 42038accab..1fd115c8f1 100644 --- a/.github/workflows/__submit-sarif-failure.yml +++ b/.github/workflows/__submit-sarif-failure.yml @@ -39,7 +39,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test @@ -54,7 +54,7 @@ jobs: ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./init with: languages: javascript diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index f7c5aff50f..d805b890e6 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -45,7 +45,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__test-autobuild-working-dir.yml b/.github/workflows/__test-autobuild-working-dir.yml index c2a815ef7b..a9ad5b6bf1 100644 --- a/.github/workflows/__test-autobuild-working-dir.yml +++ b/.github/workflows/__test-autobuild-working-dir.yml @@ -35,7 +35,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__test-local-codeql.yml b/.github/workflows/__test-local-codeql.yml index 127ff679be..d257cda3e2 100644 --- a/.github/workflows/__test-local-codeql.yml +++ b/.github/workflows/__test-local-codeql.yml @@ -35,7 +35,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__test-proxy.yml b/.github/workflows/__test-proxy.yml index 71ca3c4c23..20bf9c4e4a 100644 --- a/.github/workflows/__test-proxy.yml +++ b/.github/workflows/__test-proxy.yml @@ -35,7 +35,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__unset-environment.yml b/.github/workflows/__unset-environment.yml index 44d8857a62..228fe0f17b 100644 --- a/.github/workflows/__unset-environment.yml +++ b/.github/workflows/__unset-environment.yml @@ -47,7 +47,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__upload-ref-sha-input.yml b/.github/workflows/__upload-ref-sha-input.yml index 422ddb50c1..f6f9f1049c 100644 --- a/.github/workflows/__upload-ref-sha-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index 2d2b7c12d4..a0d1efc04c 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -75,7 +75,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test @@ -90,7 +90,7 @@ jobs: ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 path: x/y/z/some-path diff --git a/.github/workflows/check-expected-release-files.yml b/.github/workflows/check-expected-release-files.yml index ee637ba755..c5d225b410 100644 --- a/.github/workflows/check-expected-release-files.yml +++ b/.github/workflows/check-expected-release-files.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout CodeQL Action - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check Expected Release Files run: | bundle_version="$(cat "./src/defaults.json" | jq -r ".bundleVersion")" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ee7f36528c..b3e8ac63a3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,7 @@ jobs: security-events: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Init with default CodeQL bundle from the VM image id: init-default uses: ./init @@ -82,7 +82,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: ./init id: init diff --git a/.github/workflows/codescanning-config-cli.yml b/.github/workflows/codescanning-config-cli.yml index e070c0dd82..801324ecca 100644 --- a/.github/workflows/codescanning-config-cli.yml +++ b/.github/workflows/codescanning-config-cli.yml @@ -44,7 +44,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/debug-artifacts-failure.yml b/.github/workflows/debug-artifacts-failure.yml index 9740121655..41cc5e3546 100644 --- a/.github/workflows/debug-artifacts-failure.yml +++ b/.github/workflows/debug-artifacts-failure.yml @@ -33,7 +33,7 @@ jobs: - name: Dump GitHub event run: cat "${GITHUB_EVENT_PATH}" - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/debug-artifacts.yml b/.github/workflows/debug-artifacts.yml index 2ccac6624c..8e5d974f5e 100644 --- a/.github/workflows/debug-artifacts.yml +++ b/.github/workflows/debug-artifacts.yml @@ -39,7 +39,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/expected-queries-runs.yml b/.github/workflows/expected-queries-runs.yml index b3b33e1df1..c195245b9f 100644 --- a/.github/workflows/expected-queries-runs.yml +++ b/.github/workflows/expected-queries-runs.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/post-release-mergeback.yml b/.github/workflows/post-release-mergeback.yml index 1a38dfd74c..029ac3c191 100644 --- a/.github/workflows/post-release-mergeback.yml +++ b/.github/workflows/post-release-mergeback.yml @@ -35,7 +35,7 @@ jobs: GITHUB_CONTEXT: '${{ toJson(github) }}' run: echo "${GITHUB_CONTEXT}" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 - name: Update git config diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 824837cc60..70ae145e53 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Lint run: npm run-script lint @@ -31,7 +31,7 @@ jobs: timeout-minutes: 45 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check node modules up to date run: .github/workflows/script/check-node-modules.sh @@ -42,7 +42,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 @@ -69,7 +69,7 @@ jobs: timeout-minutes: 45 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: npm test run: | # Run any commands referenced in package.json using Bash, otherwise diff --git a/.github/workflows/python-deps.yml b/.github/workflows/python-deps.yml index 29481768b5..c26eaf17e8 100644 --- a/.github/workflows/python-deps.yml +++ b/.github/workflows/python-deps.yml @@ -37,7 +37,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Initialize CodeQL uses: ./init @@ -84,7 +84,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Initialize CodeQL uses: ./init @@ -137,7 +137,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: diff --git a/.github/workflows/query-filters.yml b/.github/workflows/query-filters.yml index e2f5642ea5..81ddb91027 100644 --- a/.github/workflows/query-filters.yml +++ b/.github/workflows/query-filters.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/test-codeql-bundle-all.yml b/.github/workflows/test-codeql-bundle-all.yml index c455d71a47..43bab7d243 100644 --- a/.github/workflows/test-codeql-bundle-all.yml +++ b/.github/workflows/test-codeql-bundle-all.yml @@ -32,7 +32,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare test id: prepare-test uses: ./.github/actions/prepare-test diff --git a/.github/workflows/update-bundle.yml b/.github/workflows/update-bundle.yml index b9614c0233..fc70aac95c 100644 --- a/.github/workflows/update-bundle.yml +++ b/.github/workflows/update-bundle.yml @@ -26,7 +26,7 @@ jobs: GITHUB_CONTEXT: '${{ toJson(github) }}' run: echo "$GITHUB_CONTEXT" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Update git config run: | diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index f854f85e2e..c7cf93196d 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -11,7 +11,7 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'Update dependencies') && (github.event.pull_request.head.repo.full_name == 'github/codeql-action') steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Remove PR label env: @@ -34,4 +34,8 @@ jobs: git add node_modules git commit -am "Update checked-in dependencies" git push origin "HEAD:$BRANCH" + echo "Pushed a commit to update the checked-in dependencies." \ + "Please mark the PR as ready for review to trigger PR checks." | + gh pr comment --body-file - --repo github/codeql-action --pr "${{ github.event.pull_request.number }}" + gh pr ready --undo --repo github/codeql-action --pr "${{ github.event.pull_request.number }}" fi diff --git a/.github/workflows/update-release-branch.yml b/.github/workflows/update-release-branch.yml index d9479222cd..2f95d40540 100644 --- a/.github/workflows/update-release-branch.yml +++ b/.github/workflows/update-release-branch.yml @@ -18,7 +18,7 @@ jobs: GITHUB_CONTEXT: '${{ toJson(github) }}' run: echo "$GITHUB_CONTEXT" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # Need full history so we calculate diffs fetch-depth: 0 diff --git a/.github/workflows/update-supported-enterprise-server-versions.yml b/.github/workflows/update-supported-enterprise-server-versions.yml index 543efa77ca..0429fcbab4 100644 --- a/.github/workflows/update-supported-enterprise-server-versions.yml +++ b/.github/workflows/update-supported-enterprise-server-versions.yml @@ -18,9 +18,9 @@ jobs: with: python-version: "3.7" - name: Checkout CodeQL Action - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Checkout Enterprise Releases - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: github/enterprise-releases ssh-key: ${{ secrets.ENTERPRISE_RELEASES_SSH_KEY }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 1462d21891..6abd3cec50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs. +## 2.21.6 - 13 Sep 2023 + +- Better error message when there is a failure to determine the merge base of the code to analysis. [#1860](https://github.com/github/codeql-action/pull/1860) +- Improve the calculation of default amount of RAM used for query execution on GitHub Enterprise Server. This now reduces in proportion to the runner's total memory to better account for system memory usage, helping to avoid out-of-memory failures on larger runners. This feature is already available to GitHub.com users. [#1866](https://github.com/github/codeql-action/pull/1866) +- Enable improved file coverage information for GitHub Enterprise Server users. This feature is already available to GitHub.com users. [#1867](https://github.com/github/codeql-action/pull/1867) +- Update default CodeQL bundle version to 2.14.4. [#1873](https://github.com/github/codeql-action/pull/1873) + ## 2.21.5 - 28 Aug 2023 - Update default CodeQL bundle version to 2.14.3. [#1845](https://github.com/github/codeql-action/pull/1845) diff --git a/lib/actions-util.js b/lib/actions-util.js index 42f34558c9..b53683ff28 100644 --- a/lib/actions-util.js +++ b/lib/actions-util.js @@ -75,6 +75,7 @@ const getCommitOid = async function (checkoutPath, ref = "HEAD") { // the merge commit, which must mean that git is available. // Even if this does go wrong, it's not a huge problem for the alerts to // reported on the merge commit. + let stderr = ""; try { let commitOid = ""; await new toolrunner.ToolRunner(await safeWhich.safeWhich("git"), ["rev-parse", ref], { @@ -84,7 +85,7 @@ const getCommitOid = async function (checkoutPath, ref = "HEAD") { commitOid += data.toString(); }, stderr: (data) => { - process.stderr.write(data); + stderr += data.toString(); }, }, cwd: checkoutPath, @@ -92,9 +93,13 @@ const getCommitOid = async function (checkoutPath, ref = "HEAD") { return commitOid.trim(); } catch (e) { - core.info("Could not determine current commit SHA using git. Continuing with data from user input or environment."); - core.debug(`Reason: ${e.message}`); - core.debug(e.stack || "NO STACK"); + if (stderr.includes("not a git repository")) { + core.info("Could not determine current commit SHA using git. Continuing with data from user input or environment. " + + "The checkout path provided to the action does not appear to be a git repository."); + } + else { + core.info(`Could not determine current commit SHA using git. Continuing with data from user input or environment. ${stderr}`); + } return (0, exports.getOptionalInput)("sha") || (0, util_1.getRequiredEnvParam)("GITHUB_SHA"); } }; @@ -103,12 +108,13 @@ exports.getCommitOid = getCommitOid; * If the action was triggered by a pull request, determine the commit sha of the merge base. * Returns undefined if run by other triggers or the merge base cannot be determined. */ -const determineMergeBaseCommitOid = async function () { +const determineMergeBaseCommitOid = async function (checkoutPathOverride) { if (getWorkflowEventName() !== "pull_request") { return undefined; } const mergeSha = (0, util_1.getRequiredEnvParam)("GITHUB_SHA"); - const checkoutPath = (0, exports.getOptionalInput)("checkout_path"); + const checkoutPath = checkoutPathOverride ?? (0, exports.getOptionalInput)("checkout_path"); + let stderr = ""; try { let commitOid = ""; let baseOid = ""; @@ -130,7 +136,7 @@ const determineMergeBaseCommitOid = async function () { } }, stderr: (data) => { - process.stderr.write(data); + stderr += data.toString(); }, }, cwd: checkoutPath, @@ -144,8 +150,14 @@ const determineMergeBaseCommitOid = async function () { return undefined; } catch (e) { - core.info(`Failed to call git to determine merge base. Continuing with data from environment: ${e}`); - core.info(e.stack || "NO STACK"); + if (stderr.includes("not a git repository")) { + core.info("The checkout path provided to the action does not appear to be a git repository. " + + "Will calculate the merge base on the server."); + } + else { + core.info(`Failed to call git to determine merge base. Will calculate the merge base on ` + + `the server. Reason: ${stderr}`); + } return undefined; } }; diff --git a/lib/actions-util.js.map b/lib/actions-util.js.map index 81299f73fb..83d443ec2e 100644 --- a/lib/actions-util.js.map +++ b/lib/actions-util.js.map @@ -1 +1 @@ -{"version":3,"file":"actions-util.js","sourceRoot":"","sources":["../src/actions-util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AACtC,yEAA2D;AAC3D,kEAAoD;AAIpD,iCAKgB;AAEhB,8CAA8C;AAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAqC,CAAC;AAE3E;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,UAAU,IAAY;IACpD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,gBAAS,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAC;KACjE;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B;AAEF;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,UAAU,IAAY;IACpD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9C,CAAC,CAAC;AAHW,QAAA,gBAAgB,oBAG3B;AAEF,SAAgB,qBAAqB;IACnC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAChD,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QACxC,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,IAAA,0BAAmB,EAAC,aAAa,CAAC,CAAC;AACzC,CAAC;AALD,sDAKC;AAED;;GAEG;AACI,MAAM,YAAY,GAAG,KAAK,WAC/B,YAAoB,EACpB,GAAG,GAAG,MAAM;IAEZ,mEAAmE;I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ED;;GAEG;AACH,SAAgB,qBAAqB;IACnC,MAAM,wBAAwB,GAAG,IAAA,0BAAmB,EAAC,oBAAoB,CAAC,CAAC;IAC3E,MAAM,kBAAkB,GAAG,QAAQ,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAC;IAClE,IAAI,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE;QACpC,MAAM,IAAI,KAAK,CACb,mFAAmF,wBAAwB,EAAE,CAC9G,CAAC;KACH;IACD,IAAI,kBAAkB,IAAI,CAAC,EAAE;QAC3B,MAAM,IAAI,KAAK,CACb,mEAAmE,wBAAwB,EAAE,CAC9F,CAAC;KACH;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAdD,sDAcC"} \ No newline at end of file +{"version":3,"file":"actions-util.js","sourceRoot":"","sources":["../src/actions-util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AACtC,yEAA2D;AAC3D,kEAAoD;AAIpD,iCAKgB;AAEhB,8CAA8C;AAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAqC,CAAC;AAE3E;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,UAAU,IAAY;IACpD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,gBAAS,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAC;KACjE;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B;AAEF;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,UAAU,IAAY;IACpD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CA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IAAI,CAAC,OAAO,CACV,oDAAoD,KAAK,2BAA2B,CACrF,CAAC;YACF,OAAO,QAAQ,CAAC;KACnB;AACH,CAAC;AAjBD,wCAiBC;AAED;;GAEG;AACH,SAAgB,gBAAgB;IAC9B,MAAM,mBAAmB,GAAG,IAAA,0BAAmB,EAAC,eAAe,CAAC,CAAC;IACjE,MAAM,aAAa,GAAG,QAAQ,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IACxD,IAAI,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE;QAC/B,MAAM,IAAI,KAAK,CACb,yEAAyE,mBAAmB,EAAE,CAC/F,CAAC;KACH;IACD,IAAI,aAAa,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CACb,kEAAkE,mBAAmB,EAAE,CACxF,CAAC;KACH;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAdD,4CAcC;AAED;;GAEG;AACH,SAAgB,qBAAqB;IACnC,MAAM,wBAAwB,GAAG,IAAA,0BAAmB,EAAC,oBAAoB,CAAC,CAAC;IAC3E,MAAM,kBAAkB,GAAG,QAAQ,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAC;IAClE,IAAI,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE;QACpC,MAAM,IAAI,KAAK,CACb,mFAAmF,wBAAwB,EAAE,CAC9G,CAAC;KACH;IACD,IAAI,kBAAkB,IAAI,CAAC,EAAE;QAC3B,MAAM,IAAI,KAAK,CACb,mEAAmE,wBAAwB,EAAE,CAC9F,CAAC;KACH;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAdD,sDAcC"} \ No newline at end of file diff --git a/lib/actions-util.test.js b/lib/actions-util.test.js index 3b126286c8..c465bb1547 100644 --- a/lib/actions-util.test.js +++ b/lib/actions-util.test.js @@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); const fs = __importStar(require("fs")); const path = __importStar(require("path")); +const core = __importStar(require("@actions/core")); const ava_1 = __importDefault(require("ava")); const sinon = __importStar(require("sinon")); const actionsUtil = __importStar(require("./actions-util")); @@ -213,4 +214,32 @@ const util_1 = require("./util"); getAdditionalInputStub.restore(); }); }); +(0, ava_1.default)("determineMergeBaseCommitOid non-pullrequest", async (t) => { + const infoStub = sinon.stub(core, "info"); + process.env["GITHUB_EVENT_NAME"] = "hucairz"; + process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a"; + const result = await actionsUtil.determineMergeBaseCommitOid(__dirname); + t.deepEqual(result, undefined); + t.deepEqual(0, infoStub.callCount); + infoStub.restore(); +}); +(0, ava_1.default)("determineMergeBaseCommitOid no error", async (t) => { + const infoStub = sinon.stub(core, "info"); + process.env["GITHUB_EVENT_NAME"] = "pull_request"; + process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a"; + await actionsUtil.determineMergeBaseCommitOid(path.join(__dirname, "../..")); + t.deepEqual(1, infoStub.callCount); + t.assert(infoStub.firstCall.args[0].startsWith("The checkout path provided to the action does not appear to be a git repository.")); + infoStub.restore(); +}); +(0, ava_1.default)("determineMergeBaseCommitOid other error", async (t) => { + const infoStub = sinon.stub(core, "info"); + process.env["GITHUB_EVENT_NAME"] = "pull_request"; + process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a"; + const result = await actionsUtil.determineMergeBaseCommitOid(path.join(__dirname, "../../i-dont-exist")); + t.deepEqual(result, undefined); + t.deepEqual(1, infoStub.callCount); + t.assert(infoStub.firstCall.args[0].startsWith("Failed to call git to determine merge base.")); + infoStub.restore(); +}); //# sourceMappingURL=actions-util.test.js.map \ No newline at end of file diff --git a/lib/actions-util.test.js.map b/lib/actions-util.test.js.map index c5512d0533..1dced1de0c 100644 --- a/lib/actions-util.test.js.map +++ b/lib/actions-util.test.js.map @@ -1 +1 @@ -{"version":3,"file":"actions-util.test.js","sourceRoot":"","sources":["../src/actions-util.test.ts"],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C,YAAY,CAAC,GAAG,0CAA0C,CAAC;IACvE,MAAM,WAAW,CAAC,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC,CAAC,MAAM,CACN,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CACnC,kFAAkF,CACnF,CACF,CAAC;IAEF,QAAQ,CAAC,OAAO,EAAE,CAAC;AACrB,CAAC,CAAC,CAAC;AAEH,IAAA,aAAI,EAAC,yCAAyC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC1D,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAE1C,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,cAAc,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,0CAA0C,CAAC;IACvE,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,2BAA2B,CAC1D,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAC3C,CAAC;IACF,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC/B,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC,CAAC,MAAM,CACN,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CACnC,6CAA6C,CAC9C,CACF,CAAC;IAEF,QAAQ,CAAC,OAAO,EAAE,CAAC;AACrB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 32ec825e28..c63368a9b5 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -133,6 +133,7 @@ async function runAutobuildIfLegacyGoWorkflow(config, logger) { } return; } + logger.debug("Running Go autobuild because extraction output (TRAP files) for Go code has not been found."); await (0, autobuild_1.runAutobuild)(languages_1.Language.go, config, logger); } async function run() { @@ -154,7 +155,7 @@ async function run() { throw new Error("Config file could not be found at expected location. Has the 'init' action been called?"); } if (hasBadExpectErrorInput()) { - throw new Error("`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork."); + throw new util.UserError("`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork."); } const apiDetails = (0, api_client_1.getApiDetails)(); const outputDir = actionsUtil.getRequiredInput("output"); @@ -162,7 +163,7 @@ async function run() { const repositoryNwo = (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")); const gitHubVersion = await (0, api_client_1.getGitHubVersion)(); const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger); - const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"], await features.getValue(feature_flags_1.Feature.ScalingReservedRamEnabled)); + const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"]); await runAutobuildIfLegacyGoWorkflow(config, logger); dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, config, logger, features); if (actionsUtil.getRequiredInput("skip-queries") !== "true") { @@ -179,7 +180,7 @@ async function run() { core.setOutput("sarif-output", path_1.default.resolve(outputDir)); const uploadInput = actionsUtil.getOptionalInput("upload"); if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") { - uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger); + uploadResult = await uploadLib.uploadFromActions(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger, { considerInvalidRequestUserError: false }); core.setOutput("sarif-id", uploadResult.sarifID); } else { diff --git a/lib/analyze-action.js.map b/lib/analyze-action.js.map index 7e5b1a9c81..2e2eccd4a5 100644 --- a/lib/analyze-action.js.map +++ b/lib/analyze-action.js.map @@ -1 +1 @@ -{"version":3,"file":"analyze-action.js","sourceRoot":"","sources":["../src/analyze-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,gDAAwB;AACxB,2CAAyC;AAEzC,oDAAsC;AAEtC,4DAA8C;AAC9C,uCAOmB;AACnB,6CAA+D;AAC/D,2CAA2C;AAC3C,qCAAqC;AACrC,iDAAgF;AAChF,uDAAoD;AACpD,+CAAuC;AACvC,mDAAoD;AACpD,2CAAuC;AACvC,uCAAqD;AACrD,6CAAkD;AAClD,8DAAgD;AAChD,mDAKyB;AACzB,iDAAqE;AACrE,wDAA0C;AAE1C,6CAA+B;AAC/B,iCAAoD;AAkBpD,KAAK,UAAU,gBAAgB,CAC7B,SAAe,EACf,MAA0B,EAC1B,KAAuC,EACvC,KAAwB,EACxB,mBAAuC,EACvC,iBAAsD,EACtD,mBAA4B,EAC5B,MAAc;IAEd,MAAM,MAAM,GAAG,IAAA,gCAAgB,EAAC,KAAK,EAAE,KAAK,EAAE,wBAAwB,CAAC,CAAC;IACxE,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,QAAQ,EACR,MAAM,EACN,SAAS,EACT,MAAM,IAAI,CAAC,cAAc,EAAE,EAC3B,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,KAAK,CACb,CAAC;IACF,MAAM,MAAM,GAAuB;QACjC,GAAG,gBAAgB;QACnB,GAAG,CAAC,MAAM;YACR,CAAC,CAAC;gBACE,6BAA6B,EAAE,IAAA,0CAA2B,EAAC,MAAM,CAAC;aACnE;YACH,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;QAChB,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC;KAC7B,CAAC;IACF,IAAI,MAAM,IAAI,mBAAmB,EAAE;Q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ACF,MAAM,kBAAU,CAAC;KAClB;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,0BAA0B,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACtE;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"analyze-action.js","sourceRoot":"","sources":["../src/analyze-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,gDAAwB;AACxB,2CAAyC;AAEzC,oDAAsC;AAEtC,4DAA8C;AAC9C,uCAOmB;AACnB,6CAA+D;AAC/D,2CAA2C;AAC3C,qCAAqC;AACrC,iDAAgF;AAChF,uDAAoD;AACpD,+CAAuC;AACvC,mDAA2C;AAC3C,2CAAuC;AACvC,uCAAqD;AACrD,6CAAkD;AAClD,8DAAgD;AAChD,mDAKyB;AACzB,iDAAqE;AACrE,wDAA0C;AAE1C,6CAA+B;AAC/B,iCAAoD;AAkBpD,KAAK,UAAU,gBAAgB,CAC7B,SAAe,EACf,MAA0B,EAC1B,KAAuC,EACvC,KAAwB,EACxB,mBAAuC,EACvC,iBAAsD,EACtD,mBAA4B,EAC5B,MAAc;IAEd,MAAM,MAAM,GAAG,IAAA,gCAAgB,EAAC,KAAK,EAAE,KAAK,EAAE,wBAAwB,CAAC,CAAC;IACxE,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,QAAQ,EACR,MAAM,EACN,SAAS,EACT,MAAM,IAAI,CAAC,cAAc,EAAE,EAC3B,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,KAAK,CACb,CAAC;IACF,MAAM,MAAM,GAAuB;QACjC,GAAG,gBAAgB;QACnB,GAAG,CAAC,MAAM;YACR,CAAC,CAAC;gBACE,6BAA6B,EAAE,IAAA,0CAA2B,EAAC,MAAM,CAAC;aACnE;YACH,CAA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ACT,MAAM,EACN,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,CACP,CAAC;KACH;AACH,CAAC;AAEY,QAAA,UAAU,GAAG,GAAG,EAAE,CAAC;AAEhC,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,kBAAU,CAAC;KAClB;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,0BAA0B,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACtE;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/lib/api-compatibility.json b/lib/api-compatibility.json index 05aa4f49c4..4c79bf98bd 100644 --- a/lib/api-compatibility.json +++ b/lib/api-compatibility.json @@ -1 +1 @@ -{ "maximumVersion": "3.10", "minimumVersion": "3.6" } +{ "maximumVersion": "3.11", "minimumVersion": "3.6" } diff --git a/lib/codeql.js b/lib/codeql.js index 1f1bb19d51..6ce8c968f7 100644 --- a/lib/codeql.js +++ b/lib/codeql.js @@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getGeneratedCodeScanningConfigPath = exports.getTrapCachingExtractorConfigArgsForLang = exports.getTrapCachingExtractorConfigArgs = exports.getExtraOptions = exports.getCodeQLForCmd = exports.getCodeQLForTesting = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.setupCodeQL = exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = exports.CODEQL_VERSION_BETTER_NO_CODE_ERROR_MESSAGE = exports.CODEQL_VERSION_INIT_WITH_QLCONFIG = exports.CODEQL_VERSION_EXPORT_CODE_SCANNING_CONFIG = exports.CODEQL_VERSION_SECURITY_EXPERIMENTAL_SUITE = exports.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = exports.CODEQL_VERSION_GHES_PACK_DOWNLOAD = exports.CommandInvocationError = void 0; +exports.getGeneratedCodeScanningConfigPath = exports.getTrapCachingExtractorConfigArgsForLang = exports.getTrapCachingExtractorConfigArgs = exports.getExtraOptions = exports.getCodeQLForCmd = exports.getCodeQLForTesting = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.setupCodeQL = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = exports.CODEQL_VERSION_BETTER_NO_CODE_ERROR_MESSAGE = exports.CODEQL_VERSION_INIT_WITH_QLCONFIG = exports.CODEQL_VERSION_EXPORT_CODE_SCANNING_CONFIG = exports.CODEQL_VERSION_SECURITY_EXPERIMENTAL_SUITE = exports.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = exports.CODEQL_VERSION_GHES_PACK_DOWNLOAD = exports.CommandInvocationError = void 0; const fs = __importStar(require("fs")); const path = __importStar(require("path")); const core = __importStar(require("@actions/core")); @@ -108,6 +108,10 @@ exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = "2.13.1"; * Versions 2.13.4+ of the CodeQL CLI support the `resolve build-environment` command. */ exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = "2.13.4"; +/** + * Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration. + */ +exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2"; /** * Set up CodeQL CLI access. * @@ -278,7 +282,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_INIT_WITH_QLCONFIG))) { extraArgs.push(`--qlconfig-file=${qlconfigFile}`); } - if (await features.getValue(feature_flags_1.Feature.LanguageBaselineConfigEnabled, this)) { + if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG)) { extraArgs.push("--calculate-language-specific-baseline"); } await runTool(cmd, [ diff --git a/lib/codeql.js.map b/lib/codeql.js.map index 6523a091d8..6614f8a5eb 100644 --- a/lib/codeql.js.map +++ b/lib/codeql.js.map @@ -1 +1 @@ -{"version":3,"file":"codeql.js","sourceRoot":"","sources":["../src/codeql.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,oDAAsC;AACtC,yEAA2D;AAC3D,8CAAgC;AAEhC,iDAA4E;AAG5E,+CAAuC;AACvC,mDAOyB;AACzB,2CAAyD;AAEzD,4DAA8C;AAC9C,6CAA+B;AAC/B,iCAAmC;AAuBnC,MAAa,sBAAuB,SAAQ,KAAK;IAC/C,YACE,GAAW,EACX,IAAc,EACP,QAAgB,EAChB,KAAa,EACb,MAAc;QAErB,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;aACjC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAC5C,IAAI,CAAC,GAAG,CAAC,CAAC;QACb,KAAK,CACH,4CAA4C,aAAa,KAAK;YAC5D,iBAAiB,QAAQ,mBAAmB,KAAK,CAAC,IAAI,EAAE,EAAE,CAC7D,CAAC;QAVK,aAAQ,GAAR,QAAQ,CAAQ;QAChB,UAAK,GAAL,KAAK,CAAQ;QACb,WAAM,GAAN,MAAM,CAAQ;IASvB,CAAC;CACF;AAhBD,wDAgBC;AAmMD;;;GAGG;AACH,IAAI,YAAY,GAAuB,SAAS,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,2BAA2B,GAAG,OAAO,CAAC;AAE5C;;;;GAIG;AACH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EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,4BAA4B,CAAC,CAAC;AAC7E,CAAC;AAED,KAAK,UAAU,oCAAoC,CACjD,MAAc;IAEd,OAAO,MAAM,IAAI,CAAC,kBAAkB,CAClC,MAAM,EACN,+CAAuC,CACxC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/lib/defaults.json b/lib/defaults.json index ba2b05b1c8..8a520c762d 100644 --- a/lib/defaults.json +++ b/lib/defaults.json @@ -1,6 +1,6 @@ { - "bundleVersion": "codeql-bundle-v2.14.3", - "cliVersion": "2.14.3", - "priorBundleVersion": "codeql-bundle-v2.14.2", - "priorCliVersion": "2.14.2" + "bundleVersion": "codeql-bundle-v2.14.4", + "cliVersion": "2.14.4", + "priorBundleVersion": "codeql-bundle-v2.14.3", + "priorCliVersion": "2.14.3" } diff --git a/lib/environment.js b/lib/environment.js index 31c525f6e3..131e35bb3e 100644 --- a/lib/environment.js +++ b/lib/environment.js @@ -31,6 +31,11 @@ var EnvVar; /** UUID representing the current job run. */ EnvVar["JOB_RUN_UUID"] = "JOB_RUN_UUID"; EnvVar["ODASA_TRACER_CONFIGURATION"] = "ODASA_TRACER_CONFIGURATION"; + /** + * What percentage of the total amount of RAM over 8 GB that the Action should reserve for the + * system. + */ + EnvVar["SCALING_RESERVED_RAM_PERCENTAGE"] = "CODEQL_ACTION_SCALING_RESERVED_RAM_PERCENTAGE"; /** Whether to suppress the warning if the current CLI will soon be unsupported. */ EnvVar["SUPPRESS_DEPRECATED_SOON_WARNING"] = "CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING"; /** Whether to disable uploading SARIF results or status reports to the GitHub API */ diff --git a/lib/environment.js.map b/lib/environment.js.map index 1edcbdeb33..b8bb30086b 100644 --- a/lib/environment.js.map +++ b/lib/environment.js.map @@ -1 +1 @@ -{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":";;;AAAA,IAAY,MA0DX;AA1DD,WAAY,MAAM;IAChB,2DAA2D;IAC3D,+FAAqF,CAAA;IAErF,gEAAgE;IAChE,qEAA2D,CAAA;IAE3D;;;OAGG;IACH,yFAA+E,CAAA;IAE/E;;;OAGG;IACH,yEAA+D,CAAA;IAE/D,gFAAgF;IAChF,6DAAmD,CAAA;IAEnD;;;OAGG;IACH,uEAA6D,CAAA;IAE7D,gEAAgE;IAChE,mEAAyD,CAAA;IAEzD,kFAAkF;IAClF,mFAAyE,CAAA;IAEzE,6CAA6C;IAC7C,uCAA6B,CAAA;IAE7B,mEAAyD,CAAA;IAEzD,mFAAmF;IACnF,6FAAmF,CAAA;IAEnF,qFAAqF;IACrF,+CAAqC,CAAA;IAErC,mEAAyD,CAAA;IAEzD,kEAAkE;IAClE,2CAAiC,CAAA;IAEjC;;;;;;OAMG;IACH,4DAAkD,CAAA;AACpD,CAAC,EA1DW,MAAM,sBAAN,MAAM,QA0DjB"} \ No newline at end of file +{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAgEX;AAhED,WAAY,MAAM;IAChB,2DAA2D;IAC3D,+FAAqF,CAAA;IAErF,gEAAgE;IAChE,qEAA2D,CAAA;IAE3D;;;OAGG;IACH,yFAA+E,CAAA;IAE/E;;;OAGG;IACH,yEAA+D,CAAA;IAE/D,gFAAgF;IAChF,6DAAmD,CAAA;IAEnD;;;OAGG;IACH,uEAA6D,CAAA;IAE7D,gEAAgE;IAChE,mEAAyD,CAAA;IAEzD,kFAAkF;IAClF,mFAAyE,CAAA;IAEzE,6CAA6C;IAC7C,uCAA6B,CAAA;IAE7B,mEAAyD,CAAA;IAEzD;;;OAGG;IACH,2FAAiF,CAAA;IAEjF,mFAAmF;IACnF,6FAAmF,CAAA;IAEnF,qFAAqF;IACrF,+CAAqC,CAAA;IAErC,mEAAyD,CAAA;IAEzD,kEAAkE;IAClE,2CAAiC,CAAA;IAEjC;;;;;;OAMG;IACH,4DAAkD,CAAA;AACpD,CAAC,EAhEW,MAAM,sBAAN,MAAM,QAgEjB"} \ No newline at end of file diff --git a/lib/feature-flags.js b/lib/feature-flags.js index 621daa7fa7..eb927f3d77 100644 --- a/lib/feature-flags.js +++ b/lib/feature-flags.js @@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0; +exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0; const fs = __importStar(require("fs")); const path = __importStar(require("path")); const semver = __importStar(require("semver")); @@ -44,10 +44,6 @@ exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.14.0"; * Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options. */ exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0"; -/** - * Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration. - */ -exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2"; /** * Feature enablement as returned by the GitHub API endpoint. * @@ -62,10 +58,8 @@ var Feature; Feature["DisablePythonDependencyInstallationEnabled"] = "disable_python_dependency_installation_enabled"; Feature["EvaluatorIntraLayerParallelismEnabled"] = "evaluator_intra_layer_parallelism_enabled"; Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled"; - Feature["LanguageBaselineConfigEnabled"] = "language_baseline_config_enabled"; Feature["MlPoweredQueriesEnabled"] = "ml_powered_queries_enabled"; Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled"; - Feature["ScalingReservedRamEnabled"] = "scaling_reserved_ram_enabled"; Feature["UploadFailedSarifEnabled"] = "upload_failed_sarif_enabled"; })(Feature || (exports.Feature = Feature = {})); exports.featureConfig = { @@ -99,11 +93,6 @@ exports.featureConfig = { minimumVersion: "2.12.4", defaultValue: true, }, - [Feature.LanguageBaselineConfigEnabled]: { - envVar: "CODEQL_ACTION_LANGUAGE_BASELINE_CONFIG", - minimumVersion: exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG, - defaultValue: false, - }, [Feature.MlPoweredQueriesEnabled]: { envVar: "CODEQL_ML_POWERED_QUERIES", minimumVersion: undefined, @@ -114,11 +103,6 @@ exports.featureConfig = { minimumVersion: undefined, defaultValue: false, }, - [Feature.ScalingReservedRamEnabled]: { - envVar: "CODEQL_ACTION_SCALING_RESERVED_RAM", - minimumVersion: undefined, - defaultValue: false, - }, [Feature.UploadFailedSarifEnabled]: { envVar: "CODEQL_ACTION_UPLOAD_FAILED_SARIF", minimumVersion: "2.11.3", diff --git a/lib/feature-flags.js.map b/lib/feature-flags.js.map index 65dfafe914..9d51842e2c 100644 --- a/lib/feature-flags.js.map +++ b/lib/feature-flags.js.map @@ -1 +1 @@ -{"version":3,"file":"feature-flags.js","sourceRoot":"","sources":["../src/feature-flags.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,+CAAiC;AAEjC,6CAA4C;AAE5C,0DAA4C;AAG5C,6CAA+B;AAE/B,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;AACtE,MAAM,mCAAmC,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACU,QAAA,4CAA4C,GAAG,QAAQ,CAAC;AAErE;;GAEG;A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F,kFAAkF,CAAC,CAAC,OAAO,EAAE,CAChG,CAAC;gBACF,IAAI,CAAC,6BAA6B,GAAG,KAAK,CAAC;gBAC3C,OAAO,EAAE,CAAC;aACX;iBAAM;gBACL,kFAAkF;gBAClF,8EAA8E;gBAC9E,2FAA2F;gBAC3F,eAAe;gBACf,MAAM,IAAI,KAAK,CACb,sEAAsE,CAAC,EAAE,CAC1E,CAAC;aACH;SACF;IACH,CAAC;CACF;AAED;;;GAGG;AACI,KAAK,UAAU,0BAA0B,CAC9C,MAAc,EACd,QAA2B;IAE3B,OAAO,MAAM,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;AACvE,CAAC;AALD,gEAKC;AAEM,KAAK,UAAU,0BAA0B,CAC9C,MAAc,EACd,QAA2B,EAC3B,MAAc;IAEd,IAAI,MAAM,0BAA0B,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;QACtD,MAAM,CAAC,IAAI,CACT,qEAAqE,CACtE,CAAC;KACH;SAAM;QACL,MAAM,CAAC,IAAI,CACT,wEAAwE,CACzE,CAAC;KACH;AACH,CAAC;AAdD,gEAcC"} \ No newline at end of file +{"version":3,"file":"feature-flags.js","sourceRoot":"","sources":["../src/feature-flags.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,+CAAiC;AAEjC,6CAA4C;AAE5C,0DAA4C;AAG5C,6CAA+B;AAE/B,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;AACtE,MAAM,mCAAmC,GAAG,UAAU,CAAC;AAEvD;;GAEG;AACU,QAAA,4CAA4C,GAAG,QAAQ,CAAC;AAErE;;GAEG;AACU,QAAA,kCAAkC,GAAG,QAAQ,CAAC;AAE3D;;GAEG;AACU,QAAA,sCAAsC,GAAG,QAAQ,CAAC;AAgB/D;;;;GAIG;AACH,IAAY,OAWX;AAXD,WAAY,OAAO;IACjB,mEAAwD,CA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2B,EAC3B,MAAc;IAEd,IAAI,MAAM,0BAA0B,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;QACtD,MAAM,CAAC,IAAI,CACT,qEAAqE,CACtE,CAAC;KACH;SAAM;QACL,MAAM,CAAC,IAAI,CACT,wEAAwE,CACzE,CAAC;KACH;AACH,CAAC;AAdD,gEAcC"} \ No newline at end of file diff --git a/lib/init-action-post-helper.js b/lib/init-action-post-helper.js index ff27331bcb..51af11d8fc 100644 --- a/lib/init-action-post-helper.js +++ b/lib/init-action-post-helper.js @@ -74,7 +74,7 @@ async function maybeUploadFailedSarif(config, repositoryNwo, features, logger) { await codeql.databaseExportDiagnostics(databasePath, sarifFile, category, config.tempDir, logger); } core.info(`Uploading failed SARIF file ${sarifFile}`); - const uploadResult = await uploadLib.uploadFromActions(sarifFile, checkoutPath, category, logger); + const uploadResult = await uploadLib.uploadFromActions(sarifFile, checkoutPath, category, logger, { considerInvalidRequestUserError: false }); await uploadLib.waitForProcessing(repositoryNwo, uploadResult.sarifID, logger, { isUnsuccessfulExecution: true }); return uploadResult?.statusReport ?? {}; } diff --git a/lib/init-action-post-helper.js.map b/lib/init-action-post-helper.js.map index ad0be3f70a..b23bd736d5 100644 --- a/lib/init-action-post-helper.js.map +++ b/lib/init-action-post-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,qCAAqC;AACrC,iDAAmD;AACnD,+CAAuC;AACvC,mDAA6D;AAG7D,wDAA0C;AAC1C,iCAKgB;AAChB,yCAKoB;AAWpB,SAAS,mCAAmC,CAC1C,KAAc;IAEd,MAAM,YAAY,GAAG,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC;IACtC,OAAO;QACL,uBAAuB,EAAE,YAAY,CAAC,OAAO;QAC7C,6BAA6B,EAAE,YAAY,CAAC,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0BC;AAEM,KAAK,UAAU,GAAG,CACvB,iCAA2C,EAC3C,uBAAiC,EACjC,cAAwB,EACxB,aAA4B,EAC5B,QAA2B,EAC3B,MAAc;IAEd,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAAC,WAAW,CAAC,qBAAqB,EAAE,EAAE,MAAM,CAAC,CAAC;IAC5E,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,MAAM,CAAC,OAAO,CACZ,iGAAiG,CAClG,CAAC;QACF,OAAO;KACR;IAED,MAAM,uBAAuB,GAAG,MAAM,yBAAyB,CAC7D,MAAM,EACN,aAAa,EACb,QAAQ,EACR,MAAM,CACP,CAAC;IAEF,IAAI,uBAAuB,CAAC,iCAAiC,EAAE;QAC7D,MAAM,CAAC,KAAK,CACV,8EAA8E;YAC5E,GAAG,uBAAuB,CAAC,iCAAiC,GAAG,CAClE,CAAC;KACH;IACD,8FAA8F;IAC9F,iCAAiC;IACjC,IACE,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,KAAK,MAAM;QAClE,CAAC,uBAAuB,CAAC,qBAAqB,EAC9C;QACA,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QACtD,MAAM,IAAI,KAAK,CACb,4EAA4E;YAC1E,8BAA8B,KAAK,GAAG,CACzC,CAAC;KACH;IAED,qDAAqD;IACrD,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,IAAI,CAAC,IAAI,CACP,mGAAmG,CACpG,CAAC;QACF,MAAM,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAtDD,kBAsDC"} \ No newline at end of file +{"version":3,"file":"init-action-post-helper.js","sourceRoot":"","sources":["../src/init-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;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,MAAM,CAAC,SAAS,EAAE;QACpB,IAAI,CAAC,IAAI,CACP,mGAAmG,CACpG,CAAC;QACF,MAAM,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;KAC9B;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAtDD,kBAsDC"} \ No newline at end of file diff --git a/lib/init-action.js b/lib/init-action.js index 903f4cfb46..d69999e37b 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -173,7 +173,7 @@ async function run() { // options at https://codeql.github.com/docs/codeql-cli/manual/database-trace-command/ // for details. core.exportVariable("CODEQL_RAM", process.env["CODEQL_RAM"] || - (0, util_1.getMemoryFlagValue)((0, actions_util_1.getOptionalInput)("ram"), await features.getValue(feature_flags_1.Feature.ScalingReservedRamEnabled)).toString()); + (0, util_1.getMemoryFlagValue)((0, actions_util_1.getOptionalInput)("ram")).toString()); core.exportVariable("CODEQL_THREADS", (0, util_1.getThreadsFlagValue)((0, actions_util_1.getOptionalInput)("threads"), logger).toString()); // Disable Kotlin extractor if feature flag set if (await features.getValue(feature_flags_1.Feature.DisableKotlinAnalysisEnabled)) { diff --git a/lib/init-action.js.map b/lib/init-action.js.map index d923a5c7b7..753bde5b64 100644 --- a/lib/init-action.js.map +++ b/lib/init-action.js.map @@ -1 +1 @@ -{"version":3,"file":"init-action.js","sourceRoot":"","sources":["../src/init-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAE7B,oDAAsC;AACtC,+BAAoC;AAEpC,iDAKwB;AACxB,6CAAgD;AAGhD,iDAA6D;AAC7D,+CAAuC;AACvC,mDAAoD;AACpD,iCAA4E;AAC5E,2CAAuC;AACvC,uCAAqD;AACrD,6CAAkD;AAClD,iDAA6C;AAC7C,mDAKyB;AACzB,iDAAmD;AACnD,iCAcgB;AAChB,yC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AAC;aACjC;SACF;QAED,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;KACjD;IAAC,OAAO,cAAc,EAAE;QACvB,MAAM,KAAK,GAAG,IAAA,gBAAS,EAAC,cAAc,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9B,MAAM,yBAAyB,CAC7B,SAAS,EACT,MAAM,EACN,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,YAAY,EACZ,MAAM,EACN,KAAK,CACN,CAAC;QACF,OAAO;KACR;IACD,MAAM,yBAAyB,CAC7B,SAAS,EACT,MAAM,EACN,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,YAAY,EACZ,MAAM,CACP,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB;IAC5B,0DAA0D;IAC1D,MAAM,WAAW,GAAG,IAAA,+BAAgB,EAAC,cAAc,CAAC,CAAC;IACrD,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,WAAW,KAAK,MAAM,CAAC;IAE7D,6FAA6F;IAC7F,IAAI,CAAC,IAAA,qBAAc,GAAE;QAAE,OAAO,KAAK,CAAC;IAEpC,oDAAoD;IACpD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,uBAAuB,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACnE;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"init-action.js","sourceRoot":"","sources":["../src/init-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAE7B,oDAAsC;AACtC,+BAAoC;AA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a/lib/upload-lib.js b/lib/upload-lib.js index fd5485e10b..a0c6185367 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -55,7 +55,7 @@ function combineSarifFiles(sarifFiles) { combinedSarif.version = sarifObject.version; } else if (combinedSarif.version !== sarifObject.version) { - throw new Error(`Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`); + throw new InvalidRequestError(`Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`); } combinedSarif.runs.push(...sarifObject.runs); } @@ -129,21 +129,35 @@ function findSarifFilesInDir(sarifPath) { return sarifFiles; } exports.findSarifFilesInDir = findSarifFilesInDir; -// Uploads a single sarif file or a directory of sarif files -// depending on what the path happens to refer to. -async function uploadFromActions(sarifPath, checkoutPath, category, logger) { - return await uploadFiles(getSarifFilePaths(sarifPath), (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(checkoutPath), await actionsUtil.getRef(), await api.getAnalysisKey(), category, util.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getWorkflowRunAttempt(), checkoutPath, actionsUtil.getRequiredInput("matrix"), logger); +/** + * Uploads a single SARIF file or a directory of SARIF files depending on what `sarifPath` refers + * to. + * + * @param considerInvalidRequestUserError Whether an invalid request, for example one with a + * `sarifPath` that does not exist, should be considered a + * user error. + */ +async function uploadFromActions(sarifPath, checkoutPath, category, logger, { considerInvalidRequestUserError, }) { + try { + return await uploadFiles(getSarifFilePaths(sarifPath), (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(checkoutPath), await actionsUtil.getRef(), await api.getAnalysisKey(), category, util.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getWorkflowRunAttempt(), checkoutPath, actionsUtil.getRequiredInput("matrix"), logger); + } + catch (e) { + if (e instanceof InvalidRequestError && considerInvalidRequestUserError) { + throw new util_1.UserError(e.message); + } + throw e; + } } exports.uploadFromActions = uploadFromActions; function getSarifFilePaths(sarifPath) { if (!fs.existsSync(sarifPath)) { - throw new Error(`Path does not exist: ${sarifPath}`); + throw new InvalidRequestError(`Path does not exist: ${sarifPath}`); } let sarifFiles; if (fs.lstatSync(sarifPath).isDirectory()) { sarifFiles = findSarifFilesInDir(sarifPath); if (sarifFiles.length === 0) { - throw new Error(`No SARIF files found to upload in "${sarifPath}".`); + throw new InvalidRequestError(`No SARIF files found to upload in "${sarifPath}".`); } } else { @@ -159,14 +173,14 @@ function countResultsInSarif(sarif) { parsedSarif = JSON.parse(sarif); } catch (e) { - throw new Error(`Invalid SARIF. JSON syntax error: ${(0, util_1.wrapError)(e).message}`); + throw new InvalidRequestError(`Invalid SARIF. JSON syntax error: ${(0, util_1.wrapError)(e).message}`); } if (!Array.isArray(parsedSarif.runs)) { - throw new Error("Invalid SARIF. Missing 'runs' array."); + throw new InvalidRequestError("Invalid SARIF. Missing 'runs' array."); } for (const run of parsedSarif.runs) { if (!Array.isArray(run.results)) { - throw new Error("Invalid SARIF. Missing 'results' array in run."); + throw new InvalidRequestError("Invalid SARIF. Missing 'results' array in run."); } numResults += run.results.length; } @@ -195,7 +209,7 @@ function validateSarifFileSchema(sarifFilePath, logger) { // Set the main error message to the stacks of all the errors. // This should be of a manageable size and may even give enough to fix the error. const sarifErrors = errors.map((e) => `- ${e.stack}`); - throw new Error(`Unable to upload "${sarifFilePath}" as it is not valid SARIF:\n${sarifErrors.join("\n")}`); + throw new InvalidRequestError(`Unable to upload "${sarifFilePath}" as it is not valid SARIF:\n${sarifErrors.join("\n")}`); } } exports.validateSarifFileSchema = validateSarifFileSchema; @@ -334,7 +348,7 @@ async function waitForProcessing(repositoryNwo, sarifID, logger, options = { const message = `Code Scanning could not process the submitted SARIF file:\n${response.data.errors}`; throw shouldConsiderAsUserError(response.data.errors) ? new util_1.UserError(message) - : new Error(message); + : new InvalidRequestError(message); } else { util.assertNever(status); @@ -397,7 +411,7 @@ function validateUniqueCategory(sarif) { for (const [category, { id, tool }] of Object.entries(categories)) { const sentinelEnvVar = `CODEQL_UPLOAD_SARIF_${category}`; if (process.env[sentinelEnvVar]) { - throw new Error("Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. " + + throw new InvalidRequestError("Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. " + "The easiest fix is to specify a unique value for the `category` input. If .runs[].automationDetails.id is specified " + "in the sarif file, that will take precedence over your configured `category`. " + `Category: (${id ? id : "none"}) Tool: (${tool ? tool : "none"})`); @@ -407,7 +421,7 @@ function validateUniqueCategory(sarif) { } exports.validateUniqueCategory = validateUniqueCategory; /** - * Santizes a string to be used as an environment variable name. + * Sanitizes a string to be used as an environment variable name. * This will replace all non-alphanumeric characters with underscores. * There could still be some false category clashes if two uploads * occur that differ only in their non-alphanumeric characters. This is @@ -449,4 +463,12 @@ function pruneInvalidResults(sarif, logger) { return { ...sarif, runs: newRuns }; } exports.pruneInvalidResults = pruneInvalidResults; +/** + * An error that occurred due to an invalid SARIF upload request. + */ +class InvalidRequestError extends Error { + constructor(message) { + super(message); + } +} //# sourceMappingURL=upload-lib.js.map \ No newline at end of file diff --git a/lib/upload-lib.js.map b/lib/upload-lib.js.map index 1e667549d6..4f6d118cfe 100644 --- a/lib/upload-lib.js.map +++ b/lib/upload-lib.js.map @@ -1 +1 @@ -{"version":3,"file":"upload-lib.js","sourceRoot":"","sources":["../src/upload-lib.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,qCAA8B;AAC9B,gDAAwB;AAExB,oDAAsC;AAEtC,wDAA+B;AAC/B,uDAAyC;AAEzC,4DAA8C;AAC9C,kDAAoC;AACpC,+CAAuC;AACvC,6DAA+C;AAE/C,6CAAiE;AACjE,6CAA+B;AAC/B,iCAAgF;AAEhF,mEAAmE;AACn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iBACV;gBACD,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACzB;YACD,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;SAC/C;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACnB;KACF;IACD,IAAI,MAAM,GAAG,CAAC,EAAE;QACd,MAAM,CAAC,IAAI,CACT,UAAU,MAAM,kDAAkD,CACnE,CAAC;KACH;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC;AArCD,kDAqCC"} \ No newline at end of file +{"version":3,"file":"upload-lib.js","sourceRoot":"","sources":["../src/upload-lib.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,qCAA8B;AAC9B,gDAAwB;AAExB,oDAAsC;AAEtC,wDAA+B;AAC/B,uDAAyC;AAEzC,4DAA8C;AAC9C,kDAAoC;AACpC,+CAAuC;AACvC,6DAA+C;AAE/C,6CAAiE;AACjE,6CAA+B;AAC/B,iCAAgF;AAEhF,mEAAmE;AACnE,qDAAqD;AACrD,SAAS,iBAAiB,CAAC,UAAoB;IAC7C,MAAM,aAAa,GAAc;QAC/B,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,EAAE;KACT,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;QAClC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CACtB,CAAC;QACf,sBAAsB;QACtB,IAAI,aAAa,CAAC,OAAO,KAAK,IAAI,EAAE;YAClC,aAAa,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;SAC7C;aAAM,IAAI,aAAa,CAAC,OAAO,KAAK,WAAW,CAAC,OAAO,EAAE;YACxD,MAAM,I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,EAAE;QACd,MAAM,CAAC,IAAI,CACT,UAAU,MAAM,kDAAkD,CACnE,CAAC;KACH;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC;AArCD,kDAqCC;AAED;;GAEG;AACH,MAAM,mBAAoB,SAAQ,KAAK;IACrC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF"} \ No newline at end of file diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 5b23383d21..2c54c71e5c 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -47,7 +47,7 @@ async function run() { return; } try { - const uploadResult = await upload_lib.uploadFromActions(actionsUtil.getRequiredInput("sarif_file"), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger); + const uploadResult = await upload_lib.uploadFromActions(actionsUtil.getRequiredInput("sarif_file"), actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger, { considerInvalidRequestUserError: true }); core.setOutput("sarif-id", uploadResult.sarifID); // We don't upload results in test mode, so don't wait for processing if ((0, util_1.isInTestMode)()) { diff --git a/lib/upload-sarif-action.js.map b/lib/upload-sarif-action.js.map index f14df5caf8..414e2b91a3 100644 --- a/lib/upload-sarif-action.js.map +++ b/lib/upload-sarif-action.js.map @@ -1 +1 @@ -{"version":3,"file":"upload-sarif-action.js","sourceRoot":"","sources":["../src/upload-sarif-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,iDAAkD;AAClD,uCAA6C;AAC7C,6CAAkD;AAClD,mDAKyB;AACzB,yDAA2C;AAC3C,iCAMgB;AAMhB,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,WAA0C;IAE1C,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,cAAc,EACd,SAAS,EACT,SAAS,EACT,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AAO,cAAc,EAAE;QACvB,MAAM,KAAK,GAAG,IAAA,gBAAS,EAAC,cAAc,CAAC,CAAC;QACxC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,MAAM,IAAA,gCAAgB,EACpB,MAAM,IAAA,sCAAsB,EAC1B,cAAc,EACd,IAAA,gCAAgB,EAAC,KAAK,CAAC,EACvB,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,EACtB,OAAO,EACP,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;QACF,OAAO;KACR;AACH,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CACZ,sCAAsC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CACjE,CAAC;KACH;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"upload-sarif-action.js","sourceRoot":"","sources":["../src/upload-sarif-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,4DAA8C;AAC9C,iDAAkD;AAClD,uCAA6C;AAC7C,6CAAkD;AAClD,mDAKyB;AACzB,yDAA2C;AAC3C,iCAMgB;AAMhB,KAAK,UAAU,uBAAuB,CACpC,SAAe,EACf,WAA0C;IAE1C,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,CACvB,CAAC;IACF,MAAM,YAAY,GAA4B;QAC5C,GAAG,gBAAgB;QACnB,GAAG,WAAW;KACf,CAAC;IACF,MAAM,IAAA,gCAAgB,EAAC,YAAY,CAAC,CAAC;AACvC,CAAC;A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AAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,MAAM,IAAA,gCAAgB,EACpB,MAAM,IAAA,sCAAsB,EAC1B,cAAc,EACd,IAAA,gCAAgB,EAAC,KAAK,CAAC,EACvB,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,EACtB,OAAO,EACP,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;QACF,OAAO;KACR;AACH,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CACZ,sCAAsC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CACjE,CAAC;KACH;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/lib/util.js b/lib/util.js index 2a41c63a53..1bcbfc0372 100644 --- a/lib/util.js +++ b/lib/util.js @@ -55,6 +55,10 @@ exports.DEFAULT_DEBUG_ARTIFACT_NAME = "debug-artifacts"; * Default name of the database in the debugging artifact. */ exports.DEFAULT_DEBUG_DATABASE_NAME = "db"; +/** + * The default fraction of the total RAM above 8 GB that should be reserved for the system. + */ +const DEFAULT_RESERVED_RAM_SCALING_FACTOR = 0.05; /** * Get the extra options for the codeql commands. */ @@ -106,18 +110,20 @@ exports.withTmpDir = withTmpDir; * from committing too much of the available memory to CodeQL. * @returns number */ -function getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, platform, isScalingReservedRamEnabled) { +function getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, platform) { // Windows needs more memory for OS processes. const fixedAmount = 1024 * (platform === "win32" ? 1.5 : 1); - if (isScalingReservedRamEnabled) { - // Reserve an additional 5% of the amount of memory above 8 GB, since the amount used by the - // kernel for page tables scales with the size of physical memory. - const scaledAmount = 0.05 * Math.max(totalMemoryMegaBytes - 8 * 1024, 0); - return fixedAmount + scaledAmount; - } - else { - return fixedAmount; + // Reserve an additional percentage of the amount of memory above 8 GB, since the amount used by + // the kernel for page tables scales with the size of physical memory. + const scaledAmount = getReservedRamScaleFactor() * Math.max(totalMemoryMegaBytes - 8 * 1024, 0); + return fixedAmount + scaledAmount; +} +function getReservedRamScaleFactor() { + const envVar = Number.parseInt(process.env[environment_1.EnvVar.SCALING_RESERVED_RAM_PERCENTAGE] || "", 10); + if (envVar < 0 || envVar > 100 || Number.isNaN(envVar)) { + return DEFAULT_RESERVED_RAM_SCALING_FACTOR; } + return envVar / 100; } /** * Get the value of the codeql `--ram` flag as configured by the `ram` input. @@ -126,7 +132,7 @@ function getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, platform, isScal * * @returns {number} the amount of RAM to use, in megabytes */ -function getMemoryFlagValueForPlatform(userInput, totalMemoryBytes, platform, isScalingReservedRamEnabled) { +function getMemoryFlagValueForPlatform(userInput, totalMemoryBytes, platform) { let memoryToUseMegaBytes; if (userInput) { memoryToUseMegaBytes = Number(userInput); @@ -136,7 +142,7 @@ function getMemoryFlagValueForPlatform(userInput, totalMemoryBytes, platform, is } else { const totalMemoryMegaBytes = totalMemoryBytes / (1024 * 1024); - const reservedMemoryMegaBytes = getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, platform, isScalingReservedRamEnabled); + const reservedMemoryMegaBytes = getSystemReservedMemoryMegaBytes(totalMemoryMegaBytes, platform); memoryToUseMegaBytes = totalMemoryMegaBytes - reservedMemoryMegaBytes; } return Math.floor(memoryToUseMegaBytes); @@ -149,8 +155,8 @@ exports.getMemoryFlagValueForPlatform = getMemoryFlagValueForPlatform; * * @returns {number} the amount of RAM to use, in megabytes */ -function getMemoryFlagValue(userInput, isScalingReservedRamEnabled) { - return getMemoryFlagValueForPlatform(userInput, os.totalmem(), process.platform, isScalingReservedRamEnabled); +function getMemoryFlagValue(userInput) { + return getMemoryFlagValueForPlatform(userInput, os.totalmem(), process.platform); } exports.getMemoryFlagValue = getMemoryFlagValue; /** @@ -160,8 +166,8 @@ exports.getMemoryFlagValue = getMemoryFlagValue; * * @returns string */ -function getMemoryFlag(userInput, isScalingReservedRamEnabled) { - const megabytes = getMemoryFlagValue(userInput, isScalingReservedRamEnabled); +function getMemoryFlag(userInput) { + const megabytes = getMemoryFlagValue(userInput); return `--ram=${megabytes}`; } exports.getMemoryFlag = getMemoryFlag; diff --git a/lib/util.js.map b/lib/util.js.map index 98c7b58d08..08e74e5772 100644 --- a/lib/util.js.map +++ b/lib/util.js.map @@ -1 +1 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,+BAAiC;AAEjC,oDAAsC;AACtC,wEAA8C;AAC9C,8CAAsB;AACtB,sEAA4C;AAC5C,+CAAiC;AAEjC,2EAA6D;AAG7D,+CAAuC;AAIvC;;;GAGG;AACH,MAAM,eAAe,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAE3C;;GAEG;AACU,QAAA,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD;;GAEG;AACU,QAAA,2BAA2B,GAAG,iBAAiB,CAAC;AAE7D;;GAEG;AACU,QAAA,2BAA2B,GAAG,IAAI,CAAC;AA6DhD;;GAEG;AACH,SAAgB,uBAAuB;IACrC,MAAM,OAAO,GAAG,6BAA6B,CAAC;IAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACzC,OAAO,EAAE,CAAC;KACX;IACD,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KACxB;IAAC,OAAO,cAAc,EAAE;QACvB,MAAM,KAAK,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;QACxC,MAAM,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AAI,EAAE,CAAC,CAAC,CAAC,EAChC,EAAE,CAAC;AACL,CAAC;AAJD,0CAIC;AAOM,KAAK,UAAU,cAAc,CAAC,MAAe;IAClD,MAAM,SAAS,GAAG,MAAM,IAAA,0BAAc,EACpC,mBAAmB,CAAC,kBAAkB,CAAC,CACxC,CAAC;IACF,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACrC,IAAI,MAAM,IAAI,SAAS,CAAC,IAAI,GAAG,CAAC,GAAG,SAAS,EAAE;QAC5C,MAAM,OAAO,GACX,kDAAkD;YAClD,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB,CAAC;QACnE,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,2BAA2B,CAAC,KAAK,MAAM,EAAE;YAC9D,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SACzB;aAAM;YACL,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SACvB;QACD,IAAI,CAAC,cAAc,CAAC,oBAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;KACjE;IACD,OAAO;QACL,iBAAiB,EAAE,SAAS,CAAC,IAAI;QACjC,aAAa,EAAE,SAAS,CAAC,IAAI;KAC9B,CAAC;AACJ,CAAC;AApBD,wCAoBC"} \ No newline at end of file diff --git a/lib/util.test.js b/lib/util.test.js index f583213023..6892192b8d 100644 --- a/lib/util.test.js +++ b/lib/util.test.js @@ -30,6 +30,7 @@ const fs = __importStar(require("fs")); const os = __importStar(require("os")); const path_1 = __importDefault(require("path")); const ava_1 = __importDefault(require("ava")); +const environment_1 = require("./environment"); const logging_1 = require("./logging"); const testing_utils_1 = require("./testing-utils"); const util = __importStar(require("./util")); @@ -45,56 +46,58 @@ const GET_MEMORY_FLAG_TESTS = [ totalMemoryMb: 8 * 1024, platform: "linux", expectedMemoryValue: 7 * 1024, - expectedMemoryValueWithScaling: 7 * 1024, }, { input: undefined, totalMemoryMb: 8 * 1024, platform: "win32", expectedMemoryValue: 6.5 * 1024, - expectedMemoryValueWithScaling: 6.5 * 1024, }, { input: "", totalMemoryMb: 8 * 1024, platform: "linux", expectedMemoryValue: 7 * 1024, - expectedMemoryValueWithScaling: 7 * 1024, }, { input: "512", totalMemoryMb: 8 * 1024, platform: "linux", expectedMemoryValue: 512, - expectedMemoryValueWithScaling: 512, }, { input: undefined, totalMemoryMb: 64 * 1024, platform: "linux", - expectedMemoryValue: 63 * 1024, - expectedMemoryValueWithScaling: 61644, // Math.floor(1024 * (64 - 1 - 0.05 * (64 - 8))) + expectedMemoryValue: 61644, // Math.floor(1024 * (64 - 1 - 0.05 * (64 - 8))) }, { input: undefined, totalMemoryMb: 64 * 1024, platform: "win32", - expectedMemoryValue: 62.5 * 1024, - expectedMemoryValueWithScaling: 61132, // Math.floor(1024 * (64 - 1.5 - 0.05 * (64 - 8))) + expectedMemoryValue: 61132, // Math.floor(1024 * (64 - 1.5 - 0.05 * (64 - 8))) + }, + { + input: undefined, + totalMemoryMb: 64 * 1024, + platform: "linux", + expectedMemoryValue: 58777, + reservedPercentageValue: "10", }, ]; -for (const { input, totalMemoryMb, platform, expectedMemoryValue, expectedMemoryValueWithScaling, } of GET_MEMORY_FLAG_TESTS) { - (0, ava_1.default)(`Memory flag value is ${expectedMemoryValue} without scaling and ${expectedMemoryValueWithScaling} with scaling ` + - `for ${input ?? "no user input"} on ${platform} with ${totalMemoryMb} MB total system RAM`, async (t) => { - for (const withScaling of [true, false]) { - const flag = util.getMemoryFlagValueForPlatform(input, totalMemoryMb * 1024 * 1024, platform, withScaling); - t.deepEqual(flag, withScaling ? expectedMemoryValueWithScaling : expectedMemoryValue); - } +for (const { input, totalMemoryMb, platform, expectedMemoryValue, reservedPercentageValue, } of GET_MEMORY_FLAG_TESTS) { + (0, ava_1.default)(`Memory flag value is ${expectedMemoryValue} for ${input ?? "no user input"} on ${platform} with ${totalMemoryMb} MB total system RAM${reservedPercentageValue + ? ` and reserved percentage env var set to ${reservedPercentageValue}` + : ""}`, async (t) => { + process.env[environment_1.EnvVar.SCALING_RESERVED_RAM_PERCENTAGE] = + reservedPercentageValue || undefined; + const flag = util.getMemoryFlagValueForPlatform(input, totalMemoryMb * 1024 * 1024, platform); + t.deepEqual(flag, expectedMemoryValue); }); } (0, ava_1.default)("getMemoryFlag() throws if the ram input is < 0 or NaN", async (t) => { for (const input of ["-1", "hello!"]) { - t.throws(() => util.getMemoryFlag(input, false)); + t.throws(() => util.getMemoryFlag(input)); } }); (0, ava_1.default)("getAddSnippetsFlag() should return the correct flag", (t) => { diff --git a/lib/util.test.js.map b/lib/util.test.js.map index b7047e5869..e4099a5630 100644 --- a/lib/util.test.js.map +++ b/lib/util.test.js.map @@ -1 +1 @@ -{"version":3,"file":"util.test.js","sourceRoot":"","sources":["../src/util.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,uCAAyB;AACzB,gDAAwB;AAExB,8CAAuB;AAEvB,uCAA4C;AAC5C,mDAAgF;AAChF,6CAA+B;AAE/B,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,IAAA,aAAI,EAAC,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE;IACzB,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAC3B,GAAG,SAAS,mCAAmC,EAC/C,MAAM,CACP,CAAC;IACF,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAmB,CAAC,CAAC;IACzE,CAAC,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,+BAA+B,EAAE,QAAQ,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG;IAC5B;QACE,KAAK,EAAE,SAAS;QAChB,aAAa,EAAE,CAAC,GAAG,IAAI;QACvB,QAAQ,EAAE,OAAO;QACj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,CAAC,CAAC;AAEH,IAAA,aAAI,EAAC,qDAAqD,EAAE,CAAC,CAAC,EAAE,EAAE;IAChE,MAAM,QAAQ,GAAoB,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,IAAI,CAAC,uBAAuB,CACzC,+BAA+B,CAAC,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,EAC7D,IAAA,kCAAkB,EAAC,QAAQ,CAAC,CAC7B,CAAC;IACF,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,+BAA+B,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;QACvB,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,gEAAgE;KAC1E,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index c13f59b9a9..c21d362cc9 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,6 +1,6 @@ { "name": "codeql", - "version": "2.21.5", + "version": "2.21.6", "lockfileVersion": 3, "requires": true, "packages": { @@ -448,9 +448,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", - "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz", + "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -900,9 +900,9 @@ } }, "node_modules/@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.1.tgz", + "integrity": "sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==", "dev": true }, "node_modules/@types/sinon": { @@ -929,21 +929,21 @@ } }, "node_modules/@types/uuid": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.2.tgz", - "integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ==" + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.3.tgz", + "integrity": "sha512-taHQQH/3ZyI3zP8M/puluDEIEvtQHVYcC6y3N8ijFtAd28+Ey/G4sg1u2gB01S8MwybLOKAp9/yCMu/uR5l3Ug==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.1.tgz", - "integrity": "sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.5.0.tgz", + "integrity": "sha512-2pktILyjvMaScU6iK3925uvGU87E+N9rh372uGZgiMYwafaw9SXq86U04XPq3UH6tzRvNgBsub6x2DacHc33lw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.4.1", - "@typescript-eslint/type-utils": "6.4.1", - "@typescript-eslint/utils": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "@typescript-eslint/scope-manager": "6.5.0", + "@typescript-eslint/type-utils": "6.5.0", + "@typescript-eslint/utils": "6.5.0", + "@typescript-eslint/visitor-keys": "6.5.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -969,15 +969,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.1.tgz", - "integrity": "sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.6.0.tgz", + "integrity": "sha512-setq5aJgUwtzGrhW177/i+DMLqBaJbdwGj2CPIVFFLE0NCliy5ujIdLHd2D1ysmlmsjdL2GWW+hR85neEfc12w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.4.1", - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/typescript-estree": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4" }, "engines": { @@ -996,14 +996,88 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.6.0.tgz", + "integrity": "sha512-pT08u5W/GT4KjPUmEtc2kSYvrH8x89cVzkA0Sy2aaOUIw6YxOIjA8ilwLr/1fLjOedX1QAuBpG9XggWqIIfERw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.6.0.tgz", + "integrity": "sha512-CB6QpJQ6BAHlJXdwUmiaXDBmTqIE2bzGTDLADgvqtHWuhfNP3rAOK7kAgRMAET5rDRr9Utt+qAzRBdu3AhR3sg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.6.0.tgz", + "integrity": "sha512-hMcTQ6Al8MP2E6JKBAaSxSVw5bDhdmbCEhGW/V8QXkb9oNsFkA4SBuOMYVPxD3jbtQ4R/vSODBsr76R6fP3tbA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.6.0.tgz", + "integrity": "sha512-L61uJT26cMOfFQ+lMZKoJNbAEckLe539VhTxiGHrWl5XSKQgA0RTBZJW2HFPy5T0ZvPVSD93QsrTKDkfNwJGyQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.6.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.1.tgz", - "integrity": "sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.5.0.tgz", + "integrity": "sha512-A8hZ7OlxURricpycp5kdPTH3XnjG85UpJS6Fn4VzeoH4T388gQJ/PGP4ole5NfKt4WDVhmLaQ/dBLNDC4Xl/Kw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1" + "@typescript-eslint/types": "6.5.0", + "@typescript-eslint/visitor-keys": "6.5.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1014,13 +1088,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.1.tgz", - "integrity": "sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.5.0.tgz", + "integrity": "sha512-f7OcZOkRivtujIBQ4yrJNIuwyCQO1OjocVqntl9dgSIZAdKqicj3xFDqDOzHDlGCZX990LqhLQXWRnQvsapq8A==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.4.1", - "@typescript-eslint/utils": "6.4.1", + "@typescript-eslint/typescript-estree": "6.5.0", + "@typescript-eslint/utils": "6.5.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -1041,9 +1115,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.1.tgz", - "integrity": "sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.5.0.tgz", + "integrity": "sha512-eqLLOEF5/lU8jW3Bw+8auf4lZSbbljHR2saKnYqON12G/WsJrGeeDHWuQePoEf9ro22+JkbPfWQwKEC5WwLQ3w==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1054,13 +1128,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.1.tgz", - "integrity": "sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.5.0.tgz", + "integrity": "sha512-q0rGwSe9e5Kk/XzliB9h2LBc9tmXX25G0833r7kffbl5437FPWb2tbpIV9wAATebC/018pGa9fwPDuvGN+LxWQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "@typescript-eslint/types": "6.5.0", + "@typescript-eslint/visitor-keys": "6.5.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1081,17 +1155,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.1.tgz", - "integrity": "sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.5.0.tgz", + "integrity": "sha512-9nqtjkNykFzeVtt9Pj6lyR9WEdd8npPhhIPM992FWVkZuS6tmxHfGVnlUcjpUP2hv8r4w35nT33mlxd+Be1ACQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.4.1", - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/typescript-estree": "6.4.1", + "@typescript-eslint/scope-manager": "6.5.0", + "@typescript-eslint/types": "6.5.0", + "@typescript-eslint/typescript-estree": "6.5.0", "semver": "^7.5.4" }, "engines": { @@ -1106,12 +1180,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.1.tgz", - "integrity": "sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.5.0.tgz", + "integrity": "sha512-yCB/2wkbv3hPsh02ZS8dFQnij9VVQXJMN/gbQsaaY+zxALkZnxa/wagvLEFsAWMPv7d7lxQmNsIzGU1w/T/WyA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.4.1", + "@typescript-eslint/types": "6.5.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2465,15 +2539,15 @@ } }, "node_modules/eslint": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", - "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz", + "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "^8.47.0", + "@eslint/js": "8.48.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -2646,9 +2720,9 @@ } }, "node_modules/eslint-plugin-github": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.9.2.tgz", - "integrity": "sha512-osez6Sio/fLr/3QkW5HE1wbCOcmYG5030/6QIa9IcKyyfchewlecdnYcsbeUMUtdIiU9lWqhroQp2H/O7auxBA==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.10.0.tgz", + "integrity": "sha512-YKtqBtFbjih1wZNTwZjtLPEG6B/4ySMa38fgOo/rbMJpNKO3+OaKzwwOYkeKx/FapM/4MsTP9ExqUcDV+dkixA==", "dev": true, "dependencies": { "@github/browserslist-config": "^1.0.0", @@ -5999,9 +6073,9 @@ } }, "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/node_modules/@eslint/js/package.json b/node_modules/@eslint/js/package.json index 1847404d7c..965acdba05 100644 --- a/node_modules/@eslint/js/package.json +++ b/node_modules/@eslint/js/package.json @@ -1,6 +1,6 @@ { "name": "@eslint/js", - "version": "8.47.0", + "version": "8.48.0", "description": "ESLint JavaScript language implementation", "main": "./src/index.js", "scripts": {}, diff --git a/node_modules/@types/semver/README.md b/node_modules/@types/semver/README.md index 1a1a660a3c..7525e3736b 100755 --- a/node_modules/@types/semver/README.md +++ b/node_modules/@types/semver/README.md @@ -8,7 +8,7 @@ This package contains type definitions for semver (https://github.com/npm/node-s Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver. ### Additional Details - * Last updated: Mon, 08 May 2023 19:02:57 GMT + * Last updated: Mon, 28 Aug 2023 15:34:56 GMT * Dependencies: none * Global values: none diff --git a/node_modules/@types/semver/functions/inc.d.ts b/node_modules/@types/semver/functions/inc.d.ts index ca92d1c397..039cae7ffd 100755 --- a/node_modules/@types/semver/functions/inc.d.ts +++ b/node_modules/@types/semver/functions/inc.d.ts @@ -7,7 +7,7 @@ declare namespace inc { } /** - * Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid. + * Return the version incremented by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if it's not valid. */ declare function inc( version: string | SemVer, diff --git a/node_modules/@types/semver/package.json b/node_modules/@types/semver/package.json index 7757df39f1..381704b417 100755 --- a/node_modules/@types/semver/package.json +++ b/node_modules/@types/semver/package.json @@ -1,6 +1,6 @@ { "name": "@types/semver", - "version": "7.5.0", + "version": "7.5.1", "description": "TypeScript definitions for semver", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver", "license": "MIT", @@ -45,6 +45,6 @@ }, "scripts": {}, "dependencies": {}, - "typesPublisherContentHash": "a1ae8c1d9f9371bb1030d232fd0c118ad40215d3dd62afb98c7d6f15678c60de", + "typesPublisherContentHash": "57a882c4bde80f3fc5c7efb5e92cf953532ab98690f8f0eba77ab778999b37b4", "typeScriptVersion": "4.3" } \ No newline at end of file diff --git a/node_modules/@types/uuid/README.md b/node_modules/@types/uuid/README.md index e441194cfe..c3d231b225 100755 --- a/node_modules/@types/uuid/README.md +++ b/node_modules/@types/uuid/README.md @@ -8,7 +8,7 @@ This package contains type definitions for uuid (https://github.com/uuidjs/uuid) Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uuid. ### Additional Details - * Last updated: Thu, 08 Jun 2023 20:32:59 GMT + * Last updated: Wed, 30 Aug 2023 19:35:40 GMT * Dependencies: none * Global values: none diff --git a/node_modules/@types/uuid/index.d.ts b/node_modules/@types/uuid/index.d.ts index bb9eb3c388..68f80fcc75 100755 --- a/node_modules/@types/uuid/index.d.ts +++ b/node_modules/@types/uuid/index.d.ts @@ -48,7 +48,12 @@ type v4Buffer = (options: V4Options | null | undefined, type v4 = v4Buffer & v4String; type v3String = (name: string | InputBuffer, namespace: string | InputBuffer) => string; -type v3Buffer = (name: string | InputBuffer, namespace: string | InputBuffer, buffer: T, offset?: number) => T; +type v3Buffer = ( + name: string | InputBuffer, + namespace: string | InputBuffer, + buffer: T, + offset?: number, +) => T; interface v3Static { // https://github.com/uuidjs/uuid/blob/master/src/v35.js#L22 DNS: string; @@ -58,7 +63,12 @@ interface v3Static { type v3 = v3Buffer & v3String & v3Static; type v5String = (name: string | InputBuffer, namespace: string | InputBuffer) => string; -type v5Buffer = (name: string | InputBuffer, namespace: string | InputBuffer, buffer: T, offset?: number) => T; +type v5Buffer = ( + name: string | InputBuffer, + namespace: string | InputBuffer, + buffer: T, + offset?: number, +) => T; interface v5Static { // https://github.com/uuidjs/uuid/blob/master/src/v35.js#L22 DNS: string; diff --git a/node_modules/@types/uuid/package.json b/node_modules/@types/uuid/package.json index 30c55201b4..e997924ef1 100755 --- a/node_modules/@types/uuid/package.json +++ b/node_modules/@types/uuid/package.json @@ -1,6 +1,6 @@ { "name": "@types/uuid", - "version": "9.0.2", + "version": "9.0.3", "description": "TypeScript definitions for uuid", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uuid", "license": "MIT", @@ -40,7 +40,7 @@ }, "scripts": {}, "dependencies": {}, - "typesPublisherContentHash": "3213c87118af95e8668dbdfbbcf3a959d1bfc274b6aae55d03fdb2942b792b77", + "typesPublisherContentHash": "ba21565c2145fabc587317d22afc7abec4415f72b0234d2012b5b4f73f7f7816", "typeScriptVersion": "4.3", "exports": { "./package.json": "./package.json", diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js index bb6a30ac60..f09d2290ba 100644 --- a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js @@ -24,7 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const utils_1 = require("@typescript-eslint/utils"); +const ts = __importStar(require("typescript")); const util = __importStar(require("../util")); +const getWrappedCode_1 = require("../util/getWrappedCode"); exports.default = util.createRule({ name: 'consistent-type-assertions', meta: { @@ -84,6 +86,7 @@ exports.default = util.createRule({ ], create(context, [options]) { const sourceCode = context.getSourceCode(); + const parserServices = util.getParserServices(context, true); function isConst(node) { if (node.type !== utils_1.AST_NODE_TYPES.TSTypeReference) { return false; @@ -116,10 +119,26 @@ exports.default = util.createRule({ ? { cast: sourceCode.getText(node.typeAnnotation) } : {}, fix: messageId === 'as' - ? (fixer) => [ - fixer.replaceText(node, getTextWithParentheses(node.expression)), - fixer.insertTextAfter(node, ` as ${getTextWithParentheses(node.typeAnnotation)}`), - ] + ? (fixer) => { + const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node); + /** + * AsExpression has lower precedence than TypeAssertionExpression, + * so we don't need to wrap expression and typeAnnotation in parens. + */ + const expressionCode = sourceCode.getText(node.expression); + const typeAnnotationCode = sourceCode.getText(node.typeAnnotation); + const asPrecedence = util.getOperatorPrecedence(ts.SyntaxKind.AsExpression, ts.SyntaxKind.Unknown); + const parentPrecedence = util.getOperatorPrecedence(tsNode.parent.kind, ts.isBinaryExpression(tsNode.parent) + ? tsNode.parent.operatorToken.kind + : ts.SyntaxKind.Unknown, ts.isNewExpression(tsNode.parent) + ? tsNode.parent.arguments != null && + tsNode.parent.arguments.length > 0 + : undefined); + const text = `${expressionCode} as ${typeAnnotationCode}`; + return fixer.replaceText(node, util.isParenthesized(node, sourceCode) + ? text + : (0, getWrappedCode_1.getWrappedCode)(text, asPrecedence, parentPrecedence)); + } : undefined, }); } diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map index 8af2f0ca2a..14554151f3 100644 --- a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map @@ -1 +1 @@ -{"version":3,"file":"consistent-type-assertions.js","sourceRoot":"","sources":["../../src/rules/consistent-type-assertions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAE1D,8CAAgC;AAoBhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,IAAI;QACpB,IAAI,EAAE;YACJ,WAAW,EAAE,6CAA6C;YAC1D,WAAW,EAAE,WAAW;SACzB;QACD,QAAQ,EAAE;YACR,EAAE,EAAE,4CAA4C;YAChD,eAAe,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BACR,CAAC,CAAC;aACJ;QACH,CAAC;QAED,OAAO;YACL,eAAe,CAAC,IAAI;gBAClB,IAAI,OAAO,CAAC,cAAc,KAAK,eAAe,EAAE;oBAC9C,4BAA4B,CAAC,IAAI,CAAC,CAAC;oBACnC,OAAO;iBACR;gBAED,eAAe,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;YACD,cAAc,CAAC,IAAI;gBACjB,IAAI,OAAO,CAAC,cAAc,KAAK,IAAI,EAAE;oBACnC,4BAA4B,CAAC,IAAI,CAAC,CAAC;oBACnC,OAAO;iBACR;gBAED,eAAe,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"consistent-type-assertions.js","sourceRoot":"","sources":["../../src/rules/consistent-type-assertions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAA0D;AAC1D,+CAAiC;AAEjC,8CAAgC;AAChC,2DAAwD;AAoBxD,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,IAAI;QACpB,IAAI,EAAE;YACJ,WAAW,EAAE,6CAA6C;YAC1D,WAAW,EAAE,WAAW;SACzB;QACD,QAAQ,EAAE;YACR,EAAE,EAAE,4CAA4C;YAChD,eAAe,EAAE,4CAA4C;YAC7D,KAAK,EAAE,iCAAiC;YACxC,6BAA6B,EAAE,qCAAqC;YACpE,wCAAwC,EACtC,0CAA0C;YAC5C,uCAAuC,EACrC,mDAAmD;SACtD;QACD,MAAM,EAAE;YACN;gBACE,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,cAAc,EAAE;gCACd,IAAI,EAAE,QAAQ;gCACd,IAAI,EAAE,CAAC,OAAO,CAAC;6BAChB;yBACF;w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AAE,EACT,KAAK,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAC/C;4BACD,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;yBACjE;qBACF,CAAC,CAAC;iBACJ;gBACD,OAAO,CAAC,IAAI,CAAC;oBACX,SAAS,EAAE,yCAAyC;oBACpD,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE;oBACvD,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC;wBACZ,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;wBAChE,KAAK,CAAC,eAAe,CACnB,IAAI,EACJ,cAAc,OAAO;6BAClB,aAAa,EAAE;6BACf,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAClC;qBACF;iBACF,CAAC,CAAC;gBAEH,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI;oBACJ,SAAS,EAAE,+BAA+B;oBAC1C,OAAO;iBACR,CAAC,CAAC;aACJ;QACH,CAAC;QAED,OAAO;YACL,eAAe,CAAC,IAAI;gBAClB,IAAI,OAAO,CAAC,cAAc,KAAK,eAAe,EAAE;oBAC9C,4BAA4B,CAAC,IAAI,CAAC,CAAC;oBACnC,OAAO;iBACR;gBAED,eAAe,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;YACD,cAAc,CAAC,IAAI;gBACjB,IAAI,OAAO,CAAC,cAAc,KAAK,IAAI,EAAE;oBACnC,4BAA4B,CAAC,IAAI,CAAC,CAAC;oBACnC,OAAO;iBACR;gBAED,eAAe,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js index 0fc94fa9c1..7666306a98 100644 --- a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js @@ -312,6 +312,7 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { case typescript_1.SyntaxKind.MetaProperty: return OperatorPrecedence.Member; case typescript_1.SyntaxKind.AsExpression: + case typescript_1.SyntaxKind.SatisfiesExpression: return OperatorPrecedence.Relational; case typescript_1.SyntaxKind.ThisKeyword: case typescript_1.SyntaxKind.SuperKeyword: diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js.map index 45f975cafc..894817a13e 100644 --- a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js.map +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getOperatorPrecedence.js.map @@ -1 +1 @@ -{"version":3,"file":"getOperatorPrecedence.js","sourceRoot":"","sources":["../../src/util/getOperatorPrecedence.ts"],"names":[],"mappings":";;;AACA,oDAA0D;AAC1D,2CAAwC;AAExC,IAAY,kBA8LX;AA9LD,WAAY,kBAAkB;IAC5B,cAAc;IACd,2BAA2B;IAC3B,0CAA0C;IAC1C,6DAAK,CAAA;IAEL,iFAAiF;IACjF,iBAAiB;IACjB,iCAAiC;IACjC,+DAAM,CAAA;IAEN,wBAAwB;IACxB,4BAA4B;IAC5B,sBAAsB;IACtB,oBAAoB;IACpB,yBAAyB;IACzB,sDAAsD;IACtD,qEAAqE;IACrE,EAAE;IACF,6FAA6F;IAC7F,mCAAmC;IAEnC,wCAAwC;IACxC,mBAAmB;IACnB,cAAc;IACd,mCAAmC;IACnC,uCAAuC;IACvC,6DAAK,CAAA;IAEL,wEAAwE;IACxE,uFAAuF;IACvF,6BAA6B;IAC7B,uEAAuE;IACv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AY,CAAC;QAC7B,KAAK,GAAG;YACN,OAAO,kBAAkB,CAAC,cAAc,CAAC;QAE3C,KAAK,uBAAU,CAAC,qBAAqB,CAAC;QACtC,KAAK,IAAI;YACP,OAAO,kBAAkB,CAAC,cAAc,CAAC;KAC5C;IAED,qFAAqF;IACrF,mBAAmB;IACnB,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC;AApFD,kEAoFC"} \ No newline at end of file +{"version":3,"file":"getOperatorPrecedence.js","sourceRoot":"","sources":["../../src/util/getOperatorPrecedence.ts"],"names":[],"mappings":";;;AACA,oDAA0D;AAC1D,2CAAwC;AAExC,IAAY,kBA8LX;AA9LD,WAAY,kBAAkB;IAC5B,cAAc;IACd,2BAA2B;IAC3B,0CAA0C;IAC1C,6DAAK,CAAA;IAEL,iFAAiF;IACjF,iBAAiB;IACjB,iCAAiC;IACjC,+DAAM,CAAA;IAEN,wBAAwB;IACxB,4BAA4B;IAC5B,sBAAsB;IACtB,oBAAoB;IACpB,yBAAyB;IACzB,sDAAsD;IACtD,qEAAqE;IACrE,EAAE;IACF,6FAA6F;IAC7F,mCAAmC;IAEnC,wCAAwC;IACxC,mBAAmB;IACnB,cAAc;IACd,mCAAmC;IACnC,uCAAuC;IACvC,6DAAK,CAAA;IAEL,wEAAwE;IACxE,uFAAuF;IACvF,6BAA6B;IAC7B,uEAAuE;IACvE,uEAAU,CAAA;IAEV,4FAA4F;IAC5F,6BAA6B;IAC7B,8CAA8C;IAC9C,yBAAyB;IACzB,6BAA6B;IAC7B,+EAA+E;IAC/E,0BAA0B;IAC1B,0BAA0B;IAC1B,yBAAyB;IACzB,yEAAW,CAAA;IAEX,sBAAsB;IACtB,sDAAsD;IACtD,0BAA0B;IAC1B,yBAAyB;IACzB,0BAA0B;IAC1B,mEAAsB,CAAA;IAEtB,uBAAuB;IACvB,2BAA2B;IAC3B,oDAAoD;IACpD,qEAAS,CAAA;IAET,wBAAwB;IACxB,0BAA0B;IAC1B,oDAAoD;IACpD,uEAAU,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KAAK,GAAG,CAAC;QACT,KAAK,uBAAU,CAAC,mBAAmB,CAAC;QACpC,KAAK,IAAI,CAAC;QACV,KAAK,uBAAU,CAAC,sBAAsB,CAAC;QACvC,KAAK,IAAI,CAAC;QACV,KAAK,uBAAU,CAAC,iBAAiB,CAAC;QAClC,KAAK,YAAY,CAAC;QAClB,KAAK,uBAAU,CAAC,SAAS,CAAC;QAC1B,KAAK,IAAI,CAAC;QACV,KAAK,uBAAU,CAAC,SAAS;YACvB,+CAA+C;YAC/C,OAAO,kBAAkB,CAAC,UAAU,CAAC;QAEvC,KAAK,uBAAU,CAAC,qBAAqB,CAAC;QACtC,KAAK,IAAI,CAAC;QACV,KAAK,uBAAU,CAAC,2BAA2B,CAAC;QAC5C,KAAK,IAAI,CAAC;QACV,KAAK,uBAAU,CAAC,sCAAsC,CAAC;QACvD,KAAK,KAAK;YACR,OAAO,kBAAkB,CAAC,KAAK,CAAC;QAElC,KAAK,uBAAU,CAAC,SAAS,CAAC;QAC1B,KAAK,GAAG,CAAC;QACT,KAAK,uBAAU,CAAC,UAAU,CAAC;QAC3B,KAAK,GAAG;YACN,OAAO,kBAAkB,CAAC,QAAQ,CAAC;QAErC,KAAK,uBAAU,CAAC,aAAa,CAAC;QAC9B,KAAK,GAAG,CAAC;QACT,KAAK,uBAAU,CAAC,UAAU,CAAC;QAC3B,KAAK,GAAG,CAAC;QACT,KAAK,uBAAU,CAAC,YAAY,CAAC;QAC7B,KAAK,GAAG;YACN,OAAO,kBAAkB,CAAC,cAAc,CAAC;QAE3C,KAAK,uBAAU,CAAC,qBAAqB,CAAC;QACtC,KAAK,IAAI;YACP,OAAO,kBAAkB,CAAC,cAAc,CAAC;KAC5C;IAED,qFAAqF;IACrF,mBAAmB;IACnB,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC;AApFD,kEAoFC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js new file mode 100644 index 0000000000..713044ff3f --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getWrappedCode = void 0; +function getWrappedCode(text, nodePrecedence, parentPrecedence) { + return nodePrecedence > parentPrecedence ? text : `(${text})`; +} +exports.getWrappedCode = getWrappedCode; +//# sourceMappingURL=getWrappedCode.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js.map new file mode 100644 index 0000000000..b6e1d62d88 --- /dev/null +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappedCode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getWrappedCode.js","sourceRoot":"","sources":["../../src/util/getWrappedCode.ts"],"names":[],"mappings":";;;AAEA,SAAgB,cAAc,CAC5B,IAAY,EACZ,cAAkC,EAClC,gBAAoC;IAEpC,OAAO,cAAc,GAAG,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC;AAChE,CAAC;AAND,wCAMC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js index 0270c08a1a..a2c977a85d 100644 --- a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js @@ -12,10 +12,13 @@ function getWrappingFixer(params) { return (fixer) => { const innerCodes = innerNodes.map(innerNode => { let code = sourceCode.getText(innerNode); - // check the inner expression's precedence - if (!isStrongPrecedenceNode(innerNode)) { - // the code we are adding might have stronger precedence than our wrapped node - // let's wrap our node in parens in case it has a weaker precedence than the code we are wrapping it in + /** + * Wrap our node in parens to prevent the following cases: + * - It has a weaker precedence than the code we are wrapping it in + * - It's gotten mistaken as block statement instead of object expression + */ + if (!isStrongPrecedenceNode(innerNode) || + isObjectExpressionInOneLineReturn(node, innerNode)) { code = `(${code})`; } return code; @@ -44,12 +47,15 @@ exports.getWrappingFixer = getWrappingFixer; function isStrongPrecedenceNode(innerNode) { return (innerNode.type === utils_1.AST_NODE_TYPES.Literal || innerNode.type === utils_1.AST_NODE_TYPES.Identifier || + innerNode.type === utils_1.AST_NODE_TYPES.TSTypeReference || + innerNode.type === utils_1.AST_NODE_TYPES.TSTypeOperator || innerNode.type === utils_1.AST_NODE_TYPES.ArrayExpression || innerNode.type === utils_1.AST_NODE_TYPES.ObjectExpression || innerNode.type === utils_1.AST_NODE_TYPES.MemberExpression || innerNode.type === utils_1.AST_NODE_TYPES.CallExpression || innerNode.type === utils_1.AST_NODE_TYPES.NewExpression || - innerNode.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression); + innerNode.type === utils_1.AST_NODE_TYPES.TaggedTemplateExpression || + innerNode.type === utils_1.AST_NODE_TYPES.TSInstantiationExpression); } exports.isStrongPrecedenceNode = isStrongPrecedenceNode; /** @@ -138,4 +144,12 @@ function isLeftHandSide(node) { } return false; } +/** + * Checks if a node's parent is arrow function expression and a inner node is object expression + */ +function isObjectExpressionInOneLineReturn(node, innerNode) { + return (node.parent?.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression && + node.parent.body === node && + innerNode.type === utils_1.AST_NODE_TYPES.ObjectExpression); +} //# sourceMappingURL=getWrappingFixer.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js.map index 2a9e519713..a44fbdaeb8 100644 --- a/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js.map +++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js.map @@ -1 +1 @@ -{"version":3,"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ED,QAAQ;IACR,IACE,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;QAC9C,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,iBAAiB;QAChD,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,oBAAoB,CAAC;QACtD,IAAI,KAAK,MAAM,CAAC,IAAI,EACpB;QACA,OAAO,IAAI,CAAC;KACb;IAED,YAAY;IACZ,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,qBAAqB;QACpD,IAAI,KAAK,MAAM,CAAC,IAAI,EACpB;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO;IACP,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc,IAAI,IAAI,KAAK,MAAM,CAAC,MAAM,EAAE;QAC3E,OAAO,IAAI,CAAC;KACb;IAED,OAAO;IACP,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,wBAAwB;QACvD,IAAI,KAAK,MAAM,CAAC,GAAG,EACnB;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file +{"version":3,"file":"getWrappingFixer.js","sourceRoot":"","sources":["../../src/util/getWrappingFixer.ts"],"names":[],"mappings":";;;AACA,oDAAoE;AAsBpE;;;GAGG;AACH,SAAgB,gBAAgB,CAC9B,MAA2B;IAE3B,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAC5D,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEtE,OAAO,CAAC,KAAK,EAAoB,EAAE;QACjC,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC5C,IAAI,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,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,EACpB;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO;IACP,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc,IAAI,IAAI,KAAK,MAAM,CAAC,MAAM,EAAE;QAC3E,OAAO,IAAI,CAAC;KACb;IAED,OAAO;IACP,IACE,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,wBAAwB;QACvD,IAAI,KAAK,MAAM,CAAC,GAAG,EACnB;QACA,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,SAAS,iCAAiC,CACxC,IAAmB,EACnB,SAAwB;IAExB,OAAO,CACL,IAAI,CAAC,MAAM,EAAE,IAAI,KAAK,sBAAc,CAAC,uBAAuB;QAC5D,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI;QACzB,SAAS,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB,CACnD,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md index c2d75c86ad..2768bae0df 100644 --- a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md +++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md @@ -8,3 +8,5 @@ description: 'Disallow unnecessary semicolons.' This rule extends the base [`eslint/no-extra-semi`](https://eslint.org/docs/rules/no-extra-semi) rule. It adds support for class properties. + +Note that this rule is classified as a "Suggestion" rule instead of a "Layout & Formatting" rule because [adding extra semi-colons actually changes the AST of the program](https://typescript-eslint.io/play/#ts=5.1.6&showAST=es&fileType=.ts&code=MYewdgzgLgBAHjAvDAjAbg0A&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQHYHsBaRADwBdoBDQ5RAWwEt0p8AzVyAGnG0gAEyATwAOKAMbQGwssWTwGuMgHoCxclRr0mGSImjR80SDwC%2BIE0A&tsconfig=&tokens=false). With that said, modern TypeScript formatters will remove extra semi-colons automatically during the formatting process. Thus, if you [use a formatter](/linting/troubleshooting/formatting), then enabling this rule is probably unnecessary. diff --git a/node_modules/@typescript-eslint/eslint-plugin/package.json b/node_modules/@typescript-eslint/eslint-plugin/package.json index bab3a9374a..4e32641010 100644 --- a/node_modules/@typescript-eslint/eslint-plugin/package.json +++ b/node_modules/@typescript-eslint/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "6.4.1", + "version": "6.5.0", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -57,10 +57,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.4.1", - "@typescript-eslint/type-utils": "6.4.1", - "@typescript-eslint/utils": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "@typescript-eslint/scope-manager": "6.5.0", + "@typescript-eslint/type-utils": "6.5.0", + "@typescript-eslint/utils": "6.5.0", + "@typescript-eslint/visitor-keys": "6.5.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -73,8 +73,8 @@ "@types/marked": "*", "@types/natural-compare": "*", "@types/prettier": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "6.4.1", - "@typescript-eslint/rule-tester": "6.4.1", + "@typescript-eslint/rule-schema-to-typescript-types": "6.5.0", + "@typescript-eslint/rule-tester": "6.5.0", "ajv": "^6.12.6", "chalk": "^5.3.0", "cross-fetch": "*", @@ -103,5 +103,5 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59" + "gitHead": "4f34d0ba34474926ba1eed623704b583a037f886" } diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/LICENSE b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/LICENSE new file mode 100644 index 0000000000..a1164108d4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/README.md b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/README.md new file mode 100644 index 0000000000..b730e9d83a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/README.md @@ -0,0 +1,10 @@ +# `@typescript-eslint/scope-manager` + +[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/scope-manager.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/scope-manager) +[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/scope-manager.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/scope-manager) + +👉 See **https://typescript-eslint.io/packages/scope-manager** for documentation on this package. + +> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code. + + diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts new file mode 100644 index 0000000000..679109f24d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts @@ -0,0 +1,4 @@ +declare function createIdGenerator(): () => number; +declare function resetIds(): void; +export { createIdGenerator, resetIds }; +//# sourceMappingURL=ID.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts.map new file mode 100644 index 0000000000..2c9c0fd0d8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ID.d.ts","sourceRoot":"","sources":["../src/ID.ts"],"names":[],"mappings":"AAGA,iBAAS,iBAAiB,IAAI,MAAM,MAAM,CAUzC;AAED,iBAAS,QAAQ,IAAI,IAAI,CAExB;AAED,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.js new file mode 100644 index 0000000000..670ab59031 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resetIds = exports.createIdGenerator = void 0; +const ID_CACHE = new Map(); +let NEXT_KEY = 0; +function createIdGenerator() { + const key = (NEXT_KEY += 1); + ID_CACHE.set(key, 0); + return () => { + const current = ID_CACHE.get(key) ?? 0; + const next = current + 1; + ID_CACHE.set(key, next); + return next; + }; +} +exports.createIdGenerator = createIdGenerator; +function resetIds() { + ID_CACHE.clear(); +} +exports.resetIds = resetIds; +//# sourceMappingURL=ID.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.js.map new file mode 100644 index 0000000000..9a1e26bfe8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ID.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ID.js","sourceRoot":"","sources":["../src/ID.ts"],"names":[],"mappings":";;;AAAA,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC3C,IAAI,QAAQ,GAAG,CAAC,CAAC;AAEjB,SAAS,iBAAiB;IACxB,MAAM,GAAG,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;IAC5B,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAErB,OAAO,GAAW,EAAE;QAClB,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,OAAO,GAAG,CAAC,CAAC;QACzB,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAMQ,8CAAiB;AAJ1B,SAAS,QAAQ;IACf,QAAQ,CAAC,KAAK,EAAE,CAAC;AACnB,CAAC;AAE2B,4BAAQ"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts new file mode 100644 index 0000000000..2f3412266e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts @@ -0,0 +1,75 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Scope } from './scope'; +import { BlockScope, CatchScope, ClassScope, ConditionalTypeScope, ForScope, FunctionExpressionNameScope, FunctionScope, FunctionTypeScope, GlobalScope, MappedTypeScope, ModuleScope, SwitchScope, TSEnumScope, TSModuleScope, TypeScope, WithScope } from './scope'; +import { ClassFieldInitializerScope } from './scope/ClassFieldInitializerScope'; +import { ClassStaticBlockScope } from './scope/ClassStaticBlockScope'; +import type { Variable } from './variable'; +interface ScopeManagerOptions { + globalReturn?: boolean; + sourceType?: 'module' | 'script'; + impliedStrict?: boolean; +} +/** + * @see https://eslint.org/docs/latest/developer-guide/scope-manager-interface#scopemanager-interface + */ +declare class ScopeManager { + #private; + currentScope: Scope | null; + readonly declaredVariables: WeakMap; + /** + * The root scope + * @public + */ + globalScope: GlobalScope | null; + readonly nodeToScope: WeakMap; + /** + * All scopes + * @public + */ + readonly scopes: Scope[]; + get variables(): Variable[]; + constructor(options: ScopeManagerOptions); + isGlobalReturn(): boolean; + isModule(): boolean; + isImpliedStrict(): boolean; + isStrictModeSupported(): boolean; + isES6(): boolean; + /** + * Get the variables that a given AST node defines. The gotten variables' `def[].node`/`def[].parent` property is the node. + * If the node does not define any variable, this returns an empty array. + * @param node An AST node to get their variables. + * @public + */ + getDeclaredVariables(node: TSESTree.Node): Variable[]; + /** + * Get the scope of a given AST node. The gotten scope's `block` property is the node. + * This method never returns `function-expression-name` scope. If the node does not have their scope, this returns `null`. + * + * @param node An AST node to get their scope. + * @param inner If the node has multiple scopes, this returns the outermost scope normally. + * If `inner` is `true` then this returns the innermost scope. + * @public + */ + acquire(node: TSESTree.Node, inner?: boolean): Scope | null; + protected nestScope(scope: T): T; + nestBlockScope(node: BlockScope['block']): BlockScope; + nestCatchScope(node: CatchScope['block']): CatchScope; + nestClassScope(node: ClassScope['block']): ClassScope; + nestClassFieldInitializerScope(node: ClassFieldInitializerScope['block']): ClassFieldInitializerScope; + nestClassStaticBlockScope(node: ClassStaticBlockScope['block']): ClassStaticBlockScope; + nestConditionalTypeScope(node: ConditionalTypeScope['block']): ConditionalTypeScope; + nestForScope(node: ForScope['block']): ForScope; + nestFunctionExpressionNameScope(node: FunctionExpressionNameScope['block']): FunctionExpressionNameScope; + nestFunctionScope(node: FunctionScope['block'], isMethodDefinition: boolean): FunctionScope; + nestFunctionTypeScope(node: FunctionTypeScope['block']): FunctionTypeScope; + nestGlobalScope(node: GlobalScope['block']): GlobalScope; + nestMappedTypeScope(node: MappedTypeScope['block']): MappedTypeScope; + nestModuleScope(node: ModuleScope['block']): ModuleScope; + nestSwitchScope(node: SwitchScope['block']): SwitchScope; + nestTSEnumScope(node: TSEnumScope['block']): TSEnumScope; + nestTSModuleScope(node: TSModuleScope['block']): TSModuleScope; + nestTypeScope(node: TypeScope['block']): TypeScope; + nestWithScope(node: WithScope['block']): WithScope; +} +export { ScopeManager }; +//# sourceMappingURL=ScopeManager.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts.map new file mode 100644 index 0000000000..82c7020f17 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopeManager.d.ts","sourceRoot":"","sources":["../src/ScopeManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,2BAA2B,EAC3B,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,WAAW,EAEX,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AAa,CAAC,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS;CAI1D;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js new file mode 100644 index 0000000000..6507433f14 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js @@ -0,0 +1,185 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _ScopeManager_options; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ScopeManager = void 0; +const assert_1 = require("./assert"); +const scope_1 = require("./scope"); +const ClassFieldInitializerScope_1 = require("./scope/ClassFieldInitializerScope"); +const ClassStaticBlockScope_1 = require("./scope/ClassStaticBlockScope"); +/** + * @see https://eslint.org/docs/latest/developer-guide/scope-manager-interface#scopemanager-interface + */ +class ScopeManager { + get variables() { + const variables = new Set(); + function recurse(scope) { + scope.variables.forEach(v => variables.add(v)); + scope.childScopes.forEach(recurse); + } + this.scopes.forEach(recurse); + return Array.from(variables).sort((a, b) => a.$id - b.$id); + } + constructor(options) { + _ScopeManager_options.set(this, void 0); + this.scopes = []; + this.globalScope = null; + this.nodeToScope = new WeakMap(); + this.currentScope = null; + __classPrivateFieldSet(this, _ScopeManager_options, options, "f"); + this.declaredVariables = new WeakMap(); + } + isGlobalReturn() { + return __classPrivateFieldGet(this, _ScopeManager_options, "f").globalReturn === true; + } + isModule() { + return __classPrivateFieldGet(this, _ScopeManager_options, "f").sourceType === 'module'; + } + isImpliedStrict() { + return __classPrivateFieldGet(this, _ScopeManager_options, "f").impliedStrict === true; + } + isStrictModeSupported() { + return true; + } + isES6() { + return true; + } + /** + * Get the variables that a given AST node defines. The gotten variables' `def[].node`/`def[].parent` property is the node. + * If the node does not define any variable, this returns an empty array. + * @param node An AST node to get their variables. + * @public + */ + getDeclaredVariables(node) { + return this.declaredVariables.get(node) ?? []; + } + /** + * Get the scope of a given AST node. The gotten scope's `block` property is the node. + * This method never returns `function-expression-name` scope. If the node does not have their scope, this returns `null`. + * + * @param node An AST node to get their scope. + * @param inner If the node has multiple scopes, this returns the outermost scope normally. + * If `inner` is `true` then this returns the innermost scope. + * @public + */ + acquire(node, inner = false) { + function predicate(testScope) { + if (testScope.type === scope_1.ScopeType.function && + testScope.functionExpressionScope) { + return false; + } + return true; + } + const scopes = this.nodeToScope.get(node); + if (!scopes || scopes.length === 0) { + return null; + } + // Heuristic selection from all scopes. + // If you would like to get all scopes, please use ScopeManager#acquireAll. + if (scopes.length === 1) { + return scopes[0]; + } + if (inner) { + for (let i = scopes.length - 1; i >= 0; --i) { + const scope = scopes[i]; + if (predicate(scope)) { + return scope; + } + } + return null; + } + return scopes.find(predicate) ?? null; + } + nestScope(scope) { + if (scope instanceof scope_1.GlobalScope) { + (0, assert_1.assert)(this.currentScope == null); + this.globalScope = scope; + } + this.currentScope = scope; + return scope; + } + nestBlockScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.BlockScope(this, this.currentScope, node)); + } + nestCatchScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.CatchScope(this, this.currentScope, node)); + } + nestClassScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.ClassScope(this, this.currentScope, node)); + } + nestClassFieldInitializerScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new ClassFieldInitializerScope_1.ClassFieldInitializerScope(this, this.currentScope, node)); + } + nestClassStaticBlockScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new ClassStaticBlockScope_1.ClassStaticBlockScope(this, this.currentScope, node)); + } + nestConditionalTypeScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.ConditionalTypeScope(this, this.currentScope, node)); + } + nestForScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.ForScope(this, this.currentScope, node)); + } + nestFunctionExpressionNameScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.FunctionExpressionNameScope(this, this.currentScope, node)); + } + nestFunctionScope(node, isMethodDefinition) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.FunctionScope(this, this.currentScope, node, isMethodDefinition)); + } + nestFunctionTypeScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.FunctionTypeScope(this, this.currentScope, node)); + } + nestGlobalScope(node) { + return this.nestScope(new scope_1.GlobalScope(this, node)); + } + nestMappedTypeScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.MappedTypeScope(this, this.currentScope, node)); + } + nestModuleScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.ModuleScope(this, this.currentScope, node)); + } + nestSwitchScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.SwitchScope(this, this.currentScope, node)); + } + nestTSEnumScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.TSEnumScope(this, this.currentScope, node)); + } + nestTSModuleScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.TSModuleScope(this, this.currentScope, node)); + } + nestTypeScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.TypeScope(this, this.currentScope, node)); + } + nestWithScope(node) { + (0, assert_1.assert)(this.currentScope); + return this.nestScope(new scope_1.WithScope(this, this.currentScope, node)); + } +} +exports.ScopeManager = ScopeManager; +_ScopeManager_options = new WeakMap(); +//# sourceMappingURL=ScopeManager.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js.map new file mode 100644 index 0000000000..99faace878 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopeManager.js","sourceRoot":"","sources":["../src/ScopeManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,qCAAkC;AAElC,mCAkBiB;AACjB,mFAAgF;AAChF,yEAAsE;AAStE;;GAEG;AACH,MAAM,YAAY;IAgBhB,IAAW,SAAS;QAClB,MAAM,SAAS,GAAG,IAAI,GAAG,EAAY,CAAC;QACtC,SAAS,OAAO,CAAC,KAAY;YAC3B,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/C,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7B,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC7D,CAA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,CAAC,IAA0B;QAC/C,IAAA,eAAM,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,mBAAW,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;IACxE,CAAC;IAEM,iBAAiB,CAAC,IAA4B;QACnD,IAAA,eAAM,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,qBAAa,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1E,CAAC;IAEM,aAAa,CAAC,IAAwB;QAC3C,IAAA,eAAM,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,iBAAS,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;IACtE,CAAC;IAEM,aAAa,CAAC,IAAwB;QAC3C,IAAA,eAAM,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,iBAAS,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;IACtE,CAAC;CACF;AAEQ,oCAAY"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts new file mode 100644 index 0000000000..73ee9847ca --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts @@ -0,0 +1,56 @@ +import type { Lib, TSESTree } from '@typescript-eslint/types'; +import type { ReferencerOptions } from './referencer'; +import { ScopeManager } from './ScopeManager'; +interface AnalyzeOptions { + /** + * Known visitor keys. + */ + childVisitorKeys?: ReferencerOptions['childVisitorKeys']; + /** + * Whether the whole script is executed under node.js environment. + * When enabled, the scope manager adds a function scope immediately following the global scope. + * Defaults to `false`. + */ + globalReturn?: boolean; + /** + * Implied strict mode. + * Defaults to `false`. + */ + impliedStrict?: boolean; + /** + * The identifier that's used for JSX Element creation (after transpilation). + * This should not be a member expression - just the root identifier (i.e. use "React" instead of "React.createElement"). + * Defaults to `"React"`. + */ + jsxPragma?: string | null; + /** + * The identifier that's used for JSX fragment elements (after transpilation). + * If `null`, assumes transpilation will always use a member on `jsxFactory` (i.e. React.Fragment). + * This should not be a member expression - just the root identifier (i.e. use "h" instead of "h.Fragment"). + * Defaults to `null`. + */ + jsxFragmentName?: string | null; + /** + * The lib used by the project. + * This automatically defines a type variable for any types provided by the configured TS libs. + * Defaults to ['esnext']. + * + * https://www.typescriptlang.org/tsconfig#lib + */ + lib?: Lib[]; + /** + * The source type of the script. + */ + sourceType?: 'module' | 'script'; + /** + * Emit design-type metadata for decorated declarations in source. + * Defaults to `false`. + */ + emitDecoratorMetadata?: boolean; +} +/** + * Takes an AST and returns the analyzed scopes. + */ +declare function analyze(tree: TSESTree.Node, providedOptions?: AnalyzeOptions): ScopeManager; +export { analyze, AnalyzeOptions }; +//# sourceMappingURL=analyze.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts.map new file mode 100644 index 0000000000..dd09fdd4d4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAM9C,UAAU,cAAc;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAEzD;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IAEZ;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAEjC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAaD;;GAEG;AACH,iBAAS,OAAO,CACd,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,eAAe,CAAC,EAAE,cAAc,GAC/B,YAAY,CA6Bd;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.js new file mode 100644 index 0000000000..b8b2d05b24 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.analyze = void 0; +const visitor_keys_1 = require("@typescript-eslint/visitor-keys"); +const referencer_1 = require("./referencer"); +const ScopeManager_1 = require("./ScopeManager"); +const DEFAULT_OPTIONS = { + childVisitorKeys: visitor_keys_1.visitorKeys, + globalReturn: false, + impliedStrict: false, + jsxPragma: 'React', + jsxFragmentName: null, + lib: ['es2018'], + sourceType: 'script', + emitDecoratorMetadata: false, +}; +/** + * Takes an AST and returns the analyzed scopes. + */ +function analyze(tree, providedOptions) { + const options = { + childVisitorKeys: providedOptions?.childVisitorKeys ?? DEFAULT_OPTIONS.childVisitorKeys, + globalReturn: providedOptions?.globalReturn ?? DEFAULT_OPTIONS.globalReturn, + impliedStrict: providedOptions?.impliedStrict ?? DEFAULT_OPTIONS.impliedStrict, + jsxPragma: providedOptions?.jsxPragma === undefined + ? DEFAULT_OPTIONS.jsxPragma + : providedOptions.jsxPragma, + jsxFragmentName: providedOptions?.jsxFragmentName ?? DEFAULT_OPTIONS.jsxFragmentName, + sourceType: providedOptions?.sourceType ?? DEFAULT_OPTIONS.sourceType, + lib: providedOptions?.lib ?? ['esnext'], + emitDecoratorMetadata: providedOptions?.emitDecoratorMetadata ?? + DEFAULT_OPTIONS.emitDecoratorMetadata, + }; + // ensure the option is lower cased + options.lib = options.lib.map(l => l.toLowerCase()); + const scopeManager = new ScopeManager_1.ScopeManager(options); + const referencer = new referencer_1.Referencer(options, scopeManager); + referencer.visit(tree); + return scopeManager; +} +exports.analyze = analyze; +//# sourceMappingURL=analyze.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.js.map new file mode 100644 index 0000000000..fe3ea95907 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/analyze.js.map @@ -0,0 +1 @@ +{"version":3,"file":"analyze.js","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":";;;AACA,kEAA8D;AAG9D,6CAA0C;AAC1C,iDAA8C;AA6D9C,MAAM,eAAe,GAA6B;IAChD,gBAAgB,EAAE,0BAAW;IAC7B,YAAY,EAAE,KAAK;IACnB,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,OAAO;IAClB,eAAe,EAAE,IAAI;IACrB,GAAG,EAAE,CAAC,QAAQ,CAAC;IACf,UAAU,EAAE,QAAQ;IACpB,qBAAqB,EAAE,KAAK;CAC7B,CAAC;AAEF;;GAEG;AACH,SAAS,OAAO,CACd,IAAmB,EACnB,eAAgC;IAEhC,MAAM,OAAO,GAA6B;QACxC,gBAAgB,EACd,eAAe,EAAE,gBAAgB,IAAI,eAAe,CAAC,gBAAgB;QACvE,YAAY,EAAE,eAAe,EAAE,YAAY,IAAI,eAAe,CAAC,YAAY;QAC3E,aAAa,EACX,eAAe,EAAE,aAAa,IAAI,eAAe,CAAC,aAAa;QACjE,SAAS,EACP,eAAe,EAAE,SAAS,KAAK,SAAS;YACtC,CAAC,CAAC,eAAe,CAAC,SAAS;YAC3B,CAAC,CAAC,eAAe,CAAC,SAAS;QAC/B,eAAe,EACb,eAAe,EAAE,eAAe,IAAI,eAAe,CAAC,eAAe;QACrE,UAAU,EAAE,eAAe,EAAE,UAAU,IAAI,eAAe,CAAC,UAAU;QACrE,GAAG,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QACvC,qBAAqB,EACnB,eAAe,EAAE,qBAAqB;YACtC,eAAe,CAAC,qBAAqB;KACxC,CAAC;IAEF,mCAAmC;IACnC,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAS,CAAC,CAAC;IAE3D,MAAM,YAAY,GAAG,IAAI,2BAAY,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,UAAU,GAAG,IAAI,uBAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAEzD,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEvB,OAAO,YAAY,CAAC;AACtB,CAAC;AAEQ,0BAAO"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts new file mode 100644 index 0000000000..bd40c9e22b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts @@ -0,0 +1,3 @@ +declare function assert(value: unknown, message?: string): asserts value; +export { assert }; +//# sourceMappingURL=assert.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts.map new file mode 100644 index 0000000000..72f278dd6d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":"AACA,iBAAS,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAI/D;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.js new file mode 100644 index 0000000000..8c805233f7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assert = void 0; +// the base assert module doesn't use ts assertion syntax +function assert(value, message) { + if (value == null) { + throw new Error(message); + } +} +exports.assert = assert; +//# sourceMappingURL=assert.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.js.map new file mode 100644 index 0000000000..60cbdc2778 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/assert.js.map @@ -0,0 +1 @@ +{"version":3,"file":"assert.js","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,SAAS,MAAM,CAAC,KAAc,EAAE,OAAgB;IAC9C,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KAC1B;AACH,CAAC;AAEQ,wBAAM"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts new file mode 100644 index 0000000000..a90f8b6743 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class CatchClauseDefinition extends DefinitionBase { + constructor(name: TSESTree.BindingName, node: CatchClauseDefinition['node']); + readonly isTypeDefinition = false; + readonly isVariableDefinition = true; +} +export { CatchClauseDefinition }; +//# sourceMappingURL=CatchClauseDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts.map new file mode 100644 index 0000000000..368d7928f4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CatchClauseDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/CatchClauseDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,qBAAsB,SAAQ,cAAc,CAChD,cAAc,CAAC,WAAW,EAC1B,QAAQ,CAAC,WAAW,EACpB,IAAI,EACJ,QAAQ,CAAC,WAAW,CACrB;gBACa,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC;IAI3E,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js new file mode 100644 index 0000000000..5928764cb7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CatchClauseDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class CatchClauseDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node) { + super(DefinitionType_1.DefinitionType.CatchClause, name, node, null); + this.isTypeDefinition = false; + this.isVariableDefinition = true; + } +} +exports.CatchClauseDefinition = CatchClauseDefinition; +//# sourceMappingURL=CatchClauseDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js.map new file mode 100644 index 0000000000..f6e5179c69 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/CatchClauseDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CatchClauseDefinition.js","sourceRoot":"","sources":["../../src/definition/CatchClauseDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,qBAAsB,SAAQ,+BAKnC;IACC,YAAY,IAA0B,EAAE,IAAmC;QACzE,KAAK,CAAC,+BAAc,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGtC,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,sDAAqB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts new file mode 100644 index 0000000000..0bbea30e97 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class ClassNameDefinition extends DefinitionBase { + constructor(name: TSESTree.Identifier, node: ClassNameDefinition['node']); + readonly isTypeDefinition = true; + readonly isVariableDefinition = true; +} +export { ClassNameDefinition }; +//# sourceMappingURL=ClassNameDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts.map new file mode 100644 index 0000000000..6e78e38b48 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ClassNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,mBAAoB,SAAQ,cAAc,CAC9C,cAAc,CAAC,SAAS,EACxB,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,eAAe,EACpD,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;gBACa,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC;IAIxE,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js new file mode 100644 index 0000000000..82b70c7cb0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClassNameDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class ClassNameDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node) { + super(DefinitionType_1.DefinitionType.ClassName, name, node, null); + this.isTypeDefinition = true; + this.isVariableDefinition = true; + } +} +exports.ClassNameDefinition = ClassNameDefinition; +//# sourceMappingURL=ClassNameDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js.map new file mode 100644 index 0000000000..a803591288 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ClassNameDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassNameDefinition.js","sourceRoot":"","sources":["../../src/definition/ClassNameDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,mBAAoB,SAAQ,+BAKjC;IACC,YAAY,IAAyB,EAAE,IAAiC;QACtE,KAAK,CAAC,+BAAc,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGpC,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,kDAAmB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts new file mode 100644 index 0000000000..fa6c9fdd33 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts @@ -0,0 +1,14 @@ +import type { CatchClauseDefinition } from './CatchClauseDefinition'; +import type { ClassNameDefinition } from './ClassNameDefinition'; +import type { FunctionNameDefinition } from './FunctionNameDefinition'; +import type { ImplicitGlobalVariableDefinition } from './ImplicitGlobalVariableDefinition'; +import type { ImportBindingDefinition } from './ImportBindingDefinition'; +import type { ParameterDefinition } from './ParameterDefinition'; +import type { TSEnumMemberDefinition } from './TSEnumMemberDefinition'; +import type { TSEnumNameDefinition } from './TSEnumNameDefinition'; +import type { TSModuleNameDefinition } from './TSModuleNameDefinition'; +import type { TypeDefinition } from './TypeDefinition'; +import type { VariableDefinition } from './VariableDefinition'; +type Definition = CatchClauseDefinition | ClassNameDefinition | FunctionNameDefinition | ImplicitGlobalVariableDefinition | ImportBindingDefinition | ParameterDefinition | TSEnumMemberDefinition | TSEnumNameDefinition | TSModuleNameDefinition | TypeDefinition | VariableDefinition; +export { Definition }; +//# sourceMappingURL=Definition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map new file mode 100644 index 0000000000..543ca27a54 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Definition.d.ts","sourceRoot":"","sources":["../../src/definition/Definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,KAAK,UAAU,GACX,qBAAqB,GACrB,mBAAmB,GACnB,sBAAsB,GACtB,gCAAgC,GAChC,uBAAuB,GACvB,mBAAmB,GACnB,sBAAsB,GACtB,oBAAoB,GACpB,sBAAsB,GACtB,cAAc,GACd,kBAAkB,CAAC;AAEvB,OAAO,EAAE,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js new file mode 100644 index 0000000000..0d4aab95f1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=Definition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js.map new file mode 100644 index 0000000000..be4a7fb357 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Definition.js","sourceRoot":"","sources":["../../src/definition/Definition.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts new file mode 100644 index 0000000000..9ee1ee7d09 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts @@ -0,0 +1,39 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { DefinitionType } from './DefinitionType'; +declare abstract class DefinitionBase { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + readonly $id: number; + /** + * The type of the definition + * @public + */ + readonly type: TType; + /** + * The `Identifier` node of this definition + * @public + */ + readonly name: TName; + /** + * The enclosing node of the name. + * @public + */ + readonly node: TNode; + /** + * the enclosing statement node of the identifier. + * @public + */ + readonly parent: TParent; + constructor(type: TType, name: TName, node: TNode, parent: TParent); + /** + * `true` if the variable is valid in a type context, false otherwise + */ + abstract readonly isTypeDefinition: boolean; + /** + * `true` if the variable is valid in a value context, false otherwise + */ + abstract readonly isVariableDefinition: boolean; +} +export { DefinitionBase }; +//# sourceMappingURL=DefinitionBase.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts.map new file mode 100644 index 0000000000..3f8b196528 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DefinitionBase.d.ts","sourceRoot":"","sources":["../../src/definition/DefinitionBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,uBAAe,cAAc,CAC3B,KAAK,SAAS,cAAc,EAC5B,KAAK,SAAS,QAAQ,CAAC,IAAI,EAC3B,OAAO,SAAS,QAAQ,CAAC,IAAI,GAAG,IAAI,EACpC,KAAK,SAAS,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,WAAW;IAElD;;OAEG;IACH,SAAgB,GAAG,EAAE,MAAM,CAAe;IAE1C;;;OAGG;IACH,SAAgB,IAAI,EAAE,KAAK,CAAC;IAE5B;;;OAGG;IACH,SAAgB,IAAI,EAAE,KAAK,CAAC;IAE5B;;;OAGG;IACH,SAAgB,IAAI,EAAE,KAAK,CAAC;IAE5B;;;OAGG;IACH,SAAgB,MAAM,EAAE,OAAO,CAAC;gBAEpB,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO;IAOlE;;OAEG;IACH,kBAAyB,gBAAgB,EAAE,OAAO,CAAC;IAEnD;;OAEG;IACH,kBAAyB,oBAAoB,EAAE,OAAO,CAAC;CACxD;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js new file mode 100644 index 0000000000..e8c3de6c3c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DefinitionBase = void 0; +const ID_1 = require("../ID"); +const generator = (0, ID_1.createIdGenerator)(); +class DefinitionBase { + constructor(type, name, node, parent) { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + this.$id = generator(); + this.type = type; + this.name = name; + this.node = node; + this.parent = parent; + } +} +exports.DefinitionBase = DefinitionBase; +//# sourceMappingURL=DefinitionBase.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js.map new file mode 100644 index 0000000000..be59484e38 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionBase.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DefinitionBase.js","sourceRoot":"","sources":["../../src/definition/DefinitionBase.ts"],"names":[],"mappings":";;;AAEA,8BAA0C;AAG1C,MAAM,SAAS,GAAG,IAAA,sBAAiB,GAAE,CAAC;AAEtC,MAAe,cAAc;IAmC3B,YAAY,IAAW,EAAE,IAAW,EAAE,IAAW,EAAE,MAAe;QA7BlE;;WAEG;QACa,QAAG,GAAW,SAAS,EAAE,CAAC;QA2BxC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CAWF;AAEQ,wCAAc"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts new file mode 100644 index 0000000000..d86220d8c9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts @@ -0,0 +1,15 @@ +declare enum DefinitionType { + CatchClause = "CatchClause", + ClassName = "ClassName", + FunctionName = "FunctionName", + ImplicitGlobalVariable = "ImplicitGlobalVariable", + ImportBinding = "ImportBinding", + Parameter = "Parameter", + TSEnumName = "TSEnumName", + TSEnumMember = "TSEnumMemberName", + TSModuleName = "TSModuleName", + Type = "Type", + Variable = "Variable" +} +export { DefinitionType }; +//# sourceMappingURL=DefinitionType.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts.map new file mode 100644 index 0000000000..c3614a6b3f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DefinitionType.d.ts","sourceRoot":"","sources":["../../src/definition/DefinitionType.ts"],"names":[],"mappings":"AAAA,aAAK,cAAc;IACjB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,sBAAsB,2BAA2B;IACjD,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,YAAY,qBAAqB;IACjC,YAAY,iBAAiB;IAC7B,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js new file mode 100644 index 0000000000..07cc9afad1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DefinitionType = void 0; +var DefinitionType; +(function (DefinitionType) { + DefinitionType["CatchClause"] = "CatchClause"; + DefinitionType["ClassName"] = "ClassName"; + DefinitionType["FunctionName"] = "FunctionName"; + DefinitionType["ImplicitGlobalVariable"] = "ImplicitGlobalVariable"; + DefinitionType["ImportBinding"] = "ImportBinding"; + DefinitionType["Parameter"] = "Parameter"; + DefinitionType["TSEnumName"] = "TSEnumName"; + DefinitionType["TSEnumMember"] = "TSEnumMemberName"; + DefinitionType["TSModuleName"] = "TSModuleName"; + DefinitionType["Type"] = "Type"; + DefinitionType["Variable"] = "Variable"; +})(DefinitionType || (exports.DefinitionType = DefinitionType = {})); +//# sourceMappingURL=DefinitionType.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js.map new file mode 100644 index 0000000000..042fd30247 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/DefinitionType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DefinitionType.js","sourceRoot":"","sources":["../../src/definition/DefinitionType.ts"],"names":[],"mappings":";;;AAAA,IAAK,cAYJ;AAZD,WAAK,cAAc;IACjB,6CAA2B,CAAA;IAC3B,yCAAuB,CAAA;IACvB,+CAA6B,CAAA;IAC7B,mEAAiD,CAAA;IACjD,iDAA+B,CAAA;IAC/B,yCAAuB,CAAA;IACvB,2CAAyB,CAAA;IACzB,mDAAiC,CAAA;IACjC,+CAA6B,CAAA;IAC7B,+BAAa,CAAA;IACb,uCAAqB,CAAA;AACvB,CAAC,EAZI,cAAc,8BAAd,cAAc,QAYlB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts new file mode 100644 index 0000000000..9cd9920111 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class FunctionNameDefinition extends DefinitionBase { + constructor(name: TSESTree.Identifier, node: FunctionNameDefinition['node']); + readonly isTypeDefinition = false; + readonly isVariableDefinition = true; +} +export { FunctionNameDefinition }; +//# sourceMappingURL=FunctionNameDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts.map new file mode 100644 index 0000000000..ffe1b2fb76 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/FunctionNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,sBAAuB,SAAQ,cAAc,CACjD,cAAc,CAAC,YAAY,EACzB,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,6BAA6B,EACxC,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;gBACa,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;IAI3E,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js new file mode 100644 index 0000000000..ae9bed420b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FunctionNameDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class FunctionNameDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node) { + super(DefinitionType_1.DefinitionType.FunctionName, name, node, null); + this.isTypeDefinition = false; + this.isVariableDefinition = true; + } +} +exports.FunctionNameDefinition = FunctionNameDefinition; +//# sourceMappingURL=FunctionNameDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js.map new file mode 100644 index 0000000000..2c9063e694 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/FunctionNameDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionNameDefinition.js","sourceRoot":"","sources":["../../src/definition/FunctionNameDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,sBAAuB,SAAQ,+BAQpC;IACC,YAAY,IAAyB,EAAE,IAAoC;QACzE,KAAK,CAAC,+BAAc,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGvC,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,wDAAsB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts new file mode 100644 index 0000000000..c1b190b825 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class ImplicitGlobalVariableDefinition extends DefinitionBase { + constructor(name: TSESTree.BindingName, node: ImplicitGlobalVariableDefinition['node']); + readonly isTypeDefinition = false; + readonly isVariableDefinition = true; +} +export { ImplicitGlobalVariableDefinition }; +//# sourceMappingURL=ImplicitGlobalVariableDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts.map new file mode 100644 index 0000000000..151b36470d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ImplicitGlobalVariableDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ImplicitGlobalVariableDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,gCAAiC,SAAQ,cAAc,CAC3D,cAAc,CAAC,sBAAsB,EACrC,QAAQ,CAAC,IAAI,EACb,IAAI,EACJ,QAAQ,CAAC,WAAW,CACrB;gBAEG,IAAI,EAAE,QAAQ,CAAC,WAAW,EAC1B,IAAI,EAAE,gCAAgC,CAAC,MAAM,CAAC;IAKhD,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,gCAAgC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js new file mode 100644 index 0000000000..8da8451e05 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImplicitGlobalVariableDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class ImplicitGlobalVariableDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node) { + super(DefinitionType_1.DefinitionType.ImplicitGlobalVariable, name, node, null); + this.isTypeDefinition = false; + this.isVariableDefinition = true; + } +} +exports.ImplicitGlobalVariableDefinition = ImplicitGlobalVariableDefinition; +//# sourceMappingURL=ImplicitGlobalVariableDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js.map new file mode 100644 index 0000000000..043656a4be --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImplicitGlobalVariableDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ImplicitGlobalVariableDefinition.js","sourceRoot":"","sources":["../../src/definition/ImplicitGlobalVariableDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,gCAAiC,SAAQ,+BAK9C;IACC,YACE,IAA0B,EAC1B,IAA8C;QAE9C,KAAK,CAAC,+BAAc,CAAC,sBAAsB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGjD,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,4EAAgC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts new file mode 100644 index 0000000000..49510d6d94 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts @@ -0,0 +1,11 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class ImportBindingDefinition extends DefinitionBase { + constructor(name: TSESTree.Identifier, node: TSESTree.TSImportEqualsDeclaration, decl: TSESTree.TSImportEqualsDeclaration); + constructor(name: TSESTree.Identifier, node: Exclude, decl: TSESTree.ImportDeclaration); + readonly isTypeDefinition = true; + readonly isVariableDefinition = true; +} +export { ImportBindingDefinition }; +//# sourceMappingURL=ImportBindingDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts.map new file mode 100644 index 0000000000..fa3e588120 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ImportBindingDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ImportBindingDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,uBAAwB,SAAQ,cAAc,CAClD,cAAc,CAAC,aAAa,EAC1B,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,wBAAwB,GACjC,QAAQ,CAAC,eAAe,GACxB,QAAQ,CAAC,yBAAyB,EACpC,QAAQ,CAAC,iBAAiB,GAAG,QAAQ,CAAC,yBAAyB,EAC/D,QAAQ,CAAC,UAAU,CACpB;gBAEG,IAAI,EAAE,QAAQ,CAAC,UAAU,EACzB,IAAI,EAAE,QAAQ,CAAC,yBAAyB,EACxC,IAAI,EAAE,QAAQ,CAAC,yBAAyB;gBAGxC,IAAI,EAAE,QAAQ,CAAC,UAAU,EACzB,IAAI,EAAE,OAAO,CACX,uBAAuB,CAAC,MAAM,CAAC,EAC/B,QAAQ,CAAC,yBAAyB,CACnC,EACD,IAAI,EAAE,QAAQ,CAAC,iBAAiB;IAUlC,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js new file mode 100644 index 0000000000..9c74489946 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImportBindingDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class ImportBindingDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node, decl) { + super(DefinitionType_1.DefinitionType.ImportBinding, name, node, decl); + this.isTypeDefinition = true; + this.isVariableDefinition = true; + } +} +exports.ImportBindingDefinition = ImportBindingDefinition; +//# sourceMappingURL=ImportBindingDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js.map new file mode 100644 index 0000000000..2a0c9e6e23 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ImportBindingDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ImportBindingDefinition.js","sourceRoot":"","sources":["../../src/definition/ImportBindingDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,uBAAwB,SAAQ,+BAQrC;IAcC,YACE,IAAyB,EACzB,IAAqC,EACrC,IAAqE;QAErE,KAAK,CAAC,+BAAc,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGxC,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,0DAAuB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts new file mode 100644 index 0000000000..dd132e95a4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts @@ -0,0 +1,14 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class ParameterDefinition extends DefinitionBase { + /** + * Whether the parameter definition is a part of a rest parameter. + */ + readonly rest: boolean; + constructor(name: TSESTree.BindingName, node: ParameterDefinition['node'], rest: boolean); + readonly isTypeDefinition = false; + readonly isVariableDefinition = true; +} +export { ParameterDefinition }; +//# sourceMappingURL=ParameterDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts.map new file mode 100644 index 0000000000..587d8a9631 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ParameterDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/ParameterDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,mBAAoB,SAAQ,cAAc,CAC9C,cAAc,CAAC,SAAS,EACtB,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,0BAA0B,GACnC,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,+BAA+B,GACxC,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,6BAA6B,GACtC,QAAQ,CAAC,cAAc,GACvB,QAAQ,CAAC,iBAAiB,EAC5B,IAAI,EACJ,QAAQ,CAAC,WAAW,CACrB;IACC;;OAEG;IACH,SAAgB,IAAI,EAAE,OAAO,CAAC;gBAE5B,IAAI,EAAE,QAAQ,CAAC,WAAW,EAC1B,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,EACjC,IAAI,EAAE,OAAO;IAMf,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js new file mode 100644 index 0000000000..8a3ffb66fc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ParameterDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class ParameterDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node, rest) { + super(DefinitionType_1.DefinitionType.Parameter, name, node, null); + this.isTypeDefinition = false; + this.isVariableDefinition = true; + this.rest = rest; + } +} +exports.ParameterDefinition = ParameterDefinition; +//# sourceMappingURL=ParameterDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js.map new file mode 100644 index 0000000000..3e83d02b11 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/ParameterDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ParameterDefinition.js","sourceRoot":"","sources":["../../src/definition/ParameterDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,mBAAoB,SAAQ,+BAcjC;IAKC,YACE,IAA0B,EAC1B,IAAiC,EACjC,IAAa;QAEb,KAAK,CAAC,+BAAc,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAIpC,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,IAAI,CAAC;QAJ1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAIF;AAEQ,kDAAmB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts new file mode 100644 index 0000000000..b721e748ff --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class TSEnumMemberDefinition extends DefinitionBase { + constructor(name: TSESTree.Identifier | TSESTree.StringLiteral, node: TSEnumMemberDefinition['node']); + readonly isTypeDefinition = true; + readonly isVariableDefinition = true; +} +export { TSEnumMemberDefinition }; +//# sourceMappingURL=TSEnumMemberDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts.map new file mode 100644 index 0000000000..0f7e748486 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSEnumMemberDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TSEnumMemberDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,sBAAuB,SAAQ,cAAc,CACjD,cAAc,CAAC,YAAY,EAC3B,QAAQ,CAAC,YAAY,EACrB,IAAI,EACJ,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAC7C;gBAEG,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,EAClD,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;IAKtC,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js new file mode 100644 index 0000000000..c7d43dbfe0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSEnumMemberDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class TSEnumMemberDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node) { + super(DefinitionType_1.DefinitionType.TSEnumMember, name, node, null); + this.isTypeDefinition = true; + this.isVariableDefinition = true; + } +} +exports.TSEnumMemberDefinition = TSEnumMemberDefinition; +//# sourceMappingURL=TSEnumMemberDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js.map new file mode 100644 index 0000000000..bb6be007af --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumMemberDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSEnumMemberDefinition.js","sourceRoot":"","sources":["../../src/definition/TSEnumMemberDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,sBAAuB,SAAQ,+BAKpC;IACC,YACE,IAAkD,EAClD,IAAoC;QAEpC,KAAK,CAAC,+BAAc,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGvC,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,wDAAsB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts new file mode 100644 index 0000000000..229ec5d9c7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class TSEnumNameDefinition extends DefinitionBase { + constructor(name: TSESTree.Identifier, node: TSEnumNameDefinition['node']); + readonly isTypeDefinition = true; + readonly isVariableDefinition = true; +} +export { TSEnumNameDefinition }; +//# sourceMappingURL=TSEnumNameDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts.map new file mode 100644 index 0000000000..af93b7301b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSEnumNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TSEnumNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,oBAAqB,SAAQ,cAAc,CAC/C,cAAc,CAAC,UAAU,EACzB,QAAQ,CAAC,iBAAiB,EAC1B,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;gBACa,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC;IAIzE,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js new file mode 100644 index 0000000000..ff3596b860 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSEnumNameDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class TSEnumNameDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node) { + super(DefinitionType_1.DefinitionType.TSEnumName, name, node, null); + this.isTypeDefinition = true; + this.isVariableDefinition = true; + } +} +exports.TSEnumNameDefinition = TSEnumNameDefinition; +//# sourceMappingURL=TSEnumNameDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js.map new file mode 100644 index 0000000000..5e87ffa67c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSEnumNameDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSEnumNameDefinition.js","sourceRoot":"","sources":["../../src/definition/TSEnumNameDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,oBAAqB,SAAQ,+BAKlC;IACC,YAAY,IAAyB,EAAE,IAAkC;QACvE,KAAK,CAAC,+BAAc,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGrC,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,oDAAoB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts new file mode 100644 index 0000000000..59556e02dc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class TSModuleNameDefinition extends DefinitionBase { + constructor(name: TSESTree.Identifier, node: TSModuleNameDefinition['node']); + readonly isTypeDefinition = true; + readonly isVariableDefinition = true; +} +export { TSModuleNameDefinition }; +//# sourceMappingURL=TSModuleNameDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts.map new file mode 100644 index 0000000000..6f7a624f29 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSModuleNameDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TSModuleNameDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,sBAAuB,SAAQ,cAAc,CACjD,cAAc,CAAC,YAAY,EAC3B,QAAQ,CAAC,mBAAmB,EAC5B,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;gBACa,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;IAI3E,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js new file mode 100644 index 0000000000..dc4d5deda3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSModuleNameDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class TSModuleNameDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node) { + super(DefinitionType_1.DefinitionType.TSModuleName, name, node, null); + this.isTypeDefinition = true; + this.isVariableDefinition = true; + } +} +exports.TSModuleNameDefinition = TSModuleNameDefinition; +//# sourceMappingURL=TSModuleNameDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js.map new file mode 100644 index 0000000000..433071f377 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TSModuleNameDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSModuleNameDefinition.js","sourceRoot":"","sources":["../../src/definition/TSModuleNameDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,sBAAuB,SAAQ,+BAKpC;IACC,YAAY,IAAyB,EAAE,IAAoC;QACzE,KAAK,CAAC,+BAAc,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGvC,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,wDAAsB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts new file mode 100644 index 0000000000..4a1a899b6a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class TypeDefinition extends DefinitionBase { + constructor(name: TSESTree.Identifier, node: TypeDefinition['node']); + readonly isTypeDefinition = true; + readonly isVariableDefinition = false; +} +export { TypeDefinition }; +//# sourceMappingURL=TypeDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts.map new file mode 100644 index 0000000000..679746ee5f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TypeDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/TypeDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,cAAe,SAAQ,cAAc,CACzC,cAAc,CAAC,IAAI,EACjB,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,eAAe,EAC1B,IAAI,EACJ,QAAQ,CAAC,UAAU,CACpB;gBACa,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;IAInE,SAAgB,gBAAgB,QAAQ;IACxC,SAAgB,oBAAoB,SAAS;CAC9C;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js new file mode 100644 index 0000000000..606ca5a624 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class TypeDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node) { + super(DefinitionType_1.DefinitionType.Type, name, node, null); + this.isTypeDefinition = true; + this.isVariableDefinition = false; + } +} +exports.TypeDefinition = TypeDefinition; +//# sourceMappingURL=TypeDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js.map new file mode 100644 index 0000000000..44377db22f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/TypeDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TypeDefinition.js","sourceRoot":"","sources":["../../src/definition/TypeDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,cAAe,SAAQ,+BAO5B;IACC,YAAY,IAAyB,EAAE,IAA4B;QACjE,KAAK,CAAC,+BAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAG/B,qBAAgB,GAAG,IAAI,CAAC;QACxB,yBAAoB,GAAG,KAAK,CAAC;IAH7C,CAAC;CAIF;AAEQ,wCAAc"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts new file mode 100644 index 0000000000..3540edb277 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { DefinitionBase } from './DefinitionBase'; +import { DefinitionType } from './DefinitionType'; +declare class VariableDefinition extends DefinitionBase { + constructor(name: TSESTree.Identifier, node: VariableDefinition['node'], decl: TSESTree.VariableDeclaration); + readonly isTypeDefinition = false; + readonly isVariableDefinition = true; +} +export { VariableDefinition }; +//# sourceMappingURL=VariableDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts.map new file mode 100644 index 0000000000..207365ae86 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"VariableDefinition.d.ts","sourceRoot":"","sources":["../../src/definition/VariableDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,cAAM,kBAAmB,SAAQ,cAAc,CAC7C,cAAc,CAAC,QAAQ,EACvB,QAAQ,CAAC,kBAAkB,EAC3B,QAAQ,CAAC,mBAAmB,EAC5B,QAAQ,CAAC,UAAU,CACpB;gBAEG,IAAI,EAAE,QAAQ,CAAC,UAAU,EACzB,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,EAChC,IAAI,EAAE,QAAQ,CAAC,mBAAmB;IAKpC,SAAgB,gBAAgB,SAAS;IACzC,SAAgB,oBAAoB,QAAQ;CAC7C;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js new file mode 100644 index 0000000000..7bacc6efd3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VariableDefinition = void 0; +const DefinitionBase_1 = require("./DefinitionBase"); +const DefinitionType_1 = require("./DefinitionType"); +class VariableDefinition extends DefinitionBase_1.DefinitionBase { + constructor(name, node, decl) { + super(DefinitionType_1.DefinitionType.Variable, name, node, decl); + this.isTypeDefinition = false; + this.isVariableDefinition = true; + } +} +exports.VariableDefinition = VariableDefinition; +//# sourceMappingURL=VariableDefinition.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js.map new file mode 100644 index 0000000000..f083868b50 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/VariableDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"VariableDefinition.js","sourceRoot":"","sources":["../../src/definition/VariableDefinition.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,qDAAkD;AAElD,MAAM,kBAAmB,SAAQ,+BAKhC;IACC,YACE,IAAyB,EACzB,IAAgC,EAChC,IAAkC;QAElC,KAAK,CAAC,+BAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAGnC,qBAAgB,GAAG,KAAK,CAAC;QACzB,yBAAoB,GAAG,IAAI,CAAC;IAH5C,CAAC;CAIF;AAEQ,gDAAkB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts new file mode 100644 index 0000000000..2be95a127f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts @@ -0,0 +1,14 @@ +export * from './CatchClauseDefinition'; +export * from './ClassNameDefinition'; +export * from './Definition'; +export * from './DefinitionType'; +export * from './FunctionNameDefinition'; +export * from './ImplicitGlobalVariableDefinition'; +export * from './ImportBindingDefinition'; +export * from './ParameterDefinition'; +export * from './TSEnumMemberDefinition'; +export * from './TSEnumNameDefinition'; +export * from './TSModuleNameDefinition'; +export * from './TypeDefinition'; +export * from './VariableDefinition'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts.map new file mode 100644 index 0000000000..dfd43be8ca --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js new file mode 100644 index 0000000000..71d1559db0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js @@ -0,0 +1,30 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./CatchClauseDefinition"), exports); +__exportStar(require("./ClassNameDefinition"), exports); +__exportStar(require("./Definition"), exports); +__exportStar(require("./DefinitionType"), exports); +__exportStar(require("./FunctionNameDefinition"), exports); +__exportStar(require("./ImplicitGlobalVariableDefinition"), exports); +__exportStar(require("./ImportBindingDefinition"), exports); +__exportStar(require("./ParameterDefinition"), exports); +__exportStar(require("./TSEnumMemberDefinition"), exports); +__exportStar(require("./TSEnumNameDefinition"), exports); +__exportStar(require("./TSModuleNameDefinition"), exports); +__exportStar(require("./TypeDefinition"), exports); +__exportStar(require("./VariableDefinition"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js.map new file mode 100644 index 0000000000..136726cd32 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/definition/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,wDAAsC;AACtC,+CAA6B;AAC7B,mDAAiC;AACjC,2DAAyC;AACzC,qEAAmD;AACnD,4DAA0C;AAC1C,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC;AACvC,2DAAyC;AACzC,mDAAiC;AACjC,uDAAqC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts new file mode 100644 index 0000000000..23ee2461ad --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts @@ -0,0 +1,9 @@ +export { analyze, AnalyzeOptions } from './analyze'; +export * from './definition'; +export { Reference } from './referencer/Reference'; +export { Visitor } from './referencer/Visitor'; +export { PatternVisitor, PatternVisitorCallback, PatternVisitorOptions, } from './referencer/PatternVisitor'; +export * from './scope'; +export { ScopeManager } from './ScopeManager'; +export * from './variable'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts.map new file mode 100644 index 0000000000..17ddbf5754 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,cAAc,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.js new file mode 100644 index 0000000000..df3bdf7550 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.js @@ -0,0 +1,31 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ScopeManager = exports.PatternVisitor = exports.Visitor = exports.Reference = exports.analyze = void 0; +var analyze_1 = require("./analyze"); +Object.defineProperty(exports, "analyze", { enumerable: true, get: function () { return analyze_1.analyze; } }); +__exportStar(require("./definition"), exports); +var Reference_1 = require("./referencer/Reference"); +Object.defineProperty(exports, "Reference", { enumerable: true, get: function () { return Reference_1.Reference; } }); +var Visitor_1 = require("./referencer/Visitor"); +Object.defineProperty(exports, "Visitor", { enumerable: true, get: function () { return Visitor_1.Visitor; } }); +var PatternVisitor_1 = require("./referencer/PatternVisitor"); +Object.defineProperty(exports, "PatternVisitor", { enumerable: true, get: function () { return PatternVisitor_1.PatternVisitor; } }); +__exportStar(require("./scope"), exports); +var ScopeManager_1 = require("./ScopeManager"); +Object.defineProperty(exports, "ScopeManager", { enumerable: true, get: function () { return ScopeManager_1.ScopeManager; } }); +__exportStar(require("./variable"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.js.map new file mode 100644 index 0000000000..f09b9d0cbf --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qCAAoD;AAA3C,kGAAA,OAAO,OAAA;AAChB,+CAA6B;AAC7B,oDAAmD;AAA1C,sGAAA,SAAS,OAAA;AAClB,gDAA+C;AAAtC,kGAAA,OAAO,OAAA;AAChB,8DAIqC;AAHnC,gHAAA,cAAc,OAAA;AAIhB,0CAAwB;AACxB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,6CAA2B"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts new file mode 100644 index 0000000000..6b2fddaa82 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts @@ -0,0 +1,16 @@ +export declare const TYPE: Readonly<{ + eslintImplicitGlobalSetting: "readonly"; + isTypeVariable: true; + isValueVariable: false; +}>; +export declare const VALUE: Readonly<{ + eslintImplicitGlobalSetting: "readonly"; + isTypeVariable: false; + isValueVariable: true; +}>; +export declare const TYPE_VALUE: Readonly<{ + eslintImplicitGlobalSetting: "readonly"; + isTypeVariable: true; + isValueVariable: true; +}>; +//# sourceMappingURL=base-config.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts.map new file mode 100644 index 0000000000..632981a2f9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base-config.d.ts","sourceRoot":"","sources":["../../src/lib/base-config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;EAIf,CAAC;AACH,eAAO,MAAM,KAAK;;;;EAIhB,CAAC;AACH,eAAO,MAAM,UAAU;;;;EAIrB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js new file mode 100644 index 0000000000..b42e78519b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js @@ -0,0 +1,23 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TYPE_VALUE = exports.VALUE = exports.TYPE = void 0; +exports.TYPE = Object.freeze({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, +}); +exports.VALUE = Object.freeze({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: false, + isValueVariable: true, +}); +exports.TYPE_VALUE = Object.freeze({ + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: true, +}); +//# sourceMappingURL=base-config.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js.map new file mode 100644 index 0000000000..202697722d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base-config.js","sourceRoot":"","sources":["../../src/lib/base-config.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAE1C,QAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;IAChC,2BAA2B,EAAE,UAAU;IACvC,cAAc,EAAE,IAAI;IACpB,eAAe,EAAE,KAAK;CACvB,CAAC,CAAC;AACU,QAAA,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,2BAA2B,EAAE,UAAU;IACvC,cAAc,EAAE,KAAK;IACrB,eAAe,EAAE,IAAI;CACtB,CAAC,CAAC;AACU,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IACtC,2BAA2B,EAAE,UAAU;IACvC,cAAc,EAAE,IAAI;IACpB,eAAe,EAAE,IAAI;CACtB,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts new file mode 100644 index 0000000000..288f05249c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const decorators: Record; +//# sourceMappingURL=decorators.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts.map new file mode 100644 index 0000000000..f1a10c5793 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/lib/decorators.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,UAAU,4CAawB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js new file mode 100644 index 0000000000..4f6d493f1b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js @@ -0,0 +1,23 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decorators = void 0; +const base_config_1 = require("./base-config"); +exports.decorators = { + ClassMemberDecoratorContext: base_config_1.TYPE, + DecoratorContext: base_config_1.TYPE, + DecoratorMetadataObject: base_config_1.TYPE, + DecoratorMetadata: base_config_1.TYPE, + ClassDecoratorContext: base_config_1.TYPE, + ClassMethodDecoratorContext: base_config_1.TYPE, + ClassGetterDecoratorContext: base_config_1.TYPE, + ClassSetterDecoratorContext: base_config_1.TYPE, + ClassAccessorDecoratorContext: base_config_1.TYPE, + ClassAccessorDecoratorTarget: base_config_1.TYPE, + ClassAccessorDecoratorResult: base_config_1.TYPE, + ClassFieldDecoratorContext: base_config_1.TYPE, +}; +//# sourceMappingURL=decorators.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js.map new file mode 100644 index 0000000000..af729662a8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/lib/decorators.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,UAAU,GAAG;IACxB,2BAA2B,EAAE,kBAAI;IACjC,gBAAgB,EAAE,kBAAI;IACtB,uBAAuB,EAAE,kBAAI;IAC7B,iBAAiB,EAAE,kBAAI;IACvB,qBAAqB,EAAE,kBAAI;IAC3B,2BAA2B,EAAE,kBAAI;IACjC,2BAA2B,EAAE,kBAAI;IACjC,2BAA2B,EAAE,kBAAI;IACjC,6BAA6B,EAAE,kBAAI;IACnC,4BAA4B,EAAE,kBAAI;IAClC,4BAA4B,EAAE,kBAAI;IAClC,0BAA0B,EAAE,kBAAI;CACa,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts new file mode 100644 index 0000000000..a7363bd85d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const decorators_legacy: Record; +//# sourceMappingURL=decorators.legacy.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts.map new file mode 100644 index 0000000000..1fcf25a0ad --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decorators.legacy.d.ts","sourceRoot":"","sources":["../../src/lib/decorators.legacy.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,iBAAiB,4CAKiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js new file mode 100644 index 0000000000..63363b83d0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decorators_legacy = void 0; +const base_config_1 = require("./base-config"); +exports.decorators_legacy = { + ClassDecorator: base_config_1.TYPE, + PropertyDecorator: base_config_1.TYPE, + MethodDecorator: base_config_1.TYPE, + ParameterDecorator: base_config_1.TYPE, +}; +//# sourceMappingURL=decorators.legacy.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js.map new file mode 100644 index 0000000000..320a2152e7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decorators.legacy.js","sourceRoot":"","sources":["../../src/lib/decorators.legacy.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,iBAAiB,GAAG;IAC/B,cAAc,EAAE,kBAAI;IACpB,iBAAiB,EAAE,kBAAI;IACvB,eAAe,EAAE,kBAAI;IACrB,kBAAkB,EAAE,kBAAI;CACqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts new file mode 100644 index 0000000000..f76da8eb27 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const dom: Record; +//# sourceMappingURL=dom.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map new file mode 100644 index 0000000000..97686a3ffe --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/lib/dom.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,GAAG,4CAk5C+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts new file mode 100644 index 0000000000..94f9807ee8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const dom_iterable: Record; +//# sourceMappingURL=dom.iterable.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map new file mode 100644 index 0000000000..3abccb28fd --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dom.iterable.d.ts","sourceRoot":"","sources":["../../src/lib/dom.iterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,YAAY,4CAiEsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js new file mode 100644 index 0000000000..3b22727202 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js @@ -0,0 +1,75 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dom_iterable = void 0; +const base_config_1 = require("./base-config"); +exports.dom_iterable = { + AudioParam: base_config_1.TYPE, + AudioParamMap: base_config_1.TYPE, + BaseAudioContext: base_config_1.TYPE, + CSSKeyframesRule: base_config_1.TYPE, + CSSNumericArray: base_config_1.TYPE, + CSSRuleList: base_config_1.TYPE, + CSSStyleDeclaration: base_config_1.TYPE, + CSSTransformValue: base_config_1.TYPE, + CSSUnparsedValue: base_config_1.TYPE, + Cache: base_config_1.TYPE, + CanvasPath: base_config_1.TYPE, + CanvasPathDrawingStyles: base_config_1.TYPE, + DOMRectList: base_config_1.TYPE, + DOMStringList: base_config_1.TYPE, + DOMTokenList: base_config_1.TYPE, + DataTransferItemList: base_config_1.TYPE, + EventCounts: base_config_1.TYPE, + FileList: base_config_1.TYPE, + FontFaceSet: base_config_1.TYPE, + FormData: base_config_1.TYPE, + HTMLAllCollection: base_config_1.TYPE, + HTMLCollectionBase: base_config_1.TYPE, + HTMLCollectionOf: base_config_1.TYPE, + HTMLFormElement: base_config_1.TYPE, + HTMLSelectElement: base_config_1.TYPE, + Headers: base_config_1.TYPE, + IDBDatabase: base_config_1.TYPE, + IDBObjectStore: base_config_1.TYPE, + MIDIInputMap: base_config_1.TYPE, + MIDIOutput: base_config_1.TYPE, + MIDIOutputMap: base_config_1.TYPE, + MediaKeyStatusMap: base_config_1.TYPE, + MediaList: base_config_1.TYPE, + MessageEvent: base_config_1.TYPE, + MimeTypeArray: base_config_1.TYPE, + NamedNodeMap: base_config_1.TYPE, + Navigator: base_config_1.TYPE, + NodeList: base_config_1.TYPE, + NodeListOf: base_config_1.TYPE, + Plugin: base_config_1.TYPE, + PluginArray: base_config_1.TYPE, + RTCRtpTransceiver: base_config_1.TYPE, + RTCStatsReport: base_config_1.TYPE, + SVGLengthList: base_config_1.TYPE, + SVGNumberList: base_config_1.TYPE, + SVGPointList: base_config_1.TYPE, + SVGStringList: base_config_1.TYPE, + SVGTransformList: base_config_1.TYPE, + SourceBufferList: base_config_1.TYPE, + SpeechRecognitionResult: base_config_1.TYPE, + SpeechRecognitionResultList: base_config_1.TYPE, + StylePropertyMapReadOnly: base_config_1.TYPE, + StyleSheetList: base_config_1.TYPE, + SubtleCrypto: base_config_1.TYPE, + TextTrackCueList: base_config_1.TYPE, + TextTrackList: base_config_1.TYPE, + TouchList: base_config_1.TYPE, + URLSearchParams: base_config_1.TYPE, + WEBGL_draw_buffers: base_config_1.TYPE, + WEBGL_multi_draw: base_config_1.TYPE, + WebGL2RenderingContextBase: base_config_1.TYPE, + WebGL2RenderingContextOverloads: base_config_1.TYPE, + WebGLRenderingContextBase: base_config_1.TYPE, + WebGLRenderingContextOverloads: base_config_1.TYPE, +}; +//# sourceMappingURL=dom.iterable.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js.map new file mode 100644 index 0000000000..f96d3972f3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dom.iterable.js","sourceRoot":"","sources":["../../src/lib/dom.iterable.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,YAAY,GAAG;IAC1B,UAAU,EAAE,kBAAI;IAChB,aAAa,EAAE,kBAAI;IACnB,gBAAgB,EAAE,kBAAI;IACtB,gBAAgB,EAAE,kBAAI;IACtB,eAAe,EAAE,kBAAI;IACrB,WAAW,EAAE,kBAAI;IACjB,mBAAmB,EAAE,kBAAI;IACzB,iBAAiB,EAAE,kBAAI;IACvB,gBAAgB,EAAE,kBAAI;IACtB,KAAK,EAAE,kBAAI;IACX,UAAU,EAAE,kBAAI;IAChB,uBAAuB,EAAE,kBAAI;IAC7B,WAAW,EAAE,kBAAI;IACjB,aAAa,EAAE,kBAAI;IACnB,YAAY,EAAE,kBAAI;IAClB,oBAAoB,EAAE,kBAAI;IAC1B,WAAW,EAAE,kBAAI;IACjB,QAAQ,EAAE,kBAAI;IACd,WAAW,EAAE,kBAAI;IACjB,QAAQ,EAAE,kBAAI;IACd,iBAAiB,EAAE,kBAAI;IACvB,kBAAkB,EAAE,kBAAI;IACxB,gBAAgB,EAAE,kBAAI;IACtB,eAAe,EAAE,kBAAI;IACrB,iBAAiB,EAAE,kBAAI;IACvB,OAAO,EAAE,kBAAI;IACb,WAAW,EAAE,kBAAI;IACjB,cAAc,EAAE,kBAAI;IACpB,YAAY,EAAE,kBAAI;IAClB,UAAU,EAAE,kBAAI;IAChB,aAAa,EAAE,kBAAI;IACnB,iBAAiB,EAAE,kBAAI;IACvB,SAAS,EAAE,kBAAI;IACf,YAAY,EAAE,kBAAI;IAClB,aAAa,EAAE,kBAAI;IACnB,YAAY,EAAE,kBAAI;IAClB,SAAS,EAAE,kBAAI;IACf,QAAQ,EAAE,kBAAI;IACd,UAAU,EAAE,kBAAI;IAChB,MAAM,EAAE,kBAAI;IACZ,WAAW,EAAE,kBAAI;IACjB,iBAAiB,EAAE,kBAAI;IACvB,cAAc,EAAE,kBAAI;IACpB,aAAa,EAAE,kBAAI;IACnB,aAAa,EAAE,kBAAI;IACnB,YAAY,EAAE,kBAAI;IAClB,aAAa,EAAE,kBAAI;IACnB,gBAAgB,EAAE,kBAAI;IACtB,gBAAgB,EAAE,kBAAI;IACtB,uBAAuB,EAAE,kBAAI;IAC7B,2BAA2B,EAAE,kBAAI;IACjC,wBAAwB,EAAE,kBAAI;IAC9B,cAAc,EAAE,kBAAI;IACpB,YAAY,EAAE,kBAAI;IAClB,gBAAgB,EAAE,kBAAI;IACtB,aAAa,EAAE,kBAAI;IACnB,SAAS,EAAE,kBAAI;IACf,eAAe,EAAE,kBAAI;IACrB,kBAAkB,EAAE,kBAAI;IACxB,gBAAgB,EAAE,kBAAI;IACtB,0BAA0B,EAAE,kBAAI;IAChC,+BAA+B,EAAE,kBAAI;IACrC,yBAAyB,EAAE,kBAAI;IAC/B,8BAA8B,EAAE,kBAAI;CACS,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js new file mode 100644 index 0000000000..aa2398da66 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js @@ -0,0 +1,1436 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dom = void 0; +const base_config_1 = require("./base-config"); +exports.dom = { + AddEventListenerOptions: base_config_1.TYPE, + AesCbcParams: base_config_1.TYPE, + AesCtrParams: base_config_1.TYPE, + AesDerivedKeyParams: base_config_1.TYPE, + AesGcmParams: base_config_1.TYPE, + AesKeyAlgorithm: base_config_1.TYPE, + AesKeyGenParams: base_config_1.TYPE, + Algorithm: base_config_1.TYPE, + AnalyserOptions: base_config_1.TYPE, + AnimationEventInit: base_config_1.TYPE, + AnimationPlaybackEventInit: base_config_1.TYPE, + AssignedNodesOptions: base_config_1.TYPE, + AudioBufferOptions: base_config_1.TYPE, + AudioBufferSourceOptions: base_config_1.TYPE, + AudioConfiguration: base_config_1.TYPE, + AudioContextOptions: base_config_1.TYPE, + AudioNodeOptions: base_config_1.TYPE, + AudioProcessingEventInit: base_config_1.TYPE, + AudioTimestamp: base_config_1.TYPE, + AudioWorkletNodeOptions: base_config_1.TYPE, + AuthenticationExtensionsClientInputs: base_config_1.TYPE, + AuthenticationExtensionsClientOutputs: base_config_1.TYPE, + AuthenticatorSelectionCriteria: base_config_1.TYPE, + AvcEncoderConfig: base_config_1.TYPE, + BiquadFilterOptions: base_config_1.TYPE, + BlobEventInit: base_config_1.TYPE, + BlobPropertyBag: base_config_1.TYPE, + CSSMatrixComponentOptions: base_config_1.TYPE, + CSSNumericType: base_config_1.TYPE, + CSSStyleSheetInit: base_config_1.TYPE, + CacheQueryOptions: base_config_1.TYPE, + CanvasRenderingContext2DSettings: base_config_1.TYPE, + ChannelMergerOptions: base_config_1.TYPE, + ChannelSplitterOptions: base_config_1.TYPE, + CheckVisibilityOptions: base_config_1.TYPE, + ClientQueryOptions: base_config_1.TYPE, + ClipboardEventInit: base_config_1.TYPE, + ClipboardItemOptions: base_config_1.TYPE, + CloseEventInit: base_config_1.TYPE, + CompositionEventInit: base_config_1.TYPE, + ComputedEffectTiming: base_config_1.TYPE, + ComputedKeyframe: base_config_1.TYPE, + ConstantSourceOptions: base_config_1.TYPE, + ConstrainBooleanParameters: base_config_1.TYPE, + ConstrainDOMStringParameters: base_config_1.TYPE, + ConstrainDoubleRange: base_config_1.TYPE, + ConstrainULongRange: base_config_1.TYPE, + ConvolverOptions: base_config_1.TYPE, + CredentialCreationOptions: base_config_1.TYPE, + CredentialPropertiesOutput: base_config_1.TYPE, + CredentialRequestOptions: base_config_1.TYPE, + CryptoKeyPair: base_config_1.TYPE, + CustomEventInit: base_config_1.TYPE, + DOMMatrix2DInit: base_config_1.TYPE, + DOMMatrixInit: base_config_1.TYPE, + DOMPointInit: base_config_1.TYPE, + DOMQuadInit: base_config_1.TYPE, + DOMRectInit: base_config_1.TYPE, + DelayOptions: base_config_1.TYPE, + DeviceMotionEventAccelerationInit: base_config_1.TYPE, + DeviceMotionEventInit: base_config_1.TYPE, + DeviceMotionEventRotationRateInit: base_config_1.TYPE, + DeviceOrientationEventInit: base_config_1.TYPE, + DisplayMediaStreamOptions: base_config_1.TYPE, + DocumentTimelineOptions: base_config_1.TYPE, + DoubleRange: base_config_1.TYPE, + DragEventInit: base_config_1.TYPE, + DynamicsCompressorOptions: base_config_1.TYPE, + EcKeyAlgorithm: base_config_1.TYPE, + EcKeyGenParams: base_config_1.TYPE, + EcKeyImportParams: base_config_1.TYPE, + EcdhKeyDeriveParams: base_config_1.TYPE, + EcdsaParams: base_config_1.TYPE, + EffectTiming: base_config_1.TYPE, + ElementCreationOptions: base_config_1.TYPE, + ElementDefinitionOptions: base_config_1.TYPE, + EncodedVideoChunkInit: base_config_1.TYPE, + EncodedVideoChunkMetadata: base_config_1.TYPE, + ErrorEventInit: base_config_1.TYPE, + EventInit: base_config_1.TYPE, + EventListenerOptions: base_config_1.TYPE, + EventModifierInit: base_config_1.TYPE, + EventSourceInit: base_config_1.TYPE, + FilePropertyBag: base_config_1.TYPE, + FileSystemCreateWritableOptions: base_config_1.TYPE, + FileSystemFlags: base_config_1.TYPE, + FileSystemGetDirectoryOptions: base_config_1.TYPE, + FileSystemGetFileOptions: base_config_1.TYPE, + FileSystemRemoveOptions: base_config_1.TYPE, + FocusEventInit: base_config_1.TYPE, + FocusOptions: base_config_1.TYPE, + FontFaceDescriptors: base_config_1.TYPE, + FontFaceSetLoadEventInit: base_config_1.TYPE, + FormDataEventInit: base_config_1.TYPE, + FullscreenOptions: base_config_1.TYPE, + GainOptions: base_config_1.TYPE, + GamepadEffectParameters: base_config_1.TYPE, + GamepadEventInit: base_config_1.TYPE, + GetAnimationsOptions: base_config_1.TYPE, + GetNotificationOptions: base_config_1.TYPE, + GetRootNodeOptions: base_config_1.TYPE, + HashChangeEventInit: base_config_1.TYPE, + HkdfParams: base_config_1.TYPE, + HmacImportParams: base_config_1.TYPE, + HmacKeyAlgorithm: base_config_1.TYPE, + HmacKeyGenParams: base_config_1.TYPE, + IDBDatabaseInfo: base_config_1.TYPE, + IDBIndexParameters: base_config_1.TYPE, + IDBObjectStoreParameters: base_config_1.TYPE, + IDBTransactionOptions: base_config_1.TYPE, + IDBVersionChangeEventInit: base_config_1.TYPE, + IIRFilterOptions: base_config_1.TYPE, + IdleRequestOptions: base_config_1.TYPE, + ImageBitmapOptions: base_config_1.TYPE, + ImageBitmapRenderingContextSettings: base_config_1.TYPE, + ImageDataSettings: base_config_1.TYPE, + ImageEncodeOptions: base_config_1.TYPE, + ImportMeta: base_config_1.TYPE, + InputEventInit: base_config_1.TYPE, + IntersectionObserverEntryInit: base_config_1.TYPE, + IntersectionObserverInit: base_config_1.TYPE, + JsonWebKey: base_config_1.TYPE, + KeyAlgorithm: base_config_1.TYPE, + KeyboardEventInit: base_config_1.TYPE, + Keyframe: base_config_1.TYPE, + KeyframeAnimationOptions: base_config_1.TYPE, + KeyframeEffectOptions: base_config_1.TYPE, + LockInfo: base_config_1.TYPE, + LockManagerSnapshot: base_config_1.TYPE, + LockOptions: base_config_1.TYPE, + MIDIConnectionEventInit: base_config_1.TYPE, + MIDIMessageEventInit: base_config_1.TYPE, + MIDIOptions: base_config_1.TYPE, + MediaCapabilitiesDecodingInfo: base_config_1.TYPE, + MediaCapabilitiesEncodingInfo: base_config_1.TYPE, + MediaCapabilitiesInfo: base_config_1.TYPE, + MediaConfiguration: base_config_1.TYPE, + MediaDecodingConfiguration: base_config_1.TYPE, + MediaElementAudioSourceOptions: base_config_1.TYPE, + MediaEncodingConfiguration: base_config_1.TYPE, + MediaEncryptedEventInit: base_config_1.TYPE, + MediaImage: base_config_1.TYPE, + MediaKeyMessageEventInit: base_config_1.TYPE, + MediaKeySystemConfiguration: base_config_1.TYPE, + MediaKeySystemMediaCapability: base_config_1.TYPE, + MediaMetadataInit: base_config_1.TYPE, + MediaPositionState: base_config_1.TYPE, + MediaQueryListEventInit: base_config_1.TYPE, + MediaRecorderOptions: base_config_1.TYPE, + MediaSessionActionDetails: base_config_1.TYPE, + MediaStreamAudioSourceOptions: base_config_1.TYPE, + MediaStreamConstraints: base_config_1.TYPE, + MediaStreamTrackEventInit: base_config_1.TYPE, + MediaTrackCapabilities: base_config_1.TYPE, + MediaTrackConstraintSet: base_config_1.TYPE, + MediaTrackConstraints: base_config_1.TYPE, + MediaTrackSettings: base_config_1.TYPE, + MediaTrackSupportedConstraints: base_config_1.TYPE, + MessageEventInit: base_config_1.TYPE, + MouseEventInit: base_config_1.TYPE, + MultiCacheQueryOptions: base_config_1.TYPE, + MutationObserverInit: base_config_1.TYPE, + NavigationPreloadState: base_config_1.TYPE, + NotificationAction: base_config_1.TYPE, + NotificationOptions: base_config_1.TYPE, + OfflineAudioCompletionEventInit: base_config_1.TYPE, + OfflineAudioContextOptions: base_config_1.TYPE, + OptionalEffectTiming: base_config_1.TYPE, + OscillatorOptions: base_config_1.TYPE, + PageTransitionEventInit: base_config_1.TYPE, + PannerOptions: base_config_1.TYPE, + PaymentCurrencyAmount: base_config_1.TYPE, + PaymentDetailsBase: base_config_1.TYPE, + PaymentDetailsInit: base_config_1.TYPE, + PaymentDetailsModifier: base_config_1.TYPE, + PaymentDetailsUpdate: base_config_1.TYPE, + PaymentItem: base_config_1.TYPE, + PaymentMethodChangeEventInit: base_config_1.TYPE, + PaymentMethodData: base_config_1.TYPE, + PaymentRequestUpdateEventInit: base_config_1.TYPE, + PaymentValidationErrors: base_config_1.TYPE, + Pbkdf2Params: base_config_1.TYPE, + PerformanceMarkOptions: base_config_1.TYPE, + PerformanceMeasureOptions: base_config_1.TYPE, + PerformanceObserverInit: base_config_1.TYPE, + PeriodicWaveConstraints: base_config_1.TYPE, + PeriodicWaveOptions: base_config_1.TYPE, + PermissionDescriptor: base_config_1.TYPE, + PictureInPictureEventInit: base_config_1.TYPE, + PlaneLayout: base_config_1.TYPE, + PointerEventInit: base_config_1.TYPE, + PopStateEventInit: base_config_1.TYPE, + PositionOptions: base_config_1.TYPE, + ProgressEventInit: base_config_1.TYPE, + PromiseRejectionEventInit: base_config_1.TYPE, + PropertyDefinition: base_config_1.TYPE, + PropertyIndexedKeyframes: base_config_1.TYPE, + PublicKeyCredentialCreationOptions: base_config_1.TYPE, + PublicKeyCredentialDescriptor: base_config_1.TYPE, + PublicKeyCredentialEntity: base_config_1.TYPE, + PublicKeyCredentialParameters: base_config_1.TYPE, + PublicKeyCredentialRequestOptions: base_config_1.TYPE, + PublicKeyCredentialRpEntity: base_config_1.TYPE, + PublicKeyCredentialUserEntity: base_config_1.TYPE, + PushSubscriptionJSON: base_config_1.TYPE, + PushSubscriptionOptionsInit: base_config_1.TYPE, + QueuingStrategy: base_config_1.TYPE, + QueuingStrategyInit: base_config_1.TYPE, + RTCAnswerOptions: base_config_1.TYPE, + RTCCertificateExpiration: base_config_1.TYPE, + RTCConfiguration: base_config_1.TYPE, + RTCDTMFToneChangeEventInit: base_config_1.TYPE, + RTCDataChannelEventInit: base_config_1.TYPE, + RTCDataChannelInit: base_config_1.TYPE, + RTCDtlsFingerprint: base_config_1.TYPE, + RTCEncodedAudioFrameMetadata: base_config_1.TYPE, + RTCEncodedVideoFrameMetadata: base_config_1.TYPE, + RTCErrorEventInit: base_config_1.TYPE, + RTCErrorInit: base_config_1.TYPE, + RTCIceCandidateInit: base_config_1.TYPE, + RTCIceCandidatePair: base_config_1.TYPE, + RTCIceCandidatePairStats: base_config_1.TYPE, + RTCIceServer: base_config_1.TYPE, + RTCInboundRtpStreamStats: base_config_1.TYPE, + RTCLocalSessionDescriptionInit: base_config_1.TYPE, + RTCOfferAnswerOptions: base_config_1.TYPE, + RTCOfferOptions: base_config_1.TYPE, + RTCOutboundRtpStreamStats: base_config_1.TYPE, + RTCPeerConnectionIceErrorEventInit: base_config_1.TYPE, + RTCPeerConnectionIceEventInit: base_config_1.TYPE, + RTCReceivedRtpStreamStats: base_config_1.TYPE, + RTCRtcpParameters: base_config_1.TYPE, + RTCRtpCapabilities: base_config_1.TYPE, + RTCRtpCodec: base_config_1.TYPE, + RTCRtpCodecCapability: base_config_1.TYPE, + RTCRtpCodecParameters: base_config_1.TYPE, + RTCRtpCodingParameters: base_config_1.TYPE, + RTCRtpContributingSource: base_config_1.TYPE, + RTCRtpEncodingParameters: base_config_1.TYPE, + RTCRtpHeaderExtensionCapability: base_config_1.TYPE, + RTCRtpHeaderExtensionParameters: base_config_1.TYPE, + RTCRtpParameters: base_config_1.TYPE, + RTCRtpReceiveParameters: base_config_1.TYPE, + RTCRtpSendParameters: base_config_1.TYPE, + RTCRtpStreamStats: base_config_1.TYPE, + RTCRtpSynchronizationSource: base_config_1.TYPE, + RTCRtpTransceiverInit: base_config_1.TYPE, + RTCSentRtpStreamStats: base_config_1.TYPE, + RTCSessionDescriptionInit: base_config_1.TYPE, + RTCStats: base_config_1.TYPE, + RTCTrackEventInit: base_config_1.TYPE, + RTCTransportStats: base_config_1.TYPE, + ReadableStreamGetReaderOptions: base_config_1.TYPE, + ReadableStreamReadDoneResult: base_config_1.TYPE, + ReadableStreamReadValueResult: base_config_1.TYPE, + ReadableWritablePair: base_config_1.TYPE, + RegistrationOptions: base_config_1.TYPE, + ReportingObserverOptions: base_config_1.TYPE, + RequestInit: base_config_1.TYPE, + ResizeObserverOptions: base_config_1.TYPE, + ResponseInit: base_config_1.TYPE, + RsaHashedImportParams: base_config_1.TYPE, + RsaHashedKeyAlgorithm: base_config_1.TYPE, + RsaHashedKeyGenParams: base_config_1.TYPE, + RsaKeyAlgorithm: base_config_1.TYPE, + RsaKeyGenParams: base_config_1.TYPE, + RsaOaepParams: base_config_1.TYPE, + RsaOtherPrimesInfo: base_config_1.TYPE, + RsaPssParams: base_config_1.TYPE, + SVGBoundingBoxOptions: base_config_1.TYPE, + ScrollIntoViewOptions: base_config_1.TYPE, + ScrollOptions: base_config_1.TYPE, + ScrollToOptions: base_config_1.TYPE, + SecurityPolicyViolationEventInit: base_config_1.TYPE, + ShadowRootInit: base_config_1.TYPE, + ShareData: base_config_1.TYPE, + SpeechSynthesisErrorEventInit: base_config_1.TYPE, + SpeechSynthesisEventInit: base_config_1.TYPE, + StaticRangeInit: base_config_1.TYPE, + StereoPannerOptions: base_config_1.TYPE, + StorageEstimate: base_config_1.TYPE, + StorageEventInit: base_config_1.TYPE, + StreamPipeOptions: base_config_1.TYPE, + StructuredSerializeOptions: base_config_1.TYPE, + SubmitEventInit: base_config_1.TYPE, + TextDecodeOptions: base_config_1.TYPE, + TextDecoderOptions: base_config_1.TYPE, + TextEncoderEncodeIntoResult: base_config_1.TYPE, + ToggleEventInit: base_config_1.TYPE, + TouchEventInit: base_config_1.TYPE, + TouchInit: base_config_1.TYPE, + TrackEventInit: base_config_1.TYPE, + Transformer: base_config_1.TYPE, + TransitionEventInit: base_config_1.TYPE, + UIEventInit: base_config_1.TYPE, + ULongRange: base_config_1.TYPE, + UnderlyingByteSource: base_config_1.TYPE, + UnderlyingDefaultSource: base_config_1.TYPE, + UnderlyingSink: base_config_1.TYPE, + UnderlyingSource: base_config_1.TYPE, + ValidityStateFlags: base_config_1.TYPE, + VideoColorSpaceInit: base_config_1.TYPE, + VideoConfiguration: base_config_1.TYPE, + VideoDecoderConfig: base_config_1.TYPE, + VideoDecoderInit: base_config_1.TYPE, + VideoDecoderSupport: base_config_1.TYPE, + VideoEncoderConfig: base_config_1.TYPE, + VideoEncoderEncodeOptions: base_config_1.TYPE, + VideoEncoderInit: base_config_1.TYPE, + VideoEncoderSupport: base_config_1.TYPE, + VideoFrameBufferInit: base_config_1.TYPE, + VideoFrameCallbackMetadata: base_config_1.TYPE, + VideoFrameCopyToOptions: base_config_1.TYPE, + VideoFrameInit: base_config_1.TYPE, + WaveShaperOptions: base_config_1.TYPE, + WebGLContextAttributes: base_config_1.TYPE, + WebGLContextEventInit: base_config_1.TYPE, + WebTransportCloseInfo: base_config_1.TYPE, + WebTransportErrorOptions: base_config_1.TYPE, + WebTransportHash: base_config_1.TYPE, + WebTransportOptions: base_config_1.TYPE, + WebTransportSendStreamOptions: base_config_1.TYPE, + WheelEventInit: base_config_1.TYPE, + WindowPostMessageOptions: base_config_1.TYPE, + WorkerOptions: base_config_1.TYPE, + WorkletOptions: base_config_1.TYPE, + WriteParams: base_config_1.TYPE, + NodeFilter: base_config_1.TYPE_VALUE, + XPathNSResolver: base_config_1.TYPE, + ANGLE_instanced_arrays: base_config_1.TYPE, + ARIAMixin: base_config_1.TYPE, + AbortController: base_config_1.TYPE_VALUE, + AbortSignalEventMap: base_config_1.TYPE, + AbortSignal: base_config_1.TYPE_VALUE, + AbstractRange: base_config_1.TYPE_VALUE, + AbstractWorkerEventMap: base_config_1.TYPE, + AbstractWorker: base_config_1.TYPE, + AnalyserNode: base_config_1.TYPE_VALUE, + Animatable: base_config_1.TYPE, + AnimationEventMap: base_config_1.TYPE, + Animation: base_config_1.TYPE_VALUE, + AnimationEffect: base_config_1.TYPE_VALUE, + AnimationEvent: base_config_1.TYPE_VALUE, + AnimationFrameProvider: base_config_1.TYPE, + AnimationPlaybackEvent: base_config_1.TYPE_VALUE, + AnimationTimeline: base_config_1.TYPE_VALUE, + Attr: base_config_1.TYPE_VALUE, + AudioBuffer: base_config_1.TYPE_VALUE, + AudioBufferSourceNode: base_config_1.TYPE_VALUE, + AudioContext: base_config_1.TYPE_VALUE, + AudioDestinationNode: base_config_1.TYPE_VALUE, + AudioListener: base_config_1.TYPE_VALUE, + AudioNode: base_config_1.TYPE_VALUE, + AudioParam: base_config_1.TYPE_VALUE, + AudioParamMap: base_config_1.TYPE_VALUE, + AudioProcessingEvent: base_config_1.TYPE_VALUE, + AudioScheduledSourceNodeEventMap: base_config_1.TYPE, + AudioScheduledSourceNode: base_config_1.TYPE_VALUE, + AudioWorklet: base_config_1.TYPE_VALUE, + AudioWorkletNodeEventMap: base_config_1.TYPE, + AudioWorkletNode: base_config_1.TYPE_VALUE, + AuthenticatorAssertionResponse: base_config_1.TYPE_VALUE, + AuthenticatorAttestationResponse: base_config_1.TYPE_VALUE, + AuthenticatorResponse: base_config_1.TYPE_VALUE, + BarProp: base_config_1.TYPE_VALUE, + BaseAudioContextEventMap: base_config_1.TYPE, + BaseAudioContext: base_config_1.TYPE_VALUE, + BeforeUnloadEvent: base_config_1.TYPE_VALUE, + BiquadFilterNode: base_config_1.TYPE_VALUE, + Blob: base_config_1.TYPE_VALUE, + BlobEvent: base_config_1.TYPE_VALUE, + Body: base_config_1.TYPE, + BroadcastChannelEventMap: base_config_1.TYPE, + BroadcastChannel: base_config_1.TYPE_VALUE, + ByteLengthQueuingStrategy: base_config_1.TYPE_VALUE, + CDATASection: base_config_1.TYPE_VALUE, + CSSAnimation: base_config_1.TYPE_VALUE, + CSSConditionRule: base_config_1.TYPE_VALUE, + CSSContainerRule: base_config_1.TYPE_VALUE, + CSSCounterStyleRule: base_config_1.TYPE_VALUE, + CSSFontFaceRule: base_config_1.TYPE_VALUE, + CSSFontFeatureValuesRule: base_config_1.TYPE_VALUE, + CSSFontPaletteValuesRule: base_config_1.TYPE_VALUE, + CSSGroupingRule: base_config_1.TYPE_VALUE, + CSSImageValue: base_config_1.TYPE_VALUE, + CSSImportRule: base_config_1.TYPE_VALUE, + CSSKeyframeRule: base_config_1.TYPE_VALUE, + CSSKeyframesRule: base_config_1.TYPE_VALUE, + CSSKeywordValue: base_config_1.TYPE_VALUE, + CSSLayerBlockRule: base_config_1.TYPE_VALUE, + CSSLayerStatementRule: base_config_1.TYPE_VALUE, + CSSMathClamp: base_config_1.TYPE_VALUE, + CSSMathInvert: base_config_1.TYPE_VALUE, + CSSMathMax: base_config_1.TYPE_VALUE, + CSSMathMin: base_config_1.TYPE_VALUE, + CSSMathNegate: base_config_1.TYPE_VALUE, + CSSMathProduct: base_config_1.TYPE_VALUE, + CSSMathSum: base_config_1.TYPE_VALUE, + CSSMathValue: base_config_1.TYPE_VALUE, + CSSMatrixComponent: base_config_1.TYPE_VALUE, + CSSMediaRule: base_config_1.TYPE_VALUE, + CSSNamespaceRule: base_config_1.TYPE_VALUE, + CSSNumericArray: base_config_1.TYPE_VALUE, + CSSNumericValue: base_config_1.TYPE_VALUE, + CSSPageRule: base_config_1.TYPE_VALUE, + CSSPerspective: base_config_1.TYPE_VALUE, + CSSPropertyRule: base_config_1.TYPE_VALUE, + CSSRotate: base_config_1.TYPE_VALUE, + CSSRule: base_config_1.TYPE_VALUE, + CSSRuleList: base_config_1.TYPE_VALUE, + CSSScale: base_config_1.TYPE_VALUE, + CSSSkew: base_config_1.TYPE_VALUE, + CSSSkewX: base_config_1.TYPE_VALUE, + CSSSkewY: base_config_1.TYPE_VALUE, + CSSStyleDeclaration: base_config_1.TYPE_VALUE, + CSSStyleRule: base_config_1.TYPE_VALUE, + CSSStyleSheet: base_config_1.TYPE_VALUE, + CSSStyleValue: base_config_1.TYPE_VALUE, + CSSSupportsRule: base_config_1.TYPE_VALUE, + CSSTransformComponent: base_config_1.TYPE_VALUE, + CSSTransformValue: base_config_1.TYPE_VALUE, + CSSTransition: base_config_1.TYPE_VALUE, + CSSTranslate: base_config_1.TYPE_VALUE, + CSSUnitValue: base_config_1.TYPE_VALUE, + CSSUnparsedValue: base_config_1.TYPE_VALUE, + CSSVariableReferenceValue: base_config_1.TYPE_VALUE, + Cache: base_config_1.TYPE_VALUE, + CacheStorage: base_config_1.TYPE_VALUE, + CanvasCaptureMediaStreamTrack: base_config_1.TYPE_VALUE, + CanvasCompositing: base_config_1.TYPE, + CanvasDrawImage: base_config_1.TYPE, + CanvasDrawPath: base_config_1.TYPE, + CanvasFillStrokeStyles: base_config_1.TYPE, + CanvasFilters: base_config_1.TYPE, + CanvasGradient: base_config_1.TYPE_VALUE, + CanvasImageData: base_config_1.TYPE, + CanvasImageSmoothing: base_config_1.TYPE, + CanvasPath: base_config_1.TYPE, + CanvasPathDrawingStyles: base_config_1.TYPE, + CanvasPattern: base_config_1.TYPE_VALUE, + CanvasRect: base_config_1.TYPE, + CanvasRenderingContext2D: base_config_1.TYPE_VALUE, + CanvasShadowStyles: base_config_1.TYPE, + CanvasState: base_config_1.TYPE, + CanvasText: base_config_1.TYPE, + CanvasTextDrawingStyles: base_config_1.TYPE, + CanvasTransform: base_config_1.TYPE, + CanvasUserInterface: base_config_1.TYPE, + ChannelMergerNode: base_config_1.TYPE_VALUE, + ChannelSplitterNode: base_config_1.TYPE_VALUE, + CharacterData: base_config_1.TYPE_VALUE, + ChildNode: base_config_1.TYPE, + ClientRect: base_config_1.TYPE, + Clipboard: base_config_1.TYPE_VALUE, + ClipboardEvent: base_config_1.TYPE_VALUE, + ClipboardItem: base_config_1.TYPE_VALUE, + CloseEvent: base_config_1.TYPE_VALUE, + Comment: base_config_1.TYPE_VALUE, + CompositionEvent: base_config_1.TYPE_VALUE, + CompressionStream: base_config_1.TYPE_VALUE, + ConstantSourceNode: base_config_1.TYPE_VALUE, + ConvolverNode: base_config_1.TYPE_VALUE, + CountQueuingStrategy: base_config_1.TYPE_VALUE, + Credential: base_config_1.TYPE_VALUE, + CredentialsContainer: base_config_1.TYPE_VALUE, + Crypto: base_config_1.TYPE_VALUE, + CryptoKey: base_config_1.TYPE_VALUE, + CustomElementRegistry: base_config_1.TYPE_VALUE, + CustomEvent: base_config_1.TYPE_VALUE, + DOMException: base_config_1.TYPE_VALUE, + DOMImplementation: base_config_1.TYPE_VALUE, + DOMMatrix: base_config_1.TYPE_VALUE, + SVGMatrix: base_config_1.TYPE_VALUE, + WebKitCSSMatrix: base_config_1.TYPE_VALUE, + DOMMatrixReadOnly: base_config_1.TYPE_VALUE, + DOMParser: base_config_1.TYPE_VALUE, + DOMPoint: base_config_1.TYPE_VALUE, + SVGPoint: base_config_1.TYPE_VALUE, + DOMPointReadOnly: base_config_1.TYPE_VALUE, + DOMQuad: base_config_1.TYPE_VALUE, + DOMRect: base_config_1.TYPE_VALUE, + SVGRect: base_config_1.TYPE_VALUE, + DOMRectList: base_config_1.TYPE_VALUE, + DOMRectReadOnly: base_config_1.TYPE_VALUE, + DOMStringList: base_config_1.TYPE_VALUE, + DOMStringMap: base_config_1.TYPE_VALUE, + DOMTokenList: base_config_1.TYPE_VALUE, + DataTransfer: base_config_1.TYPE_VALUE, + DataTransferItem: base_config_1.TYPE_VALUE, + DataTransferItemList: base_config_1.TYPE_VALUE, + DecompressionStream: base_config_1.TYPE_VALUE, + DelayNode: base_config_1.TYPE_VALUE, + DeviceMotionEvent: base_config_1.TYPE_VALUE, + DeviceMotionEventAcceleration: base_config_1.TYPE, + DeviceMotionEventRotationRate: base_config_1.TYPE, + DeviceOrientationEvent: base_config_1.TYPE_VALUE, + DocumentEventMap: base_config_1.TYPE, + Document: base_config_1.TYPE_VALUE, + DocumentFragment: base_config_1.TYPE_VALUE, + DocumentOrShadowRoot: base_config_1.TYPE, + DocumentTimeline: base_config_1.TYPE_VALUE, + DocumentType: base_config_1.TYPE_VALUE, + DragEvent: base_config_1.TYPE_VALUE, + DynamicsCompressorNode: base_config_1.TYPE_VALUE, + EXT_blend_minmax: base_config_1.TYPE, + EXT_color_buffer_float: base_config_1.TYPE, + EXT_color_buffer_half_float: base_config_1.TYPE, + EXT_float_blend: base_config_1.TYPE, + EXT_frag_depth: base_config_1.TYPE, + EXT_sRGB: base_config_1.TYPE, + EXT_shader_texture_lod: base_config_1.TYPE, + EXT_texture_compression_bptc: base_config_1.TYPE, + EXT_texture_compression_rgtc: base_config_1.TYPE, + EXT_texture_filter_anisotropic: base_config_1.TYPE, + EXT_texture_norm16: base_config_1.TYPE, + ElementEventMap: base_config_1.TYPE, + Element: base_config_1.TYPE_VALUE, + ElementCSSInlineStyle: base_config_1.TYPE, + ElementContentEditable: base_config_1.TYPE, + ElementInternals: base_config_1.TYPE_VALUE, + EncodedVideoChunk: base_config_1.TYPE_VALUE, + ErrorEvent: base_config_1.TYPE_VALUE, + Event: base_config_1.TYPE_VALUE, + EventCounts: base_config_1.TYPE_VALUE, + EventListener: base_config_1.TYPE, + EventListenerObject: base_config_1.TYPE, + EventSourceEventMap: base_config_1.TYPE, + EventSource: base_config_1.TYPE_VALUE, + EventTarget: base_config_1.TYPE_VALUE, + External: base_config_1.TYPE_VALUE, + File: base_config_1.TYPE_VALUE, + FileList: base_config_1.TYPE_VALUE, + FileReaderEventMap: base_config_1.TYPE, + FileReader: base_config_1.TYPE_VALUE, + FileSystem: base_config_1.TYPE_VALUE, + FileSystemDirectoryEntry: base_config_1.TYPE_VALUE, + FileSystemDirectoryHandle: base_config_1.TYPE_VALUE, + FileSystemDirectoryReader: base_config_1.TYPE_VALUE, + FileSystemEntry: base_config_1.TYPE_VALUE, + FileSystemFileEntry: base_config_1.TYPE_VALUE, + FileSystemFileHandle: base_config_1.TYPE_VALUE, + FileSystemHandle: base_config_1.TYPE_VALUE, + FileSystemWritableFileStream: base_config_1.TYPE_VALUE, + FocusEvent: base_config_1.TYPE_VALUE, + FontFace: base_config_1.TYPE_VALUE, + FontFaceSetEventMap: base_config_1.TYPE, + FontFaceSet: base_config_1.TYPE_VALUE, + FontFaceSetLoadEvent: base_config_1.TYPE_VALUE, + FontFaceSource: base_config_1.TYPE, + FormData: base_config_1.TYPE_VALUE, + FormDataEvent: base_config_1.TYPE_VALUE, + GainNode: base_config_1.TYPE_VALUE, + Gamepad: base_config_1.TYPE_VALUE, + GamepadButton: base_config_1.TYPE_VALUE, + GamepadEvent: base_config_1.TYPE_VALUE, + GamepadHapticActuator: base_config_1.TYPE_VALUE, + GenericTransformStream: base_config_1.TYPE, + Geolocation: base_config_1.TYPE_VALUE, + GeolocationCoordinates: base_config_1.TYPE_VALUE, + GeolocationPosition: base_config_1.TYPE_VALUE, + GeolocationPositionError: base_config_1.TYPE_VALUE, + GlobalEventHandlersEventMap: base_config_1.TYPE, + GlobalEventHandlers: base_config_1.TYPE, + HTMLAllCollection: base_config_1.TYPE_VALUE, + HTMLAnchorElement: base_config_1.TYPE_VALUE, + HTMLAreaElement: base_config_1.TYPE_VALUE, + HTMLAudioElement: base_config_1.TYPE_VALUE, + HTMLBRElement: base_config_1.TYPE_VALUE, + HTMLBaseElement: base_config_1.TYPE_VALUE, + HTMLBodyElementEventMap: base_config_1.TYPE, + HTMLBodyElement: base_config_1.TYPE_VALUE, + HTMLButtonElement: base_config_1.TYPE_VALUE, + HTMLCanvasElement: base_config_1.TYPE_VALUE, + HTMLCollectionBase: base_config_1.TYPE, + HTMLCollection: base_config_1.TYPE_VALUE, + HTMLCollectionOf: base_config_1.TYPE, + HTMLDListElement: base_config_1.TYPE_VALUE, + HTMLDataElement: base_config_1.TYPE_VALUE, + HTMLDataListElement: base_config_1.TYPE_VALUE, + HTMLDetailsElement: base_config_1.TYPE_VALUE, + HTMLDialogElement: base_config_1.TYPE_VALUE, + HTMLDirectoryElement: base_config_1.TYPE_VALUE, + HTMLDivElement: base_config_1.TYPE_VALUE, + HTMLDocument: base_config_1.TYPE_VALUE, + HTMLElementEventMap: base_config_1.TYPE, + HTMLElement: base_config_1.TYPE_VALUE, + HTMLEmbedElement: base_config_1.TYPE_VALUE, + HTMLFieldSetElement: base_config_1.TYPE_VALUE, + HTMLFontElement: base_config_1.TYPE_VALUE, + HTMLFormControlsCollection: base_config_1.TYPE_VALUE, + HTMLFormElement: base_config_1.TYPE_VALUE, + HTMLFrameElement: base_config_1.TYPE_VALUE, + HTMLFrameSetElementEventMap: base_config_1.TYPE, + HTMLFrameSetElement: base_config_1.TYPE_VALUE, + HTMLHRElement: base_config_1.TYPE_VALUE, + HTMLHeadElement: base_config_1.TYPE_VALUE, + HTMLHeadingElement: base_config_1.TYPE_VALUE, + HTMLHtmlElement: base_config_1.TYPE_VALUE, + HTMLHyperlinkElementUtils: base_config_1.TYPE, + HTMLIFrameElement: base_config_1.TYPE_VALUE, + HTMLImageElement: base_config_1.TYPE_VALUE, + HTMLInputElement: base_config_1.TYPE_VALUE, + HTMLLIElement: base_config_1.TYPE_VALUE, + HTMLLabelElement: base_config_1.TYPE_VALUE, + HTMLLegendElement: base_config_1.TYPE_VALUE, + HTMLLinkElement: base_config_1.TYPE_VALUE, + HTMLMapElement: base_config_1.TYPE_VALUE, + HTMLMarqueeElement: base_config_1.TYPE_VALUE, + HTMLMediaElementEventMap: base_config_1.TYPE, + HTMLMediaElement: base_config_1.TYPE_VALUE, + HTMLMenuElement: base_config_1.TYPE_VALUE, + HTMLMetaElement: base_config_1.TYPE_VALUE, + HTMLMeterElement: base_config_1.TYPE_VALUE, + HTMLModElement: base_config_1.TYPE_VALUE, + HTMLOListElement: base_config_1.TYPE_VALUE, + HTMLObjectElement: base_config_1.TYPE_VALUE, + HTMLOptGroupElement: base_config_1.TYPE_VALUE, + HTMLOptionElement: base_config_1.TYPE_VALUE, + HTMLOptionsCollection: base_config_1.TYPE_VALUE, + HTMLOrSVGElement: base_config_1.TYPE, + HTMLOutputElement: base_config_1.TYPE_VALUE, + HTMLParagraphElement: base_config_1.TYPE_VALUE, + HTMLParamElement: base_config_1.TYPE_VALUE, + HTMLPictureElement: base_config_1.TYPE_VALUE, + HTMLPreElement: base_config_1.TYPE_VALUE, + HTMLProgressElement: base_config_1.TYPE_VALUE, + HTMLQuoteElement: base_config_1.TYPE_VALUE, + HTMLScriptElement: base_config_1.TYPE_VALUE, + HTMLSelectElement: base_config_1.TYPE_VALUE, + HTMLSlotElement: base_config_1.TYPE_VALUE, + HTMLSourceElement: base_config_1.TYPE_VALUE, + HTMLSpanElement: base_config_1.TYPE_VALUE, + HTMLStyleElement: base_config_1.TYPE_VALUE, + HTMLTableCaptionElement: base_config_1.TYPE_VALUE, + HTMLTableCellElement: base_config_1.TYPE_VALUE, + HTMLTableColElement: base_config_1.TYPE_VALUE, + HTMLTableDataCellElement: base_config_1.TYPE, + HTMLTableElement: base_config_1.TYPE_VALUE, + HTMLTableHeaderCellElement: base_config_1.TYPE, + HTMLTableRowElement: base_config_1.TYPE_VALUE, + HTMLTableSectionElement: base_config_1.TYPE_VALUE, + HTMLTemplateElement: base_config_1.TYPE_VALUE, + HTMLTextAreaElement: base_config_1.TYPE_VALUE, + HTMLTimeElement: base_config_1.TYPE_VALUE, + HTMLTitleElement: base_config_1.TYPE_VALUE, + HTMLTrackElement: base_config_1.TYPE_VALUE, + HTMLUListElement: base_config_1.TYPE_VALUE, + HTMLUnknownElement: base_config_1.TYPE_VALUE, + HTMLVideoElementEventMap: base_config_1.TYPE, + HTMLVideoElement: base_config_1.TYPE_VALUE, + HashChangeEvent: base_config_1.TYPE_VALUE, + Headers: base_config_1.TYPE_VALUE, + History: base_config_1.TYPE_VALUE, + IDBCursor: base_config_1.TYPE_VALUE, + IDBCursorWithValue: base_config_1.TYPE_VALUE, + IDBDatabaseEventMap: base_config_1.TYPE, + IDBDatabase: base_config_1.TYPE_VALUE, + IDBFactory: base_config_1.TYPE_VALUE, + IDBIndex: base_config_1.TYPE_VALUE, + IDBKeyRange: base_config_1.TYPE_VALUE, + IDBObjectStore: base_config_1.TYPE_VALUE, + IDBOpenDBRequestEventMap: base_config_1.TYPE, + IDBOpenDBRequest: base_config_1.TYPE_VALUE, + IDBRequestEventMap: base_config_1.TYPE, + IDBRequest: base_config_1.TYPE_VALUE, + IDBTransactionEventMap: base_config_1.TYPE, + IDBTransaction: base_config_1.TYPE_VALUE, + IDBVersionChangeEvent: base_config_1.TYPE_VALUE, + IIRFilterNode: base_config_1.TYPE_VALUE, + IdleDeadline: base_config_1.TYPE_VALUE, + ImageBitmap: base_config_1.TYPE_VALUE, + ImageBitmapRenderingContext: base_config_1.TYPE_VALUE, + ImageData: base_config_1.TYPE_VALUE, + InnerHTML: base_config_1.TYPE, + InputDeviceInfo: base_config_1.TYPE_VALUE, + InputEvent: base_config_1.TYPE_VALUE, + IntersectionObserver: base_config_1.TYPE_VALUE, + IntersectionObserverEntry: base_config_1.TYPE_VALUE, + KHR_parallel_shader_compile: base_config_1.TYPE, + KeyboardEvent: base_config_1.TYPE_VALUE, + KeyframeEffect: base_config_1.TYPE_VALUE, + LinkStyle: base_config_1.TYPE, + Location: base_config_1.TYPE_VALUE, + Lock: base_config_1.TYPE_VALUE, + LockManager: base_config_1.TYPE_VALUE, + MIDIAccessEventMap: base_config_1.TYPE, + MIDIAccess: base_config_1.TYPE_VALUE, + MIDIConnectionEvent: base_config_1.TYPE_VALUE, + MIDIInputEventMap: base_config_1.TYPE, + MIDIInput: base_config_1.TYPE_VALUE, + MIDIInputMap: base_config_1.TYPE_VALUE, + MIDIMessageEvent: base_config_1.TYPE_VALUE, + MIDIOutput: base_config_1.TYPE_VALUE, + MIDIOutputMap: base_config_1.TYPE_VALUE, + MIDIPortEventMap: base_config_1.TYPE, + MIDIPort: base_config_1.TYPE_VALUE, + MathMLElementEventMap: base_config_1.TYPE, + MathMLElement: base_config_1.TYPE_VALUE, + MediaCapabilities: base_config_1.TYPE_VALUE, + MediaDeviceInfo: base_config_1.TYPE_VALUE, + MediaDevicesEventMap: base_config_1.TYPE, + MediaDevices: base_config_1.TYPE_VALUE, + MediaElementAudioSourceNode: base_config_1.TYPE_VALUE, + MediaEncryptedEvent: base_config_1.TYPE_VALUE, + MediaError: base_config_1.TYPE_VALUE, + MediaKeyMessageEvent: base_config_1.TYPE_VALUE, + MediaKeySessionEventMap: base_config_1.TYPE, + MediaKeySession: base_config_1.TYPE_VALUE, + MediaKeyStatusMap: base_config_1.TYPE_VALUE, + MediaKeySystemAccess: base_config_1.TYPE_VALUE, + MediaKeys: base_config_1.TYPE_VALUE, + MediaList: base_config_1.TYPE_VALUE, + MediaMetadata: base_config_1.TYPE_VALUE, + MediaQueryListEventMap: base_config_1.TYPE, + MediaQueryList: base_config_1.TYPE_VALUE, + MediaQueryListEvent: base_config_1.TYPE_VALUE, + MediaRecorderEventMap: base_config_1.TYPE, + MediaRecorder: base_config_1.TYPE_VALUE, + MediaSession: base_config_1.TYPE_VALUE, + MediaSourceEventMap: base_config_1.TYPE, + MediaSource: base_config_1.TYPE_VALUE, + MediaStreamEventMap: base_config_1.TYPE, + MediaStream: base_config_1.TYPE_VALUE, + MediaStreamAudioDestinationNode: base_config_1.TYPE_VALUE, + MediaStreamAudioSourceNode: base_config_1.TYPE_VALUE, + MediaStreamTrackEventMap: base_config_1.TYPE, + MediaStreamTrack: base_config_1.TYPE_VALUE, + MediaStreamTrackEvent: base_config_1.TYPE_VALUE, + MessageChannel: base_config_1.TYPE_VALUE, + MessageEvent: base_config_1.TYPE_VALUE, + MessagePortEventMap: base_config_1.TYPE, + MessagePort: base_config_1.TYPE_VALUE, + MimeType: base_config_1.TYPE_VALUE, + MimeTypeArray: base_config_1.TYPE_VALUE, + MouseEvent: base_config_1.TYPE_VALUE, + MutationEvent: base_config_1.TYPE_VALUE, + MutationObserver: base_config_1.TYPE_VALUE, + MutationRecord: base_config_1.TYPE_VALUE, + NamedNodeMap: base_config_1.TYPE_VALUE, + NavigationPreloadManager: base_config_1.TYPE_VALUE, + Navigator: base_config_1.TYPE_VALUE, + NavigatorAutomationInformation: base_config_1.TYPE, + NavigatorBadge: base_config_1.TYPE, + NavigatorConcurrentHardware: base_config_1.TYPE, + NavigatorContentUtils: base_config_1.TYPE, + NavigatorCookies: base_config_1.TYPE, + NavigatorID: base_config_1.TYPE, + NavigatorLanguage: base_config_1.TYPE, + NavigatorLocks: base_config_1.TYPE, + NavigatorOnLine: base_config_1.TYPE, + NavigatorPlugins: base_config_1.TYPE, + NavigatorStorage: base_config_1.TYPE, + Node: base_config_1.TYPE_VALUE, + NodeIterator: base_config_1.TYPE_VALUE, + NodeList: base_config_1.TYPE_VALUE, + NodeListOf: base_config_1.TYPE, + NonDocumentTypeChildNode: base_config_1.TYPE, + NonElementParentNode: base_config_1.TYPE, + NotificationEventMap: base_config_1.TYPE, + Notification: base_config_1.TYPE_VALUE, + OES_draw_buffers_indexed: base_config_1.TYPE, + OES_element_index_uint: base_config_1.TYPE, + OES_fbo_render_mipmap: base_config_1.TYPE, + OES_standard_derivatives: base_config_1.TYPE, + OES_texture_float: base_config_1.TYPE, + OES_texture_float_linear: base_config_1.TYPE, + OES_texture_half_float: base_config_1.TYPE, + OES_texture_half_float_linear: base_config_1.TYPE, + OES_vertex_array_object: base_config_1.TYPE, + OVR_multiview2: base_config_1.TYPE, + OfflineAudioCompletionEvent: base_config_1.TYPE_VALUE, + OfflineAudioContextEventMap: base_config_1.TYPE, + OfflineAudioContext: base_config_1.TYPE_VALUE, + OffscreenCanvasEventMap: base_config_1.TYPE, + OffscreenCanvas: base_config_1.TYPE_VALUE, + OffscreenCanvasRenderingContext2D: base_config_1.TYPE_VALUE, + OscillatorNode: base_config_1.TYPE_VALUE, + OverconstrainedError: base_config_1.TYPE_VALUE, + PageTransitionEvent: base_config_1.TYPE_VALUE, + PannerNode: base_config_1.TYPE_VALUE, + ParentNode: base_config_1.TYPE, + Path2D: base_config_1.TYPE_VALUE, + PaymentMethodChangeEvent: base_config_1.TYPE_VALUE, + PaymentRequestEventMap: base_config_1.TYPE, + PaymentRequest: base_config_1.TYPE_VALUE, + PaymentRequestUpdateEvent: base_config_1.TYPE_VALUE, + PaymentResponse: base_config_1.TYPE_VALUE, + PerformanceEventMap: base_config_1.TYPE, + Performance: base_config_1.TYPE_VALUE, + PerformanceEntry: base_config_1.TYPE_VALUE, + PerformanceEventTiming: base_config_1.TYPE_VALUE, + PerformanceMark: base_config_1.TYPE_VALUE, + PerformanceMeasure: base_config_1.TYPE_VALUE, + PerformanceNavigation: base_config_1.TYPE_VALUE, + PerformanceNavigationTiming: base_config_1.TYPE_VALUE, + PerformanceObserver: base_config_1.TYPE_VALUE, + PerformanceObserverEntryList: base_config_1.TYPE_VALUE, + PerformancePaintTiming: base_config_1.TYPE_VALUE, + PerformanceResourceTiming: base_config_1.TYPE_VALUE, + PerformanceServerTiming: base_config_1.TYPE_VALUE, + PerformanceTiming: base_config_1.TYPE_VALUE, + PeriodicWave: base_config_1.TYPE_VALUE, + PermissionStatusEventMap: base_config_1.TYPE, + PermissionStatus: base_config_1.TYPE_VALUE, + Permissions: base_config_1.TYPE_VALUE, + PictureInPictureEvent: base_config_1.TYPE_VALUE, + PictureInPictureWindowEventMap: base_config_1.TYPE, + PictureInPictureWindow: base_config_1.TYPE_VALUE, + Plugin: base_config_1.TYPE_VALUE, + PluginArray: base_config_1.TYPE_VALUE, + PointerEvent: base_config_1.TYPE_VALUE, + PopStateEvent: base_config_1.TYPE_VALUE, + PopoverInvokerElement: base_config_1.TYPE, + ProcessingInstruction: base_config_1.TYPE_VALUE, + ProgressEvent: base_config_1.TYPE_VALUE, + PromiseRejectionEvent: base_config_1.TYPE_VALUE, + PublicKeyCredential: base_config_1.TYPE_VALUE, + PushManager: base_config_1.TYPE_VALUE, + PushSubscription: base_config_1.TYPE_VALUE, + PushSubscriptionOptions: base_config_1.TYPE_VALUE, + RTCCertificate: base_config_1.TYPE_VALUE, + RTCDTMFSenderEventMap: base_config_1.TYPE, + RTCDTMFSender: base_config_1.TYPE_VALUE, + RTCDTMFToneChangeEvent: base_config_1.TYPE_VALUE, + RTCDataChannelEventMap: base_config_1.TYPE, + RTCDataChannel: base_config_1.TYPE_VALUE, + RTCDataChannelEvent: base_config_1.TYPE_VALUE, + RTCDtlsTransportEventMap: base_config_1.TYPE, + RTCDtlsTransport: base_config_1.TYPE_VALUE, + RTCEncodedAudioFrame: base_config_1.TYPE_VALUE, + RTCEncodedVideoFrame: base_config_1.TYPE_VALUE, + RTCError: base_config_1.TYPE_VALUE, + RTCErrorEvent: base_config_1.TYPE_VALUE, + RTCIceCandidate: base_config_1.TYPE_VALUE, + RTCIceTransportEventMap: base_config_1.TYPE, + RTCIceTransport: base_config_1.TYPE_VALUE, + RTCPeerConnectionEventMap: base_config_1.TYPE, + RTCPeerConnection: base_config_1.TYPE_VALUE, + RTCPeerConnectionIceErrorEvent: base_config_1.TYPE_VALUE, + RTCPeerConnectionIceEvent: base_config_1.TYPE_VALUE, + RTCRtpReceiver: base_config_1.TYPE_VALUE, + RTCRtpSender: base_config_1.TYPE_VALUE, + RTCRtpTransceiver: base_config_1.TYPE_VALUE, + RTCSctpTransportEventMap: base_config_1.TYPE, + RTCSctpTransport: base_config_1.TYPE_VALUE, + RTCSessionDescription: base_config_1.TYPE_VALUE, + RTCStatsReport: base_config_1.TYPE_VALUE, + RTCTrackEvent: base_config_1.TYPE_VALUE, + RadioNodeList: base_config_1.TYPE_VALUE, + Range: base_config_1.TYPE_VALUE, + ReadableByteStreamController: base_config_1.TYPE_VALUE, + ReadableStream: base_config_1.TYPE_VALUE, + ReadableStreamBYOBReader: base_config_1.TYPE_VALUE, + ReadableStreamBYOBRequest: base_config_1.TYPE_VALUE, + ReadableStreamDefaultController: base_config_1.TYPE_VALUE, + ReadableStreamDefaultReader: base_config_1.TYPE_VALUE, + ReadableStreamGenericReader: base_config_1.TYPE, + RemotePlaybackEventMap: base_config_1.TYPE, + RemotePlayback: base_config_1.TYPE_VALUE, + Report: base_config_1.TYPE_VALUE, + ReportBody: base_config_1.TYPE_VALUE, + ReportingObserver: base_config_1.TYPE_VALUE, + Request: base_config_1.TYPE_VALUE, + ResizeObserver: base_config_1.TYPE_VALUE, + ResizeObserverEntry: base_config_1.TYPE_VALUE, + ResizeObserverSize: base_config_1.TYPE_VALUE, + Response: base_config_1.TYPE_VALUE, + SVGAElement: base_config_1.TYPE_VALUE, + SVGAngle: base_config_1.TYPE_VALUE, + SVGAnimateElement: base_config_1.TYPE_VALUE, + SVGAnimateMotionElement: base_config_1.TYPE_VALUE, + SVGAnimateTransformElement: base_config_1.TYPE_VALUE, + SVGAnimatedAngle: base_config_1.TYPE_VALUE, + SVGAnimatedBoolean: base_config_1.TYPE_VALUE, + SVGAnimatedEnumeration: base_config_1.TYPE_VALUE, + SVGAnimatedInteger: base_config_1.TYPE_VALUE, + SVGAnimatedLength: base_config_1.TYPE_VALUE, + SVGAnimatedLengthList: base_config_1.TYPE_VALUE, + SVGAnimatedNumber: base_config_1.TYPE_VALUE, + SVGAnimatedNumberList: base_config_1.TYPE_VALUE, + SVGAnimatedPoints: base_config_1.TYPE, + SVGAnimatedPreserveAspectRatio: base_config_1.TYPE_VALUE, + SVGAnimatedRect: base_config_1.TYPE_VALUE, + SVGAnimatedString: base_config_1.TYPE_VALUE, + SVGAnimatedTransformList: base_config_1.TYPE_VALUE, + SVGAnimationElement: base_config_1.TYPE_VALUE, + SVGCircleElement: base_config_1.TYPE_VALUE, + SVGClipPathElement: base_config_1.TYPE_VALUE, + SVGComponentTransferFunctionElement: base_config_1.TYPE_VALUE, + SVGDefsElement: base_config_1.TYPE_VALUE, + SVGDescElement: base_config_1.TYPE_VALUE, + SVGElementEventMap: base_config_1.TYPE, + SVGElement: base_config_1.TYPE_VALUE, + SVGEllipseElement: base_config_1.TYPE_VALUE, + SVGFEBlendElement: base_config_1.TYPE_VALUE, + SVGFEColorMatrixElement: base_config_1.TYPE_VALUE, + SVGFEComponentTransferElement: base_config_1.TYPE_VALUE, + SVGFECompositeElement: base_config_1.TYPE_VALUE, + SVGFEConvolveMatrixElement: base_config_1.TYPE_VALUE, + SVGFEDiffuseLightingElement: base_config_1.TYPE_VALUE, + SVGFEDisplacementMapElement: base_config_1.TYPE_VALUE, + SVGFEDistantLightElement: base_config_1.TYPE_VALUE, + SVGFEDropShadowElement: base_config_1.TYPE_VALUE, + SVGFEFloodElement: base_config_1.TYPE_VALUE, + SVGFEFuncAElement: base_config_1.TYPE_VALUE, + SVGFEFuncBElement: base_config_1.TYPE_VALUE, + SVGFEFuncGElement: base_config_1.TYPE_VALUE, + SVGFEFuncRElement: base_config_1.TYPE_VALUE, + SVGFEGaussianBlurElement: base_config_1.TYPE_VALUE, + SVGFEImageElement: base_config_1.TYPE_VALUE, + SVGFEMergeElement: base_config_1.TYPE_VALUE, + SVGFEMergeNodeElement: base_config_1.TYPE_VALUE, + SVGFEMorphologyElement: base_config_1.TYPE_VALUE, + SVGFEOffsetElement: base_config_1.TYPE_VALUE, + SVGFEPointLightElement: base_config_1.TYPE_VALUE, + SVGFESpecularLightingElement: base_config_1.TYPE_VALUE, + SVGFESpotLightElement: base_config_1.TYPE_VALUE, + SVGFETileElement: base_config_1.TYPE_VALUE, + SVGFETurbulenceElement: base_config_1.TYPE_VALUE, + SVGFilterElement: base_config_1.TYPE_VALUE, + SVGFilterPrimitiveStandardAttributes: base_config_1.TYPE, + SVGFitToViewBox: base_config_1.TYPE, + SVGForeignObjectElement: base_config_1.TYPE_VALUE, + SVGGElement: base_config_1.TYPE_VALUE, + SVGGeometryElement: base_config_1.TYPE_VALUE, + SVGGradientElement: base_config_1.TYPE_VALUE, + SVGGraphicsElement: base_config_1.TYPE_VALUE, + SVGImageElement: base_config_1.TYPE_VALUE, + SVGLength: base_config_1.TYPE_VALUE, + SVGLengthList: base_config_1.TYPE_VALUE, + SVGLineElement: base_config_1.TYPE_VALUE, + SVGLinearGradientElement: base_config_1.TYPE_VALUE, + SVGMPathElement: base_config_1.TYPE_VALUE, + SVGMarkerElement: base_config_1.TYPE_VALUE, + SVGMaskElement: base_config_1.TYPE_VALUE, + SVGMetadataElement: base_config_1.TYPE_VALUE, + SVGNumber: base_config_1.TYPE_VALUE, + SVGNumberList: base_config_1.TYPE_VALUE, + SVGPathElement: base_config_1.TYPE_VALUE, + SVGPatternElement: base_config_1.TYPE_VALUE, + SVGPointList: base_config_1.TYPE_VALUE, + SVGPolygonElement: base_config_1.TYPE_VALUE, + SVGPolylineElement: base_config_1.TYPE_VALUE, + SVGPreserveAspectRatio: base_config_1.TYPE_VALUE, + SVGRadialGradientElement: base_config_1.TYPE_VALUE, + SVGRectElement: base_config_1.TYPE_VALUE, + SVGSVGElementEventMap: base_config_1.TYPE, + SVGSVGElement: base_config_1.TYPE_VALUE, + SVGScriptElement: base_config_1.TYPE_VALUE, + SVGSetElement: base_config_1.TYPE_VALUE, + SVGStopElement: base_config_1.TYPE_VALUE, + SVGStringList: base_config_1.TYPE_VALUE, + SVGStyleElement: base_config_1.TYPE_VALUE, + SVGSwitchElement: base_config_1.TYPE_VALUE, + SVGSymbolElement: base_config_1.TYPE_VALUE, + SVGTSpanElement: base_config_1.TYPE_VALUE, + SVGTests: base_config_1.TYPE, + SVGTextContentElement: base_config_1.TYPE_VALUE, + SVGTextElement: base_config_1.TYPE_VALUE, + SVGTextPathElement: base_config_1.TYPE_VALUE, + SVGTextPositioningElement: base_config_1.TYPE_VALUE, + SVGTitleElement: base_config_1.TYPE_VALUE, + SVGTransform: base_config_1.TYPE_VALUE, + SVGTransformList: base_config_1.TYPE_VALUE, + SVGURIReference: base_config_1.TYPE, + SVGUnitTypes: base_config_1.TYPE_VALUE, + SVGUseElement: base_config_1.TYPE_VALUE, + SVGViewElement: base_config_1.TYPE_VALUE, + Screen: base_config_1.TYPE_VALUE, + ScreenOrientationEventMap: base_config_1.TYPE, + ScreenOrientation: base_config_1.TYPE_VALUE, + ScriptProcessorNodeEventMap: base_config_1.TYPE, + ScriptProcessorNode: base_config_1.TYPE_VALUE, + SecurityPolicyViolationEvent: base_config_1.TYPE_VALUE, + Selection: base_config_1.TYPE_VALUE, + ServiceWorkerEventMap: base_config_1.TYPE, + ServiceWorker: base_config_1.TYPE_VALUE, + ServiceWorkerContainerEventMap: base_config_1.TYPE, + ServiceWorkerContainer: base_config_1.TYPE_VALUE, + ServiceWorkerRegistrationEventMap: base_config_1.TYPE, + ServiceWorkerRegistration: base_config_1.TYPE_VALUE, + ShadowRootEventMap: base_config_1.TYPE, + ShadowRoot: base_config_1.TYPE_VALUE, + SharedWorker: base_config_1.TYPE_VALUE, + Slottable: base_config_1.TYPE, + SourceBufferEventMap: base_config_1.TYPE, + SourceBuffer: base_config_1.TYPE_VALUE, + SourceBufferListEventMap: base_config_1.TYPE, + SourceBufferList: base_config_1.TYPE_VALUE, + SpeechRecognitionAlternative: base_config_1.TYPE_VALUE, + SpeechRecognitionResult: base_config_1.TYPE_VALUE, + SpeechRecognitionResultList: base_config_1.TYPE_VALUE, + SpeechSynthesisEventMap: base_config_1.TYPE, + SpeechSynthesis: base_config_1.TYPE_VALUE, + SpeechSynthesisErrorEvent: base_config_1.TYPE_VALUE, + SpeechSynthesisEvent: base_config_1.TYPE_VALUE, + SpeechSynthesisUtteranceEventMap: base_config_1.TYPE, + SpeechSynthesisUtterance: base_config_1.TYPE_VALUE, + SpeechSynthesisVoice: base_config_1.TYPE_VALUE, + StaticRange: base_config_1.TYPE_VALUE, + StereoPannerNode: base_config_1.TYPE_VALUE, + Storage: base_config_1.TYPE_VALUE, + StorageEvent: base_config_1.TYPE_VALUE, + StorageManager: base_config_1.TYPE_VALUE, + StyleMedia: base_config_1.TYPE, + StylePropertyMap: base_config_1.TYPE_VALUE, + StylePropertyMapReadOnly: base_config_1.TYPE_VALUE, + StyleSheet: base_config_1.TYPE_VALUE, + StyleSheetList: base_config_1.TYPE_VALUE, + SubmitEvent: base_config_1.TYPE_VALUE, + SubtleCrypto: base_config_1.TYPE_VALUE, + Text: base_config_1.TYPE_VALUE, + TextDecoder: base_config_1.TYPE_VALUE, + TextDecoderCommon: base_config_1.TYPE, + TextDecoderStream: base_config_1.TYPE_VALUE, + TextEncoder: base_config_1.TYPE_VALUE, + TextEncoderCommon: base_config_1.TYPE, + TextEncoderStream: base_config_1.TYPE_VALUE, + TextMetrics: base_config_1.TYPE_VALUE, + TextTrackEventMap: base_config_1.TYPE, + TextTrack: base_config_1.TYPE_VALUE, + TextTrackCueEventMap: base_config_1.TYPE, + TextTrackCue: base_config_1.TYPE_VALUE, + TextTrackCueList: base_config_1.TYPE_VALUE, + TextTrackListEventMap: base_config_1.TYPE, + TextTrackList: base_config_1.TYPE_VALUE, + TimeRanges: base_config_1.TYPE_VALUE, + ToggleEvent: base_config_1.TYPE_VALUE, + Touch: base_config_1.TYPE_VALUE, + TouchEvent: base_config_1.TYPE_VALUE, + TouchList: base_config_1.TYPE_VALUE, + TrackEvent: base_config_1.TYPE_VALUE, + TransformStream: base_config_1.TYPE_VALUE, + TransformStreamDefaultController: base_config_1.TYPE_VALUE, + TransitionEvent: base_config_1.TYPE_VALUE, + TreeWalker: base_config_1.TYPE_VALUE, + UIEvent: base_config_1.TYPE_VALUE, + URL: base_config_1.TYPE_VALUE, + webkitURL: base_config_1.TYPE_VALUE, + URLSearchParams: base_config_1.TYPE_VALUE, + UserActivation: base_config_1.TYPE_VALUE, + VTTCue: base_config_1.TYPE_VALUE, + VTTRegion: base_config_1.TYPE_VALUE, + ValidityState: base_config_1.TYPE_VALUE, + VideoColorSpace: base_config_1.TYPE_VALUE, + VideoDecoderEventMap: base_config_1.TYPE, + VideoDecoder: base_config_1.TYPE_VALUE, + VideoEncoderEventMap: base_config_1.TYPE, + VideoEncoder: base_config_1.TYPE_VALUE, + VideoFrame: base_config_1.TYPE_VALUE, + VideoPlaybackQuality: base_config_1.TYPE_VALUE, + VisualViewportEventMap: base_config_1.TYPE, + VisualViewport: base_config_1.TYPE_VALUE, + WEBGL_color_buffer_float: base_config_1.TYPE, + WEBGL_compressed_texture_astc: base_config_1.TYPE, + WEBGL_compressed_texture_etc: base_config_1.TYPE, + WEBGL_compressed_texture_etc1: base_config_1.TYPE, + WEBGL_compressed_texture_pvrtc: base_config_1.TYPE, + WEBGL_compressed_texture_s3tc: base_config_1.TYPE, + WEBGL_compressed_texture_s3tc_srgb: base_config_1.TYPE, + WEBGL_debug_renderer_info: base_config_1.TYPE, + WEBGL_debug_shaders: base_config_1.TYPE, + WEBGL_depth_texture: base_config_1.TYPE, + WEBGL_draw_buffers: base_config_1.TYPE, + WEBGL_lose_context: base_config_1.TYPE, + WEBGL_multi_draw: base_config_1.TYPE, + WakeLock: base_config_1.TYPE_VALUE, + WakeLockSentinelEventMap: base_config_1.TYPE, + WakeLockSentinel: base_config_1.TYPE_VALUE, + WaveShaperNode: base_config_1.TYPE_VALUE, + WebGL2RenderingContext: base_config_1.TYPE_VALUE, + WebGL2RenderingContextBase: base_config_1.TYPE, + WebGL2RenderingContextOverloads: base_config_1.TYPE, + WebGLActiveInfo: base_config_1.TYPE_VALUE, + WebGLBuffer: base_config_1.TYPE_VALUE, + WebGLContextEvent: base_config_1.TYPE_VALUE, + WebGLFramebuffer: base_config_1.TYPE_VALUE, + WebGLProgram: base_config_1.TYPE_VALUE, + WebGLQuery: base_config_1.TYPE_VALUE, + WebGLRenderbuffer: base_config_1.TYPE_VALUE, + WebGLRenderingContext: base_config_1.TYPE_VALUE, + WebGLRenderingContextBase: base_config_1.TYPE, + WebGLRenderingContextOverloads: base_config_1.TYPE, + WebGLSampler: base_config_1.TYPE_VALUE, + WebGLShader: base_config_1.TYPE_VALUE, + WebGLShaderPrecisionFormat: base_config_1.TYPE_VALUE, + WebGLSync: base_config_1.TYPE_VALUE, + WebGLTexture: base_config_1.TYPE_VALUE, + WebGLTransformFeedback: base_config_1.TYPE_VALUE, + WebGLUniformLocation: base_config_1.TYPE_VALUE, + WebGLVertexArrayObject: base_config_1.TYPE_VALUE, + WebGLVertexArrayObjectOES: base_config_1.TYPE, + WebSocketEventMap: base_config_1.TYPE, + WebSocket: base_config_1.TYPE_VALUE, + WebTransport: base_config_1.TYPE_VALUE, + WebTransportBidirectionalStream: base_config_1.TYPE_VALUE, + WebTransportDatagramDuplexStream: base_config_1.TYPE_VALUE, + WebTransportError: base_config_1.TYPE_VALUE, + WheelEvent: base_config_1.TYPE_VALUE, + WindowEventMap: base_config_1.TYPE, + Window: base_config_1.TYPE_VALUE, + WindowEventHandlersEventMap: base_config_1.TYPE, + WindowEventHandlers: base_config_1.TYPE, + WindowLocalStorage: base_config_1.TYPE, + WindowOrWorkerGlobalScope: base_config_1.TYPE, + WindowSessionStorage: base_config_1.TYPE, + WorkerEventMap: base_config_1.TYPE, + Worker: base_config_1.TYPE_VALUE, + Worklet: base_config_1.TYPE_VALUE, + WritableStream: base_config_1.TYPE_VALUE, + WritableStreamDefaultController: base_config_1.TYPE_VALUE, + WritableStreamDefaultWriter: base_config_1.TYPE_VALUE, + XMLDocument: base_config_1.TYPE_VALUE, + XMLHttpRequestEventMap: base_config_1.TYPE, + XMLHttpRequest: base_config_1.TYPE_VALUE, + XMLHttpRequestEventTargetEventMap: base_config_1.TYPE, + XMLHttpRequestEventTarget: base_config_1.TYPE_VALUE, + XMLHttpRequestUpload: base_config_1.TYPE_VALUE, + XMLSerializer: base_config_1.TYPE_VALUE, + XPathEvaluator: base_config_1.TYPE_VALUE, + XPathEvaluatorBase: base_config_1.TYPE, + XPathExpression: base_config_1.TYPE_VALUE, + XPathResult: base_config_1.TYPE_VALUE, + XSLTProcessor: base_config_1.TYPE_VALUE, + Console: base_config_1.TYPE, + CSS: base_config_1.TYPE_VALUE, + WebAssembly: base_config_1.TYPE_VALUE, + BlobCallback: base_config_1.TYPE, + CustomElementConstructor: base_config_1.TYPE, + DecodeErrorCallback: base_config_1.TYPE, + DecodeSuccessCallback: base_config_1.TYPE, + EncodedVideoChunkOutputCallback: base_config_1.TYPE, + ErrorCallback: base_config_1.TYPE, + FileCallback: base_config_1.TYPE, + FileSystemEntriesCallback: base_config_1.TYPE, + FileSystemEntryCallback: base_config_1.TYPE, + FrameRequestCallback: base_config_1.TYPE, + FunctionStringCallback: base_config_1.TYPE, + IdleRequestCallback: base_config_1.TYPE, + IntersectionObserverCallback: base_config_1.TYPE, + LockGrantedCallback: base_config_1.TYPE, + MediaSessionActionHandler: base_config_1.TYPE, + MutationCallback: base_config_1.TYPE, + NotificationPermissionCallback: base_config_1.TYPE, + OnBeforeUnloadEventHandlerNonNull: base_config_1.TYPE, + OnErrorEventHandlerNonNull: base_config_1.TYPE, + PerformanceObserverCallback: base_config_1.TYPE, + PositionCallback: base_config_1.TYPE, + PositionErrorCallback: base_config_1.TYPE, + QueuingStrategySize: base_config_1.TYPE, + RTCPeerConnectionErrorCallback: base_config_1.TYPE, + RTCSessionDescriptionCallback: base_config_1.TYPE, + RemotePlaybackAvailabilityCallback: base_config_1.TYPE, + ReportingObserverCallback: base_config_1.TYPE, + ResizeObserverCallback: base_config_1.TYPE, + TransformerFlushCallback: base_config_1.TYPE, + TransformerStartCallback: base_config_1.TYPE, + TransformerTransformCallback: base_config_1.TYPE, + UnderlyingSinkAbortCallback: base_config_1.TYPE, + UnderlyingSinkCloseCallback: base_config_1.TYPE, + UnderlyingSinkStartCallback: base_config_1.TYPE, + UnderlyingSinkWriteCallback: base_config_1.TYPE, + UnderlyingSourceCancelCallback: base_config_1.TYPE, + UnderlyingSourcePullCallback: base_config_1.TYPE, + UnderlyingSourceStartCallback: base_config_1.TYPE, + VideoFrameOutputCallback: base_config_1.TYPE, + VideoFrameRequestCallback: base_config_1.TYPE, + VoidFunction: base_config_1.TYPE, + WebCodecsErrorCallback: base_config_1.TYPE, + HTMLElementTagNameMap: base_config_1.TYPE, + HTMLElementDeprecatedTagNameMap: base_config_1.TYPE, + SVGElementTagNameMap: base_config_1.TYPE, + MathMLElementTagNameMap: base_config_1.TYPE, + ElementTagNameMap: base_config_1.TYPE, + AlgorithmIdentifier: base_config_1.TYPE, + AllowSharedBufferSource: base_config_1.TYPE, + AutoFill: base_config_1.TYPE, + AutoFillField: base_config_1.TYPE, + AutoFillSection: base_config_1.TYPE, + BigInteger: base_config_1.TYPE, + BinaryData: base_config_1.TYPE, + BlobPart: base_config_1.TYPE, + BodyInit: base_config_1.TYPE, + BufferSource: base_config_1.TYPE, + COSEAlgorithmIdentifier: base_config_1.TYPE, + CSSKeywordish: base_config_1.TYPE, + CSSNumberish: base_config_1.TYPE, + CSSPerspectiveValue: base_config_1.TYPE, + CSSUnparsedSegment: base_config_1.TYPE, + CanvasImageSource: base_config_1.TYPE, + ClipboardItemData: base_config_1.TYPE, + ClipboardItems: base_config_1.TYPE, + ConstrainBoolean: base_config_1.TYPE, + ConstrainDOMString: base_config_1.TYPE, + ConstrainDouble: base_config_1.TYPE, + ConstrainULong: base_config_1.TYPE, + DOMHighResTimeStamp: base_config_1.TYPE, + EpochTimeStamp: base_config_1.TYPE, + EventListenerOrEventListenerObject: base_config_1.TYPE, + FileSystemWriteChunkType: base_config_1.TYPE, + Float32List: base_config_1.TYPE, + FormDataEntryValue: base_config_1.TYPE, + GLbitfield: base_config_1.TYPE, + GLboolean: base_config_1.TYPE, + GLclampf: base_config_1.TYPE, + GLenum: base_config_1.TYPE, + GLfloat: base_config_1.TYPE, + GLint: base_config_1.TYPE, + GLint64: base_config_1.TYPE, + GLintptr: base_config_1.TYPE, + GLsizei: base_config_1.TYPE, + GLsizeiptr: base_config_1.TYPE, + GLuint: base_config_1.TYPE, + GLuint64: base_config_1.TYPE, + HTMLOrSVGImageElement: base_config_1.TYPE, + HTMLOrSVGScriptElement: base_config_1.TYPE, + HashAlgorithmIdentifier: base_config_1.TYPE, + HeadersInit: base_config_1.TYPE, + IDBValidKey: base_config_1.TYPE, + ImageBitmapSource: base_config_1.TYPE, + Int32List: base_config_1.TYPE, + LineAndPositionSetting: base_config_1.TYPE, + MediaProvider: base_config_1.TYPE, + MessageEventSource: base_config_1.TYPE, + MutationRecordType: base_config_1.TYPE, + NamedCurve: base_config_1.TYPE, + OffscreenRenderingContext: base_config_1.TYPE, + OnBeforeUnloadEventHandler: base_config_1.TYPE, + OnErrorEventHandler: base_config_1.TYPE, + OptionalPostfixToken: base_config_1.TYPE, + OptionalPrefixToken: base_config_1.TYPE, + PerformanceEntryList: base_config_1.TYPE, + ReadableStreamController: base_config_1.TYPE, + ReadableStreamReadResult: base_config_1.TYPE, + ReadableStreamReader: base_config_1.TYPE, + RenderingContext: base_config_1.TYPE, + ReportList: base_config_1.TYPE, + RequestInfo: base_config_1.TYPE, + TexImageSource: base_config_1.TYPE, + TimerHandler: base_config_1.TYPE, + Transferable: base_config_1.TYPE, + Uint32List: base_config_1.TYPE, + VibratePattern: base_config_1.TYPE, + WindowProxy: base_config_1.TYPE, + XMLHttpRequestBodyInit: base_config_1.TYPE, + AlignSetting: base_config_1.TYPE, + AlphaOption: base_config_1.TYPE, + AnimationPlayState: base_config_1.TYPE, + AnimationReplaceState: base_config_1.TYPE, + AppendMode: base_config_1.TYPE, + AttestationConveyancePreference: base_config_1.TYPE, + AudioContextLatencyCategory: base_config_1.TYPE, + AudioContextState: base_config_1.TYPE, + AuthenticatorAttachment: base_config_1.TYPE, + AuthenticatorTransport: base_config_1.TYPE, + AutoFillAddressKind: base_config_1.TYPE, + AutoFillBase: base_config_1.TYPE, + AutoFillContactField: base_config_1.TYPE, + AutoFillContactKind: base_config_1.TYPE, + AutoFillCredentialField: base_config_1.TYPE, + AutoFillNormalField: base_config_1.TYPE, + AutoKeyword: base_config_1.TYPE, + AutomationRate: base_config_1.TYPE, + AvcBitstreamFormat: base_config_1.TYPE, + BinaryType: base_config_1.TYPE, + BiquadFilterType: base_config_1.TYPE, + CSSMathOperator: base_config_1.TYPE, + CSSNumericBaseType: base_config_1.TYPE, + CanPlayTypeResult: base_config_1.TYPE, + CanvasDirection: base_config_1.TYPE, + CanvasFillRule: base_config_1.TYPE, + CanvasFontKerning: base_config_1.TYPE, + CanvasFontStretch: base_config_1.TYPE, + CanvasFontVariantCaps: base_config_1.TYPE, + CanvasLineCap: base_config_1.TYPE, + CanvasLineJoin: base_config_1.TYPE, + CanvasTextAlign: base_config_1.TYPE, + CanvasTextBaseline: base_config_1.TYPE, + CanvasTextRendering: base_config_1.TYPE, + ChannelCountMode: base_config_1.TYPE, + ChannelInterpretation: base_config_1.TYPE, + ClientTypes: base_config_1.TYPE, + CodecState: base_config_1.TYPE, + ColorGamut: base_config_1.TYPE, + ColorSpaceConversion: base_config_1.TYPE, + CompositeOperation: base_config_1.TYPE, + CompositeOperationOrAuto: base_config_1.TYPE, + CompressionFormat: base_config_1.TYPE, + CredentialMediationRequirement: base_config_1.TYPE, + DOMParserSupportedType: base_config_1.TYPE, + DirectionSetting: base_config_1.TYPE, + DisplayCaptureSurfaceType: base_config_1.TYPE, + DistanceModelType: base_config_1.TYPE, + DocumentReadyState: base_config_1.TYPE, + DocumentVisibilityState: base_config_1.TYPE, + EncodedVideoChunkType: base_config_1.TYPE, + EndOfStreamError: base_config_1.TYPE, + EndingType: base_config_1.TYPE, + FileSystemHandleKind: base_config_1.TYPE, + FillMode: base_config_1.TYPE, + FontDisplay: base_config_1.TYPE, + FontFaceLoadStatus: base_config_1.TYPE, + FontFaceSetLoadStatus: base_config_1.TYPE, + FullscreenNavigationUI: base_config_1.TYPE, + GamepadHapticActuatorType: base_config_1.TYPE, + GamepadHapticEffectType: base_config_1.TYPE, + GamepadHapticsResult: base_config_1.TYPE, + GamepadMappingType: base_config_1.TYPE, + GlobalCompositeOperation: base_config_1.TYPE, + HardwareAcceleration: base_config_1.TYPE, + HdrMetadataType: base_config_1.TYPE, + IDBCursorDirection: base_config_1.TYPE, + IDBRequestReadyState: base_config_1.TYPE, + IDBTransactionDurability: base_config_1.TYPE, + IDBTransactionMode: base_config_1.TYPE, + ImageOrientation: base_config_1.TYPE, + ImageSmoothingQuality: base_config_1.TYPE, + InsertPosition: base_config_1.TYPE, + IterationCompositeOperation: base_config_1.TYPE, + KeyFormat: base_config_1.TYPE, + KeyType: base_config_1.TYPE, + KeyUsage: base_config_1.TYPE, + LatencyMode: base_config_1.TYPE, + LineAlignSetting: base_config_1.TYPE, + LockMode: base_config_1.TYPE, + MIDIPortConnectionState: base_config_1.TYPE, + MIDIPortDeviceState: base_config_1.TYPE, + MIDIPortType: base_config_1.TYPE, + MediaDecodingType: base_config_1.TYPE, + MediaDeviceKind: base_config_1.TYPE, + MediaEncodingType: base_config_1.TYPE, + MediaKeyMessageType: base_config_1.TYPE, + MediaKeySessionClosedReason: base_config_1.TYPE, + MediaKeySessionType: base_config_1.TYPE, + MediaKeyStatus: base_config_1.TYPE, + MediaKeysRequirement: base_config_1.TYPE, + MediaSessionAction: base_config_1.TYPE, + MediaSessionPlaybackState: base_config_1.TYPE, + MediaStreamTrackState: base_config_1.TYPE, + NavigationTimingType: base_config_1.TYPE, + NotificationDirection: base_config_1.TYPE, + NotificationPermission: base_config_1.TYPE, + OffscreenRenderingContextId: base_config_1.TYPE, + OrientationType: base_config_1.TYPE, + OscillatorType: base_config_1.TYPE, + OverSampleType: base_config_1.TYPE, + PanningModelType: base_config_1.TYPE, + PaymentComplete: base_config_1.TYPE, + PermissionName: base_config_1.TYPE, + PermissionState: base_config_1.TYPE, + PlaybackDirection: base_config_1.TYPE, + PositionAlignSetting: base_config_1.TYPE, + PredefinedColorSpace: base_config_1.TYPE, + PremultiplyAlpha: base_config_1.TYPE, + PresentationStyle: base_config_1.TYPE, + PublicKeyCredentialType: base_config_1.TYPE, + PushEncryptionKeyName: base_config_1.TYPE, + RTCBundlePolicy: base_config_1.TYPE, + RTCDataChannelState: base_config_1.TYPE, + RTCDegradationPreference: base_config_1.TYPE, + RTCDtlsTransportState: base_config_1.TYPE, + RTCEncodedVideoFrameType: base_config_1.TYPE, + RTCErrorDetailType: base_config_1.TYPE, + RTCIceCandidateType: base_config_1.TYPE, + RTCIceComponent: base_config_1.TYPE, + RTCIceConnectionState: base_config_1.TYPE, + RTCIceGathererState: base_config_1.TYPE, + RTCIceGatheringState: base_config_1.TYPE, + RTCIceProtocol: base_config_1.TYPE, + RTCIceTcpCandidateType: base_config_1.TYPE, + RTCIceTransportPolicy: base_config_1.TYPE, + RTCIceTransportState: base_config_1.TYPE, + RTCPeerConnectionState: base_config_1.TYPE, + RTCPriorityType: base_config_1.TYPE, + RTCRtcpMuxPolicy: base_config_1.TYPE, + RTCRtpTransceiverDirection: base_config_1.TYPE, + RTCSctpTransportState: base_config_1.TYPE, + RTCSdpType: base_config_1.TYPE, + RTCSignalingState: base_config_1.TYPE, + RTCStatsIceCandidatePairState: base_config_1.TYPE, + RTCStatsType: base_config_1.TYPE, + ReadableStreamReaderMode: base_config_1.TYPE, + ReadableStreamType: base_config_1.TYPE, + ReadyState: base_config_1.TYPE, + RecordingState: base_config_1.TYPE, + ReferrerPolicy: base_config_1.TYPE, + RemotePlaybackState: base_config_1.TYPE, + RequestCache: base_config_1.TYPE, + RequestCredentials: base_config_1.TYPE, + RequestDestination: base_config_1.TYPE, + RequestMode: base_config_1.TYPE, + RequestRedirect: base_config_1.TYPE, + ResidentKeyRequirement: base_config_1.TYPE, + ResizeObserverBoxOptions: base_config_1.TYPE, + ResizeQuality: base_config_1.TYPE, + ResponseType: base_config_1.TYPE, + ScrollBehavior: base_config_1.TYPE, + ScrollLogicalPosition: base_config_1.TYPE, + ScrollRestoration: base_config_1.TYPE, + ScrollSetting: base_config_1.TYPE, + SecurityPolicyViolationEventDisposition: base_config_1.TYPE, + SelectionMode: base_config_1.TYPE, + ServiceWorkerState: base_config_1.TYPE, + ServiceWorkerUpdateViaCache: base_config_1.TYPE, + ShadowRootMode: base_config_1.TYPE, + SlotAssignmentMode: base_config_1.TYPE, + SpeechSynthesisErrorCode: base_config_1.TYPE, + TextTrackKind: base_config_1.TYPE, + TextTrackMode: base_config_1.TYPE, + TouchType: base_config_1.TYPE, + TransferFunction: base_config_1.TYPE, + UserVerificationRequirement: base_config_1.TYPE, + VideoColorPrimaries: base_config_1.TYPE, + VideoEncoderBitrateMode: base_config_1.TYPE, + VideoFacingModeEnum: base_config_1.TYPE, + VideoMatrixCoefficients: base_config_1.TYPE, + VideoPixelFormat: base_config_1.TYPE, + VideoTransferCharacteristics: base_config_1.TYPE, + WakeLockType: base_config_1.TYPE, + WebGLPowerPreference: base_config_1.TYPE, + WebTransportCongestionControl: base_config_1.TYPE, + WebTransportErrorSource: base_config_1.TYPE, + WorkerType: base_config_1.TYPE, + WriteCommandType: base_config_1.TYPE, + XMLHttpRequestResponseType: base_config_1.TYPE, +}; +//# sourceMappingURL=dom.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map new file mode 100644 index 0000000000..da71d3768c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../src/lib/dom.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AAEpC,QAAA,GAAG,GAAG;IACjB,uBAAuB,EAAE,kBAAI;IAC7B,YAAY,EAAE,kBAAI;IAClB,YAAY,EAAE,kBAAI;IAClB,mBAAmB,EAAE,kBAAI;IACzB,YAAY,EAAE,kBAAI;IAClB,eAAe,EAAE,kBAAI;IACrB,eAAe,EAAE,kBAAI;IACrB,SAAS,EAAE,kBAAI;IACf,eAAe,EAAE,kBAAI;IACrB,kBAAkB,EAAE,kBAAI;IACxB,0BAA0B,EAAE,kBAAI;IAChC,oBAAoB,EAAE,kBAAI;IAC1B,kBAAkB,EAAE,kBAAI;IACxB,wBAAwB,EAAE,kBAAI;IAC9B,kBAAkB,EAAE,kBAAI;IACxB,mBAAmB,EAAE,kBAAI;IACzB,gBAAgB,EAAE,kBAAI;IACtB,wBAAwB,EAAE,kBAAI;IAC9B,cAAc,EAAE,kBAAI;IACpB,uBAAuB,EAAE,kBAAI;IAC7B,oCAAoC,EAAE,kBAAI;IAC1C,qCAAqC,EAAE,kBAAI;IAC3C,8BAA8B,EAAE,kBAAI;IACpC,gBAAgB,EAAE,kBAAI;IACtB,mBAAmB,EAAE,kBAAI;IACzB,aAAa,EAAE,kBAAI;IACnB,eAAe,EAAE,kBAAI;IACrB,yBAAyB,EAAE,kBAAI;IAC/B,cAAc,EAAE,kBAAI;IACpB,iBAAiB,EAAE,kBAAI;IACvB,iBAAiB,EAAE,kBAAI;IACvB,gCAAgC,EAAE,kBAAI;IACtC,oBAAoB,EAAE,kBAAI;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,kBAAI;IAC5B,wBAAwB,EAAE,kBAAI;IAC9B,aAAa,EAAE,kBAAI;IACnB,YAAY,EAAE,kBAAI;IAClB,cAAc,EAAE,kBAAI;IACpB,qBAAqB,EAAE,kBAAI;IAC3B,iBAAiB,EAAE,kBAAI;IACvB,aAAa,EAAE,kBAAI;IACnB,uCAAuC,EAAE,kBAAI;IAC7C,aAAa,EAAE,kBAAI;IACnB,kBAAkB,EAAE,kBAAI;IACxB,2BAA2B,EAAE,kBAAI;IACjC,cAAc,EAAE,kBAAI;IACpB,kBAAkB,EAAE,kBAAI;IACxB,wBAAwB,EAAE,kBAAI;IAC9B,aAAa,EAAE,kBAAI;IACnB,aAAa,EAAE,kBAAI;IACnB,SAAS,EAAE,kBAAI;IACf,gBAAgB,EAAE,kBAAI;IACtB,2BAA2B,EAAE,kBAAI;IACjC,mBAAmB,EAAE,kBAAI;IACzB,uBAAuB,EAAE,kBAAI;IAC7B,mBAAmB,EAAE,kBAAI;IACzB,uBAAuB,EAAE,kBAAI;IAC7B,gBAAgB,EAAE,kBAAI;IACtB,4BAA4B,EAAE,kBAAI;IAClC,YAAY,EAAE,kBAAI;IAClB,oBAAoB,EAAE,kBAAI;IAC1B,6BAA6B,EAAE,kBAAI;IACnC,uBAAuB,EAAE,kBAAI;IAC7B,UAAU,EAAE,kBAAI;IAChB,gBAAgB,EAAE,kBAAI;IACtB,0BAA0B,EAAE,kBAAI;CACa,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts new file mode 100644 index 0000000000..8bc3c49fd4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2015_collection: Record; +//# sourceMappingURL=es2015.collection.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts.map new file mode 100644 index 0000000000..a13b7c5054 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.collection.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.collection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,iBAAiB,4CAWiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js new file mode 100644 index 0000000000..b81c3f5d74 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js @@ -0,0 +1,21 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_collection = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_collection = { + Map: base_config_1.TYPE_VALUE, + MapConstructor: base_config_1.TYPE, + ReadonlyMap: base_config_1.TYPE, + WeakMap: base_config_1.TYPE_VALUE, + WeakMapConstructor: base_config_1.TYPE, + Set: base_config_1.TYPE_VALUE, + SetConstructor: base_config_1.TYPE, + ReadonlySet: base_config_1.TYPE, + WeakSet: base_config_1.TYPE_VALUE, + WeakSetConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2015.collection.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js.map new file mode 100644 index 0000000000..af6239dcd8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.collection.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.collection.js","sourceRoot":"","sources":["../../src/lib/es2015.collection.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AAEpC,QAAA,iBAAiB,GAAG;IAC/B,GAAG,EAAE,wBAAU;IACf,cAAc,EAAE,kBAAI;IACpB,WAAW,EAAE,kBAAI;IACjB,OAAO,EAAE,wBAAU;IACnB,kBAAkB,EAAE,kBAAI;IACxB,GAAG,EAAE,wBAAU;IACf,cAAc,EAAE,kBAAI;IACpB,WAAW,EAAE,kBAAI;IACjB,OAAO,EAAE,wBAAU;IACnB,kBAAkB,EAAE,kBAAI;CACqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts new file mode 100644 index 0000000000..c309d52dbc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2015_core: Record; +//# sourceMappingURL=es2015.core.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts.map new file mode 100644 index 0000000000..2406c9c364 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.core.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.core.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,WAAW,4CAauB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js new file mode 100644 index 0000000000..61b310ac9f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js @@ -0,0 +1,23 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_core = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_core = { + Array: base_config_1.TYPE, + ArrayConstructor: base_config_1.TYPE, + DateConstructor: base_config_1.TYPE, + Function: base_config_1.TYPE, + Math: base_config_1.TYPE, + NumberConstructor: base_config_1.TYPE, + ObjectConstructor: base_config_1.TYPE, + ReadonlyArray: base_config_1.TYPE, + RegExp: base_config_1.TYPE, + RegExpConstructor: base_config_1.TYPE, + String: base_config_1.TYPE, + StringConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2015.core.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js.map new file mode 100644 index 0000000000..eae9b297bb --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.core.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.core.js","sourceRoot":"","sources":["../../src/lib/es2015.core.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,WAAW,GAAG;IACzB,KAAK,EAAE,kBAAI;IACX,gBAAgB,EAAE,kBAAI;IACtB,eAAe,EAAE,kBAAI;IACrB,QAAQ,EAAE,kBAAI;IACd,IAAI,EAAE,kBAAI;IACV,iBAAiB,EAAE,kBAAI;IACvB,iBAAiB,EAAE,kBAAI;IACvB,aAAa,EAAE,kBAAI;IACnB,MAAM,EAAE,kBAAI;IACZ,iBAAiB,EAAE,kBAAI;IACvB,MAAM,EAAE,kBAAI;IACZ,iBAAiB,EAAE,kBAAI;CACsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts new file mode 100644 index 0000000000..7f7de23761 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2015: Record; +//# sourceMappingURL=es2015.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts.map new file mode 100644 index 0000000000..238787cb68 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAY9D,eAAO,MAAM,MAAM,4CAW4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts new file mode 100644 index 0000000000..cb5ce5da46 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2015_generator: Record; +//# sourceMappingURL=es2015.generator.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts.map new file mode 100644 index 0000000000..a6f50f743f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.generator.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.generator.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,gBAAgB,4CAKkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js new file mode 100644 index 0000000000..c319c92a81 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js @@ -0,0 +1,16 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_generator = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +exports.es2015_generator = { + ...es2015_iterable_1.es2015_iterable, + Generator: base_config_1.TYPE, + GeneratorFunction: base_config_1.TYPE, + GeneratorFunctionConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2015.generator.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js.map new file mode 100644 index 0000000000..5de461cd2a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.generator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.generator.js","sourceRoot":"","sources":["../../src/lib/es2015.generator.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,uDAAoD;AAEvC,QAAA,gBAAgB,GAAG;IAC9B,GAAG,iCAAe;IAClB,SAAS,EAAE,kBAAI;IACf,iBAAiB,EAAE,kBAAI;IACvB,4BAA4B,EAAE,kBAAI;CACW,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts new file mode 100644 index 0000000000..9daa14ef1a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2015_iterable: Record; +//# sourceMappingURL=es2015.iterable.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts.map new file mode 100644 index 0000000000..fac61e97f9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.iterable.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.iterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,eAAe,4CA4CmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js new file mode 100644 index 0000000000..c1e7f0ccd3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js @@ -0,0 +1,55 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_iterable = void 0; +const base_config_1 = require("./base-config"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.es2015_iterable = { + ...es2015_symbol_1.es2015_symbol, + SymbolConstructor: base_config_1.TYPE, + IteratorYieldResult: base_config_1.TYPE, + IteratorReturnResult: base_config_1.TYPE, + IteratorResult: base_config_1.TYPE, + Iterator: base_config_1.TYPE, + Iterable: base_config_1.TYPE, + IterableIterator: base_config_1.TYPE, + Array: base_config_1.TYPE, + ArrayConstructor: base_config_1.TYPE, + ReadonlyArray: base_config_1.TYPE, + IArguments: base_config_1.TYPE, + Map: base_config_1.TYPE, + ReadonlyMap: base_config_1.TYPE, + MapConstructor: base_config_1.TYPE, + WeakMap: base_config_1.TYPE, + WeakMapConstructor: base_config_1.TYPE, + Set: base_config_1.TYPE, + ReadonlySet: base_config_1.TYPE, + SetConstructor: base_config_1.TYPE, + WeakSet: base_config_1.TYPE, + WeakSetConstructor: base_config_1.TYPE, + Promise: base_config_1.TYPE, + PromiseConstructor: base_config_1.TYPE, + String: base_config_1.TYPE, + Int8Array: base_config_1.TYPE, + Int8ArrayConstructor: base_config_1.TYPE, + Uint8Array: base_config_1.TYPE, + Uint8ArrayConstructor: base_config_1.TYPE, + Uint8ClampedArray: base_config_1.TYPE, + Uint8ClampedArrayConstructor: base_config_1.TYPE, + Int16Array: base_config_1.TYPE, + Int16ArrayConstructor: base_config_1.TYPE, + Uint16Array: base_config_1.TYPE, + Uint16ArrayConstructor: base_config_1.TYPE, + Int32Array: base_config_1.TYPE, + Int32ArrayConstructor: base_config_1.TYPE, + Uint32Array: base_config_1.TYPE, + Uint32ArrayConstructor: base_config_1.TYPE, + Float32Array: base_config_1.TYPE, + Float32ArrayConstructor: base_config_1.TYPE, + Float64Array: base_config_1.TYPE, + Float64ArrayConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2015.iterable.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js.map new file mode 100644 index 0000000000..46cd704b0d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.iterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"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AAuB,EAAE,kBAAI;IAC7B,YAAY,EAAE,kBAAI;IAClB,uBAAuB,EAAE,kBAAI;CACgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js new file mode 100644 index 0000000000..1d601e6867 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js @@ -0,0 +1,30 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015 = void 0; +const es5_1 = require("./es5"); +const es2015_collection_1 = require("./es2015.collection"); +const es2015_core_1 = require("./es2015.core"); +const es2015_generator_1 = require("./es2015.generator"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_promise_1 = require("./es2015.promise"); +const es2015_proxy_1 = require("./es2015.proxy"); +const es2015_reflect_1 = require("./es2015.reflect"); +const es2015_symbol_1 = require("./es2015.symbol"); +const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown"); +exports.es2015 = { + ...es5_1.es5, + ...es2015_core_1.es2015_core, + ...es2015_collection_1.es2015_collection, + ...es2015_iterable_1.es2015_iterable, + ...es2015_generator_1.es2015_generator, + ...es2015_promise_1.es2015_promise, + ...es2015_proxy_1.es2015_proxy, + ...es2015_reflect_1.es2015_reflect, + ...es2015_symbol_1.es2015_symbol, + ...es2015_symbol_wellknown_1.es2015_symbol_wellknown, +}; +//# sourceMappingURL=es2015.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js.map new file mode 100644 index 0000000000..43ed2f136f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.js","sourceRoot":"","sources":["../../src/lib/es2015.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,2DAAwD;AACxD,+CAA4C;AAC5C,yDAAsD;AACtD,uDAAoD;AACpD,qDAAkD;AAClD,iDAA8C;AAC9C,qDAAkD;AAClD,mDAAgD;AAChD,uEAAoE;AAEvD,QAAA,MAAM,GAAG;IACpB,GAAG,SAAG;IACN,GAAG,yBAAW;IACd,GAAG,qCAAiB;IACpB,GAAG,iCAAe;IAClB,GAAG,mCAAgB;IACnB,GAAG,+BAAc;IACjB,GAAG,2BAAY;IACf,GAAG,+BAAc;IACjB,GAAG,6BAAa;IAChB,GAAG,iDAAuB;CACmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts new file mode 100644 index 0000000000..4b0b7d1975 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2015_promise: Record; +//# sourceMappingURL=es2015.promise.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts.map new file mode 100644 index 0000000000..df54482744 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.promise.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,cAAc,4CAEoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js new file mode 100644 index 0000000000..0c7dc02bcb --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_promise = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_promise = { + PromiseConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2015.promise.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js.map new file mode 100644 index 0000000000..3174ab7430 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.promise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.promise.js","sourceRoot":"","sources":["../../src/lib/es2015.promise.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,cAAc,GAAG;IAC5B,kBAAkB,EAAE,kBAAI;CACqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts new file mode 100644 index 0000000000..a2a87c0f48 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2015_proxy: Record; +//# sourceMappingURL=es2015.proxy.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts.map new file mode 100644 index 0000000000..27f60e4c1e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.proxy.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.proxy.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,YAAY,4CAGsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js new file mode 100644 index 0000000000..db459c2e4e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js @@ -0,0 +1,13 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_proxy = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_proxy = { + ProxyHandler: base_config_1.TYPE, + ProxyConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2015.proxy.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js.map new file mode 100644 index 0000000000..33411f6b89 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.proxy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.proxy.js","sourceRoot":"","sources":["../../src/lib/es2015.proxy.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,YAAY,GAAG;IAC1B,YAAY,EAAE,kBAAI;IAClB,gBAAgB,EAAE,kBAAI;CACuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts new file mode 100644 index 0000000000..7e94f32c23 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2015_reflect: Record; +//# sourceMappingURL=es2015.reflect.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts.map new file mode 100644 index 0000000000..fff0c9c652 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.reflect.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.reflect.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,cAAc,4CAEoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js new file mode 100644 index 0000000000..4d7eaf1975 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_reflect = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_reflect = { + Reflect: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=es2015.reflect.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js.map new file mode 100644 index 0000000000..72ce3c0632 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.reflect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.reflect.js","sourceRoot":"","sources":["../../src/lib/es2015.reflect.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAA2C;AAE9B,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,wBAAU;CAC0B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts new file mode 100644 index 0000000000..e78a667060 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2015_symbol: Record; +//# sourceMappingURL=es2015.symbol.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts.map new file mode 100644 index 0000000000..7d148fcbf2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.symbol.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.symbol.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAEqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js new file mode 100644 index 0000000000..645f58facb --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_symbol = void 0; +const base_config_1 = require("./base-config"); +exports.es2015_symbol = { + SymbolConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2015.symbol.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js.map new file mode 100644 index 0000000000..cd9943290b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.symbol.js","sourceRoot":"","sources":["../../src/lib/es2015.symbol.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,iBAAiB,EAAE,kBAAI;CACsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts new file mode 100644 index 0000000000..7b18f41cf4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2015_symbol_wellknown: Record; +//# sourceMappingURL=es2015.symbol.wellknown.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map new file mode 100644 index 0000000000..b120661b9b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.symbol.wellknown.d.ts","sourceRoot":"","sources":["../../src/lib/es2015.symbol.wellknown.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,uBAAuB,4CAmCW,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js new file mode 100644 index 0000000000..f64f169f96 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js @@ -0,0 +1,46 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2015_symbol_wellknown = void 0; +const base_config_1 = require("./base-config"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.es2015_symbol_wellknown = { + ...es2015_symbol_1.es2015_symbol, + SymbolConstructor: base_config_1.TYPE, + Symbol: base_config_1.TYPE, + Array: base_config_1.TYPE, + ReadonlyArray: base_config_1.TYPE, + Date: base_config_1.TYPE, + Map: base_config_1.TYPE, + WeakMap: base_config_1.TYPE, + Set: base_config_1.TYPE, + WeakSet: base_config_1.TYPE, + JSON: base_config_1.TYPE, + Function: base_config_1.TYPE, + GeneratorFunction: base_config_1.TYPE, + Math: base_config_1.TYPE, + Promise: base_config_1.TYPE, + PromiseConstructor: base_config_1.TYPE, + RegExp: base_config_1.TYPE, + RegExpConstructor: base_config_1.TYPE, + String: base_config_1.TYPE, + ArrayBuffer: base_config_1.TYPE, + DataView: base_config_1.TYPE, + Int8Array: base_config_1.TYPE, + Uint8Array: base_config_1.TYPE, + Uint8ClampedArray: base_config_1.TYPE, + Int16Array: base_config_1.TYPE, + Uint16Array: base_config_1.TYPE, + Int32Array: base_config_1.TYPE, + Uint32Array: base_config_1.TYPE, + Float32Array: base_config_1.TYPE, + Float64Array: base_config_1.TYPE, + ArrayConstructor: base_config_1.TYPE, + MapConstructor: base_config_1.TYPE, + SetConstructor: base_config_1.TYPE, + ArrayBufferConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2015.symbol.wellknown.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js.map new file mode 100644 index 0000000000..35e20780ea --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2015.symbol.wellknown.js","sourceRoot":"","sources":["../../src/lib/es2015.symbol.wellknown.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,mDAAgD;AAEnC,QAAA,uBAAuB,GAAG;IACrC,GAAG,6BAAa;IAChB,iBAAiB,EAAE,kBAAI;IACvB,MAAM,EAAE,kBAAI;IACZ,KAAK,EAAE,kBAAI;IACX,aAAa,EAAE,kBAAI;IACnB,IAAI,EAAE,kBAAI;IACV,GAAG,EAAE,kBAAI;IACT,OAAO,EAAE,kBAAI;IACb,GAAG,EAAE,kBAAI;IACT,OAAO,EAAE,kBAAI;IACb,IAAI,EAAE,kBAAI;IACV,QAAQ,EAAE,kBAAI;IACd,iBAAiB,EAAE,kBAAI;IACvB,IAAI,EAAE,kBAAI;IACV,OAAO,EAAE,kBAAI;IACb,kBAAkB,EAAE,kBAAI;IACxB,MAAM,EAAE,kBAAI;IACZ,iBAAiB,EAAE,kBAAI;IACvB,MAAM,EAAE,kBAAI;IACZ,WAAW,EAAE,kBAAI;IACjB,QAAQ,EAAE,kBAAI;IACd,SAAS,EAAE,kBAAI;IACf,UAAU,EAAE,kBAAI;IAChB,iBAAiB,EAAE,kBAAI;IACvB,UAAU,EAAE,kBAAI;IAChB,WAAW,EAAE,kBAAI;IACjB,UAAU,EAAE,kBAAI;IAChB,WAAW,EAAE,kBAAI;IACjB,YAAY,EAAE,kBAAI;IAClB,YAAY,EAAE,kBAAI;IAClB,gBAAgB,EAAE,kBAAI;IACtB,cAAc,EAAE,kBAAI;IACpB,cAAc,EAAE,kBAAI;IACpB,sBAAsB,EAAE,kBAAI;CACiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts new file mode 100644 index 0000000000..7e6c89037f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2016_array_include: Record; +//# sourceMappingURL=es2016.array.include.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts.map new file mode 100644 index 0000000000..244dab599d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2016.array.include.d.ts","sourceRoot":"","sources":["../../src/lib/es2016.array.include.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,oBAAoB,4CAYc,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js new file mode 100644 index 0000000000..d549fca3a8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js @@ -0,0 +1,22 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2016_array_include = void 0; +const base_config_1 = require("./base-config"); +exports.es2016_array_include = { + Array: base_config_1.TYPE, + ReadonlyArray: base_config_1.TYPE, + Int8Array: base_config_1.TYPE, + Uint8Array: base_config_1.TYPE, + Uint8ClampedArray: base_config_1.TYPE, + Int16Array: base_config_1.TYPE, + Uint16Array: base_config_1.TYPE, + Int32Array: base_config_1.TYPE, + Uint32Array: base_config_1.TYPE, + Float32Array: base_config_1.TYPE, + Float64Array: base_config_1.TYPE, +}; +//# sourceMappingURL=es2016.array.include.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js.map new file mode 100644 index 0000000000..18d1aaecd4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.array.include.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2016.array.include.js","sourceRoot":"","sources":["../../src/lib/es2016.array.include.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,oBAAoB,GAAG;IAClC,KAAK,EAAE,kBAAI;IACX,aAAa,EAAE,kBAAI;IACnB,SAAS,EAAE,kBAAI;IACf,UAAU,EAAE,kBAAI;IAChB,iBAAiB,EAAE,kBAAI;IACvB,UAAU,EAAE,kBAAI;IAChB,WAAW,EAAE,kBAAI;IACjB,UAAU,EAAE,kBAAI;IAChB,WAAW,EAAE,kBAAI;IACjB,YAAY,EAAE,kBAAI;IAClB,YAAY,EAAE,kBAAI;CAC2B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts new file mode 100644 index 0000000000..2049c83ee5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2016: Record; +//# sourceMappingURL=es2016.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts.map new file mode 100644 index 0000000000..26861f221e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2016.d.ts","sourceRoot":"","sources":["../../src/lib/es2016.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,MAAM,4CAG4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts new file mode 100644 index 0000000000..f940014b07 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2016_full: Record; +//# sourceMappingURL=es2016.full.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts.map new file mode 100644 index 0000000000..b2e6835ce1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2016.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2016.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAO9D,eAAO,MAAM,WAAW,4CAMuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js new file mode 100644 index 0000000000..d087672760 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2016_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es2016_1 = require("./es2016"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2016_full = { + ...es2016_1.es2016, + ...dom_1.dom, + ...webworker_importscripts_1.webworker_importscripts, + ...scripthost_1.scripthost, + ...dom_iterable_1.dom_iterable, +}; +//# sourceMappingURL=es2016.full.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js.map new file mode 100644 index 0000000000..9edd39bf4b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.full.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2016.full.js","sourceRoot":"","sources":["../../src/lib/es2016.full.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,iDAA8C;AAC9C,qCAAkC;AAClC,6CAA0C;AAC1C,uEAAoE;AAEvD,QAAA,WAAW,GAAG;IACzB,GAAG,eAAM;IACT,GAAG,SAAG;IACN,GAAG,iDAAuB;IAC1B,GAAG,uBAAU;IACb,GAAG,2BAAY;CAC8B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js new file mode 100644 index 0000000000..884765c9f3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2016 = void 0; +const es2015_1 = require("./es2015"); +const es2016_array_include_1 = require("./es2016.array.include"); +exports.es2016 = { + ...es2015_1.es2015, + ...es2016_array_include_1.es2016_array_include, +}; +//# sourceMappingURL=es2016.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js.map new file mode 100644 index 0000000000..ed6ab57661 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2016.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2016.js","sourceRoot":"","sources":["../../src/lib/es2016.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,qCAAkC;AAClC,iEAA8D;AAEjD,QAAA,MAAM,GAAG;IACpB,GAAG,eAAM;IACT,GAAG,2CAAoB;CACsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts new file mode 100644 index 0000000000..7c40c71288 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2017: Record; +//# sourceMappingURL=es2017.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts.map new file mode 100644 index 0000000000..7c5a3a88cc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAS9D,eAAO,MAAM,MAAM,4CAQ4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts new file mode 100644 index 0000000000..68d2c05e65 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2017_date: Record; +//# sourceMappingURL=es2017.date.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts.map new file mode 100644 index 0000000000..eec8789585 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.date.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.date.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,WAAW,4CAEuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js new file mode 100644 index 0000000000..7b7c567591 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_date = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_date = { + DateConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2017.date.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js.map new file mode 100644 index 0000000000..8a08483b9f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.date.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.date.js","sourceRoot":"","sources":["../../src/lib/es2017.date.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,WAAW,GAAG;IACzB,eAAe,EAAE,kBAAI;CACwB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts new file mode 100644 index 0000000000..385bd1c38b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2017_full: Record; +//# sourceMappingURL=es2017.full.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts.map new file mode 100644 index 0000000000..97daf79f6e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAO9D,eAAO,MAAM,WAAW,4CAMuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js new file mode 100644 index 0000000000..fbbed72800 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es2017_1 = require("./es2017"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2017_full = { + ...es2017_1.es2017, + ...dom_1.dom, + ...webworker_importscripts_1.webworker_importscripts, + ...scripthost_1.scripthost, + ...dom_iterable_1.dom_iterable, +}; +//# sourceMappingURL=es2017.full.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js.map new file mode 100644 index 0000000000..ecc2bb4f58 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.full.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.full.js","sourceRoot":"","sources":["../../src/lib/es2017.full.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,iDAA8C;AAC9C,qCAAkC;AAClC,6CAA0C;AAC1C,uEAAoE;AAEvD,QAAA,WAAW,GAAG;IACzB,GAAG,eAAM;IACT,GAAG,SAAG;IACN,GAAG,iDAAuB;IAC1B,GAAG,uBAAU;IACb,GAAG,2BAAY;CAC8B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts new file mode 100644 index 0000000000..4db70db8f1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2017_intl: Record; +//# sourceMappingURL=es2017.intl.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts.map new file mode 100644 index 0000000000..61486e5f22 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,WAAW,4CAEuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js new file mode 100644 index 0000000000..e6d195d495 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_intl = { + Intl: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=es2017.intl.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js.map new file mode 100644 index 0000000000..19dd87b571 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.intl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.intl.js","sourceRoot":"","sources":["../../src/lib/es2017.intl.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAA2C;AAE9B,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,wBAAU;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js new file mode 100644 index 0000000000..4b2a3b11a4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017 = void 0; +const es2016_1 = require("./es2016"); +const es2017_date_1 = require("./es2017.date"); +const es2017_intl_1 = require("./es2017.intl"); +const es2017_object_1 = require("./es2017.object"); +const es2017_sharedmemory_1 = require("./es2017.sharedmemory"); +const es2017_string_1 = require("./es2017.string"); +const es2017_typedarrays_1 = require("./es2017.typedarrays"); +exports.es2017 = { + ...es2016_1.es2016, + ...es2017_object_1.es2017_object, + ...es2017_sharedmemory_1.es2017_sharedmemory, + ...es2017_string_1.es2017_string, + ...es2017_intl_1.es2017_intl, + ...es2017_typedarrays_1.es2017_typedarrays, + ...es2017_date_1.es2017_date, +}; +//# sourceMappingURL=es2017.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js.map new file mode 100644 index 0000000000..77c5ded751 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.js","sourceRoot":"","sources":["../../src/lib/es2017.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,qCAAkC;AAClC,+CAA4C;AAC5C,+CAA4C;AAC5C,mDAAgD;AAChD,+DAA4D;AAC5D,mDAAgD;AAChD,6DAA0D;AAE7C,QAAA,MAAM,GAAG;IACpB,GAAG,eAAM;IACT,GAAG,6BAAa;IAChB,GAAG,yCAAmB;IACtB,GAAG,6BAAa;IAChB,GAAG,yBAAW;IACd,GAAG,uCAAkB;IACrB,GAAG,yBAAW;CAC+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts new file mode 100644 index 0000000000..268df74f69 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2017_object: Record; +//# sourceMappingURL=es2017.object.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts.map new file mode 100644 index 0000000000..9c474b1e88 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.object.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.object.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAEqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js new file mode 100644 index 0000000000..7e9d1f3485 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_object = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_object = { + ObjectConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2017.object.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js.map new file mode 100644 index 0000000000..f50debace6 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.object.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.object.js","sourceRoot":"","sources":["../../src/lib/es2017.object.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,iBAAiB,EAAE,kBAAI;CACsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts new file mode 100644 index 0000000000..e647026ba1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2017_sharedmemory: Record; +//# sourceMappingURL=es2017.sharedmemory.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts.map new file mode 100644 index 0000000000..0a949a30dc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.sharedmemory.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.sharedmemory.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAK9D,eAAO,MAAM,mBAAmB,4CAOe,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js new file mode 100644 index 0000000000..dfcfb7b2ac --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js @@ -0,0 +1,19 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_sharedmemory = void 0; +const base_config_1 = require("./base-config"); +const es2015_symbol_1 = require("./es2015.symbol"); +const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown"); +exports.es2017_sharedmemory = { + ...es2015_symbol_1.es2015_symbol, + ...es2015_symbol_wellknown_1.es2015_symbol_wellknown, + SharedArrayBuffer: base_config_1.TYPE_VALUE, + SharedArrayBufferConstructor: base_config_1.TYPE, + ArrayBufferTypes: base_config_1.TYPE, + Atomics: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=es2017.sharedmemory.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js.map new file mode 100644 index 0000000000..5f0d061d21 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.sharedmemory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.sharedmemory.js","sourceRoot":"","sources":["../../src/lib/es2017.sharedmemory.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AACjD,mDAAgD;AAChD,uEAAoE;AAEvD,QAAA,mBAAmB,GAAG;IACjC,GAAG,6BAAa;IAChB,GAAG,iDAAuB;IAC1B,iBAAiB,EAAE,wBAAU;IAC7B,4BAA4B,EAAE,kBAAI;IAClC,gBAAgB,EAAE,kBAAI;IACtB,OAAO,EAAE,wBAAU;CAC0B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts new file mode 100644 index 0000000000..effb6ad8c1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2017_string: Record; +//# sourceMappingURL=es2017.string.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts.map new file mode 100644 index 0000000000..2fc5a8835a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAEqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js new file mode 100644 index 0000000000..35d566c30d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_string = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_string = { + String: base_config_1.TYPE, +}; +//# sourceMappingURL=es2017.string.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js.map new file mode 100644 index 0000000000..f4958cbee3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.string.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.string.js","sourceRoot":"","sources":["../../src/lib/es2017.string.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts new file mode 100644 index 0000000000..97b9cce1d2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2017_typedarrays: Record; +//# sourceMappingURL=es2017.typedarrays.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts.map new file mode 100644 index 0000000000..341ece0b99 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.typedarrays.d.ts","sourceRoot":"","sources":["../../src/lib/es2017.typedarrays.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,kBAAkB,4CAUgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js new file mode 100644 index 0000000000..b11fa70229 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2017_typedarrays = void 0; +const base_config_1 = require("./base-config"); +exports.es2017_typedarrays = { + Int8ArrayConstructor: base_config_1.TYPE, + Uint8ArrayConstructor: base_config_1.TYPE, + Uint8ClampedArrayConstructor: base_config_1.TYPE, + Int16ArrayConstructor: base_config_1.TYPE, + Uint16ArrayConstructor: base_config_1.TYPE, + Int32ArrayConstructor: base_config_1.TYPE, + Uint32ArrayConstructor: base_config_1.TYPE, + Float32ArrayConstructor: base_config_1.TYPE, + Float64ArrayConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2017.typedarrays.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js.map new file mode 100644 index 0000000000..83c217b942 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2017.typedarrays.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2017.typedarrays.js","sourceRoot":"","sources":["../../src/lib/es2017.typedarrays.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,kBAAkB,GAAG;IAChC,oBAAoB,EAAE,kBAAI;IAC1B,qBAAqB,EAAE,kBAAI;IAC3B,4BAA4B,EAAE,kBAAI;IAClC,qBAAqB,EAAE,kBAAI;IAC3B,sBAAsB,EAAE,kBAAI;IAC5B,qBAAqB,EAAE,kBAAI;IAC3B,sBAAsB,EAAE,kBAAI;IAC5B,uBAAuB,EAAE,kBAAI;IAC7B,uBAAuB,EAAE,kBAAI;CACgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts new file mode 100644 index 0000000000..1c0ad38508 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2018_asyncgenerator: Record; +//# sourceMappingURL=es2018.asyncgenerator.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts.map new file mode 100644 index 0000000000..25003dd4b6 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.asyncgenerator.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.asyncgenerator.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,qBAAqB,4CAKa,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js new file mode 100644 index 0000000000..5d7a00c739 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js @@ -0,0 +1,16 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_asyncgenerator = void 0; +const base_config_1 = require("./base-config"); +const es2018_asynciterable_1 = require("./es2018.asynciterable"); +exports.es2018_asyncgenerator = { + ...es2018_asynciterable_1.es2018_asynciterable, + AsyncGenerator: base_config_1.TYPE, + AsyncGeneratorFunction: base_config_1.TYPE, + AsyncGeneratorFunctionConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2018.asyncgenerator.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js.map new file mode 100644 index 0000000000..1ae88bb00f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asyncgenerator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.asyncgenerator.js","sourceRoot":"","sources":["../../src/lib/es2018.asyncgenerator.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,iEAA8D;AAEjD,QAAA,qBAAqB,GAAG;IACnC,GAAG,2CAAoB;IACvB,cAAc,EAAE,kBAAI;IACpB,sBAAsB,EAAE,kBAAI;IAC5B,iCAAiC,EAAE,kBAAI;CACM,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts new file mode 100644 index 0000000000..441e1b4ac6 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2018_asynciterable: Record; +//# sourceMappingURL=es2018.asynciterable.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts.map new file mode 100644 index 0000000000..bc739a7a9a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.asynciterable.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.asynciterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAK9D,eAAO,MAAM,oBAAoB,4CAOc,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js new file mode 100644 index 0000000000..1e194fc7d8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js @@ -0,0 +1,19 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_asynciterable = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.es2018_asynciterable = { + ...es2015_symbol_1.es2015_symbol, + ...es2015_iterable_1.es2015_iterable, + SymbolConstructor: base_config_1.TYPE, + AsyncIterator: base_config_1.TYPE, + AsyncIterable: base_config_1.TYPE, + AsyncIterableIterator: base_config_1.TYPE, +}; +//# sourceMappingURL=es2018.asynciterable.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js.map new file mode 100644 index 0000000000..4c153cd780 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.asynciterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.asynciterable.js","sourceRoot":"","sources":["../../src/lib/es2018.asynciterable.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,uDAAoD;AACpD,mDAAgD;AAEnC,QAAA,oBAAoB,GAAG;IAClC,GAAG,6BAAa;IAChB,GAAG,iCAAe;IAClB,iBAAiB,EAAE,kBAAI;IACvB,aAAa,EAAE,kBAAI;IACnB,aAAa,EAAE,kBAAI;IACnB,qBAAqB,EAAE,kBAAI;CACkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts new file mode 100644 index 0000000000..d6a57e0bb0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2018: Record; +//# sourceMappingURL=es2018.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts.map new file mode 100644 index 0000000000..505a572d33 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAQ9D,eAAO,MAAM,MAAM,4CAO4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts new file mode 100644 index 0000000000..def2b62de2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2018_full: Record; +//# sourceMappingURL=es2018.full.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts.map new file mode 100644 index 0000000000..ddaa9e4204 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAO9D,eAAO,MAAM,WAAW,4CAMuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js new file mode 100644 index 0000000000..19d4869d2f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es2018_1 = require("./es2018"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2018_full = { + ...es2018_1.es2018, + ...dom_1.dom, + ...webworker_importscripts_1.webworker_importscripts, + ...scripthost_1.scripthost, + ...dom_iterable_1.dom_iterable, +}; +//# sourceMappingURL=es2018.full.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js.map new file mode 100644 index 0000000000..640ad30cfb --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.full.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.full.js","sourceRoot":"","sources":["../../src/lib/es2018.full.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,iDAA8C;AAC9C,qCAAkC;AAClC,6CAA0C;AAC1C,uEAAoE;AAEvD,QAAA,WAAW,GAAG;IACzB,GAAG,eAAM;IACT,GAAG,SAAG;IACN,GAAG,iDAAuB;IAC1B,GAAG,uBAAU;IACb,GAAG,2BAAY;CAC8B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts new file mode 100644 index 0000000000..e80a679388 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2018_intl: Record; +//# sourceMappingURL=es2018.intl.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts.map new file mode 100644 index 0000000000..a9317f801f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,WAAW,4CAEuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js new file mode 100644 index 0000000000..c970ac4706 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2018_intl = { + Intl: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=es2018.intl.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js.map new file mode 100644 index 0000000000..04253152d5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.intl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.intl.js","sourceRoot":"","sources":["../../src/lib/es2018.intl.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAA2C;AAE9B,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,wBAAU;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js new file mode 100644 index 0000000000..5efcd20068 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js @@ -0,0 +1,22 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018 = void 0; +const es2017_1 = require("./es2017"); +const es2018_asyncgenerator_1 = require("./es2018.asyncgenerator"); +const es2018_asynciterable_1 = require("./es2018.asynciterable"); +const es2018_intl_1 = require("./es2018.intl"); +const es2018_promise_1 = require("./es2018.promise"); +const es2018_regexp_1 = require("./es2018.regexp"); +exports.es2018 = { + ...es2017_1.es2017, + ...es2018_asynciterable_1.es2018_asynciterable, + ...es2018_asyncgenerator_1.es2018_asyncgenerator, + ...es2018_promise_1.es2018_promise, + ...es2018_regexp_1.es2018_regexp, + ...es2018_intl_1.es2018_intl, +}; +//# sourceMappingURL=es2018.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js.map new file mode 100644 index 0000000000..ce377332e9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.js","sourceRoot":"","sources":["../../src/lib/es2018.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,qCAAkC;AAClC,mEAAgE;AAChE,iEAA8D;AAC9D,+CAA4C;AAC5C,qDAAkD;AAClD,mDAAgD;AAEnC,QAAA,MAAM,GAAG;IACpB,GAAG,eAAM;IACT,GAAG,2CAAoB;IACvB,GAAG,6CAAqB;IACxB,GAAG,+BAAc;IACjB,GAAG,6BAAa;IAChB,GAAG,yBAAW;CAC+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts new file mode 100644 index 0000000000..2ff021b6be --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2018_promise: Record; +//# sourceMappingURL=es2018.promise.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts.map new file mode 100644 index 0000000000..a0d98e59a1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.promise.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,cAAc,4CAEoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js new file mode 100644 index 0000000000..fc2d8d06d3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_promise = void 0; +const base_config_1 = require("./base-config"); +exports.es2018_promise = { + Promise: base_config_1.TYPE, +}; +//# sourceMappingURL=es2018.promise.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js.map new file mode 100644 index 0000000000..225260eef9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.promise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.promise.js","sourceRoot":"","sources":["../../src/lib/es2018.promise.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,kBAAI;CACgC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts new file mode 100644 index 0000000000..2e69d45a15 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2018_regexp: Record; +//# sourceMappingURL=es2018.regexp.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts.map new file mode 100644 index 0000000000..c8b6edb406 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.regexp.d.ts","sourceRoot":"","sources":["../../src/lib/es2018.regexp.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAIqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js new file mode 100644 index 0000000000..c30f77eb38 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2018_regexp = void 0; +const base_config_1 = require("./base-config"); +exports.es2018_regexp = { + RegExpMatchArray: base_config_1.TYPE, + RegExpExecArray: base_config_1.TYPE, + RegExp: base_config_1.TYPE, +}; +//# sourceMappingURL=es2018.regexp.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js.map new file mode 100644 index 0000000000..9c13258aa9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2018.regexp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2018.regexp.js","sourceRoot":"","sources":["../../src/lib/es2018.regexp.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,gBAAgB,EAAE,kBAAI;IACtB,eAAe,EAAE,kBAAI;IACrB,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts new file mode 100644 index 0000000000..845c62f74e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2019_array: Record; +//# sourceMappingURL=es2019.array.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts.map new file mode 100644 index 0000000000..acc321d688 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.array.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.array.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,YAAY,4CAIsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js new file mode 100644 index 0000000000..03cc788294 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_array = void 0; +const base_config_1 = require("./base-config"); +exports.es2019_array = { + FlatArray: base_config_1.TYPE, + ReadonlyArray: base_config_1.TYPE, + Array: base_config_1.TYPE, +}; +//# sourceMappingURL=es2019.array.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js.map new file mode 100644 index 0000000000..f2bff3efa1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.array.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.array.js","sourceRoot":"","sources":["../../src/lib/es2019.array.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,YAAY,GAAG;IAC1B,SAAS,EAAE,kBAAI;IACf,aAAa,EAAE,kBAAI;IACnB,KAAK,EAAE,kBAAI;CACkC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts new file mode 100644 index 0000000000..1d01d51d9d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2019: Record; +//# sourceMappingURL=es2019.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map new file mode 100644 index 0000000000..26ebac264d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAQ9D,eAAO,MAAM,MAAM,4CAO4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts new file mode 100644 index 0000000000..d43d283b54 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2019_full: Record; +//# sourceMappingURL=es2019.full.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts.map new file mode 100644 index 0000000000..76666dfa9a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAO9D,eAAO,MAAM,WAAW,4CAMuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js new file mode 100644 index 0000000000..43fd80b765 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es2019_1 = require("./es2019"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2019_full = { + ...es2019_1.es2019, + ...dom_1.dom, + ...webworker_importscripts_1.webworker_importscripts, + ...scripthost_1.scripthost, + ...dom_iterable_1.dom_iterable, +}; +//# sourceMappingURL=es2019.full.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js.map new file mode 100644 index 0000000000..f530e27f4f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.full.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.full.js","sourceRoot":"","sources":["../../src/lib/es2019.full.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,iDAA8C;AAC9C,qCAAkC;AAClC,6CAA0C;AAC1C,uEAAoE;AAEvD,QAAA,WAAW,GAAG;IACzB,GAAG,eAAM;IACT,GAAG,SAAG;IACN,GAAG,iDAAuB;IAC1B,GAAG,uBAAU;IACb,GAAG,2BAAY;CAC8B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts new file mode 100644 index 0000000000..c560ab4a20 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2019_intl: Record; +//# sourceMappingURL=es2019.intl.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts.map new file mode 100644 index 0000000000..8d18aec322 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,WAAW,4CAEuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js new file mode 100644 index 0000000000..c158061a91 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2019_intl = { + Intl: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=es2019.intl.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js.map new file mode 100644 index 0000000000..36bb92f961 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.intl.js","sourceRoot":"","sources":["../../src/lib/es2019.intl.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAA2C;AAE9B,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,wBAAU;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js new file mode 100644 index 0000000000..fe90fc3b02 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js @@ -0,0 +1,22 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019 = void 0; +const es2018_1 = require("./es2018"); +const es2019_array_1 = require("./es2019.array"); +const es2019_intl_1 = require("./es2019.intl"); +const es2019_object_1 = require("./es2019.object"); +const es2019_string_1 = require("./es2019.string"); +const es2019_symbol_1 = require("./es2019.symbol"); +exports.es2019 = { + ...es2018_1.es2018, + ...es2019_array_1.es2019_array, + ...es2019_object_1.es2019_object, + ...es2019_string_1.es2019_string, + ...es2019_symbol_1.es2019_symbol, + ...es2019_intl_1.es2019_intl, +}; +//# sourceMappingURL=es2019.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js.map new file mode 100644 index 0000000000..6be638e5f4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.js","sourceRoot":"","sources":["../../src/lib/es2019.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,qCAAkC;AAClC,iDAA8C;AAC9C,+CAA4C;AAC5C,mDAAgD;AAChD,mDAAgD;AAChD,mDAAgD;AAEnC,QAAA,MAAM,GAAG;IACpB,GAAG,eAAM;IACT,GAAG,2BAAY;IACf,GAAG,6BAAa;IAChB,GAAG,6BAAa;IAChB,GAAG,6BAAa;IAChB,GAAG,yBAAW;CAC+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts new file mode 100644 index 0000000000..317dc3485e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2019_object: Record; +//# sourceMappingURL=es2019.object.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts.map new file mode 100644 index 0000000000..383efcbd59 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.object.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.object.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,aAAa,4CAGqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js new file mode 100644 index 0000000000..a697b57a5d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_object = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +exports.es2019_object = { + ...es2015_iterable_1.es2015_iterable, + ObjectConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2019.object.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js.map new file mode 100644 index 0000000000..6db85cca52 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.object.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.object.js","sourceRoot":"","sources":["../../src/lib/es2019.object.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,uDAAoD;AAEvC,QAAA,aAAa,GAAG;IAC3B,GAAG,iCAAe;IAClB,iBAAiB,EAAE,kBAAI;CACsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts new file mode 100644 index 0000000000..6400ddca23 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2019_string: Record; +//# sourceMappingURL=es2019.string.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts.map new file mode 100644 index 0000000000..93c058b94a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAEqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js new file mode 100644 index 0000000000..0ff66eba25 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_string = void 0; +const base_config_1 = require("./base-config"); +exports.es2019_string = { + String: base_config_1.TYPE, +}; +//# sourceMappingURL=es2019.string.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js.map new file mode 100644 index 0000000000..093519b596 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.string.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.string.js","sourceRoot":"","sources":["../../src/lib/es2019.string.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts new file mode 100644 index 0000000000..66073bcde6 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2019_symbol: Record; +//# sourceMappingURL=es2019.symbol.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts.map new file mode 100644 index 0000000000..215cc8cd2d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.symbol.d.ts","sourceRoot":"","sources":["../../src/lib/es2019.symbol.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAEqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js new file mode 100644 index 0000000000..3e793b5102 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2019_symbol = void 0; +const base_config_1 = require("./base-config"); +exports.es2019_symbol = { + Symbol: base_config_1.TYPE, +}; +//# sourceMappingURL=es2019.symbol.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js.map new file mode 100644 index 0000000000..27b55a5800 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.symbol.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2019.symbol.js","sourceRoot":"","sources":["../../src/lib/es2019.symbol.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts new file mode 100644 index 0000000000..05bbb19ec7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2020_bigint: Record; +//# sourceMappingURL=es2020.bigint.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts.map new file mode 100644 index 0000000000..29b468e963 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.bigint.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.bigint.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,aAAa,4CAWqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js new file mode 100644 index 0000000000..5ad2e64455 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js @@ -0,0 +1,22 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_bigint = void 0; +const base_config_1 = require("./base-config"); +const es2020_intl_1 = require("./es2020.intl"); +exports.es2020_bigint = { + ...es2020_intl_1.es2020_intl, + BigIntToLocaleStringOptions: base_config_1.TYPE, + BigInt: base_config_1.TYPE_VALUE, + BigIntConstructor: base_config_1.TYPE, + BigInt64Array: base_config_1.TYPE_VALUE, + BigInt64ArrayConstructor: base_config_1.TYPE, + BigUint64Array: base_config_1.TYPE_VALUE, + BigUint64ArrayConstructor: base_config_1.TYPE, + DataView: base_config_1.TYPE, + Intl: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=es2020.bigint.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js.map new file mode 100644 index 0000000000..3978ec9911 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.bigint.js","sourceRoot":"","sources":["../../src/lib/es2020.bigint.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AACjD,+CAA4C;AAE/B,QAAA,aAAa,GAAG;IAC3B,GAAG,yBAAW;IACd,2BAA2B,EAAE,kBAAI;IACjC,MAAM,EAAE,wBAAU;IAClB,iBAAiB,EAAE,kBAAI;IACvB,aAAa,EAAE,wBAAU;IACzB,wBAAwB,EAAE,kBAAI;IAC9B,cAAc,EAAE,wBAAU;IAC1B,yBAAyB,EAAE,kBAAI;IAC/B,QAAQ,EAAE,kBAAI;IACd,IAAI,EAAE,wBAAU;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts new file mode 100644 index 0000000000..9786e11eb6 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2020: Record; +//# sourceMappingURL=es2020.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts.map new file mode 100644 index 0000000000..ccab2e4a85 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAW9D,eAAO,MAAM,MAAM,4CAU4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts new file mode 100644 index 0000000000..e7ee0517cc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2020_date: Record; +//# sourceMappingURL=es2020.date.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts.map new file mode 100644 index 0000000000..c322894647 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.date.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.date.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,WAAW,4CAGuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js new file mode 100644 index 0000000000..fb41d7ba15 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_date = void 0; +const base_config_1 = require("./base-config"); +const es2020_intl_1 = require("./es2020.intl"); +exports.es2020_date = { + ...es2020_intl_1.es2020_intl, + Date: base_config_1.TYPE, +}; +//# sourceMappingURL=es2020.date.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js.map new file mode 100644 index 0000000000..a3c9f94197 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.date.js","sourceRoot":"","sources":["../../src/lib/es2020.date.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,+CAA4C;AAE/B,QAAA,WAAW,GAAG;IACzB,GAAG,yBAAW;IACd,IAAI,EAAE,kBAAI;CACmC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts new file mode 100644 index 0000000000..67ce52018a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2020_full: Record; +//# sourceMappingURL=es2020.full.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts.map new file mode 100644 index 0000000000..42cfead164 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAO9D,eAAO,MAAM,WAAW,4CAMuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js new file mode 100644 index 0000000000..334d0d1467 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es2020_1 = require("./es2020"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2020_full = { + ...es2020_1.es2020, + ...dom_1.dom, + ...webworker_importscripts_1.webworker_importscripts, + ...scripthost_1.scripthost, + ...dom_iterable_1.dom_iterable, +}; +//# sourceMappingURL=es2020.full.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js.map new file mode 100644 index 0000000000..3c313c52ff --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.full.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.full.js","sourceRoot":"","sources":["../../src/lib/es2020.full.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,iDAA8C;AAC9C,qCAAkC;AAClC,6CAA0C;AAC1C,uEAAoE;AAEvD,QAAA,WAAW,GAAG;IACzB,GAAG,eAAM;IACT,GAAG,SAAG;IACN,GAAG,iDAAuB;IAC1B,GAAG,uBAAU;IACb,GAAG,2BAAY;CAC8B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts new file mode 100644 index 0000000000..6fe292a705 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2020_intl: Record; +//# sourceMappingURL=es2020.intl.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts.map new file mode 100644 index 0000000000..53f526e183 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,WAAW,4CAGuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js new file mode 100644 index 0000000000..02fbb225d6 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_intl = void 0; +const base_config_1 = require("./base-config"); +const es2018_intl_1 = require("./es2018.intl"); +exports.es2020_intl = { + ...es2018_intl_1.es2018_intl, + Intl: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=es2020.intl.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js.map new file mode 100644 index 0000000000..8f1e235ea1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.intl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.intl.js","sourceRoot":"","sources":["../../src/lib/es2020.intl.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAA2C;AAC3C,+CAA4C;AAE/B,QAAA,WAAW,GAAG;IACzB,GAAG,yBAAW;IACd,IAAI,EAAE,wBAAU;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js new file mode 100644 index 0000000000..9c9c4ed852 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js @@ -0,0 +1,28 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020 = void 0; +const es2019_1 = require("./es2019"); +const es2020_bigint_1 = require("./es2020.bigint"); +const es2020_date_1 = require("./es2020.date"); +const es2020_intl_1 = require("./es2020.intl"); +const es2020_number_1 = require("./es2020.number"); +const es2020_promise_1 = require("./es2020.promise"); +const es2020_sharedmemory_1 = require("./es2020.sharedmemory"); +const es2020_string_1 = require("./es2020.string"); +const es2020_symbol_wellknown_1 = require("./es2020.symbol.wellknown"); +exports.es2020 = { + ...es2019_1.es2019, + ...es2020_bigint_1.es2020_bigint, + ...es2020_date_1.es2020_date, + ...es2020_number_1.es2020_number, + ...es2020_promise_1.es2020_promise, + ...es2020_sharedmemory_1.es2020_sharedmemory, + ...es2020_string_1.es2020_string, + ...es2020_symbol_wellknown_1.es2020_symbol_wellknown, + ...es2020_intl_1.es2020_intl, +}; +//# sourceMappingURL=es2020.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js.map new file mode 100644 index 0000000000..f6eef1c323 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.js","sourceRoot":"","sources":["../../src/lib/es2020.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,qCAAkC;AAClC,mDAAgD;AAChD,+CAA4C;AAC5C,+CAA4C;AAC5C,mDAAgD;AAChD,qDAAkD;AAClD,+DAA4D;AAC5D,mDAAgD;AAChD,uEAAoE;AAEvD,QAAA,MAAM,GAAG;IACpB,GAAG,eAAM;IACT,GAAG,6BAAa;IAChB,GAAG,yBAAW;IACd,GAAG,6BAAa;IAChB,GAAG,+BAAc;IACjB,GAAG,yCAAmB;IACtB,GAAG,6BAAa;IAChB,GAAG,iDAAuB;IAC1B,GAAG,yBAAW;CAC+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts new file mode 100644 index 0000000000..dff240d75d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2020_number: Record; +//# sourceMappingURL=es2020.number.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts.map new file mode 100644 index 0000000000..8dc41a5bf1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.number.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.number.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,aAAa,4CAGqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js new file mode 100644 index 0000000000..82fe2bf7b2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_number = void 0; +const base_config_1 = require("./base-config"); +const es2020_intl_1 = require("./es2020.intl"); +exports.es2020_number = { + ...es2020_intl_1.es2020_intl, + Number: base_config_1.TYPE, +}; +//# sourceMappingURL=es2020.number.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js.map new file mode 100644 index 0000000000..a96153d7e1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.number.js","sourceRoot":"","sources":["../../src/lib/es2020.number.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,+CAA4C;AAE/B,QAAA,aAAa,GAAG;IAC3B,GAAG,yBAAW;IACd,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts new file mode 100644 index 0000000000..b45f2053e4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2020_promise: Record; +//# sourceMappingURL=es2020.promise.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts.map new file mode 100644 index 0000000000..3d234de370 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.promise.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,cAAc,4CAKoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js new file mode 100644 index 0000000000..a9be608347 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_promise = void 0; +const base_config_1 = require("./base-config"); +exports.es2020_promise = { + PromiseFulfilledResult: base_config_1.TYPE, + PromiseRejectedResult: base_config_1.TYPE, + PromiseSettledResult: base_config_1.TYPE, + PromiseConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2020.promise.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js.map new file mode 100644 index 0000000000..20e4f59aa8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.promise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.promise.js","sourceRoot":"","sources":["../../src/lib/es2020.promise.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,cAAc,GAAG;IAC5B,sBAAsB,EAAE,kBAAI;IAC5B,qBAAqB,EAAE,kBAAI;IAC3B,oBAAoB,EAAE,kBAAI;IAC1B,kBAAkB,EAAE,kBAAI;CACqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts new file mode 100644 index 0000000000..ebbb06c049 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2020_sharedmemory: Record; +//# sourceMappingURL=es2020.sharedmemory.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts.map new file mode 100644 index 0000000000..e05d9008d1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.sharedmemory.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.sharedmemory.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,mBAAmB,4CAEe,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js new file mode 100644 index 0000000000..3720d22fd7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_sharedmemory = void 0; +const base_config_1 = require("./base-config"); +exports.es2020_sharedmemory = { + Atomics: base_config_1.TYPE, +}; +//# sourceMappingURL=es2020.sharedmemory.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js.map new file mode 100644 index 0000000000..2f9441c369 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.sharedmemory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.sharedmemory.js","sourceRoot":"","sources":["../../src/lib/es2020.sharedmemory.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,mBAAmB,GAAG;IACjC,OAAO,EAAE,kBAAI;CACgC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts new file mode 100644 index 0000000000..2d116e7de9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2020_string: Record; +//# sourceMappingURL=es2020.string.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts.map new file mode 100644 index 0000000000..562c528fe1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,aAAa,4CAGqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js new file mode 100644 index 0000000000..cc09bd8042 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_string = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +exports.es2020_string = { + ...es2015_iterable_1.es2015_iterable, + String: base_config_1.TYPE, +}; +//# sourceMappingURL=es2020.string.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js.map new file mode 100644 index 0000000000..8438a49b65 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.string.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.string.js","sourceRoot":"","sources":["../../src/lib/es2020.string.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,uDAAoD;AAEvC,QAAA,aAAa,GAAG;IAC3B,GAAG,iCAAe;IAClB,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts new file mode 100644 index 0000000000..682c705aea --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2020_symbol_wellknown: Record; +//# sourceMappingURL=es2020.symbol.wellknown.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts.map new file mode 100644 index 0000000000..cb12cbef70 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.symbol.wellknown.d.ts","sourceRoot":"","sources":["../../src/lib/es2020.symbol.wellknown.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAK9D,eAAO,MAAM,uBAAuB,4CAKW,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js new file mode 100644 index 0000000000..b7b259a74b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2020_symbol_wellknown = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.es2020_symbol_wellknown = { + ...es2015_iterable_1.es2015_iterable, + ...es2015_symbol_1.es2015_symbol, + SymbolConstructor: base_config_1.TYPE, + RegExp: base_config_1.TYPE, +}; +//# sourceMappingURL=es2020.symbol.wellknown.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js.map new file mode 100644 index 0000000000..a6d2d1e037 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.symbol.wellknown.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2020.symbol.wellknown.js","sourceRoot":"","sources":["../../src/lib/es2020.symbol.wellknown.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,uDAAoD;AACpD,mDAAgD;AAEnC,QAAA,uBAAuB,GAAG;IACrC,GAAG,iCAAe;IAClB,GAAG,6BAAa;IAChB,iBAAiB,EAAE,kBAAI;IACvB,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts new file mode 100644 index 0000000000..c9ff9f6b41 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2021: Record; +//# sourceMappingURL=es2021.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts.map new file mode 100644 index 0000000000..d4788d04fc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAO9D,eAAO,MAAM,MAAM,4CAM4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts new file mode 100644 index 0000000000..31fc0ef749 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2021_full: Record; +//# sourceMappingURL=es2021.full.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts.map new file mode 100644 index 0000000000..2f31dcf630 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAO9D,eAAO,MAAM,WAAW,4CAMuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js new file mode 100644 index 0000000000..3efa46a796 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es2021_1 = require("./es2021"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2021_full = { + ...es2021_1.es2021, + ...dom_1.dom, + ...webworker_importscripts_1.webworker_importscripts, + ...scripthost_1.scripthost, + ...dom_iterable_1.dom_iterable, +}; +//# sourceMappingURL=es2021.full.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js.map new file mode 100644 index 0000000000..74687e165a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.full.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.full.js","sourceRoot":"","sources":["../../src/lib/es2021.full.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,iDAA8C;AAC9C,qCAAkC;AAClC,6CAA0C;AAC1C,uEAAoE;AAEvD,QAAA,WAAW,GAAG;IACzB,GAAG,eAAM;IACT,GAAG,SAAG;IACN,GAAG,iDAAuB;IAC1B,GAAG,uBAAU;IACb,GAAG,2BAAY;CAC8B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts new file mode 100644 index 0000000000..4435689da1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2021_intl: Record; +//# sourceMappingURL=es2021.intl.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts.map new file mode 100644 index 0000000000..b6b442b3a5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,WAAW,4CAEuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js new file mode 100644 index 0000000000..632397e787 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2021_intl = { + Intl: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=es2021.intl.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js.map new file mode 100644 index 0000000000..30c34b18a3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.intl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.intl.js","sourceRoot":"","sources":["../../src/lib/es2021.intl.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAA2C;AAE9B,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,wBAAU;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js new file mode 100644 index 0000000000..137bf044b0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021 = void 0; +const es2020_1 = require("./es2020"); +const es2021_intl_1 = require("./es2021.intl"); +const es2021_promise_1 = require("./es2021.promise"); +const es2021_string_1 = require("./es2021.string"); +const es2021_weakref_1 = require("./es2021.weakref"); +exports.es2021 = { + ...es2020_1.es2020, + ...es2021_promise_1.es2021_promise, + ...es2021_string_1.es2021_string, + ...es2021_weakref_1.es2021_weakref, + ...es2021_intl_1.es2021_intl, +}; +//# sourceMappingURL=es2021.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js.map new file mode 100644 index 0000000000..955ffb7b12 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.js","sourceRoot":"","sources":["../../src/lib/es2021.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,qCAAkC;AAClC,+CAA4C;AAC5C,qDAAkD;AAClD,mDAAgD;AAChD,qDAAkD;AAErC,QAAA,MAAM,GAAG;IACpB,GAAG,eAAM;IACT,GAAG,+BAAc;IACjB,GAAG,6BAAa;IAChB,GAAG,+BAAc;IACjB,GAAG,yBAAW;CAC+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts new file mode 100644 index 0000000000..8eb9e9ecd6 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2021_promise: Record; +//# sourceMappingURL=es2021.promise.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts.map new file mode 100644 index 0000000000..5d48819600 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.promise.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,cAAc,4CAIoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js new file mode 100644 index 0000000000..52257927b5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021_promise = void 0; +const base_config_1 = require("./base-config"); +exports.es2021_promise = { + AggregateError: base_config_1.TYPE_VALUE, + AggregateErrorConstructor: base_config_1.TYPE, + PromiseConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2021.promise.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js.map new file mode 100644 index 0000000000..0fd4aad097 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.promise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.promise.js","sourceRoot":"","sources":["../../src/lib/es2021.promise.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AAEpC,QAAA,cAAc,GAAG;IAC5B,cAAc,EAAE,wBAAU;IAC1B,yBAAyB,EAAE,kBAAI;IAC/B,kBAAkB,EAAE,kBAAI;CACqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts new file mode 100644 index 0000000000..f54d34a067 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2021_string: Record; +//# sourceMappingURL=es2021.string.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts.map new file mode 100644 index 0000000000..285525b0ca --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAEqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js new file mode 100644 index 0000000000..2dc8f69c66 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021_string = void 0; +const base_config_1 = require("./base-config"); +exports.es2021_string = { + String: base_config_1.TYPE, +}; +//# sourceMappingURL=es2021.string.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js.map new file mode 100644 index 0000000000..9511c8fa26 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.string.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.string.js","sourceRoot":"","sources":["../../src/lib/es2021.string.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts new file mode 100644 index 0000000000..d7f5b67489 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2021_weakref: Record; +//# sourceMappingURL=es2021.weakref.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts.map new file mode 100644 index 0000000000..98ed54d021 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.weakref.d.ts","sourceRoot":"","sources":["../../src/lib/es2021.weakref.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,cAAc,4CAKoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js new file mode 100644 index 0000000000..1ab7fdd164 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2021_weakref = void 0; +const base_config_1 = require("./base-config"); +exports.es2021_weakref = { + WeakRef: base_config_1.TYPE_VALUE, + WeakRefConstructor: base_config_1.TYPE, + FinalizationRegistry: base_config_1.TYPE_VALUE, + FinalizationRegistryConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2021.weakref.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js.map new file mode 100644 index 0000000000..9955a62cc2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2021.weakref.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2021.weakref.js","sourceRoot":"","sources":["../../src/lib/es2021.weakref.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AAEpC,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,wBAAU;IACnB,kBAAkB,EAAE,kBAAI;IACxB,oBAAoB,EAAE,wBAAU;IAChC,+BAA+B,EAAE,kBAAI;CACQ,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts new file mode 100644 index 0000000000..b9d87cde81 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2022_array: Record; +//# sourceMappingURL=es2022.array.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts.map new file mode 100644 index 0000000000..3393052f3f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.array.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.array.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,YAAY,4CAcsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js new file mode 100644 index 0000000000..fb14b126ac --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_array = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_array = { + Array: base_config_1.TYPE, + ReadonlyArray: base_config_1.TYPE, + Int8Array: base_config_1.TYPE, + Uint8Array: base_config_1.TYPE, + Uint8ClampedArray: base_config_1.TYPE, + Int16Array: base_config_1.TYPE, + Uint16Array: base_config_1.TYPE, + Int32Array: base_config_1.TYPE, + Uint32Array: base_config_1.TYPE, + Float32Array: base_config_1.TYPE, + Float64Array: base_config_1.TYPE, + BigInt64Array: base_config_1.TYPE, + BigUint64Array: base_config_1.TYPE, +}; +//# sourceMappingURL=es2022.array.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js.map new file mode 100644 index 0000000000..37ec55a8e8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.array.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.array.js","sourceRoot":"","sources":["../../src/lib/es2022.array.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,YAAY,GAAG;IAC1B,KAAK,EAAE,kBAAI;IACX,aAAa,EAAE,kBAAI;IACnB,SAAS,EAAE,kBAAI;IACf,UAAU,EAAE,kBAAI;IAChB,iBAAiB,EAAE,kBAAI;IACvB,UAAU,EAAE,kBAAI;IAChB,WAAW,EAAE,kBAAI;IACjB,UAAU,EAAE,kBAAI;IAChB,WAAW,EAAE,kBAAI;IACjB,YAAY,EAAE,kBAAI;IAClB,YAAY,EAAE,kBAAI;IAClB,aAAa,EAAE,kBAAI;IACnB,cAAc,EAAE,kBAAI;CACyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts new file mode 100644 index 0000000000..12bc2fb927 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2022: Record; +//# sourceMappingURL=es2022.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map new file mode 100644 index 0000000000..6aee1a9156 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAU9D,eAAO,MAAM,MAAM,4CAS4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts new file mode 100644 index 0000000000..6619e107e5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2022_error: Record; +//# sourceMappingURL=es2022.error.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts.map new file mode 100644 index 0000000000..ce3e985bb3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.error.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.error.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,YAAY,4CAWsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js new file mode 100644 index 0000000000..0601ac652e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js @@ -0,0 +1,21 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_error = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_error = { + ErrorOptions: base_config_1.TYPE, + Error: base_config_1.TYPE, + ErrorConstructor: base_config_1.TYPE, + EvalErrorConstructor: base_config_1.TYPE, + RangeErrorConstructor: base_config_1.TYPE, + ReferenceErrorConstructor: base_config_1.TYPE, + SyntaxErrorConstructor: base_config_1.TYPE, + TypeErrorConstructor: base_config_1.TYPE, + URIErrorConstructor: base_config_1.TYPE, + AggregateErrorConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2022.error.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js.map new file mode 100644 index 0000000000..5a0e9b3f7a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.error.js","sourceRoot":"","sources":["../../src/lib/es2022.error.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,YAAY,GAAG;IAC1B,YAAY,EAAE,kBAAI;IAClB,KAAK,EAAE,kBAAI;IACX,gBAAgB,EAAE,kBAAI;IACtB,oBAAoB,EAAE,kBAAI;IAC1B,qBAAqB,EAAE,kBAAI;IAC3B,yBAAyB,EAAE,kBAAI;IAC/B,sBAAsB,EAAE,kBAAI;IAC5B,oBAAoB,EAAE,kBAAI;IAC1B,mBAAmB,EAAE,kBAAI;IACzB,yBAAyB,EAAE,kBAAI;CACc,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts new file mode 100644 index 0000000000..df141b032c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2022_full: Record; +//# sourceMappingURL=es2022.full.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts.map new file mode 100644 index 0000000000..1621869f8d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAO9D,eAAO,MAAM,WAAW,4CAMuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js new file mode 100644 index 0000000000..e2f8eddb82 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es2022_1 = require("./es2022"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2022_full = { + ...es2022_1.es2022, + ...dom_1.dom, + ...webworker_importscripts_1.webworker_importscripts, + ...scripthost_1.scripthost, + ...dom_iterable_1.dom_iterable, +}; +//# sourceMappingURL=es2022.full.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js.map new file mode 100644 index 0000000000..e5b113fa44 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.full.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.full.js","sourceRoot":"","sources":["../../src/lib/es2022.full.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,iDAA8C;AAC9C,qCAAkC;AAClC,6CAA0C;AAC1C,uEAAoE;AAEvD,QAAA,WAAW,GAAG;IACzB,GAAG,eAAM;IACT,GAAG,SAAG;IACN,GAAG,iDAAuB;IAC1B,GAAG,uBAAU;IACb,GAAG,2BAAY;CAC8B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts new file mode 100644 index 0000000000..2b2c08137c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2022_intl: Record; +//# sourceMappingURL=es2022.intl.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts.map new file mode 100644 index 0000000000..aa42c471bd --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.intl.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,WAAW,4CAEuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js new file mode 100644 index 0000000000..860a3ecb36 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_intl = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_intl = { + Intl: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=es2022.intl.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js.map new file mode 100644 index 0000000000..3b1be318f7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.intl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.intl.js","sourceRoot":"","sources":["../../src/lib/es2022.intl.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAA2C;AAE9B,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,wBAAU;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js new file mode 100644 index 0000000000..13109d6333 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js @@ -0,0 +1,26 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022 = void 0; +const es2021_1 = require("./es2021"); +const es2022_array_1 = require("./es2022.array"); +const es2022_error_1 = require("./es2022.error"); +const es2022_intl_1 = require("./es2022.intl"); +const es2022_object_1 = require("./es2022.object"); +const es2022_regexp_1 = require("./es2022.regexp"); +const es2022_sharedmemory_1 = require("./es2022.sharedmemory"); +const es2022_string_1 = require("./es2022.string"); +exports.es2022 = { + ...es2021_1.es2021, + ...es2022_array_1.es2022_array, + ...es2022_error_1.es2022_error, + ...es2022_intl_1.es2022_intl, + ...es2022_object_1.es2022_object, + ...es2022_sharedmemory_1.es2022_sharedmemory, + ...es2022_string_1.es2022_string, + ...es2022_regexp_1.es2022_regexp, +}; +//# sourceMappingURL=es2022.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js.map new file mode 100644 index 0000000000..f8c339aebf --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.js","sourceRoot":"","sources":["../../src/lib/es2022.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,qCAAkC;AAClC,iDAA8C;AAC9C,iDAA8C;AAC9C,+CAA4C;AAC5C,mDAAgD;AAChD,mDAAgD;AAChD,+DAA4D;AAC5D,mDAAgD;AAEnC,QAAA,MAAM,GAAG;IACpB,GAAG,eAAM;IACT,GAAG,2BAAY;IACf,GAAG,2BAAY;IACf,GAAG,yBAAW;IACd,GAAG,6BAAa;IAChB,GAAG,yCAAmB;IACtB,GAAG,6BAAa;IAChB,GAAG,6BAAa;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts new file mode 100644 index 0000000000..ffbb45d90d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2022_object: Record; +//# sourceMappingURL=es2022.object.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts.map new file mode 100644 index 0000000000..a189a16dfe --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.object.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.object.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAEqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js new file mode 100644 index 0000000000..5bed2f12cd --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_object = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_object = { + ObjectConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=es2022.object.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js.map new file mode 100644 index 0000000000..414a7187a1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.object.js","sourceRoot":"","sources":["../../src/lib/es2022.object.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,iBAAiB,EAAE,kBAAI;CACsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts new file mode 100644 index 0000000000..1501510d87 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2022_regexp: Record; +//# sourceMappingURL=es2022.regexp.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts.map new file mode 100644 index 0000000000..cf59cd540a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.regexp.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.regexp.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAKqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js new file mode 100644 index 0000000000..69db98a0c0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_regexp = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_regexp = { + RegExpMatchArray: base_config_1.TYPE, + RegExpExecArray: base_config_1.TYPE, + RegExpIndicesArray: base_config_1.TYPE, + RegExp: base_config_1.TYPE, +}; +//# sourceMappingURL=es2022.regexp.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js.map new file mode 100644 index 0000000000..d32bc53716 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.regexp.js","sourceRoot":"","sources":["../../src/lib/es2022.regexp.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,gBAAgB,EAAE,kBAAI;IACtB,eAAe,EAAE,kBAAI;IACrB,kBAAkB,EAAE,kBAAI;IACxB,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.d.ts new file mode 100644 index 0000000000..5d547efedc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2022_sharedmemory: Record; +//# sourceMappingURL=es2022.sharedmemory.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.d.ts.map new file mode 100644 index 0000000000..c5aa3180f3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.sharedmemory.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.sharedmemory.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,mBAAmB,4CAEe,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js new file mode 100644 index 0000000000..dddbe5fcca --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_sharedmemory = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_sharedmemory = { + Atomics: base_config_1.TYPE, +}; +//# sourceMappingURL=es2022.sharedmemory.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js.map new file mode 100644 index 0000000000..3f0c5f96b3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.sharedmemory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.sharedmemory.js","sourceRoot":"","sources":["../../src/lib/es2022.sharedmemory.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,mBAAmB,GAAG;IACjC,OAAO,EAAE,kBAAI;CACgC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts new file mode 100644 index 0000000000..d1284cd45e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2022_string: Record; +//# sourceMappingURL=es2022.string.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts.map new file mode 100644 index 0000000000..b71ca0f7da --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.string.d.ts","sourceRoot":"","sources":["../../src/lib/es2022.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAEqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js new file mode 100644 index 0000000000..cf1480fb0f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2022_string = void 0; +const base_config_1 = require("./base-config"); +exports.es2022_string = { + String: base_config_1.TYPE, +}; +//# sourceMappingURL=es2022.string.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js.map new file mode 100644 index 0000000000..35da205a13 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.string.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2022.string.js","sourceRoot":"","sources":["../../src/lib/es2022.string.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts new file mode 100644 index 0000000000..ef56316f2f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2023_array: Record; +//# sourceMappingURL=es2023.array.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts.map new file mode 100644 index 0000000000..6fdae8c720 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.array.d.ts","sourceRoot":"","sources":["../../src/lib/es2023.array.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,YAAY,4CAcsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js new file mode 100644 index 0000000000..f4974ee77f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2023_array = void 0; +const base_config_1 = require("./base-config"); +exports.es2023_array = { + Array: base_config_1.TYPE, + ReadonlyArray: base_config_1.TYPE, + Int8Array: base_config_1.TYPE, + Uint8Array: base_config_1.TYPE, + Uint8ClampedArray: base_config_1.TYPE, + Int16Array: base_config_1.TYPE, + Uint16Array: base_config_1.TYPE, + Int32Array: base_config_1.TYPE, + Uint32Array: base_config_1.TYPE, + Float32Array: base_config_1.TYPE, + Float64Array: base_config_1.TYPE, + BigInt64Array: base_config_1.TYPE, + BigUint64Array: base_config_1.TYPE, +}; +//# sourceMappingURL=es2023.array.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js.map new file mode 100644 index 0000000000..f2673fde49 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.array.js","sourceRoot":"","sources":["../../src/lib/es2023.array.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,YAAY,GAAG;IAC1B,KAAK,EAAE,kBAAI;IACX,aAAa,EAAE,kBAAI;IACnB,SAAS,EAAE,kBAAI;IACf,UAAU,EAAE,kBAAI;IAChB,iBAAiB,EAAE,kBAAI;IACvB,UAAU,EAAE,kBAAI;IAChB,WAAW,EAAE,kBAAI;IACjB,UAAU,EAAE,kBAAI;IAChB,WAAW,EAAE,kBAAI;IACjB,YAAY,EAAE,kBAAI;IAClB,YAAY,EAAE,kBAAI;IAClB,aAAa,EAAE,kBAAI;IACnB,cAAc,EAAE,kBAAI;CACyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts new file mode 100644 index 0000000000..4f773c8907 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2023_collection: Record; +//# sourceMappingURL=es2023.collection.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts.map new file mode 100644 index 0000000000..91124ba2d5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.collection.d.ts","sourceRoot":"","sources":["../../src/lib/es2023.collection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,iBAAiB,4CAEiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js new file mode 100644 index 0000000000..873c93b610 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2023_collection = void 0; +const base_config_1 = require("./base-config"); +exports.es2023_collection = { + WeakKeyTypes: base_config_1.TYPE, +}; +//# sourceMappingURL=es2023.collection.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js.map new file mode 100644 index 0000000000..63dce72a9e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.collection.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.collection.js","sourceRoot":"","sources":["../../src/lib/es2023.collection.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,iBAAiB,GAAG;IAC/B,YAAY,EAAE,kBAAI;CAC2B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts new file mode 100644 index 0000000000..17e3cf0d81 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2023: Record; +//# sourceMappingURL=es2023.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts.map new file mode 100644 index 0000000000..e2e7b7ab8d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.d.ts","sourceRoot":"","sources":["../../src/lib/es2023.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAK9D,eAAO,MAAM,MAAM,4CAI4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts new file mode 100644 index 0000000000..ac43b5cf2c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es2023_full: Record; +//# sourceMappingURL=es2023.full.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts.map new file mode 100644 index 0000000000..db04ff9aaa --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.full.d.ts","sourceRoot":"","sources":["../../src/lib/es2023.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAO9D,eAAO,MAAM,WAAW,4CAMuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js new file mode 100644 index 0000000000..7536bb4c13 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2023_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es2023_1 = require("./es2023"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.es2023_full = { + ...es2023_1.es2023, + ...dom_1.dom, + ...webworker_importscripts_1.webworker_importscripts, + ...scripthost_1.scripthost, + ...dom_iterable_1.dom_iterable, +}; +//# sourceMappingURL=es2023.full.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js.map new file mode 100644 index 0000000000..6bfa569b9a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.full.js","sourceRoot":"","sources":["../../src/lib/es2023.full.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,iDAA8C;AAC9C,qCAAkC;AAClC,6CAA0C;AAC1C,uEAAoE;AAEvD,QAAA,WAAW,GAAG;IACzB,GAAG,eAAM;IACT,GAAG,SAAG;IACN,GAAG,iDAAuB;IAC1B,GAAG,uBAAU;IACb,GAAG,2BAAY;CAC8B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js new file mode 100644 index 0000000000..3b5bfb27d1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js @@ -0,0 +1,16 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es2023 = void 0; +const es2022_1 = require("./es2022"); +const es2023_array_1 = require("./es2023.array"); +const es2023_collection_1 = require("./es2023.collection"); +exports.es2023 = { + ...es2022_1.es2022, + ...es2023_array_1.es2023_array, + ...es2023_collection_1.es2023_collection, +}; +//# sourceMappingURL=es2023.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js.map new file mode 100644 index 0000000000..47d8a6617e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es2023.js","sourceRoot":"","sources":["../../src/lib/es2023.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,qCAAkC;AAClC,iDAA8C;AAC9C,2DAAwD;AAE3C,QAAA,MAAM,GAAG;IACpB,GAAG,eAAM;IACT,GAAG,2BAAY;IACf,GAAG,qCAAiB;CACyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts new file mode 100644 index 0000000000..24dc609079 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es5: Record; +//# sourceMappingURL=es5.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map new file mode 100644 index 0000000000..bc8983c54e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es5.d.ts","sourceRoot":"","sources":["../../src/lib/es5.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAK9D,eAAO,MAAM,GAAG,4CAwG+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js new file mode 100644 index 0000000000..1fbc1b3dfa --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js @@ -0,0 +1,116 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es5 = void 0; +const base_config_1 = require("./base-config"); +const decorators_1 = require("./decorators"); +const decorators_legacy_1 = require("./decorators.legacy"); +exports.es5 = { + ...decorators_1.decorators, + ...decorators_legacy_1.decorators_legacy, + Symbol: base_config_1.TYPE, + PropertyKey: base_config_1.TYPE, + PropertyDescriptor: base_config_1.TYPE, + PropertyDescriptorMap: base_config_1.TYPE, + Object: base_config_1.TYPE_VALUE, + ObjectConstructor: base_config_1.TYPE, + Function: base_config_1.TYPE_VALUE, + FunctionConstructor: base_config_1.TYPE, + ThisParameterType: base_config_1.TYPE, + OmitThisParameter: base_config_1.TYPE, + CallableFunction: base_config_1.TYPE, + NewableFunction: base_config_1.TYPE, + IArguments: base_config_1.TYPE, + String: base_config_1.TYPE_VALUE, + StringConstructor: base_config_1.TYPE, + Boolean: base_config_1.TYPE_VALUE, + BooleanConstructor: base_config_1.TYPE, + Number: base_config_1.TYPE_VALUE, + NumberConstructor: base_config_1.TYPE, + TemplateStringsArray: base_config_1.TYPE, + ImportMeta: base_config_1.TYPE, + ImportCallOptions: base_config_1.TYPE, + ImportAssertions: base_config_1.TYPE, + Math: base_config_1.TYPE_VALUE, + Date: base_config_1.TYPE_VALUE, + DateConstructor: base_config_1.TYPE, + RegExpMatchArray: base_config_1.TYPE, + RegExpExecArray: base_config_1.TYPE, + RegExp: base_config_1.TYPE_VALUE, + RegExpConstructor: base_config_1.TYPE, + Error: base_config_1.TYPE_VALUE, + ErrorConstructor: base_config_1.TYPE, + EvalError: base_config_1.TYPE_VALUE, + EvalErrorConstructor: base_config_1.TYPE, + RangeError: base_config_1.TYPE_VALUE, + RangeErrorConstructor: base_config_1.TYPE, + ReferenceError: base_config_1.TYPE_VALUE, + ReferenceErrorConstructor: base_config_1.TYPE, + SyntaxError: base_config_1.TYPE_VALUE, + SyntaxErrorConstructor: base_config_1.TYPE, + TypeError: base_config_1.TYPE_VALUE, + TypeErrorConstructor: base_config_1.TYPE, + URIError: base_config_1.TYPE_VALUE, + URIErrorConstructor: base_config_1.TYPE, + JSON: base_config_1.TYPE_VALUE, + ReadonlyArray: base_config_1.TYPE, + ConcatArray: base_config_1.TYPE, + Array: base_config_1.TYPE_VALUE, + ArrayConstructor: base_config_1.TYPE, + TypedPropertyDescriptor: base_config_1.TYPE, + PromiseConstructorLike: base_config_1.TYPE, + PromiseLike: base_config_1.TYPE, + Promise: base_config_1.TYPE, + Awaited: base_config_1.TYPE, + ArrayLike: base_config_1.TYPE, + Partial: base_config_1.TYPE, + Required: base_config_1.TYPE, + Readonly: base_config_1.TYPE, + Pick: base_config_1.TYPE, + Record: base_config_1.TYPE, + Exclude: base_config_1.TYPE, + Extract: base_config_1.TYPE, + Omit: base_config_1.TYPE, + NonNullable: base_config_1.TYPE, + Parameters: base_config_1.TYPE, + ConstructorParameters: base_config_1.TYPE, + ReturnType: base_config_1.TYPE, + InstanceType: base_config_1.TYPE, + Uppercase: base_config_1.TYPE, + Lowercase: base_config_1.TYPE, + Capitalize: base_config_1.TYPE, + Uncapitalize: base_config_1.TYPE, + ThisType: base_config_1.TYPE, + WeakKeyTypes: base_config_1.TYPE, + WeakKey: base_config_1.TYPE, + ArrayBuffer: base_config_1.TYPE_VALUE, + ArrayBufferTypes: base_config_1.TYPE, + ArrayBufferLike: base_config_1.TYPE, + ArrayBufferConstructor: base_config_1.TYPE, + ArrayBufferView: base_config_1.TYPE, + DataView: base_config_1.TYPE_VALUE, + DataViewConstructor: base_config_1.TYPE, + Int8Array: base_config_1.TYPE_VALUE, + Int8ArrayConstructor: base_config_1.TYPE, + Uint8Array: base_config_1.TYPE_VALUE, + Uint8ArrayConstructor: base_config_1.TYPE, + Uint8ClampedArray: base_config_1.TYPE_VALUE, + Uint8ClampedArrayConstructor: base_config_1.TYPE, + Int16Array: base_config_1.TYPE_VALUE, + Int16ArrayConstructor: base_config_1.TYPE, + Uint16Array: base_config_1.TYPE_VALUE, + Uint16ArrayConstructor: base_config_1.TYPE, + Int32Array: base_config_1.TYPE_VALUE, + Int32ArrayConstructor: base_config_1.TYPE, + Uint32Array: base_config_1.TYPE_VALUE, + Uint32ArrayConstructor: base_config_1.TYPE, + Float32Array: base_config_1.TYPE_VALUE, + Float32ArrayConstructor: base_config_1.TYPE, + Float64Array: base_config_1.TYPE_VALUE, + Float64ArrayConstructor: base_config_1.TYPE, + Intl: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=es5.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js.map new file mode 100644 index 0000000000..b0e32bd22c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es5.js","sourceRoot":"","sources":["../../src/lib/es5.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AACjD,6CAA0C;AAC1C,2DAAwD;AAE3C,QAAA,GAAG,GAAG;IACjB,GAAG,uBAAU;IACb,GAAG,qCAAiB;IACpB,MAAM,EAAE,kBAAI;IACZ,WAAW,EAAE,kBAAI;IACjB,kBAAkB,EAAE,kBAAI;IACxB,qBAAqB,EAAE,kBAAI;IAC3B,MAAM,EAAE,wBAAU;IA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,wBAAU;IACxB,uBAAuB,EAAE,kBAAI;IAC7B,IAAI,EAAE,wBAAU;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts new file mode 100644 index 0000000000..b0fc22fa84 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es6: Record; +//# sourceMappingURL=es6.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts.map new file mode 100644 index 0000000000..2f67f808da --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es6.d.ts","sourceRoot":"","sources":["../../src/lib/es6.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAY9D,eAAO,MAAM,GAAG,4CAW+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js new file mode 100644 index 0000000000..1ef072390e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js @@ -0,0 +1,30 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es6 = void 0; +const es5_1 = require("./es5"); +const es2015_collection_1 = require("./es2015.collection"); +const es2015_core_1 = require("./es2015.core"); +const es2015_generator_1 = require("./es2015.generator"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_promise_1 = require("./es2015.promise"); +const es2015_proxy_1 = require("./es2015.proxy"); +const es2015_reflect_1 = require("./es2015.reflect"); +const es2015_symbol_1 = require("./es2015.symbol"); +const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown"); +exports.es6 = { + ...es5_1.es5, + ...es2015_core_1.es2015_core, + ...es2015_collection_1.es2015_collection, + ...es2015_iterable_1.es2015_iterable, + ...es2015_generator_1.es2015_generator, + ...es2015_promise_1.es2015_promise, + ...es2015_proxy_1.es2015_proxy, + ...es2015_reflect_1.es2015_reflect, + ...es2015_symbol_1.es2015_symbol, + ...es2015_symbol_wellknown_1.es2015_symbol_wellknown, +}; +//# sourceMappingURL=es6.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js.map new file mode 100644 index 0000000000..7d5d4fb026 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es6.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es6.js","sourceRoot":"","sources":["../../src/lib/es6.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,2DAAwD;AACxD,+CAA4C;AAC5C,yDAAsD;AACtD,uDAAoD;AACpD,qDAAkD;AAClD,iDAA8C;AAC9C,qDAAkD;AAClD,mDAAgD;AAChD,uEAAoE;AAEvD,QAAA,GAAG,GAAG;IACjB,GAAG,SAAG;IACN,GAAG,yBAAW;IACd,GAAG,qCAAiB;IACpB,GAAG,iCAAe;IAClB,GAAG,mCAAgB;IACnB,GAAG,+BAAc;IACjB,GAAG,2BAAY;IACf,GAAG,+BAAc;IACjB,GAAG,6BAAa;IAChB,GAAG,iDAAuB;CACmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts new file mode 100644 index 0000000000..474bbd1e95 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const es7: Record; +//# sourceMappingURL=es7.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts.map new file mode 100644 index 0000000000..e96de83721 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"es7.d.ts","sourceRoot":"","sources":["../../src/lib/es7.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,GAAG,4CAG+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js new file mode 100644 index 0000000000..af5251b235 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.es7 = void 0; +const es2015_1 = require("./es2015"); +const es2016_array_include_1 = require("./es2016.array.include"); +exports.es7 = { + ...es2015_1.es2015, + ...es2016_array_include_1.es2016_array_include, +}; +//# sourceMappingURL=es7.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js.map new file mode 100644 index 0000000000..fab9a571ec --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/es7.js.map @@ -0,0 +1 @@ +{"version":3,"file":"es7.js","sourceRoot":"","sources":["../../src/lib/es7.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,qCAAkC;AAClC,iEAA8D;AAEjD,QAAA,GAAG,GAAG;IACjB,GAAG,eAAM;IACT,GAAG,2CAAoB;CACsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts new file mode 100644 index 0000000000..779fb64931 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_array: Record; +//# sourceMappingURL=esnext.array.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts.map new file mode 100644 index 0000000000..29749cb41b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.array.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.array.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,YAAY,4CAcsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js new file mode 100644 index 0000000000..8c3a255b7d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_array = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_array = { + Array: base_config_1.TYPE, + ReadonlyArray: base_config_1.TYPE, + Int8Array: base_config_1.TYPE, + Uint8Array: base_config_1.TYPE, + Uint8ClampedArray: base_config_1.TYPE, + Int16Array: base_config_1.TYPE, + Uint16Array: base_config_1.TYPE, + Int32Array: base_config_1.TYPE, + Uint32Array: base_config_1.TYPE, + Float32Array: base_config_1.TYPE, + Float64Array: base_config_1.TYPE, + BigInt64Array: base_config_1.TYPE, + BigUint64Array: base_config_1.TYPE, +}; +//# sourceMappingURL=esnext.array.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js.map new file mode 100644 index 0000000000..2f8faab57b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.array.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.array.js","sourceRoot":"","sources":["../../src/lib/esnext.array.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,YAAY,GAAG;IAC1B,KAAK,EAAE,kBAAI;IACX,aAAa,EAAE,kBAAI;IACnB,SAAS,EAAE,kBAAI;IACf,UAAU,EAAE,kBAAI;IAChB,iBAAiB,EAAE,kBAAI;IACvB,UAAU,EAAE,kBAAI;IAChB,WAAW,EAAE,kBAAI;IACjB,UAAU,EAAE,kBAAI;IAChB,WAAW,EAAE,kBAAI;IACjB,YAAY,EAAE,kBAAI;IAClB,YAAY,EAAE,kBAAI;IAClB,aAAa,EAAE,kBAAI;IACnB,cAAc,EAAE,kBAAI;CACyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts new file mode 100644 index 0000000000..0cb2d1859b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_asynciterable: Record; +//# sourceMappingURL=esnext.asynciterable.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts.map new file mode 100644 index 0000000000..ba5973e446 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.asynciterable.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.asynciterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAK9D,eAAO,MAAM,oBAAoB,4CAOc,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js new file mode 100644 index 0000000000..8fbf5b01dc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js @@ -0,0 +1,19 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_asynciterable = void 0; +const base_config_1 = require("./base-config"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.esnext_asynciterable = { + ...es2015_symbol_1.es2015_symbol, + ...es2015_iterable_1.es2015_iterable, + SymbolConstructor: base_config_1.TYPE, + AsyncIterator: base_config_1.TYPE, + AsyncIterable: base_config_1.TYPE, + AsyncIterableIterator: base_config_1.TYPE, +}; +//# sourceMappingURL=esnext.asynciterable.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js.map new file mode 100644 index 0000000000..d01523e5be --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.asynciterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.asynciterable.js","sourceRoot":"","sources":["../../src/lib/esnext.asynciterable.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,uDAAoD;AACpD,mDAAgD;AAEnC,QAAA,oBAAoB,GAAG;IAClC,GAAG,6BAAa;IAChB,GAAG,iCAAe;IAClB,iBAAiB,EAAE,kBAAI;IACvB,aAAa,EAAE,kBAAI;IACnB,aAAa,EAAE,kBAAI;IACnB,qBAAqB,EAAE,kBAAI;CACkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts new file mode 100644 index 0000000000..d879c0e7c6 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_bigint: Record; +//# sourceMappingURL=esnext.bigint.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts.map new file mode 100644 index 0000000000..20081b5a65 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.bigint.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.bigint.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,aAAa,4CAWqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js new file mode 100644 index 0000000000..6e55b57711 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js @@ -0,0 +1,22 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_bigint = void 0; +const base_config_1 = require("./base-config"); +const es2020_intl_1 = require("./es2020.intl"); +exports.esnext_bigint = { + ...es2020_intl_1.es2020_intl, + BigIntToLocaleStringOptions: base_config_1.TYPE, + BigInt: base_config_1.TYPE_VALUE, + BigIntConstructor: base_config_1.TYPE, + BigInt64Array: base_config_1.TYPE_VALUE, + BigInt64ArrayConstructor: base_config_1.TYPE, + BigUint64Array: base_config_1.TYPE_VALUE, + BigUint64ArrayConstructor: base_config_1.TYPE, + DataView: base_config_1.TYPE, + Intl: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=esnext.bigint.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js.map new file mode 100644 index 0000000000..ed3812ccb5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.bigint.js","sourceRoot":"","sources":["../../src/lib/esnext.bigint.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AACjD,+CAA4C;AAE/B,QAAA,aAAa,GAAG;IAC3B,GAAG,yBAAW;IACd,2BAA2B,EAAE,kBAAI;IACjC,MAAM,EAAE,wBAAU;IAClB,iBAAiB,EAAE,kBAAI;IACvB,aAAa,EAAE,wBAAU;IACzB,wBAAwB,EAAE,kBAAI;IAC9B,cAAc,EAAE,wBAAU;IAC1B,yBAAyB,EAAE,kBAAI;IAC/B,QAAQ,EAAE,kBAAI;IACd,IAAI,EAAE,wBAAU;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts new file mode 100644 index 0000000000..94de9e180c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_collection: Record; +//# sourceMappingURL=esnext.collection.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts.map new file mode 100644 index 0000000000..2997bcbf97 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.collection.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.collection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,iBAAiB,4CAEiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js new file mode 100644 index 0000000000..2486737c36 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_collection = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_collection = { + WeakKeyTypes: base_config_1.TYPE, +}; +//# sourceMappingURL=esnext.collection.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js.map new file mode 100644 index 0000000000..f3cdc8d644 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.collection.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.collection.js","sourceRoot":"","sources":["../../src/lib/esnext.collection.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,iBAAiB,GAAG;IAC/B,YAAY,EAAE,kBAAI;CAC2B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts new file mode 100644 index 0000000000..30897cb13d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext: Record; +//# sourceMappingURL=esnext.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts.map new file mode 100644 index 0000000000..7aeb61fcd9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAM9D,eAAO,MAAM,MAAM,4CAK4B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts new file mode 100644 index 0000000000..b9cd30ca46 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_decorators: Record; +//# sourceMappingURL=esnext.decorators.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts.map new file mode 100644 index 0000000000..61edd0e4be --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.decorators.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.decorators.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAK9D,eAAO,MAAM,iBAAiB,4CAKiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js new file mode 100644 index 0000000000..b23883ec8c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js @@ -0,0 +1,17 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_decorators = void 0; +const base_config_1 = require("./base-config"); +const decorators_1 = require("./decorators"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.esnext_decorators = { + ...es2015_symbol_1.es2015_symbol, + ...decorators_1.decorators, + SymbolConstructor: base_config_1.TYPE, + Function: base_config_1.TYPE, +}; +//# sourceMappingURL=esnext.decorators.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js.map new file mode 100644 index 0000000000..0585192615 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.decorators.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.decorators.js","sourceRoot":"","sources":["../../src/lib/esnext.decorators.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AACrC,6CAA0C;AAC1C,mDAAgD;AAEnC,QAAA,iBAAiB,GAAG;IAC/B,GAAG,6BAAa;IAChB,GAAG,uBAAU;IACb,iBAAiB,EAAE,kBAAI;IACvB,QAAQ,EAAE,kBAAI;CAC+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts new file mode 100644 index 0000000000..86f4a6e608 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_disposable: Record; +//# sourceMappingURL=esnext.disposable.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts.map new file mode 100644 index 0000000000..235349dc9f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.disposable.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.disposable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,iBAAiB,4CAWiB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js new file mode 100644 index 0000000000..2a4d4dcc9c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js @@ -0,0 +1,22 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_disposable = void 0; +const base_config_1 = require("./base-config"); +const es2015_symbol_1 = require("./es2015.symbol"); +exports.esnext_disposable = { + ...es2015_symbol_1.es2015_symbol, + SymbolConstructor: base_config_1.TYPE, + Disposable: base_config_1.TYPE, + AsyncDisposable: base_config_1.TYPE, + SuppressedError: base_config_1.TYPE_VALUE, + SuppressedErrorConstructor: base_config_1.TYPE, + DisposableStack: base_config_1.TYPE_VALUE, + DisposableStackConstructor: base_config_1.TYPE, + AsyncDisposableStack: base_config_1.TYPE_VALUE, + AsyncDisposableStackConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=esnext.disposable.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js.map new file mode 100644 index 0000000000..61f2541aa8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.disposable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.disposable.js","sourceRoot":"","sources":["../../src/lib/esnext.disposable.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AACjD,mDAAgD;AAEnC,QAAA,iBAAiB,GAAG;IAC/B,GAAG,6BAAa;IAChB,iBAAiB,EAAE,kBAAI;IACvB,UAAU,EAAE,kBAAI;IAChB,eAAe,EAAE,kBAAI;IACrB,eAAe,EAAE,wBAAU;IAC3B,0BAA0B,EAAE,kBAAI;IAChC,eAAe,EAAE,wBAAU;IAC3B,0BAA0B,EAAE,kBAAI;IAChC,oBAAoB,EAAE,wBAAU;IAChC,+BAA+B,EAAE,kBAAI;CACQ,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts new file mode 100644 index 0000000000..6c0fb48dfa --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_full: Record; +//# sourceMappingURL=esnext.full.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts.map new file mode 100644 index 0000000000..34c3cc0581 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.full.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.full.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAO9D,eAAO,MAAM,WAAW,4CAMuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js new file mode 100644 index 0000000000..3aee3726a5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js @@ -0,0 +1,20 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_full = void 0; +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const esnext_1 = require("./esnext"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.esnext_full = { + ...esnext_1.esnext, + ...dom_1.dom, + ...webworker_importscripts_1.webworker_importscripts, + ...scripthost_1.scripthost, + ...dom_iterable_1.dom_iterable, +}; +//# sourceMappingURL=esnext.full.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js.map new file mode 100644 index 0000000000..f651eb6c0c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.full.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.full.js","sourceRoot":"","sources":["../../src/lib/esnext.full.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,iDAA8C;AAC9C,qCAAkC;AAClC,6CAA0C;AAC1C,uEAAoE;AAEvD,QAAA,WAAW,GAAG;IACzB,GAAG,eAAM;IACT,GAAG,SAAG;IACN,GAAG,iDAAuB;IAC1B,GAAG,uBAAU;IACb,GAAG,2BAAY;CAC8B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts new file mode 100644 index 0000000000..892587a421 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_intl: Record; +//# sourceMappingURL=esnext.intl.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts.map new file mode 100644 index 0000000000..dd844874e7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.intl.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.intl.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,WAAW,4CAEuB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js new file mode 100644 index 0000000000..fab7c3d250 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_intl = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_intl = { + Intl: base_config_1.TYPE_VALUE, +}; +//# sourceMappingURL=esnext.intl.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js.map new file mode 100644 index 0000000000..1e0169aaf1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.intl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.intl.js","sourceRoot":"","sources":["../../src/lib/esnext.intl.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAA2C;AAE9B,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,wBAAU;CAC6B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js new file mode 100644 index 0000000000..df8b065ad9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js @@ -0,0 +1,18 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext = void 0; +const es2023_1 = require("./es2023"); +const esnext_decorators_1 = require("./esnext.decorators"); +const esnext_disposable_1 = require("./esnext.disposable"); +const esnext_intl_1 = require("./esnext.intl"); +exports.esnext = { + ...es2023_1.es2023, + ...esnext_intl_1.esnext_intl, + ...esnext_decorators_1.esnext_decorators, + ...esnext_disposable_1.esnext_disposable, +}; +//# sourceMappingURL=esnext.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js.map new file mode 100644 index 0000000000..51b435f61b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.js","sourceRoot":"","sources":["../../src/lib/esnext.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,qCAAkC;AAClC,2DAAwD;AACxD,2DAAwD;AACxD,+CAA4C;AAE/B,QAAA,MAAM,GAAG;IACpB,GAAG,eAAM;IACT,GAAG,yBAAW;IACd,GAAG,qCAAiB;IACpB,GAAG,qCAAiB;CACyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts new file mode 100644 index 0000000000..aae1ed130e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_promise: Record; +//# sourceMappingURL=esnext.promise.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts.map new file mode 100644 index 0000000000..85d8d27c74 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.promise.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.promise.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,cAAc,4CAIoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js new file mode 100644 index 0000000000..9dcdb2c21e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js @@ -0,0 +1,14 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_promise = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_promise = { + AggregateError: base_config_1.TYPE_VALUE, + AggregateErrorConstructor: base_config_1.TYPE, + PromiseConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=esnext.promise.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js.map new file mode 100644 index 0000000000..a8b9597ec3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.promise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.promise.js","sourceRoot":"","sources":["../../src/lib/esnext.promise.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AAEpC,QAAA,cAAc,GAAG;IAC5B,cAAc,EAAE,wBAAU;IAC1B,yBAAyB,EAAE,kBAAI;IAC/B,kBAAkB,EAAE,kBAAI;CACqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts new file mode 100644 index 0000000000..238f289045 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_string: Record; +//# sourceMappingURL=esnext.string.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts.map new file mode 100644 index 0000000000..95433af36d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.string.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.string.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAEqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js new file mode 100644 index 0000000000..d9d29279cc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_string = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_string = { + String: base_config_1.TYPE, +}; +//# sourceMappingURL=esnext.string.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js.map new file mode 100644 index 0000000000..36bfbbe3c0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.string.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.string.js","sourceRoot":"","sources":["../../src/lib/esnext.string.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts new file mode 100644 index 0000000000..a09a292768 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_symbol: Record; +//# sourceMappingURL=esnext.symbol.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts.map new file mode 100644 index 0000000000..1f2e0b5e9b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.symbol.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.symbol.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,aAAa,4CAEqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js new file mode 100644 index 0000000000..c5f9e5b8d9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js @@ -0,0 +1,12 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_symbol = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_symbol = { + Symbol: base_config_1.TYPE, +}; +//# sourceMappingURL=esnext.symbol.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js.map new file mode 100644 index 0000000000..6ddf4a08c1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.symbol.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.symbol.js","sourceRoot":"","sources":["../../src/lib/esnext.symbol.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,aAAa,GAAG;IAC3B,MAAM,EAAE,kBAAI;CACiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts new file mode 100644 index 0000000000..1f2b6727d2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const esnext_weakref: Record; +//# sourceMappingURL=esnext.weakref.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts.map new file mode 100644 index 0000000000..7377c33608 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.weakref.d.ts","sourceRoot":"","sources":["../../src/lib/esnext.weakref.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,cAAc,4CAKoB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js new file mode 100644 index 0000000000..e409234c74 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js @@ -0,0 +1,15 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.esnext_weakref = void 0; +const base_config_1 = require("./base-config"); +exports.esnext_weakref = { + WeakRef: base_config_1.TYPE_VALUE, + WeakRefConstructor: base_config_1.TYPE, + FinalizationRegistry: base_config_1.TYPE_VALUE, + FinalizationRegistryConstructor: base_config_1.TYPE, +}; +//# sourceMappingURL=esnext.weakref.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js.map new file mode 100644 index 0000000000..c1c6f8ed97 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.weakref.js.map @@ -0,0 +1 @@ +{"version":3,"file":"esnext.weakref.js","sourceRoot":"","sources":["../../src/lib/esnext.weakref.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AAEpC,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,wBAAU;IACnB,kBAAkB,EAAE,kBAAI;IACxB,oBAAoB,EAAE,wBAAU;IAChC,+BAA+B,EAAE,kBAAI;CACQ,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts new file mode 100644 index 0000000000..abacfc7092 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts @@ -0,0 +1,93 @@ +declare const lib: { + readonly es5: Record; + readonly es6: Record; + readonly es2015: Record; + readonly es7: Record; + readonly es2016: Record; + readonly es2017: Record; + readonly es2018: Record; + readonly es2019: Record; + readonly es2020: Record; + readonly es2021: Record; + readonly es2022: Record; + readonly es2023: Record; + readonly esnext: Record; + readonly dom: Record; + readonly 'dom.iterable': Record; + readonly webworker: Record; + readonly 'webworker.importscripts': Record; + readonly 'webworker.iterable': Record; + readonly scripthost: Record; + readonly 'es2015.core': Record; + readonly 'es2015.collection': Record; + readonly 'es2015.generator': Record; + readonly 'es2015.iterable': Record; + readonly 'es2015.promise': Record; + readonly 'es2015.proxy': Record; + readonly 'es2015.reflect': Record; + readonly 'es2015.symbol': Record; + readonly 'es2015.symbol.wellknown': Record; + readonly 'es2016.array.include': Record; + readonly 'es2017.date': Record; + readonly 'es2017.object': Record; + readonly 'es2017.sharedmemory': Record; + readonly 'es2017.string': Record; + readonly 'es2017.intl': Record; + readonly 'es2017.typedarrays': Record; + readonly 'es2018.asyncgenerator': Record; + readonly 'es2018.asynciterable': Record; + readonly 'es2018.intl': Record; + readonly 'es2018.promise': Record; + readonly 'es2018.regexp': Record; + readonly 'es2019.array': Record; + readonly 'es2019.object': Record; + readonly 'es2019.string': Record; + readonly 'es2019.symbol': Record; + readonly 'es2019.intl': Record; + readonly 'es2020.bigint': Record; + readonly 'es2020.date': Record; + readonly 'es2020.promise': Record; + readonly 'es2020.sharedmemory': Record; + readonly 'es2020.string': Record; + readonly 'es2020.symbol.wellknown': Record; + readonly 'es2020.intl': Record; + readonly 'es2020.number': Record; + readonly 'es2021.promise': Record; + readonly 'es2021.string': Record; + readonly 'es2021.weakref': Record; + readonly 'es2021.intl': Record; + readonly 'es2022.array': Record; + readonly 'es2022.error': Record; + readonly 'es2022.intl': Record; + readonly 'es2022.object': Record; + readonly 'es2022.sharedmemory': Record; + readonly 'es2022.string': Record; + readonly 'es2022.regexp': Record; + readonly 'es2023.array': Record; + readonly 'es2023.collection': Record; + readonly 'esnext.array': Record; + readonly 'esnext.collection': Record; + readonly 'esnext.symbol': Record; + readonly 'esnext.asynciterable': Record; + readonly 'esnext.intl': Record; + readonly 'esnext.disposable': Record; + readonly 'esnext.bigint': Record; + readonly 'esnext.string': Record; + readonly 'esnext.promise': Record; + readonly 'esnext.weakref': Record; + readonly 'esnext.decorators': Record; + readonly decorators: Record; + readonly 'decorators.legacy': Record; + readonly 'es2016.full': Record; + readonly 'es2017.full': Record; + readonly 'es2018.full': Record; + readonly 'es2019.full': Record; + readonly 'es2020.full': Record; + readonly 'es2021.full': Record; + readonly 'es2022.full': Record; + readonly 'es2023.full': Record; + readonly 'esnext.full': Record; + readonly lib: Record; +}; +export { lib }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map new file mode 100644 index 0000000000..413edb2a82 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AA+FA,QAAA,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FC,CAAC;AAEX,OAAO,EAAE,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js new file mode 100644 index 0000000000..cb131a043f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js @@ -0,0 +1,189 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lib = void 0; +const decorators_1 = require("./decorators"); +const decorators_legacy_1 = require("./decorators.legacy"); +const dom_1 = require("./dom"); +const dom_iterable_1 = require("./dom.iterable"); +const es5_1 = require("./es5"); +const es6_1 = require("./es6"); +const es7_1 = require("./es7"); +const es2015_1 = require("./es2015"); +const es2015_collection_1 = require("./es2015.collection"); +const es2015_core_1 = require("./es2015.core"); +const es2015_generator_1 = require("./es2015.generator"); +const es2015_iterable_1 = require("./es2015.iterable"); +const es2015_promise_1 = require("./es2015.promise"); +const es2015_proxy_1 = require("./es2015.proxy"); +const es2015_reflect_1 = require("./es2015.reflect"); +const es2015_symbol_1 = require("./es2015.symbol"); +const es2015_symbol_wellknown_1 = require("./es2015.symbol.wellknown"); +const es2016_1 = require("./es2016"); +const es2016_array_include_1 = require("./es2016.array.include"); +const es2016_full_1 = require("./es2016.full"); +const es2017_1 = require("./es2017"); +const es2017_date_1 = require("./es2017.date"); +const es2017_full_1 = require("./es2017.full"); +const es2017_intl_1 = require("./es2017.intl"); +const es2017_object_1 = require("./es2017.object"); +const es2017_sharedmemory_1 = require("./es2017.sharedmemory"); +const es2017_string_1 = require("./es2017.string"); +const es2017_typedarrays_1 = require("./es2017.typedarrays"); +const es2018_1 = require("./es2018"); +const es2018_asyncgenerator_1 = require("./es2018.asyncgenerator"); +const es2018_asynciterable_1 = require("./es2018.asynciterable"); +const es2018_full_1 = require("./es2018.full"); +const es2018_intl_1 = require("./es2018.intl"); +const es2018_promise_1 = require("./es2018.promise"); +const es2018_regexp_1 = require("./es2018.regexp"); +const es2019_1 = require("./es2019"); +const es2019_array_1 = require("./es2019.array"); +const es2019_full_1 = require("./es2019.full"); +const es2019_intl_1 = require("./es2019.intl"); +const es2019_object_1 = require("./es2019.object"); +const es2019_string_1 = require("./es2019.string"); +const es2019_symbol_1 = require("./es2019.symbol"); +const es2020_1 = require("./es2020"); +const es2020_bigint_1 = require("./es2020.bigint"); +const es2020_date_1 = require("./es2020.date"); +const es2020_full_1 = require("./es2020.full"); +const es2020_intl_1 = require("./es2020.intl"); +const es2020_number_1 = require("./es2020.number"); +const es2020_promise_1 = require("./es2020.promise"); +const es2020_sharedmemory_1 = require("./es2020.sharedmemory"); +const es2020_string_1 = require("./es2020.string"); +const es2020_symbol_wellknown_1 = require("./es2020.symbol.wellknown"); +const es2021_1 = require("./es2021"); +const es2021_full_1 = require("./es2021.full"); +const es2021_intl_1 = require("./es2021.intl"); +const es2021_promise_1 = require("./es2021.promise"); +const es2021_string_1 = require("./es2021.string"); +const es2021_weakref_1 = require("./es2021.weakref"); +const es2022_1 = require("./es2022"); +const es2022_array_1 = require("./es2022.array"); +const es2022_error_1 = require("./es2022.error"); +const es2022_full_1 = require("./es2022.full"); +const es2022_intl_1 = require("./es2022.intl"); +const es2022_object_1 = require("./es2022.object"); +const es2022_regexp_1 = require("./es2022.regexp"); +const es2022_sharedmemory_1 = require("./es2022.sharedmemory"); +const es2022_string_1 = require("./es2022.string"); +const es2023_1 = require("./es2023"); +const es2023_array_1 = require("./es2023.array"); +const es2023_collection_1 = require("./es2023.collection"); +const es2023_full_1 = require("./es2023.full"); +const esnext_1 = require("./esnext"); +const esnext_array_1 = require("./esnext.array"); +const esnext_asynciterable_1 = require("./esnext.asynciterable"); +const esnext_bigint_1 = require("./esnext.bigint"); +const esnext_collection_1 = require("./esnext.collection"); +const esnext_decorators_1 = require("./esnext.decorators"); +const esnext_disposable_1 = require("./esnext.disposable"); +const esnext_full_1 = require("./esnext.full"); +const esnext_intl_1 = require("./esnext.intl"); +const esnext_promise_1 = require("./esnext.promise"); +const esnext_string_1 = require("./esnext.string"); +const esnext_symbol_1 = require("./esnext.symbol"); +const esnext_weakref_1 = require("./esnext.weakref"); +const lib_1 = require("./lib"); +const scripthost_1 = require("./scripthost"); +const webworker_1 = require("./webworker"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +const webworker_iterable_1 = require("./webworker.iterable"); +const lib = { + es5: es5_1.es5, + es6: es6_1.es6, + es2015: es2015_1.es2015, + es7: es7_1.es7, + es2016: es2016_1.es2016, + es2017: es2017_1.es2017, + es2018: es2018_1.es2018, + es2019: es2019_1.es2019, + es2020: es2020_1.es2020, + es2021: es2021_1.es2021, + es2022: es2022_1.es2022, + es2023: es2023_1.es2023, + esnext: esnext_1.esnext, + dom: dom_1.dom, + 'dom.iterable': dom_iterable_1.dom_iterable, + webworker: webworker_1.webworker, + 'webworker.importscripts': webworker_importscripts_1.webworker_importscripts, + 'webworker.iterable': webworker_iterable_1.webworker_iterable, + scripthost: scripthost_1.scripthost, + 'es2015.core': es2015_core_1.es2015_core, + 'es2015.collection': es2015_collection_1.es2015_collection, + 'es2015.generator': es2015_generator_1.es2015_generator, + 'es2015.iterable': es2015_iterable_1.es2015_iterable, + 'es2015.promise': es2015_promise_1.es2015_promise, + 'es2015.proxy': es2015_proxy_1.es2015_proxy, + 'es2015.reflect': es2015_reflect_1.es2015_reflect, + 'es2015.symbol': es2015_symbol_1.es2015_symbol, + 'es2015.symbol.wellknown': es2015_symbol_wellknown_1.es2015_symbol_wellknown, + 'es2016.array.include': es2016_array_include_1.es2016_array_include, + 'es2017.date': es2017_date_1.es2017_date, + 'es2017.object': es2017_object_1.es2017_object, + 'es2017.sharedmemory': es2017_sharedmemory_1.es2017_sharedmemory, + 'es2017.string': es2017_string_1.es2017_string, + 'es2017.intl': es2017_intl_1.es2017_intl, + 'es2017.typedarrays': es2017_typedarrays_1.es2017_typedarrays, + 'es2018.asyncgenerator': es2018_asyncgenerator_1.es2018_asyncgenerator, + 'es2018.asynciterable': es2018_asynciterable_1.es2018_asynciterable, + 'es2018.intl': es2018_intl_1.es2018_intl, + 'es2018.promise': es2018_promise_1.es2018_promise, + 'es2018.regexp': es2018_regexp_1.es2018_regexp, + 'es2019.array': es2019_array_1.es2019_array, + 'es2019.object': es2019_object_1.es2019_object, + 'es2019.string': es2019_string_1.es2019_string, + 'es2019.symbol': es2019_symbol_1.es2019_symbol, + 'es2019.intl': es2019_intl_1.es2019_intl, + 'es2020.bigint': es2020_bigint_1.es2020_bigint, + 'es2020.date': es2020_date_1.es2020_date, + 'es2020.promise': es2020_promise_1.es2020_promise, + 'es2020.sharedmemory': es2020_sharedmemory_1.es2020_sharedmemory, + 'es2020.string': es2020_string_1.es2020_string, + 'es2020.symbol.wellknown': es2020_symbol_wellknown_1.es2020_symbol_wellknown, + 'es2020.intl': es2020_intl_1.es2020_intl, + 'es2020.number': es2020_number_1.es2020_number, + 'es2021.promise': es2021_promise_1.es2021_promise, + 'es2021.string': es2021_string_1.es2021_string, + 'es2021.weakref': es2021_weakref_1.es2021_weakref, + 'es2021.intl': es2021_intl_1.es2021_intl, + 'es2022.array': es2022_array_1.es2022_array, + 'es2022.error': es2022_error_1.es2022_error, + 'es2022.intl': es2022_intl_1.es2022_intl, + 'es2022.object': es2022_object_1.es2022_object, + 'es2022.sharedmemory': es2022_sharedmemory_1.es2022_sharedmemory, + 'es2022.string': es2022_string_1.es2022_string, + 'es2022.regexp': es2022_regexp_1.es2022_regexp, + 'es2023.array': es2023_array_1.es2023_array, + 'es2023.collection': es2023_collection_1.es2023_collection, + 'esnext.array': esnext_array_1.esnext_array, + 'esnext.collection': esnext_collection_1.esnext_collection, + 'esnext.symbol': esnext_symbol_1.esnext_symbol, + 'esnext.asynciterable': esnext_asynciterable_1.esnext_asynciterable, + 'esnext.intl': esnext_intl_1.esnext_intl, + 'esnext.disposable': esnext_disposable_1.esnext_disposable, + 'esnext.bigint': esnext_bigint_1.esnext_bigint, + 'esnext.string': esnext_string_1.esnext_string, + 'esnext.promise': esnext_promise_1.esnext_promise, + 'esnext.weakref': esnext_weakref_1.esnext_weakref, + 'esnext.decorators': esnext_decorators_1.esnext_decorators, + decorators: decorators_1.decorators, + 'decorators.legacy': decorators_legacy_1.decorators_legacy, + 'es2016.full': es2016_full_1.es2016_full, + 'es2017.full': es2017_full_1.es2017_full, + 'es2018.full': es2018_full_1.es2018_full, + 'es2019.full': es2019_full_1.es2019_full, + 'es2020.full': es2020_full_1.es2020_full, + 'es2021.full': es2021_full_1.es2021_full, + 'es2022.full': es2022_full_1.es2022_full, + 'es2023.full': es2023_full_1.es2023_full, + 'esnext.full': esnext_full_1.esnext_full, + lib: lib_1.lib, +}; +exports.lib = lib; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js.map new file mode 100644 index 0000000000..dad62b8a33 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAEvD,6CAA0C;AAC1C,2DAAwD;AACxD,+BAA4B;AAC5B,iDAA8C;AAC9C,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,qCAAkC;AAClC,2DAAwD;AACxD,+CAA4C;AAC5C,yDAAsD;AACtD,uDAAoD;AACpD,qDAAkD;AAClD,iDAA8C;AAC9C,qDAAkD;AAClD,mDAAgD;AAChD,uEAAoE;AACpE,qCAAkC;AAClC,iEAA8D;AAC9D,+CAA4C;AAC5C,qCAAkC;AAClC,+CAA4C;AAC5C,+CAA4C;AAC5C,+CAA4C;AAC5C,mDAAgD;AAChD,+DAA4D;AAC5D,mDAAgD;AAChD,6DAA0D;AAC1D,qCAAkC;AAClC,mEAAgE;AAChE,iEAA8D;AAC9D,+CAA4C;AAC5C,+CAA4C;AAC5C,qDAAkD;AAClD,mDAAgD;AAChD,qCAAkC;AAClC,iDAA8C;AAC9C,+CAA4C;AAC5C,+CAA4C;AAC5C,mDAAgD;AAChD,mDAAgD;AAChD,mDAAgD;AAChD,qCAAkC;AAClC,mDAAgD;AAChD,+CAA4C;AAC5C,+CAA4C;AAC5C,+CAA4C;AAC5C,mDAAgD;AAChD,qDAAkD;AAClD,+DAA4D;AAC5D,mDAAgD;AAChD,u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1B,mBAAmB,EAAE,qCAAiB;IACtC,eAAe,EAAE,6BAAa;IAC9B,eAAe,EAAE,6BAAa;IAC9B,gBAAgB,EAAE,+BAAc;IAChC,gBAAgB,EAAE,+BAAc;IAChC,mBAAmB,EAAE,qCAAiB;IACtC,UAAU,EAAV,uBAAU;IACV,mBAAmB,EAAE,qCAAiB;IACtC,aAAa,EAAE,yBAAW;IAC1B,aAAa,EAAE,yBAAW;IAC1B,aAAa,EAAE,yBAAW;IAC1B,aAAa,EAAE,yBAAW;IAC1B,aAAa,EAAE,yBAAW;IAC1B,aAAa,EAAE,yBAAW;IAC1B,aAAa,EAAE,yBAAW;IAC1B,aAAa,EAAE,yBAAW;IAC1B,aAAa,EAAE,yBAAW;IAC1B,GAAG,EAAE,SAAO;CACJ,CAAC;AAEF,kBAAG"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts new file mode 100644 index 0000000000..a6b2263df1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const lib: Record; +//# sourceMappingURL=lib.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts.map new file mode 100644 index 0000000000..406de8e042 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib/lib.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAM9D,eAAO,MAAM,GAAG,4CAK+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js new file mode 100644 index 0000000000..609808399f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js @@ -0,0 +1,18 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lib = void 0; +const dom_1 = require("./dom"); +const es5_1 = require("./es5"); +const scripthost_1 = require("./scripthost"); +const webworker_importscripts_1 = require("./webworker.importscripts"); +exports.lib = { + ...es5_1.es5, + ...dom_1.dom, + ...webworker_importscripts_1.webworker_importscripts, + ...scripthost_1.scripthost, +}; +//# sourceMappingURL=lib.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js.map new file mode 100644 index 0000000000..3c0e8c5197 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/lib.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib/lib.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+BAA4B;AAC5B,+BAA4B;AAC5B,6CAA0C;AAC1C,uEAAoE;AAEvD,QAAA,GAAG,GAAG;IACjB,GAAG,SAAG;IACN,GAAG,SAAG;IACN,GAAG,iDAAuB;IAC1B,GAAG,uBAAU;CACgC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts new file mode 100644 index 0000000000..4e066f5058 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const scripthost: Record; +//# sourceMappingURL=scripthost.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts.map new file mode 100644 index 0000000000..bda9060bf0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scripthost.d.ts","sourceRoot":"","sources":["../../src/lib/scripthost.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,UAAU,4CAcwB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js new file mode 100644 index 0000000000..12a45e40bb --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js @@ -0,0 +1,24 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scripthost = void 0; +const base_config_1 = require("./base-config"); +exports.scripthost = { + ActiveXObject: base_config_1.TYPE_VALUE, + ITextWriter: base_config_1.TYPE, + TextStreamBase: base_config_1.TYPE, + TextStreamWriter: base_config_1.TYPE, + TextStreamReader: base_config_1.TYPE, + SafeArray: base_config_1.TYPE_VALUE, + Enumerator: base_config_1.TYPE_VALUE, + EnumeratorConstructor: base_config_1.TYPE, + VBArray: base_config_1.TYPE_VALUE, + VBArrayConstructor: base_config_1.TYPE, + VarDate: base_config_1.TYPE_VALUE, + DateConstructor: base_config_1.TYPE, + Date: base_config_1.TYPE, +}; +//# sourceMappingURL=scripthost.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js.map new file mode 100644 index 0000000000..b551c6d287 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/scripthost.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scripthost.js","sourceRoot":"","sources":["../../src/lib/scripthost.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AAEpC,QAAA,UAAU,GAAG;IACxB,aAAa,EAAE,wBAAU;IACzB,WAAW,EAAE,kBAAI;IACjB,cAAc,EAAE,kBAAI;IACpB,gBAAgB,EAAE,kBAAI;IACtB,gBAAgB,EAAE,kBAAI;IACtB,SAAS,EAAE,wBAAU;IACrB,UAAU,EAAE,wBAAU;IACtB,qBAAqB,EAAE,kBAAI;IAC3B,OAAO,EAAE,wBAAU;IACnB,kBAAkB,EAAE,kBAAI;IACxB,OAAO,EAAE,wBAAU;IACnB,eAAe,EAAE,kBAAI;IACrB,IAAI,EAAE,kBAAI;CACmC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts new file mode 100644 index 0000000000..87c0e9417d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const webworker: Record; +//# sourceMappingURL=webworker.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map new file mode 100644 index 0000000000..14b8ed776b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webworker.d.ts","sourceRoot":"","sources":["../../src/lib/webworker.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,SAAS,4CAmkByB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts new file mode 100644 index 0000000000..c042e5063a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const webworker_importscripts: Record; +//# sourceMappingURL=webworker.importscripts.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts.map new file mode 100644 index 0000000000..d1c37fad8e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webworker.importscripts.d.ts","sourceRoot":"","sources":["../../src/lib/webworker.importscripts.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D,eAAO,MAAM,uBAAuB,4CAGnC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js new file mode 100644 index 0000000000..e9413d6c6e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js @@ -0,0 +1,9 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.webworker_importscripts = void 0; +exports.webworker_importscripts = {}; +//# sourceMappingURL=webworker.importscripts.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js.map new file mode 100644 index 0000000000..52a15f2023 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.importscripts.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webworker.importscripts.js","sourceRoot":"","sources":["../../src/lib/webworker.importscripts.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAI1C,QAAA,uBAAuB,GAAG,EAGtC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts new file mode 100644 index 0000000000..207cf1f7a7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts @@ -0,0 +1,3 @@ +import type { ImplicitLibVariableOptions } from '../variable'; +export declare const webworker_iterable: Record; +//# sourceMappingURL=webworker.iterable.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map new file mode 100644 index 0000000000..b57ff40f30 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webworker.iterable.d.ts","sourceRoot":"","sources":["../../src/lib/webworker.iterable.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG9D,eAAO,MAAM,kBAAkB,4CAwBgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js new file mode 100644 index 0000000000..1464917e76 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js @@ -0,0 +1,34 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.webworker_iterable = void 0; +const base_config_1 = require("./base-config"); +exports.webworker_iterable = { + CSSNumericArray: base_config_1.TYPE, + CSSTransformValue: base_config_1.TYPE, + CSSUnparsedValue: base_config_1.TYPE, + Cache: base_config_1.TYPE, + CanvasPath: base_config_1.TYPE, + CanvasPathDrawingStyles: base_config_1.TYPE, + DOMStringList: base_config_1.TYPE, + FileList: base_config_1.TYPE, + FontFaceSet: base_config_1.TYPE, + FormData: base_config_1.TYPE, + Headers: base_config_1.TYPE, + IDBDatabase: base_config_1.TYPE, + IDBObjectStore: base_config_1.TYPE, + MessageEvent: base_config_1.TYPE, + StylePropertyMapReadOnly: base_config_1.TYPE, + SubtleCrypto: base_config_1.TYPE, + URLSearchParams: base_config_1.TYPE, + WEBGL_draw_buffers: base_config_1.TYPE, + WEBGL_multi_draw: base_config_1.TYPE, + WebGL2RenderingContextBase: base_config_1.TYPE, + WebGL2RenderingContextOverloads: base_config_1.TYPE, + WebGLRenderingContextBase: base_config_1.TYPE, + WebGLRenderingContextOverloads: base_config_1.TYPE, +}; +//# sourceMappingURL=webworker.iterable.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js.map new file mode 100644 index 0000000000..e38565b540 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webworker.iterable.js","sourceRoot":"","sources":["../../src/lib/webworker.iterable.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAqC;AAExB,QAAA,kBAAkB,GAAG;IAChC,eAAe,EAAE,kBAAI;IACrB,iBAAiB,EAAE,kBAAI;IACvB,gBAAgB,EAAE,kBAAI;IACtB,KAAK,EAAE,kBAAI;IACX,UAAU,EAAE,kBAAI;IAChB,uBAAuB,EAAE,kBAAI;IAC7B,aAAa,EAAE,kBAAI;IACnB,QAAQ,EAAE,kBAAI;IACd,WAAW,EAAE,kBAAI;IACjB,QAAQ,EAAE,kBAAI;IACd,OAAO,EAAE,kBAAI;IACb,WAAW,EAAE,kBAAI;IACjB,cAAc,EAAE,kBAAI;IACpB,YAAY,EAAE,kBAAI;IAClB,wBAAwB,EAAE,kBAAI;IAC9B,YAAY,EAAE,kBAAI;IAClB,eAAe,EAAE,kBAAI;IACrB,kBAAkB,EAAE,kBAAI;IACxB,gBAAgB,EAAE,kBAAI;IACtB,0BAA0B,EAAE,kBAAI;IAChC,+BAA+B,EAAE,kBAAI;IACrC,yBAAyB,EAAE,kBAAI;IAC/B,8BAA8B,EAAE,kBAAI;CACS,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js new file mode 100644 index 0000000000..9b7c6cc52c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js @@ -0,0 +1,589 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +exports.webworker = void 0; +const base_config_1 = require("./base-config"); +exports.webworker = { + AddEventListenerOptions: base_config_1.TYPE, + AesCbcParams: base_config_1.TYPE, + AesCtrParams: base_config_1.TYPE, + AesDerivedKeyParams: base_config_1.TYPE, + AesGcmParams: base_config_1.TYPE, + AesKeyAlgorithm: base_config_1.TYPE, + AesKeyGenParams: base_config_1.TYPE, + Algorithm: base_config_1.TYPE, + AudioConfiguration: base_config_1.TYPE, + AvcEncoderConfig: base_config_1.TYPE, + BlobPropertyBag: base_config_1.TYPE, + CSSMatrixComponentOptions: base_config_1.TYPE, + CSSNumericType: base_config_1.TYPE, + CacheQueryOptions: base_config_1.TYPE, + ClientQueryOptions: base_config_1.TYPE, + CloseEventInit: base_config_1.TYPE, + CryptoKeyPair: base_config_1.TYPE, + CustomEventInit: base_config_1.TYPE, + DOMMatrix2DInit: base_config_1.TYPE, + DOMMatrixInit: base_config_1.TYPE, + DOMPointInit: base_config_1.TYPE, + DOMQuadInit: base_config_1.TYPE, + DOMRectInit: base_config_1.TYPE, + EcKeyGenParams: base_config_1.TYPE, + EcKeyImportParams: base_config_1.TYPE, + EcdhKeyDeriveParams: base_config_1.TYPE, + EcdsaParams: base_config_1.TYPE, + EncodedVideoChunkInit: base_config_1.TYPE, + EncodedVideoChunkMetadata: base_config_1.TYPE, + ErrorEventInit: base_config_1.TYPE, + EventInit: base_config_1.TYPE, + EventListenerOptions: base_config_1.TYPE, + EventSourceInit: base_config_1.TYPE, + ExtendableEventInit: base_config_1.TYPE, + ExtendableMessageEventInit: base_config_1.TYPE, + FetchEventInit: base_config_1.TYPE, + FilePropertyBag: base_config_1.TYPE, + FileSystemCreateWritableOptions: base_config_1.TYPE, + FileSystemGetDirectoryOptions: base_config_1.TYPE, + FileSystemGetFileOptions: base_config_1.TYPE, + FileSystemReadWriteOptions: base_config_1.TYPE, + FileSystemRemoveOptions: base_config_1.TYPE, + FontFaceDescriptors: base_config_1.TYPE, + FontFaceSetLoadEventInit: base_config_1.TYPE, + GetNotificationOptions: base_config_1.TYPE, + HkdfParams: base_config_1.TYPE, + HmacImportParams: base_config_1.TYPE, + HmacKeyGenParams: base_config_1.TYPE, + IDBDatabaseInfo: base_config_1.TYPE, + IDBIndexParameters: base_config_1.TYPE, + IDBObjectStoreParameters: base_config_1.TYPE, + IDBTransactionOptions: base_config_1.TYPE, + IDBVersionChangeEventInit: base_config_1.TYPE, + ImageBitmapOptions: base_config_1.TYPE, + ImageBitmapRenderingContextSettings: base_config_1.TYPE, + ImageDataSettings: base_config_1.TYPE, + ImageEncodeOptions: base_config_1.TYPE, + ImportMeta: base_config_1.TYPE, + JsonWebKey: base_config_1.TYPE, + KeyAlgorithm: base_config_1.TYPE, + LockInfo: base_config_1.TYPE, + LockManagerSnapshot: base_config_1.TYPE, + LockOptions: base_config_1.TYPE, + MediaCapabilitiesDecodingInfo: base_config_1.TYPE, + MediaCapabilitiesEncodingInfo: base_config_1.TYPE, + MediaCapabilitiesInfo: base_config_1.TYPE, + MediaConfiguration: base_config_1.TYPE, + MediaDecodingConfiguration: base_config_1.TYPE, + MediaEncodingConfiguration: base_config_1.TYPE, + MessageEventInit: base_config_1.TYPE, + MultiCacheQueryOptions: base_config_1.TYPE, + NavigationPreloadState: base_config_1.TYPE, + NotificationAction: base_config_1.TYPE, + NotificationEventInit: base_config_1.TYPE, + NotificationOptions: base_config_1.TYPE, + Pbkdf2Params: base_config_1.TYPE, + PerformanceMarkOptions: base_config_1.TYPE, + PerformanceMeasureOptions: base_config_1.TYPE, + PerformanceObserverInit: base_config_1.TYPE, + PermissionDescriptor: base_config_1.TYPE, + PlaneLayout: base_config_1.TYPE, + ProgressEventInit: base_config_1.TYPE, + PromiseRejectionEventInit: base_config_1.TYPE, + PushEventInit: base_config_1.TYPE, + PushSubscriptionJSON: base_config_1.TYPE, + PushSubscriptionOptionsInit: base_config_1.TYPE, + QueuingStrategy: base_config_1.TYPE, + QueuingStrategyInit: base_config_1.TYPE, + RTCEncodedAudioFrameMetadata: base_config_1.TYPE, + RTCEncodedVideoFrameMetadata: base_config_1.TYPE, + ReadableStreamGetReaderOptions: base_config_1.TYPE, + ReadableStreamReadDoneResult: base_config_1.TYPE, + ReadableStreamReadValueResult: base_config_1.TYPE, + ReadableWritablePair: base_config_1.TYPE, + RegistrationOptions: base_config_1.TYPE, + ReportingObserverOptions: base_config_1.TYPE, + RequestInit: base_config_1.TYPE, + ResponseInit: base_config_1.TYPE, + RsaHashedImportParams: base_config_1.TYPE, + RsaHashedKeyGenParams: base_config_1.TYPE, + RsaKeyGenParams: base_config_1.TYPE, + RsaOaepParams: base_config_1.TYPE, + RsaOtherPrimesInfo: base_config_1.TYPE, + RsaPssParams: base_config_1.TYPE, + SecurityPolicyViolationEventInit: base_config_1.TYPE, + StorageEstimate: base_config_1.TYPE, + StreamPipeOptions: base_config_1.TYPE, + StructuredSerializeOptions: base_config_1.TYPE, + TextDecodeOptions: base_config_1.TYPE, + TextDecoderOptions: base_config_1.TYPE, + TextEncoderEncodeIntoResult: base_config_1.TYPE, + Transformer: base_config_1.TYPE, + UnderlyingByteSource: base_config_1.TYPE, + UnderlyingDefaultSource: base_config_1.TYPE, + UnderlyingSink: base_config_1.TYPE, + UnderlyingSource: base_config_1.TYPE, + VideoColorSpaceInit: base_config_1.TYPE, + VideoConfiguration: base_config_1.TYPE, + VideoDecoderConfig: base_config_1.TYPE, + VideoDecoderInit: base_config_1.TYPE, + VideoDecoderSupport: base_config_1.TYPE, + VideoEncoderConfig: base_config_1.TYPE, + VideoEncoderEncodeOptions: base_config_1.TYPE, + VideoEncoderInit: base_config_1.TYPE, + VideoEncoderSupport: base_config_1.TYPE, + VideoFrameBufferInit: base_config_1.TYPE, + VideoFrameCopyToOptions: base_config_1.TYPE, + VideoFrameInit: base_config_1.TYPE, + WebGLContextAttributes: base_config_1.TYPE, + WebGLContextEventInit: base_config_1.TYPE, + WebTransportCloseInfo: base_config_1.TYPE, + WebTransportErrorOptions: base_config_1.TYPE, + WebTransportHash: base_config_1.TYPE, + WebTransportOptions: base_config_1.TYPE, + WebTransportSendStreamOptions: base_config_1.TYPE, + WorkerOptions: base_config_1.TYPE, + WriteParams: base_config_1.TYPE, + ANGLE_instanced_arrays: base_config_1.TYPE, + AbortController: base_config_1.TYPE_VALUE, + AbortSignalEventMap: base_config_1.TYPE, + AbortSignal: base_config_1.TYPE_VALUE, + AbstractWorkerEventMap: base_config_1.TYPE, + AbstractWorker: base_config_1.TYPE, + AnimationFrameProvider: base_config_1.TYPE, + Blob: base_config_1.TYPE_VALUE, + Body: base_config_1.TYPE, + BroadcastChannelEventMap: base_config_1.TYPE, + BroadcastChannel: base_config_1.TYPE_VALUE, + ByteLengthQueuingStrategy: base_config_1.TYPE_VALUE, + CSSImageValue: base_config_1.TYPE_VALUE, + CSSKeywordValue: base_config_1.TYPE_VALUE, + CSSMathClamp: base_config_1.TYPE_VALUE, + CSSMathInvert: base_config_1.TYPE_VALUE, + CSSMathMax: base_config_1.TYPE_VALUE, + CSSMathMin: base_config_1.TYPE_VALUE, + CSSMathNegate: base_config_1.TYPE_VALUE, + CSSMathProduct: base_config_1.TYPE_VALUE, + CSSMathSum: base_config_1.TYPE_VALUE, + CSSMathValue: base_config_1.TYPE_VALUE, + CSSMatrixComponent: base_config_1.TYPE_VALUE, + CSSNumericArray: base_config_1.TYPE_VALUE, + CSSNumericValue: base_config_1.TYPE_VALUE, + CSSPerspective: base_config_1.TYPE_VALUE, + CSSRotate: base_config_1.TYPE_VALUE, + CSSScale: base_config_1.TYPE_VALUE, + CSSSkew: base_config_1.TYPE_VALUE, + CSSSkewX: base_config_1.TYPE_VALUE, + CSSSkewY: base_config_1.TYPE_VALUE, + CSSStyleValue: base_config_1.TYPE_VALUE, + CSSTransformComponent: base_config_1.TYPE_VALUE, + CSSTransformValue: base_config_1.TYPE_VALUE, + CSSTranslate: base_config_1.TYPE_VALUE, + CSSUnitValue: base_config_1.TYPE_VALUE, + CSSUnparsedValue: base_config_1.TYPE_VALUE, + CSSVariableReferenceValue: base_config_1.TYPE_VALUE, + Cache: base_config_1.TYPE_VALUE, + CacheStorage: base_config_1.TYPE_VALUE, + CanvasCompositing: base_config_1.TYPE, + CanvasDrawImage: base_config_1.TYPE, + CanvasDrawPath: base_config_1.TYPE, + CanvasFillStrokeStyles: base_config_1.TYPE, + CanvasFilters: base_config_1.TYPE, + CanvasGradient: base_config_1.TYPE_VALUE, + CanvasImageData: base_config_1.TYPE, + CanvasImageSmoothing: base_config_1.TYPE, + CanvasPath: base_config_1.TYPE, + CanvasPathDrawingStyles: base_config_1.TYPE, + CanvasPattern: base_config_1.TYPE_VALUE, + CanvasRect: base_config_1.TYPE, + CanvasShadowStyles: base_config_1.TYPE, + CanvasState: base_config_1.TYPE, + CanvasText: base_config_1.TYPE, + CanvasTextDrawingStyles: base_config_1.TYPE, + CanvasTransform: base_config_1.TYPE, + Client: base_config_1.TYPE_VALUE, + Clients: base_config_1.TYPE_VALUE, + CloseEvent: base_config_1.TYPE_VALUE, + CompressionStream: base_config_1.TYPE_VALUE, + CountQueuingStrategy: base_config_1.TYPE_VALUE, + Crypto: base_config_1.TYPE_VALUE, + CryptoKey: base_config_1.TYPE_VALUE, + CustomEvent: base_config_1.TYPE_VALUE, + DOMException: base_config_1.TYPE_VALUE, + DOMMatrix: base_config_1.TYPE_VALUE, + DOMMatrixReadOnly: base_config_1.TYPE_VALUE, + DOMPoint: base_config_1.TYPE_VALUE, + DOMPointReadOnly: base_config_1.TYPE_VALUE, + DOMQuad: base_config_1.TYPE_VALUE, + DOMRect: base_config_1.TYPE_VALUE, + DOMRectReadOnly: base_config_1.TYPE_VALUE, + DOMStringList: base_config_1.TYPE_VALUE, + DecompressionStream: base_config_1.TYPE_VALUE, + DedicatedWorkerGlobalScopeEventMap: base_config_1.TYPE, + DedicatedWorkerGlobalScope: base_config_1.TYPE_VALUE, + EXT_blend_minmax: base_config_1.TYPE, + EXT_color_buffer_float: base_config_1.TYPE, + EXT_color_buffer_half_float: base_config_1.TYPE, + EXT_float_blend: base_config_1.TYPE, + EXT_frag_depth: base_config_1.TYPE, + EXT_sRGB: base_config_1.TYPE, + EXT_shader_texture_lod: base_config_1.TYPE, + EXT_texture_compression_bptc: base_config_1.TYPE, + EXT_texture_compression_rgtc: base_config_1.TYPE, + EXT_texture_filter_anisotropic: base_config_1.TYPE, + EXT_texture_norm16: base_config_1.TYPE, + EncodedVideoChunk: base_config_1.TYPE_VALUE, + ErrorEvent: base_config_1.TYPE_VALUE, + Event: base_config_1.TYPE_VALUE, + EventListener: base_config_1.TYPE, + EventListenerObject: base_config_1.TYPE, + EventSourceEventMap: base_config_1.TYPE, + EventSource: base_config_1.TYPE_VALUE, + EventTarget: base_config_1.TYPE_VALUE, + ExtendableEvent: base_config_1.TYPE_VALUE, + ExtendableMessageEvent: base_config_1.TYPE_VALUE, + FetchEvent: base_config_1.TYPE_VALUE, + File: base_config_1.TYPE_VALUE, + FileList: base_config_1.TYPE_VALUE, + FileReaderEventMap: base_config_1.TYPE, + FileReader: base_config_1.TYPE_VALUE, + FileReaderSync: base_config_1.TYPE_VALUE, + FileSystemDirectoryHandle: base_config_1.TYPE_VALUE, + FileSystemFileHandle: base_config_1.TYPE_VALUE, + FileSystemHandle: base_config_1.TYPE_VALUE, + FileSystemSyncAccessHandle: base_config_1.TYPE_VALUE, + FileSystemWritableFileStream: base_config_1.TYPE_VALUE, + FontFace: base_config_1.TYPE_VALUE, + FontFaceSetEventMap: base_config_1.TYPE, + FontFaceSet: base_config_1.TYPE_VALUE, + FontFaceSetLoadEvent: base_config_1.TYPE_VALUE, + FontFaceSource: base_config_1.TYPE, + FormData: base_config_1.TYPE_VALUE, + GenericTransformStream: base_config_1.TYPE, + Headers: base_config_1.TYPE_VALUE, + IDBCursor: base_config_1.TYPE_VALUE, + IDBCursorWithValue: base_config_1.TYPE_VALUE, + IDBDatabaseEventMap: base_config_1.TYPE, + IDBDatabase: base_config_1.TYPE_VALUE, + IDBFactory: base_config_1.TYPE_VALUE, + IDBIndex: base_config_1.TYPE_VALUE, + IDBKeyRange: base_config_1.TYPE_VALUE, + IDBObjectStore: base_config_1.TYPE_VALUE, + IDBOpenDBRequestEventMap: base_config_1.TYPE, + IDBOpenDBRequest: base_config_1.TYPE_VALUE, + IDBRequestEventMap: base_config_1.TYPE, + IDBRequest: base_config_1.TYPE_VALUE, + IDBTransactionEventMap: base_config_1.TYPE, + IDBTransaction: base_config_1.TYPE_VALUE, + IDBVersionChangeEvent: base_config_1.TYPE_VALUE, + ImageBitmap: base_config_1.TYPE_VALUE, + ImageBitmapRenderingContext: base_config_1.TYPE_VALUE, + ImageData: base_config_1.TYPE_VALUE, + KHR_parallel_shader_compile: base_config_1.TYPE, + Lock: base_config_1.TYPE_VALUE, + LockManager: base_config_1.TYPE_VALUE, + MediaCapabilities: base_config_1.TYPE_VALUE, + MessageChannel: base_config_1.TYPE_VALUE, + MessageEvent: base_config_1.TYPE_VALUE, + MessagePortEventMap: base_config_1.TYPE, + MessagePort: base_config_1.TYPE_VALUE, + NavigationPreloadManager: base_config_1.TYPE_VALUE, + NavigatorBadge: base_config_1.TYPE, + NavigatorConcurrentHardware: base_config_1.TYPE, + NavigatorID: base_config_1.TYPE, + NavigatorLanguage: base_config_1.TYPE, + NavigatorLocks: base_config_1.TYPE, + NavigatorOnLine: base_config_1.TYPE, + NavigatorStorage: base_config_1.TYPE, + NotificationEventMap: base_config_1.TYPE, + Notification: base_config_1.TYPE_VALUE, + NotificationEvent: base_config_1.TYPE_VALUE, + OES_draw_buffers_indexed: base_config_1.TYPE, + OES_element_index_uint: base_config_1.TYPE, + OES_fbo_render_mipmap: base_config_1.TYPE, + OES_standard_derivatives: base_config_1.TYPE, + OES_texture_float: base_config_1.TYPE, + OES_texture_float_linear: base_config_1.TYPE, + OES_texture_half_float: base_config_1.TYPE, + OES_texture_half_float_linear: base_config_1.TYPE, + OES_vertex_array_object: base_config_1.TYPE, + OVR_multiview2: base_config_1.TYPE, + OffscreenCanvasEventMap: base_config_1.TYPE, + OffscreenCanvas: base_config_1.TYPE_VALUE, + OffscreenCanvasRenderingContext2D: base_config_1.TYPE_VALUE, + Path2D: base_config_1.TYPE_VALUE, + PerformanceEventMap: base_config_1.TYPE, + Performance: base_config_1.TYPE_VALUE, + PerformanceEntry: base_config_1.TYPE_VALUE, + PerformanceMark: base_config_1.TYPE_VALUE, + PerformanceMeasure: base_config_1.TYPE_VALUE, + PerformanceObserver: base_config_1.TYPE_VALUE, + PerformanceObserverEntryList: base_config_1.TYPE_VALUE, + PerformanceResourceTiming: base_config_1.TYPE_VALUE, + PerformanceServerTiming: base_config_1.TYPE_VALUE, + PermissionStatusEventMap: base_config_1.TYPE, + PermissionStatus: base_config_1.TYPE_VALUE, + Permissions: base_config_1.TYPE_VALUE, + ProgressEvent: base_config_1.TYPE_VALUE, + PromiseRejectionEvent: base_config_1.TYPE_VALUE, + PushEvent: base_config_1.TYPE_VALUE, + PushManager: base_config_1.TYPE_VALUE, + PushMessageData: base_config_1.TYPE_VALUE, + PushSubscription: base_config_1.TYPE_VALUE, + PushSubscriptionOptions: base_config_1.TYPE_VALUE, + RTCEncodedAudioFrame: base_config_1.TYPE_VALUE, + RTCEncodedVideoFrame: base_config_1.TYPE_VALUE, + ReadableByteStreamController: base_config_1.TYPE_VALUE, + ReadableStream: base_config_1.TYPE_VALUE, + ReadableStreamBYOBReader: base_config_1.TYPE_VALUE, + ReadableStreamBYOBRequest: base_config_1.TYPE_VALUE, + ReadableStreamDefaultController: base_config_1.TYPE_VALUE, + ReadableStreamDefaultReader: base_config_1.TYPE_VALUE, + ReadableStreamGenericReader: base_config_1.TYPE, + Report: base_config_1.TYPE_VALUE, + ReportBody: base_config_1.TYPE_VALUE, + ReportingObserver: base_config_1.TYPE_VALUE, + Request: base_config_1.TYPE_VALUE, + Response: base_config_1.TYPE_VALUE, + SecurityPolicyViolationEvent: base_config_1.TYPE_VALUE, + ServiceWorkerEventMap: base_config_1.TYPE, + ServiceWorker: base_config_1.TYPE_VALUE, + ServiceWorkerContainerEventMap: base_config_1.TYPE, + ServiceWorkerContainer: base_config_1.TYPE_VALUE, + ServiceWorkerGlobalScopeEventMap: base_config_1.TYPE, + ServiceWorkerGlobalScope: base_config_1.TYPE_VALUE, + ServiceWorkerRegistrationEventMap: base_config_1.TYPE, + ServiceWorkerRegistration: base_config_1.TYPE_VALUE, + SharedWorkerGlobalScopeEventMap: base_config_1.TYPE, + SharedWorkerGlobalScope: base_config_1.TYPE_VALUE, + StorageManager: base_config_1.TYPE_VALUE, + StylePropertyMapReadOnly: base_config_1.TYPE_VALUE, + SubtleCrypto: base_config_1.TYPE_VALUE, + TextDecoder: base_config_1.TYPE_VALUE, + TextDecoderCommon: base_config_1.TYPE, + TextDecoderStream: base_config_1.TYPE_VALUE, + TextEncoder: base_config_1.TYPE_VALUE, + TextEncoderCommon: base_config_1.TYPE, + TextEncoderStream: base_config_1.TYPE_VALUE, + TextMetrics: base_config_1.TYPE_VALUE, + TransformStream: base_config_1.TYPE_VALUE, + TransformStreamDefaultController: base_config_1.TYPE_VALUE, + URL: base_config_1.TYPE_VALUE, + URLSearchParams: base_config_1.TYPE_VALUE, + VideoColorSpace: base_config_1.TYPE_VALUE, + VideoDecoderEventMap: base_config_1.TYPE, + VideoDecoder: base_config_1.TYPE_VALUE, + VideoEncoderEventMap: base_config_1.TYPE, + VideoEncoder: base_config_1.TYPE_VALUE, + VideoFrame: base_config_1.TYPE_VALUE, + WEBGL_color_buffer_float: base_config_1.TYPE, + WEBGL_compressed_texture_astc: base_config_1.TYPE, + WEBGL_compressed_texture_etc: base_config_1.TYPE, + WEBGL_compressed_texture_etc1: base_config_1.TYPE, + WEBGL_compressed_texture_pvrtc: base_config_1.TYPE, + WEBGL_compressed_texture_s3tc: base_config_1.TYPE, + WEBGL_compressed_texture_s3tc_srgb: base_config_1.TYPE, + WEBGL_debug_renderer_info: base_config_1.TYPE, + WEBGL_debug_shaders: base_config_1.TYPE, + WEBGL_depth_texture: base_config_1.TYPE, + WEBGL_draw_buffers: base_config_1.TYPE, + WEBGL_lose_context: base_config_1.TYPE, + WEBGL_multi_draw: base_config_1.TYPE, + WebGL2RenderingContext: base_config_1.TYPE_VALUE, + WebGL2RenderingContextBase: base_config_1.TYPE, + WebGL2RenderingContextOverloads: base_config_1.TYPE, + WebGLActiveInfo: base_config_1.TYPE_VALUE, + WebGLBuffer: base_config_1.TYPE_VALUE, + WebGLContextEvent: base_config_1.TYPE_VALUE, + WebGLFramebuffer: base_config_1.TYPE_VALUE, + WebGLProgram: base_config_1.TYPE_VALUE, + WebGLQuery: base_config_1.TYPE_VALUE, + WebGLRenderbuffer: base_config_1.TYPE_VALUE, + WebGLRenderingContext: base_config_1.TYPE_VALUE, + WebGLRenderingContextBase: base_config_1.TYPE, + WebGLRenderingContextOverloads: base_config_1.TYPE, + WebGLSampler: base_config_1.TYPE_VALUE, + WebGLShader: base_config_1.TYPE_VALUE, + WebGLShaderPrecisionFormat: base_config_1.TYPE_VALUE, + WebGLSync: base_config_1.TYPE_VALUE, + WebGLTexture: base_config_1.TYPE_VALUE, + WebGLTransformFeedback: base_config_1.TYPE_VALUE, + WebGLUniformLocation: base_config_1.TYPE_VALUE, + WebGLVertexArrayObject: base_config_1.TYPE_VALUE, + WebGLVertexArrayObjectOES: base_config_1.TYPE, + WebSocketEventMap: base_config_1.TYPE, + WebSocket: base_config_1.TYPE_VALUE, + WebTransport: base_config_1.TYPE_VALUE, + WebTransportBidirectionalStream: base_config_1.TYPE_VALUE, + WebTransportDatagramDuplexStream: base_config_1.TYPE_VALUE, + WebTransportError: base_config_1.TYPE_VALUE, + WindowClient: base_config_1.TYPE_VALUE, + WindowOrWorkerGlobalScope: base_config_1.TYPE, + WorkerEventMap: base_config_1.TYPE, + Worker: base_config_1.TYPE_VALUE, + WorkerGlobalScopeEventMap: base_config_1.TYPE, + WorkerGlobalScope: base_config_1.TYPE_VALUE, + WorkerLocation: base_config_1.TYPE_VALUE, + WorkerNavigator: base_config_1.TYPE_VALUE, + WritableStream: base_config_1.TYPE_VALUE, + WritableStreamDefaultController: base_config_1.TYPE_VALUE, + WritableStreamDefaultWriter: base_config_1.TYPE_VALUE, + XMLHttpRequestEventMap: base_config_1.TYPE, + XMLHttpRequest: base_config_1.TYPE_VALUE, + XMLHttpRequestEventTargetEventMap: base_config_1.TYPE, + XMLHttpRequestEventTarget: base_config_1.TYPE_VALUE, + XMLHttpRequestUpload: base_config_1.TYPE_VALUE, + Console: base_config_1.TYPE, + WebAssembly: base_config_1.TYPE_VALUE, + EncodedVideoChunkOutputCallback: base_config_1.TYPE, + FrameRequestCallback: base_config_1.TYPE, + LockGrantedCallback: base_config_1.TYPE, + OnErrorEventHandlerNonNull: base_config_1.TYPE, + PerformanceObserverCallback: base_config_1.TYPE, + QueuingStrategySize: base_config_1.TYPE, + ReportingObserverCallback: base_config_1.TYPE, + TransformerFlushCallback: base_config_1.TYPE, + TransformerStartCallback: base_config_1.TYPE, + TransformerTransformCallback: base_config_1.TYPE, + UnderlyingSinkAbortCallback: base_config_1.TYPE, + UnderlyingSinkCloseCallback: base_config_1.TYPE, + UnderlyingSinkStartCallback: base_config_1.TYPE, + UnderlyingSinkWriteCallback: base_config_1.TYPE, + UnderlyingSourceCancelCallback: base_config_1.TYPE, + UnderlyingSourcePullCallback: base_config_1.TYPE, + UnderlyingSourceStartCallback: base_config_1.TYPE, + VideoFrameOutputCallback: base_config_1.TYPE, + VoidFunction: base_config_1.TYPE, + WebCodecsErrorCallback: base_config_1.TYPE, + AlgorithmIdentifier: base_config_1.TYPE, + AllowSharedBufferSource: base_config_1.TYPE, + BigInteger: base_config_1.TYPE, + BinaryData: base_config_1.TYPE, + BlobPart: base_config_1.TYPE, + BodyInit: base_config_1.TYPE, + BufferSource: base_config_1.TYPE, + CSSKeywordish: base_config_1.TYPE, + CSSNumberish: base_config_1.TYPE, + CSSPerspectiveValue: base_config_1.TYPE, + CSSUnparsedSegment: base_config_1.TYPE, + CanvasImageSource: base_config_1.TYPE, + DOMHighResTimeStamp: base_config_1.TYPE, + EpochTimeStamp: base_config_1.TYPE, + EventListenerOrEventListenerObject: base_config_1.TYPE, + FileSystemWriteChunkType: base_config_1.TYPE, + Float32List: base_config_1.TYPE, + FormDataEntryValue: base_config_1.TYPE, + GLbitfield: base_config_1.TYPE, + GLboolean: base_config_1.TYPE, + GLclampf: base_config_1.TYPE, + GLenum: base_config_1.TYPE, + GLfloat: base_config_1.TYPE, + GLint: base_config_1.TYPE, + GLint64: base_config_1.TYPE, + GLintptr: base_config_1.TYPE, + GLsizei: base_config_1.TYPE, + GLsizeiptr: base_config_1.TYPE, + GLuint: base_config_1.TYPE, + GLuint64: base_config_1.TYPE, + HashAlgorithmIdentifier: base_config_1.TYPE, + HeadersInit: base_config_1.TYPE, + IDBValidKey: base_config_1.TYPE, + ImageBitmapSource: base_config_1.TYPE, + Int32List: base_config_1.TYPE, + MessageEventSource: base_config_1.TYPE, + NamedCurve: base_config_1.TYPE, + OffscreenRenderingContext: base_config_1.TYPE, + OnErrorEventHandler: base_config_1.TYPE, + PerformanceEntryList: base_config_1.TYPE, + PushMessageDataInit: base_config_1.TYPE, + ReadableStreamController: base_config_1.TYPE, + ReadableStreamReadResult: base_config_1.TYPE, + ReadableStreamReader: base_config_1.TYPE, + ReportList: base_config_1.TYPE, + RequestInfo: base_config_1.TYPE, + TexImageSource: base_config_1.TYPE, + TimerHandler: base_config_1.TYPE, + Transferable: base_config_1.TYPE, + Uint32List: base_config_1.TYPE, + VibratePattern: base_config_1.TYPE, + XMLHttpRequestBodyInit: base_config_1.TYPE, + AlphaOption: base_config_1.TYPE, + AvcBitstreamFormat: base_config_1.TYPE, + BinaryType: base_config_1.TYPE, + CSSMathOperator: base_config_1.TYPE, + CSSNumericBaseType: base_config_1.TYPE, + CanvasDirection: base_config_1.TYPE, + CanvasFillRule: base_config_1.TYPE, + CanvasFontKerning: base_config_1.TYPE, + CanvasFontStretch: base_config_1.TYPE, + CanvasFontVariantCaps: base_config_1.TYPE, + CanvasLineCap: base_config_1.TYPE, + CanvasLineJoin: base_config_1.TYPE, + CanvasTextAlign: base_config_1.TYPE, + CanvasTextBaseline: base_config_1.TYPE, + CanvasTextRendering: base_config_1.TYPE, + ClientTypes: base_config_1.TYPE, + CodecState: base_config_1.TYPE, + ColorGamut: base_config_1.TYPE, + ColorSpaceConversion: base_config_1.TYPE, + CompressionFormat: base_config_1.TYPE, + DocumentVisibilityState: base_config_1.TYPE, + EncodedVideoChunkType: base_config_1.TYPE, + EndingType: base_config_1.TYPE, + FileSystemHandleKind: base_config_1.TYPE, + FontDisplay: base_config_1.TYPE, + FontFaceLoadStatus: base_config_1.TYPE, + FontFaceSetLoadStatus: base_config_1.TYPE, + FrameType: base_config_1.TYPE, + GlobalCompositeOperation: base_config_1.TYPE, + HardwareAcceleration: base_config_1.TYPE, + HdrMetadataType: base_config_1.TYPE, + IDBCursorDirection: base_config_1.TYPE, + IDBRequestReadyState: base_config_1.TYPE, + IDBTransactionDurability: base_config_1.TYPE, + IDBTransactionMode: base_config_1.TYPE, + ImageOrientation: base_config_1.TYPE, + ImageSmoothingQuality: base_config_1.TYPE, + KeyFormat: base_config_1.TYPE, + KeyType: base_config_1.TYPE, + KeyUsage: base_config_1.TYPE, + LatencyMode: base_config_1.TYPE, + LockMode: base_config_1.TYPE, + MediaDecodingType: base_config_1.TYPE, + MediaEncodingType: base_config_1.TYPE, + NotificationDirection: base_config_1.TYPE, + NotificationPermission: base_config_1.TYPE, + OffscreenRenderingContextId: base_config_1.TYPE, + PermissionName: base_config_1.TYPE, + PermissionState: base_config_1.TYPE, + PredefinedColorSpace: base_config_1.TYPE, + PremultiplyAlpha: base_config_1.TYPE, + PushEncryptionKeyName: base_config_1.TYPE, + RTCEncodedVideoFrameType: base_config_1.TYPE, + ReadableStreamReaderMode: base_config_1.TYPE, + ReadableStreamType: base_config_1.TYPE, + ReferrerPolicy: base_config_1.TYPE, + RequestCache: base_config_1.TYPE, + RequestCredentials: base_config_1.TYPE, + RequestDestination: base_config_1.TYPE, + RequestMode: base_config_1.TYPE, + RequestRedirect: base_config_1.TYPE, + ResizeQuality: base_config_1.TYPE, + ResponseType: base_config_1.TYPE, + SecurityPolicyViolationEventDisposition: base_config_1.TYPE, + ServiceWorkerState: base_config_1.TYPE, + ServiceWorkerUpdateViaCache: base_config_1.TYPE, + TransferFunction: base_config_1.TYPE, + VideoColorPrimaries: base_config_1.TYPE, + VideoEncoderBitrateMode: base_config_1.TYPE, + VideoMatrixCoefficients: base_config_1.TYPE, + VideoPixelFormat: base_config_1.TYPE, + VideoTransferCharacteristics: base_config_1.TYPE, + WebGLPowerPreference: base_config_1.TYPE, + WebTransportCongestionControl: base_config_1.TYPE, + WebTransportErrorSource: base_config_1.TYPE, + WorkerType: base_config_1.TYPE, + WriteCommandType: base_config_1.TYPE, + XMLHttpRequestResponseType: base_config_1.TYPE, +}; +//# sourceMappingURL=webworker.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js.map new file mode 100644 index 0000000000..aba7393646 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webworker.js","sourceRoot":"","sources":["../../src/lib/webworker.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD;;;AAGvD,+CAAiD;AAEpC,QAAA,SAAS,GAAG;IACvB,uBAAuB,EAAE,kBAAI;IAC7B,YAAY,EAAE,kBAAI;IAClB,YAAY,EAAE,kBAAI;IAClB,mBAAmB,EAAE,kBAAI;IACzB,YAAY,EAAE,kBAAI;IAClB,eAAe,EAAE,kBAAI;IACrB,eAAe,EAAE,kBAAI;IACrB,SAAS,EAAE,kBAAI;IACf,kBAAkB,EAAE,kBAAI;IACxB,gBAAgB,EAAE,kBAAI;IACtB,eAAe,EAAE,kBAAI;IACrB,yBAAyB,EAAE,kBAAI;IAC/B,cAAc,EAAE,kBAAI;IACpB,iBAAiB,EAAE,kBAAI;IACvB,kBAAkB,EAAE,kBAAI;IACxB,cAAc,EAAE,kBAAI;IACpB,aAAa,EAAE,kB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kBAAI;IACxB,2BAA2B,EAAE,kBAAI;IACjC,gBAAgB,EAAE,kBAAI;IACtB,mBAAmB,EAAE,kBAAI;IACzB,uBAAuB,EAAE,kBAAI;IAC7B,uBAAuB,EAAE,kBAAI;IAC7B,gBAAgB,EAAE,kBAAI;IACtB,4BAA4B,EAAE,kBAAI;IAClC,oBAAoB,EAAE,kBAAI;IAC1B,6BAA6B,EAAE,kBAAI;IACnC,uBAAuB,EAAE,kBAAI;IAC7B,UAAU,EAAE,kBAAI;IAChB,gBAAgB,EAAE,kBAAI;IACtB,0BAA0B,EAAE,kBAAI;CACa,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts new file mode 100644 index 0000000000..978e7becee --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts @@ -0,0 +1,29 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Referencer } from './Referencer'; +import { Visitor } from './Visitor'; +declare class ClassVisitor extends Visitor { + #private; + constructor(referencer: Referencer, node: TSESTree.ClassDeclaration | TSESTree.ClassExpression, emitDecoratorMetadata: boolean); + static visit(referencer: Referencer, node: TSESTree.ClassDeclaration | TSESTree.ClassExpression, emitDecoratorMetadata: boolean): void; + visit(node: TSESTree.Node | null | undefined): void; + protected visitClass(node: TSESTree.ClassDeclaration | TSESTree.ClassExpression): void; + protected visitPropertyDefinition(node: TSESTree.AccessorProperty | TSESTree.PropertyDefinition | TSESTree.TSAbstractAccessorProperty | TSESTree.TSAbstractPropertyDefinition): void; + protected visitFunctionParameterTypeAnnotation(node: TSESTree.Parameter, withDecorators: boolean): void; + protected visitMethodFunction(node: TSESTree.FunctionExpression, methodNode: TSESTree.MethodDefinition): void; + protected visitPropertyBase(node: TSESTree.AccessorProperty | TSESTree.PropertyDefinition | TSESTree.TSAbstractAccessorProperty | TSESTree.TSAbstractMethodDefinition | TSESTree.TSAbstractPropertyDefinition): void; + protected visitMethod(node: TSESTree.MethodDefinition): void; + protected visitType(node: TSESTree.Node | null | undefined): void; + protected visitMetadataType(node: TSESTree.TSTypeAnnotation | null | undefined, withDecorators: boolean): void; + protected AccessorProperty(node: TSESTree.AccessorProperty): void; + protected ClassBody(node: TSESTree.ClassBody): void; + protected PropertyDefinition(node: TSESTree.PropertyDefinition): void; + protected MethodDefinition(node: TSESTree.MethodDefinition): void; + protected TSAbstractAccessorProperty(node: TSESTree.TSAbstractAccessorProperty): void; + protected TSAbstractPropertyDefinition(node: TSESTree.TSAbstractPropertyDefinition): void; + protected TSAbstractMethodDefinition(node: TSESTree.TSAbstractMethodDefinition): void; + protected Identifier(node: TSESTree.Identifier): void; + protected PrivateIdentifier(): void; + protected StaticBlock(node: TSESTree.StaticBlock): void; +} +export { ClassVisitor }; +//# sourceMappingURL=ClassVisitor.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map new file mode 100644 index 0000000000..8194d1b715 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassVisitor.d.ts","sourceRoot":"","sources":["../../src/referencer/ClassVisitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,cAAM,YAAa,SAAQ,OAAO;;gBAM9B,UAAU,EAAE,UAAU,EACtB,IA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,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAClD,cAAc,EAAE,OAAO,GACtB,IAAI;IA4CP,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;IAIjE,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,GAAG,IAAI;IAMnD,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,kBAAkB,GAAG,IAAI;IAIrE,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;IAIjE,SAAS,CAAC,0BAA0B,CAClC,IAAI,EAAE,QAAQ,CAAC,0BAA0B,GACxC,IAAI;IAIP,SAAS,CAAC,4BAA4B,CACpC,IAAI,EAAE,QAAQ,CAAC,4BAA4B,GAC1C,IAAI;IAIP,SAAS,CAAC,0BAA0B,CAClC,IAAI,EAAE,QAAQ,CAAC,0BAA0B,GACxC,IAAI;IAIP,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI;IAIrD,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAInC,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI;CAOxD;AAsCD,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js new file mode 100644 index 0000000000..7a3464c68a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js @@ -0,0 +1,321 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _ClassVisitor_classNode, _ClassVisitor_referencer, _ClassVisitor_emitDecoratorMetadata; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClassVisitor = void 0; +const types_1 = require("@typescript-eslint/types"); +const definition_1 = require("../definition"); +const TypeVisitor_1 = require("./TypeVisitor"); +const Visitor_1 = require("./Visitor"); +class ClassVisitor extends Visitor_1.Visitor { + constructor(referencer, node, emitDecoratorMetadata) { + super(referencer); + _ClassVisitor_classNode.set(this, void 0); + _ClassVisitor_referencer.set(this, void 0); + _ClassVisitor_emitDecoratorMetadata.set(this, void 0); + __classPrivateFieldSet(this, _ClassVisitor_referencer, referencer, "f"); + __classPrivateFieldSet(this, _ClassVisitor_classNode, node, "f"); + __classPrivateFieldSet(this, _ClassVisitor_emitDecoratorMetadata, emitDecoratorMetadata, "f"); + } + static visit(referencer, node, emitDecoratorMetadata) { + const classVisitor = new ClassVisitor(referencer, node, emitDecoratorMetadata); + classVisitor.visitClass(node); + } + visit(node) { + // make sure we only handle the nodes we are designed to handle + if (node && node.type in this) { + super.visit(node); + } + else { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(node); + } + } + /////////////////// + // Visit helpers // + /////////////////// + visitClass(node) { + if (node.type === types_1.AST_NODE_TYPES.ClassDeclaration && node.id) { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f") + .currentScope() + .defineIdentifier(node.id, new definition_1.ClassNameDefinition(node.id, node)); + } + node.decorators.forEach(d => __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(d)); + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").scopeManager.nestClassScope(node); + if (node.id) { + // define the class name again inside the new scope + // references to the class should not resolve directly to the parent class + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f") + .currentScope() + .defineIdentifier(node.id, new definition_1.ClassNameDefinition(node.id, node)); + } + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(node.superClass); + // visit the type param declarations + this.visitType(node.typeParameters); + // then the usages + this.visitType(node.superTypeArguments); + node.implements?.forEach(imp => this.visitType(imp)); + this.visit(node.body); + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").close(node); + } + visitPropertyDefinition(node) { + this.visitPropertyBase(node); + /** + * class A { + * @meta // <--- check this + * foo: Type; + * } + */ + this.visitMetadataType(node.typeAnnotation, !!node.decorators.length); + } + visitFunctionParameterTypeAnnotation(node, withDecorators) { + switch (node.type) { + case types_1.AST_NODE_TYPES.AssignmentPattern: + this.visitMetadataType(node.left.typeAnnotation, withDecorators); + break; + case types_1.AST_NODE_TYPES.TSParameterProperty: + this.visitFunctionParameterTypeAnnotation(node.parameter, withDecorators); + break; + default: + this.visitMetadataType(node.typeAnnotation, withDecorators); + } + } + visitMethodFunction(node, methodNode) { + if (node.id) { + // FunctionExpression with name creates its special scope; + // FunctionExpressionNameScope. + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").scopeManager.nestFunctionExpressionNameScope(node); + } + // Consider this function is in the MethodDefinition. + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").scopeManager.nestFunctionScope(node, true); + /** + * class A { + * @meta // <--- check this + * foo(a: Type) {} + * + * @meta // <--- check this + * foo(): Type {} + * } + */ + let withMethodDecorators = !!methodNode.decorators.length; + /** + * class A { + * foo( + * @meta // <--- check this + * a: Type + * ) {} + * + * set foo( + * @meta // <--- EXCEPT this. TS do nothing for this + * a: Type + * ) {} + * } + */ + withMethodDecorators ||= + methodNode.kind !== 'set' && + node.params.some(param => param.decorators.length); + if (!withMethodDecorators && methodNode.kind === 'set') { + const keyName = getLiteralMethodKeyName(methodNode); + /** + * class A { + * @meta // <--- check this + * get a() {} + * set ['a'](v: Type) {} + * } + */ + if (keyName != null && + __classPrivateFieldGet(this, _ClassVisitor_classNode, "f").body.body.find((node) => node !== methodNode && + node.type === types_1.AST_NODE_TYPES.MethodDefinition && + // Node must both be static or not + node.static === methodNode.static && + getLiteralMethodKeyName(node) === keyName)?.decorators.length) { + withMethodDecorators = true; + } + } + /** + * @meta // <--- check this + * class A { + * constructor(a: Type) {} + * } + */ + if (!withMethodDecorators && + methodNode.kind === 'constructor' && + __classPrivateFieldGet(this, _ClassVisitor_classNode, "f").decorators.length) { + withMethodDecorators = true; + } + // Process parameter declarations. + for (const param of node.params) { + this.visitPattern(param, (pattern, info) => { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f") + .currentScope() + .defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node, info.rest)); + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").referencingDefaultValue(pattern, info.assignments, null, true); + }, { processRightHandNodes: true }); + this.visitFunctionParameterTypeAnnotation(param, withMethodDecorators); + param.decorators.forEach(d => this.visit(d)); + } + this.visitMetadataType(node.returnType, withMethodDecorators); + this.visitType(node.typeParameters); + // In TypeScript there are a number of function-like constructs which have no body, + // so check it exists before traversing + if (node.body) { + // Skip BlockStatement to prevent creating BlockStatement scope. + if (node.body.type === types_1.AST_NODE_TYPES.BlockStatement) { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visitChildren(node.body); + } + else { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(node.body); + } + } + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").close(node); + } + visitPropertyBase(node) { + if (node.computed) { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(node.key); + } + if (node.value) { + if (node.type === types_1.AST_NODE_TYPES.PropertyDefinition || + node.type === types_1.AST_NODE_TYPES.AccessorProperty) { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").scopeManager.nestClassFieldInitializerScope(node.value); + } + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(node.value); + if (node.type === types_1.AST_NODE_TYPES.PropertyDefinition || + node.type === types_1.AST_NODE_TYPES.AccessorProperty) { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").close(node.value); + } + } + node.decorators.forEach(d => __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(d)); + } + visitMethod(node) { + if (node.computed) { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(node.key); + } + if (node.value.type === types_1.AST_NODE_TYPES.FunctionExpression) { + this.visitMethodFunction(node.value, node); + } + else { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(node.value); + } + node.decorators.forEach(d => __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(d)); + } + visitType(node) { + if (!node) { + return; + } + TypeVisitor_1.TypeVisitor.visit(__classPrivateFieldGet(this, _ClassVisitor_referencer, "f"), node); + } + visitMetadataType(node, withDecorators) { + if (!node) { + return; + } + // emit decorators metadata only work for TSTypeReference in ClassDeclaration + if (__classPrivateFieldGet(this, _ClassVisitor_classNode, "f").type === types_1.AST_NODE_TYPES.ClassDeclaration && + !__classPrivateFieldGet(this, _ClassVisitor_classNode, "f").declare && + node.typeAnnotation.type === types_1.AST_NODE_TYPES.TSTypeReference && + __classPrivateFieldGet(this, _ClassVisitor_emitDecoratorMetadata, "f")) { + let entityName; + if (node.typeAnnotation.typeName.type === types_1.AST_NODE_TYPES.TSQualifiedName) { + let iter = node.typeAnnotation.typeName; + while (iter.left.type === types_1.AST_NODE_TYPES.TSQualifiedName) { + iter = iter.left; + } + entityName = iter.left; + } + else { + entityName = node.typeAnnotation.typeName; + } + if (withDecorators) { + if (entityName.type === types_1.AST_NODE_TYPES.Identifier) { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").currentScope().referenceDualValueType(entityName); + } + if (node.typeAnnotation.typeArguments) { + this.visitType(node.typeAnnotation.typeArguments); + } + // everything is handled now + return; + } + } + this.visitType(node); + } + ///////////////////// + // Visit selectors // + ///////////////////// + AccessorProperty(node) { + this.visitPropertyDefinition(node); + } + ClassBody(node) { + // this is here on purpose so that this visitor explicitly declares visitors + // for all nodes it cares about (see the instance visit method above) + this.visitChildren(node); + } + PropertyDefinition(node) { + this.visitPropertyDefinition(node); + } + MethodDefinition(node) { + this.visitMethod(node); + } + TSAbstractAccessorProperty(node) { + this.visitPropertyDefinition(node); + } + TSAbstractPropertyDefinition(node) { + this.visitPropertyDefinition(node); + } + TSAbstractMethodDefinition(node) { + this.visitPropertyBase(node); + } + Identifier(node) { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").visit(node); + } + PrivateIdentifier() { + // intentionally skip + } + StaticBlock(node) { + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").scopeManager.nestClassStaticBlockScope(node); + node.body.forEach(b => this.visit(b)); + __classPrivateFieldGet(this, _ClassVisitor_referencer, "f").close(node); + } +} +exports.ClassVisitor = ClassVisitor; +_ClassVisitor_classNode = new WeakMap(), _ClassVisitor_referencer = new WeakMap(), _ClassVisitor_emitDecoratorMetadata = new WeakMap(); +/** + * Only if key is one of [identifier, string, number], ts will combine metadata of accessors . + * class A { + * get a() {} + * set ['a'](v: Type) {} + * + * get [1]() {} + * set [1](v: Type) {} + * + * // Following won't be combined + * get [key]() {} + * set [key](v: Type) {} + * + * get [true]() {} + * set [true](v: Type) {} + * + * get ['a'+'b']() {} + * set ['a'+'b']() {} + * } + */ +function getLiteralMethodKeyName(node) { + if (node.computed && node.key.type === types_1.AST_NODE_TYPES.Literal) { + if (typeof node.key.value === 'string' || + typeof node.key.value === 'number') { + return node.key.value; + } + } + else if (!node.computed && node.key.type === types_1.AST_NODE_TYPES.Identifier) { + return node.key.name; + } + return null; +} +//# sourceMappingURL=ClassVisitor.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map new file mode 100644 index 0000000000..d9c98ce39a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassVisitor.js","sourceRoot":"","sources":["../../src/referencer/ClassVisitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAA0D;AAE1D,8CAAyE;AAEzE,+CAA4C;AAC5C,uCAAoC;AAEpC,MAAM,YAAa,SAAQ,iBAAO;IAKhC,YACE,UAAsB,EACtB,IAA0D,EAC1D,qBAA8B;QAE9B,KAAK,CAAC,UAAU,CAAC,CAAC;QATX,0CAAiE;QACjE,2CAAwB;QACxB,sDAAgC;QAQvC,uBAAA,IAAI,4BAAe,UAAU,MAAA,CAAC;QAC9B,uBAAA,IAAI,2BAAc,IAAI,MAAA,CAAC;QACvB,uBAAA,IAAI,uCAA0B,qBAAqB,MAAA,CAAC;IACtD,CAAC;IAED,MAAM,CAAC,KAAK,CACV,UAAsB,EACtB,IAA0D,EAC1D,qBAA8B;QAE9B,MAAM,YAAY,GAAG,IAAI,YAAY,CACnC,UAAU,EACV,IAAI,EACJ,qBAAqB,CACtB,CAAC;QACF,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,IAAsC;QAC1C,+DAA+D;QAC/D,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;YAC7B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SACnB;aAAM;YACL,uBAAA,IAAI,gCAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SAC9B;IACH,CAAC;IAED,mBAAmB;IACnB,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ACtB;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts new file mode 100644 index 0000000000..8d09c2ae86 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts @@ -0,0 +1,15 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Referencer } from './Referencer'; +import { Visitor } from './Visitor'; +type ExportNode = TSESTree.ExportAllDeclaration | TSESTree.ExportDefaultDeclaration | TSESTree.ExportNamedDeclaration; +declare class ExportVisitor extends Visitor { + #private; + constructor(node: ExportNode, referencer: Referencer); + static visit(referencer: Referencer, node: ExportNode): void; + protected Identifier(node: TSESTree.Identifier): void; + protected ExportDefaultDeclaration(node: TSESTree.ExportDefaultDeclaration): void; + protected ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void; + protected ExportSpecifier(node: TSESTree.ExportSpecifier): void; +} +export { ExportVisitor }; +//# sourceMappingURL=ExportVisitor.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map new file mode 100644 index 0000000000..47a0fc6e93 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExportVisitor.d.ts","sourceRoot":"","sources":["../../src/referencer/ExportVisitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,KAAK,UAAU,GACX,QAAQ,CAAC,oBAAoB,GAC7B,QAAQ,CAAC,wBAAwB,GACjC,QAAQ,CAAC,sBAAsB,CAAC;AAEpC,cAAM,aAAc,SAAQ,OAAO;;gBAIrB,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;IAMpD,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI;IAK5D,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI;IAUrD,SAAS,CAAC,wBAAwB,CAChC,IAAI,EAAE,QAAQ,CAAC,wBAAwB,GACtC,IAAI;IAaP,SAAS,CAAC,sBAAsB,CAC9B,IAAI,EAAE,QAAQ,CAAC,sBAAsB,GACpC,IAAI;IAgBP,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;CAYhE;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js new file mode 100644 index 0000000000..d3c5a15f10 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js @@ -0,0 +1,84 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _ExportVisitor_referencer, _ExportVisitor_exportNode; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExportVisitor = void 0; +const types_1 = require("@typescript-eslint/types"); +const Visitor_1 = require("./Visitor"); +class ExportVisitor extends Visitor_1.Visitor { + constructor(node, referencer) { + super(referencer); + _ExportVisitor_referencer.set(this, void 0); + _ExportVisitor_exportNode.set(this, void 0); + __classPrivateFieldSet(this, _ExportVisitor_exportNode, node, "f"); + __classPrivateFieldSet(this, _ExportVisitor_referencer, referencer, "f"); + } + static visit(referencer, node) { + const exportReferencer = new ExportVisitor(node, referencer); + exportReferencer.visit(node); + } + Identifier(node) { + if (__classPrivateFieldGet(this, _ExportVisitor_exportNode, "f").exportKind === 'type') { + // export type { T }; + // type exports can only reference types + __classPrivateFieldGet(this, _ExportVisitor_referencer, "f").currentScope().referenceType(node); + } + else { + __classPrivateFieldGet(this, _ExportVisitor_referencer, "f").currentScope().referenceDualValueType(node); + } + } + ExportDefaultDeclaration(node) { + if (node.declaration.type === types_1.AST_NODE_TYPES.Identifier) { + // export default A; + // this could be a type or a variable + this.visit(node.declaration); + } + else { + // export const a = 1; + // export something(); + // etc + // these not included in the scope of this visitor as they are all guaranteed to be values or declare variables + } + } + ExportNamedDeclaration(node) { + if (node.source) { + // export ... from 'foo'; + // these are external identifiers so there shouldn't be references or defs + return; + } + if (!node.declaration) { + // export { x }; + this.visitChildren(node); + } + else { + // export const x = 1; + // this is not included in the scope of this visitor as it creates a variable + } + } + ExportSpecifier(node) { + if (node.exportKind === 'type') { + // export { type T }; + // type exports can only reference types + // + // we can't let this fall through to the Identifier selector because the exportKind is on this node + // and we don't have access to the `.parent` during scope analysis + __classPrivateFieldGet(this, _ExportVisitor_referencer, "f").currentScope().referenceType(node.local); + } + else { + this.visit(node.local); + } + } +} +exports.ExportVisitor = ExportVisitor; +_ExportVisitor_referencer = new WeakMap(), _ExportVisitor_exportNode = new WeakMap(); +//# sourceMappingURL=ExportVisitor.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js.map new file mode 100644 index 0000000000..8b90cf2a64 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExportVisitor.js","sourceRoot":"","sources":["../../src/referencer/ExportVisitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAA0D;AAG1D,uCAAoC;AAOpC,MAAM,aAAc,SAAQ,iBAAO;IAIjC,YAAY,IAAgB,EAAE,UAAsB;QAClD,KAAK,CAAC,UAAU,CAAC,CAAC;QAJX,4CAAwB;QACxB,4CAAwB;QAI/B,uBAAA,IAAI,6BAAe,IAAI,MAAA,CAAC;QACxB,uBAAA,IAAI,6BAAe,UAAU,MAAA,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,UAAsB,EAAE,IAAgB;QACnD,MAAM,gBAAgB,GAAG,IAAI,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7D,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAES,UAAU,CAAC,IAAyB;QAC5C,IAAI,uBAAA,IAAI,iCAAY,CAAC,UAAU,KAAK,MAAM,EAAE;YAC1C,qBAAqB;YACrB,wCAAwC;YACxC,uBAAA,IAAI,iCAAY,CAAC,YAAY,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;SACrD;aAAM;YACL,uBAAA,IAAI,iCAAY,CAAC,YAAY,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;SAC9D;IACH,CAAC;IAES,wBAAwB,CAChC,IAAuC;QAEvC,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU,EAAE;YACvD,oBAAoB;YACpB,qCAAqC;YACrC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC9B;aAAM;YACL,sBAAsB;YACtB,sBAAsB;YACtB,MAAM;YACN,+GAA+G;SAChH;IACH,CAAC;IAES,sBAAsB,CAC9B,IAAqC;QAErC,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,yBAAyB;YACzB,0EAA0E;YAC1E,OAAO;SACR;QAED,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,gBAAgB;YAChB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;SAC1B;aAAM;YACL,sBAAsB;YACtB,6EAA6E;SAC9E;IACH,CAAC;IAES,eAAe,CAAC,IAA8B;QACtD,IAAI,IAAI,CAAC,UAAU,KAAK,MAAM,EAAE;YAC9B,qBAAqB;YACrB,wCAAwC;YACxC,EAAE;YACF,mGAAmG;YACnG,kEAAkE;YAClE,uBAAA,IAAI,iCAAY,CAAC,YAAY,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC3D;aAAM;YACL,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACxB;IACH,CAAC;CACF;AAEQ,sCAAa"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts new file mode 100644 index 0000000000..78d1efc386 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts @@ -0,0 +1,14 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Referencer } from './Referencer'; +import { Visitor } from './Visitor'; +declare class ImportVisitor extends Visitor { + #private; + constructor(declaration: TSESTree.ImportDeclaration, referencer: Referencer); + static visit(referencer: Referencer, declaration: TSESTree.ImportDeclaration): void; + protected visitImport(id: TSESTree.Identifier, specifier: TSESTree.ImportDefaultSpecifier | TSESTree.ImportNamespaceSpecifier | TSESTree.ImportSpecifier): void; + protected ImportNamespaceSpecifier(node: TSESTree.ImportNamespaceSpecifier): void; + protected ImportDefaultSpecifier(node: TSESTree.ImportDefaultSpecifier): void; + protected ImportSpecifier(node: TSESTree.ImportSpecifier): void; +} +export { ImportVisitor }; +//# sourceMappingURL=ImportVisitor.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts.map new file mode 100644 index 0000000000..7c8c5cff8a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ImportVisitor.d.ts","sourceRoot":"","sources":["../../src/referencer/ImportVisitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,cAAM,aAAc,SAAQ,OAAO;;gBAIrB,WAAW,EAAE,QAAQ,CAAC,iBAAiB,EAAE,UAAU,EAAE,UAAU;IAM3E,MAAM,CAAC,KAAK,CACV,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,QAAQ,CAAC,iBAAiB,GACtC,IAAI;IAKP,SAAS,CAAC,WAAW,CACnB,EAAE,EAAE,QAAQ,CAAC,UAAU,EACvB,SAAS,EACL,QAAQ,CAAC,sBAAsB,GAC/B,QAAQ,CAAC,wBAAwB,GACjC,QAAQ,CAAC,eAAe,GAC3B,IAAI;IASP,SAAS,CAAC,wBAAwB,CAChC,IAAI,EAAE,QAAQ,CAAC,wBAAwB,GACtC,IAAI;IAKP,SAAS,CAAC,sBAAsB,CAC9B,IAAI,EAAE,QAAQ,CAAC,sBAAsB,GACpC,IAAI;IAKP,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;CAIhE;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js new file mode 100644 index 0000000000..7f494b2888 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js @@ -0,0 +1,50 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _ImportVisitor_declaration, _ImportVisitor_referencer; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImportVisitor = void 0; +const definition_1 = require("../definition"); +const Visitor_1 = require("./Visitor"); +class ImportVisitor extends Visitor_1.Visitor { + constructor(declaration, referencer) { + super(referencer); + _ImportVisitor_declaration.set(this, void 0); + _ImportVisitor_referencer.set(this, void 0); + __classPrivateFieldSet(this, _ImportVisitor_declaration, declaration, "f"); + __classPrivateFieldSet(this, _ImportVisitor_referencer, referencer, "f"); + } + static visit(referencer, declaration) { + const importReferencer = new ImportVisitor(declaration, referencer); + importReferencer.visit(declaration); + } + visitImport(id, specifier) { + __classPrivateFieldGet(this, _ImportVisitor_referencer, "f") + .currentScope() + .defineIdentifier(id, new definition_1.ImportBindingDefinition(id, specifier, __classPrivateFieldGet(this, _ImportVisitor_declaration, "f"))); + } + ImportNamespaceSpecifier(node) { + const local = node.local; + this.visitImport(local, node); + } + ImportDefaultSpecifier(node) { + const local = node.local; + this.visitImport(local, node); + } + ImportSpecifier(node) { + const local = node.local; + this.visitImport(local, node); + } +} +exports.ImportVisitor = ImportVisitor; +_ImportVisitor_declaration = new WeakMap(), _ImportVisitor_referencer = new WeakMap(); +//# sourceMappingURL=ImportVisitor.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js.map new file mode 100644 index 0000000000..e917275916 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ImportVisitor.js","sourceRoot":"","sources":["../../src/referencer/ImportVisitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,8CAAwD;AAExD,uCAAoC;AAEpC,MAAM,aAAc,SAAQ,iBAAO;IAIjC,YAAY,WAAuC,EAAE,UAAsB;QACzE,KAAK,CAAC,UAAU,CAAC,CAAC;QAJX,6CAAyC;QACzC,4CAAwB;QAI/B,uBAAA,IAAI,8BAAgB,WAAW,MAAA,CAAC;QAChC,uBAAA,IAAI,6BAAe,UAAU,MAAA,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,KAAK,CACV,UAAsB,EACtB,WAAuC;QAEvC,MAAM,gBAAgB,GAAG,IAAI,aAAa,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACpE,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IAES,WAAW,CACnB,EAAuB,EACvB,SAG4B;QAE5B,uBAAA,IAAI,iCAAY;aACb,YAAY,EAAE;aACd,gBAAgB,CACf,EAAE,EACF,IAAI,oCAAuB,CAAC,EAAE,EAAE,SAAS,EAAE,uBAAA,IAAI,kCAAa,CAAC,CAC9D,CAAC;IACN,CAAC;IAES,wBAAwB,CAChC,IAAuC;QAEvC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IAES,sBAAsB,CAC9B,IAAqC;QAErC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IAES,eAAe,CAAC,IAA8B;QACtD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;CACF;AAEQ,sCAAa"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts new file mode 100644 index 0000000000..53cfd21d9b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts @@ -0,0 +1,29 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { VisitorOptions } from './VisitorBase'; +import { VisitorBase } from './VisitorBase'; +type PatternVisitorCallback = (pattern: TSESTree.Identifier, info: { + assignments: (TSESTree.AssignmentExpression | TSESTree.AssignmentPattern)[]; + rest: boolean; + topLevel: boolean; +}) => void; +type PatternVisitorOptions = VisitorOptions; +declare class PatternVisitor extends VisitorBase { + #private; + static isPattern(node: TSESTree.Node): node is TSESTree.ArrayPattern | TSESTree.AssignmentPattern | TSESTree.Identifier | TSESTree.ObjectPattern | TSESTree.RestElement | TSESTree.SpreadElement; + readonly rightHandNodes: TSESTree.Node[]; + constructor(options: PatternVisitorOptions, rootPattern: TSESTree.Node, callback: PatternVisitorCallback); + protected ArrayExpression(node: TSESTree.ArrayExpression): void; + protected ArrayPattern(pattern: TSESTree.ArrayPattern): void; + protected AssignmentExpression(node: TSESTree.AssignmentExpression): void; + protected AssignmentPattern(pattern: TSESTree.AssignmentPattern): void; + protected CallExpression(node: TSESTree.CallExpression): void; + protected Decorator(): void; + protected Identifier(pattern: TSESTree.Identifier): void; + protected MemberExpression(node: TSESTree.MemberExpression): void; + protected Property(property: TSESTree.Property): void; + protected RestElement(pattern: TSESTree.RestElement): void; + protected SpreadElement(node: TSESTree.SpreadElement): void; + protected TSTypeAnnotation(): void; +} +export { PatternVisitor, PatternVisitorCallback, PatternVisitorOptions }; +//# sourceMappingURL=PatternVisitor.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map new file mode 100644 index 0000000000..2a5c71fc58 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map @@ -0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AAQ,CAAC,iBAAiB,GAAG,IAAI;IAOtE,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,cAAc,GAAG,IAAI;IAQ7D,SAAS,CAAC,SAAS,IAAI,IAAI;IAI3B,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI;IAWxD,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;IAUjE,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI;IAYrD,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI;IAM1D,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,GAAG,IAAI;IAI3D,SAAS,CAAC,gBAAgB,IAAI,IAAI;CAGnC;AAED,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js new file mode 100644 index 0000000000..89568f174d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js @@ -0,0 +1,108 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _PatternVisitor_rootPattern, _PatternVisitor_callback, _PatternVisitor_assignments, _PatternVisitor_restElements; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PatternVisitor = void 0; +const types_1 = require("@typescript-eslint/types"); +const VisitorBase_1 = require("./VisitorBase"); +class PatternVisitor extends VisitorBase_1.VisitorBase { + static isPattern(node) { + const nodeType = node.type; + return (nodeType === types_1.AST_NODE_TYPES.Identifier || + nodeType === types_1.AST_NODE_TYPES.ObjectPattern || + nodeType === types_1.AST_NODE_TYPES.ArrayPattern || + nodeType === types_1.AST_NODE_TYPES.SpreadElement || + nodeType === types_1.AST_NODE_TYPES.RestElement || + nodeType === types_1.AST_NODE_TYPES.AssignmentPattern); + } + constructor(options, rootPattern, callback) { + super(options); + _PatternVisitor_rootPattern.set(this, void 0); + _PatternVisitor_callback.set(this, void 0); + _PatternVisitor_assignments.set(this, []); + this.rightHandNodes = []; + _PatternVisitor_restElements.set(this, []); + __classPrivateFieldSet(this, _PatternVisitor_rootPattern, rootPattern, "f"); + __classPrivateFieldSet(this, _PatternVisitor_callback, callback, "f"); + } + ArrayExpression(node) { + node.elements.forEach(this.visit, this); + } + ArrayPattern(pattern) { + for (const element of pattern.elements) { + this.visit(element); + } + } + AssignmentExpression(node) { + __classPrivateFieldGet(this, _PatternVisitor_assignments, "f").push(node); + this.visit(node.left); + this.rightHandNodes.push(node.right); + __classPrivateFieldGet(this, _PatternVisitor_assignments, "f").pop(); + } + AssignmentPattern(pattern) { + __classPrivateFieldGet(this, _PatternVisitor_assignments, "f").push(pattern); + this.visit(pattern.left); + this.rightHandNodes.push(pattern.right); + __classPrivateFieldGet(this, _PatternVisitor_assignments, "f").pop(); + } + CallExpression(node) { + // arguments are right hand nodes. + node.arguments.forEach(a => { + this.rightHandNodes.push(a); + }); + this.visit(node.callee); + } + Decorator() { + // don't visit any decorators when exploring a pattern + } + Identifier(pattern) { + const lastRestElement = __classPrivateFieldGet(this, _PatternVisitor_restElements, "f")[__classPrivateFieldGet(this, _PatternVisitor_restElements, "f").length - 1] ?? null; + __classPrivateFieldGet(this, _PatternVisitor_callback, "f").call(this, pattern, { + topLevel: pattern === __classPrivateFieldGet(this, _PatternVisitor_rootPattern, "f"), + rest: lastRestElement != null && lastRestElement.argument === pattern, + assignments: __classPrivateFieldGet(this, _PatternVisitor_assignments, "f"), + }); + } + MemberExpression(node) { + // Computed property's key is a right hand node. + if (node.computed) { + this.rightHandNodes.push(node.property); + } + // the object is only read, write to its property. + this.rightHandNodes.push(node.object); + } + Property(property) { + // Computed property's key is a right hand node. + if (property.computed) { + this.rightHandNodes.push(property.key); + } + // If it's shorthand, its key is same as its value. + // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern). + // If it's not shorthand, the name of new variable is its value's. + this.visit(property.value); + } + RestElement(pattern) { + __classPrivateFieldGet(this, _PatternVisitor_restElements, "f").push(pattern); + this.visit(pattern.argument); + __classPrivateFieldGet(this, _PatternVisitor_restElements, "f").pop(); + } + SpreadElement(node) { + this.visit(node.argument); + } + TSTypeAnnotation() { + // we don't want to visit types + } +} +exports.PatternVisitor = PatternVisitor; +_PatternVisitor_rootPattern = new WeakMap(), _PatternVisitor_callback = new WeakMap(), _PatternVisitor_assignments = new WeakMap(), _PatternVisitor_restElements = new WeakMap(); +//# sourceMappingURL=PatternVisitor.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js.map new file mode 100644 index 0000000000..21af9d24fb --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist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;YACjB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACzC;QAED,kDAAkD;QAClD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAES,QAAQ,CAAC,QAA2B;QAC5C,gDAAgD;QAChD,IAAI,QAAQ,CAAC,QAAQ,EAAE;YACrB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;SACxC;QAED,mDAAmD;QACnD,mHAAmH;QACnH,kEAAkE;QAClE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAES,WAAW,CAAC,OAA6B;QACjD,uBAAA,IAAI,oCAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC7B,uBAAA,IAAI,oCAAc,CAAC,GAAG,EAAE,CAAC;IAC3B,CAAC;IAES,aAAa,CAAC,IAA4B;QAClD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAES,gBAAgB;QACxB,+BAA+B;IACjC,CAAC;CACF;AAEQ,wCAAc"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts new file mode 100644 index 0000000000..2ec30e3eeb --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts @@ -0,0 +1,89 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Scope } from '../scope'; +import type { Variable } from '../variable'; +declare enum ReferenceFlag { + Read = 1, + Write = 2, + ReadWrite = 3 +} +interface ReferenceImplicitGlobal { + node: TSESTree.Node; + pattern: TSESTree.BindingName; + ref?: Reference; +} +declare enum ReferenceTypeFlag { + Value = 1, + Type = 2 +} +/** + * A Reference represents a single occurrence of an identifier in code. + */ +declare class Reference { + #private; + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + readonly $id: number; + /** + * Reference to the enclosing Scope. + * @public + */ + readonly from: Scope; + /** + * Identifier syntax node. + * @public + */ + readonly identifier: TSESTree.Identifier | TSESTree.JSXIdentifier; + /** + * `true` if this writing reference is a variable initializer or a default value. + * @public + */ + readonly init?: boolean; + /** + * The {@link Variable} object that this reference refers to. If such variable was not defined, this is `null`. + * @public + */ + resolved: Variable | null; + /** + * If reference is writeable, this is the node being written to it. + * @public + */ + readonly writeExpr?: TSESTree.Node | null; + readonly maybeImplicitGlobal?: ReferenceImplicitGlobal | null; + /** + * True if this reference can reference types + */ + get isTypeReference(): boolean; + /** + * True if this reference can reference values + */ + get isValueReference(): boolean; + constructor(identifier: TSESTree.Identifier | TSESTree.JSXIdentifier, scope: Scope, flag: ReferenceFlag, writeExpr?: TSESTree.Node | null, maybeImplicitGlobal?: ReferenceImplicitGlobal | null, init?: boolean, referenceType?: ReferenceTypeFlag); + /** + * Whether the reference is writeable. + * @public + */ + isWrite(): boolean; + /** + * Whether the reference is readable. + * @public + */ + isRead(): boolean; + /** + * Whether the reference is read-only. + * @public + */ + isReadOnly(): boolean; + /** + * Whether the reference is write-only. + * @public + */ + isWriteOnly(): boolean; + /** + * Whether the reference is read-write. + * @public + */ + isReadWrite(): boolean; +} +export { Reference, ReferenceFlag, ReferenceTypeFlag, ReferenceImplicitGlobal }; +//# sourceMappingURL=Reference.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts.map new file mode 100644 index 0000000000..31505e34ac --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../src/referencer/Reference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,aAAK,aAAa;IAChB,IAAI,IAAM;IACV,KAAK,IAAM;IACX,SAAS,IAAM;CAChB;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,OAAO,EAAE,QAAQ,CAAC,WAAW,CAAC;IAC9B,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB;AAID,aAAK,iBAAiB;IACpB,KAAK,IAAM;IACX,IAAI,IAAM;CACX;AAED;;GAEG;AACH,cAAM,SAAS;;IACb;;OAEG;IACH,SAAgB,GAAG,EAAE,MAAM,CAAe;IAK1C;;;OAGG;IACH,SAAgB,IAAI,EAAE,KAAK,CAAC;IAC5B;;;OAGG;IACH,SAAgB,UAAU,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC;IACzE;;;OAGG;IACH,SAAgB,IAAI,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACI,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACjC;;;OAGG;IACH,SAAgB,SAAS,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAEjD,SAAgB,mBAAmB,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAOrE;;OAEG;IACH,IAAW,eAAe,IAAI,OAAO,CAEpC;IAED;;OAEG;IACH,IAAW,gBAAgB,IAAI,OAAO,CAErC;gBAGC,UAAU,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,EACxD,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,aAAa,EACnB,SAAS,CAAC,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,EAChC,mBAAmB,CAAC,EAAE,uBAAuB,GAAG,IAAI,EACpD,IAAI,CAAC,EAAE,OAAO,EACd,aAAa,oBAA0B;IAgBzC;;;OAGG;IACI,OAAO,IAAI,OAAO;IAIzB;;;OAGG;IACI,MAAM,IAAI,OAAO;IAIxB;;;OAGG;IACI,UAAU,IAAI,OAAO;IAI5B;;;OAGG;IACI,WAAW,IAAI,OAAO;IAI7B;;;OAGG;IACI,WAAW,IAAI,OAAO;CAG9B;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js new file mode 100644 index 0000000000..8db5bbbf9d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js @@ -0,0 +1,107 @@ +"use strict"; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _Reference_flag, _Reference_referenceType; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReferenceTypeFlag = exports.ReferenceFlag = exports.Reference = void 0; +const ID_1 = require("../ID"); +var ReferenceFlag; +(function (ReferenceFlag) { + ReferenceFlag[ReferenceFlag["Read"] = 1] = "Read"; + ReferenceFlag[ReferenceFlag["Write"] = 2] = "Write"; + ReferenceFlag[ReferenceFlag["ReadWrite"] = 3] = "ReadWrite"; +})(ReferenceFlag || (exports.ReferenceFlag = ReferenceFlag = {})); +const generator = (0, ID_1.createIdGenerator)(); +var ReferenceTypeFlag; +(function (ReferenceTypeFlag) { + ReferenceTypeFlag[ReferenceTypeFlag["Value"] = 1] = "Value"; + ReferenceTypeFlag[ReferenceTypeFlag["Type"] = 2] = "Type"; +})(ReferenceTypeFlag || (exports.ReferenceTypeFlag = ReferenceTypeFlag = {})); +/** + * A Reference represents a single occurrence of an identifier in code. + */ +class Reference { + /** + * True if this reference can reference types + */ + get isTypeReference() { + return (__classPrivateFieldGet(this, _Reference_referenceType, "f") & ReferenceTypeFlag.Type) !== 0; + } + /** + * True if this reference can reference values + */ + get isValueReference() { + return (__classPrivateFieldGet(this, _Reference_referenceType, "f") & ReferenceTypeFlag.Value) !== 0; + } + constructor(identifier, scope, flag, writeExpr, maybeImplicitGlobal, init, referenceType = ReferenceTypeFlag.Value) { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + this.$id = generator(); + /** + * The read-write mode of the reference. + */ + _Reference_flag.set(this, void 0); + /** + * In some cases, a reference may be a type, value or both a type and value reference. + */ + _Reference_referenceType.set(this, void 0); + this.identifier = identifier; + this.from = scope; + this.resolved = null; + __classPrivateFieldSet(this, _Reference_flag, flag, "f"); + if (this.isWrite()) { + this.writeExpr = writeExpr; + this.init = init; + } + this.maybeImplicitGlobal = maybeImplicitGlobal; + __classPrivateFieldSet(this, _Reference_referenceType, referenceType, "f"); + } + /** + * Whether the reference is writeable. + * @public + */ + isWrite() { + return !!(__classPrivateFieldGet(this, _Reference_flag, "f") & ReferenceFlag.Write); + } + /** + * Whether the reference is readable. + * @public + */ + isRead() { + return !!(__classPrivateFieldGet(this, _Reference_flag, "f") & ReferenceFlag.Read); + } + /** + * Whether the reference is read-only. + * @public + */ + isReadOnly() { + return __classPrivateFieldGet(this, _Reference_flag, "f") === ReferenceFlag.Read; + } + /** + * Whether the reference is write-only. + * @public + */ + isWriteOnly() { + return __classPrivateFieldGet(this, _Reference_flag, "f") === ReferenceFlag.Write; + } + /** + * Whether the reference is read-write. + * @public + */ + isReadWrite() { + return __classPrivateFieldGet(this, _Reference_flag, "f") === ReferenceFlag.ReadWrite; + } +} +exports.Reference = Reference; +_Reference_flag = new WeakMap(), _Reference_referenceType = new WeakMap(); +//# sourceMappingURL=Reference.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js.map new file mode 100644 index 0000000000..3c57513d4d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Reference.js","sourceRoot":"","sources":["../../src/referencer/Reference.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,8BAA0C;AAI1C,IAAK,aAIJ;AAJD,WAAK,aAAa;IAChB,iDAAU,CAAA;IACV,mDAAW,CAAA;IACX,2DAAe,CAAA;AACjB,CAAC,EAJI,aAAa,6BAAb,aAAa,QAIjB;AAQD,MAAM,SAAS,GAAG,IAAA,sBAAiB,GAAE,CAAC;AAEtC,IAAK,iBAGJ;AAHD,WAAK,iBAAiB;IACpB,2DAAW,CAAA;IACX,yDAAU,CAAA;AACZ,CAAC,EAHI,iBAAiB,iCAAjB,iBAAiB,QAGrB;AAED;;GAEG;AACH,MAAM,SAAS;IA0Cb;;OAEG;IACH,IAAW,eAAe;QACxB,O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WAAW;QAChB,OAAO,uBAAA,IAAI,uBAAM,KAAK,aAAa,CAAC,KAAK,CAAC;IAC5C,CAAC;IAED;;;OAGG;IACI,WAAW;QAChB,OAAO,uBAAA,IAAI,uBAAM,KAAK,aAAa,CAAC,SAAS,CAAC;IAChD,CAAC;CACF;AAEQ,8BAAS"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts new file mode 100644 index 0000000000..e9d8be5b2f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts @@ -0,0 +1,86 @@ +import type { Lib, TSESTree } from '@typescript-eslint/types'; +import type { Scope } from '../scope'; +import type { ScopeManager } from '../ScopeManager'; +import type { ReferenceImplicitGlobal } from './Reference'; +import type { VisitorOptions } from './Visitor'; +import { Visitor } from './Visitor'; +interface ReferencerOptions extends VisitorOptions { + jsxPragma: string | null; + jsxFragmentName: string | null; + lib: Lib[]; + emitDecoratorMetadata: boolean; +} +declare class Referencer extends Visitor { + #private; + readonly scopeManager: ScopeManager; + constructor(options: ReferencerOptions, scopeManager: ScopeManager); + currentScope(): Scope; + currentScope(throwOnNull: true): Scope | null; + close(node: TSESTree.Node): void; + referencingDefaultValue(pattern: TSESTree.Identifier, assignments: (TSESTree.AssignmentExpression | TSESTree.AssignmentPattern)[], maybeImplicitGlobal: ReferenceImplicitGlobal | null, init: boolean): void; + private populateGlobalsFromLib; + /** + * Searches for a variable named "name" in the upper scopes and adds a pseudo-reference from itself to itself + */ + private referenceInSomeUpperScope; + private referenceJsxPragma; + private referenceJsxFragment; + protected visitClass(node: TSESTree.ClassDeclaration | TSESTree.ClassExpression): void; + protected visitForIn(node: TSESTree.ForInStatement | TSESTree.ForOfStatement): void; + protected visitFunctionParameterTypeAnnotation(node: TSESTree.Parameter): void; + protected visitFunction(node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.TSDeclareFunction | TSESTree.TSEmptyBodyFunctionExpression): void; + protected visitProperty(node: TSESTree.Property): void; + protected visitType(node: TSESTree.Node | null | undefined): void; + protected visitTypeAssertion(node: TSESTree.TSAsExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion): void; + protected ArrowFunctionExpression(node: TSESTree.ArrowFunctionExpression): void; + protected AssignmentExpression(node: TSESTree.AssignmentExpression): void; + protected BlockStatement(node: TSESTree.BlockStatement): void; + protected BreakStatement(): void; + protected CallExpression(node: TSESTree.CallExpression): void; + protected CatchClause(node: TSESTree.CatchClause): void; + protected ClassExpression(node: TSESTree.ClassExpression): void; + protected ClassDeclaration(node: TSESTree.ClassDeclaration): void; + protected ContinueStatement(): void; + protected ExportAllDeclaration(): void; + protected ExportDefaultDeclaration(node: TSESTree.ExportDefaultDeclaration): void; + protected ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void; + protected ForInStatement(node: TSESTree.ForInStatement): void; + protected ForOfStatement(node: TSESTree.ForOfStatement): void; + protected ForStatement(node: TSESTree.ForStatement): void; + protected FunctionDeclaration(node: TSESTree.FunctionDeclaration): void; + protected FunctionExpression(node: TSESTree.FunctionExpression): void; + protected Identifier(node: TSESTree.Identifier): void; + protected ImportDeclaration(node: TSESTree.ImportDeclaration): void; + protected JSXAttribute(node: TSESTree.JSXAttribute): void; + protected JSXClosingElement(): void; + protected JSXFragment(node: TSESTree.JSXFragment): void; + protected JSXIdentifier(node: TSESTree.JSXIdentifier): void; + protected JSXMemberExpression(node: TSESTree.JSXMemberExpression): void; + protected JSXOpeningElement(node: TSESTree.JSXOpeningElement): void; + protected LabeledStatement(node: TSESTree.LabeledStatement): void; + protected MemberExpression(node: TSESTree.MemberExpression): void; + protected MetaProperty(): void; + protected NewExpression(node: TSESTree.NewExpression): void; + protected PrivateIdentifier(): void; + protected Program(node: TSESTree.Program): void; + protected Property(node: TSESTree.Property): void; + protected SwitchStatement(node: TSESTree.SwitchStatement): void; + protected TaggedTemplateExpression(node: TSESTree.TaggedTemplateExpression): void; + protected TSAsExpression(node: TSESTree.TSAsExpression): void; + protected TSDeclareFunction(node: TSESTree.TSDeclareFunction): void; + protected TSImportEqualsDeclaration(node: TSESTree.TSImportEqualsDeclaration): void; + protected TSEmptyBodyFunctionExpression(node: TSESTree.TSEmptyBodyFunctionExpression): void; + protected TSEnumDeclaration(node: TSESTree.TSEnumDeclaration): void; + protected TSInstantiationExpression(node: TSESTree.TSInstantiationExpression): void; + protected TSInterfaceDeclaration(node: TSESTree.TSInterfaceDeclaration): void; + protected TSModuleDeclaration(node: TSESTree.TSModuleDeclaration): void; + protected TSSatisfiesExpression(node: TSESTree.TSSatisfiesExpression): void; + protected TSTypeAliasDeclaration(node: TSESTree.TSTypeAliasDeclaration): void; + protected TSTypeAssertion(node: TSESTree.TSTypeAssertion): void; + protected UpdateExpression(node: TSESTree.UpdateExpression): void; + protected VariableDeclaration(node: TSESTree.VariableDeclaration): void; + protected WithStatement(node: TSESTree.WithStatement): void; + protected ImportAttribute(): void; +} +export { Referencer, ReferencerOptions }; +//# sourceMappingURL=Referencer.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map new file mode 100644 index 0000000000..cc98d9d631 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Referencer.d.ts","sourceRoot":"","sources":["../../src/referencer/Referencer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAe9D,OAAO,KAAK,EAAe,KAAK,EAAE,MAAM,UA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B,CAC9B,IAAI,EAAE,QAAQ,CAAC,sBAAsB,GACpC,IAAI;IAIP,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAI/D,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;IAcjE,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,mBAAmB,GAAG,IAAI;IAoCvE,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,GAAG,IAAI;IAW3D,SAAS,CAAC,eAAe,IAAI,IAAI;CAGlC;AAED,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js new file mode 100644 index 0000000000..b1d9428dc4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js @@ -0,0 +1,539 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _Referencer_jsxPragma, _Referencer_jsxFragmentName, _Referencer_hasReferencedJsxFactory, _Referencer_hasReferencedJsxFragmentFactory, _Referencer_lib, _Referencer_emitDecoratorMetadata; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Referencer = void 0; +const types_1 = require("@typescript-eslint/types"); +const assert_1 = require("../assert"); +const definition_1 = require("../definition"); +const lib_1 = require("../lib"); +const ClassVisitor_1 = require("./ClassVisitor"); +const ExportVisitor_1 = require("./ExportVisitor"); +const ImportVisitor_1 = require("./ImportVisitor"); +const PatternVisitor_1 = require("./PatternVisitor"); +const Reference_1 = require("./Reference"); +const TypeVisitor_1 = require("./TypeVisitor"); +const Visitor_1 = require("./Visitor"); +// Referencing variables and creating bindings. +class Referencer extends Visitor_1.Visitor { + constructor(options, scopeManager) { + super(options); + _Referencer_jsxPragma.set(this, void 0); + _Referencer_jsxFragmentName.set(this, void 0); + _Referencer_hasReferencedJsxFactory.set(this, false); + _Referencer_hasReferencedJsxFragmentFactory.set(this, false); + _Referencer_lib.set(this, void 0); + _Referencer_emitDecoratorMetadata.set(this, void 0); + this.scopeManager = scopeManager; + __classPrivateFieldSet(this, _Referencer_jsxPragma, options.jsxPragma, "f"); + __classPrivateFieldSet(this, _Referencer_jsxFragmentName, options.jsxFragmentName, "f"); + __classPrivateFieldSet(this, _Referencer_lib, options.lib, "f"); + __classPrivateFieldSet(this, _Referencer_emitDecoratorMetadata, options.emitDecoratorMetadata, "f"); + } + currentScope(dontThrowOnNull) { + if (!dontThrowOnNull) { + (0, assert_1.assert)(this.scopeManager.currentScope, 'aaa'); + } + return this.scopeManager.currentScope; + } + close(node) { + while (this.currentScope(true) && node === this.currentScope().block) { + this.scopeManager.currentScope = this.currentScope().close(this.scopeManager); + } + } + referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) { + assignments.forEach(assignment => { + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, assignment.right, maybeImplicitGlobal, init); + }); + } + populateGlobalsFromLib(globalScope) { + for (const lib of __classPrivateFieldGet(this, _Referencer_lib, "f")) { + const variables = lib_1.lib[lib]; + /* istanbul ignore if */ if (!variables) { + throw new Error(`Invalid value for lib provided: ${lib}`); + } + for (const [name, variable] of Object.entries(variables)) { + globalScope.defineImplicitVariable(name, variable); + } + } + // for const assertions (`{} as const` / `{}`) + globalScope.defineImplicitVariable('const', { + eslintImplicitGlobalSetting: 'readonly', + isTypeVariable: true, + isValueVariable: false, + }); + } + /** + * Searches for a variable named "name" in the upper scopes and adds a pseudo-reference from itself to itself + */ + referenceInSomeUpperScope(name) { + let scope = this.scopeManager.currentScope; + while (scope) { + const variable = scope.set.get(name); + if (!variable) { + scope = scope.upper; + continue; + } + scope.referenceValue(variable.identifiers[0]); + return true; + } + return false; + } + referenceJsxPragma() { + if (__classPrivateFieldGet(this, _Referencer_jsxPragma, "f") == null || __classPrivateFieldGet(this, _Referencer_hasReferencedJsxFactory, "f")) { + return; + } + __classPrivateFieldSet(this, _Referencer_hasReferencedJsxFactory, this.referenceInSomeUpperScope(__classPrivateFieldGet(this, _Referencer_jsxPragma, "f")), "f"); + } + referenceJsxFragment() { + if (__classPrivateFieldGet(this, _Referencer_jsxFragmentName, "f") == null || + __classPrivateFieldGet(this, _Referencer_hasReferencedJsxFragmentFactory, "f")) { + return; + } + __classPrivateFieldSet(this, _Referencer_hasReferencedJsxFragmentFactory, this.referenceInSomeUpperScope(__classPrivateFieldGet(this, _Referencer_jsxFragmentName, "f")), "f"); + } + /////////////////// + // Visit helpers // + /////////////////// + visitClass(node) { + ClassVisitor_1.ClassVisitor.visit(this, node, __classPrivateFieldGet(this, _Referencer_emitDecoratorMetadata, "f")); + } + visitForIn(node) { + if (node.left.type === types_1.AST_NODE_TYPES.VariableDeclaration && + node.left.kind !== 'var') { + this.scopeManager.nestForScope(node); + } + if (node.left.type === types_1.AST_NODE_TYPES.VariableDeclaration) { + this.visit(node.left); + this.visitPattern(node.left.declarations[0].id, pattern => { + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node.right, null, true); + }); + } + else { + this.visitPattern(node.left, (pattern, info) => { + const maybeImplicitGlobal = !this.currentScope().isStrict + ? { + pattern, + node, + } + : null; + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node.right, maybeImplicitGlobal, false); + }, { processRightHandNodes: true }); + } + this.visit(node.right); + this.visit(node.body); + this.close(node); + } + visitFunctionParameterTypeAnnotation(node) { + switch (node.type) { + case types_1.AST_NODE_TYPES.AssignmentPattern: + this.visitType(node.left.typeAnnotation); + break; + case types_1.AST_NODE_TYPES.TSParameterProperty: + this.visitFunctionParameterTypeAnnotation(node.parameter); + break; + default: + this.visitType(node.typeAnnotation); + break; + } + } + visitFunction(node) { + // FunctionDeclaration name is defined in upper scope + // NOTE: Not referring variableScope. It is intended. + // Since + // in ES5, FunctionDeclaration should be in FunctionBody. + // in ES6, FunctionDeclaration should be block scoped. + if (node.type === types_1.AST_NODE_TYPES.FunctionExpression) { + if (node.id) { + // FunctionExpression with name creates its special scope; + // FunctionExpressionNameScope. + this.scopeManager.nestFunctionExpressionNameScope(node); + } + } + else if (node.id) { + // id is defined in upper scope + this.currentScope().defineIdentifier(node.id, new definition_1.FunctionNameDefinition(node.id, node)); + } + // Consider this function is in the MethodDefinition. + this.scopeManager.nestFunctionScope(node, false); + // Process parameter declarations. + for (const param of node.params) { + this.visitPattern(param, (pattern, info) => { + this.currentScope().defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node, info.rest)); + this.referencingDefaultValue(pattern, info.assignments, null, true); + }, { processRightHandNodes: true }); + this.visitFunctionParameterTypeAnnotation(param); + param.decorators.forEach(d => this.visit(d)); + } + this.visitType(node.returnType); + this.visitType(node.typeParameters); + // In TypeScript there are a number of function-like constructs which have no body, + // so check it exists before traversing + if (node.body) { + // Skip BlockStatement to prevent creating BlockStatement scope. + if (node.body.type === types_1.AST_NODE_TYPES.BlockStatement) { + this.visitChildren(node.body); + } + else { + this.visit(node.body); + } + } + this.close(node); + } + visitProperty(node) { + if (node.computed) { + this.visit(node.key); + } + this.visit(node.value); + } + visitType(node) { + if (!node) { + return; + } + TypeVisitor_1.TypeVisitor.visit(this, node); + } + visitTypeAssertion(node) { + this.visit(node.expression); + this.visitType(node.typeAnnotation); + } + ///////////////////// + // Visit selectors // + ///////////////////// + ArrowFunctionExpression(node) { + this.visitFunction(node); + } + AssignmentExpression(node) { + let left = node.left; + switch (left.type) { + case types_1.AST_NODE_TYPES.TSAsExpression: + case types_1.AST_NODE_TYPES.TSTypeAssertion: + // explicitly visit the type annotation + this.visitType(left.typeAnnotation); + // intentional fallthrough + case types_1.AST_NODE_TYPES.TSNonNullExpression: + // unwrap the expression + left = left.expression; + } + if (PatternVisitor_1.PatternVisitor.isPattern(left)) { + if (node.operator === '=') { + this.visitPattern(left, (pattern, info) => { + const maybeImplicitGlobal = !this.currentScope().isStrict + ? { + pattern, + node, + } + : null; + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node.right, maybeImplicitGlobal, false); + }, { processRightHandNodes: true }); + } + else if (left.type === types_1.AST_NODE_TYPES.Identifier) { + this.currentScope().referenceValue(left, Reference_1.ReferenceFlag.ReadWrite, node.right); + } + } + else { + this.visit(left); + } + this.visit(node.right); + } + BlockStatement(node) { + this.scopeManager.nestBlockScope(node); + this.visitChildren(node); + this.close(node); + } + BreakStatement() { + // don't reference the break statement's label + } + CallExpression(node) { + this.visitChildren(node, ['typeArguments']); + this.visitType(node.typeArguments); + } + CatchClause(node) { + this.scopeManager.nestCatchScope(node); + if (node.param) { + const param = node.param; + this.visitPattern(param, (pattern, info) => { + this.currentScope().defineIdentifier(pattern, new definition_1.CatchClauseDefinition(param, node)); + this.referencingDefaultValue(pattern, info.assignments, null, true); + }, { processRightHandNodes: true }); + } + this.visit(node.body); + this.close(node); + } + ClassExpression(node) { + this.visitClass(node); + } + ClassDeclaration(node) { + this.visitClass(node); + } + ContinueStatement() { + // don't reference the continue statement's label + } + ExportAllDeclaration() { + // this defines no local variables + } + ExportDefaultDeclaration(node) { + if (node.declaration.type === types_1.AST_NODE_TYPES.Identifier) { + ExportVisitor_1.ExportVisitor.visit(this, node); + } + else { + this.visit(node.declaration); + } + } + ExportNamedDeclaration(node) { + if (node.declaration) { + this.visit(node.declaration); + } + else { + ExportVisitor_1.ExportVisitor.visit(this, node); + } + } + ForInStatement(node) { + this.visitForIn(node); + } + ForOfStatement(node) { + this.visitForIn(node); + } + ForStatement(node) { + // Create ForStatement declaration. + // NOTE: In ES6, ForStatement dynamically generates per iteration environment. However, this is + // a static analyzer, we only generate one scope for ForStatement. + if (node.init && + node.init.type === types_1.AST_NODE_TYPES.VariableDeclaration && + node.init.kind !== 'var') { + this.scopeManager.nestForScope(node); + } + this.visitChildren(node); + this.close(node); + } + FunctionDeclaration(node) { + this.visitFunction(node); + } + FunctionExpression(node) { + this.visitFunction(node); + } + Identifier(node) { + this.currentScope().referenceValue(node); + this.visitType(node.typeAnnotation); + } + ImportDeclaration(node) { + (0, assert_1.assert)(this.scopeManager.isModule(), 'ImportDeclaration should appear when the mode is ES6 and in the module context.'); + ImportVisitor_1.ImportVisitor.visit(this, node); + } + JSXAttribute(node) { + this.visit(node.value); + } + JSXClosingElement() { + // should not be counted as a reference + } + JSXFragment(node) { + this.referenceJsxPragma(); + this.referenceJsxFragment(); + this.visitChildren(node); + } + JSXIdentifier(node) { + this.currentScope().referenceValue(node); + } + JSXMemberExpression(node) { + if (node.object.type !== types_1.AST_NODE_TYPES.JSXIdentifier) { + this.visit(node.object); + } + else { + if (node.object.name !== 'this') { + this.visit(node.object); + } + } + // we don't ever reference the property as it's always going to be a property on the thing + } + JSXOpeningElement(node) { + this.referenceJsxPragma(); + if (node.name.type === types_1.AST_NODE_TYPES.JSXIdentifier) { + if (node.name.name[0].toUpperCase() === node.name.name[0] || + node.name.name === 'this') { + // lower cased component names are always treated as "intrinsic" names, and are converted to a string, + // not a variable by JSX transforms: + //
=> React.createElement("div", null) + // the only case we want to visit a lower-cased component has its name as "this", + this.visit(node.name); + } + } + else { + this.visit(node.name); + } + this.visitType(node.typeArguments); + for (const attr of node.attributes) { + this.visit(attr); + } + } + LabeledStatement(node) { + this.visit(node.body); + } + MemberExpression(node) { + this.visit(node.object); + if (node.computed) { + this.visit(node.property); + } + } + MetaProperty() { + // meta properties all builtin globals + } + NewExpression(node) { + this.visitChildren(node, ['typeArguments']); + this.visitType(node.typeArguments); + } + PrivateIdentifier() { + // private identifiers are members on classes and thus have no variables to to reference + } + Program(node) { + const globalScope = this.scopeManager.nestGlobalScope(node); + this.populateGlobalsFromLib(globalScope); + if (this.scopeManager.isGlobalReturn()) { + // Force strictness of GlobalScope to false when using node.js scope. + this.currentScope().isStrict = false; + this.scopeManager.nestFunctionScope(node, false); + } + if (this.scopeManager.isModule()) { + this.scopeManager.nestModuleScope(node); + } + if (this.scopeManager.isImpliedStrict()) { + this.currentScope().isStrict = true; + } + this.visitChildren(node); + this.close(node); + } + Property(node) { + this.visitProperty(node); + } + SwitchStatement(node) { + this.visit(node.discriminant); + this.scopeManager.nestSwitchScope(node); + for (const switchCase of node.cases) { + this.visit(switchCase); + } + this.close(node); + } + TaggedTemplateExpression(node) { + this.visit(node.tag); + this.visit(node.quasi); + this.visitType(node.typeArguments); + } + TSAsExpression(node) { + this.visitTypeAssertion(node); + } + TSDeclareFunction(node) { + this.visitFunction(node); + } + TSImportEqualsDeclaration(node) { + this.currentScope().defineIdentifier(node.id, new definition_1.ImportBindingDefinition(node.id, node, node)); + if (node.moduleReference.type === types_1.AST_NODE_TYPES.TSQualifiedName) { + this.visit(node.moduleReference.left); + } + else { + this.visit(node.moduleReference); + } + } + TSEmptyBodyFunctionExpression(node) { + this.visitFunction(node); + } + TSEnumDeclaration(node) { + this.currentScope().defineIdentifier(node.id, new definition_1.TSEnumNameDefinition(node.id, node)); + // enum members can be referenced within the enum body + this.scopeManager.nestTSEnumScope(node); + // define the enum name again inside the new enum scope + // references to the enum should not resolve directly to the enum + this.currentScope().defineIdentifier(node.id, new definition_1.TSEnumNameDefinition(node.id, node)); + for (const member of node.members) { + // TS resolves literal named members to be actual names + // enum Foo { + // 'a' = 1, + // b = a, // this references the 'a' member + // } + if (member.id.type === types_1.AST_NODE_TYPES.Literal && + typeof member.id.value === 'string') { + const name = member.id; + this.currentScope().defineLiteralIdentifier(name, new definition_1.TSEnumMemberDefinition(name, member)); + } + else if (!member.computed && + member.id.type === types_1.AST_NODE_TYPES.Identifier) { + this.currentScope().defineIdentifier(member.id, new definition_1.TSEnumMemberDefinition(member.id, member)); + } + this.visit(member.initializer); + } + this.close(node); + } + TSInstantiationExpression(node) { + this.visitChildren(node, ['typeArguments']); + this.visitType(node.typeArguments); + } + TSInterfaceDeclaration(node) { + this.visitType(node); + } + TSModuleDeclaration(node) { + if (node.id.type === types_1.AST_NODE_TYPES.Identifier && !node.global) { + this.currentScope().defineIdentifier(node.id, new definition_1.TSModuleNameDefinition(node.id, node)); + } + this.scopeManager.nestTSModuleScope(node); + this.visit(node.body); + this.close(node); + } + TSSatisfiesExpression(node) { + this.visitTypeAssertion(node); + } + TSTypeAliasDeclaration(node) { + this.visitType(node); + } + TSTypeAssertion(node) { + this.visitTypeAssertion(node); + } + UpdateExpression(node) { + if (PatternVisitor_1.PatternVisitor.isPattern(node.argument)) { + this.visitPattern(node.argument, pattern => { + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.ReadWrite, null); + }); + } + else { + this.visitChildren(node); + } + } + VariableDeclaration(node) { + const variableTargetScope = node.kind === 'var' + ? this.currentScope().variableScope + : this.currentScope(); + for (const decl of node.declarations) { + const init = decl.init; + this.visitPattern(decl.id, (pattern, info) => { + variableTargetScope.defineIdentifier(pattern, new definition_1.VariableDefinition(pattern, decl, node)); + this.referencingDefaultValue(pattern, info.assignments, null, true); + if (init) { + this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, init, null, true); + } + }, { processRightHandNodes: true }); + this.visit(decl.init); + this.visitType(decl.id.typeAnnotation); + } + } + WithStatement(node) { + this.visit(node.object); + // Then nest scope for WithStatement. + this.scopeManager.nestWithScope(node); + this.visit(node.body); + this.close(node); + } + ImportAttribute() { + // import assertions are module metadata and thus have no variables to reference + } +} +exports.Referencer = Referencer; +_Referencer_jsxPragma = new WeakMap(), _Referencer_jsxFragmentName = new WeakMap(), _Referencer_hasReferencedJsxFactory = new WeakMap(), _Referencer_hasReferencedJsxFragmentFactory = new WeakMap(), _Referencer_lib = new WeakMap(), _Referencer_emitDecoratorMetadata = new WeakMap(); +//# sourceMappingURL=Referencer.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map new file mode 100644 index 0000000000..16f35715fb --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Referencer.js","sourceRoot":"","sources":["../../src/referencer/Referencer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAA0D;AAE1D,sCAAmC;AACnC,8CASuB;AACvB,gCAA4C;AAG5C,iDAA8C;AAC9C,mDAAgD;AAChD,mDAAgD;AAChD,qDAAkD;AAElD,2CAA4C;AAC5C,+CAA4C;AAE5C,uCAAoC;AASpC,+CAA+C;AAC/C,MAAM,UAAW,SAAQ,iBAAO;IAS9B,YAAY,OAA0B,EAAE,YAA0B;QAChE,KAAK,CAAC,OAAO,CAAC,CAAC;QATjB,wCAA0B;QAC1B,8CAAgC;QAChC,8CAA2B,KAAK,EAAC;QACjC,sDAAmC,KAAK,EAAC;QACzC,kCAAY;QACH,oDAAgC;QAKvC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,uBAAA,IAAI,yBAAc,OAAO,CAAC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AAC;QAExB,qCAAqC;QACrC,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAEtC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEtB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IAES,eAAe;QACvB,gFAAgF;IAClF,CAAC;CACF;AAEQ,gCAAU"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts new file mode 100644 index 0000000000..5a0dafa363 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts @@ -0,0 +1,33 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Referencer } from './Referencer'; +import { Visitor } from './Visitor'; +declare class TypeVisitor extends Visitor { + #private; + constructor(referencer: Referencer); + static visit(referencer: Referencer, node: TSESTree.Node): void; + protected visitFunctionType(node: TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSFunctionType | TSESTree.TSMethodSignature): void; + protected visitPropertyKey(node: TSESTree.TSMethodSignature | TSESTree.TSPropertySignature): void; + protected Identifier(node: TSESTree.Identifier): void; + protected MemberExpression(node: TSESTree.MemberExpression): void; + protected TSCallSignatureDeclaration(node: TSESTree.TSCallSignatureDeclaration): void; + protected TSConditionalType(node: TSESTree.TSConditionalType): void; + protected TSConstructorType(node: TSESTree.TSConstructorType): void; + protected TSConstructSignatureDeclaration(node: TSESTree.TSConstructSignatureDeclaration): void; + protected TSFunctionType(node: TSESTree.TSFunctionType): void; + protected TSImportType(node: TSESTree.TSImportType): void; + protected TSIndexSignature(node: TSESTree.TSIndexSignature): void; + protected TSInferType(node: TSESTree.TSInferType): void; + protected TSInterfaceDeclaration(node: TSESTree.TSInterfaceDeclaration): void; + protected TSMappedType(node: TSESTree.TSMappedType): void; + protected TSMethodSignature(node: TSESTree.TSMethodSignature): void; + protected TSNamedTupleMember(node: TSESTree.TSNamedTupleMember): void; + protected TSPropertySignature(node: TSESTree.TSPropertySignature): void; + protected TSQualifiedName(node: TSESTree.TSQualifiedName): void; + protected TSTypeAliasDeclaration(node: TSESTree.TSTypeAliasDeclaration): void; + protected TSTypeParameter(node: TSESTree.TSTypeParameter): void; + protected TSTypePredicate(node: TSESTree.TSTypePredicate): void; + protected TSTypeQuery(node: TSESTree.TSTypeQuery): void; + protected TSTypeAnnotation(node: TSESTree.TSTypeAnnotation): void; +} +export { TypeVisitor }; +//# sourceMappingURL=TypeVisitor.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map new file mode 100644 index 0000000000..f61d10289a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TypeVisitor.d.ts","sourceRoot":"","sources":["../../src/referencer/TypeVisitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,cAAM,WAAY,SAAQ,OAAO;;gBAGnB,UAAU,EAAE,UAAU;IAKlC,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI;IAS/D,SAAS,CAAC,iBAAiB,CACzB,IAAI,EACA,QAAQ,CAAC,0BAA0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IAAI;IAKnE,SAAS,CAAC,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,kBAAkB,GAAG,IAAI;IAKrE,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,mBAAmB,GAAG,IAAI;IAKvE,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAK/D,SAAS,CAAC,sBAAsB,CAC9B,IAAI,EAAE,QAAQ,CAAC,sBAAsB,GACpC,IAAI;IAkBP,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAS/D,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,GAAG,IAAI;IAQ/D,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,GAAG,IAAI;IAyBvD,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,gBAAgB,GAAG,IAAI;CAIlE;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js new file mode 100644 index 0000000000..dc11b75260 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js @@ -0,0 +1,229 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _TypeVisitor_referencer; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeVisitor = void 0; +const types_1 = require("@typescript-eslint/types"); +const definition_1 = require("../definition"); +const scope_1 = require("../scope"); +const Visitor_1 = require("./Visitor"); +class TypeVisitor extends Visitor_1.Visitor { + constructor(referencer) { + super(referencer); + _TypeVisitor_referencer.set(this, void 0); + __classPrivateFieldSet(this, _TypeVisitor_referencer, referencer, "f"); + } + static visit(referencer, node) { + const typeReferencer = new TypeVisitor(referencer); + typeReferencer.visit(node); + } + /////////////////// + // Visit helpers // + /////////////////// + visitFunctionType(node) { + // arguments and type parameters can only be referenced from within the function + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").scopeManager.nestFunctionTypeScope(node); + this.visit(node.typeParameters); + for (const param of node.params) { + let didVisitAnnotation = false; + this.visitPattern(param, (pattern, info) => { + // a parameter name creates a value type variable which can be referenced later via typeof arg + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f") + .currentScope() + .defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node, info.rest)); + if (pattern.typeAnnotation) { + this.visit(pattern.typeAnnotation); + didVisitAnnotation = true; + } + }); + // there are a few special cases where the type annotation is owned by the parameter, not the pattern + if (!didVisitAnnotation && 'typeAnnotation' in param) { + this.visit(param.typeAnnotation); + } + } + this.visit(node.returnType); + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").close(node); + } + visitPropertyKey(node) { + if (!node.computed) { + return; + } + // computed members are treated as value references, and TS expects they have a literal type + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").visit(node.key); + } + ///////////////////// + // Visit selectors // + ///////////////////// + Identifier(node) { + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").currentScope().referenceType(node); + } + MemberExpression(node) { + this.visit(node.object); + // don't visit the property + } + TSCallSignatureDeclaration(node) { + this.visitFunctionType(node); + } + TSConditionalType(node) { + // conditional types can define inferred type parameters + // which are only accessible from inside the conditional parameter + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").scopeManager.nestConditionalTypeScope(node); + // type parameters inferred in the condition clause are not accessible within the false branch + this.visitChildren(node, ['falseType']); + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").close(node); + this.visit(node.falseType); + } + TSConstructorType(node) { + this.visitFunctionType(node); + } + TSConstructSignatureDeclaration(node) { + this.visitFunctionType(node); + } + TSFunctionType(node) { + this.visitFunctionType(node); + } + TSImportType(node) { + // the TS parser allows any type to be the parameter, but it's a syntax error - so we can ignore it + this.visit(node.typeArguments); + // the qualifier is just part of a standard EntityName, so it should not be visited + } + TSIndexSignature(node) { + for (const param of node.parameters) { + if (param.type === types_1.AST_NODE_TYPES.Identifier) { + this.visit(param.typeAnnotation); + } + } + this.visit(node.typeAnnotation); + } + TSInferType(node) { + const typeParameter = node.typeParameter; + let scope = __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").currentScope(); + /* + In cases where there is a sub-type scope created within a conditional type, then the generic should be defined in the + conditional type's scope, not the child type scope. + If we define it within the child type's scope then it won't be able to be referenced outside the child type + */ + if (scope.type === scope_1.ScopeType.functionType || + scope.type === scope_1.ScopeType.mappedType) { + // search up the scope tree to figure out if we're in a nested type scope + let currentScope = scope.upper; + while (currentScope) { + if (currentScope.type === scope_1.ScopeType.functionType || + currentScope.type === scope_1.ScopeType.mappedType) { + // ensure valid type parents only + currentScope = currentScope.upper; + continue; + } + if (currentScope.type === scope_1.ScopeType.conditionalType) { + scope = currentScope; + break; + } + break; + } + } + scope.defineIdentifier(typeParameter.name, new definition_1.TypeDefinition(typeParameter.name, typeParameter)); + this.visit(typeParameter.constraint); + } + TSInterfaceDeclaration(node) { + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f") + .currentScope() + .defineIdentifier(node.id, new definition_1.TypeDefinition(node.id, node)); + if (node.typeParameters) { + // type parameters cannot be referenced from outside their current scope + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").scopeManager.nestTypeScope(node); + this.visit(node.typeParameters); + } + node.extends?.forEach(this.visit, this); + this.visit(node.body); + if (node.typeParameters) { + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").close(node); + } + } + TSMappedType(node) { + // mapped types key can only be referenced within their return value + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").scopeManager.nestMappedTypeScope(node); + this.visitChildren(node); + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").close(node); + } + TSMethodSignature(node) { + this.visitPropertyKey(node); + this.visitFunctionType(node); + } + TSNamedTupleMember(node) { + this.visit(node.elementType); + // we don't visit the label as the label only exists for the purposes of documentation + } + TSPropertySignature(node) { + this.visitPropertyKey(node); + this.visit(node.typeAnnotation); + } + TSQualifiedName(node) { + this.visit(node.left); + // we don't visit the right as it a name on the thing, not a name to reference + } + TSTypeAliasDeclaration(node) { + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f") + .currentScope() + .defineIdentifier(node.id, new definition_1.TypeDefinition(node.id, node)); + if (node.typeParameters) { + // type parameters cannot be referenced from outside their current scope + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").scopeManager.nestTypeScope(node); + this.visit(node.typeParameters); + } + this.visit(node.typeAnnotation); + if (node.typeParameters) { + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").close(node); + } + } + TSTypeParameter(node) { + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f") + .currentScope() + .defineIdentifier(node.name, new definition_1.TypeDefinition(node.name, node)); + this.visit(node.constraint); + this.visit(node.default); + } + TSTypePredicate(node) { + if (node.parameterName.type !== types_1.AST_NODE_TYPES.TSThisType) { + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").currentScope().referenceValue(node.parameterName); + } + this.visit(node.typeAnnotation); + } + // a type query `typeof foo` is a special case that references a _non-type_ variable, + TSTypeQuery(node) { + let entityName; + if (node.exprName.type === types_1.AST_NODE_TYPES.TSQualifiedName) { + let iter = node.exprName; + while (iter.left.type === types_1.AST_NODE_TYPES.TSQualifiedName) { + iter = iter.left; + } + entityName = iter.left; + } + else { + entityName = node.exprName; + if (node.exprName.type === types_1.AST_NODE_TYPES.TSImportType) { + this.visit(node.exprName); + } + } + if (entityName.type === types_1.AST_NODE_TYPES.Identifier) { + __classPrivateFieldGet(this, _TypeVisitor_referencer, "f").currentScope().referenceValue(entityName); + } + this.visit(node.typeArguments); + } + TSTypeAnnotation(node) { + // check + this.visitChildren(node); + } +} +exports.TypeVisitor = TypeVisitor; +_TypeVisitor_referencer = new WeakMap(); +//# sourceMappingURL=TypeVisitor.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map new file mode 100644 index 0000000000..bda12ddb37 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TypeVisitor.js","sourceRoot":"","sources":["../../src/referencer/TypeVisitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAA0D;AAE1D,8CAAoE;AACpE,oCAAqC;AAErC,uCAAoC;AAEpC,MAAM,WAAY,SAAQ,iBAAO;IAG/B,YAAY,UAAsB;QAChC,KAAK,CAAC,UAAU,CAAC,CAAC;QAHX,0CAAwB;QAI/B,uBAAA,IAAI,2BAAe,UAAU,MAAA,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,UAAsB,EAAE,IAAmB;QACtD,MAAM,cAAc,GAAG,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC;QACnD,cAAc,CAAC,KAAK,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IAAI,KAAK,sBAAc,CAAC,eAAe,EAAE;YACzD,IAAI,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;YACzB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,eAAe,EAAE;gBACxD,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;aAClB;YACD,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC;SACxB;aAAM;YACL,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC;YAE3B,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,sBAAc,CAAC,YAAY,EAAE;gBACtD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC3B;SACF;QACD,IAAI,UAAU,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU,EAAE;YACjD,uBAAA,IAAI,+BAAY,CAAC,YAAY,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;SAC5D;QAED,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;IAES,gBAAgB,CAAC,IAA+B;QACxD,QAAQ;QACR,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CACF;AAEQ,kCAAW"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts new file mode 100644 index 0000000000..728a0427e8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts @@ -0,0 +1,13 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { PatternVisitorCallback, PatternVisitorOptions } from './PatternVisitor'; +import { VisitorBase, VisitorOptions } from './VisitorBase'; +interface VisitPatternOptions extends PatternVisitorOptions { + processRightHandNodes?: boolean; +} +declare class Visitor extends VisitorBase { + #private; + constructor(optionsOrVisitor: Visitor | VisitorOptions); + protected visitPattern(node: TSESTree.Node, callback: PatternVisitorCallback, options?: VisitPatternOptions): void; +} +export { Visitor, VisitorBase, VisitorOptions }; +//# sourceMappingURL=Visitor.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts.map new file mode 100644 index 0000000000..4aa2718442 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Visitor.d.ts","sourceRoot":"","sources":["../../src/referencer/Visitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5D,UAAU,mBAAoB,SAAQ,qBAAqB;IACzD,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AACD,cAAM,OAAQ,SAAQ,WAAW;;gBAEnB,gBAAgB,EAAE,OAAO,GAAG,cAAc;IAatD,SAAS,CAAC,YAAY,CACpB,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,QAAQ,EAAE,sBAAsB,EAChC,OAAO,GAAE,mBAAsD,GAC9D,IAAI;CAWR;AAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js new file mode 100644 index 0000000000..5584c1d10f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js @@ -0,0 +1,41 @@ +"use strict"; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _Visitor_options; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VisitorBase = exports.Visitor = void 0; +const PatternVisitor_1 = require("./PatternVisitor"); +const VisitorBase_1 = require("./VisitorBase"); +Object.defineProperty(exports, "VisitorBase", { enumerable: true, get: function () { return VisitorBase_1.VisitorBase; } }); +class Visitor extends VisitorBase_1.VisitorBase { + constructor(optionsOrVisitor) { + super(optionsOrVisitor instanceof Visitor + ? __classPrivateFieldGet(optionsOrVisitor, _Visitor_options, "f") + : optionsOrVisitor); + _Visitor_options.set(this, void 0); + __classPrivateFieldSet(this, _Visitor_options, optionsOrVisitor instanceof Visitor + ? __classPrivateFieldGet(optionsOrVisitor, _Visitor_options, "f") + : optionsOrVisitor, "f"); + } + visitPattern(node, callback, options = { processRightHandNodes: false }) { + // Call the callback at left hand identifier nodes, and Collect right hand nodes. + const visitor = new PatternVisitor_1.PatternVisitor(__classPrivateFieldGet(this, _Visitor_options, "f"), node, callback); + visitor.visit(node); + // Process the right hand nodes recursively. + if (options.processRightHandNodes) { + visitor.rightHandNodes.forEach(this.visit, this); + } + } +} +exports.Visitor = Visitor; +_Visitor_options = new WeakMap(); +//# sourceMappingURL=Visitor.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js.map new file mode 100644 index 0000000000..336529a318 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Visitor.js","sourceRoot":"","sources":["../../src/referencer/Visitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,qDAAkD;AAClD,+CAA4D;AAqC1C,4FArCT,yBAAW,OAqCS;AAhC7B,MAAM,OAAQ,SAAQ,yBAAW;IAE/B,YAAY,gBAA0C;QACpD,KAAK,CACH,gBAAgB,YAAY,OAAO;YACjC,CAAC,CAAC,uBAAA,gBAAgB,wBAAS;YAC3B,CAAC,CAAC,gBAAgB,CACrB,CAAC;QANK,mCAAyB;QAQhC,uBAAA,IAAI,oBACF,gBAAgB,YAAY,OAAO;YACjC,CAAC,CAAC,uBAAA,gBAAgB,wBAAS;YAC3B,CAAC,CAAC,gBAAgB,MAAA,CAAC;IACzB,CAAC;IAES,YAAY,CACpB,IAAmB,EACnB,QAAgC,EAChC,UAA+B,EAAE,qBAAqB,EAAE,KAAK,EAAE;QAE/D,iFAAiF;QACjF,MAAM,OAAO,GAAG,IAAI,+BAAc,CAAC,uBAAA,IAAI,wBAAS,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QAElE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEpB,4CAA4C;QAC5C,IAAI,OAAO,CAAC,qBAAqB,EAAE;YACjC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;SAClD;IACH,CAAC;CACF;AAEQ,0BAAO"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts new file mode 100644 index 0000000000..38b38a6913 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts @@ -0,0 +1,22 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { VisitorKeys } from '@typescript-eslint/visitor-keys'; +interface VisitorOptions { + childVisitorKeys?: VisitorKeys | null; + visitChildrenEvenIfSelectorExists?: boolean; +} +declare abstract class VisitorBase { + #private; + constructor(options: VisitorOptions); + /** + * Default method for visiting children. + * @param node the node whose children should be visited + * @param exclude a list of keys to not visit + */ + visitChildren(node: T | null | undefined, excludeArr?: (keyof T)[]): void; + /** + * Dispatching node. + */ + visit(node: TSESTree.Node | null | undefined): void; +} +export { VisitorBase, VisitorOptions, VisitorKeys }; +//# sourceMappingURL=VisitorBase.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts.map new file mode 100644 index 0000000000..8423d85c45 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"VisitorBase.d.ts","sourceRoot":"","sources":["../../src/referencer/VisitorBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAe,MAAM,iCAAiC,CAAC;AAE3E,UAAU,cAAc;IACtB,gBAAgB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACtC,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC7C;AAaD,uBAAe,WAAW;;gBAGZ,OAAO,EAAE,cAAc;IAMnC;;;;OAIG;IACH,aAAa,CAAC,CAAC,SAAS,QAAQ,CAAC,IAAI,EACnC,IAAI,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC1B,UAAU,GAAE,CAAC,MAAM,CAAC,CAAC,EAAO,GAC3B,IAAI;IA6BP;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;CAepD;AAED,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js new file mode 100644 index 0000000000..7a903abfee --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js @@ -0,0 +1,80 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _VisitorBase_childVisitorKeys, _VisitorBase_visitChildrenEvenIfSelectorExists; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VisitorBase = void 0; +const visitor_keys_1 = require("@typescript-eslint/visitor-keys"); +function isObject(obj) { + return typeof obj === 'object' && obj != null; +} +function isNode(node) { + return isObject(node) && typeof node.type === 'string'; +} +class VisitorBase { + constructor(options) { + _VisitorBase_childVisitorKeys.set(this, void 0); + _VisitorBase_visitChildrenEvenIfSelectorExists.set(this, void 0); + __classPrivateFieldSet(this, _VisitorBase_childVisitorKeys, options.childVisitorKeys ?? visitor_keys_1.visitorKeys, "f"); + __classPrivateFieldSet(this, _VisitorBase_visitChildrenEvenIfSelectorExists, options.visitChildrenEvenIfSelectorExists ?? false, "f"); + } + /** + * Default method for visiting children. + * @param node the node whose children should be visited + * @param exclude a list of keys to not visit + */ + visitChildren(node, excludeArr = []) { + if (node?.type == null) { + return; + } + const exclude = new Set([...excludeArr, 'parent']); + const children = __classPrivateFieldGet(this, _VisitorBase_childVisitorKeys, "f")[node.type] ?? Object.keys(node); + for (const key of children) { + if (exclude.has(key)) { + continue; + } + const child = node[key]; + if (!child) { + continue; + } + if (Array.isArray(child)) { + for (const subChild of child) { + if (isNode(subChild)) { + this.visit(subChild); + } + } + } + else if (isNode(child)) { + this.visit(child); + } + } + } + /** + * Dispatching node. + */ + visit(node) { + if (node?.type == null) { + return; + } + const visitor = this[node.type]; + if (visitor) { + visitor.call(this, node); + if (!__classPrivateFieldGet(this, _VisitorBase_visitChildrenEvenIfSelectorExists, "f")) { + return; + } + } + this.visitChildren(node); + } +} +exports.VisitorBase = VisitorBase; +_VisitorBase_childVisitorKeys = new WeakMap(), _VisitorBase_visitChildrenEvenIfSelectorExists = new WeakMap(); +//# sourceMappingURL=VisitorBase.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js.map new file mode 100644 index 0000000000..7db5e4b820 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js.map @@ -0,0 +1 @@ +{"version":3,"file":"VisitorBase.js","sourceRoot":"","sources":["../../src/referencer/VisitorBase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kEAA2E;AAO3E,SAAS,QAAQ,CAAC,GAAY;IAC5B,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,IAAI,CAAC;AAChD,CAAC;AACD,SAAS,MAAM,CAAC,IAAa;IAC3B,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC;AACzD,CAAC;AAMD,MAAe,WAAW;IAGxB,YAAY,OAAuB;QAF1B,gDAA+B;QAC/B,iEAA4C;QAEnD,uBAAA,IAAI,iCAAqB,OAAO,CAAC,gBAAgB,IAAI,0BAAW,MAAA,CAAC;QACjE,uBAAA,IAAI,kDACF,OAAO,CAAC,iCAAiC,IAAI,KAAK,MAAA,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACH,aAAa,CACX,IAA0B,EAC1B,aAA0B,EAAE;QAE5B,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE;YACtB,OAAO;SACR;QAED,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,UAAU,EAAE,QAAQ,CAAa,CAAC,CAAC;QAC/D,MAAM,QAAQ,GAAG,uBAAA,IAAI,qCAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxE,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE;YAC1B,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBACpB,SAAS;aACV;YAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAA0B,CAAY,CAAC;YAC1D,IAAI,CAAC,KAAK,EAAE;gBACV,SAAS;aACV;YAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBACxB,KAAK,MAAM,QAAQ,IAAI,KAAK,EAAE;oBAC5B,IAAI,MAAM,CAAC,QAAQ,CAAC,EAAE;wBACpB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;qBACtB;iBACF;aACF;iBAAM,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;gBACxB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACnB;SACF;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAsC;QAC1C,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE;YACtB,OAAO;SACR;QAED,MAAM,OAAO,GAAI,IAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,uBAAA,IAAI,sDAAmC,EAAE;gBAC5C,OAAO;aACR;SACF;QAED,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CACF;AAEQ,kCAAW"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts new file mode 100644 index 0000000000..d2a8121c14 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts @@ -0,0 +1,2 @@ +export { Referencer, ReferencerOptions } from './Referencer'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts.map new file mode 100644 index 0000000000..5b48579f34 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/referencer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js new file mode 100644 index 0000000000..16625137c1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Referencer = void 0; +var Referencer_1 = require("./Referencer"); +Object.defineProperty(exports, "Referencer", { enumerable: true, get: function () { return Referencer_1.Referencer; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js.map new file mode 100644 index 0000000000..aa5dc621de --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/referencer/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/referencer/index.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAApD,wGAAA,UAAU,OAAA"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts new file mode 100644 index 0000000000..66f2713f62 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class BlockScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: BlockScope['upper'], block: BlockScope['block']); +} +export { BlockScope }; +//# sourceMappingURL=BlockScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts.map new file mode 100644 index 0000000000..74e95a89f1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BlockScope.d.ts","sourceRoot":"","sources":["../../src/scope/BlockScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,UAAW,SAAQ,SAAS,CAChC,SAAS,CAAC,KAAK,EACf,QAAQ,CAAC,cAAc,EACvB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAC/B,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;CAI7B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js new file mode 100644 index 0000000000..0fc34d615f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BlockScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class BlockScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.block, upperScope, block, false); + } +} +exports.BlockScope = BlockScope; +//# sourceMappingURL=BlockScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js.map new file mode 100644 index 0000000000..9934c6c89f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/BlockScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BlockScope.js","sourceRoot":"","sources":["../../src/scope/BlockScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,UAAW,SAAQ,qBAIxB;IACC,YACE,YAA0B,EAC1B,UAA+B,EAC/B,KAA0B;QAE1B,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;CACF;AAEQ,gCAAU"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts new file mode 100644 index 0000000000..59532d2382 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class CatchScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: CatchScope['upper'], block: CatchScope['block']); +} +export { CatchScope }; +//# sourceMappingURL=CatchScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts.map new file mode 100644 index 0000000000..de507516e4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CatchScope.d.ts","sourceRoot":"","sources":["../../src/scope/CatchScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,UAAW,SAAQ,SAAS,CAChC,SAAS,CAAC,KAAK,EACf,QAAQ,CAAC,WAAW,EACpB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAC/B,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;CAI7B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js new file mode 100644 index 0000000000..dbb630f25f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CatchScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class CatchScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.catch, upperScope, block, false); + } +} +exports.CatchScope = CatchScope; +//# sourceMappingURL=CatchScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js.map new file mode 100644 index 0000000000..e13f07e3b9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/CatchScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CatchScope.js","sourceRoot":"","sources":["../../src/scope/CatchScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,UAAW,SAAQ,qBAIxB;IACC,YACE,YAA0B,EAC1B,UAA+B,EAC/B,KAA0B;QAE1B,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;CACF;AAEQ,gCAAU"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts new file mode 100644 index 0000000000..a646736334 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class ClassFieldInitializerScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ClassFieldInitializerScope['upper'], block: ClassFieldInitializerScope['block']); +} +export { ClassFieldInitializerScope }; +//# sourceMappingURL=ClassFieldInitializerScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts.map new file mode 100644 index 0000000000..c625a6b624 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassFieldInitializerScope.d.ts","sourceRoot":"","sources":["../../src/scope/ClassFieldInitializerScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,0BAA2B,SAAQ,SAAS,CAChD,SAAS,CAAC,qBAAqB,EAE/B,QAAQ,CAAC,UAAU,EACnB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,0BAA0B,CAAC,OAAO,CAAC,EAC/C,KAAK,EAAE,0BAA0B,CAAC,OAAO,CAAC;CAU7C;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js new file mode 100644 index 0000000000..5d3bb691f0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClassFieldInitializerScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ClassFieldInitializerScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.classFieldInitializer, upperScope, block, false); + } +} +exports.ClassFieldInitializerScope = ClassFieldInitializerScope; +//# sourceMappingURL=ClassFieldInitializerScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js.map new file mode 100644 index 0000000000..c14cc0f157 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassFieldInitializerScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassFieldInitializerScope.js","sourceRoot":"","sources":["../../src/scope/ClassFieldInitializerScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,0BAA2B,SAAQ,qBAKxC;IACC,YACE,YAA0B,EAC1B,UAA+C,EAC/C,KAA0C;QAE1C,KAAK,CACH,YAAY,EACZ,qBAAS,CAAC,qBAAqB,EAC/B,UAAU,EACV,KAAK,EACL,KAAK,CACN,CAAC;IACJ,CAAC;CACF;AAEQ,gEAA0B"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts new file mode 100644 index 0000000000..c31a3364e8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class ClassScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ClassScope['upper'], block: ClassScope['block']); +} +export { ClassScope }; +//# sourceMappingURL=ClassScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts.map new file mode 100644 index 0000000000..540877e59b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassScope.d.ts","sourceRoot":"","sources":["../../src/scope/ClassScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,UAAW,SAAQ,SAAS,CAChC,SAAS,CAAC,KAAK,EACf,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,eAAe,EACpD,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAC/B,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;CAI7B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js new file mode 100644 index 0000000000..003e214fdf --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClassScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ClassScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.class, upperScope, block, false); + } +} +exports.ClassScope = ClassScope; +//# sourceMappingURL=ClassScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js.map new file mode 100644 index 0000000000..3ba1ca90a3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassScope.js","sourceRoot":"","sources":["../../src/scope/ClassScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,UAAW,SAAQ,qBAIxB;IACC,YACE,YAA0B,EAC1B,UAA+B,EAC/B,KAA0B;QAE1B,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;CACF;AAEQ,gCAAU"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts new file mode 100644 index 0000000000..7d7e81b089 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class ClassStaticBlockScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ClassStaticBlockScope['upper'], block: ClassStaticBlockScope['block']); +} +export { ClassStaticBlockScope }; +//# sourceMappingURL=ClassStaticBlockScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map new file mode 100644 index 0000000000..1bdcd78548 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassStaticBlockScope.d.ts","sourceRoot":"","sources":["../../src/scope/ClassStaticBlockScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,qBAAsB,SAAQ,SAAS,CAC3C,SAAS,CAAC,gBAAgB,EAC1B,QAAQ,CAAC,WAAW,EACpB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,qBAAqB,CAAC,OAAO,CAAC,EAC1C,KAAK,EAAE,qBAAqB,CAAC,OAAO,CAAC;CAIxC;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js new file mode 100644 index 0000000000..3f23aa6812 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClassStaticBlockScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ClassStaticBlockScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.classStaticBlock, upperScope, block, false); + } +} +exports.ClassStaticBlockScope = ClassStaticBlockScope; +//# sourceMappingURL=ClassStaticBlockScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js.map new file mode 100644 index 0000000000..8456365f70 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ClassStaticBlockScope.js","sourceRoot":"","sources":["../../src/scope/ClassStaticBlockScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,qBAAsB,SAAQ,qBAInC;IACC,YACE,YAA0B,EAC1B,UAA0C,EAC1C,KAAqC;QAErC,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC5E,CAAC;CACF;AAEQ,sDAAqB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts new file mode 100644 index 0000000000..6d35e6ec9b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class ConditionalTypeScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ConditionalTypeScope['upper'], block: ConditionalTypeScope['block']); +} +export { ConditionalTypeScope }; +//# sourceMappingURL=ConditionalTypeScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts.map new file mode 100644 index 0000000000..44f849aa52 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ConditionalTypeScope.d.ts","sourceRoot":"","sources":["../../src/scope/ConditionalTypeScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,oBAAqB,SAAQ,SAAS,CAC1C,SAAS,CAAC,eAAe,EACzB,QAAQ,CAAC,iBAAiB,EAC1B,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,oBAAoB,CAAC,OAAO,CAAC,EACzC,KAAK,EAAE,oBAAoB,CAAC,OAAO,CAAC;CAIvC;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js new file mode 100644 index 0000000000..8fbd7c50d9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConditionalTypeScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ConditionalTypeScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.conditionalType, upperScope, block, false); + } +} +exports.ConditionalTypeScope = ConditionalTypeScope; +//# sourceMappingURL=ConditionalTypeScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js.map new file mode 100644 index 0000000000..0b60bfee6c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConditionalTypeScope.js","sourceRoot":"","sources":["../../src/scope/ConditionalTypeScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,oBAAqB,SAAQ,qBAIlC;IACC,YACE,YAA0B,EAC1B,UAAyC,EACzC,KAAoC;QAEpC,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC3E,CAAC;CACF;AAEQ,oDAAoB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts new file mode 100644 index 0000000000..ed2f22451d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class ForScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ForScope['upper'], block: ForScope['block']); +} +export { ForScope }; +//# sourceMappingURL=ForScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts.map new file mode 100644 index 0000000000..fb1348fec0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ForScope.d.ts","sourceRoot":"","sources":["../../src/scope/ForScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,QAAS,SAAQ,SAAS,CAC9B,SAAS,CAAC,GAAG,EACb,QAAQ,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,GAAG,QAAQ,CAAC,YAAY,EACzE,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,EAC7B,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;CAI3B;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js new file mode 100644 index 0000000000..cd27683ed8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ForScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ForScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.for, upperScope, block, false); + } +} +exports.ForScope = ForScope; +//# sourceMappingURL=ForScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js.map new file mode 100644 index 0000000000..d8f8e8eada --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ForScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ForScope.js","sourceRoot":"","sources":["../../src/scope/ForScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,QAAS,SAAQ,qBAItB;IACC,YACE,YAA0B,EAC1B,UAA6B,EAC7B,KAAwB;QAExB,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC/D,CAAC;CACF;AAEQ,4BAAQ"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts new file mode 100644 index 0000000000..2f5044cad5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts @@ -0,0 +1,11 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class FunctionExpressionNameScope extends ScopeBase { + readonly functionExpressionScope: true; + constructor(scopeManager: ScopeManager, upperScope: FunctionExpressionNameScope['upper'], block: FunctionExpressionNameScope['block']); +} +export { FunctionExpressionNameScope }; +//# sourceMappingURL=FunctionExpressionNameScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts.map new file mode 100644 index 0000000000..89161c4f48 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionExpressionNameScope.d.ts","sourceRoot":"","sources":["../../src/scope/FunctionExpressionNameScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,2BAA4B,SAAQ,SAAS,CACjD,SAAS,CAAC,sBAAsB,EAChC,QAAQ,CAAC,kBAAkB,EAC3B,KAAK,CACN;IACC,SAAgB,uBAAuB,EAAE,IAAI,CAAC;gBAE5C,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,2BAA2B,CAAC,OAAO,CAAC,EAChD,KAAK,EAAE,2BAA2B,CAAC,OAAO,CAAC;CAiB9C;AAED,OAAO,EAAE,2BAA2B,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js new file mode 100644 index 0000000000..5c0e0ca85d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FunctionExpressionNameScope = void 0; +const definition_1 = require("../definition"); +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class FunctionExpressionNameScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.functionExpressionName, upperScope, block, false); + if (block.id) { + this.defineIdentifier(block.id, new definition_1.FunctionNameDefinition(block.id, block)); + } + this.functionExpressionScope = true; + } +} +exports.FunctionExpressionNameScope = FunctionExpressionNameScope; +//# sourceMappingURL=FunctionExpressionNameScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js.map new file mode 100644 index 0000000000..bdbbdff351 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionExpressionNameScope.js","sourceRoot":"","sources":["../../src/scope/FunctionExpressionNameScope.ts"],"names":[],"mappings":";;;AAEA,8CAAuD;AAGvD,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,2BAA4B,SAAQ,qBAIzC;IAEC,YACE,YAA0B,EAC1B,UAAgD,EAChD,KAA2C;QAE3C,KAAK,CACH,YAAY,EACZ,qBAAS,CAAC,sBAAsB,EAChC,UAAU,EACV,KAAK,EACL,KAAK,CACN,CAAC;QACF,IAAI,KAAK,CAAC,EAAE,EAAE;YACZ,IAAI,CAAC,gBAAgB,CACnB,KAAK,CAAC,EAAE,EACR,IAAI,mCAAsB,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAC5C,CAAC;SACH;QACD,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;IACtC,CAAC;CACF;AAEQ,kEAA2B"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts new file mode 100644 index 0000000000..f1bf5e115d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts @@ -0,0 +1,13 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Reference } from '../referencer/Reference'; +import type { ScopeManager } from '../ScopeManager'; +import type { Variable } from '../variable'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class FunctionScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: FunctionScope['upper'], block: FunctionScope['block'], isMethodDefinition: boolean); + protected isValidResolution(ref: Reference, variable: Variable): boolean; +} +export { FunctionScope }; +//# sourceMappingURL=FunctionScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts.map new file mode 100644 index 0000000000..40eaaaa1f7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionScope.d.ts","sourceRoot":"","sources":["../../src/scope/FunctionScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,aAAc,SAAQ,SAAS,CACnC,SAAS,CAAC,QAAQ,EAChB,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,mBAAmB,GAC5B,QAAQ,CAAC,kBAAkB,GAC3B,QAAQ,CAAC,OAAO,GAChB,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,6BAA6B,EACxC,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,EAClC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAC7B,kBAAkB,EAAE,OAAO;IAuB7B,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO;CAiBzE;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js new file mode 100644 index 0000000000..a45b74f01f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FunctionScope = void 0; +const types_1 = require("@typescript-eslint/types"); +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class FunctionScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block, isMethodDefinition) { + super(scopeManager, ScopeType_1.ScopeType.function, upperScope, block, isMethodDefinition); + // section 9.2.13, FunctionDeclarationInstantiation. + // NOTE Arrow functions never have an arguments objects. + if (this.block.type !== types_1.AST_NODE_TYPES.ArrowFunctionExpression) { + this.defineVariable('arguments', this.set, this.variables, null, null); + } + } + // References in default parameters isn't resolved to variables which are in their function body. + // const x = 1 + // function f(a = x) { // This `x` is resolved to the `x` in the outer scope. + // const x = 2 + // console.log(a) + // } + isValidResolution(ref, variable) { + // If `options.globalReturn` is true, `this.block` becomes a Program node. + if (this.block.type === types_1.AST_NODE_TYPES.Program) { + return true; + } + const bodyStart = this.block.body?.range[0] ?? -1; + // It's invalid resolution in the following case: + return !((variable.scope === this && + ref.identifier.range[0] < bodyStart && // the reference is in the parameter part. + variable.defs.every(d => d.name.range[0] >= bodyStart)) // the variable is in the body. + ); + } +} +exports.FunctionScope = FunctionScope; +//# sourceMappingURL=FunctionScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js.map new file mode 100644 index 0000000000..97aa63a1c4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionScope.js","sourceRoot":"","sources":["../../src/scope/FunctionScope.ts"],"names":[],"mappings":";;;AACA,oDAA0D;AAM1D,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,aAAc,SAAQ,qBAS3B;IACC,YACE,YAA0B,EAC1B,UAAkC,EAClC,KAA6B,EAC7B,kBAA2B;QAE3B,KAAK,CACH,YAAY,EACZ,qBAAS,CAAC,QAAQ,EAClB,UAAU,EACV,KAAK,EACL,kBAAkB,CACnB,CAAC;QAEF,oDAAoD;QACpD,wDAAwD;QACxD,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,sBAAc,CAAC,uBAAuB,EAAE;YAC9D,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;SACxE;IACH,CAAC;IAED,iGAAiG;IACjG,kBAAkB;IAClB,iFAAiF;IACjF,sBAAsB;IACtB,yBAAyB;IACzB,QAAQ;IACE,iBAAiB,CAAC,GAAc,EAAE,QAAkB;QAC5D,0EAA0E;QAC1E,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,sBAAc,CAAC,OAAO,EAAE;YAC9C,OAAO,IAAI,CAAC;SACb;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAElD,iDAAiD;QACjD,OAAO,CAAC,CACN,CACE,QAAQ,CAAC,KAAK,KAAK,IAAI;YACvB,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,0CAA0C;YACjF,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CACvD,CAAC,+BAA+B;SAClC,CAAC;IACJ,CAAC;CACF;AAEQ,sCAAa"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts new file mode 100644 index 0000000000..5cdeb57fa8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class FunctionTypeScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: FunctionTypeScope['upper'], block: FunctionTypeScope['block']); +} +export { FunctionTypeScope }; +//# sourceMappingURL=FunctionTypeScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts.map new file mode 100644 index 0000000000..fa77ec3472 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionTypeScope.d.ts","sourceRoot":"","sources":["../../src/scope/FunctionTypeScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,iBAAkB,SAAQ,SAAS,CACvC,SAAS,CAAC,YAAY,EACpB,QAAQ,CAAC,0BAA0B,GACnC,QAAQ,CAAC,iBAAiB,GAC1B,QAAQ,CAAC,+BAA+B,GACxC,QAAQ,CAAC,cAAc,GACvB,QAAQ,CAAC,iBAAiB,EAC5B,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC,EACtC,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC;CAIpC;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js new file mode 100644 index 0000000000..3d7fe797fe --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FunctionTypeScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class FunctionTypeScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.functionType, upperScope, block, false); + } +} +exports.FunctionTypeScope = FunctionTypeScope; +//# sourceMappingURL=FunctionTypeScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js.map new file mode 100644 index 0000000000..6bb883e207 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FunctionTypeScope.js","sourceRoot":"","sources":["../../src/scope/FunctionTypeScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,iBAAkB,SAAQ,qBAQ/B;IACC,YACE,YAA0B,EAC1B,UAAsC,EACtC,KAAiC;QAEjC,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACxE,CAAC;CACF;AAEQ,8CAAiB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts new file mode 100644 index 0000000000..aab4633410 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts @@ -0,0 +1,18 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { ImplicitLibVariableOptions } from '../variable'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class GlobalScope extends ScopeBase { + private readonly implicit; + constructor(scopeManager: ScopeManager, block: GlobalScope['block']); + defineImplicitVariable(name: string, options: ImplicitLibVariableOptions): void; + close(scopeManager: ScopeManager): Scope | null; +} +export { GlobalScope }; +//# sourceMappingURL=GlobalScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts.map new file mode 100644 index 0000000000..129515e8c0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GlobalScope.d.ts","sourceRoot":"","sources":["../../src/scope/GlobalScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAMzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAY,MAAM,aAAa,CAAC;AAExE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,WAAY,SAAQ,SAAS,CACjC,SAAS,CAAC,MAAM,EAChB,QAAQ,CAAC,OAAO;AAChB;;GAEG;AACH,IAAI,CACL;IAEC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAQvB;gBAEU,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC;IAS5D,sBAAsB,CAC3B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,0BAA0B,GAClC,IAAI;IAUA,KAAK,CAAC,YAAY,EAAE,YAAY,GAAG,KAAK,GAAG,IAAI;CAuBvD;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js new file mode 100644 index 0000000000..2d16343752 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GlobalScope = void 0; +const types_1 = require("@typescript-eslint/types"); +const assert_1 = require("../assert"); +const ImplicitGlobalVariableDefinition_1 = require("../definition/ImplicitGlobalVariableDefinition"); +const variable_1 = require("../variable"); +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class GlobalScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, block) { + super(scopeManager, ScopeType_1.ScopeType.global, null, block, false); + this.implicit = { + set: new Map(), + variables: [], + leftToBeResolved: [], + }; + } + defineImplicitVariable(name, options) { + this.defineVariable(new variable_1.ImplicitLibVariable(this, name, options), this.set, this.variables, null, null); + } + close(scopeManager) { + (0, assert_1.assert)(this.leftToResolve); + for (const ref of this.leftToResolve) { + if (ref.maybeImplicitGlobal && !this.set.has(ref.identifier.name)) { + // create an implicit global variable from assignment expression + const info = ref.maybeImplicitGlobal; + const node = info.pattern; + if (node && node.type === types_1.AST_NODE_TYPES.Identifier) { + this.defineVariable(node.name, this.implicit.set, this.implicit.variables, node, new ImplicitGlobalVariableDefinition_1.ImplicitGlobalVariableDefinition(info.pattern, info.node)); + } + } + } + this.implicit.leftToBeResolved = this.leftToResolve; + return super.close(scopeManager); + } +} +exports.GlobalScope = GlobalScope; +//# sourceMappingURL=GlobalScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js.map new file mode 100644 index 0000000000..f13f448187 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/GlobalScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GlobalScope.js","sourceRoot":"","sources":["../../src/scope/GlobalScope.ts"],"names":[],"mappings":";;;AACA,oDAA0D;AAE1D,sCAAmC;AACnC,qGAAkG;AAIlG,0CAAkD;AAElD,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,WAAY,SAAQ,qBAOzB;IAYC,YAAY,YAA0B,EAAE,KAA2B;QACjE,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,GAAG;YACd,GAAG,EAAE,IAAI,GAAG,EAAoB;YAChC,SAAS,EAAE,EAAE;YACb,gBAAgB,EAAE,EAAE;SACrB,CAAC;IACJ,CAAC;IAEM,sBAAsB,CAC3B,IAAY,EACZ,OAAmC;QAEnC,IAAI,CAAC,cAAc,CACjB,IAAI,8BAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAC5C,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,SAAS,EACd,IAAI,EACJ,IAAI,CACL,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,YAA0B;QACrC,IAAA,eAAM,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAE3B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,aAAa,EAAE;YACpC,IAAI,GAAG,CAAC,mBAAmB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;gBACjE,gEAAgE;gBAChE,MAAM,IAAI,GAAG,GAAG,CAAC,mBAAmB,CAAC;gBACrC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC;gBAC1B,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU,EAAE;oBACnD,IAAI,CAAC,cAAc,CACjB,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,QAAQ,CAAC,GAAG,EACjB,IAAI,CAAC,QAAQ,CAAC,SAAS,EACvB,IAAI,EACJ,IAAI,mEAAgC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAC9D,CAAC;iBACH;aACF;SACF;QAED,IAAI,CAAC,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QACpD,OAAO,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC;CACF;AAEQ,kCAAW"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts new file mode 100644 index 0000000000..b8ee01c03a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class MappedTypeScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: MappedTypeScope['upper'], block: MappedTypeScope['block']); +} +export { MappedTypeScope }; +//# sourceMappingURL=MappedTypeScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts.map new file mode 100644 index 0000000000..727fa23f07 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MappedTypeScope.d.ts","sourceRoot":"","sources":["../../src/scope/MappedTypeScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,eAAgB,SAAQ,SAAS,CACrC,SAAS,CAAC,UAAU,EACpB,QAAQ,CAAC,YAAY,EACrB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,eAAe,CAAC,OAAO,CAAC,EACpC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC;CAIlC;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js new file mode 100644 index 0000000000..81879c5ff3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MappedTypeScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class MappedTypeScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.mappedType, upperScope, block, false); + } +} +exports.MappedTypeScope = MappedTypeScope; +//# sourceMappingURL=MappedTypeScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js.map new file mode 100644 index 0000000000..f33fab4df7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/MappedTypeScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MappedTypeScope.js","sourceRoot":"","sources":["../../src/scope/MappedTypeScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,eAAgB,SAAQ,qBAI7B;IACC,YACE,YAA0B,EAC1B,UAAoC,EACpC,KAA+B;QAE/B,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACtE,CAAC;CACF;AAEQ,0CAAe"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts new file mode 100644 index 0000000000..ac537d891f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class ModuleScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: ModuleScope['upper'], block: ModuleScope['block']); +} +export { ModuleScope }; +//# sourceMappingURL=ModuleScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts.map new file mode 100644 index 0000000000..448b9b689d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ModuleScope.d.ts","sourceRoot":"","sources":["../../src/scope/ModuleScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,WAAY,SAAQ,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;gBAE1E,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC;CAI9B;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js new file mode 100644 index 0000000000..9d84e34a91 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ModuleScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class ModuleScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.module, upperScope, block, false); + } +} +exports.ModuleScope = ModuleScope; +//# sourceMappingURL=ModuleScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js.map new file mode 100644 index 0000000000..05ded0c5e6 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ModuleScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ModuleScope.js","sourceRoot":"","sources":["../../src/scope/ModuleScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,WAAY,SAAQ,qBAAoD;IAC5E,YACE,YAA0B,EAC1B,UAAgC,EAChC,KAA2B;QAE3B,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC;CACF;AAEQ,kCAAW"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts new file mode 100644 index 0000000000..7f475b16b9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts @@ -0,0 +1,21 @@ +import type { BlockScope } from './BlockScope'; +import type { CatchScope } from './CatchScope'; +import type { ClassFieldInitializerScope } from './ClassFieldInitializerScope'; +import type { ClassScope } from './ClassScope'; +import type { ClassStaticBlockScope } from './ClassStaticBlockScope'; +import type { ConditionalTypeScope } from './ConditionalTypeScope'; +import type { ForScope } from './ForScope'; +import type { FunctionExpressionNameScope } from './FunctionExpressionNameScope'; +import type { FunctionScope } from './FunctionScope'; +import type { FunctionTypeScope } from './FunctionTypeScope'; +import type { GlobalScope } from './GlobalScope'; +import type { MappedTypeScope } from './MappedTypeScope'; +import type { ModuleScope } from './ModuleScope'; +import type { SwitchScope } from './SwitchScope'; +import type { TSEnumScope } from './TSEnumScope'; +import type { TSModuleScope } from './TSModuleScope'; +import type { TypeScope } from './TypeScope'; +import type { WithScope } from './WithScope'; +type Scope = BlockScope | CatchScope | ClassFieldInitializerScope | ClassScope | ClassStaticBlockScope | ConditionalTypeScope | ForScope | FunctionExpressionNameScope | FunctionScope | FunctionTypeScope | GlobalScope | MappedTypeScope | ModuleScope | SwitchScope | TSEnumScope | TSModuleScope | TypeScope | WithScope; +export { Scope }; +//# sourceMappingURL=Scope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map new file mode 100644 index 0000000000..04701f4b19 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Scope.d.ts","sourceRoot":"","sources":["../../src/scope/Scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,KAAK,KAAK,GACN,UAAU,GACV,UAAU,GACV,0BAA0B,GAC1B,UAAU,GACV,qBAAqB,GACrB,oBAAoB,GACpB,QAAQ,GACR,2BAA2B,GAC3B,aAAa,GACb,iBAAiB,GACjB,WAAW,GACX,eAAe,GACf,WAAW,GACX,WAAW,GACX,WAAW,GACX,aAAa,GACb,SAAS,GACT,SAAS,CAAC;AAEd,OAAO,EAAE,KAAK,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js new file mode 100644 index 0000000000..676430c1c2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=Scope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js.map new file mode 100644 index 0000000000..03b04c8322 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Scope.js","sourceRoot":"","sources":["../../src/scope/Scope.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts new file mode 100644 index 0000000000..4d42d04534 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts @@ -0,0 +1,107 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Definition } from '../definition'; +import type { ReferenceImplicitGlobal } from '../referencer/Reference'; +import { Reference, ReferenceFlag } from '../referencer/Reference'; +import type { ScopeManager } from '../ScopeManager'; +import { Variable } from '../variable'; +import type { FunctionScope } from './FunctionScope'; +import type { GlobalScope } from './GlobalScope'; +import type { ModuleScope } from './ModuleScope'; +import type { Scope } from './Scope'; +import { ScopeType } from './ScopeType'; +import type { TSModuleScope } from './TSModuleScope'; +type VariableScope = FunctionScope | GlobalScope | ModuleScope | TSModuleScope; +declare abstract class ScopeBase { + #private; + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + readonly $id: number; + /** + * The AST node which created this scope. + * @public + */ + readonly block: TBlock; + /** + * The array of child scopes. This does not include grandchild scopes. + * @public + */ + readonly childScopes: Scope[]; + /** + * Whether this scope is created by a FunctionExpression. + * @public + */ + readonly functionExpressionScope: boolean; + /** + * Whether 'use strict' is in effect in this scope. + * @public + */ + isStrict: boolean; + /** + * List of {@link Reference}s that are left to be resolved (i.e. which + * need to be linked to the variable they refer to). + */ + protected leftToResolve: Reference[] | null; + /** + * Any variable {@link Reference} found in this scope. + * This includes occurrences of local variables as well as variables from parent scopes (including the global scope). + * For local variables this also includes defining occurrences (like in a 'var' statement). + * In a 'function' scope this does not include the occurrences of the formal parameter in the parameter list. + * @public + */ + readonly references: Reference[]; + /** + * The map from variable names to variable objects. + * @public + */ + readonly set: Map; + /** + * The {@link Reference}s that are not resolved with this scope. + * @public + */ + readonly through: Reference[]; + /** + * The type of scope + * @public + */ + readonly type: TType; + /** + * Reference to the parent {@link Scope}. + * @public + */ + readonly upper: TUpper; + /** + * The scoped {@link Variable}s of this scope. + * In the case of a 'function' scope this includes the automatic argument `arguments` as its first element, as well + * as all further formal arguments. + * This does not include variables which are defined in child scopes. + * @public + */ + readonly variables: Variable[]; + /** + * For scopes that can contain variable declarations, this is a self-reference. + * For other scope types this is the *variableScope* value of the parent scope. + * @public + */ + readonly variableScope: VariableScope; + constructor(scopeManager: ScopeManager, type: TType, upperScope: TUpper, block: TBlock, isMethodDefinition: boolean); + private isVariableScope; + shouldStaticallyClose(): boolean; + private shouldStaticallyCloseForGlobal; + close(scopeManager: ScopeManager): Scope | null; + /** + * To override by function scopes. + * References in default parameters isn't resolved to variables which are in their function body. + */ + protected isValidResolution(_ref: Reference, _variable: Variable): boolean; + protected delegateToUpperScope(ref: Reference): void; + private addDeclaredVariablesOfNode; + protected defineVariable(nameOrVariable: Variable | string, set: Map, variables: Variable[], node: TSESTree.Identifier | null, def: Definition | null): void; + defineIdentifier(node: TSESTree.Identifier, def: Definition): void; + defineLiteralIdentifier(node: TSESTree.StringLiteral, def: Definition): void; + referenceValue(node: TSESTree.Identifier | TSESTree.JSXIdentifier, assign?: ReferenceFlag, writeExpr?: TSESTree.Expression | null, maybeImplicitGlobal?: ReferenceImplicitGlobal | null, init?: boolean): void; + referenceType(node: TSESTree.Identifier): void; + referenceDualValueType(node: TSESTree.Identifier): void; +} +export { ScopeBase }; +//# sourceMappingURL=ScopeBase.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map new file mode 100644 index 0000000000..3f289407af --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopeBase.d.ts","sourceRoot":"","sources":["../../src/scope/ScopeBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EACL,SAAS,EACT,aAAa,EAEd,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA0GrD,KAAK,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,WAAW,GAAG,aAAa,CAAC;AAW/E,uBAAe,SAAS,CACtB,KAAK,SAAS,SAAS,EACvB,MAAM,SAAS,QAAQ,CAAC,IAAI,EAC5B,MAAM,SAAS,KAAK,GAAG,I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AAG,MAAM,EACjC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,EAC1B,SAAS,EAAE,QAAQ,EAAE,EACrB,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI,EAChC,GAAG,EAAE,UAAU,GAAG,IAAI,GACrB,IAAI;IAuBA,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI;IAIlE,uBAAuB,CAC5B,IAAI,EAAE,QAAQ,CAAC,aAAa,EAC5B,GAAG,EAAE,UAAU,GACd,IAAI;IAIA,cAAc,CACnB,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,QAAQ,CAAC,aAAa,EAClD,MAAM,GAAE,aAAkC,EAC1C,SAAS,CAAC,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI,EACtC,mBAAmB,CAAC,EAAE,uBAAuB,GAAG,IAAI,EACpD,IAAI,UAAQ,GACX,IAAI;IAeA,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI;IAe9C,sBAAsB,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,GAAG,IAAI;CAc/D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js new file mode 100644 index 0000000000..1160258dbe --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js @@ -0,0 +1,358 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _ScopeBase_declaredVariables, _ScopeBase_dynamic, _ScopeBase_staticCloseRef, _ScopeBase_dynamicCloseRef, _ScopeBase_globalCloseRef; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ScopeBase = void 0; +const types_1 = require("@typescript-eslint/types"); +const assert_1 = require("../assert"); +const definition_1 = require("../definition"); +const ID_1 = require("../ID"); +const Reference_1 = require("../referencer/Reference"); +const variable_1 = require("../variable"); +const ScopeType_1 = require("./ScopeType"); +/** + * Test if scope is strict + */ +function isStrictScope(scope, block, isMethodDefinition) { + let body; + // When upper scope is exists and strict, inner scope is also strict. + if (scope.upper?.isStrict) { + return true; + } + if (isMethodDefinition) { + return true; + } + if (scope.type === ScopeType_1.ScopeType.class || + scope.type === ScopeType_1.ScopeType.conditionalType || + scope.type === ScopeType_1.ScopeType.functionType || + scope.type === ScopeType_1.ScopeType.mappedType || + scope.type === ScopeType_1.ScopeType.module || + scope.type === ScopeType_1.ScopeType.tsEnum || + scope.type === ScopeType_1.ScopeType.tsModule || + scope.type === ScopeType_1.ScopeType.type) { + return true; + } + if (scope.type === ScopeType_1.ScopeType.block || scope.type === ScopeType_1.ScopeType.switch) { + return false; + } + if (scope.type === ScopeType_1.ScopeType.function) { + const functionBody = block; + switch (functionBody.type) { + case types_1.AST_NODE_TYPES.ArrowFunctionExpression: + if (functionBody.body.type !== types_1.AST_NODE_TYPES.BlockStatement) { + return false; + } + body = functionBody.body; + break; + case types_1.AST_NODE_TYPES.Program: + body = functionBody; + break; + default: + body = functionBody.body; + } + if (!body) { + return false; + } + } + else if (scope.type === ScopeType_1.ScopeType.global) { + body = block; + } + else { + return false; + } + // Search 'use strict' directive. + for (const stmt of body.body) { + if (stmt.type !== types_1.AST_NODE_TYPES.ExpressionStatement) { + break; + } + if (stmt.directive === 'use strict') { + return true; + } + const expr = stmt.expression; + if (expr.type !== types_1.AST_NODE_TYPES.Literal) { + break; + } + if (expr.raw === '"use strict"' || expr.raw === "'use strict'") { + return true; + } + if (expr.value === 'use strict') { + return true; + } + } + return false; +} +/** + * Register scope + */ +function registerScope(scopeManager, scope) { + scopeManager.scopes.push(scope); + const scopes = scopeManager.nodeToScope.get(scope.block); + if (scopes) { + scopes.push(scope); + } + else { + scopeManager.nodeToScope.set(scope.block, [scope]); + } +} +const generator = (0, ID_1.createIdGenerator)(); +const VARIABLE_SCOPE_TYPES = new Set([ + ScopeType_1.ScopeType.classFieldInitializer, + ScopeType_1.ScopeType.classStaticBlock, + ScopeType_1.ScopeType.function, + ScopeType_1.ScopeType.global, + ScopeType_1.ScopeType.module, + ScopeType_1.ScopeType.tsModule, +]); +class ScopeBase { + constructor(scopeManager, type, upperScope, block, isMethodDefinition) { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + this.$id = generator(); + /** + * The array of child scopes. This does not include grandchild scopes. + * @public + */ + this.childScopes = []; + /** + * A map of the variables for each node in this scope. + * This is map is a pointer to the one in the parent ScopeManager instance + */ + _ScopeBase_declaredVariables.set(this, void 0); + /** + * Generally, through the lexical scoping of JS you can always know which variable an identifier in the source code + * refers to. There are a few exceptions to this rule. With `global` and `with` scopes you can only decide at runtime + * which variable a reference refers to. + * All those scopes are considered "dynamic". + */ + _ScopeBase_dynamic.set(this, void 0); + /** + * Whether this scope is created by a FunctionExpression. + * @public + */ + this.functionExpressionScope = false; + /** + * List of {@link Reference}s that are left to be resolved (i.e. which + * need to be linked to the variable they refer to). + */ + this.leftToResolve = []; + /** + * Any variable {@link Reference} found in this scope. + * This includes occurrences of local variables as well as variables from parent scopes (including the global scope). + * For local variables this also includes defining occurrences (like in a 'var' statement). + * In a 'function' scope this does not include the occurrences of the formal parameter in the parameter list. + * @public + */ + this.references = []; + /** + * The map from variable names to variable objects. + * @public + */ + this.set = new Map(); + /** + * The {@link Reference}s that are not resolved with this scope. + * @public + */ + this.through = []; + /** + * The scoped {@link Variable}s of this scope. + * In the case of a 'function' scope this includes the automatic argument `arguments` as its first element, as well + * as all further formal arguments. + * This does not include variables which are defined in child scopes. + * @public + */ + this.variables = []; + _ScopeBase_staticCloseRef.set(this, (ref) => { + const resolve = () => { + const name = ref.identifier.name; + const variable = this.set.get(name); + if (!variable) { + return false; + } + if (!this.isValidResolution(ref, variable)) { + return false; + } + // make sure we don't match a type reference to a value variable + const isValidTypeReference = ref.isTypeReference && variable.isTypeVariable; + const isValidValueReference = ref.isValueReference && variable.isValueVariable; + if (!isValidTypeReference && !isValidValueReference) { + return false; + } + variable.references.push(ref); + ref.resolved = variable; + return true; + }; + if (!resolve()) { + this.delegateToUpperScope(ref); + } + }); + _ScopeBase_dynamicCloseRef.set(this, (ref) => { + // notify all names are through to global + let current = this; + do { + current.through.push(ref); + current = current.upper; + } while (current); + }); + _ScopeBase_globalCloseRef.set(this, (ref, scopeManager) => { + // let/const/class declarations should be resolved statically. + // others should be resolved dynamically. + if (this.shouldStaticallyCloseForGlobal(ref, scopeManager)) { + __classPrivateFieldGet(this, _ScopeBase_staticCloseRef, "f").call(this, ref); + } + else { + __classPrivateFieldGet(this, _ScopeBase_dynamicCloseRef, "f").call(this, ref); + } + }); + const upperScopeAsScopeBase = upperScope; + this.type = type; + __classPrivateFieldSet(this, _ScopeBase_dynamic, this.type === ScopeType_1.ScopeType.global || this.type === ScopeType_1.ScopeType.with, "f"); + this.block = block; + this.variableScope = this.isVariableScope() + ? this + : upperScopeAsScopeBase.variableScope; + this.upper = upperScope; + /** + * Whether 'use strict' is in effect in this scope. + * @member {boolean} Scope#isStrict + */ + this.isStrict = isStrictScope(this, block, isMethodDefinition); + if (upperScopeAsScopeBase) { + // this is guaranteed to be correct at runtime + upperScopeAsScopeBase.childScopes.push(this); + } + __classPrivateFieldSet(this, _ScopeBase_declaredVariables, scopeManager.declaredVariables, "f"); + registerScope(scopeManager, this); + } + isVariableScope() { + return VARIABLE_SCOPE_TYPES.has(this.type); + } + shouldStaticallyClose() { + return !__classPrivateFieldGet(this, _ScopeBase_dynamic, "f"); + } + shouldStaticallyCloseForGlobal(ref, scopeManager) { + // On global scope, let/const/class declarations should be resolved statically. + const name = ref.identifier.name; + const variable = this.set.get(name); + if (!variable) { + return false; + } + // variable exists on the scope + // in module mode, we can statically resolve everything, regardless of its decl type + if (scopeManager.isModule()) { + return true; + } + // in script mode, only certain cases should be statically resolved + // Example: + // a `var` decl is ignored by the runtime if it clashes with a global name + // this means that we should not resolve the reference to the variable + const defs = variable.defs; + return (defs.length > 0 && + defs.every(def => { + if (def.type === definition_1.DefinitionType.Variable && + def.parent?.type === types_1.AST_NODE_TYPES.VariableDeclaration && + def.parent.kind === 'var') { + return false; + } + return true; + })); + } + close(scopeManager) { + let closeRef; + if (this.shouldStaticallyClose()) { + closeRef = __classPrivateFieldGet(this, _ScopeBase_staticCloseRef, "f"); + } + else if (this.type !== 'global') { + closeRef = __classPrivateFieldGet(this, _ScopeBase_dynamicCloseRef, "f"); + } + else { + closeRef = __classPrivateFieldGet(this, _ScopeBase_globalCloseRef, "f"); + } + // Try Resolving all references in this scope. + (0, assert_1.assert)(this.leftToResolve); + this.leftToResolve.forEach(ref => closeRef(ref, scopeManager)); + this.leftToResolve = null; + return this.upper; + } + /** + * To override by function scopes. + * References in default parameters isn't resolved to variables which are in their function body. + */ + isValidResolution(_ref, _variable) { + return true; + } + delegateToUpperScope(ref) { + const upper = this.upper; + if (upper?.leftToResolve) { + upper.leftToResolve.push(ref); + } + this.through.push(ref); + } + addDeclaredVariablesOfNode(variable, node) { + if (node == null) { + return; + } + let variables = __classPrivateFieldGet(this, _ScopeBase_declaredVariables, "f").get(node); + if (variables == null) { + variables = []; + __classPrivateFieldGet(this, _ScopeBase_declaredVariables, "f").set(node, variables); + } + if (!variables.includes(variable)) { + variables.push(variable); + } + } + defineVariable(nameOrVariable, set, variables, node, def) { + const name = typeof nameOrVariable === 'string' ? nameOrVariable : nameOrVariable.name; + let variable = set.get(name); + if (!variable) { + variable = + typeof nameOrVariable === 'string' + ? new variable_1.Variable(name, this) + : nameOrVariable; + set.set(name, variable); + variables.push(variable); + } + if (def) { + variable.defs.push(def); + this.addDeclaredVariablesOfNode(variable, def.node); + this.addDeclaredVariablesOfNode(variable, def.parent); + } + if (node) { + variable.identifiers.push(node); + } + } + defineIdentifier(node, def) { + this.defineVariable(node.name, this.set, this.variables, node, def); + } + defineLiteralIdentifier(node, def) { + this.defineVariable(node.value, this.set, this.variables, null, def); + } + referenceValue(node, assign = Reference_1.ReferenceFlag.Read, writeExpr, maybeImplicitGlobal, init = false) { + const ref = new Reference_1.Reference(node, this, assign, writeExpr, maybeImplicitGlobal, init, Reference_1.ReferenceTypeFlag.Value); + this.references.push(ref); + this.leftToResolve?.push(ref); + } + referenceType(node) { + const ref = new Reference_1.Reference(node, this, Reference_1.ReferenceFlag.Read, null, null, false, Reference_1.ReferenceTypeFlag.Type); + this.references.push(ref); + this.leftToResolve?.push(ref); + } + referenceDualValueType(node) { + const ref = new Reference_1.Reference(node, this, Reference_1.ReferenceFlag.Read, null, null, false, Reference_1.ReferenceTypeFlag.Type | Reference_1.ReferenceTypeFlag.Value); + this.references.push(ref); + this.leftToResolve?.push(ref); + } +} +exports.ScopeBase = ScopeBase; +_ScopeBase_declaredVariables = new WeakMap(), _ScopeBase_dynamic = new WeakMap(), _ScopeBase_staticCloseRef = new WeakMap(), _ScopeBase_dynamicCloseRef = new WeakMap(), _ScopeBase_globalCloseRef = new WeakMap(); +//# sourceMappingURL=ScopeBase.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js.map new file mode 100644 index 0000000000..b76930e0da --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopeBase.js","sourceRoot":"","sources":["../../src/scope/ScopeBase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oDAA0D;AAE1D,sCAAmC;AAEnC,8CAA+C;AAC/C,8BAA0C;AAE1C,uDAIiC;AAEjC,0CAAuC;AAKvC,2CAAwC;AAGxC;;GAEG;AACH,SAAS,aAAa,CACpB,KAAY,EACZ,KAAoB,EACpB,kBAA2B;IAE3B,IAAI,IAAmE,CAAC;IAExE,qEAAqE;IACrE,IAAI,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE;QACzB,OAAO,IAAI,CAAC;KACb;IAED,IAAI,kBAAkB,EAAE;QACtB,OAAO,IAAI,CAAC;KACb;IAED,IACE,KAAK,CAAC,IAAI,KAAK,qBAAS,CAAC,KAAK;QAC9B,KAAK,CAAC,IAAI,KAAK,qBAAS,CAAC,eAAe;QACxC,KAAK,CAAC,IAAI,KAAK,qBAAS,CAAC,YAAY;QACrC,KAAK,CAAC,IAAI,KAAK,qBAAS,CAAC,UAAU;QACnC,KAAK,CAAC,IAAI,KAAK,qBAAS,CAAC,MAAM;QAC/B,KAAK,CAAC,IAAI,KAAK,qBAAS,CAAC,MAAM;QAC/B,KAAK,CAAC,IAAI,KAAK,qBAAS,CAAC,QAAQ;QACjC,KAAK,CAAC,IAAI,KAAK,qBAAS,CAAC,IAAI,EAC7B;QACA,OAAO,IAAI,CAAC;KACb;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,qBAAS,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,qBAAS,CAAC,MAAM,EAAE;QACrE,OAAO,KAAK,CAAC;KACd;IAED,IAAI,KAAK,CAAC,IA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AAI,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAEM,aAAa,CAAC,IAAyB;QAC5C,MAAM,GAAG,GAAG,IAAI,qBAAS,CACvB,IAAI,EACJ,IAAa,EACb,yBAAa,CAAC,IAAI,EAClB,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,6BAAiB,CAAC,IAAI,CACvB,CAAC;QAEF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAEM,sBAAsB,CAAC,IAAyB;QACrD,MAAM,GAAG,GAAG,IAAI,qBAAS,CACvB,IAAI,EACJ,IAAa,EACb,yBAAa,CAAC,IAAI,EAClB,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,6BAAiB,CAAC,IAAI,GAAG,6BAAiB,CAAC,KAAK,CACjD,CAAC;QAEF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;CACF;AAEQ,8BAAS"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts new file mode 100644 index 0000000000..8b5dea31bc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts @@ -0,0 +1,22 @@ +declare enum ScopeType { + block = "block", + catch = "catch", + class = "class", + classFieldInitializer = "class-field-initializer", + classStaticBlock = "class-static-block", + conditionalType = "conditionalType", + for = "for", + function = "function", + functionExpressionName = "function-expression-name", + functionType = "functionType", + global = "global", + mappedType = "mappedType", + module = "module", + switch = "switch", + tsEnum = "tsEnum", + tsModule = "tsModule", + type = "type", + with = "with" +} +export { ScopeType }; +//# sourceMappingURL=ScopeType.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts.map new file mode 100644 index 0000000000..7201b33aee --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopeType.d.ts","sourceRoot":"","sources":["../../src/scope/ScopeType.ts"],"names":[],"mappings":"AAAA,aAAK,SAAS;IACZ,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,qBAAqB,4BAA4B;IACjD,gBAAgB,uBAAuB;IACvC,eAAe,oBAAoB;IACnC,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,sBAAsB,6BAA6B;IACnD,YAAY,iBAAiB;IAC7B,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js new file mode 100644 index 0000000000..93dab0ebde --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ScopeType = void 0; +var ScopeType; +(function (ScopeType) { + ScopeType["block"] = "block"; + ScopeType["catch"] = "catch"; + ScopeType["class"] = "class"; + ScopeType["classFieldInitializer"] = "class-field-initializer"; + ScopeType["classStaticBlock"] = "class-static-block"; + ScopeType["conditionalType"] = "conditionalType"; + ScopeType["for"] = "for"; + ScopeType["function"] = "function"; + ScopeType["functionExpressionName"] = "function-expression-name"; + ScopeType["functionType"] = "functionType"; + ScopeType["global"] = "global"; + ScopeType["mappedType"] = "mappedType"; + ScopeType["module"] = "module"; + ScopeType["switch"] = "switch"; + ScopeType["tsEnum"] = "tsEnum"; + ScopeType["tsModule"] = "tsModule"; + ScopeType["type"] = "type"; + ScopeType["with"] = "with"; +})(ScopeType || (exports.ScopeType = ScopeType = {})); +//# sourceMappingURL=ScopeType.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js.map new file mode 100644 index 0000000000..6481f3285d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopeType.js","sourceRoot":"","sources":["../../src/scope/ScopeType.ts"],"names":[],"mappings":";;;AAAA,IAAK,SAmBJ;AAnBD,WAAK,SAAS;IACZ,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,8DAAiD,CAAA;IACjD,oDAAuC,CAAA;IACvC,gDAAmC,CAAA;IACnC,wBAAW,CAAA;IACX,kCAAqB,CAAA;IACrB,gEAAmD,CAAA;IACnD,0CAA6B,CAAA;IAC7B,8BAAiB,CAAA;IACjB,sCAAyB,CAAA;IACzB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,kCAAqB,CAAA;IACrB,0BAAa,CAAA;IACb,0BAAa,CAAA;AACf,CAAC,EAnBI,SAAS,yBAAT,SAAS,QAmBb"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts new file mode 100644 index 0000000000..fe4c0dc11b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class SwitchScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: SwitchScope['upper'], block: SwitchScope['block']); +} +export { SwitchScope }; +//# sourceMappingURL=SwitchScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts.map new file mode 100644 index 0000000000..1e9368bce3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SwitchScope.d.ts","sourceRoot":"","sources":["../../src/scope/SwitchScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,WAAY,SAAQ,SAAS,CACjC,SAAS,CAAC,MAAM,EAChB,QAAQ,CAAC,eAAe,EACxB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC;CAI9B;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js new file mode 100644 index 0000000000..9229e4edc5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SwitchScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class SwitchScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.switch, upperScope, block, false); + } +} +exports.SwitchScope = SwitchScope; +//# sourceMappingURL=SwitchScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js.map new file mode 100644 index 0000000000..6f65580e94 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/SwitchScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SwitchScope.js","sourceRoot":"","sources":["../../src/scope/SwitchScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,WAAY,SAAQ,qBAIzB;IACC,YACE,YAA0B,EAC1B,UAAgC,EAChC,KAA2B;QAE3B,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC;CACF;AAEQ,kCAAW"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts new file mode 100644 index 0000000000..38c09ea99a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class TSEnumScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: TSEnumScope['upper'], block: TSEnumScope['block']); +} +export { TSEnumScope }; +//# sourceMappingURL=TSEnumScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts.map new file mode 100644 index 0000000000..3f589e4a74 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSEnumScope.d.ts","sourceRoot":"","sources":["../../src/scope/TSEnumScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,WAAY,SAAQ,SAAS,CACjC,SAAS,CAAC,MAAM,EAChB,QAAQ,CAAC,iBAAiB,EAC1B,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,EAChC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC;CAI9B;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js new file mode 100644 index 0000000000..1f51bfb1cd --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSEnumScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class TSEnumScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.tsEnum, upperScope, block, false); + } +} +exports.TSEnumScope = TSEnumScope; +//# sourceMappingURL=TSEnumScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js.map new file mode 100644 index 0000000000..816eb2f63d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSEnumScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSEnumScope.js","sourceRoot":"","sources":["../../src/scope/TSEnumScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,WAAY,SAAQ,qBAIzB;IACC,YACE,YAA0B,EAC1B,UAAgC,EAChC,KAA2B;QAE3B,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC;CACF;AAEQ,kCAAW"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts new file mode 100644 index 0000000000..386180a056 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class TSModuleScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: TSModuleScope['upper'], block: TSModuleScope['block']); +} +export { TSModuleScope }; +//# sourceMappingURL=TSModuleScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts.map new file mode 100644 index 0000000000..d469425355 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSModuleScope.d.ts","sourceRoot":"","sources":["../../src/scope/TSModuleScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,aAAc,SAAQ,SAAS,CACnC,SAAS,CAAC,QAAQ,EAClB,QAAQ,CAAC,mBAAmB,EAC5B,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,EAClC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC;CAIhC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js new file mode 100644 index 0000000000..86279082f3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSModuleScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class TSModuleScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.tsModule, upperScope, block, false); + } +} +exports.TSModuleScope = TSModuleScope; +//# sourceMappingURL=TSModuleScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js.map new file mode 100644 index 0000000000..210e9862a9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TSModuleScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSModuleScope.js","sourceRoot":"","sources":["../../src/scope/TSModuleScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,aAAc,SAAQ,qBAI3B;IACC,YACE,YAA0B,EAC1B,UAAkC,EAClC,KAA6B;QAE7B,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACpE,CAAC;CACF;AAEQ,sCAAa"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts new file mode 100644 index 0000000000..bde4d53605 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts @@ -0,0 +1,10 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class TypeScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: TypeScope['upper'], block: TypeScope['block']); +} +export { TypeScope }; +//# sourceMappingURL=TypeScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts.map new file mode 100644 index 0000000000..721d8588f4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TypeScope.d.ts","sourceRoot":"","sources":["../../src/scope/TypeScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,SAAU,SAAQ,SAAS,CAC/B,SAAS,CAAC,IAAI,EACd,QAAQ,CAAC,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,EACjE,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,SAAS,CAAC,OAAO,CAAC,EAC9B,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC;CAI5B;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js new file mode 100644 index 0000000000..ebbf5fe65a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TypeScope = void 0; +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class TypeScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.type, upperScope, block, false); + } +} +exports.TypeScope = TypeScope; +//# sourceMappingURL=TypeScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js.map new file mode 100644 index 0000000000..a328ea3d22 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/TypeScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TypeScope.js","sourceRoot":"","sources":["../../src/scope/TypeScope.ts"],"names":[],"mappings":";;;AAIA,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,SAAU,SAAQ,qBAIvB;IACC,YACE,YAA0B,EAC1B,UAA8B,EAC9B,KAAyB;QAEzB,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAChE,CAAC;CACF;AAEQ,8BAAS"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts new file mode 100644 index 0000000000..1eaa485441 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts @@ -0,0 +1,11 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { ScopeManager } from '../ScopeManager'; +import type { Scope } from './Scope'; +import { ScopeBase } from './ScopeBase'; +import { ScopeType } from './ScopeType'; +declare class WithScope extends ScopeBase { + constructor(scopeManager: ScopeManager, upperScope: WithScope['upper'], block: WithScope['block']); + close(scopeManager: ScopeManager): Scope | null; +} +export { WithScope }; +//# sourceMappingURL=WithScope.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts.map new file mode 100644 index 0000000000..e2943c8d15 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"WithScope.d.ts","sourceRoot":"","sources":["../../src/scope/WithScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,cAAM,SAAU,SAAQ,SAAS,CAC/B,SAAS,CAAC,IAAI,EACd,QAAQ,CAAC,aAAa,EACtB,KAAK,CACN;gBAEG,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,SAAS,CAAC,OAAO,CAAC,EAC9B,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC;IAI3B,KAAK,CAAC,YAAY,EAAE,YAAY,GAAG,KAAK,GAAG,IAAI;CAShD;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js new file mode 100644 index 0000000000..734034d650 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WithScope = void 0; +const assert_1 = require("../assert"); +const ScopeBase_1 = require("./ScopeBase"); +const ScopeType_1 = require("./ScopeType"); +class WithScope extends ScopeBase_1.ScopeBase { + constructor(scopeManager, upperScope, block) { + super(scopeManager, ScopeType_1.ScopeType.with, upperScope, block, false); + } + close(scopeManager) { + if (this.shouldStaticallyClose()) { + return super.close(scopeManager); + } + (0, assert_1.assert)(this.leftToResolve); + this.leftToResolve.forEach(ref => this.delegateToUpperScope(ref)); + this.leftToResolve = null; + return this.upper; + } +} +exports.WithScope = WithScope; +//# sourceMappingURL=WithScope.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js.map new file mode 100644 index 0000000000..a3b9a65f86 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/WithScope.js.map @@ -0,0 +1 @@ +{"version":3,"file":"WithScope.js","sourceRoot":"","sources":["../../src/scope/WithScope.ts"],"names":[],"mappings":";;;AAEA,sCAAmC;AAGnC,2CAAwC;AACxC,2CAAwC;AAExC,MAAM,SAAU,SAAQ,qBAIvB;IACC,YACE,YAA0B,EAC1B,UAA8B,EAC9B,KAAyB;QAEzB,KAAK,CAAC,YAAY,EAAE,qBAAS,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAChE,CAAC;IACD,KAAK,CAAC,YAA0B;QAC9B,IAAI,IAAI,CAAC,qBAAqB,EAAE,EAAE;YAChC,OAAO,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;SAClC;QACD,IAAA,eAAM,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC;QAClE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAEQ,8BAAS"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts new file mode 100644 index 0000000000..7bf60717b6 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts @@ -0,0 +1,20 @@ +export * from './BlockScope'; +export * from './CatchScope'; +export * from './ClassFieldInitializerScope'; +export * from './ClassScope'; +export * from './ConditionalTypeScope'; +export * from './ForScope'; +export * from './FunctionExpressionNameScope'; +export * from './FunctionScope'; +export * from './FunctionTypeScope'; +export * from './GlobalScope'; +export * from './MappedTypeScope'; +export * from './ModuleScope'; +export * from './Scope'; +export * from './ScopeType'; +export * from './SwitchScope'; +export * from './TSEnumScope'; +export * from './TSModuleScope'; +export * from './TypeScope'; +export * from './WithScope'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts.map new file mode 100644 index 0000000000..43f10ba39f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scope/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js new file mode 100644 index 0000000000..221871367a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js @@ -0,0 +1,36 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./BlockScope"), exports); +__exportStar(require("./CatchScope"), exports); +__exportStar(require("./ClassFieldInitializerScope"), exports); +__exportStar(require("./ClassScope"), exports); +__exportStar(require("./ConditionalTypeScope"), exports); +__exportStar(require("./ForScope"), exports); +__exportStar(require("./FunctionExpressionNameScope"), exports); +__exportStar(require("./FunctionScope"), exports); +__exportStar(require("./FunctionTypeScope"), exports); +__exportStar(require("./GlobalScope"), exports); +__exportStar(require("./MappedTypeScope"), exports); +__exportStar(require("./ModuleScope"), exports); +__exportStar(require("./Scope"), exports); +__exportStar(require("./ScopeType"), exports); +__exportStar(require("./SwitchScope"), exports); +__exportStar(require("./TSEnumScope"), exports); +__exportStar(require("./TSModuleScope"), exports); +__exportStar(require("./TypeScope"), exports); +__exportStar(require("./WithScope"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js.map new file mode 100644 index 0000000000..2ceff644ca --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scope/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,+CAA6B;AAC7B,+DAA6C;AAC7C,+CAA6B;AAC7B,yDAAuC;AACvC,6CAA2B;AAC3B,gEAA8C;AAC9C,kDAAgC;AAChC,sDAAoC;AACpC,gDAA8B;AAC9B,oDAAkC;AAClC,gDAA8B;AAC9B,0CAAwB;AACxB,8CAA4B;AAC5B,gDAA8B;AAC9B,gDAA8B;AAC9B,kDAAgC;AAChC,8CAA4B;AAC5B,8CAA4B"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts new file mode 100644 index 0000000000..fd5e08bec4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts @@ -0,0 +1,34 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { VariableBase } from './VariableBase'; +/** + * ESLint defines global variables using the eslint-scope Variable class + * This is declared her for consumers to use + */ +declare class ESLintScopeVariable extends VariableBase { + /** + * Written to by ESLint. + * If this key exists, this variable is a global variable added by ESLint. + * If this is `true`, this variable can be assigned arbitrary values. + * If this is `false`, this variable is readonly. + */ + writeable?: boolean; + /** + * Written to by ESLint. + * This property is undefined if there are no globals directive comments. + * The array of globals directive comments which defined this global variable in the source code file. + */ + eslintExplicitGlobal?: boolean; + /** + * Written to by ESLint. + * The configured value in config files. This can be different from `variable.writeable` if there are globals directive comments. + */ + eslintImplicitGlobalSetting?: 'readonly' | 'writable'; + /** + * Written to by ESLint. + * If this key exists, it is a global variable added by ESLint. + * If `true`, this global variable was defined by a globals directive comment in the source code file. + */ + eslintExplicitGlobalComments?: TSESTree.Comment[]; +} +export { ESLintScopeVariable }; +//# sourceMappingURL=ESLintScopeVariable.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts.map new file mode 100644 index 0000000000..b544931c64 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ESLintScopeVariable.d.ts","sourceRoot":"","sources":["../../src/variable/ESLintScopeVariable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,cAAM,mBAAoB,SAAQ,YAAY;IAC5C;;;;;OAKG;IACI,SAAS,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;OAIG;IACI,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAEtC;;;OAGG;IACI,2BAA2B,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAE7D;;;;OAIG;IACI,4BAA4B,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;CAC1D;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js new file mode 100644 index 0000000000..f0a2f60981 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ESLintScopeVariable = void 0; +const VariableBase_1 = require("./VariableBase"); +/** + * ESLint defines global variables using the eslint-scope Variable class + * This is declared her for consumers to use + */ +class ESLintScopeVariable extends VariableBase_1.VariableBase { +} +exports.ESLintScopeVariable = ESLintScopeVariable; +//# sourceMappingURL=ESLintScopeVariable.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js.map new file mode 100644 index 0000000000..092443568c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ESLintScopeVariable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ESLintScopeVariable.js","sourceRoot":"","sources":["../../src/variable/ESLintScopeVariable.ts"],"names":[],"mappings":";;;AAEA,iDAA8C;AAE9C;;;GAGG;AACH,MAAM,mBAAoB,SAAQ,2BAAY;CA4B7C;AAEQ,kDAAmB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts new file mode 100644 index 0000000000..ad6ba004ac --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts @@ -0,0 +1,25 @@ +import type { Scope } from '../scope'; +import { ESLintScopeVariable } from './ESLintScopeVariable'; +import type { Variable } from './Variable'; +interface ImplicitLibVariableOptions { + readonly eslintImplicitGlobalSetting?: ESLintScopeVariable['eslintImplicitGlobalSetting']; + readonly isTypeVariable?: boolean; + readonly isValueVariable?: boolean; + readonly writeable?: boolean; +} +/** + * An variable implicitly defined by the TS Lib + */ +declare class ImplicitLibVariable extends ESLintScopeVariable implements Variable { + /** + * `true` if the variable is valid in a type context, false otherwise + */ + readonly isTypeVariable: boolean; + /** + * `true` if the variable is valid in a value context, false otherwise + */ + readonly isValueVariable: boolean; + constructor(scope: Scope, name: string, { isTypeVariable, isValueVariable, writeable, eslintImplicitGlobalSetting, }: ImplicitLibVariableOptions); +} +export { ImplicitLibVariable, ImplicitLibVariableOptions }; +//# sourceMappingURL=ImplicitLibVariable.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts.map new file mode 100644 index 0000000000..1fbb27daf3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ImplicitLibVariable.d.ts","sourceRoot":"","sources":["../../src/variable/ImplicitLibVariable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,UAAU,0BAA0B;IAClC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,mBAAmB,CAAC,6BAA6B,CAAC,CAAC;IAC1F,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;GAEG;AACH,cAAM,mBAAoB,SAAQ,mBAAoB,YAAW,QAAQ;IACvE;;OAEG;IACH,SAAgB,cAAc,EAAE,OAAO,CAAC;IAExC;;OAEG;IACH,SAAgB,eAAe,EAAE,OAAO,CAAC;gBAGvC,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAM,EACZ,EACE,cAAc,EACd,eAAe,EACf,SAAS,EACT,2BAA2B,GAC5B,EAAE,0BAA0B;CAShC;AAED,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js new file mode 100644 index 0000000000..3633f2eecb --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImplicitLibVariable = void 0; +const ESLintScopeVariable_1 = require("./ESLintScopeVariable"); +/** + * An variable implicitly defined by the TS Lib + */ +class ImplicitLibVariable extends ESLintScopeVariable_1.ESLintScopeVariable { + constructor(scope, name, { isTypeVariable, isValueVariable, writeable, eslintImplicitGlobalSetting, }) { + super(name, scope); + this.isTypeVariable = isTypeVariable ?? false; + this.isValueVariable = isValueVariable ?? false; + this.writeable = writeable ?? false; + this.eslintImplicitGlobalSetting = + eslintImplicitGlobalSetting ?? 'readonly'; + } +} +exports.ImplicitLibVariable = ImplicitLibVariable; +//# sourceMappingURL=ImplicitLibVariable.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js.map new file mode 100644 index 0000000000..aec24db0f7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/ImplicitLibVariable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ImplicitLibVariable.js","sourceRoot":"","sources":["../../src/variable/ImplicitLibVariable.ts"],"names":[],"mappings":";;;AACA,+DAA4D;AAU5D;;GAEG;AACH,MAAM,mBAAoB,SAAQ,yCAAmB;IAWnD,YACE,KAAY,EACZ,IAAY,EACZ,EACE,cAAc,EACd,eAAe,EACf,SAAS,EACT,2BAA2B,GACA;QAE7B,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACnB,IAAI,CAAC,cAAc,GAAG,cAAc,IAAI,KAAK,CAAC;QAC9C,IAAI,CAAC,eAAe,GAAG,eAAe,IAAI,KAAK,CAAC;QAChD,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,KAAK,CAAC;QACpC,IAAI,CAAC,2BAA2B;YAC9B,2BAA2B,IAAI,UAAU,CAAC;IAC9C,CAAC;CACF;AAEQ,kDAAmB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts new file mode 100644 index 0000000000..83754b17f8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts @@ -0,0 +1,18 @@ +import { VariableBase } from './VariableBase'; +/** + * A Variable represents a locally scoped identifier. These include arguments to functions. + */ +declare class Variable extends VariableBase { + /** + * `true` if the variable is valid in a type context, false otherwise + * @public + */ + get isTypeVariable(): boolean; + /** + * `true` if the variable is valid in a value context, false otherwise + * @public + */ + get isValueVariable(): boolean; +} +export { Variable }; +//# sourceMappingURL=Variable.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts.map new file mode 100644 index 0000000000..9b56c4f476 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Variable.d.ts","sourceRoot":"","sources":["../../src/variable/Variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;GAEG;AACH,cAAM,QAAS,SAAQ,YAAY;IACjC;;;OAGG;IACH,IAAW,cAAc,IAAI,OAAO,CAOnC;IAED;;;OAGG;IACH,IAAW,eAAe,IAAI,OAAO,CAOpC;CACF;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js new file mode 100644 index 0000000000..8b72550eec --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Variable = void 0; +const VariableBase_1 = require("./VariableBase"); +/** + * A Variable represents a locally scoped identifier. These include arguments to functions. + */ +class Variable extends VariableBase_1.VariableBase { + /** + * `true` if the variable is valid in a type context, false otherwise + * @public + */ + get isTypeVariable() { + if (this.defs.length === 0) { + // we don't statically know whether this is a type or a value + return true; + } + return this.defs.some(def => def.isTypeDefinition); + } + /** + * `true` if the variable is valid in a value context, false otherwise + * @public + */ + get isValueVariable() { + if (this.defs.length === 0) { + // we don't statically know whether this is a type or a value + return true; + } + return this.defs.some(def => def.isVariableDefinition); + } +} +exports.Variable = Variable; +//# sourceMappingURL=Variable.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js.map new file mode 100644 index 0000000000..43c4b8c637 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/Variable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Variable.js","sourceRoot":"","sources":["../../src/variable/Variable.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAE9C;;GAEG;AACH,MAAM,QAAS,SAAQ,2BAAY;IACjC;;;OAGG;IACH,IAAW,cAAc;QACvB,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1B,6DAA6D;YAC7D,OAAO,IAAI,CAAC;SACb;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACH,IAAW,eAAe;QACxB,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1B,6DAA6D;YAC7D,OAAO,IAAI,CAAC;SACb;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACzD,CAAC;CACF;AAEQ,4BAAQ"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts new file mode 100644 index 0000000000..c74c7a386e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts @@ -0,0 +1,44 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import type { Definition } from '../definition'; +import type { Reference } from '../referencer/Reference'; +import type { Scope } from '../scope'; +declare class VariableBase { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + readonly $id: number; + /** + * The array of the definitions of this variable. + * @public + */ + readonly defs: Definition[]; + /** + * True if the variable is considered used for the purposes of `no-unused-vars`, false otherwise. + * @public + */ + eslintUsed: boolean; + /** + * The array of `Identifier` nodes which define this variable. + * If this variable is redeclared, this array includes two or more nodes. + * @public + */ + readonly identifiers: TSESTree.Identifier[]; + /** + * The variable name, as given in the source code. + * @public + */ + readonly name: string; + /** + * List of {@link Reference} of this variable (excluding parameter entries) in its defining scope and all nested scopes. + * For defining occurrences only see {@link Variable#defs}. + * @public + */ + readonly references: Reference[]; + /** + * Reference to the enclosing Scope. + */ + readonly scope: Scope; + constructor(name: string, scope: Scope); +} +export { VariableBase }; +//# sourceMappingURL=VariableBase.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts.map new file mode 100644 index 0000000000..b830e8355e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"VariableBase.d.ts","sourceRoot":"","sources":["../../src/variable/VariableBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAItC,cAAM,YAAY;IAChB;;OAEG;IACH,SAAgB,GAAG,EAAE,MAAM,CAAe;IAE1C;;;OAGG;IACH,SAAgB,IAAI,EAAE,UAAU,EAAE,CAAM;IACxC;;;OAGG;IACI,UAAU,UAAS;IAC1B;;;;OAIG;IACH,SAAgB,WAAW,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAM;IACxD;;;OAGG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,SAAgB,UAAU,EAAE,SAAS,EAAE,CAAM;IAC7C;;OAEG;IACH,SAAgB,KAAK,EAAE,KAAK,CAAC;gBAEjB,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;CAIvC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js new file mode 100644 index 0000000000..426eb0aac9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VariableBase = void 0; +const ID_1 = require("../ID"); +const generator = (0, ID_1.createIdGenerator)(); +class VariableBase { + constructor(name, scope) { + /** + * A unique ID for this instance - primarily used to help debugging and testing + */ + this.$id = generator(); + /** + * The array of the definitions of this variable. + * @public + */ + this.defs = []; + /** + * True if the variable is considered used for the purposes of `no-unused-vars`, false otherwise. + * @public + */ + this.eslintUsed = false; + /** + * The array of `Identifier` nodes which define this variable. + * If this variable is redeclared, this array includes two or more nodes. + * @public + */ + this.identifiers = []; + /** + * List of {@link Reference} of this variable (excluding parameter entries) in its defining scope and all nested scopes. + * For defining occurrences only see {@link Variable#defs}. + * @public + */ + this.references = []; + this.name = name; + this.scope = scope; + } +} +exports.VariableBase = VariableBase; +//# sourceMappingURL=VariableBase.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js.map new file mode 100644 index 0000000000..21e4280ee7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/VariableBase.js.map @@ -0,0 +1 @@ +{"version":3,"file":"VariableBase.js","sourceRoot":"","sources":["../../src/variable/VariableBase.ts"],"names":[],"mappings":";;;AAGA,8BAA0C;AAI1C,MAAM,SAAS,GAAG,IAAA,sBAAiB,GAAE,CAAC;AAEtC,MAAM,YAAY;IAsChB,YAAY,IAAY,EAAE,KAAY;QArCtC;;WAEG;QACa,QAAG,GAAW,SAAS,EAAE,CAAC;QAE1C;;;WAGG;QACa,SAAI,GAAiB,EAAE,CAAC;QACxC;;;WAGG;QACI,eAAU,GAAG,KAAK,CAAC;QAC1B;;;;WAIG;QACa,gBAAW,GAA0B,EAAE,CAAC;QAMxD;;;;WAIG;QACa,eAAU,GAAgB,EAAE,CAAC;QAO3C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAEQ,oCAAY"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts new file mode 100644 index 0000000000..e62df98339 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts @@ -0,0 +1,4 @@ +export { ESLintScopeVariable } from './ESLintScopeVariable'; +export { ImplicitLibVariable, ImplicitLibVariableOptions, } from './ImplicitLibVariable'; +export { Variable } from './Variable'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts.map new file mode 100644 index 0000000000..4fdcff24c3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/variable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js new file mode 100644 index 0000000000..1e36582b7c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Variable = exports.ImplicitLibVariable = exports.ESLintScopeVariable = void 0; +var ESLintScopeVariable_1 = require("./ESLintScopeVariable"); +Object.defineProperty(exports, "ESLintScopeVariable", { enumerable: true, get: function () { return ESLintScopeVariable_1.ESLintScopeVariable; } }); +var ImplicitLibVariable_1 = require("./ImplicitLibVariable"); +Object.defineProperty(exports, "ImplicitLibVariable", { enumerable: true, get: function () { return ImplicitLibVariable_1.ImplicitLibVariable; } }); +var Variable_1 = require("./Variable"); +Object.defineProperty(exports, "Variable", { enumerable: true, get: function () { return Variable_1.Variable; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js.map new file mode 100644 index 0000000000..4798d0e279 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/dist/variable/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/variable/index.ts"],"names":[],"mappings":";;;AAAA,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,6DAG+B;AAF7B,0HAAA,mBAAmB,OAAA;AAGrB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/package.json b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/package.json new file mode 100644 index 0000000000..23cc195df9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager/package.json @@ -0,0 +1,73 @@ +{ + "name": "@typescript-eslint/scope-manager", + "version": "6.6.0", + "description": "TypeScript scope analyser for ESLint", + "files": [ + "dist", + "package.json", + "README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/scope-manager" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "license": "MIT", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "scripts": { + "build": "nx build", + "clean": "nx clean", + "clean-fixtures": "nx clean-fixtures", + "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", + "generate-lib": "nx generate-lib", + "lint": "nx lint", + "test": "nx test --code-coverage", + "typecheck": "nx typecheck" + }, + "dependencies": { + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0" + }, + "devDependencies": { + "@types/glob": "*", + "@typescript-eslint/typescript-estree": "6.6.0", + "glob": "*", + "jest-specific-snapshot": "*", + "make-dir": "*", + "prettier": "^2.8.4", + "pretty-format": "*", + "rimraf": "*", + "typescript": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "typesVersions": { + "<4.7": { + "*": [ + "_ts4.3/*" + ] + } + }, + "gitHead": "a3a39321296f74caa9d18577491a86119b450c18" +} diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/LICENSE b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/LICENSE new file mode 100644 index 0000000000..a1164108d4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/README.md b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/README.md new file mode 100644 index 0000000000..7a3008bb98 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/README.md @@ -0,0 +1,12 @@ +# `@typescript-eslint/types` + +> Types for the TypeScript-ESTree AST spec + +This package exists to help us reduce cycles and provide lighter-weight packages at runtime. + +## ✋ Internal Package + +This is an _internal package_ to the [typescript-eslint monorepo](https://github.com/typescript-eslint/typescript-eslint). +You likely don't want to use it directly. + +👉 See **https://typescript-eslint.io** for docs on typescript-eslint. diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts new file mode 100644 index 0000000000..5c0aab2024 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts @@ -0,0 +1,1881 @@ +/********************************************** + * DO NOT MODIFY THIS FILE MANUALLY * + * * + * THIS FILE HAS BEEN COPIED FROM ast-spec. * + * ANY CHANGES WILL BE LOST ON THE NEXT BUILD * + * * + * MAKE CHANGES TO ast-spec AND THEN RUN * + * yarn build * + **********************************************/ +import type { SyntaxKind } from 'typescript'; +export declare type Accessibility = 'private' | 'protected' | 'public'; +export declare type AccessorProperty = AccessorPropertyComputedName | AccessorPropertyNonComputedName; +export declare interface AccessorPropertyComputedName extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.AccessorProperty; +} +export declare interface AccessorPropertyNonComputedName extends PropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.AccessorProperty; +} +export declare interface ArrayExpression extends BaseNode { + type: AST_NODE_TYPES.ArrayExpression; + /** + * an element will be `null` in the case of a sparse array: `[1, ,3]` + */ + elements: (Expression | SpreadElement | null)[]; +} +export declare interface ArrayPattern extends BaseNode { + type: AST_NODE_TYPES.ArrayPattern; + elements: (DestructuringPattern | null)[]; + typeAnnotation: TSTypeAnnotation | undefined; + optional: boolean; + decorators: Decorator[]; +} +export declare interface ArrowFunctionExpression extends BaseNode { + type: AST_NODE_TYPES.ArrowFunctionExpression; + generator: boolean; + id: null; + params: Parameter[]; + body: BlockStatement | Expression; + async: boolean; + expression: boolean; + returnType: TSTypeAnnotation | undefined; + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface AssignmentExpression extends BaseNode { + type: AST_NODE_TYPES.AssignmentExpression; + operator: ValueOf; + left: Expression; + right: Expression; +} +export declare interface AssignmentOperatorToText { + [SyntaxKind.EqualsToken]: '='; + [SyntaxKind.PlusEqualsToken]: '+='; + [SyntaxKind.MinusEqualsToken]: '-='; + [SyntaxKind.AsteriskEqualsToken]: '*='; + [SyntaxKind.AsteriskAsteriskEqualsToken]: '**='; + [SyntaxKind.SlashEqualsToken]: '/='; + [SyntaxKind.PercentEqualsToken]: '%='; + [SyntaxKind.LessThanLessThanEqualsToken]: '<<='; + [SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>='; + [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>='; + [SyntaxKind.AmpersandEqualsToken]: '&='; + [SyntaxKind.BarEqualsToken]: '|='; + [SyntaxKind.BarBarEqualsToken]: '||='; + [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&='; + [SyntaxKind.QuestionQuestionEqualsToken]: '??='; + [SyntaxKind.CaretEqualsToken]: '^='; +} +export declare interface AssignmentPattern extends BaseNode { + type: AST_NODE_TYPES.AssignmentPattern; + left: BindingName; + right: Expression; + typeAnnotation: TSTypeAnnotation | undefined; + optional: boolean; + decorators: Decorator[]; +} +export declare enum AST_NODE_TYPES { + AccessorProperty = "AccessorProperty", + ArrayExpression = "ArrayExpression", + ArrayPattern = "ArrayPattern", + ArrowFunctionExpression = "ArrowFunctionExpression", + AssignmentExpression = "AssignmentExpression", + AssignmentPattern = "AssignmentPattern", + AwaitExpression = "AwaitExpression", + BinaryExpression = "BinaryExpression", + BlockStatement = "BlockStatement", + BreakStatement = "BreakStatement", + CallExpression = "CallExpression", + CatchClause = "CatchClause", + ChainExpression = "ChainExpression", + ClassBody = "ClassBody", + ClassDeclaration = "ClassDeclaration", + ClassExpression = "ClassExpression", + ConditionalExpression = "ConditionalExpression", + ContinueStatement = "ContinueStatement", + DebuggerStatement = "DebuggerStatement", + Decorator = "Decorator", + DoWhileStatement = "DoWhileStatement", + EmptyStatement = "EmptyStatement", + ExportAllDeclaration = "ExportAllDeclaration", + ExportDefaultDeclaration = "ExportDefaultDeclaration", + ExportNamedDeclaration = "ExportNamedDeclaration", + ExportSpecifier = "ExportSpecifier", + ExpressionStatement = "ExpressionStatement", + ForInStatement = "ForInStatement", + ForOfStatement = "ForOfStatement", + ForStatement = "ForStatement", + FunctionDeclaration = "FunctionDeclaration", + FunctionExpression = "FunctionExpression", + Identifier = "Identifier", + IfStatement = "IfStatement", + ImportAttribute = "ImportAttribute", + ImportDeclaration = "ImportDeclaration", + ImportDefaultSpecifier = "ImportDefaultSpecifier", + ImportExpression = "ImportExpression", + ImportNamespaceSpecifier = "ImportNamespaceSpecifier", + ImportSpecifier = "ImportSpecifier", + JSXAttribute = "JSXAttribute", + JSXClosingElement = "JSXClosingElement", + JSXClosingFragment = "JSXClosingFragment", + JSXElement = "JSXElement", + JSXEmptyExpression = "JSXEmptyExpression", + JSXExpressionContainer = "JSXExpressionContainer", + JSXFragment = "JSXFragment", + JSXIdentifier = "JSXIdentifier", + JSXMemberExpression = "JSXMemberExpression", + JSXNamespacedName = "JSXNamespacedName", + JSXOpeningElement = "JSXOpeningElement", + JSXOpeningFragment = "JSXOpeningFragment", + JSXSpreadAttribute = "JSXSpreadAttribute", + JSXSpreadChild = "JSXSpreadChild", + JSXText = "JSXText", + LabeledStatement = "LabeledStatement", + Literal = "Literal", + LogicalExpression = "LogicalExpression", + MemberExpression = "MemberExpression", + MetaProperty = "MetaProperty", + MethodDefinition = "MethodDefinition", + NewExpression = "NewExpression", + ObjectExpression = "ObjectExpression", + ObjectPattern = "ObjectPattern", + PrivateIdentifier = "PrivateIdentifier", + Program = "Program", + Property = "Property", + PropertyDefinition = "PropertyDefinition", + RestElement = "RestElement", + ReturnStatement = "ReturnStatement", + SequenceExpression = "SequenceExpression", + SpreadElement = "SpreadElement", + StaticBlock = "StaticBlock", + Super = "Super", + SwitchCase = "SwitchCase", + SwitchStatement = "SwitchStatement", + TaggedTemplateExpression = "TaggedTemplateExpression", + TemplateElement = "TemplateElement", + TemplateLiteral = "TemplateLiteral", + ThisExpression = "ThisExpression", + ThrowStatement = "ThrowStatement", + TryStatement = "TryStatement", + UnaryExpression = "UnaryExpression", + UpdateExpression = "UpdateExpression", + VariableDeclaration = "VariableDeclaration", + VariableDeclarator = "VariableDeclarator", + WhileStatement = "WhileStatement", + WithStatement = "WithStatement", + YieldExpression = "YieldExpression", + /** + * TS-prefixed nodes + */ + TSAbstractAccessorProperty = "TSAbstractAccessorProperty", + TSAbstractKeyword = "TSAbstractKeyword", + TSAbstractMethodDefinition = "TSAbstractMethodDefinition", + TSAbstractPropertyDefinition = "TSAbstractPropertyDefinition", + TSAnyKeyword = "TSAnyKeyword", + TSArrayType = "TSArrayType", + TSAsExpression = "TSAsExpression", + TSAsyncKeyword = "TSAsyncKeyword", + TSBigIntKeyword = "TSBigIntKeyword", + TSBooleanKeyword = "TSBooleanKeyword", + TSCallSignatureDeclaration = "TSCallSignatureDeclaration", + TSClassImplements = "TSClassImplements", + TSConditionalType = "TSConditionalType", + TSConstructorType = "TSConstructorType", + TSConstructSignatureDeclaration = "TSConstructSignatureDeclaration", + TSDeclareFunction = "TSDeclareFunction", + TSDeclareKeyword = "TSDeclareKeyword", + TSEmptyBodyFunctionExpression = "TSEmptyBodyFunctionExpression", + TSEnumDeclaration = "TSEnumDeclaration", + TSEnumMember = "TSEnumMember", + TSExportAssignment = "TSExportAssignment", + TSExportKeyword = "TSExportKeyword", + TSExternalModuleReference = "TSExternalModuleReference", + TSFunctionType = "TSFunctionType", + TSInstantiationExpression = "TSInstantiationExpression", + TSImportEqualsDeclaration = "TSImportEqualsDeclaration", + TSImportType = "TSImportType", + TSIndexedAccessType = "TSIndexedAccessType", + TSIndexSignature = "TSIndexSignature", + TSInferType = "TSInferType", + TSInterfaceBody = "TSInterfaceBody", + TSInterfaceDeclaration = "TSInterfaceDeclaration", + TSInterfaceHeritage = "TSInterfaceHeritage", + TSIntersectionType = "TSIntersectionType", + TSIntrinsicKeyword = "TSIntrinsicKeyword", + TSLiteralType = "TSLiteralType", + TSMappedType = "TSMappedType", + TSMethodSignature = "TSMethodSignature", + TSModuleBlock = "TSModuleBlock", + TSModuleDeclaration = "TSModuleDeclaration", + TSNamedTupleMember = "TSNamedTupleMember", + TSNamespaceExportDeclaration = "TSNamespaceExportDeclaration", + TSNeverKeyword = "TSNeverKeyword", + TSNonNullExpression = "TSNonNullExpression", + TSNullKeyword = "TSNullKeyword", + TSNumberKeyword = "TSNumberKeyword", + TSObjectKeyword = "TSObjectKeyword", + TSOptionalType = "TSOptionalType", + TSParameterProperty = "TSParameterProperty", + TSPrivateKeyword = "TSPrivateKeyword", + TSPropertySignature = "TSPropertySignature", + TSProtectedKeyword = "TSProtectedKeyword", + TSPublicKeyword = "TSPublicKeyword", + TSQualifiedName = "TSQualifiedName", + TSReadonlyKeyword = "TSReadonlyKeyword", + TSRestType = "TSRestType", + TSSatisfiesExpression = "TSSatisfiesExpression", + TSStaticKeyword = "TSStaticKeyword", + TSStringKeyword = "TSStringKeyword", + TSSymbolKeyword = "TSSymbolKeyword", + TSTemplateLiteralType = "TSTemplateLiteralType", + TSThisType = "TSThisType", + TSTupleType = "TSTupleType", + TSTypeAliasDeclaration = "TSTypeAliasDeclaration", + TSTypeAnnotation = "TSTypeAnnotation", + TSTypeAssertion = "TSTypeAssertion", + TSTypeLiteral = "TSTypeLiteral", + TSTypeOperator = "TSTypeOperator", + TSTypeParameter = "TSTypeParameter", + TSTypeParameterDeclaration = "TSTypeParameterDeclaration", + TSTypeParameterInstantiation = "TSTypeParameterInstantiation", + TSTypePredicate = "TSTypePredicate", + TSTypeQuery = "TSTypeQuery", + TSTypeReference = "TSTypeReference", + TSUndefinedKeyword = "TSUndefinedKeyword", + TSUnionType = "TSUnionType", + TSUnknownKeyword = "TSUnknownKeyword", + TSVoidKeyword = "TSVoidKeyword" +} +export declare enum AST_TOKEN_TYPES { + Boolean = "Boolean", + Identifier = "Identifier", + JSXIdentifier = "JSXIdentifier", + JSXText = "JSXText", + Keyword = "Keyword", + Null = "Null", + Numeric = "Numeric", + Punctuator = "Punctuator", + RegularExpression = "RegularExpression", + String = "String", + Template = "Template", + Block = "Block", + Line = "Line" +} +export declare interface AwaitExpression extends BaseNode { + type: AST_NODE_TYPES.AwaitExpression; + argument: Expression; +} +export declare interface BaseNode extends NodeOrTokenData { + type: AST_NODE_TYPES; +} +declare interface BaseToken extends NodeOrTokenData { + type: AST_TOKEN_TYPES; + value: string; +} +export declare interface BigIntLiteral extends LiteralBase { + value: bigint | null; + bigint: string; +} +export declare interface BinaryExpression extends BaseNode { + type: AST_NODE_TYPES.BinaryExpression; + operator: ValueOf; + left: Expression | PrivateIdentifier; + right: Expression; +} +export declare interface BinaryOperatorToText { + [SyntaxKind.InstanceOfKeyword]: 'instanceof'; + [SyntaxKind.InKeyword]: 'in'; + [SyntaxKind.AsteriskAsteriskToken]: '**'; + [SyntaxKind.AsteriskToken]: '*'; + [SyntaxKind.SlashToken]: '/'; + [SyntaxKind.PercentToken]: '%'; + [SyntaxKind.PlusToken]: '+'; + [SyntaxKind.MinusToken]: '-'; + [SyntaxKind.AmpersandToken]: '&'; + [SyntaxKind.BarToken]: '|'; + [SyntaxKind.CaretToken]: '^'; + [SyntaxKind.LessThanLessThanToken]: '<<'; + [SyntaxKind.GreaterThanGreaterThanToken]: '>>'; + [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>'; + [SyntaxKind.AmpersandAmpersandToken]: '&&'; + [SyntaxKind.BarBarToken]: '||'; + [SyntaxKind.LessThanToken]: '<'; + [SyntaxKind.LessThanEqualsToken]: '<='; + [SyntaxKind.GreaterThanToken]: '>'; + [SyntaxKind.GreaterThanEqualsToken]: '>='; + [SyntaxKind.EqualsEqualsToken]: '=='; + [SyntaxKind.EqualsEqualsEqualsToken]: '==='; + [SyntaxKind.ExclamationEqualsEqualsToken]: '!=='; + [SyntaxKind.ExclamationEqualsToken]: '!='; +} +export declare type BindingName = BindingPattern | Identifier; +export declare type BindingPattern = ArrayPattern | ObjectPattern; +export declare interface BlockComment extends BaseToken { + type: AST_TOKEN_TYPES.Block; +} +export declare interface BlockStatement extends BaseNode { + type: AST_NODE_TYPES.BlockStatement; + body: Statement[]; +} +export declare interface BooleanLiteral extends LiteralBase { + value: boolean; + raw: 'false' | 'true'; +} +export declare interface BooleanToken extends BaseToken { + type: AST_TOKEN_TYPES.Boolean; +} +export declare interface BreakStatement extends BaseNode { + type: AST_NODE_TYPES.BreakStatement; + label: Identifier | null; +} +export declare interface CallExpression extends BaseNode { + type: AST_NODE_TYPES.CallExpression; + callee: LeftHandSideExpression; + arguments: CallExpressionArgument[]; + typeArguments: TSTypeParameterInstantiation | undefined; + /** @deprecated Use {@link `typeArguments`} instead. */ + typeParameters: TSTypeParameterInstantiation | undefined; + optional: boolean; +} +export declare type CallExpressionArgument = Expression | SpreadElement; +export declare interface CatchClause extends BaseNode { + type: AST_NODE_TYPES.CatchClause; + param: BindingName | null; + body: BlockStatement; +} +export declare type ChainElement = CallExpression | MemberExpression | TSNonNullExpression; +export declare interface ChainExpression extends BaseNode { + type: AST_NODE_TYPES.ChainExpression; + expression: ChainElement; +} +declare interface ClassBase extends BaseNode { + /** + * Whether the class is an abstract class. + * ``` + * abstract class Foo {...} + * ``` + */ + abstract: boolean; + /** + * The class body. + */ + body: ClassBody; + /** + * Whether the class has been `declare`d: + * ``` + * declare class Foo {...} + * ``` + */ + declare: boolean; + /** + * The decorators declared for the class. + * ``` + * @deco + * class Foo {...} + * ``` + */ + decorators: Decorator[]; + /** + * The class's name. + * - For a `ClassExpression` this may be `null` if the name is omitted. + * - For a `ClassDeclaration` this may be `null` if and only if the parent is + * an `ExportDefaultDeclaration`. + */ + id: Identifier | null; + /** + * The implemented interfaces for the class. + */ + implements: TSClassImplements[]; + /** + * The super class this class extends. + */ + superClass: LeftHandSideExpression | null; + /** + * The generic type parameters passed to the superClass. + */ + superTypeArguments: TSTypeParameterInstantiation | undefined; + /** @deprecated Use {@link `superTypeArguments`} instead. */ + superTypeParameters: TSTypeParameterInstantiation | undefined; + /** + * The generic type parameters declared for the class. + */ + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface ClassBody extends BaseNode { + type: AST_NODE_TYPES.ClassBody; + body: ClassElement[]; +} +export declare type ClassDeclaration = ClassDeclarationWithName | ClassDeclarationWithOptionalName; +declare interface ClassDeclarationBase extends ClassBase { + type: AST_NODE_TYPES.ClassDeclaration; +} +export declare interface ClassDeclarationWithName extends ClassDeclarationBase { + id: Identifier; +} +export declare interface ClassDeclarationWithOptionalName extends ClassDeclarationBase { + id: Identifier | null; +} +export declare type ClassElement = AccessorProperty | MethodDefinition | PropertyDefinition | StaticBlock | TSAbstractAccessorProperty | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSIndexSignature; +export declare interface ClassExpression extends ClassBase { + type: AST_NODE_TYPES.ClassExpression; + abstract: false; + declare: false; + decorators: []; +} +declare interface ClassMethodDefinitionNonComputedNameBase extends MethodDefinitionBase { + key: ClassPropertyNameNonComputed; + computed: false; +} +declare interface ClassPropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase { + key: ClassPropertyNameNonComputed; + computed: false; +} +export declare type ClassPropertyNameNonComputed = PrivateIdentifier | PropertyNameNonComputed; +export declare type Comment = BlockComment | LineComment; +export declare interface ConditionalExpression extends BaseNode { + type: AST_NODE_TYPES.ConditionalExpression; + test: Expression; + consequent: Expression; + alternate: Expression; +} +export declare interface ContinueStatement extends BaseNode { + type: AST_NODE_TYPES.ContinueStatement; + label: Identifier | null; +} +export declare interface DebuggerStatement extends BaseNode { + type: AST_NODE_TYPES.DebuggerStatement; +} +export declare type DeclarationStatement = ClassDeclaration | ClassExpression | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | FunctionDeclaration | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration; +export declare interface Decorator extends BaseNode { + type: AST_NODE_TYPES.Decorator; + expression: LeftHandSideExpression; +} +export declare type DefaultExportDeclarations = ClassDeclarationWithOptionalName | Expression | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration; +export declare type DestructuringPattern = ArrayPattern | AssignmentPattern | Identifier | MemberExpression | ObjectPattern | RestElement; +export declare interface DoWhileStatement extends BaseNode { + type: AST_NODE_TYPES.DoWhileStatement; + test: Expression; + body: Statement; +} +export declare interface EmptyStatement extends BaseNode { + type: AST_NODE_TYPES.EmptyStatement; +} +export declare type EntityName = Identifier | ThisExpression | TSQualifiedName; +export declare interface ExportAllDeclaration extends BaseNode { + type: AST_NODE_TYPES.ExportAllDeclaration; + /** + * The assertions declared for the export. + * ``` + * export * from 'mod' assert { type: 'json' }; + * ``` + */ + assertions: ImportAttribute[]; + /** + * The name for the exported items. `null` if no name is assigned. + */ + exported: Identifier | null; + /** + * The kind of the export. + */ + exportKind: ExportKind; + /** + * The source module being exported from. + */ + source: StringLiteral; +} +declare type ExportAndImportKind = 'type' | 'value'; +export declare type ExportDeclaration = DefaultExportDeclarations | NamedExportDeclarations; +export declare interface ExportDefaultDeclaration extends BaseNode { + type: AST_NODE_TYPES.ExportDefaultDeclaration; + /** + * The declaration being exported. + */ + declaration: DefaultExportDeclarations; + /** + * The kind of the export. + */ + exportKind: ExportKind; +} +declare type ExportKind = ExportAndImportKind; +export declare type ExportNamedDeclaration = ExportNamedDeclarationWithoutSourceWithMultiple | ExportNamedDeclarationWithoutSourceWithSingle | ExportNamedDeclarationWithSource; +declare interface ExportNamedDeclarationBase extends BaseNode { + type: AST_NODE_TYPES.ExportNamedDeclaration; + /** + * The assertions declared for the export. + * ``` + * export { foo } from 'mod' assert { type: 'json' }; + * ``` + * This will be an empty array if `source` is `null` + */ + assertions: ImportAttribute[]; + /** + * The exported declaration. + * ``` + * export const x = 1; + * ``` + * This will be `null` if `source` is not `null`, or if there are `specifiers` + */ + declaration: NamedExportDeclarations | null; + /** + * The kind of the export. + */ + exportKind: ExportKind; + /** + * The source module being exported from. + */ + source: StringLiteral | null; + /** + * The specifiers being exported. + * ``` + * export { a, b }; + * ``` + * This will be an empty array if `declaration` is not `null` + */ + specifiers: ExportSpecifier[]; +} +export declare interface ExportNamedDeclarationWithoutSourceWithMultiple extends ExportNamedDeclarationBase { + assertions: ImportAttribute[]; + declaration: null; + source: null; + specifiers: ExportSpecifier[]; +} +export declare interface ExportNamedDeclarationWithoutSourceWithSingle extends ExportNamedDeclarationBase { + assertions: ImportAttribute[]; + declaration: NamedExportDeclarations; + source: null; + specifiers: ExportSpecifier[]; +} +export declare interface ExportNamedDeclarationWithSource extends ExportNamedDeclarationBase { + assertions: ImportAttribute[]; + declaration: null; + source: StringLiteral; + specifiers: ExportSpecifier[]; +} +export declare interface ExportSpecifier extends BaseNode { + type: AST_NODE_TYPES.ExportSpecifier; + local: Identifier; + exported: Identifier; + exportKind: ExportKind; +} +export declare type Expression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | ImportExpression | JSXElement | JSXFragment | LiteralExpression | LogicalExpression | MemberExpression | MetaProperty | NewExpression | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | TemplateLiteral | ThisExpression | TSAsExpression | TSInstantiationExpression | TSNonNullExpression | TSSatisfiesExpression | TSTypeAssertion | UnaryExpression | UpdateExpression | YieldExpression; +export declare interface ExpressionStatement extends BaseNode { + type: AST_NODE_TYPES.ExpressionStatement; + expression: Expression; + directive: string | undefined; +} +export declare type ForInitialiser = Expression | LetOrConstOrVarDeclaration; +export declare interface ForInStatement extends BaseNode { + type: AST_NODE_TYPES.ForInStatement; + left: ForInitialiser; + right: Expression; + body: Statement; +} +declare type ForOfInitialiser = Expression | LetOrConstOrVarDeclaration | UsingInForOfDeclaration; +export declare interface ForOfStatement extends BaseNode { + type: AST_NODE_TYPES.ForOfStatement; + left: ForOfInitialiser; + right: Expression; + body: Statement; + await: boolean; +} +export declare interface ForStatement extends BaseNode { + type: AST_NODE_TYPES.ForStatement; + init: Expression | ForInitialiser | null; + test: Expression | null; + update: Expression | null; + body: Statement; +} +declare interface FunctionBase extends BaseNode { + /** + * Whether the function is async: + * ``` + * async function foo(...) {...} + * const x = async function (...) {...} + * const x = async (...) => {...} + * ``` + */ + async: boolean; + /** + * The body of the function. + * - For an `ArrowFunctionExpression` this may be an `Expression` or `BlockStatement`. + * - For a `FunctionDeclaration` or `FunctionExpression` this is always a `BlockStatement. + * - For a `TSDeclareFunction` this is always `undefined`. + * - For a `TSEmptyBodyFunctionExpression` this is always `null`. + */ + body: BlockStatement | Expression | null | undefined; + /** + * This is only `true` if and only if the node is a `TSDeclareFunction` and it has `declare`: + * ``` + * declare function foo(...) {...} + * ``` + */ + declare: boolean; + /** + * This is only ever `true` if and only the node is an `ArrowFunctionExpression` and the body + * is an expression: + * ``` + * (() => 1) + * ``` + */ + expression: boolean; + /** + * Whether the function is a generator function: + * ``` + * function *foo(...) {...} + * const x = function *(...) {...} + * ``` + * This is always `false` for arrow functions as they cannot be generators. + */ + generator: boolean; + /** + * The function's name. + * - For an `ArrowFunctionExpression` this is always `null`. + * - For a `FunctionExpression` this may be `null` if the name is omitted. + * - For a `FunctionDeclaration` or `TSDeclareFunction` this may be `null` if + * and only if the parent is an `ExportDefaultDeclaration`. + */ + id: Identifier | null; + /** + * The list of parameters declared for the function. + */ + params: Parameter[]; + /** + * The return type annotation for the function. + */ + returnType: TSTypeAnnotation | undefined; + /** + * The generic type parameter declaration for the function. + */ + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare type FunctionDeclaration = FunctionDeclarationWithName | FunctionDeclarationWithOptionalName; +declare interface FunctionDeclarationBase extends FunctionBase { + type: AST_NODE_TYPES.FunctionDeclaration; + body: BlockStatement; + declare: false; + expression: false; +} +export declare interface FunctionDeclarationWithName extends FunctionDeclarationBase { + id: Identifier; +} +export declare interface FunctionDeclarationWithOptionalName extends FunctionDeclarationBase { + id: Identifier | null; +} +export declare interface FunctionExpression extends FunctionBase { + type: AST_NODE_TYPES.FunctionExpression; + body: BlockStatement; + expression: false; +} +export declare type FunctionLike = ArrowFunctionExpression | FunctionDeclaration | FunctionExpression | TSDeclareFunction | TSEmptyBodyFunctionExpression; +export declare interface Identifier extends BaseNode { + type: AST_NODE_TYPES.Identifier; + name: string; + typeAnnotation: TSTypeAnnotation | undefined; + optional: boolean; + decorators: Decorator[]; +} +export declare interface IdentifierToken extends BaseToken { + type: AST_TOKEN_TYPES.Identifier; +} +export declare interface IfStatement extends BaseNode { + type: AST_NODE_TYPES.IfStatement; + test: Expression; + consequent: Statement; + alternate: Statement | null; +} +export declare interface ImportAttribute extends BaseNode { + type: AST_NODE_TYPES.ImportAttribute; + key: Identifier | Literal; + value: Literal; +} +export declare type ImportClause = ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier; +export declare interface ImportDeclaration extends BaseNode { + type: AST_NODE_TYPES.ImportDeclaration; + /** + * The assertions declared for the export. + * ``` + * import * from 'mod' assert { type: 'json' }; + * ``` + */ + assertions: ImportAttribute[]; + /** + * The kind of the import. + */ + importKind: ImportKind; + /** + * The source module being imported from. + */ + source: StringLiteral; + /** + * The specifiers being imported. + * If this is an empty array then either there are no specifiers: + * ``` + * import {} from 'mod'; + * ``` + * Or it is a side-effect import: + * ``` + * import 'mod'; + * ``` + */ + specifiers: ImportClause[]; +} +export declare interface ImportDefaultSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportDefaultSpecifier; + local: Identifier; +} +export declare interface ImportExpression extends BaseNode { + type: AST_NODE_TYPES.ImportExpression; + source: Expression; + attributes: Expression | null; +} +declare type ImportKind = ExportAndImportKind; +export declare interface ImportNamespaceSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportNamespaceSpecifier; + local: Identifier; +} +export declare interface ImportSpecifier extends BaseNode { + type: AST_NODE_TYPES.ImportSpecifier; + local: Identifier; + imported: Identifier; + importKind: ImportKind; +} +export declare type IterationStatement = DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | WhileStatement; +export declare interface JSXAttribute extends BaseNode { + type: AST_NODE_TYPES.JSXAttribute; + name: JSXIdentifier | JSXNamespacedName; + value: JSXExpression | Literal | null; +} +export declare type JSXChild = JSXElement | JSXExpression | JSXFragment | JSXText; +export declare interface JSXClosingElement extends BaseNode { + type: AST_NODE_TYPES.JSXClosingElement; + name: JSXTagNameExpression; +} +export declare interface JSXClosingFragment extends BaseNode { + type: AST_NODE_TYPES.JSXClosingFragment; +} +export declare interface JSXElement extends BaseNode { + type: AST_NODE_TYPES.JSXElement; + openingElement: JSXOpeningElement; + closingElement: JSXClosingElement | null; + children: JSXChild[]; +} +export declare interface JSXEmptyExpression extends BaseNode { + type: AST_NODE_TYPES.JSXEmptyExpression; +} +export declare type JSXExpression = JSXExpressionContainer | JSXSpreadChild; +export declare interface JSXExpressionContainer extends BaseNode { + type: AST_NODE_TYPES.JSXExpressionContainer; + expression: Expression | JSXEmptyExpression; +} +export declare interface JSXFragment extends BaseNode { + type: AST_NODE_TYPES.JSXFragment; + openingFragment: JSXOpeningFragment; + closingFragment: JSXClosingFragment; + children: JSXChild[]; +} +export declare interface JSXIdentifier extends BaseNode { + type: AST_NODE_TYPES.JSXIdentifier; + name: string; +} +export declare interface JSXIdentifierToken extends BaseToken { + type: AST_TOKEN_TYPES.JSXIdentifier; +} +export declare interface JSXMemberExpression extends BaseNode { + type: AST_NODE_TYPES.JSXMemberExpression; + object: JSXTagNameExpression; + property: JSXIdentifier; +} +export declare interface JSXNamespacedName extends BaseNode { + type: AST_NODE_TYPES.JSXNamespacedName; + namespace: JSXIdentifier; + name: JSXIdentifier; +} +export declare interface JSXOpeningElement extends BaseNode { + type: AST_NODE_TYPES.JSXOpeningElement; + typeArguments: TSTypeParameterInstantiation | undefined; + /** @deprecated Use {@link `typeArguments`} instead. */ + typeParameters: TSTypeParameterInstantiation | undefined; + selfClosing: boolean; + name: JSXTagNameExpression; + attributes: (JSXAttribute | JSXSpreadAttribute)[]; +} +export declare interface JSXOpeningFragment extends BaseNode { + type: AST_NODE_TYPES.JSXOpeningFragment; +} +export declare interface JSXSpreadAttribute extends BaseNode { + type: AST_NODE_TYPES.JSXSpreadAttribute; + argument: Expression; +} +export declare interface JSXSpreadChild extends BaseNode { + type: AST_NODE_TYPES.JSXSpreadChild; + expression: Expression | JSXEmptyExpression; +} +export declare type JSXTagNameExpression = JSXIdentifier | JSXMemberExpression | JSXNamespacedName; +export declare interface JSXText extends BaseNode { + type: AST_NODE_TYPES.JSXText; + value: string; + raw: string; +} +export declare interface JSXTextToken extends BaseToken { + type: AST_TOKEN_TYPES.JSXText; +} +export declare interface KeywordToken extends BaseToken { + type: AST_TOKEN_TYPES.Keyword; +} +export declare interface LabeledStatement extends BaseNode { + type: AST_NODE_TYPES.LabeledStatement; + label: Identifier; + body: Statement; +} +export declare type LeftHandSideExpression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | CallExpression | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | LiteralExpression | MemberExpression | MetaProperty | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | ThisExpression | TSAsExpression | TSNonNullExpression | TSTypeAssertion; +export declare interface LetOrConstOrVarDeclaration extends BaseNode { + type: AST_NODE_TYPES.VariableDeclaration; + /** + * The variables declared by this declaration. + * Note that there may be 0 declarations (i.e. `const;`). + * ``` + * let x; + * let y, z; + * ``` + */ + declarations: LetOrConstOrVarDeclarator[]; + /** + * Whether the declaration is `declare`d + * ``` + * declare const x = 1; + * ``` + */ + declare: boolean; + /** + * The keyword used to declare the variable(s) + * ``` + * const x = 1; + * let y = 2; + * var z = 3; + * ``` + */ + kind: 'const' | 'let' | 'var'; +} +export declare interface LetOrConstOrVarDeclarator extends BaseNode { + type: AST_NODE_TYPES.VariableDeclarator; + id: BindingName; + init: Expression | null; + definite: boolean; +} +export declare interface LineComment extends BaseToken { + type: AST_TOKEN_TYPES.Line; +} +export declare type Literal = BigIntLiteral | BooleanLiteral | NullLiteral | NumberLiteral | RegExpLiteral | StringLiteral; +declare interface LiteralBase extends BaseNode { + type: AST_NODE_TYPES.Literal; + raw: string; + value: RegExp | bigint | boolean | number | string | null; +} +export declare type LiteralExpression = Literal | TemplateLiteral; +export declare interface LogicalExpression extends BaseNode { + type: AST_NODE_TYPES.LogicalExpression; + operator: '??' | '&&' | '||'; + left: Expression; + right: Expression; +} +export declare type MemberExpression = MemberExpressionComputedName | MemberExpressionNonComputedName; +declare interface MemberExpressionBase extends BaseNode { + object: Expression; + property: Expression | Identifier | PrivateIdentifier; + computed: boolean; + optional: boolean; +} +export declare interface MemberExpressionComputedName extends MemberExpressionBase { + type: AST_NODE_TYPES.MemberExpression; + property: Expression; + computed: true; +} +export declare interface MemberExpressionNonComputedName extends MemberExpressionBase { + type: AST_NODE_TYPES.MemberExpression; + property: Identifier | PrivateIdentifier; + computed: false; +} +export declare interface MetaProperty extends BaseNode { + type: AST_NODE_TYPES.MetaProperty; + meta: Identifier; + property: Identifier; +} +export declare type MethodDefinition = MethodDefinitionComputedName | MethodDefinitionNonComputedName; +/** this should not be directly used - instead use MethodDefinitionComputedNameBase or MethodDefinitionNonComputedNameBase */ +declare interface MethodDefinitionBase extends BaseNode { + key: PropertyName; + value: FunctionExpression | TSEmptyBodyFunctionExpression; + computed: boolean; + static: boolean; + kind: 'constructor' | 'get' | 'method' | 'set'; + optional: boolean; + decorators: Decorator[]; + accessibility: Accessibility | undefined; + override: boolean; +} +export declare interface MethodDefinitionComputedName extends MethodDefinitionComputedNameBase { + type: AST_NODE_TYPES.MethodDefinition; +} +declare interface MethodDefinitionComputedNameBase extends MethodDefinitionBase { + key: PropertyNameComputed; + computed: true; +} +export declare interface MethodDefinitionNonComputedName extends ClassMethodDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.MethodDefinition; +} +declare interface MethodDefinitionNonComputedNameBase extends MethodDefinitionBase { + key: PropertyNameNonComputed; + computed: false; +} +export declare type NamedExportDeclarations = ClassDeclarationWithName | ClassDeclarationWithOptionalName | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration; +export declare interface NewExpression extends BaseNode { + type: AST_NODE_TYPES.NewExpression; + callee: LeftHandSideExpression; + arguments: CallExpressionArgument[]; + typeArguments: TSTypeParameterInstantiation | undefined; + /** @deprecated Use {@link `typeArguments`} instead. */ + typeParameters: TSTypeParameterInstantiation | undefined; +} +export declare type Node = AccessorProperty | ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BlockStatement | BreakStatement | CallExpression | CatchClause | ChainExpression | ClassBody | ClassDeclaration | ClassExpression | ConditionalExpression | ContinueStatement | DebuggerStatement | Decorator | DoWhileStatement | EmptyStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportExpression | ImportNamespaceSpecifier | ImportSpecifier | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LabeledStatement | Literal | LogicalExpression | MemberExpression | MetaProperty | MethodDefinition | NewExpression | ObjectExpression | ObjectPattern | PrivateIdentifier | Program | Property | PropertyDefinition | RestElement | ReturnStatement | SequenceExpression | SpreadElement | StaticBlock | Super | SwitchCase | SwitchStatement | TaggedTemplateExpression | TemplateElement | TemplateLiteral | ThisExpression | ThrowStatement | TryStatement | TSAbstractAccessorProperty | TSAbstractKeyword | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSAnyKeyword | TSArrayType | TSAsExpression | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSClassImplements | TSConditionalType | TSConstructorType | TSConstructSignatureDeclaration | TSDeclareFunction | TSDeclareKeyword | TSEmptyBodyFunctionExpression | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExportKeyword | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexedAccessType | TSIndexSignature | TSInferType | TSInstantiationExpression | TSInterfaceBody | TSInterfaceDeclaration | TSInterfaceHeritage | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSPrivateKeyword | TSPropertySignature | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSSatisfiesExpression | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; +export declare interface NodeOrTokenData { + /** + * The source location information of the node. + * + * The loc property is defined as nullable by ESTree, but ESLint requires this property. + * + * @see {SourceLocation} + */ + loc: SourceLocation; + /** + * @see {Range} + */ + range: Range; + type: string; +} +export declare interface NullLiteral extends LiteralBase { + value: null; + raw: 'null'; +} +export declare interface NullToken extends BaseToken { + type: AST_TOKEN_TYPES.Null; +} +export declare interface NumberLiteral extends LiteralBase { + value: number; +} +export declare interface NumericToken extends BaseToken { + type: AST_TOKEN_TYPES.Numeric; +} +export declare interface ObjectExpression extends BaseNode { + type: AST_NODE_TYPES.ObjectExpression; + properties: ObjectLiteralElement[]; +} +export declare type ObjectLiteralElement = Property | SpreadElement; +export declare type ObjectLiteralElementLike = ObjectLiteralElement; +export declare interface ObjectPattern extends BaseNode { + type: AST_NODE_TYPES.ObjectPattern; + properties: (Property | RestElement)[]; + typeAnnotation: TSTypeAnnotation | undefined; + optional: boolean; + decorators: Decorator[]; +} +export declare type OptionalRangeAndLoc = Pick> & { + range?: Range; + loc?: SourceLocation; +}; +export declare type Parameter = ArrayPattern | AssignmentPattern | Identifier | ObjectPattern | RestElement | TSParameterProperty; +export declare interface Position { + /** + * Line number (1-indexed) + */ + line: number; + /** + * Column number on the line (0-indexed) + */ + column: number; +} +export declare type PrimaryExpression = ArrayExpression | ArrayPattern | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | JSXOpeningElement | LiteralExpression | MetaProperty | ObjectExpression | ObjectPattern | Super | TemplateLiteral | ThisExpression | TSNullKeyword; +export declare interface PrivateIdentifier extends BaseNode { + type: AST_NODE_TYPES.PrivateIdentifier; + name: string; +} +export declare interface Program extends NodeOrTokenData { + type: AST_NODE_TYPES.Program; + body: ProgramStatement[]; + sourceType: 'module' | 'script'; + comments: Comment[] | undefined; + tokens: Token[] | undefined; +} +export declare type ProgramStatement = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | Statement | TSImportEqualsDeclaration | TSNamespaceExportDeclaration; +export declare type Property = PropertyComputedName | PropertyNonComputedName; +declare interface PropertyBase extends BaseNode { + type: AST_NODE_TYPES.Property; + key: PropertyName; + value: AssignmentPattern | BindingName | Expression | TSEmptyBodyFunctionExpression; + computed: boolean; + method: boolean; + shorthand: boolean; + optional: boolean; + kind: 'get' | 'init' | 'set'; +} +export declare interface PropertyComputedName extends PropertyBase { + key: PropertyNameComputed; + computed: true; +} +export declare type PropertyDefinition = PropertyDefinitionComputedName | PropertyDefinitionNonComputedName; +declare interface PropertyDefinitionBase extends BaseNode { + key: PropertyName; + value: Expression | null; + computed: boolean; + static: boolean; + declare: boolean; + readonly: boolean; + decorators: Decorator[]; + accessibility: Accessibility | undefined; + optional: boolean; + definite: boolean; + typeAnnotation: TSTypeAnnotation | undefined; + override: boolean; +} +export declare interface PropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.PropertyDefinition; +} +declare interface PropertyDefinitionComputedNameBase extends PropertyDefinitionBase { + key: PropertyNameComputed; + computed: true; +} +export declare interface PropertyDefinitionNonComputedName extends ClassPropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.PropertyDefinition; +} +declare interface PropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase { + key: PropertyNameNonComputed; + computed: false; +} +export declare type PropertyName = ClassPropertyNameNonComputed | PropertyNameComputed | PropertyNameNonComputed; +export declare type PropertyNameComputed = Expression; +export declare type PropertyNameNonComputed = Identifier | NumberLiteral | StringLiteral; +export declare interface PropertyNonComputedName extends PropertyBase { + key: PropertyNameNonComputed; + computed: false; +} +export declare interface PunctuatorToken extends BaseToken { + type: AST_TOKEN_TYPES.Punctuator; + value: ValueOf; +} +export declare interface PunctuatorTokenToText extends AssignmentOperatorToText { + [SyntaxKind.OpenBraceToken]: '{'; + [SyntaxKind.CloseBraceToken]: '}'; + [SyntaxKind.OpenParenToken]: '('; + [SyntaxKind.CloseParenToken]: ')'; + [SyntaxKind.OpenBracketToken]: '['; + [SyntaxKind.CloseBracketToken]: ']'; + [SyntaxKind.DotToken]: '.'; + [SyntaxKind.DotDotDotToken]: '...'; + [SyntaxKind.SemicolonToken]: ';'; + [SyntaxKind.CommaToken]: ','; + [SyntaxKind.QuestionDotToken]: '?.'; + [SyntaxKind.LessThanToken]: '<'; + [SyntaxKind.LessThanSlashToken]: ''; + [SyntaxKind.LessThanEqualsToken]: '<='; + [SyntaxKind.GreaterThanEqualsToken]: '>='; + [SyntaxKind.EqualsEqualsToken]: '=='; + [SyntaxKind.ExclamationEqualsToken]: '!='; + [SyntaxKind.EqualsEqualsEqualsToken]: '==='; + [SyntaxKind.ExclamationEqualsEqualsToken]: '!=='; + [SyntaxKind.EqualsGreaterThanToken]: '=>'; + [SyntaxKind.PlusToken]: '+'; + [SyntaxKind.MinusToken]: '-'; + [SyntaxKind.AsteriskToken]: '*'; + [SyntaxKind.AsteriskAsteriskToken]: '**'; + [SyntaxKind.SlashToken]: '/'; + [SyntaxKind.PercentToken]: '%'; + [SyntaxKind.PlusPlusToken]: '++'; + [SyntaxKind.MinusMinusToken]: '--'; + [SyntaxKind.LessThanLessThanToken]: '<<'; + [SyntaxKind.GreaterThanGreaterThanToken]: '>>'; + [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>'; + [SyntaxKind.AmpersandToken]: '&'; + [SyntaxKind.BarToken]: '|'; + [SyntaxKind.CaretToken]: '^'; + [SyntaxKind.ExclamationToken]: '!'; + [SyntaxKind.TildeToken]: '~'; + [SyntaxKind.AmpersandAmpersandToken]: '&&'; + [SyntaxKind.BarBarToken]: '||'; + [SyntaxKind.QuestionToken]: '?'; + [SyntaxKind.ColonToken]: ':'; + [SyntaxKind.AtToken]: '@'; + [SyntaxKind.QuestionQuestionToken]: '??'; + [SyntaxKind.BacktickToken]: '`'; + [SyntaxKind.HashToken]: '#'; +} +/** + * An array of two numbers. + * Both numbers are a 0-based index which is the position in the array of source code characters. + * The first is the start position of the node, the second is the end position of the node. + */ +export declare type Range = [number, number]; +export declare interface RegExpLiteral extends LiteralBase { + value: RegExp | null; + regex: { + pattern: string; + flags: string; + }; +} +export declare interface RegularExpressionToken extends BaseToken { + type: AST_TOKEN_TYPES.RegularExpression; + regex: { + pattern: string; + flags: string; + }; +} +export declare interface RestElement extends BaseNode { + type: AST_NODE_TYPES.RestElement; + argument: DestructuringPattern; + typeAnnotation: TSTypeAnnotation | undefined; + optional: boolean; + value: AssignmentPattern | undefined; + decorators: Decorator[]; +} +export declare interface ReturnStatement extends BaseNode { + type: AST_NODE_TYPES.ReturnStatement; + argument: Expression | null; +} +export declare interface SequenceExpression extends BaseNode { + type: AST_NODE_TYPES.SequenceExpression; + expressions: Expression[]; +} +export declare interface SourceLocation { + /** + * The position of the first character of the parsed source region + */ + start: Position; + /** + * The position of the first character after the parsed source region + */ + end: Position; +} +export declare interface SpreadElement extends BaseNode { + type: AST_NODE_TYPES.SpreadElement; + argument: Expression; +} +export declare type Statement = BlockStatement | BreakStatement | ClassDeclarationWithName | ContinueStatement | DebuggerStatement | DoWhileStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclarationWithName | IfStatement | ImportDeclaration | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | TSDeclareFunction | TSEnumDeclaration | TSExportAssignment | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration | VariableDeclaration | WhileStatement | WithStatement; +export declare interface StaticBlock extends BaseNode { + type: AST_NODE_TYPES.StaticBlock; + body: Statement[]; +} +export declare interface StringLiteral extends LiteralBase { + value: string; +} +export declare interface StringToken extends BaseToken { + type: AST_TOKEN_TYPES.String; +} +export declare interface Super extends BaseNode { + type: AST_NODE_TYPES.Super; +} +export declare interface SwitchCase extends BaseNode { + type: AST_NODE_TYPES.SwitchCase; + test: Expression | null; + consequent: Statement[]; +} +export declare interface SwitchStatement extends BaseNode { + type: AST_NODE_TYPES.SwitchStatement; + discriminant: Expression; + cases: SwitchCase[]; +} +export declare interface TaggedTemplateExpression extends BaseNode { + type: AST_NODE_TYPES.TaggedTemplateExpression; + typeArguments: TSTypeParameterInstantiation | undefined; + /** @deprecated Use {@link `typeArguments`} instead. */ + typeParameters: TSTypeParameterInstantiation | undefined; + tag: LeftHandSideExpression; + quasi: TemplateLiteral; +} +export declare interface TemplateElement extends BaseNode { + type: AST_NODE_TYPES.TemplateElement; + value: { + raw: string; + cooked: string; + }; + tail: boolean; +} +export declare interface TemplateLiteral extends BaseNode { + type: AST_NODE_TYPES.TemplateLiteral; + quasis: TemplateElement[]; + expressions: Expression[]; +} +export declare interface TemplateToken extends BaseToken { + type: AST_TOKEN_TYPES.Template; +} +export declare interface ThisExpression extends BaseNode { + type: AST_NODE_TYPES.ThisExpression; +} +export declare interface ThrowStatement extends BaseNode { + type: AST_NODE_TYPES.ThrowStatement; + argument: Statement | TSAsExpression | null; +} +export declare type Token = BooleanToken | Comment | IdentifierToken | JSXIdentifierToken | JSXTextToken | KeywordToken | NullToken | NumericToken | PunctuatorToken | RegularExpressionToken | StringToken | TemplateToken; +export declare interface TryStatement extends BaseNode { + type: AST_NODE_TYPES.TryStatement; + block: BlockStatement; + handler: CatchClause | null; + finalizer: BlockStatement | null; +} +export declare type TSAbstractAccessorProperty = TSAbstractAccessorPropertyComputedName | TSAbstractAccessorPropertyNonComputedName; +export declare interface TSAbstractAccessorPropertyComputedName extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.TSAbstractAccessorProperty; + value: null; +} +export declare interface TSAbstractAccessorPropertyNonComputedName extends PropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.TSAbstractAccessorProperty; + value: null; +} +export declare interface TSAbstractKeyword extends BaseNode { + type: AST_NODE_TYPES.TSAbstractKeyword; +} +export declare type TSAbstractMethodDefinition = TSAbstractMethodDefinitionComputedName | TSAbstractMethodDefinitionNonComputedName; +export declare interface TSAbstractMethodDefinitionComputedName extends MethodDefinitionComputedNameBase { + type: AST_NODE_TYPES.TSAbstractMethodDefinition; +} +export declare interface TSAbstractMethodDefinitionNonComputedName extends MethodDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.TSAbstractMethodDefinition; +} +export declare type TSAbstractPropertyDefinition = TSAbstractPropertyDefinitionComputedName | TSAbstractPropertyDefinitionNonComputedName; +export declare interface TSAbstractPropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase { + type: AST_NODE_TYPES.TSAbstractPropertyDefinition; + value: null; +} +export declare interface TSAbstractPropertyDefinitionNonComputedName extends PropertyDefinitionNonComputedNameBase { + type: AST_NODE_TYPES.TSAbstractPropertyDefinition; + value: null; +} +export declare interface TSAnyKeyword extends BaseNode { + type: AST_NODE_TYPES.TSAnyKeyword; +} +export declare interface TSArrayType extends BaseNode { + type: AST_NODE_TYPES.TSArrayType; + elementType: TypeNode; +} +export declare interface TSAsExpression extends BaseNode { + type: AST_NODE_TYPES.TSAsExpression; + expression: Expression; + typeAnnotation: TypeNode; +} +export declare interface TSAsyncKeyword extends BaseNode { + type: AST_NODE_TYPES.TSAsyncKeyword; +} +export declare interface TSBigIntKeyword extends BaseNode { + type: AST_NODE_TYPES.TSBigIntKeyword; +} +export declare interface TSBooleanKeyword extends BaseNode { + type: AST_NODE_TYPES.TSBooleanKeyword; +} +export declare interface TSCallSignatureDeclaration extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSCallSignatureDeclaration; +} +export declare interface TSClassImplements extends TSHeritageBase { + type: AST_NODE_TYPES.TSClassImplements; +} +export declare interface TSConditionalType extends BaseNode { + type: AST_NODE_TYPES.TSConditionalType; + checkType: TypeNode; + extendsType: TypeNode; + trueType: TypeNode; + falseType: TypeNode; +} +export declare interface TSConstructorType extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSConstructorType; + abstract: boolean; +} +export declare interface TSConstructSignatureDeclaration extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSConstructSignatureDeclaration; +} +export declare interface TSDeclareFunction extends FunctionBase { + type: AST_NODE_TYPES.TSDeclareFunction; + body: BlockStatement | undefined; + declare: boolean; + expression: false; +} +export declare interface TSDeclareKeyword extends BaseNode { + type: AST_NODE_TYPES.TSDeclareKeyword; +} +export declare interface TSEmptyBodyFunctionExpression extends FunctionBase { + type: AST_NODE_TYPES.TSEmptyBodyFunctionExpression; + body: null; + id: null; +} +export declare interface TSEnumDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSEnumDeclaration; + /** + * Whether this is a `const` enum. + * ``` + * const enum Foo {...} + * ``` + */ + const: boolean; + /** + * Whether this is a `declare`d enum. + * ``` + * declare enum Foo {...} + * ``` + */ + declare: boolean; + /** + * The enum name. + */ + id: Identifier; + /** + * The enum members. + */ + members: TSEnumMember[]; +} +export declare type TSEnumMember = TSEnumMemberComputedName | TSEnumMemberNonComputedName; +declare interface TSEnumMemberBase extends BaseNode { + type: AST_NODE_TYPES.TSEnumMember; + id: PropertyNameComputed | PropertyNameNonComputed; + initializer: Expression | undefined; + computed: boolean; +} +/** + * this should only really happen in semantically invalid code (errors 1164 and 2452) + * + * VALID: + * enum Foo { ['a'] } + * + * INVALID: + * const x = 'a'; + * enum Foo { [x] } + * enum Bar { ['a' + 'b'] } + */ +export declare interface TSEnumMemberComputedName extends TSEnumMemberBase { + id: PropertyNameComputed; + computed: true; +} +export declare interface TSEnumMemberNonComputedName extends TSEnumMemberBase { + id: PropertyNameNonComputed; + computed: false; +} +export declare interface TSExportAssignment extends BaseNode { + type: AST_NODE_TYPES.TSExportAssignment; + expression: Expression; +} +export declare interface TSExportKeyword extends BaseNode { + type: AST_NODE_TYPES.TSExportKeyword; +} +export declare interface TSExternalModuleReference extends BaseNode { + type: AST_NODE_TYPES.TSExternalModuleReference; + expression: Expression; +} +declare interface TSFunctionSignatureBase extends BaseNode { + params: Parameter[]; + returnType: TSTypeAnnotation | undefined; + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface TSFunctionType extends TSFunctionSignatureBase { + type: AST_NODE_TYPES.TSFunctionType; +} +declare interface TSHeritageBase extends BaseNode { + expression: Expression; + typeArguments: TSTypeParameterInstantiation | undefined; + /** @deprecated Use {@link `typeArguments`} instead. */ + typeParameters: TSTypeParameterInstantiation | undefined; +} +export declare interface TSImportEqualsDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSImportEqualsDeclaration; + /** + * The locally imported name + */ + id: Identifier; + /** + * The value being aliased. + * ``` + * import F1 = A; + * import F2 = A.B.C; + * import F3 = require('mod'); + * ``` + */ + moduleReference: EntityName | TSExternalModuleReference; + importKind: ImportKind; +} +export declare interface TSImportType extends BaseNode { + type: AST_NODE_TYPES.TSImportType; + argument: TypeNode; + qualifier: EntityName | null; + typeArguments: TSTypeParameterInstantiation | null; + /** @deprecated Use {@link `typeArguments`} instead. */ + typeParameters: TSTypeParameterInstantiation | null; +} +export declare interface TSIndexedAccessType extends BaseNode { + type: AST_NODE_TYPES.TSIndexedAccessType; + objectType: TypeNode; + indexType: TypeNode; +} +export declare interface TSIndexSignature extends BaseNode { + type: AST_NODE_TYPES.TSIndexSignature; + parameters: Parameter[]; + typeAnnotation: TSTypeAnnotation | undefined; + readonly: boolean; + accessibility: Accessibility | undefined; + static: boolean; +} +export declare interface TSInferType extends BaseNode { + type: AST_NODE_TYPES.TSInferType; + typeParameter: TSTypeParameter; +} +export declare interface TSInstantiationExpression extends BaseNode { + type: AST_NODE_TYPES.TSInstantiationExpression; + expression: Expression; + typeArguments: TSTypeParameterInstantiation; + /** @deprecated Use {@link `typeArguments`} instead. */ + typeParameters?: TSTypeParameterInstantiation; +} +export declare interface TSInterfaceBody extends BaseNode { + type: AST_NODE_TYPES.TSInterfaceBody; + body: TypeElement[]; +} +export declare interface TSInterfaceDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSInterfaceDeclaration; + /** + * The body of the interface + */ + body: TSInterfaceBody; + /** + * Whether the interface was `declare`d, `undefined` otherwise + */ + declare: boolean; + /** + * The types this interface `extends` + */ + extends: TSInterfaceHeritage[]; + /** + * The name of this interface + */ + id: Identifier; + /** + * The generic type parameters declared for the interface. + */ + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface TSInterfaceHeritage extends TSHeritageBase { + type: AST_NODE_TYPES.TSInterfaceHeritage; +} +export declare interface TSIntersectionType extends BaseNode { + type: AST_NODE_TYPES.TSIntersectionType; + types: TypeNode[]; +} +export declare interface TSIntrinsicKeyword extends BaseNode { + type: AST_NODE_TYPES.TSIntrinsicKeyword; +} +export declare interface TSLiteralType extends BaseNode { + type: AST_NODE_TYPES.TSLiteralType; + literal: LiteralExpression | UnaryExpression | UpdateExpression; +} +export declare interface TSMappedType extends BaseNode { + type: AST_NODE_TYPES.TSMappedType; + typeParameter: TSTypeParameter; + readonly: boolean | '-' | '+' | undefined; + optional: boolean | '-' | '+' | undefined; + typeAnnotation: TypeNode | undefined; + nameType: TypeNode | null; +} +export declare type TSMethodSignature = TSMethodSignatureComputedName | TSMethodSignatureNonComputedName; +declare interface TSMethodSignatureBase extends BaseNode { + type: AST_NODE_TYPES.TSMethodSignature; + accessibility: Accessibility | undefined; + computed: boolean; + key: PropertyName; + kind: 'get' | 'method' | 'set'; + optional: boolean; + params: Parameter[]; + readonly: boolean; + returnType: TSTypeAnnotation | undefined; + static: boolean; + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface TSMethodSignatureComputedName extends TSMethodSignatureBase { + key: PropertyNameComputed; + computed: true; +} +export declare interface TSMethodSignatureNonComputedName extends TSMethodSignatureBase { + key: PropertyNameNonComputed; + computed: false; +} +export declare interface TSModuleBlock extends BaseNode { + type: AST_NODE_TYPES.TSModuleBlock; + body: ProgramStatement[]; +} +export declare type TSModuleDeclaration = TSModuleDeclarationGlobal | TSModuleDeclarationModule | TSModuleDeclarationNamespace; +declare interface TSModuleDeclarationBase extends BaseNode { + type: AST_NODE_TYPES.TSModuleDeclaration; + /** + * The name of the module + * ``` + * namespace A {} + * namespace A.B.C {} + * module 'a' {} + * ``` + */ + id: Identifier | Literal | TSQualifiedName; + /** + * The body of the module. + * This can only be `undefined` for the code `declare module 'mod';` + * This will be a `TSModuleDeclaration` if the name is "nested" (`Foo.Bar`). + */ + body?: TSModuleBlock; + /** + * Whether this is a global declaration + * ``` + * declare global {} + * ``` + */ + global: boolean; + /** + * Whether the module is `declare`d + * ``` + * declare namespace F {} + * ``` + */ + declare: boolean; + /** + * The keyword used to define this module declaration + * ``` + * namespace Foo {} + * ^^^^^^^^^ + * + * module 'foo' {} + * ^^^^^^ + * + * declare global {} + * ^^^^^^ + * ``` + */ + kind: TSModuleDeclarationKind; +} +export declare interface TSModuleDeclarationGlobal extends TSModuleDeclarationBase { + kind: 'global'; + body: TSModuleBlock; + id: Identifier; +} +export declare type TSModuleDeclarationKind = 'global' | 'module' | 'namespace'; +export declare type TSModuleDeclarationModule = TSModuleDeclarationModuleWithIdentifierId | TSModuleDeclarationModuleWithStringId; +declare interface TSModuleDeclarationModuleBase extends TSModuleDeclarationBase { + kind: 'module'; +} +export declare interface TSModuleDeclarationModuleWithIdentifierId extends TSModuleDeclarationModuleBase { + kind: 'module'; + id: Identifier; + body: TSModuleBlock; +} +export declare type TSModuleDeclarationModuleWithStringId = TSModuleDeclarationModuleWithStringIdDeclared | TSModuleDeclarationModuleWithStringIdNotDeclared; +export declare interface TSModuleDeclarationModuleWithStringIdDeclared extends TSModuleDeclarationModuleBase { + kind: 'module'; + id: StringLiteral; + declare: true; + body?: TSModuleBlock; +} +export declare interface TSModuleDeclarationModuleWithStringIdNotDeclared extends TSModuleDeclarationModuleBase { + kind: 'module'; + id: StringLiteral; + declare: false; + body: TSModuleBlock; +} +export declare interface TSModuleDeclarationNamespace extends TSModuleDeclarationBase { + kind: 'namespace'; + id: Identifier | TSQualifiedName; + body: TSModuleBlock; +} +export declare interface TSNamedTupleMember extends BaseNode { + type: AST_NODE_TYPES.TSNamedTupleMember; + elementType: TypeNode; + label: Identifier; + optional: boolean; +} +export declare interface TSNamespaceExportDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSNamespaceExportDeclaration; + /** + * The name the global variable being exported to + */ + id: Identifier; +} +export declare interface TSNeverKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNeverKeyword; +} +export declare interface TSNonNullExpression extends BaseNode { + type: AST_NODE_TYPES.TSNonNullExpression; + expression: Expression; +} +export declare interface TSNullKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNullKeyword; +} +export declare interface TSNumberKeyword extends BaseNode { + type: AST_NODE_TYPES.TSNumberKeyword; +} +export declare interface TSObjectKeyword extends BaseNode { + type: AST_NODE_TYPES.TSObjectKeyword; +} +export declare interface TSOptionalType extends BaseNode { + type: AST_NODE_TYPES.TSOptionalType; + typeAnnotation: TypeNode; +} +export declare interface TSParameterProperty extends BaseNode { + type: AST_NODE_TYPES.TSParameterProperty; + accessibility: Accessibility | undefined; + readonly: boolean; + static: boolean; + override: boolean; + parameter: AssignmentPattern | BindingName | RestElement; + decorators: Decorator[]; +} +export declare interface TSPrivateKeyword extends BaseNode { + type: AST_NODE_TYPES.TSPrivateKeyword; +} +export declare type TSPropertySignature = TSPropertySignatureComputedName | TSPropertySignatureNonComputedName; +declare interface TSPropertySignatureBase extends BaseNode { + type: AST_NODE_TYPES.TSPropertySignature; + key: PropertyName; + optional: boolean; + computed: boolean; + typeAnnotation: TSTypeAnnotation | undefined; + readonly: boolean; + static: boolean; + accessibility: Accessibility | undefined; +} +export declare interface TSPropertySignatureComputedName extends TSPropertySignatureBase { + key: PropertyNameComputed; + computed: true; +} +export declare interface TSPropertySignatureNonComputedName extends TSPropertySignatureBase { + key: PropertyNameNonComputed; + computed: false; +} +export declare interface TSProtectedKeyword extends BaseNode { + type: AST_NODE_TYPES.TSProtectedKeyword; +} +export declare interface TSPublicKeyword extends BaseNode { + type: AST_NODE_TYPES.TSPublicKeyword; +} +export declare interface TSQualifiedName extends BaseNode { + type: AST_NODE_TYPES.TSQualifiedName; + left: EntityName; + right: Identifier; +} +export declare interface TSReadonlyKeyword extends BaseNode { + type: AST_NODE_TYPES.TSReadonlyKeyword; +} +export declare interface TSRestType extends BaseNode { + type: AST_NODE_TYPES.TSRestType; + typeAnnotation: TypeNode; +} +export declare interface TSSatisfiesExpression extends BaseNode { + type: AST_NODE_TYPES.TSSatisfiesExpression; + expression: Expression; + typeAnnotation: TypeNode; +} +export declare interface TSStaticKeyword extends BaseNode { + type: AST_NODE_TYPES.TSStaticKeyword; +} +export declare interface TSStringKeyword extends BaseNode { + type: AST_NODE_TYPES.TSStringKeyword; +} +export declare interface TSSymbolKeyword extends BaseNode { + type: AST_NODE_TYPES.TSSymbolKeyword; +} +export declare interface TSTemplateLiteralType extends BaseNode { + type: AST_NODE_TYPES.TSTemplateLiteralType; + quasis: TemplateElement[]; + types: TypeNode[]; +} +export declare interface TSThisType extends BaseNode { + type: AST_NODE_TYPES.TSThisType; +} +export declare interface TSTupleType extends BaseNode { + type: AST_NODE_TYPES.TSTupleType; + elementTypes: TypeNode[]; +} +export declare interface TSTypeAliasDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSTypeAliasDeclaration; + /** + * Whether the type was `declare`d. + * ``` + * declare type T = 1; + * ``` + */ + declare: boolean; + /** + * The name of the type. + */ + id: Identifier; + /** + * The "value" (type) of the declaration + */ + typeAnnotation: TypeNode; + /** + * The generic type parameters declared for the type. + */ + typeParameters: TSTypeParameterDeclaration | undefined; +} +export declare interface TSTypeAnnotation extends BaseNode { + type: AST_NODE_TYPES.TSTypeAnnotation; + typeAnnotation: TypeNode; +} +export declare interface TSTypeAssertion extends BaseNode { + type: AST_NODE_TYPES.TSTypeAssertion; + typeAnnotation: TypeNode; + expression: Expression; +} +export declare interface TSTypeLiteral extends BaseNode { + type: AST_NODE_TYPES.TSTypeLiteral; + members: TypeElement[]; +} +export declare interface TSTypeOperator extends BaseNode { + type: AST_NODE_TYPES.TSTypeOperator; + operator: 'keyof' | 'readonly' | 'unique'; + typeAnnotation: TypeNode | undefined; +} +export declare interface TSTypeParameter extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameter; + name: Identifier; + constraint: TypeNode | undefined; + default: TypeNode | undefined; + in: boolean; + out: boolean; + const: boolean; +} +export declare interface TSTypeParameterDeclaration extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameterDeclaration; + params: TSTypeParameter[]; +} +export declare interface TSTypeParameterInstantiation extends BaseNode { + type: AST_NODE_TYPES.TSTypeParameterInstantiation; + params: TypeNode[]; +} +export declare interface TSTypePredicate extends BaseNode { + type: AST_NODE_TYPES.TSTypePredicate; + asserts: boolean; + parameterName: Identifier | TSThisType; + typeAnnotation: TSTypeAnnotation | null; +} +export declare interface TSTypeQuery extends BaseNode { + type: AST_NODE_TYPES.TSTypeQuery; + exprName: EntityName | TSImportType; + typeArguments: TSTypeParameterInstantiation | undefined; + /** @deprecated Use {@link `typeArguments`} instead. */ + typeParameters: TSTypeParameterInstantiation | undefined; +} +export declare interface TSTypeReference extends BaseNode { + type: AST_NODE_TYPES.TSTypeReference; + typeArguments: TSTypeParameterInstantiation | undefined; + /** @deprecated Use {@link `typeArguments`} instead. */ + typeParameters: TSTypeParameterInstantiation | undefined; + typeName: EntityName; +} +export declare type TSUnaryExpression = AwaitExpression | LeftHandSideExpression | UnaryExpression | UpdateExpression; +export declare interface TSUndefinedKeyword extends BaseNode { + type: AST_NODE_TYPES.TSUndefinedKeyword; +} +export declare interface TSUnionType extends BaseNode { + type: AST_NODE_TYPES.TSUnionType; + types: TypeNode[]; +} +export declare interface TSUnknownKeyword extends BaseNode { + type: AST_NODE_TYPES.TSUnknownKeyword; +} +export declare interface TSVoidKeyword extends BaseNode { + type: AST_NODE_TYPES.TSVoidKeyword; +} +export declare type TypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSIndexSignature | TSMethodSignature | TSPropertySignature; +export declare type TypeNode = TSAbstractKeyword | TSAnyKeyword | TSArrayType | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSConditionalType | TSConstructorType | TSDeclareKeyword | TSExportKeyword | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSNamedTupleMember | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSPrivateKeyword | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword; +export declare interface UnaryExpression extends UnaryExpressionBase { + type: AST_NODE_TYPES.UnaryExpression; + operator: '-' | '!' | '+' | '~' | 'delete' | 'typeof' | 'void'; +} +declare interface UnaryExpressionBase extends BaseNode { + operator: string; + prefix: boolean; + argument: LeftHandSideExpression | Literal | UnaryExpression; +} +export declare interface UpdateExpression extends UnaryExpressionBase { + type: AST_NODE_TYPES.UpdateExpression; + operator: '--' | '++'; +} +export declare type UsingDeclaration = UsingInForOfDeclaration | UsingInNomalConextDeclaration; +export declare type UsingDeclarator = UsingInForOfDeclarator | UsingInNomalConextDeclarator; +export declare interface UsingInForOfDeclaration extends BaseNode { + type: AST_NODE_TYPES.VariableDeclaration; + /** + * The variables declared by this declaration. + * Note that there may be 0 declarations (i.e. `const;`). + * ``` + * for(using x of y){} + * ``` + */ + declarations: UsingInForOfDeclarator[]; + /** + * This value will always be `false` + * because 'declare' modifier cannot appear on a 'using' declaration. + */ + declare: false; + /** + * The keyword used to declare the variable(s) + * ``` + * for(using x of y){} + * for(await using x of y){} + * ``` + */ + kind: 'await using' | 'using'; +} +export declare interface UsingInForOfDeclarator extends BaseNode { + type: AST_NODE_TYPES.VariableDeclarator; + id: Identifier; + init: null; + definite: boolean; +} +export declare interface UsingInNomalConextDeclaration extends BaseNode { + type: AST_NODE_TYPES.VariableDeclaration; + /** + * The variables declared by this declaration. + * Note that there may be 0 declarations (i.e. `const;`). + * ``` + * using x = 1; + * using y =1, z = 2; + * ``` + */ + declarations: UsingInNomalConextDeclarator[]; + /** + * This value will always be `false` + * because 'declare' modifier cannot appear on a 'using' declaration. + */ + declare: false; + /** + * The keyword used to declare the variable(s) + * ``` + * using x = 1; + * await using y = 2; + * ``` + */ + kind: 'await using' | 'using'; +} +export declare interface UsingInNomalConextDeclarator extends BaseNode { + type: AST_NODE_TYPES.VariableDeclarator; + id: Identifier; + init: Expression; + definite: boolean; +} +declare type ValueOf = T[keyof T]; +export declare type VariableDeclaration = LetOrConstOrVarDeclaration | UsingDeclaration; +export declare type VariableDeclarator = LetOrConstOrVarDeclarator | UsingDeclarator; +export declare interface WhileStatement extends BaseNode { + type: AST_NODE_TYPES.WhileStatement; + test: Expression; + body: Statement; +} +export declare interface WithStatement extends BaseNode { + type: AST_NODE_TYPES.WithStatement; + object: Expression; + body: Statement; +} +export declare interface YieldExpression extends BaseNode { + type: AST_NODE_TYPES.YieldExpression; + delegate: boolean; + argument: Expression | undefined; +} +export {}; +//# sourceMappingURL=ast-spec.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map new file mode 100644 index 0000000000..c586e7f909 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast-spec.d.ts","sourceRoot":"","sources":["../../src/generated/ast-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;gDAQgD;AAEhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEvE,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAChC,4BAA4B,GAC5B,+BAA+B,CAAC;AAEpC,MAAM,CAAC,OAAO,WAAW,4BACvB,SAAQ,kCAAkC;IAC1C,IAAI,EAAE,cAAc,CAAC,gBAAgB,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,WAAW,+BACvB,SAAQ,qCAAqC;IAC7C,IAAI,EAAE,cAAc,CAAC,gBAAgB,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,QAAQ;IACvD,IAAI,EAAE,cAAc,CAAC,eAAe,CAAC;IACrC;;OAEG;IACH,QAAQ,EAAE,CAAC,UAAU,GAAG,aAAa,GAAG,IAAI,C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a,CAAC;IACnC,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,QAAQ;IACvD,IAAI,EAAE,cAAc,CAAC,eAAe,CAAC;IACrC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;CAClC;AAED,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js new file mode 100644 index 0000000000..1ffa85ae6e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js @@ -0,0 +1,202 @@ +"use strict"; +/********************************************** + * DO NOT MODIFY THIS FILE MANUALLY * + * * + * THIS FILE HAS BEEN COPIED FROM ast-spec. * + * ANY CHANGES WILL BE LOST ON THE NEXT BUILD * + * * + * MAKE CHANGES TO ast-spec AND THEN RUN * + * yarn build * + **********************************************/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0; +var AST_NODE_TYPES; +(function (AST_NODE_TYPES) { + AST_NODE_TYPES["AccessorProperty"] = "AccessorProperty"; + AST_NODE_TYPES["ArrayExpression"] = "ArrayExpression"; + AST_NODE_TYPES["ArrayPattern"] = "ArrayPattern"; + AST_NODE_TYPES["ArrowFunctionExpression"] = "ArrowFunctionExpression"; + AST_NODE_TYPES["AssignmentExpression"] = "AssignmentExpression"; + AST_NODE_TYPES["AssignmentPattern"] = "AssignmentPattern"; + AST_NODE_TYPES["AwaitExpression"] = "AwaitExpression"; + AST_NODE_TYPES["BinaryExpression"] = "BinaryExpression"; + AST_NODE_TYPES["BlockStatement"] = "BlockStatement"; + AST_NODE_TYPES["BreakStatement"] = "BreakStatement"; + AST_NODE_TYPES["CallExpression"] = "CallExpression"; + AST_NODE_TYPES["CatchClause"] = "CatchClause"; + AST_NODE_TYPES["ChainExpression"] = "ChainExpression"; + AST_NODE_TYPES["ClassBody"] = "ClassBody"; + AST_NODE_TYPES["ClassDeclaration"] = "ClassDeclaration"; + AST_NODE_TYPES["ClassExpression"] = "ClassExpression"; + AST_NODE_TYPES["ConditionalExpression"] = "ConditionalExpression"; + AST_NODE_TYPES["ContinueStatement"] = "ContinueStatement"; + AST_NODE_TYPES["DebuggerStatement"] = "DebuggerStatement"; + AST_NODE_TYPES["Decorator"] = "Decorator"; + AST_NODE_TYPES["DoWhileStatement"] = "DoWhileStatement"; + AST_NODE_TYPES["EmptyStatement"] = "EmptyStatement"; + AST_NODE_TYPES["ExportAllDeclaration"] = "ExportAllDeclaration"; + AST_NODE_TYPES["ExportDefaultDeclaration"] = "ExportDefaultDeclaration"; + AST_NODE_TYPES["ExportNamedDeclaration"] = "ExportNamedDeclaration"; + AST_NODE_TYPES["ExportSpecifier"] = "ExportSpecifier"; + AST_NODE_TYPES["ExpressionStatement"] = "ExpressionStatement"; + AST_NODE_TYPES["ForInStatement"] = "ForInStatement"; + AST_NODE_TYPES["ForOfStatement"] = "ForOfStatement"; + AST_NODE_TYPES["ForStatement"] = "ForStatement"; + AST_NODE_TYPES["FunctionDeclaration"] = "FunctionDeclaration"; + AST_NODE_TYPES["FunctionExpression"] = "FunctionExpression"; + AST_NODE_TYPES["Identifier"] = "Identifier"; + AST_NODE_TYPES["IfStatement"] = "IfStatement"; + AST_NODE_TYPES["ImportAttribute"] = "ImportAttribute"; + AST_NODE_TYPES["ImportDeclaration"] = "ImportDeclaration"; + AST_NODE_TYPES["ImportDefaultSpecifier"] = "ImportDefaultSpecifier"; + AST_NODE_TYPES["ImportExpression"] = "ImportExpression"; + AST_NODE_TYPES["ImportNamespaceSpecifier"] = "ImportNamespaceSpecifier"; + AST_NODE_TYPES["ImportSpecifier"] = "ImportSpecifier"; + AST_NODE_TYPES["JSXAttribute"] = "JSXAttribute"; + AST_NODE_TYPES["JSXClosingElement"] = "JSXClosingElement"; + AST_NODE_TYPES["JSXClosingFragment"] = "JSXClosingFragment"; + AST_NODE_TYPES["JSXElement"] = "JSXElement"; + AST_NODE_TYPES["JSXEmptyExpression"] = "JSXEmptyExpression"; + AST_NODE_TYPES["JSXExpressionContainer"] = "JSXExpressionContainer"; + AST_NODE_TYPES["JSXFragment"] = "JSXFragment"; + AST_NODE_TYPES["JSXIdentifier"] = "JSXIdentifier"; + AST_NODE_TYPES["JSXMemberExpression"] = "JSXMemberExpression"; + AST_NODE_TYPES["JSXNamespacedName"] = "JSXNamespacedName"; + AST_NODE_TYPES["JSXOpeningElement"] = "JSXOpeningElement"; + AST_NODE_TYPES["JSXOpeningFragment"] = "JSXOpeningFragment"; + AST_NODE_TYPES["JSXSpreadAttribute"] = "JSXSpreadAttribute"; + AST_NODE_TYPES["JSXSpreadChild"] = "JSXSpreadChild"; + AST_NODE_TYPES["JSXText"] = "JSXText"; + AST_NODE_TYPES["LabeledStatement"] = "LabeledStatement"; + AST_NODE_TYPES["Literal"] = "Literal"; + AST_NODE_TYPES["LogicalExpression"] = "LogicalExpression"; + AST_NODE_TYPES["MemberExpression"] = "MemberExpression"; + AST_NODE_TYPES["MetaProperty"] = "MetaProperty"; + AST_NODE_TYPES["MethodDefinition"] = "MethodDefinition"; + AST_NODE_TYPES["NewExpression"] = "NewExpression"; + AST_NODE_TYPES["ObjectExpression"] = "ObjectExpression"; + AST_NODE_TYPES["ObjectPattern"] = "ObjectPattern"; + AST_NODE_TYPES["PrivateIdentifier"] = "PrivateIdentifier"; + AST_NODE_TYPES["Program"] = "Program"; + AST_NODE_TYPES["Property"] = "Property"; + AST_NODE_TYPES["PropertyDefinition"] = "PropertyDefinition"; + AST_NODE_TYPES["RestElement"] = "RestElement"; + AST_NODE_TYPES["ReturnStatement"] = "ReturnStatement"; + AST_NODE_TYPES["SequenceExpression"] = "SequenceExpression"; + AST_NODE_TYPES["SpreadElement"] = "SpreadElement"; + AST_NODE_TYPES["StaticBlock"] = "StaticBlock"; + AST_NODE_TYPES["Super"] = "Super"; + AST_NODE_TYPES["SwitchCase"] = "SwitchCase"; + AST_NODE_TYPES["SwitchStatement"] = "SwitchStatement"; + AST_NODE_TYPES["TaggedTemplateExpression"] = "TaggedTemplateExpression"; + AST_NODE_TYPES["TemplateElement"] = "TemplateElement"; + AST_NODE_TYPES["TemplateLiteral"] = "TemplateLiteral"; + AST_NODE_TYPES["ThisExpression"] = "ThisExpression"; + AST_NODE_TYPES["ThrowStatement"] = "ThrowStatement"; + AST_NODE_TYPES["TryStatement"] = "TryStatement"; + AST_NODE_TYPES["UnaryExpression"] = "UnaryExpression"; + AST_NODE_TYPES["UpdateExpression"] = "UpdateExpression"; + AST_NODE_TYPES["VariableDeclaration"] = "VariableDeclaration"; + AST_NODE_TYPES["VariableDeclarator"] = "VariableDeclarator"; + AST_NODE_TYPES["WhileStatement"] = "WhileStatement"; + AST_NODE_TYPES["WithStatement"] = "WithStatement"; + AST_NODE_TYPES["YieldExpression"] = "YieldExpression"; + /** + * TS-prefixed nodes + */ + AST_NODE_TYPES["TSAbstractAccessorProperty"] = "TSAbstractAccessorProperty"; + AST_NODE_TYPES["TSAbstractKeyword"] = "TSAbstractKeyword"; + AST_NODE_TYPES["TSAbstractMethodDefinition"] = "TSAbstractMethodDefinition"; + AST_NODE_TYPES["TSAbstractPropertyDefinition"] = "TSAbstractPropertyDefinition"; + AST_NODE_TYPES["TSAnyKeyword"] = "TSAnyKeyword"; + AST_NODE_TYPES["TSArrayType"] = "TSArrayType"; + AST_NODE_TYPES["TSAsExpression"] = "TSAsExpression"; + AST_NODE_TYPES["TSAsyncKeyword"] = "TSAsyncKeyword"; + AST_NODE_TYPES["TSBigIntKeyword"] = "TSBigIntKeyword"; + AST_NODE_TYPES["TSBooleanKeyword"] = "TSBooleanKeyword"; + AST_NODE_TYPES["TSCallSignatureDeclaration"] = "TSCallSignatureDeclaration"; + AST_NODE_TYPES["TSClassImplements"] = "TSClassImplements"; + AST_NODE_TYPES["TSConditionalType"] = "TSConditionalType"; + AST_NODE_TYPES["TSConstructorType"] = "TSConstructorType"; + AST_NODE_TYPES["TSConstructSignatureDeclaration"] = "TSConstructSignatureDeclaration"; + AST_NODE_TYPES["TSDeclareFunction"] = "TSDeclareFunction"; + AST_NODE_TYPES["TSDeclareKeyword"] = "TSDeclareKeyword"; + AST_NODE_TYPES["TSEmptyBodyFunctionExpression"] = "TSEmptyBodyFunctionExpression"; + AST_NODE_TYPES["TSEnumDeclaration"] = "TSEnumDeclaration"; + AST_NODE_TYPES["TSEnumMember"] = "TSEnumMember"; + AST_NODE_TYPES["TSExportAssignment"] = "TSExportAssignment"; + AST_NODE_TYPES["TSExportKeyword"] = "TSExportKeyword"; + AST_NODE_TYPES["TSExternalModuleReference"] = "TSExternalModuleReference"; + AST_NODE_TYPES["TSFunctionType"] = "TSFunctionType"; + AST_NODE_TYPES["TSInstantiationExpression"] = "TSInstantiationExpression"; + AST_NODE_TYPES["TSImportEqualsDeclaration"] = "TSImportEqualsDeclaration"; + AST_NODE_TYPES["TSImportType"] = "TSImportType"; + AST_NODE_TYPES["TSIndexedAccessType"] = "TSIndexedAccessType"; + AST_NODE_TYPES["TSIndexSignature"] = "TSIndexSignature"; + AST_NODE_TYPES["TSInferType"] = "TSInferType"; + AST_NODE_TYPES["TSInterfaceBody"] = "TSInterfaceBody"; + AST_NODE_TYPES["TSInterfaceDeclaration"] = "TSInterfaceDeclaration"; + AST_NODE_TYPES["TSInterfaceHeritage"] = "TSInterfaceHeritage"; + AST_NODE_TYPES["TSIntersectionType"] = "TSIntersectionType"; + AST_NODE_TYPES["TSIntrinsicKeyword"] = "TSIntrinsicKeyword"; + AST_NODE_TYPES["TSLiteralType"] = "TSLiteralType"; + AST_NODE_TYPES["TSMappedType"] = "TSMappedType"; + AST_NODE_TYPES["TSMethodSignature"] = "TSMethodSignature"; + AST_NODE_TYPES["TSModuleBlock"] = "TSModuleBlock"; + AST_NODE_TYPES["TSModuleDeclaration"] = "TSModuleDeclaration"; + AST_NODE_TYPES["TSNamedTupleMember"] = "TSNamedTupleMember"; + AST_NODE_TYPES["TSNamespaceExportDeclaration"] = "TSNamespaceExportDeclaration"; + AST_NODE_TYPES["TSNeverKeyword"] = "TSNeverKeyword"; + AST_NODE_TYPES["TSNonNullExpression"] = "TSNonNullExpression"; + AST_NODE_TYPES["TSNullKeyword"] = "TSNullKeyword"; + AST_NODE_TYPES["TSNumberKeyword"] = "TSNumberKeyword"; + AST_NODE_TYPES["TSObjectKeyword"] = "TSObjectKeyword"; + AST_NODE_TYPES["TSOptionalType"] = "TSOptionalType"; + AST_NODE_TYPES["TSParameterProperty"] = "TSParameterProperty"; + AST_NODE_TYPES["TSPrivateKeyword"] = "TSPrivateKeyword"; + AST_NODE_TYPES["TSPropertySignature"] = "TSPropertySignature"; + AST_NODE_TYPES["TSProtectedKeyword"] = "TSProtectedKeyword"; + AST_NODE_TYPES["TSPublicKeyword"] = "TSPublicKeyword"; + AST_NODE_TYPES["TSQualifiedName"] = "TSQualifiedName"; + AST_NODE_TYPES["TSReadonlyKeyword"] = "TSReadonlyKeyword"; + AST_NODE_TYPES["TSRestType"] = "TSRestType"; + AST_NODE_TYPES["TSSatisfiesExpression"] = "TSSatisfiesExpression"; + AST_NODE_TYPES["TSStaticKeyword"] = "TSStaticKeyword"; + AST_NODE_TYPES["TSStringKeyword"] = "TSStringKeyword"; + AST_NODE_TYPES["TSSymbolKeyword"] = "TSSymbolKeyword"; + AST_NODE_TYPES["TSTemplateLiteralType"] = "TSTemplateLiteralType"; + AST_NODE_TYPES["TSThisType"] = "TSThisType"; + AST_NODE_TYPES["TSTupleType"] = "TSTupleType"; + AST_NODE_TYPES["TSTypeAliasDeclaration"] = "TSTypeAliasDeclaration"; + AST_NODE_TYPES["TSTypeAnnotation"] = "TSTypeAnnotation"; + AST_NODE_TYPES["TSTypeAssertion"] = "TSTypeAssertion"; + AST_NODE_TYPES["TSTypeLiteral"] = "TSTypeLiteral"; + AST_NODE_TYPES["TSTypeOperator"] = "TSTypeOperator"; + AST_NODE_TYPES["TSTypeParameter"] = "TSTypeParameter"; + AST_NODE_TYPES["TSTypeParameterDeclaration"] = "TSTypeParameterDeclaration"; + AST_NODE_TYPES["TSTypeParameterInstantiation"] = "TSTypeParameterInstantiation"; + AST_NODE_TYPES["TSTypePredicate"] = "TSTypePredicate"; + AST_NODE_TYPES["TSTypeQuery"] = "TSTypeQuery"; + AST_NODE_TYPES["TSTypeReference"] = "TSTypeReference"; + AST_NODE_TYPES["TSUndefinedKeyword"] = "TSUndefinedKeyword"; + AST_NODE_TYPES["TSUnionType"] = "TSUnionType"; + AST_NODE_TYPES["TSUnknownKeyword"] = "TSUnknownKeyword"; + AST_NODE_TYPES["TSVoidKeyword"] = "TSVoidKeyword"; +})(AST_NODE_TYPES || (exports.AST_NODE_TYPES = AST_NODE_TYPES = {})); +var AST_TOKEN_TYPES; +(function (AST_TOKEN_TYPES) { + AST_TOKEN_TYPES["Boolean"] = "Boolean"; + AST_TOKEN_TYPES["Identifier"] = "Identifier"; + AST_TOKEN_TYPES["JSXIdentifier"] = "JSXIdentifier"; + AST_TOKEN_TYPES["JSXText"] = "JSXText"; + AST_TOKEN_TYPES["Keyword"] = "Keyword"; + AST_TOKEN_TYPES["Null"] = "Null"; + AST_TOKEN_TYPES["Numeric"] = "Numeric"; + AST_TOKEN_TYPES["Punctuator"] = "Punctuator"; + AST_TOKEN_TYPES["RegularExpression"] = "RegularExpression"; + AST_TOKEN_TYPES["String"] = "String"; + AST_TOKEN_TYPES["Template"] = "Template"; + AST_TOKEN_TYPES["Block"] = "Block"; + AST_TOKEN_TYPES["Line"] = "Line"; +})(AST_TOKEN_TYPES || (exports.AST_TOKEN_TYPES = AST_TOKEN_TYPES = {})); +//# sourceMappingURL=ast-spec.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map new file mode 100644 index 0000000000..e61423f0be --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ast-spec.js","sourceRoot":"","sources":["../../src/generated/ast-spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;gDAQgD;;;AAmFhD,IAAY,cA2KX;AA3KD,WAAY,cAAc;IACxB,uDAAqC,CAAA;IACrC,qDAAmC,CAAA;IACnC,+CAA6B,CAAA;IAC7B,qEAAmD,CAAA;IACnD,+DAA6C,CAAA;IAC7C,yDAAuC,CAAA;IACvC,qDAAmC,CAAA;IACnC,uDAAqC,CAAA;IACrC,mDAAiC,CAAA;IACjC,mDAAiC,CAAA;IACjC,mDAAiC,CAAA;IACjC,6CAA2B,CAAA;IAC3B,qDAAmC,CAAA;IACnC,yCAAuB,CAAA;IACvB,uDAAqC,CAAA;IACrC,qDAAmC,CAAA;IACnC,iEAA+C,CAAA;IAC/C,yDAAuC,CAAA;IACvC,yDAAuC,CAAA;IACvC,yCAAuB,CAAA;IACvB,uDAAqC,CAAA;IACrC,mDAAiC,CAAA;IACjC,+DAA6C,CAAA;IAC7C,uEAAqD,CAAA;IACrD,mEAAiD,CAAA;IACjD,qDAAmC,CAAA;IACnC,6DAA2C,CAAA;IAC3C,mDAAiC,CAAA;IACjC,mDAAiC,CAAA;IACjC,+CAA6B,CAAA;IAC7B,6DAA2C,CAAA;IAC3C,2DAAyC,CAAA;IACzC,2CAAyB,CAAA;IACzB,6CAA2B,CAAA;IAC3B,qDAAmC,CAAA;IACnC,yDAAuC,CAAA;IACvC,mEAAiD,CAAA;IACjD,uDAAqC,CAAA;IACrC,uEAAqD,CAAA;IACrD,qDAAmC,CAAA;IACnC,+CAA6B,CAAA;IAC7B,yDAAuC,CAAA;IACvC,2DAAyC,CAAA;IACzC,2CAAyB,CAAA;IACzB,2DAAyC,CA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CAAA;IACnC,2DAAyC,CAAA;IACzC,6CAA2B,CAAA;IAC3B,uDAAqC,CAAA;IACrC,iDAA+B,CAAA;AACjC,CAAC,EA3KW,cAAc,8BAAd,cAAc,QA2KzB;AAED,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,4CAAyB,CAAA;IACzB,kDAA+B,CAAA;IAC/B,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,4CAAyB,CAAA;IACzB,0DAAuC,CAAA;IACvC,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,kCAAe,CAAA;IACf,gCAAa,CAAA;AACf,CAAC,EAdW,eAAe,+BAAf,eAAe,QAc1B"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.d.ts new file mode 100644 index 0000000000..3d39147f54 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.d.ts @@ -0,0 +1,5 @@ +export { AST_NODE_TYPES, AST_TOKEN_TYPES } from './generated/ast-spec'; +export * from './lib'; +export * from './parser-options'; +export * from './ts-estree'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.d.ts.map new file mode 100644 index 0000000000..6a86c53762 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvE,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.js new file mode 100644 index 0000000000..00ff6a1752 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.js @@ -0,0 +1,24 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0; +var ast_spec_1 = require("./generated/ast-spec"); +Object.defineProperty(exports, "AST_NODE_TYPES", { enumerable: true, get: function () { return ast_spec_1.AST_NODE_TYPES; } }); +Object.defineProperty(exports, "AST_TOKEN_TYPES", { enumerable: true, get: function () { return ast_spec_1.AST_TOKEN_TYPES; } }); +__exportStar(require("./lib"), exports); +__exportStar(require("./parser-options"), exports); +__exportStar(require("./ts-estree"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.js.map new file mode 100644 index 0000000000..075ac156fe --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAAuE;AAA9D,0GAAA,cAAc,OAAA;AAAE,2GAAA,eAAe,OAAA;AACxC,wCAAsB;AACtB,mDAAiC;AACjC,8CAA4B"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.d.ts new file mode 100644 index 0000000000..2ae5781009 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.d.ts @@ -0,0 +1,3 @@ +type Lib = 'es5' | 'es6' | 'es2015' | 'es7' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023' | 'esnext' | 'dom' | 'dom.iterable' | 'webworker' | 'webworker.importscripts' | 'webworker.iterable' | 'scripthost' | 'es2015.core' | 'es2015.collection' | 'es2015.generator' | 'es2015.iterable' | 'es2015.promise' | 'es2015.proxy' | 'es2015.reflect' | 'es2015.symbol' | 'es2015.symbol.wellknown' | 'es2016.array.include' | 'es2017.date' | 'es2017.object' | 'es2017.sharedmemory' | 'es2017.string' | 'es2017.intl' | 'es2017.typedarrays' | 'es2018.asyncgenerator' | 'es2018.asynciterable' | 'es2018.intl' | 'es2018.promise' | 'es2018.regexp' | 'es2019.array' | 'es2019.object' | 'es2019.string' | 'es2019.symbol' | 'es2019.intl' | 'es2020.bigint' | 'es2020.date' | 'es2020.promise' | 'es2020.sharedmemory' | 'es2020.string' | 'es2020.symbol.wellknown' | 'es2020.intl' | 'es2020.number' | 'es2021.promise' | 'es2021.string' | 'es2021.weakref' | 'es2021.intl' | 'es2022.array' | 'es2022.error' | 'es2022.intl' | 'es2022.object' | 'es2022.sharedmemory' | 'es2022.string' | 'es2022.regexp' | 'es2023.array' | 'es2023.collection' | 'esnext.array' | 'esnext.collection' | 'esnext.symbol' | 'esnext.asynciterable' | 'esnext.intl' | 'esnext.disposable' | 'esnext.bigint' | 'esnext.string' | 'esnext.promise' | 'esnext.weakref' | 'esnext.decorators' | 'decorators' | 'decorators.legacy' | 'es2016.full' | 'es2017.full' | 'es2018.full' | 'es2019.full' | 'es2020.full' | 'es2021.full' | 'es2022.full' | 'es2023.full' | 'esnext.full' | 'lib'; +export { Lib }; +//# sourceMappingURL=lib.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.d.ts.map new file mode 100644 index 0000000000..b3eb8e25dc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAKA,KAAK,GAAG,GACJ,KAAK,GACL,KAAK,GACL,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,cAAc,GACd,WAAW,GACX,yBAAyB,GACzB,oBAAoB,GACpB,YAAY,GACZ,aAAa,GACb,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,yBAAyB,GACzB,sBAAsB,GACtB,aAAa,GACb,eAAe,GACf,qBAAqB,GACrB,eAAe,GACf,aAAa,GACb,oBAAoB,GACpB,uBAAuB,GACvB,sBAAsB,GACtB,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,eAAe,GACf,eAAe,GACf,eAAe,GACf,aAAa,GACb,eAAe,GACf,aAAa,GACb,gBAAgB,GAChB,qBAAqB,GACrB,eAAe,GACf,yBAAyB,GACzB,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,cAAc,GACd,cAAc,GACd,aAAa,GACb,eAAe,GACf,qBAAqB,GACrB,eAAe,GACf,eAAe,GACf,cAAc,GACd,mBAAmB,GACnB,cAAc,GACd,mBAAmB,GACnB,eAAe,GACf,sBAAsB,GACtB,aAAa,GACb,mBAAmB,GACnB,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,mBAAmB,GACnB,YAAY,GACZ,mBAAmB,GACnB,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,KAAK,CAAC;AAEV,OAAO,EAAE,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.js new file mode 100644 index 0000000000..b6f2625705 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.js @@ -0,0 +1,7 @@ +"use strict"; +// THIS CODE WAS AUTOMATICALLY GENERATED +// DO NOT EDIT THIS CODE BY HAND +// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: +// npx nx generate-lib @typescript-eslint/scope-manager +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=lib.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.js.map new file mode 100644 index 0000000000..71d260aa3f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/lib.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,mEAAmE;AACnE,uDAAuD"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.d.ts new file mode 100644 index 0000000000..54b5829c09 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.d.ts @@ -0,0 +1,40 @@ +import type { Program } from 'typescript'; +import type { Lib } from './lib'; +type DebugLevel = ('eslint' | 'typescript-eslint' | 'typescript')[] | boolean; +type CacheDurationSeconds = number | 'Infinity'; +type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022; +type SourceType = 'module' | 'script'; +interface ParserOptions { + ecmaFeatures?: { + globalReturn?: boolean; + jsx?: boolean; + }; + ecmaVersion?: EcmaVersion | 'latest'; + jsxPragma?: string | null; + jsxFragmentName?: string | null; + lib?: Lib[]; + emitDecoratorMetadata?: boolean; + comment?: boolean; + debugLevel?: DebugLevel; + errorOnTypeScriptSyntacticAndSemanticIssues?: boolean; + errorOnUnknownASTType?: boolean; + EXPERIMENTAL_useProjectService?: boolean; + EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean; + extraFileExtensions?: string[]; + filePath?: string; + loc?: boolean; + program?: Program | null; + project?: string[] | string | true | null; + projectFolderIgnoreList?: (RegExp | string)[]; + range?: boolean; + sourceType?: SourceType; + tokens?: boolean; + tsconfigRootDir?: string; + warnOnUnsupportedTypeScriptVersion?: boolean; + cacheLifetime?: { + glob?: CacheDurationSeconds; + }; + [additionalProperties: string]: unknown; +} +export { CacheDurationSeconds, DebugLevel, EcmaVersion, ParserOptions, SourceType, }; +//# sourceMappingURL=parser-options.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map new file mode 100644 index 0000000000..a33c332128 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser-options.d.ts","sourceRoot":"","sources":["../src/parser-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,KAAK,UAAU,GAAG,CAAC,QAAQ,GAAG,mBAAmB,GAAG,YAAY,CAAC,EAAE,GAAG,OAAO,CAAC;AAC9E,KAAK,oBAAoB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEhD,KAAK,WAAW,GACZ,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAET,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtC,UAAU,aAAa;IACrB,YAAY,CAAC,EAAE;QACb,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,GAAG,CAAC,EAAE,OAAO,CAAC;KACf,CAAC;IACF,WAAW,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;IAGrC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IAGZ,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAGhC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,2CAA2C,CAAC,EAAE,OAAO,CAAC;IACtD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,gDAAgD,CAAC,EAAE,OAAO,CAAC;IAC3D,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C,aAAa,CAAC,EAAE;QACd,IAAI,CAAC,EAAE,oBAAoB,CAAC;KAC7B,CAAC;IAEF,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC;CACzC;AAED,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,WAAW,EACX,aAAa,EACb,UAAU,GACX,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.js new file mode 100644 index 0000000000..66f40a290d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=parser-options.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.js.map new file mode 100644 index 0000000000..22b7b8ab93 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/parser-options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parser-options.js","sourceRoot":"","sources":["../src/parser-options.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts new file mode 100644 index 0000000000..19cd75d140 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts @@ -0,0 +1,14 @@ +import type * as TSESTree from './generated/ast-spec'; +declare module './generated/ast-spec' { + interface BaseNode { + parent: TSESTree.Node; + } + interface Program { + /** + * @remarks This never-used property exists only as a convenience for code that tries to access node parents repeatedly. + */ + parent?: never; + } +} +export * as TSESTree from './generated/ast-spec'; +//# sourceMappingURL=ts-estree.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts.map new file mode 100644 index 0000000000..03ee8f1cc4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ts-estree.d.ts","sourceRoot":"","sources":["../src/ts-estree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,QAAQ,MAAM,sBAAsB,CAAC;AAGtD,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC;KACvB;IAED,UAAU,OAAO;QACf;;WAEG;QACH,MAAM,CAAC,EAAE,KAAK,CAAC;KAChB;CACF;AAED,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.js new file mode 100644 index 0000000000..e0dc7c61d3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.js @@ -0,0 +1,28 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSESTree = void 0; +exports.TSESTree = __importStar(require("./generated/ast-spec")); +//# sourceMappingURL=ts-estree.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.js.map new file mode 100644 index 0000000000..e5b35fae2d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/dist/ts-estree.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ts-estree.js","sourceRoot":"","sources":["../src/ts-estree.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,iEAAiD"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/package.json b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/package.json new file mode 100644 index 0000000000..91ae18d34c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types/package.json @@ -0,0 +1,94 @@ +{ + "name": "@typescript-eslint/types", + "version": "6.6.0", + "description": "Types for the TypeScript-ESTree AST spec", + "files": [ + "dist", + "_ts4.3", + "package.json", + "README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/types" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "license": "MIT", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "scripts": { + "copy-ast-spec": "tsx ./tools/copy-ast-spec.ts", + "build": "tsc -b tsconfig.build.json", + "postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3", + "clean": "tsc -b tsconfig.build.json --clean", + "postclean": "rimraf dist && rimraf src/generated && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", + "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", + "generate-lib": "nx run scope-manager:generate-lib", + "lint": "nx lint", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "nx": { + "targets": { + "copy-ast-spec": { + "dependsOn": [ + { + "target": "build", + "projects": "dependencies" + } + ], + "outputs": [ + "packages/types/src/generated" + ] + }, + "build": { + "dependsOn": [ + { + "target": "build", + "projects": "dependencies" + }, + { + "target": "copy-ast-spec", + "projects": "self" + } + ] + } + } + }, + "devDependencies": { + "downlevel-dts": "*", + "prettier": "^2.8.4", + "rimraf": "*", + "tsx": "*", + "typescript": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "typesVersions": { + "<4.7": { + "*": [ + "_ts4.3/*" + ] + } + }, + "gitHead": "a3a39321296f74caa9d18577491a86119b450c18" +} diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/LICENSE b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/LICENSE new file mode 100644 index 0000000000..f6d73403f2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/LICENSE @@ -0,0 +1,26 @@ +TypeScript ESTree + +Originally extracted from: + +TypeScript ESLint Parser +Copyright JS Foundation and other contributors, https://js.foundation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/README.md b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/README.md new file mode 100644 index 0000000000..c98838dad4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/README.md @@ -0,0 +1,14 @@ +# `@typescript-eslint/typescript-estree` + +> A parser that produces an ESTree-compatible AST for TypeScript code. + +[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/typescript-estree.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils) +[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/typescript-estree.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils) + +## Contributing + +👉 See **https://typescript-eslint.io/packages/typescript-estree** for documentation on this package. + +> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code. + + diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts new file mode 100644 index 0000000000..3c812c655b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts @@ -0,0 +1,9 @@ +import type { SourceFile } from 'typescript'; +import type { ASTMaps } from './convert'; +import type { ParseSettings } from './parseSettings'; +import type { TSESTree } from './ts-estree'; +export declare function astConverter(ast: SourceFile, parseSettings: ParseSettings, shouldPreserveNodeMaps: boolean): { + estree: TSESTree.Program; + astMaps: ASTMaps; +}; +//# sourceMappingURL=ast-converter.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts.map new file mode 100644 index 0000000000..94b20cd8a5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast-converter.d.ts","sourceRoot":"","sources":["../src/ast-converter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,wBAAgB,YAAY,CAC1B,GAAG,EAAE,UAAU,EACf,aAAa,EAAE,aAAa,EAC5B,sBAAsB,EAAE,OAAO,GAC9B;IAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CA4DhD"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js new file mode 100644 index 0000000000..42b325f3a3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.astConverter = void 0; +const convert_1 = require("./convert"); +const convert_comments_1 = require("./convert-comments"); +const node_utils_1 = require("./node-utils"); +const simple_traverse_1 = require("./simple-traverse"); +function astConverter(ast, parseSettings, shouldPreserveNodeMaps) { + /** + * The TypeScript compiler produced fundamental parse errors when parsing the + * source. + */ + const { parseDiagnostics } = ast; + if (parseDiagnostics.length) { + throw (0, convert_1.convertError)(parseDiagnostics[0]); + } + /** + * Recursively convert the TypeScript AST into an ESTree-compatible AST + */ + const instance = new convert_1.Converter(ast, { + allowInvalidAST: parseSettings.allowInvalidAST, + errorOnUnknownASTType: parseSettings.errorOnUnknownASTType, + shouldPreserveNodeMaps, + suppressDeprecatedPropertyWarnings: parseSettings.suppressDeprecatedPropertyWarnings, + }); + const estree = instance.convertProgram(); + /** + * Optionally remove range and loc if specified + */ + if (!parseSettings.range || !parseSettings.loc) { + (0, simple_traverse_1.simpleTraverse)(estree, { + enter: node => { + if (!parseSettings.range) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- TS 4.0 made this an error because the types aren't optional + // @ts-expect-error + delete node.range; + } + if (!parseSettings.loc) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- TS 4.0 made this an error because the types aren't optional + // @ts-expect-error + delete node.loc; + } + }, + }); + } + /** + * Optionally convert and include all tokens in the AST + */ + if (parseSettings.tokens) { + estree.tokens = (0, node_utils_1.convertTokens)(ast); + } + /** + * Optionally convert and include all comments in the AST + */ + if (parseSettings.comment) { + estree.comments = (0, convert_comments_1.convertComments)(ast, parseSettings.codeFullText); + } + const astMaps = instance.getASTMaps(); + return { estree, astMaps }; +} +exports.astConverter = astConverter; +//# sourceMappingURL=ast-converter.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js.map new file mode 100644 index 0000000000..cf24457ebf --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ast-converter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ast-converter.js","sourceRoot":"","sources":["../src/ast-converter.ts"],"names":[],"mappings":";;;AAGA,uCAAoD;AACpD,yDAAqD;AACrD,6CAA6C;AAE7C,uDAAmD;AAGnD,SAAgB,YAAY,CAC1B,GAAe,EACf,aAA4B,EAC5B,sBAA+B;IAE/B;;;OAGG;IACH,MAAM,EAAE,gBAAgB,EAAE,GAAG,GAAG,CAAC;IACjC,IAAI,gBAAgB,CAAC,MAAM,EAAE;QAC3B,MAAM,IAAA,sBAAY,EAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;KACzC;IAED;;OAEG;IACH,MAAM,QAAQ,GAAG,IAAI,mBAAS,CAAC,GAAG,EAAE;QAClC,eAAe,EAAE,aAAa,CAAC,eAAe;QAC9C,qBAAqB,EAAE,aAAa,CAAC,qBAAqB;QAC1D,sBAAsB;QACtB,kCAAkC,EAChC,aAAa,CAAC,kCAAkC;KACnD,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAEzC;;OAEG;IACH,IAAI,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE;QAC9C,IAAA,gCAAc,EAAC,MAAM,EAAE;YACrB,KAAK,EAAE,IAAI,CAAC,EAAE;gBACZ,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE;oBACxB,4HAA4H;oBAC5H,mBAAmB;oBACnB,OAAO,IAAI,CAAC,KAAK,CAAC;iBACnB;gBACD,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE;oBACtB,4HAA4H;oBAC5H,mBAAmB;oBACnB,OAAO,IAAI,CAAC,GAAG,CAAC;iBACjB;YACH,CAAC;SACF,CAAC,CAAC;KACJ;IAED;;OAEG;IACH,IAAI,aAAa,CAAC,MAAM,EAAE;QACxB,MAAM,CAAC,MAAM,GAAG,IAAA,0BAAa,EAAC,GAAG,CAAC,CAAC;KACpC;IAED;;OAEG;IACH,IAAI,aAAa,CAAC,OAAO,EAAE;QACzB,MAAM,CAAC,QAAQ,GAAG,IAAA,kCAAe,EAAC,GAAG,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;KACpE;IAED,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,EAAE,CAAC;IAEtC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAC7B,CAAC;AAhED,oCAgEC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts new file mode 100644 index 0000000000..1845702458 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts @@ -0,0 +1,10 @@ +/** + * Clears all of the internal caches. + * Generally you shouldn't need or want to use this. + * Examples of intended uses: + * - In tests to reset parser state to keep tests isolated. + * - In custom lint tooling that iteratively lints one project at a time to prevent OOMs. + */ +export declare function clearCaches(): void; +export declare const clearProgramCache: typeof clearCaches; +//# sourceMappingURL=clear-caches.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map new file mode 100644 index 0000000000..c43288b96c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"clear-caches.d.ts","sourceRoot":"","sources":["../src/clear-caches.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAGD,eAAO,MAAM,iBAAiB,oBAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js new file mode 100644 index 0000000000..2be4651b58 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.clearProgramCache = exports.clearCaches = void 0; +const getWatchProgramsForProjects_1 = require("./create-program/getWatchProgramsForProjects"); +const parser_1 = require("./parser"); +const createParseSettings_1 = require("./parseSettings/createParseSettings"); +const resolveProjectList_1 = require("./parseSettings/resolveProjectList"); +/** + * Clears all of the internal caches. + * Generally you shouldn't need or want to use this. + * Examples of intended uses: + * - In tests to reset parser state to keep tests isolated. + * - In custom lint tooling that iteratively lints one project at a time to prevent OOMs. + */ +function clearCaches() { + (0, parser_1.clearProgramCache)(); + (0, getWatchProgramsForProjects_1.clearWatchCaches)(); + (0, createParseSettings_1.clearTSConfigMatchCache)(); + (0, createParseSettings_1.clearTSServerProjectService)(); + (0, resolveProjectList_1.clearGlobCache)(); +} +exports.clearCaches = clearCaches; +// TODO - delete this in next major +exports.clearProgramCache = clearCaches; +//# sourceMappingURL=clear-caches.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map new file mode 100644 index 0000000000..9655cb7b13 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map @@ -0,0 +1 @@ +{"version":3,"file":"clear-caches.js","sourceRoot":"","sources":["../src/clear-caches.ts"],"names":[],"mappings":";;;AAAA,8FAAgF;AAChF,qCAA0E;AAC1E,6EAG6C;AAC7C,2EAAoE;AAEpE;;;;;;GAMG;AACH,SAAgB,WAAW;IACzB,IAAA,0BAAyB,GAAE,CAAC;IAC5B,IAAA,8CAAgB,GAAE,CAAC;IACnB,IAAA,6CAAuB,GAAE,CAAC;IAC1B,IAAA,iDAA2B,GAAE,CAAC;IAC9B,IAAA,mCAAc,GAAE,CAAC;AACnB,CAAC;AAND,kCAMC;AAED,mCAAmC;AACtB,QAAA,iBAAiB,GAAG,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts new file mode 100644 index 0000000000..bdf936910a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts @@ -0,0 +1,11 @@ +import * as ts from 'typescript'; +import type { TSESTree } from './ts-estree'; +/** + * Convert all comments for the given AST. + * @param ast the AST object + * @param code the TypeScript code + * @returns the converted ESTreeComment + * @private + */ +export declare function convertComments(ast: ts.SourceFile, code: string): TSESTree.Comment[]; +//# sourceMappingURL=convert-comments.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts.map new file mode 100644 index 0000000000..68878b68b7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"convert-comments.d.ts","sourceRoot":"","sources":["../src/convert-comments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,EAAE,CAAC,UAAU,EAClB,IAAI,EAAE,MAAM,GACX,QAAQ,CAAC,OAAO,EAAE,CAgCpB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js new file mode 100644 index 0000000000..17e425a003 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js @@ -0,0 +1,63 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertComments = void 0; +const tsutils = __importStar(require("ts-api-utils")); +const ts = __importStar(require("typescript")); +const node_utils_1 = require("./node-utils"); +const ts_estree_1 = require("./ts-estree"); +/** + * Convert all comments for the given AST. + * @param ast the AST object + * @param code the TypeScript code + * @returns the converted ESTreeComment + * @private + */ +function convertComments(ast, code) { + const comments = []; + tsutils.forEachComment(ast, (_, comment) => { + const type = comment.kind === ts.SyntaxKind.SingleLineCommentTrivia + ? ts_estree_1.AST_TOKEN_TYPES.Line + : ts_estree_1.AST_TOKEN_TYPES.Block; + const range = [comment.pos, comment.end]; + const loc = (0, node_utils_1.getLocFor)(range, ast); + // both comments start with 2 characters - /* or // + const textStart = range[0] + 2; + const textEnd = comment.kind === ts.SyntaxKind.SingleLineCommentTrivia + ? // single line comments end at the end + range[1] - textStart + : // multiline comments end 2 characters early + range[1] - textStart - 2; + comments.push({ + type, + value: code.slice(textStart, textStart + textEnd), + range, + loc, + }); + }, ast); + return comments; +} +exports.convertComments = convertComments; +//# sourceMappingURL=convert-comments.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js.map new file mode 100644 index 0000000000..d62c2d5d87 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js.map @@ -0,0 +1 @@ +{"version":3,"file":"convert-comments.js","sourceRoot":"","sources":["../src/convert-comments.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AACxC,+CAAiC;AAEjC,6CAAyC;AAEzC,2CAA8C;AAE9C;;;;;;GAMG;AACH,SAAgB,eAAe,CAC7B,GAAkB,EAClB,IAAY;IAEZ,MAAM,QAAQ,GAAuB,EAAE,CAAC;IAExC,OAAO,CAAC,cAAc,CACpB,GAAG,EACH,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE;QACb,MAAM,IAAI,GACR,OAAO,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB;YACpD,CAAC,CAAC,2BAAe,CAAC,IAAI;YACtB,CAAC,CAAC,2BAAe,CAAC,KAAK,CAAC;QAC5B,MAAM,KAAK,GAAmB,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QACzD,MAAM,GAAG,GAAG,IAAA,sBAAS,EAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAElC,mDAAmD;QACnD,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAC/B,MAAM,OAAO,GACX,OAAO,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB;YACpD,CAAC,CAAC,sCAAsC;gBACtC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS;YACtB,CAAC,CAAC,4CAA4C;gBAC5C,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI;YACJ,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC;YACjD,KAAK;YACL,GAAG;SACJ,CAAC,CAAC;IACL,CAAC,EACD,GAAG,CACJ,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC;AAnCD,0CAmCC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts new file mode 100644 index 0000000000..fc22f1ed97 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts @@ -0,0 +1,142 @@ +import * as ts from 'typescript'; +import type { TSError } from './node-utils'; +import type { ParserWeakMap, ParserWeakMapESTreeToTSNode } from './parser-options'; +import type { SemanticOrSyntacticError } from './semantic-or-syntactic-errors'; +import type { TSESTree, TSNode } from './ts-estree'; +export interface ConverterOptions { + allowInvalidAST?: boolean; + errorOnUnknownASTType?: boolean; + shouldPreserveNodeMaps?: boolean; + suppressDeprecatedPropertyWarnings?: boolean; +} +/** + * Extends and formats a given error object + * @param error the error object + * @returns converted error object + */ +export declare function convertError(error: SemanticOrSyntacticError | ts.DiagnosticWithLocation): TSError; +export interface ASTMaps { + esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; + tsNodeToESTreeNodeMap: ParserWeakMap; +} +export declare class Converter { + #private; + private readonly ast; + private readonly options; + private readonly esTreeNodeToTSNodeMap; + private readonly tsNodeToESTreeNodeMap; + private allowPattern; + /** + * Converts a TypeScript node into an ESTree node + * @param ast the full TypeScript AST + * @param options additional options for the conversion + * @returns the converted ESTreeNode + */ + constructor(ast: ts.SourceFile, options?: ConverterOptions); + getASTMaps(): ASTMaps; + convertProgram(): TSESTree.Program; + /** + * Converts a TypeScript node into an ESTree node. + * @param node the child ts.Node + * @param parent parentNode + * @param allowPattern flag to determine if patterns are allowed + * @returns the converted ESTree node + */ + private converter; + /** + * Fixes the exports of the given ts.Node + * @param node the ts.Node + * @param result result + * @returns the ESTreeNode with fixed exports + */ + private fixExports; + /** + * Register specific TypeScript node into map with first ESTree node provided + */ + private registerTSNodeInNodeMap; + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + private convertPattern; + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + private convertChild; + private createNode; + private convertBindingNameWithTypeAnnotation; + /** + * Converts a child into a type annotation. This creates an intermediary + * TypeAnnotation node to match what Flow does. + * @param child The TypeScript AST node to convert. + * @param parent parentNode + * @returns The type annotation node. + */ + private convertTypeAnnotation; + /** + * Coverts body Nodes and add a directive field to StringLiterals + * @param nodes of ts.Node + * @param parent parentNode + * @returns Array of body statements + */ + private convertBodyExpressions; + /** + * Converts a ts.Node's typeArguments to TSTypeParameterInstantiation node + * @param typeArguments ts.NodeArray typeArguments + * @param node parent used to create this node + * @returns TypeParameterInstantiation node + */ + private convertTypeArgumentsToTypeParameterInstantiation; + /** + * Converts a ts.Node's typeParameters to TSTypeParameterDeclaration node + * @param typeParameters ts.Node typeParameters + * @returns TypeParameterDeclaration node + */ + private convertTSTypeParametersToTypeParametersDeclaration; + /** + * Converts an array of ts.Node parameters into an array of ESTreeNode params + * @param parameters An array of ts.Node params to be converted + * @returns an array of converted ESTreeNode params + */ + private convertParameters; + private convertChainExpression; + /** + * For nodes that are copied directly from the TypeScript AST into + * ESTree mostly as-is. The only difference is the addition of a type + * property instead of a kind property. Recursively copies all children. + */ + private deeplyCopy; + private convertJSXIdentifier; + private convertJSXNamespaceOrIdentifier; + /** + * Converts a TypeScript JSX node.tagName into an ESTree node.name + * @param node the tagName object from a JSX ts.Node + * @param parent + * @returns the converted ESTree name object + */ + private convertJSXTagName; + private convertMethodSignature; + private convertAssertClasue; + /** + * Uses the provided range location to adjust the location data of the given Node + * @param result The node that will have its location data mutated + * @param childRange The child node range used to expand location + */ + private fixParentLocation; + private assertModuleSpecifier; + /** + * Converts a TypeScript node into an ESTree node. + * The core of the conversion logic: + * Identify and convert each relevant TypeScript SyntaxKind + * @param node the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + private convertNode; +} +//# sourceMappingURL=convert.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map new file mode 100644 index 0000000000..d16d1cf83a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA4B5C,OAAO,KAAK,EACV,aAAa,EACb,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,EAAE,MAAM,aAAa,CAAC;AAKtE,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,wBAAwB,GAAG,EAAE,CAAC,sBAAsB,GAC1D,OAAO,CAMT;AAED,MAAM,WAAW,OAAO;IACtB,qBAAqB,EAAE,2BAA2B,CAAC;IACnD,qBAAqB,EAAE,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;CAC7D;AAED,qBAAa,SAAS;;IACpB,OAA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-eslint/typescript-estree/dist/convert.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.js new file mode 100644 index 0000000000..428eaf6167 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.js @@ -0,0 +1,2532 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _Converter_instances, _Converter_checkModifiers, _Converter_throwUnlessAllowInvalidAST, _Converter_withDeprecatedAliasGetter, _Converter_throwError; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Converter = exports.convertError = void 0; +// There's lots of funny stuff due to the typing of ts.Node +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access */ +const ts = __importStar(require("typescript")); +const getModifiers_1 = require("./getModifiers"); +const node_utils_1 = require("./node-utils"); +const ts_estree_1 = require("./ts-estree"); +const SyntaxKind = ts.SyntaxKind; +/** + * Extends and formats a given error object + * @param error the error object + * @returns converted error object + */ +function convertError(error) { + return (0, node_utils_1.createError)(('message' in error && error.message) || error.messageText, error.file, error.start); +} +exports.convertError = convertError; +class Converter { + /** + * Converts a TypeScript node into an ESTree node + * @param ast the full TypeScript AST + * @param options additional options for the conversion + * @returns the converted ESTreeNode + */ + constructor(ast, options) { + _Converter_instances.add(this); + this.esTreeNodeToTSNodeMap = new WeakMap(); + this.tsNodeToESTreeNodeMap = new WeakMap(); + this.allowPattern = false; + this.ast = ast; + this.options = { ...options }; + } + getASTMaps() { + return { + esTreeNodeToTSNodeMap: this.esTreeNodeToTSNodeMap, + tsNodeToESTreeNodeMap: this.tsNodeToESTreeNodeMap, + }; + } + convertProgram() { + return this.converter(this.ast); + } + /** + * Converts a TypeScript node into an ESTree node. + * @param node the child ts.Node + * @param parent parentNode + * @param allowPattern flag to determine if patterns are allowed + * @returns the converted ESTree node + */ + converter(node, parent, allowPattern) { + /** + * Exit early for null and undefined + */ + if (!node) { + return null; + } + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_checkModifiers).call(this, node); + const pattern = this.allowPattern; + if (allowPattern !== undefined) { + this.allowPattern = allowPattern; + } + const result = this.convertNode(node, (parent ?? node.parent)); + this.registerTSNodeInNodeMap(node, result); + this.allowPattern = pattern; + return result; + } + /** + * Fixes the exports of the given ts.Node + * @param node the ts.Node + * @param result result + * @returns the ESTreeNode with fixed exports + */ + fixExports(node, result) { + const isNamespaceNode = ts.isModuleDeclaration(node) && + Boolean(node.flags & ts.NodeFlags.Namespace); + const modifiers = isNamespaceNode + ? (0, node_utils_1.getNamespaceModifiers)(node) + : (0, getModifiers_1.getModifiers)(node); + if (modifiers?.[0].kind === SyntaxKind.ExportKeyword) { + /** + * Make sure that original node is registered instead of export + */ + this.registerTSNodeInNodeMap(node, result); + const exportKeyword = modifiers[0]; + const nextModifier = modifiers[1]; + const declarationIsDefault = nextModifier?.kind === SyntaxKind.DefaultKeyword; + const varToken = declarationIsDefault + ? (0, node_utils_1.findNextToken)(nextModifier, this.ast, this.ast) + : (0, node_utils_1.findNextToken)(exportKeyword, this.ast, this.ast); + result.range[0] = varToken.getStart(this.ast); + result.loc = (0, node_utils_1.getLocFor)(result.range, this.ast); + if (declarationIsDefault) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration, + declaration: result, + range: [exportKeyword.getStart(this.ast), result.range[1]], + exportKind: 'value', + }); + } + const isType = result.type === ts_estree_1.AST_NODE_TYPES.TSInterfaceDeclaration || + result.type === ts_estree_1.AST_NODE_TYPES.TSTypeAliasDeclaration; + const isDeclare = 'declare' in result && result.declare === true; + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration, + // @ts-expect-error - TODO, narrow the types here + declaration: result, + specifiers: [], + source: null, + exportKind: isType || isDeclare ? 'type' : 'value', + range: [exportKeyword.getStart(this.ast), result.range[1]], + assertions: [], + }); + } + return result; + } + /** + * Register specific TypeScript node into map with first ESTree node provided + */ + registerTSNodeInNodeMap(node, result) { + if (result && this.options.shouldPreserveNodeMaps) { + if (!this.tsNodeToESTreeNodeMap.has(node)) { + this.tsNodeToESTreeNodeMap.set(node, result); + } + } + } + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + convertPattern(child, parent) { + return this.converter(child, parent, true); + } + /** + * Converts a TypeScript node into an ESTree node. + * @param child the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + convertChild(child, parent) { + return this.converter(child, parent, false); + } + createNode( + // The 'parent' property will be added later if specified + node, data) { + const result = data; + result.range ??= (0, node_utils_1.getRange)(node, this.ast); + result.loc ??= (0, node_utils_1.getLocFor)(result.range, this.ast); + if (result && this.options.shouldPreserveNodeMaps) { + this.esTreeNodeToTSNodeMap.set(result, node); + } + return result; + } + convertBindingNameWithTypeAnnotation(name, tsType, parent) { + const id = this.convertPattern(name); + if (tsType) { + id.typeAnnotation = this.convertTypeAnnotation(tsType, parent); + this.fixParentLocation(id, id.typeAnnotation.range); + } + return id; + } + /** + * Converts a child into a type annotation. This creates an intermediary + * TypeAnnotation node to match what Flow does. + * @param child The TypeScript AST node to convert. + * @param parent parentNode + * @returns The type annotation node. + */ + convertTypeAnnotation(child, parent) { + // in FunctionType and ConstructorType typeAnnotation has 2 characters `=>` and in other places is just colon + const offset = parent?.kind === SyntaxKind.FunctionType || + parent?.kind === SyntaxKind.ConstructorType + ? 2 + : 1; + const annotationStartCol = child.getFullStart() - offset; + const range = [annotationStartCol, child.end]; + const loc = (0, node_utils_1.getLocFor)(range, this.ast); + return { + type: ts_estree_1.AST_NODE_TYPES.TSTypeAnnotation, + loc, + range, + typeAnnotation: this.convertChild(child), + }; + } + /** + * Coverts body Nodes and add a directive field to StringLiterals + * @param nodes of ts.Node + * @param parent parentNode + * @returns Array of body statements + */ + convertBodyExpressions(nodes, parent) { + let allowDirectives = (0, node_utils_1.canContainDirective)(parent); + return (nodes + .map(statement => { + const child = this.convertChild(statement); + if (allowDirectives) { + if (child?.expression && + ts.isExpressionStatement(statement) && + ts.isStringLiteral(statement.expression)) { + const raw = child.expression.raw; + child.directive = raw.slice(1, -1); + return child; // child can be null, but it's filtered below + } + allowDirectives = false; + } + return child; // child can be null, but it's filtered below + }) + // filter out unknown nodes for now + .filter(statement => statement)); + } + /** + * Converts a ts.Node's typeArguments to TSTypeParameterInstantiation node + * @param typeArguments ts.NodeArray typeArguments + * @param node parent used to create this node + * @returns TypeParameterInstantiation node + */ + convertTypeArgumentsToTypeParameterInstantiation(typeArguments, node) { + const greaterThanToken = (0, node_utils_1.findNextToken)(typeArguments, this.ast, this.ast); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeParameterInstantiation, + range: [typeArguments.pos - 1, greaterThanToken.end], + params: typeArguments.map(typeArgument => this.convertChild(typeArgument)), + }); + } + /** + * Converts a ts.Node's typeParameters to TSTypeParameterDeclaration node + * @param typeParameters ts.Node typeParameters + * @returns TypeParameterDeclaration node + */ + convertTSTypeParametersToTypeParametersDeclaration(typeParameters) { + const greaterThanToken = (0, node_utils_1.findNextToken)(typeParameters, this.ast, this.ast); + const range = [ + typeParameters.pos - 1, + greaterThanToken.end, + ]; + return { + type: ts_estree_1.AST_NODE_TYPES.TSTypeParameterDeclaration, + range, + loc: (0, node_utils_1.getLocFor)(range, this.ast), + params: typeParameters.map(typeParameter => this.convertChild(typeParameter)), + }; + } + /** + * Converts an array of ts.Node parameters into an array of ESTreeNode params + * @param parameters An array of ts.Node params to be converted + * @returns an array of converted ESTreeNode params + */ + convertParameters(parameters) { + if (!parameters?.length) { + return []; + } + return parameters.map(param => { + const convertedParam = this.convertChild(param); + convertedParam.decorators = + (0, getModifiers_1.getDecorators)(param)?.map(el => this.convertChild(el)) ?? []; + return convertedParam; + }); + } + convertChainExpression(node, tsNode) { + const { child, isOptional } = (() => { + if (node.type === ts_estree_1.AST_NODE_TYPES.MemberExpression) { + return { child: node.object, isOptional: node.optional }; + } + if (node.type === ts_estree_1.AST_NODE_TYPES.CallExpression) { + return { child: node.callee, isOptional: node.optional }; + } + return { child: node.expression, isOptional: false }; + })(); + const isChildUnwrappable = (0, node_utils_1.isChildUnwrappableOptionalChain)(tsNode, child); + if (!isChildUnwrappable && !isOptional) { + return node; + } + if (isChildUnwrappable && (0, node_utils_1.isChainExpression)(child)) { + // unwrap the chain expression child + const newChild = child.expression; + if (node.type === ts_estree_1.AST_NODE_TYPES.MemberExpression) { + node.object = newChild; + } + else if (node.type === ts_estree_1.AST_NODE_TYPES.CallExpression) { + node.callee = newChild; + } + else { + node.expression = newChild; + } + } + return this.createNode(tsNode, { + type: ts_estree_1.AST_NODE_TYPES.ChainExpression, + expression: node, + }); + } + /** + * For nodes that are copied directly from the TypeScript AST into + * ESTree mostly as-is. The only difference is the addition of a type + * property instead of a kind property. Recursively copies all children. + */ + deeplyCopy(node) { + if (node.kind === ts.SyntaxKind.JSDocFunctionType) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, node, 'JSDoc types can only be used inside documentation comments.'); + } + const customType = `TS${SyntaxKind[node.kind]}`; + /** + * If the "errorOnUnknownASTType" option is set to true, throw an error, + * otherwise fallback to just including the unknown type as-is. + */ + if (this.options.errorOnUnknownASTType && !ts_estree_1.AST_NODE_TYPES[customType]) { + throw new Error(`Unknown AST_NODE_TYPE: "${customType}"`); + } + const result = this.createNode(node, { + type: customType, + }); + if ('type' in node) { + result.typeAnnotation = + node.type && 'kind' in node.type && ts.isTypeNode(node.type) + ? this.convertTypeAnnotation(node.type, node) + : null; + } + if ('typeArguments' in node) { + result.typeArguments = + node.typeArguments && 'pos' in node.typeArguments + ? this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node) + : null; + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, result, 'typeParameters', 'typeArguments'); + } + if ('typeParameters' in node) { + result.typeParameters = + node.typeParameters && 'pos' in node.typeParameters + ? this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters) + : null; + } + const decorators = (0, getModifiers_1.getDecorators)(node); + if (decorators?.length) { + result.decorators = decorators.map(el => this.convertChild(el)); + } + // keys we never want to clone from the base typescript node as they + // introduce garbage into our AST + const KEYS_TO_NOT_COPY = new Set([ + '_children', + 'decorators', + 'end', + 'flags', + 'illegalDecorators', + 'heritageClauses', + 'locals', + 'localSymbol', + 'jsDoc', + 'kind', + 'modifierFlagsCache', + 'modifiers', + 'nextContainer', + 'parent', + 'pos', + 'symbol', + 'transformFlags', + 'type', + 'typeArguments', + 'typeParameters', + ]); + Object.entries(node) + .filter(([key]) => !KEYS_TO_NOT_COPY.has(key)) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + result[key] = value.map(el => this.convertChild(el)); + } + else if (value && typeof value === 'object' && value.kind) { + // need to check node[key].kind to ensure we don't try to convert a symbol + result[key] = this.convertChild(value); + } + else { + result[key] = value; + } + }); + return result; + } + convertJSXIdentifier(node) { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier, + name: node.getText(), + }); + this.registerTSNodeInNodeMap(node, result); + return result; + } + convertJSXNamespaceOrIdentifier(node) { + // TypeScript@5.1 added in ts.JsxNamespacedName directly + // We prefer using that if it's relevant for this node type + if (node.kind === ts.SyntaxKind.JsxNamespacedName) { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXNamespacedName, + namespace: this.createNode(node.namespace, { + type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier, + name: node.namespace.text, + }), + name: this.createNode(node.name, { + type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier, + name: node.name.text, + }), + }); + this.registerTSNodeInNodeMap(node, result); + return result; + } + // TypeScript@<5.1 has to manually parse the JSX attributes + const text = node.getText(); + const colonIndex = text.indexOf(':'); + // this is intentional we can ignore conversion if `:` is in first character + if (colonIndex > 0) { + const range = (0, node_utils_1.getRange)(node, this.ast); + // @ts-expect-error -- TypeScript@<5.1 doesn't have ts.JsxNamespacedName + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXNamespacedName, + namespace: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier, + name: text.slice(0, colonIndex), + range: [range[0], range[0] + colonIndex], + }), + name: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXIdentifier, + name: text.slice(colonIndex + 1), + range: [range[0] + colonIndex + 1, range[1]], + }), + range, + }); + this.registerTSNodeInNodeMap(node, result); + return result; + } + return this.convertJSXIdentifier(node); + } + /** + * Converts a TypeScript JSX node.tagName into an ESTree node.name + * @param node the tagName object from a JSX ts.Node + * @param parent + * @returns the converted ESTree name object + */ + convertJSXTagName(node, parent) { + let result; + switch (node.kind) { + case SyntaxKind.PropertyAccessExpression: + if (node.name.kind === SyntaxKind.PrivateIdentifier) { + // This is one of the few times where TS explicitly errors, and doesn't even gracefully handle the syntax. + // So we shouldn't ever get into this state to begin with. + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, node.name, 'Non-private identifier expected.'); + } + result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXMemberExpression, + object: this.convertJSXTagName(node.expression, parent), + property: this.convertJSXIdentifier(node.name), + }); + break; + case SyntaxKind.ThisKeyword: + case SyntaxKind.Identifier: + default: + return this.convertJSXNamespaceOrIdentifier(node); + } + this.registerTSNodeInNodeMap(node, result); + return result; + } + convertMethodSignature(node) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSMethodSignature, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + computed: (0, node_utils_1.isComputedProperty)(node.name), + key: this.convertChild(node.name), + kind: (() => { + switch (node.kind) { + case SyntaxKind.GetAccessor: + return 'get'; + case SyntaxKind.SetAccessor: + return 'set'; + case SyntaxKind.MethodSignature: + return 'method'; + } + })(), + optional: (0, node_utils_1.isOptional)(node), + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + } + convertAssertClasue(node) { + return node === undefined + ? [] + : node.elements.map(element => this.convertChild(element)); + } + /** + * Uses the provided range location to adjust the location data of the given Node + * @param result The node that will have its location data mutated + * @param childRange The child node range used to expand location + */ + fixParentLocation(result, childRange) { + if (childRange[0] < result.range[0]) { + result.range[0] = childRange[0]; + result.loc.start = (0, node_utils_1.getLineAndCharacterFor)(result.range[0], this.ast); + } + if (childRange[1] > result.range[1]) { + result.range[1] = childRange[1]; + result.loc.end = (0, node_utils_1.getLineAndCharacterFor)(result.range[1], this.ast); + } + } + assertModuleSpecifier(node, allowNull) { + if (!allowNull && node.moduleSpecifier == null) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node, 'Module specifier must be a string literal.'); + } + if (node.moduleSpecifier && + node.moduleSpecifier?.kind !== SyntaxKind.StringLiteral) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node.moduleSpecifier, 'Module specifier must be a string literal.'); + } + } + /** + * Converts a TypeScript node into an ESTree node. + * The core of the conversion logic: + * Identify and convert each relevant TypeScript SyntaxKind + * @param node the child ts.Node + * @param parent parentNode + * @returns the converted ESTree node + */ + convertNode(node, parent) { + switch (node.kind) { + case SyntaxKind.SourceFile: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Program, + body: this.convertBodyExpressions(node.statements, node), + comments: undefined, + range: [node.getStart(this.ast), node.endOfFileToken.end], + sourceType: node.externalModuleIndicator ? 'module' : 'script', + tokens: undefined, + }); + } + case SyntaxKind.Block: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.BlockStatement, + body: this.convertBodyExpressions(node.statements, node), + }); + } + case SyntaxKind.Identifier: { + if ((0, node_utils_1.isThisInTypeQuery)(node)) { + // special case for `typeof this.foo` - TS emits an Identifier for `this` + // but we want to treat it as a ThisExpression for consistency + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ThisExpression, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Identifier, + decorators: [], + name: node.text, + optional: false, + typeAnnotation: undefined, + }); + } + case SyntaxKind.PrivateIdentifier: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.PrivateIdentifier, + // typescript includes the `#` in the text + name: node.text.slice(1), + }); + } + case SyntaxKind.WithStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.WithStatement, + object: this.convertChild(node.expression), + body: this.convertChild(node.statement), + }); + // Control Flow + case SyntaxKind.ReturnStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ReturnStatement, + argument: this.convertChild(node.expression), + }); + case SyntaxKind.LabeledStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.LabeledStatement, + label: this.convertChild(node.label), + body: this.convertChild(node.statement), + }); + case SyntaxKind.ContinueStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ContinueStatement, + label: this.convertChild(node.label), + }); + case SyntaxKind.BreakStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.BreakStatement, + label: this.convertChild(node.label), + }); + // Choice + case SyntaxKind.IfStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.IfStatement, + test: this.convertChild(node.expression), + consequent: this.convertChild(node.thenStatement), + alternate: this.convertChild(node.elseStatement), + }); + case SyntaxKind.SwitchStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.SwitchStatement, + discriminant: this.convertChild(node.expression), + cases: node.caseBlock.clauses.map(el => this.convertChild(el)), + }); + case SyntaxKind.CaseClause: + case SyntaxKind.DefaultClause: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.SwitchCase, + // expression is present in case only + test: node.kind === SyntaxKind.CaseClause + ? this.convertChild(node.expression) + : null, + consequent: node.statements.map(el => this.convertChild(el)), + }); + // Exceptions + case SyntaxKind.ThrowStatement: + if (node.expression.end === node.expression.pos) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node, 'A throw statement must throw an expression.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ThrowStatement, + argument: this.convertChild(node.expression), + }); + case SyntaxKind.TryStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TryStatement, + block: this.convertChild(node.tryBlock), + handler: this.convertChild(node.catchClause), + finalizer: this.convertChild(node.finallyBlock), + }); + case SyntaxKind.CatchClause: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.CatchClause, + param: node.variableDeclaration + ? this.convertBindingNameWithTypeAnnotation(node.variableDeclaration.name, node.variableDeclaration.type) + : null, + body: this.convertChild(node.block), + }); + // Loops + case SyntaxKind.WhileStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.WhileStatement, + test: this.convertChild(node.expression), + body: this.convertChild(node.statement), + }); + /** + * Unlike other parsers, TypeScript calls a "DoWhileStatement" + * a "DoStatement" + */ + case SyntaxKind.DoStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.DoWhileStatement, + test: this.convertChild(node.expression), + body: this.convertChild(node.statement), + }); + case SyntaxKind.ForStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ForStatement, + init: this.convertChild(node.initializer), + test: this.convertChild(node.condition), + update: this.convertChild(node.incrementor), + body: this.convertChild(node.statement), + }); + case SyntaxKind.ForInStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ForInStatement, + left: this.convertPattern(node.initializer), + right: this.convertChild(node.expression), + body: this.convertChild(node.statement), + }); + case SyntaxKind.ForOfStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ForOfStatement, + left: this.convertPattern(node.initializer), + right: this.convertChild(node.expression), + body: this.convertChild(node.statement), + await: Boolean(node.awaitModifier && + node.awaitModifier.kind === SyntaxKind.AwaitKeyword), + }); + // Declarations + case SyntaxKind.FunctionDeclaration: { + const isDeclare = (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node); + const result = this.createNode(node, { + type: isDeclare || !node.body + ? ts_estree_1.AST_NODE_TYPES.TSDeclareFunction + : ts_estree_1.AST_NODE_TYPES.FunctionDeclaration, + async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node), + body: this.convertChild(node.body) || undefined, + declare: isDeclare, + expression: false, + generator: !!node.asteriskToken, + id: this.convertChild(node.name), + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + return this.fixExports(node, result); + } + case SyntaxKind.VariableDeclaration: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.VariableDeclarator, + definite: !!node.exclamationToken, + id: this.convertBindingNameWithTypeAnnotation(node.name, node.type, node), + init: this.convertChild(node.initializer), + }); + } + case SyntaxKind.VariableStatement: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.VariableDeclaration, + declarations: node.declarationList.declarations.map(el => this.convertChild(el)), + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + kind: (0, node_utils_1.getDeclarationKind)(node.declarationList), + }); + if (!result.declarations.length) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node, 'A variable declaration list must have at least one variable declarator.'); + } + if (result.kind === 'using' || result.kind === 'await using') { + node.declarationList.declarations.forEach((declaration, i) => { + if (result.declarations[i].init == null) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration, `'${result.kind}' declarations must be initialized.`); + } + if (result.declarations[i].id.type !== ts_estree_1.AST_NODE_TYPES.Identifier) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration.name, `'${result.kind}' declarations may not have binding patterns.`); + } + }); + } + /** + * Semantically, decorators are not allowed on variable declarations, + * Pre 4.8 TS would include them in the AST, so we did as well. + * However as of 4.8 TS no longer includes it (as it is, well, invalid). + * + * So for consistency across versions, we no longer include it either. + */ + return this.fixExports(node, result); + } + // mostly for for-of, for-in + case SyntaxKind.VariableDeclarationList: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.VariableDeclaration, + declarations: node.declarations.map(el => this.convertChild(el)), + declare: false, + kind: (0, node_utils_1.getDeclarationKind)(node), + }); + if (result.kind === 'using' || result.kind === 'await using') { + node.declarations.forEach((declaration, i) => { + if (result.declarations[i].init != null) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration, `'${result.kind}' declarations may not be initialized in for statement.`); + } + if (result.declarations[i].id.type !== ts_estree_1.AST_NODE_TYPES.Identifier) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration.name, `'${result.kind}' declarations may not have binding patterns.`); + } + }); + } + return result; + } + // Expressions + case SyntaxKind.ExpressionStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExpressionStatement, + directive: undefined, + expression: this.convertChild(node.expression), + }); + case SyntaxKind.ThisKeyword: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ThisExpression, + }); + case SyntaxKind.ArrayLiteralExpression: { + // TypeScript uses ArrayLiteralExpression in destructuring assignment, too + if (this.allowPattern) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ArrayPattern, + decorators: [], + elements: node.elements.map(el => this.convertPattern(el)), + optional: false, + typeAnnotation: undefined, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ArrayExpression, + elements: node.elements.map(el => this.convertChild(el)), + }); + } + case SyntaxKind.ObjectLiteralExpression: { + // TypeScript uses ObjectLiteralExpression in destructuring assignment, too + if (this.allowPattern) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ObjectPattern, + decorators: [], + optional: false, + properties: node.properties.map(el => this.convertPattern(el)), + typeAnnotation: undefined, + }); + } + const properties = []; + for (const property of node.properties) { + if ((property.kind === SyntaxKind.GetAccessor || + property.kind === SyntaxKind.SetAccessor || + property.kind === SyntaxKind.MethodDeclaration) && + !property.body) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, property.end - 1, "'{' expected."); + } + properties.push(this.convertChild(property)); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ObjectExpression, + properties, + }); + } + case SyntaxKind.PropertyAssignment: { + // eslint-disable-next-line deprecation/deprecation + const { questionToken, exclamationToken } = node; + if (questionToken) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, questionToken, 'A property assignment cannot have a question token.'); + } + if (exclamationToken) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, exclamationToken, 'A property assignment cannot have an exclamation token.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + key: this.convertChild(node.name), + value: this.converter(node.initializer, node, this.allowPattern), + computed: (0, node_utils_1.isComputedProperty)(node.name), + method: false, + optional: false, + shorthand: false, + kind: 'init', + }); + } + case SyntaxKind.ShorthandPropertyAssignment: { + // eslint-disable-next-line deprecation/deprecation + const { modifiers, questionToken, exclamationToken } = node; + if (modifiers) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifiers[0], 'A shorthand property assignment cannot have modifiers.'); + } + if (questionToken) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, questionToken, 'A shorthand property assignment cannot have a question token.'); + } + if (exclamationToken) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, exclamationToken, 'A shorthand property assignment cannot have an exclamation token.'); + } + if (node.objectAssignmentInitializer) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + key: this.convertChild(node.name), + value: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern, + decorators: [], + left: this.convertPattern(node.name), + optional: false, + right: this.convertChild(node.objectAssignmentInitializer), + typeAnnotation: undefined, + }), + computed: false, + method: false, + optional: false, + shorthand: true, + kind: 'init', + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + computed: false, + key: this.convertChild(node.name), + kind: 'init', + method: false, + optional: false, + shorthand: true, + value: this.convertChild(node.name), + }); + } + case SyntaxKind.ComputedPropertyName: + return this.convertChild(node.expression); + case SyntaxKind.PropertyDeclaration: { + const isAbstract = (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node); + if (isAbstract && node.initializer) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, node.initializer, `Abstract property cannot have an initializer.`); + } + const isAccessor = (0, node_utils_1.hasModifier)(SyntaxKind.AccessorKeyword, node); + const type = (() => { + if (isAccessor) { + if (isAbstract) { + return ts_estree_1.AST_NODE_TYPES.TSAbstractAccessorProperty; + } + return ts_estree_1.AST_NODE_TYPES.AccessorProperty; + } + if (isAbstract) { + return ts_estree_1.AST_NODE_TYPES.TSAbstractPropertyDefinition; + } + return ts_estree_1.AST_NODE_TYPES.PropertyDefinition; + })(); + const key = this.convertChild(node.name); + return this.createNode(node, { + type, + key, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + value: isAbstract ? null : this.convertChild(node.initializer), + computed: (0, node_utils_1.isComputedProperty)(node.name), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node), + decorators: (0, getModifiers_1.getDecorators)(node)?.map(el => this.convertChild(el)) ?? [], + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + override: (0, node_utils_1.hasModifier)(SyntaxKind.OverrideKeyword, node), + typeAnnotation: node.type && this.convertTypeAnnotation(node.type, node), + optional: (key.type === ts_estree_1.AST_NODE_TYPES.Literal || + node.name.kind === SyntaxKind.Identifier || + node.name.kind === SyntaxKind.ComputedPropertyName || + node.name.kind === SyntaxKind.PrivateIdentifier) && + !!node.questionToken, + definite: !!node.exclamationToken, + }); + } + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: { + if (node.parent.kind === SyntaxKind.InterfaceDeclaration || + node.parent.kind === SyntaxKind.TypeLiteral) { + return this.convertMethodSignature(node); + } + } + // otherwise, it is a non-type accessor - intentional fallthrough + case SyntaxKind.MethodDeclaration: { + const method = this.createNode(node, { + type: !node.body + ? ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression + : ts_estree_1.AST_NODE_TYPES.FunctionExpression, + id: null, + generator: !!node.asteriskToken, + expression: false, + async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node), + body: this.convertChild(node.body), + declare: false, + range: [node.parameters.pos - 1, node.end], + params: [], + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + if (method.typeParameters) { + this.fixParentLocation(method, method.typeParameters.range); + } + let result; + if (parent.kind === SyntaxKind.ObjectLiteralExpression) { + method.params = node.parameters.map(el => this.convertChild(el)); + result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + key: this.convertChild(node.name), + value: method, + computed: (0, node_utils_1.isComputedProperty)(node.name), + optional: !!node.questionToken, + method: node.kind === SyntaxKind.MethodDeclaration, + shorthand: false, + kind: 'init', + }); + } + else { + // class + /** + * Unlike in object literal methods, class method params can have decorators + */ + method.params = this.convertParameters(node.parameters); + /** + * TypeScript class methods can be defined as "abstract" + */ + const methodDefinitionType = (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node) + ? ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition + : ts_estree_1.AST_NODE_TYPES.MethodDefinition; + result = this.createNode(node, { + type: methodDefinitionType, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + computed: (0, node_utils_1.isComputedProperty)(node.name), + decorators: (0, getModifiers_1.getDecorators)(node)?.map(el => this.convertChild(el)) ?? [], + key: this.convertChild(node.name), + kind: 'method', + optional: !!node.questionToken, + override: (0, node_utils_1.hasModifier)(SyntaxKind.OverrideKeyword, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + value: method, + }); + } + if (node.kind === SyntaxKind.GetAccessor) { + result.kind = 'get'; + } + else if (node.kind === SyntaxKind.SetAccessor) { + result.kind = 'set'; + } + else if (!result.static && + node.name.kind === SyntaxKind.StringLiteral && + node.name.text === 'constructor' && + result.type !== ts_estree_1.AST_NODE_TYPES.Property) { + result.kind = 'constructor'; + } + return result; + } + // TypeScript uses this even for static methods named "constructor" + case SyntaxKind.Constructor: { + const lastModifier = (0, node_utils_1.getLastModifier)(node); + const constructorToken = (lastModifier && (0, node_utils_1.findNextToken)(lastModifier, node, this.ast)) ?? + node.getFirstToken(); + const constructor = this.createNode(node, { + type: !node.body + ? ts_estree_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression + : ts_estree_1.AST_NODE_TYPES.FunctionExpression, + async: false, + body: this.convertChild(node.body), + declare: false, + expression: false, + generator: false, + id: null, + params: this.convertParameters(node.parameters), + range: [node.parameters.pos - 1, node.end], + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + if (constructor.typeParameters) { + this.fixParentLocation(constructor, constructor.typeParameters.range); + } + const constructorKey = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Identifier, + decorators: [], + name: 'constructor', + optional: false, + range: [constructorToken.getStart(this.ast), constructorToken.end], + typeAnnotation: undefined, + }); + const isStatic = (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node); + return this.createNode(node, { + type: (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node) + ? ts_estree_1.AST_NODE_TYPES.TSAbstractMethodDefinition + : ts_estree_1.AST_NODE_TYPES.MethodDefinition, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + computed: false, + decorators: [], + optional: false, + key: constructorKey, + kind: isStatic ? 'method' : 'constructor', + override: false, + static: isStatic, + value: constructor, + }); + } + case SyntaxKind.FunctionExpression: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.FunctionExpression, + async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node), + body: this.convertChild(node.body), + declare: false, + expression: false, + generator: !!node.asteriskToken, + id: this.convertChild(node.name), + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + } + case SyntaxKind.SuperKeyword: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Super, + }); + case SyntaxKind.ArrayBindingPattern: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ArrayPattern, + decorators: [], + elements: node.elements.map(el => this.convertPattern(el)), + optional: false, + typeAnnotation: undefined, + }); + // occurs with missing array elements like [,] + case SyntaxKind.OmittedExpression: + return null; + case SyntaxKind.ObjectBindingPattern: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ObjectPattern, + decorators: [], + optional: false, + properties: node.elements.map(el => this.convertPattern(el)), + typeAnnotation: undefined, + }); + case SyntaxKind.BindingElement: { + if (parent.kind === SyntaxKind.ArrayBindingPattern) { + const arrayItem = this.convertChild(node.name, parent); + if (node.initializer) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern, + decorators: [], + left: arrayItem, + optional: false, + right: this.convertChild(node.initializer), + typeAnnotation: undefined, + }); + } + else if (node.dotDotDotToken) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.RestElement, + argument: arrayItem, + decorators: [], + optional: false, + typeAnnotation: undefined, + value: undefined, + }); + } + return arrayItem; + } + let result; + if (node.dotDotDotToken) { + result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.RestElement, + argument: this.convertChild(node.propertyName ?? node.name), + decorators: [], + optional: false, + typeAnnotation: undefined, + value: undefined, + }); + } + else { + result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Property, + key: this.convertChild(node.propertyName ?? node.name), + value: this.convertChild(node.name), + computed: Boolean(node.propertyName && + node.propertyName.kind === SyntaxKind.ComputedPropertyName), + method: false, + optional: false, + shorthand: !node.propertyName, + kind: 'init', + }); + } + if (node.initializer) { + result.value = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern, + decorators: [], + left: this.convertChild(node.name), + optional: false, + range: [node.name.getStart(this.ast), node.initializer.end], + right: this.convertChild(node.initializer), + typeAnnotation: undefined, + }); + } + return result; + } + case SyntaxKind.ArrowFunction: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ArrowFunctionExpression, + generator: false, + id: null, + params: this.convertParameters(node.parameters), + body: this.convertChild(node.body), + async: (0, node_utils_1.hasModifier)(SyntaxKind.AsyncKeyword, node), + expression: node.body.kind !== SyntaxKind.Block, + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + } + case SyntaxKind.YieldExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.YieldExpression, + delegate: !!node.asteriskToken, + argument: this.convertChild(node.expression), + }); + case SyntaxKind.AwaitExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AwaitExpression, + argument: this.convertChild(node.expression), + }); + // Template Literals + case SyntaxKind.NoSubstitutionTemplateLiteral: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TemplateLiteral, + quasis: [ + this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TemplateElement, + value: { + raw: this.ast.text.slice(node.getStart(this.ast) + 1, node.end - 1), + cooked: node.text, + }, + tail: true, + }), + ], + expressions: [], + }); + case SyntaxKind.TemplateExpression: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TemplateLiteral, + quasis: [this.convertChild(node.head)], + expressions: [], + }); + node.templateSpans.forEach(templateSpan => { + result.expressions.push(this.convertChild(templateSpan.expression)); + result.quasis.push(this.convertChild(templateSpan.literal)); + }); + return result; + } + case SyntaxKind.TaggedTemplateExpression: + return this.createNode(node, __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, { + type: ts_estree_1.AST_NODE_TYPES.TaggedTemplateExpression, + typeArguments: node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node), + tag: this.convertChild(node.tag), + quasi: this.convertChild(node.template), + }, 'typeParameters', 'typeArguments')); + case SyntaxKind.TemplateHead: + case SyntaxKind.TemplateMiddle: + case SyntaxKind.TemplateTail: { + const tail = node.kind === SyntaxKind.TemplateTail; + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TemplateElement, + value: { + raw: this.ast.text.slice(node.getStart(this.ast) + 1, node.end - (tail ? 1 : 2)), + cooked: node.text, + }, + tail, + }); + } + // Patterns + case SyntaxKind.SpreadAssignment: + case SyntaxKind.SpreadElement: { + if (this.allowPattern) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.RestElement, + argument: this.convertPattern(node.expression), + decorators: [], + optional: false, + typeAnnotation: undefined, + value: undefined, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.SpreadElement, + argument: this.convertChild(node.expression), + }); + } + case SyntaxKind.Parameter: { + let parameter; + let result; + if (node.dotDotDotToken) { + parameter = result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.RestElement, + argument: this.convertChild(node.name), + decorators: [], + optional: false, + typeAnnotation: undefined, + value: undefined, + }); + } + else if (node.initializer) { + parameter = this.convertChild(node.name); + result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern, + decorators: [], + left: parameter, + optional: false, + right: this.convertChild(node.initializer), + typeAnnotation: undefined, + }); + const modifiers = (0, getModifiers_1.getModifiers)(node); + if (modifiers) { + // AssignmentPattern should not contain modifiers in range + result.range[0] = parameter.range[0]; + result.loc = (0, node_utils_1.getLocFor)(result.range, this.ast); + } + } + else { + parameter = result = this.convertChild(node.name, parent); + } + if (node.type) { + parameter.typeAnnotation = this.convertTypeAnnotation(node.type, node); + this.fixParentLocation(parameter, parameter.typeAnnotation.range); + } + if (node.questionToken) { + if (node.questionToken.end > parameter.range[1]) { + parameter.range[1] = node.questionToken.end; + parameter.loc.end = (0, node_utils_1.getLineAndCharacterFor)(parameter.range[1], this.ast); + } + parameter.optional = true; + } + const modifiers = (0, getModifiers_1.getModifiers)(node); + if (modifiers) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSParameterProperty, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + decorators: [], + override: (0, node_utils_1.hasModifier)(SyntaxKind.OverrideKeyword, node), + parameter: result, + readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + }); + } + return result; + } + // Classes + case SyntaxKind.ClassDeclaration: + if (!node.name && + (!(0, node_utils_1.hasModifier)(ts.SyntaxKind.ExportKeyword, node) || + !(0, node_utils_1.hasModifier)(ts.SyntaxKind.DefaultKeyword, node))) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node, "A class declaration without the 'default' modifier must have a name."); + } + /* intentional fallthrough */ + case SyntaxKind.ClassExpression: { + const heritageClauses = node.heritageClauses ?? []; + const classNodeType = node.kind === SyntaxKind.ClassDeclaration + ? ts_estree_1.AST_NODE_TYPES.ClassDeclaration + : ts_estree_1.AST_NODE_TYPES.ClassExpression; + let extendsClause; + let implementsClause; + for (const heritageClause of heritageClauses) { + const { token, types } = heritageClause; + if (types.length === 0) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, heritageClause, `'${ts.tokenToString(token)}' list cannot be empty.`); + } + if (token === SyntaxKind.ExtendsKeyword) { + if (extendsClause) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, heritageClause, "'extends' clause already seen."); + } + if (implementsClause) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, heritageClause, "'extends' clause must precede 'implements' clause."); + } + if (types.length > 1) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, types[1], 'Classes can only extend a single class.'); + } + extendsClause ??= heritageClause; + } + else if (token === SyntaxKind.ImplementsKeyword) { + if (implementsClause) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, heritageClause, "'implements' clause already seen."); + } + implementsClause ??= heritageClause; + } + } + const result = this.createNode(node, __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, { + type: classNodeType, + abstract: (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node), + body: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ClassBody, + body: node.members + .filter(node_utils_1.isESTreeClassMember) + .map(el => this.convertChild(el)), + range: [node.members.pos - 1, node.end], + }), + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + decorators: (0, getModifiers_1.getDecorators)(node)?.map(el => this.convertChild(el)) ?? [], + id: this.convertChild(node.name), + implements: implementsClause?.types.map(el => this.convertChild(el)) ?? [], + superClass: extendsClause?.types[0] + ? this.convertChild(extendsClause.types[0].expression) + : null, + superTypeArguments: undefined, + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }, 'superTypeParameters', 'superTypeArguments')); + if (extendsClause?.types[0]?.typeArguments) { + result.superTypeArguments = + this.convertTypeArgumentsToTypeParameterInstantiation(extendsClause.types[0].typeArguments, extendsClause.types[0]); + } + return this.fixExports(node, result); + } + // Modules + case SyntaxKind.ModuleBlock: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSModuleBlock, + body: this.convertBodyExpressions(node.statements, node), + }); + case SyntaxKind.ImportDeclaration: { + this.assertModuleSpecifier(node, false); + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ImportDeclaration, + source: this.convertChild(node.moduleSpecifier), + specifiers: [], + importKind: 'value', + assertions: this.convertAssertClasue(node.assertClause), + }); + if (node.importClause) { + if (node.importClause.isTypeOnly) { + result.importKind = 'type'; + } + if (node.importClause.name) { + result.specifiers.push(this.convertChild(node.importClause)); + } + if (node.importClause.namedBindings) { + switch (node.importClause.namedBindings.kind) { + case SyntaxKind.NamespaceImport: + result.specifiers.push(this.convertChild(node.importClause.namedBindings)); + break; + case SyntaxKind.NamedImports: + result.specifiers = result.specifiers.concat(node.importClause.namedBindings.elements.map(el => this.convertChild(el))); + break; + } + } + } + return result; + } + case SyntaxKind.NamespaceImport: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ImportNamespaceSpecifier, + local: this.convertChild(node.name), + }); + case SyntaxKind.ImportSpecifier: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ImportSpecifier, + local: this.convertChild(node.name), + imported: this.convertChild(node.propertyName ?? node.name), + importKind: node.isTypeOnly ? 'type' : 'value', + }); + case SyntaxKind.ImportClause: { + const local = this.convertChild(node.name); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ImportDefaultSpecifier, + local, + range: local.range, + }); + } + case SyntaxKind.ExportDeclaration: { + if (node.exportClause?.kind === SyntaxKind.NamedExports) { + this.assertModuleSpecifier(node, true); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExportNamedDeclaration, + source: this.convertChild(node.moduleSpecifier), + specifiers: node.exportClause.elements.map(el => this.convertChild(el)), + exportKind: node.isTypeOnly ? 'type' : 'value', + declaration: null, + assertions: this.convertAssertClasue(node.assertClause), + }); + } + this.assertModuleSpecifier(node, false); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExportAllDeclaration, + source: this.convertChild(node.moduleSpecifier), + exportKind: node.isTypeOnly ? 'type' : 'value', + exported: + // note - for compat with 3.7.x, where node.exportClause is always undefined and + // SyntaxKind.NamespaceExport does not exist yet (i.e. is undefined), this + // cannot be shortened to an optional chain, or else you end up with + // undefined === undefined, and the true path will hard error at runtime + node.exportClause && + node.exportClause.kind === SyntaxKind.NamespaceExport + ? this.convertChild(node.exportClause.name) + : null, + assertions: this.convertAssertClasue(node.assertClause), + }); + } + case SyntaxKind.ExportSpecifier: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExportSpecifier, + local: this.convertChild(node.propertyName ?? node.name), + exported: this.convertChild(node.name), + exportKind: node.isTypeOnly ? 'type' : 'value', + }); + case SyntaxKind.ExportAssignment: + if (node.isExportEquals) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSExportAssignment, + expression: this.convertChild(node.expression), + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ExportDefaultDeclaration, + declaration: this.convertChild(node.expression), + exportKind: 'value', + }); + // Unary Operations + case SyntaxKind.PrefixUnaryExpression: + case SyntaxKind.PostfixUnaryExpression: { + const operator = (0, node_utils_1.getTextForTokenKind)(node.operator); + /** + * ESTree uses UpdateExpression for ++/-- + */ + if (operator === '++' || operator === '--') { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.UpdateExpression, + operator, + prefix: node.kind === SyntaxKind.PrefixUnaryExpression, + argument: this.convertChild(node.operand), + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.UnaryExpression, + operator, + prefix: node.kind === SyntaxKind.PrefixUnaryExpression, + argument: this.convertChild(node.operand), + }); + } + case SyntaxKind.DeleteExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.UnaryExpression, + operator: 'delete', + prefix: true, + argument: this.convertChild(node.expression), + }); + case SyntaxKind.VoidExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.UnaryExpression, + operator: 'void', + prefix: true, + argument: this.convertChild(node.expression), + }); + case SyntaxKind.TypeOfExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.UnaryExpression, + operator: 'typeof', + prefix: true, + argument: this.convertChild(node.expression), + }); + case SyntaxKind.TypeOperator: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeOperator, + operator: (0, node_utils_1.getTextForTokenKind)(node.operator), + typeAnnotation: this.convertChild(node.type), + }); + // Binary Operations + case SyntaxKind.BinaryExpression: { + // TypeScript uses BinaryExpression for sequences as well + if ((0, node_utils_1.isComma)(node.operatorToken)) { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.SequenceExpression, + expressions: [], + }); + const left = this.convertChild(node.left); + if (left.type === ts_estree_1.AST_NODE_TYPES.SequenceExpression && + node.left.kind !== SyntaxKind.ParenthesizedExpression) { + result.expressions = result.expressions.concat(left.expressions); + } + else { + result.expressions.push(left); + } + result.expressions.push(this.convertChild(node.right)); + return result; + } + const expressionType = (0, node_utils_1.getBinaryExpressionType)(node.operatorToken); + if (this.allowPattern && + expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.AssignmentPattern, + decorators: [], + left: this.convertPattern(node.left, node), + optional: false, + right: this.convertChild(node.right), + typeAnnotation: undefined, + }); + } + return this.createNode(node, { + ...expressionType, + left: this.converter(node.left, node, expressionType.type === ts_estree_1.AST_NODE_TYPES.AssignmentExpression), + right: this.convertChild(node.right), + }); + } + case SyntaxKind.PropertyAccessExpression: { + const object = this.convertChild(node.expression); + const property = this.convertChild(node.name); + const computed = false; + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.MemberExpression, + object, + property, + computed, + optional: node.questionDotToken !== undefined, + }); + return this.convertChainExpression(result, node); + } + case SyntaxKind.ElementAccessExpression: { + const object = this.convertChild(node.expression); + const property = this.convertChild(node.argumentExpression); + const computed = true; + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.MemberExpression, + object, + property, + computed, + optional: node.questionDotToken !== undefined, + }); + return this.convertChainExpression(result, node); + } + case SyntaxKind.CallExpression: { + if (node.expression.kind === SyntaxKind.ImportKeyword) { + if (node.arguments.length !== 1 && node.arguments.length !== 2) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node.arguments[2] ?? node, 'Dynamic import requires exactly one or two arguments.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ImportExpression, + source: this.convertChild(node.arguments[0]), + attributes: node.arguments[1] + ? this.convertChild(node.arguments[1]) + : null, + }); + } + const callee = this.convertChild(node.expression); + const args = node.arguments.map(el => this.convertChild(el)); + const typeArguments = node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node); + const result = this.createNode(node, __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, { + type: ts_estree_1.AST_NODE_TYPES.CallExpression, + callee, + arguments: args, + optional: node.questionDotToken !== undefined, + typeArguments, + }, 'typeParameters', 'typeArguments')); + return this.convertChainExpression(result, node); + } + case SyntaxKind.NewExpression: { + const typeArguments = node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node); + // NOTE - NewExpression cannot have an optional chain in it + return this.createNode(node, __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, { + type: ts_estree_1.AST_NODE_TYPES.NewExpression, + arguments: node.arguments + ? node.arguments.map(el => this.convertChild(el)) + : [], + callee: this.convertChild(node.expression), + typeArguments, + }, 'typeParameters', 'typeArguments')); + } + case SyntaxKind.ConditionalExpression: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ConditionalExpression, + test: this.convertChild(node.condition), + consequent: this.convertChild(node.whenTrue), + alternate: this.convertChild(node.whenFalse), + }); + case SyntaxKind.MetaProperty: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.MetaProperty, + meta: this.createNode( + // TODO: do we really want to convert it to Token? + node.getFirstToken(), { + type: ts_estree_1.AST_NODE_TYPES.Identifier, + decorators: [], + name: (0, node_utils_1.getTextForTokenKind)(node.keywordToken), + optional: false, + typeAnnotation: undefined, + }), + property: this.convertChild(node.name), + }); + } + case SyntaxKind.Decorator: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Decorator, + expression: this.convertChild(node.expression), + }); + } + // Literals + case SyntaxKind.StringLiteral: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + value: parent.kind === SyntaxKind.JsxAttribute + ? (0, node_utils_1.unescapeStringLiteralText)(node.text) + : node.text, + raw: node.getText(), + }); + } + case SyntaxKind.NumericLiteral: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + value: Number(node.text), + raw: node.getText(), + }); + } + case SyntaxKind.BigIntLiteral: { + const range = (0, node_utils_1.getRange)(node, this.ast); + const rawValue = this.ast.text.slice(range[0], range[1]); + const bigint = rawValue + // remove suffix `n` + .slice(0, -1) + // `BigInt` doesn't accept numeric separator + // and `bigint` property should not include numeric separator + .replace(/_/g, ''); + const value = typeof BigInt !== 'undefined' ? BigInt(bigint) : null; + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + raw: rawValue, + value: value, + bigint: value == null ? bigint : String(value), + range, + }); + } + case SyntaxKind.RegularExpressionLiteral: { + const pattern = node.text.slice(1, node.text.lastIndexOf('/')); + const flags = node.text.slice(node.text.lastIndexOf('/') + 1); + let regex = null; + try { + regex = new RegExp(pattern, flags); + } + catch { + // Intentionally blank, so regex stays null + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + value: regex, + raw: node.text, + regex: { + pattern, + flags, + }, + }); + } + case SyntaxKind.TrueKeyword: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + value: true, + raw: 'true', + }); + case SyntaxKind.FalseKeyword: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + value: false, + raw: 'false', + }); + case SyntaxKind.NullKeyword: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.Literal, + value: null, + raw: 'null', + }); + } + case SyntaxKind.EmptyStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.EmptyStatement, + }); + case SyntaxKind.DebuggerStatement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.DebuggerStatement, + }); + // JSX + case SyntaxKind.JsxElement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXElement, + openingElement: this.convertChild(node.openingElement), + closingElement: this.convertChild(node.closingElement), + children: node.children.map(el => this.convertChild(el)), + }); + case SyntaxKind.JsxFragment: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXFragment, + openingFragment: this.convertChild(node.openingFragment), + closingFragment: this.convertChild(node.closingFragment), + children: node.children.map(el => this.convertChild(el)), + }); + case SyntaxKind.JsxSelfClosingElement: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXElement, + /** + * Convert SyntaxKind.JsxSelfClosingElement to SyntaxKind.JsxOpeningElement, + * TypeScript does not seem to have the idea of openingElement when tag is self-closing + */ + openingElement: this.createNode(node, __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, { + type: ts_estree_1.AST_NODE_TYPES.JSXOpeningElement, + typeArguments: node.typeArguments + ? this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node) + : undefined, + selfClosing: true, + name: this.convertJSXTagName(node.tagName, node), + attributes: node.attributes.properties.map(el => this.convertChild(el)), + range: (0, node_utils_1.getRange)(node, this.ast), + }, 'typeParameters', 'typeArguments')), + closingElement: null, + children: [], + }); + } + case SyntaxKind.JsxOpeningElement: { + return this.createNode(node, __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, { + type: ts_estree_1.AST_NODE_TYPES.JSXOpeningElement, + typeArguments: node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node), + selfClosing: false, + name: this.convertJSXTagName(node.tagName, node), + attributes: node.attributes.properties.map(el => this.convertChild(el)), + }, 'typeParameters', 'typeArguments')); + } + case SyntaxKind.JsxClosingElement: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXClosingElement, + name: this.convertJSXTagName(node.tagName, node), + }); + case SyntaxKind.JsxOpeningFragment: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXOpeningFragment, + }); + case SyntaxKind.JsxClosingFragment: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXClosingFragment, + }); + case SyntaxKind.JsxExpression: { + const expression = node.expression + ? this.convertChild(node.expression) + : this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXEmptyExpression, + range: [node.getStart(this.ast) + 1, node.getEnd() - 1], + }); + if (node.dotDotDotToken) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXSpreadChild, + expression, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXExpressionContainer, + expression, + }); + } + case SyntaxKind.JsxAttribute: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXAttribute, + name: this.convertJSXNamespaceOrIdentifier(node.name), + value: this.convertChild(node.initializer), + }); + } + case SyntaxKind.JsxText: { + const start = node.getFullStart(); + const end = node.getEnd(); + const text = this.ast.text.slice(start, end); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXText, + value: (0, node_utils_1.unescapeStringLiteralText)(text), + raw: text, + range: [start, end], + }); + } + case SyntaxKind.JsxSpreadAttribute: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.JSXSpreadAttribute, + argument: this.convertChild(node.expression), + }); + case SyntaxKind.QualifiedName: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSQualifiedName, + left: this.convertChild(node.left), + right: this.convertChild(node.right), + }); + } + // TypeScript specific + case SyntaxKind.TypeReference: + return this.createNode(node, __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeReference, + typeName: this.convertChild(node.typeName), + typeArguments: node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node), + }, 'typeParameters', 'typeArguments')); + case SyntaxKind.TypeParameter: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeParameter, + name: this.convertChild(node.name), + constraint: node.constraint && this.convertChild(node.constraint), + default: node.default ? this.convertChild(node.default) : undefined, + in: (0, node_utils_1.hasModifier)(SyntaxKind.InKeyword, node), + out: (0, node_utils_1.hasModifier)(SyntaxKind.OutKeyword, node), + const: (0, node_utils_1.hasModifier)(SyntaxKind.ConstKeyword, node), + }); + } + case SyntaxKind.ThisType: + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSThisType, + }); + case SyntaxKind.AnyKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.BooleanKeyword: + case SyntaxKind.NeverKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.ObjectKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.SymbolKeyword: + case SyntaxKind.UnknownKeyword: + case SyntaxKind.VoidKeyword: + case SyntaxKind.UndefinedKeyword: + case SyntaxKind.IntrinsicKeyword: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES[`TS${SyntaxKind[node.kind]}`], + }); + } + case SyntaxKind.NonNullExpression: { + const nnExpr = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSNonNullExpression, + expression: this.convertChild(node.expression), + }); + return this.convertChainExpression(nnExpr, node); + } + case SyntaxKind.TypeLiteral: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeLiteral, + members: node.members.map(el => this.convertChild(el)), + }); + } + case SyntaxKind.ArrayType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSArrayType, + elementType: this.convertChild(node.elementType), + }); + } + case SyntaxKind.IndexedAccessType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSIndexedAccessType, + objectType: this.convertChild(node.objectType), + indexType: this.convertChild(node.indexType), + }); + } + case SyntaxKind.ConditionalType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSConditionalType, + checkType: this.convertChild(node.checkType), + extendsType: this.convertChild(node.extendsType), + trueType: this.convertChild(node.trueType), + falseType: this.convertChild(node.falseType), + }); + } + case SyntaxKind.TypeQuery: + return this.createNode(node, __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeQuery, + exprName: this.convertChild(node.exprName), + typeArguments: node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node), + }, 'typeParameters', 'typeArguments')); + case SyntaxKind.MappedType: { + if (node.members && node.members.length > 0) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node.members[0], 'A mapped type may not declare properties or methods.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSMappedType, + nameType: this.convertChild(node.nameType) ?? null, + optional: node.questionToken && + (node.questionToken.kind === SyntaxKind.QuestionToken || + (0, node_utils_1.getTextForTokenKind)(node.questionToken.kind)), + readonly: node.readonlyToken && + (node.readonlyToken.kind === SyntaxKind.ReadonlyKeyword || + (0, node_utils_1.getTextForTokenKind)(node.readonlyToken.kind)), + typeAnnotation: node.type && this.convertChild(node.type), + typeParameter: this.convertChild(node.typeParameter), + }); + } + case SyntaxKind.ParenthesizedExpression: + return this.convertChild(node.expression, parent); + case SyntaxKind.TypeAliasDeclaration: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeAliasDeclaration, + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + id: this.convertChild(node.name), + typeAnnotation: this.convertChild(node.type), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + return this.fixExports(node, result); + } + case SyntaxKind.MethodSignature: { + return this.convertMethodSignature(node); + } + case SyntaxKind.PropertySignature: { + // eslint-disable-next-line deprecation/deprecation + const { initializer } = node; + if (initializer) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, initializer, 'A property signature cannot have an initializer.'); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSPropertySignature, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + computed: (0, node_utils_1.isComputedProperty)(node.name), + key: this.convertChild(node.name), + optional: (0, node_utils_1.isOptional)(node), + readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + typeAnnotation: node.type && this.convertTypeAnnotation(node.type, node), + }); + } + case SyntaxKind.IndexSignature: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSIndexSignature, + accessibility: (0, node_utils_1.getTSNodeAccessibility)(node), + parameters: node.parameters.map(el => this.convertChild(el)), + readonly: (0, node_utils_1.hasModifier)(SyntaxKind.ReadonlyKeyword, node), + static: (0, node_utils_1.hasModifier)(SyntaxKind.StaticKeyword, node), + typeAnnotation: node.type && this.convertTypeAnnotation(node.type, node), + }); + } + case SyntaxKind.ConstructorType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSConstructorType, + abstract: (0, node_utils_1.hasModifier)(SyntaxKind.AbstractKeyword, node), + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + } + case SyntaxKind.FunctionType: { + // eslint-disable-next-line deprecation/deprecation + const { modifiers } = node; + if (modifiers) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifiers[0], 'A function type cannot have modifiers.'); + } + } + // intentional fallthrough + case SyntaxKind.ConstructSignature: + case SyntaxKind.CallSignature: { + const type = node.kind === SyntaxKind.ConstructSignature + ? ts_estree_1.AST_NODE_TYPES.TSConstructSignatureDeclaration + : node.kind === SyntaxKind.CallSignature + ? ts_estree_1.AST_NODE_TYPES.TSCallSignatureDeclaration + : ts_estree_1.AST_NODE_TYPES.TSFunctionType; + return this.createNode(node, { + type, + params: this.convertParameters(node.parameters), + returnType: node.type && this.convertTypeAnnotation(node.type, node), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + } + case SyntaxKind.ExpressionWithTypeArguments: { + const parentKind = parent.kind; + const type = parentKind === SyntaxKind.InterfaceDeclaration + ? ts_estree_1.AST_NODE_TYPES.TSInterfaceHeritage + : parentKind === SyntaxKind.HeritageClause + ? ts_estree_1.AST_NODE_TYPES.TSClassImplements + : ts_estree_1.AST_NODE_TYPES.TSInstantiationExpression; + return this.createNode(node, __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, { + type, + expression: this.convertChild(node.expression), + typeArguments: node.typeArguments && + this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node), + }, 'typeParameters', 'typeArguments')); + } + case SyntaxKind.InterfaceDeclaration: { + const interfaceHeritageClauses = node.heritageClauses ?? []; + const interfaceExtends = []; + for (const heritageClause of interfaceHeritageClauses) { + if (heritageClause.token !== SyntaxKind.ExtendsKeyword) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, heritageClause, heritageClause.token === SyntaxKind.ImplementsKeyword + ? "Interface declaration cannot have 'implements' clause." + : 'Unexpected token.'); + } + for (const heritageType of heritageClause.types) { + interfaceExtends.push(this.convertChild(heritageType, node)); + } + } + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSInterfaceDeclaration, + body: this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSInterfaceBody, + body: node.members.map(member => this.convertChild(member)), + range: [node.members.pos - 1, node.end], + }), + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + extends: interfaceExtends, + id: this.convertChild(node.name), + typeParameters: node.typeParameters && + this.convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters), + }); + return this.fixExports(node, result); + } + case SyntaxKind.TypePredicate: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypePredicate, + asserts: node.assertsModifier !== undefined, + parameterName: this.convertChild(node.parameterName), + typeAnnotation: null, + }); + /** + * Specific fix for type-guard location data + */ + if (node.type) { + result.typeAnnotation = this.convertTypeAnnotation(node.type, node); + result.typeAnnotation.loc = result.typeAnnotation.typeAnnotation.loc; + result.typeAnnotation.range = + result.typeAnnotation.typeAnnotation.range; + } + return result; + } + case SyntaxKind.ImportType: { + const range = (0, node_utils_1.getRange)(node, this.ast); + if (node.isTypeOf) { + const token = (0, node_utils_1.findNextToken)(node.getFirstToken(), node, this.ast); + range[0] = token.getStart(this.ast); + } + const result = this.createNode(node, __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_withDeprecatedAliasGetter).call(this, { + type: ts_estree_1.AST_NODE_TYPES.TSImportType, + argument: this.convertChild(node.argument), + qualifier: this.convertChild(node.qualifier), + typeArguments: node.typeArguments + ? this.convertTypeArgumentsToTypeParameterInstantiation(node.typeArguments, node) + : null, + range: range, + }, 'typeParameters', 'typeArguments')); + if (node.isTypeOf) { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeQuery, + exprName: result, + typeArguments: undefined, + typeParameters: undefined, + }); + } + return result; + } + case SyntaxKind.EnumDeclaration: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSEnumDeclaration, + const: (0, node_utils_1.hasModifier)(SyntaxKind.ConstKeyword, node), + declare: (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node), + id: this.convertChild(node.name), + members: node.members.map(el => this.convertChild(el)), + }); + return this.fixExports(node, result); + } + case SyntaxKind.EnumMember: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSEnumMember, + computed: node.name.kind === ts.SyntaxKind.ComputedPropertyName, + id: this.convertChild(node.name), + initializer: node.initializer && this.convertChild(node.initializer), + }); + } + case SyntaxKind.ModuleDeclaration: { + let isDeclare = (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node); + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSModuleDeclaration, + ...(() => { + // the constraints checked by this function are syntactically enforced by TS + // the checks mostly exist for type's sake + if (node.flags & ts.NodeFlags.GlobalAugmentation) { + const id = this.convertChild(node.name); + const body = this.convertChild(node.body); + if (body == null || + body.type === ts_estree_1.AST_NODE_TYPES.TSModuleDeclaration) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node.body ?? node, 'Expected a valid module body'); + } + if (id.type !== ts_estree_1.AST_NODE_TYPES.Identifier) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node.name, 'global module augmentation must have an Identifier id'); + } + return { + kind: 'global', + body: body, + declare: false, + global: false, + id, + }; + } + if (!(node.flags & ts.NodeFlags.Namespace)) { + const body = this.convertChild(node.body); + return { + kind: 'module', + ...(body != null ? { body } : {}), + declare: false, + global: false, + id: this.convertChild(node.name), + }; + } + // Nested module declarations are stored in TypeScript as nested tree nodes. + // We "unravel" them here by making our own nested TSQualifiedName, + // with the innermost node's body as the actual node body. + if (node.body == null) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node, 'Expected a module body'); + } + if (node.name.kind !== ts.SyntaxKind.Identifier) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node.name, '`namespace`s must have an Identifier id'); + } + let name = this.createNode(node.name, { + decorators: [], + name: node.name.text, + optional: false, + range: [node.name.getStart(this.ast), node.name.getEnd()], + type: ts_estree_1.AST_NODE_TYPES.Identifier, + typeAnnotation: undefined, + }); + while (node.body && + ts.isModuleDeclaration(node.body) && + node.body.name) { + node = node.body; + isDeclare ||= (0, node_utils_1.hasModifier)(SyntaxKind.DeclareKeyword, node); + const nextName = node.name; + const right = this.createNode(nextName, { + decorators: [], + name: nextName.text, + optional: false, + range: [nextName.getStart(this.ast), nextName.getEnd()], + type: ts_estree_1.AST_NODE_TYPES.Identifier, + typeAnnotation: undefined, + }); + name = this.createNode(nextName, { + left: name, + right: right, + range: [name.range[0], right.range[1]], + type: ts_estree_1.AST_NODE_TYPES.TSQualifiedName, + }); + } + return { + kind: 'namespace', + body: this.convertChild(node.body), + declare: false, + global: false, + id: name, + }; + })(), + }); + result.declare = isDeclare; + if (node.flags & ts.NodeFlags.GlobalAugmentation) { + result.global = true; + } + return this.fixExports(node, result); + } + // TypeScript specific types + case SyntaxKind.ParenthesizedType: { + return this.convertChild(node.type); + } + case SyntaxKind.UnionType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSUnionType, + types: node.types.map(el => this.convertChild(el)), + }); + } + case SyntaxKind.IntersectionType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSIntersectionType, + types: node.types.map(el => this.convertChild(el)), + }); + } + case SyntaxKind.AsExpression: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSAsExpression, + expression: this.convertChild(node.expression), + typeAnnotation: this.convertChild(node.type), + }); + } + case SyntaxKind.InferType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSInferType, + typeParameter: this.convertChild(node.typeParameter), + }); + } + case SyntaxKind.LiteralType: { + if (node.literal.kind === SyntaxKind.NullKeyword) { + // 4.0 started nesting null types inside a LiteralType node + // but our AST is designed around the old way of null being a keyword + return this.createNode(node.literal, { + type: ts_estree_1.AST_NODE_TYPES.TSNullKeyword, + }); + } + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSLiteralType, + literal: this.convertChild(node.literal), + }); + } + case SyntaxKind.TypeAssertionExpression: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTypeAssertion, + typeAnnotation: this.convertChild(node.type), + expression: this.convertChild(node.expression), + }); + } + case SyntaxKind.ImportEqualsDeclaration: { + return this.fixExports(node, this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSImportEqualsDeclaration, + id: this.convertChild(node.name), + importKind: node.isTypeOnly ? 'type' : 'value', + moduleReference: this.convertChild(node.moduleReference), + })); + } + case SyntaxKind.ExternalModuleReference: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSExternalModuleReference, + expression: this.convertChild(node.expression), + }); + } + case SyntaxKind.NamespaceExportDeclaration: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSNamespaceExportDeclaration, + id: this.convertChild(node.name), + }); + } + case SyntaxKind.AbstractKeyword: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSAbstractKeyword, + }); + } + // Tuple + case SyntaxKind.TupleType: { + // In TS 4.0, the `elementTypes` property was changed to `elements`. + // To support both at compile time, we cast to access the newer version + // if the former does not exist. + const elementTypes = 'elementTypes' in node + ? node.elementTypes.map((el) => this.convertChild(el)) + : node.elements.map(el => this.convertChild(el)); + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTupleType, + elementTypes, + }); + } + case SyntaxKind.NamedTupleMember: { + const member = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSNamedTupleMember, + elementType: this.convertChild(node.type, node), + label: this.convertChild(node.name, node), + optional: node.questionToken != null, + }); + if (node.dotDotDotToken) { + // adjust the start to account for the "..." + member.range[0] = member.label.range[0]; + member.loc.start = member.label.loc.start; + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSRestType, + typeAnnotation: member, + }); + } + return member; + } + case SyntaxKind.OptionalType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSOptionalType, + typeAnnotation: this.convertChild(node.type), + }); + } + case SyntaxKind.RestType: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSRestType, + typeAnnotation: this.convertChild(node.type), + }); + } + // Template Literal Types + case SyntaxKind.TemplateLiteralType: { + const result = this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSTemplateLiteralType, + quasis: [this.convertChild(node.head)], + types: [], + }); + node.templateSpans.forEach(templateSpan => { + result.types.push(this.convertChild(templateSpan.type)); + result.quasis.push(this.convertChild(templateSpan.literal)); + }); + return result; + } + case SyntaxKind.ClassStaticBlockDeclaration: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.StaticBlock, + body: this.convertBodyExpressions(node.body.statements, node), + }); + } + case SyntaxKind.AssertEntry: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.ImportAttribute, + key: this.convertChild(node.name), + value: this.convertChild(node.value), + }); + } + case SyntaxKind.SatisfiesExpression: { + return this.createNode(node, { + type: ts_estree_1.AST_NODE_TYPES.TSSatisfiesExpression, + expression: this.convertChild(node.expression), + typeAnnotation: this.convertChild(node.type), + }); + } + default: + return this.deeplyCopy(node); + } + } +} +exports.Converter = Converter; +_Converter_instances = new WeakSet(), _Converter_checkModifiers = function _Converter_checkModifiers(node) { + if (this.options.allowInvalidAST) { + return; + } + // typescript<5.0.0 + if ((0, node_utils_1.nodeHasIllegalDecorators)(node)) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, node.illegalDecorators[0], 'Decorators are not valid here.'); + } + for (const decorator of (0, getModifiers_1.getDecorators)(node, + /* includeIllegalDecorators */ true) ?? []) { + // `checkGrammarModifiers` function in typescript + if (!(0, node_utils_1.nodeCanBeDecorated)(node)) { + if (ts.isMethodDeclaration(node) && !(0, node_utils_1.nodeIsPresent)(node.body)) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, decorator, 'A decorator can only decorate a method implementation, not an overload.'); + } + else { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, decorator, 'Decorators are not valid here.'); + } + } + } + for (const modifier of (0, getModifiers_1.getModifiers)(node, + /* includeIllegalModifiers */ true) ?? []) { + if (modifier.kind !== SyntaxKind.ReadonlyKeyword) { + if (node.kind === SyntaxKind.PropertySignature || + node.kind === SyntaxKind.MethodSignature) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on a type member`); + } + if (node.kind === SyntaxKind.IndexSignature && + (modifier.kind !== SyntaxKind.StaticKeyword || + !ts.isClassLike(node.parent))) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on an index signature`); + } + } + if (modifier.kind !== SyntaxKind.InKeyword && + modifier.kind !== SyntaxKind.OutKeyword && + modifier.kind !== SyntaxKind.ConstKeyword && + node.kind === SyntaxKind.TypeParameter) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on a type parameter`); + } + if ((modifier.kind === SyntaxKind.InKeyword || + modifier.kind === SyntaxKind.OutKeyword) && + (node.kind !== SyntaxKind.TypeParameter || + !(ts.isInterfaceDeclaration(node.parent) || + ts.isClassLike(node.parent) || + ts.isTypeAliasDeclaration(node.parent)))) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'${ts.tokenToString(modifier.kind)}' modifier can only appear on a type parameter of a class, interface or type alias`); + } + if (modifier.kind === SyntaxKind.ReadonlyKeyword && + node.kind !== SyntaxKind.PropertyDeclaration && + node.kind !== SyntaxKind.PropertySignature && + node.kind !== SyntaxKind.IndexSignature && + node.kind !== SyntaxKind.Parameter) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, "'readonly' modifier can only appear on a property declaration or index signature."); + } + if (modifier.kind === SyntaxKind.DeclareKeyword && + ts.isClassLike(node.parent) && + !ts.isPropertyDeclaration(node)) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on class elements of this kind.`); + } + if (modifier.kind === SyntaxKind.DeclareKeyword && + ts.isVariableStatement(node)) { + const declarationKind = (0, node_utils_1.getDeclarationKind)(node.declarationList); + if (declarationKind === 'using' || declarationKind === 'await using') { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'declare' modifier cannot appear on a '${declarationKind}' declaration.`); + } + } + if (modifier.kind === SyntaxKind.AbstractKeyword && + node.kind !== SyntaxKind.ClassDeclaration && + node.kind !== SyntaxKind.ConstructorType && + node.kind !== SyntaxKind.MethodDeclaration && + node.kind !== SyntaxKind.PropertyDeclaration && + node.kind !== SyntaxKind.GetAccessor && + node.kind !== SyntaxKind.SetAccessor) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'${ts.tokenToString(modifier.kind)}' modifier can only appear on a class, method, or property declaration.`); + } + if ((modifier.kind === SyntaxKind.StaticKeyword || + modifier.kind === SyntaxKind.PublicKeyword || + modifier.kind === SyntaxKind.ProtectedKeyword || + modifier.kind === SyntaxKind.PrivateKeyword) && + (node.parent.kind === SyntaxKind.ModuleBlock || + node.parent.kind === SyntaxKind.SourceFile)) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on a module or namespace element.`); + } + if (modifier.kind === SyntaxKind.AccessorKeyword && + node.kind !== SyntaxKind.PropertyDeclaration) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, "'accessor' modifier can only appear on a property declaration."); + } + // `checkGrammarAsyncModifier` function in `typescript` + if (modifier.kind === SyntaxKind.AsyncKeyword && + node.kind !== SyntaxKind.MethodDeclaration && + node.kind !== SyntaxKind.FunctionDeclaration && + node.kind !== SyntaxKind.FunctionExpression && + node.kind !== SyntaxKind.ArrowFunction) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, "'async' modifier cannot be used here."); + } + // `checkGrammarModifiers` function in `typescript` + if (node.kind === SyntaxKind.Parameter && + (modifier.kind === SyntaxKind.StaticKeyword || + modifier.kind === SyntaxKind.ExportKeyword || + modifier.kind === SyntaxKind.DeclareKeyword || + modifier.kind === SyntaxKind.AsyncKeyword)) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on a parameter.`); + } + // `checkParameter` function in `typescript` + if (node.kind === SyntaxKind.Parameter && + // In `typescript` package, it's `ts.hasSyntacticModifier(node, ts.ModifierFlags.ParameterPropertyModifier)` + // https://github.com/typescript-eslint/typescript-eslint/pull/6615#discussion_r1136489935 + (modifier.kind === SyntaxKind.PublicKeyword || + modifier.kind === SyntaxKind.PrivateKeyword || + modifier.kind === SyntaxKind.ProtectedKeyword || + modifier.kind === SyntaxKind.ReadonlyKeyword || + modifier.kind === SyntaxKind.OverrideKeyword)) { + const func = (0, node_utils_1.getContainingFunction)(node); + if (!(func.kind === SyntaxKind.Constructor && (0, node_utils_1.nodeIsPresent)(func.body))) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, 'A parameter property is only allowed in a constructor implementation.'); + } + } + } +}, _Converter_throwUnlessAllowInvalidAST = function _Converter_throwUnlessAllowInvalidAST(node, message) { + if (!this.options.allowInvalidAST) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, node, message); + } +}, _Converter_withDeprecatedAliasGetter = function _Converter_withDeprecatedAliasGetter(node, aliasKey, valueKey) { + let warned = false; + Object.defineProperty(node, aliasKey, { + configurable: true, + get: this.options.suppressDeprecatedPropertyWarnings + ? () => node[valueKey] + : () => { + if (!warned) { + process.emitWarning(`The '${aliasKey}' property is deprecated on ${node.type} nodes. Use '${valueKey}' instead. See https://typescript-eslint.io/linting/troubleshooting#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`, 'DeprecationWarning'); + warned = true; + } + return node[valueKey]; + }, + set(value) { + Object.defineProperty(node, aliasKey, { + enumerable: true, + writable: true, + value, + }); + }, + }); + return node; +}, _Converter_throwError = function _Converter_throwError(node, message) { + let start; + let end; + if (typeof node === 'number') { + start = end = node; + } + else { + start = node.getStart(this.ast); + end = node.getEnd(); + } + throw (0, node_utils_1.createError)(message, this.ast, start, end); +}; +//# sourceMappingURL=convert.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map new file mode 100644 index 0000000000..5bafe8f2e1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map @@ -0,0 +1 @@ +{"version":3,"file":"convert.js","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA2D;AAC3D,oNAAoN;AACpN,+CAAiC;AAEjC,iDAA6D;AAE7D,6CA0BsB;AAOtB,2CAA6C;AAE7C,MAAM,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;AASjC;;;;GAIG;AACH,SAAgB,YAAY,CAC1B,KAA2D;IAE3D,OAAO,IAAA,wBAAW,EAChB,CAAC,SAAS,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,IAAK,KAAK,CAAC,WAAsB,EACtE,KAAK,CAAC,IAAK,EACX,KAAK,CAAC,KAAM,CACb,CAAC;AACJ,CAAC;AARD,oCAQC;AAOD,MAAa,SAAS;IAQpB;;;;;OAKG;IACH,YAAY,GAAkB,EAAE,OAA0B;;QAXzC,0BAAqB,GAAG,IAAI,OAAO,EAAE,CAAC;QACtC,0BAAqB,GAAG,IAAI,OAAO,EAAE,CAAC;QAE/C,iBAAY,GAAG,KAAK,CAAC;QAS3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;IAChC,CAAC;IAED,UAAU;QACR,OAAO;YACL,qBAAqB,EAAE,IAAI,CAAC,qB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AY,EAAE,IAAI;QAClB,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,kCAAkC;YAClD,CAAC,CAAC,GAAgC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;YACnD,CAAC,CAAC,GAAgC,EAAE;gBAChC,IAAI,CAAC,MAAM,EAAE;oBACX,OAAO,CAAC,WAAW,CACjB,QAAQ,QAAQ,+BAA+B,IAAI,CAAC,IAAI,gBAAgB,QAAQ,4IAA4I,EAC5N,oBAAoB,CACrB,CAAC;oBACF,MAAM,GAAG,IAAI,CAAC;iBACf;gBAED,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC;YACxB,CAAC;QACL,GAAG,CAAC,KAAK;YACP,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE;gBACpC,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,IAAI;gBACd,KAAK;aACN,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,IAA2D,CAAC;AACrE,CAAC,yDAEW,IAAsB,EAAE,OAAe;IACjD,IAAI,KAAK,CAAC;IACV,IAAI,GAAG,CAAC;IACR,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC;KACpB;SAAM;QACL,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;KACrB;IAED,MAAM,IAAA,wBAAW,EAAC,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;AACnD,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts new file mode 100644 index 0000000000..bc0e84ed2e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts @@ -0,0 +1,13 @@ +import type * as ts from 'typescript'; +interface DirectoryStructureHost { + readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; +} +interface CachedDirectoryStructureHost extends DirectoryStructureHost { + readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; +} +interface WatchCompilerHostOfConfigFile extends ts.WatchCompilerHostOfConfigFile { + onCachedDirectoryStructureHostCreate(host: CachedDirectoryStructureHost): void; + extraFileExtensions?: readonly ts.FileExtensionInfo[]; +} +export { WatchCompilerHostOfConfigFile }; +//# sourceMappingURL=WatchCompilerHostOfConfigFile.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts.map new file mode 100644 index 0000000000..9dc5bfee21 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"WatchCompilerHostOfConfigFile.d.ts","sourceRoot":"","sources":["../../src/create-program/WatchCompilerHostOfConfigFile.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAGtC,UAAU,sBAAsB;IAC9B,aAAa,CAAC,CACZ,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,EAC3B,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,EAAE,CAAC;CACb;AAGD,UAAU,4BAA6B,SAAQ,sBAAsB;IACnE,aAAa,CACX,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,EAC3B,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,EAAE,CAAC;CACb;AAGD,UAAU,6BAA6B,CAAC,CAAC,SAAS,EAAE,CAAC,cAAc,CACjE,SAAQ,EAAE,CAAC,6BAA6B,CAAC,CAAC,CAAC;IAC3C,oCAAoC,CAClC,IAAI,EAAE,4BAA4B,GACjC,IAAI,CAAC;IACR,mBAAmB,CAAC,EAAE,SAAS,EAAE,CAAC,iBAAiB,EAAE,CAAC;CACvD;AAED,OAAO,EAAE,6BAA6B,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js new file mode 100644 index 0000000000..dcb0712993 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js @@ -0,0 +1,6 @@ +"use strict"; +// These types are internal to TS. +// They have been trimmed down to only include the relevant bits +// We use some special internal TS apis to help us do our parsing flexibly +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=WatchCompilerHostOfConfigFile.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js.map new file mode 100644 index 0000000000..757e885ccc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/WatchCompilerHostOfConfigFile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"WatchCompilerHostOfConfigFile.js","sourceRoot":"","sources":["../../src/create-program/WatchCompilerHostOfConfigFile.ts"],"names":[],"mappings":";AAAA,kCAAkC;AAClC,gEAAgE;AAChE,0EAA0E"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts new file mode 100644 index 0000000000..282a8b9fa1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts @@ -0,0 +1,12 @@ +import type { ParseSettings } from '../parseSettings'; +import type { ASTAndDefiniteProgram } from './shared'; +/** + * @param parseSettings Internal settings for parsing the file + * @returns If found, returns the source file corresponding to the code and the containing program + * @deprecated + * This is a legacy option that comes with severe performance penalties. + * Please do not use it. + */ +declare function createDefaultProgram(parseSettings: ParseSettings): ASTAndDefiniteProgram | undefined; +export { createDefaultProgram }; +//# sourceMappingURL=createDefaultProgram.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts.map new file mode 100644 index 0000000000..ecba1cfaec --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createDefaultProgram.d.ts","sourceRoot":"","sources":["../../src/create-program/createDefaultProgram.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAKtD;;;;;;GAMG;AACH,iBAAS,oBAAoB,CAC3B,aAAa,EAAE,aAAa,GAC3B,qBAAqB,GAAG,SAAS,CA8CnC;AAGD,OAAO,EAAE,oBAAoB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js new file mode 100644 index 0000000000..f49c367611 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js @@ -0,0 +1,68 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.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 }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDefaultProgram = void 0; +const debug_1 = __importDefault(require("debug")); +const path_1 = __importDefault(require("path")); +const ts = __importStar(require("typescript")); +const shared_1 = require("./shared"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:createDefaultProgram'); +/** + * @param parseSettings Internal settings for parsing the file + * @returns If found, returns the source file corresponding to the code and the containing program + * @deprecated + * This is a legacy option that comes with severe performance penalties. + * Please do not use it. + */ +function createDefaultProgram(parseSettings) { + log('Getting default program for: %s', parseSettings.filePath || 'unnamed file'); + if (parseSettings.projects?.length !== 1) { + return undefined; + } + const tsconfigPath = parseSettings.projects[0]; + const commandLine = ts.getParsedCommandLineOfConfigFile(tsconfigPath, (0, shared_1.createDefaultCompilerOptionsFromExtra)(parseSettings), { + ...ts.sys, + // TODO: file issue on TypeScript to suggest making optional? + // eslint-disable-next-line @typescript-eslint/no-empty-function + onUnRecoverableConfigFileDiagnostic: () => { }, + }); + if (!commandLine) { + return undefined; + } + const compilerHost = ts.createCompilerHost(commandLine.options, + /* setParentNodes */ true); + const oldReadFile = compilerHost.readFile; + compilerHost.readFile = (fileName) => path_1.default.normalize(fileName) === path_1.default.normalize(parseSettings.filePath) + ? parseSettings.codeFullText + : oldReadFile(fileName); + const program = ts.createProgram([parseSettings.filePath], commandLine.options, compilerHost); + const ast = program.getSourceFile(parseSettings.filePath); + return ast && { ast, program }; +} +exports.createDefaultProgram = createDefaultProgram; +//# sourceMappingURL=createDefaultProgram.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js.map new file mode 100644 index 0000000000..f885930630 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createDefaultProgram.js","sourceRoot":"","sources":["../../src/create-program/createDefaultProgram.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,gDAAwB;AACxB,+CAAiC;AAIjC,qCAAiE;AAEjE,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C;IAE1D,OAAO,GAAG,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACjC,CAAC;AAGQ,oDAAoB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts new file mode 100644 index 0000000000..3003b5a232 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts @@ -0,0 +1,9 @@ +import type { ParseSettings } from '../parseSettings'; +import type { ASTAndDefiniteProgram } from './shared'; +/** + * @param code The code of the file being linted + * @returns Returns a new source file and program corresponding to the linted code + */ +declare function createIsolatedProgram(parseSettings: ParseSettings): ASTAndDefiniteProgram; +export { createIsolatedProgram }; +//# sourceMappingURL=createIsolatedProgram.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts.map new file mode 100644 index 0000000000..515eb8c5ad --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createIsolatedProgram.d.ts","sourceRoot":"","sources":["../../src/create-program/createIsolatedProgram.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAKtD;;;GAGG;AACH,iBAAS,qBAAqB,CAC5B,aAAa,EAAE,aAAa,GAC3B,qBAAqB,CAmEvB;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js new file mode 100644 index 0000000000..ea4bfb713e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js @@ -0,0 +1,88 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.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 }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createIsolatedProgram = void 0; +const debug_1 = __importDefault(require("debug")); +const ts = __importStar(require("typescript")); +const getScriptKind_1 = require("./getScriptKind"); +const shared_1 = require("./shared"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:createIsolatedProgram'); +/** + * @param code The code of the file being linted + * @returns Returns a new source file and program corresponding to the linted code + */ +function createIsolatedProgram(parseSettings) { + log('Getting isolated program in %s mode for: %s', parseSettings.jsx ? 'TSX' : 'TS', parseSettings.filePath); + const compilerHost = { + fileExists() { + return true; + }, + getCanonicalFileName() { + return parseSettings.filePath; + }, + getCurrentDirectory() { + return ''; + }, + getDirectories() { + return []; + }, + getDefaultLibFileName() { + return 'lib.d.ts'; + }, + // TODO: Support Windows CRLF + getNewLine() { + return '\n'; + }, + getSourceFile(filename) { + return ts.createSourceFile(filename, parseSettings.codeFullText, ts.ScriptTarget.Latest, + /* setParentNodes */ true, (0, getScriptKind_1.getScriptKind)(parseSettings.filePath, parseSettings.jsx)); + }, + readFile() { + return undefined; + }, + useCaseSensitiveFileNames() { + return true; + }, + writeFile() { + return null; + }, + }; + const program = ts.createProgram([parseSettings.filePath], { + noResolve: true, + target: ts.ScriptTarget.Latest, + jsx: parseSettings.jsx ? ts.JsxEmit.Preserve : undefined, + ...(0, shared_1.createDefaultCompilerOptionsFromExtra)(parseSettings), + }, compilerHost); + const ast = program.getSourceFile(parseSettings.filePath); + if (!ast) { + throw new Error('Expected an ast to be returned for the single-file isolated program.'); + } + return { ast, program }; +} +exports.createIsolatedProgram = createIsolatedProgram; +//# sourceMappingURL=createIsolatedProgram.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js.map new file mode 100644 index 0000000000..1d4097304b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createIsolatedProgram.js","sourceRoot":"","sources":["../../src/create-program/createIsolatedProgram.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+CAAiC;AAGjC,mDAAgD;AAEhD,qCAAiE;AAEjE,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,2DAA2D,CAAC,CAAC;AAE/E;;;GAGG;AACH,SAAS,qBAAqB,CAC5B,aAA4B;IA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GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC1D,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,KAAK,CACb,sEAAsE,CACvE,CAAC;KACH;IAED,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AAC1B,CAAC;AAEQ,sDAAqB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts new file mode 100644 index 0000000000..024d0642e2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts @@ -0,0 +1,10 @@ +import * as ts from 'typescript'; +import type { ParseSettings } from '../parseSettings'; +import type { ASTAndDefiniteProgram } from './shared'; +/** + * @param parseSettings Internal settings for parsing the file + * @returns If found, the source file corresponding to the code and the containing program + */ +declare function createProjectProgram(parseSettings: ParseSettings, programsForProjects: readonly ts.Program[]): ASTAndDefiniteProgram | undefined; +export { createProjectProgram }; +//# sourceMappingURL=createProjectProgram.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map new file mode 100644 index 0000000000..9676a64ded --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createProjectProgram.d.ts","sourceRoot":"","sources":["../../src/create-program/createProjectProgram.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAgBtD;;;GAGG;AACH,iBAAS,oBAAoB,CAC3B,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,GACzC,qBAAqB,GAAG,SAAS,CA8EnC;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js new file mode 100644 index 0000000000..62b0c0bfc7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js @@ -0,0 +1,101 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.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 }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProjectProgram = void 0; +const debug_1 = __importDefault(require("debug")); +const path_1 = __importDefault(require("path")); +const ts = __importStar(require("typescript")); +const node_utils_1 = require("../node-utils"); +const describeFilePath_1 = require("./describeFilePath"); +const shared_1 = require("./shared"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:createProjectProgram'); +const DEFAULT_EXTRA_FILE_EXTENSIONS = [ + ts.Extension.Ts, + ts.Extension.Tsx, + ts.Extension.Js, + ts.Extension.Jsx, + ts.Extension.Mjs, + ts.Extension.Mts, + ts.Extension.Cjs, + ts.Extension.Cts, +]; +/** + * @param parseSettings Internal settings for parsing the file + * @returns If found, the source file corresponding to the code and the containing program + */ +function createProjectProgram(parseSettings, programsForProjects) { + log('Creating project program for: %s', parseSettings.filePath); + const astAndProgram = (0, node_utils_1.firstDefined)(programsForProjects, currentProgram => (0, shared_1.getAstFromProgram)(currentProgram, parseSettings.filePath)); + // The file was either matched within the tsconfig, or we allow creating a default program + // eslint-disable-next-line deprecation/deprecation -- will be cleaned up with the next major + if (astAndProgram || parseSettings.DEPRECATED__createDefaultProgram) { + return astAndProgram; + } + const describeProjectFilePath = (projectFile) => (0, describeFilePath_1.describeFilePath)(projectFile, parseSettings.tsconfigRootDir); + const describedFilePath = (0, describeFilePath_1.describeFilePath)(parseSettings.filePath, parseSettings.tsconfigRootDir); + const relativeProjects = parseSettings.projects.map(describeProjectFilePath); + const describedPrograms = relativeProjects.length === 1 + ? relativeProjects[0] + : `\n${relativeProjects.map(project => `- ${project}`).join('\n')}`; + const errorLines = [ + `ESLint was configured to run on \`${describedFilePath}\` using \`parserOptions.project\`: ${describedPrograms}`, + ]; + let hasMatchedAnError = false; + const extraFileExtensions = parseSettings.extraFileExtensions || []; + extraFileExtensions.forEach(extraExtension => { + if (!extraExtension.startsWith('.')) { + errorLines.push(`Found unexpected extension \`${extraExtension}\` specified with the \`parserOptions.extraFileExtensions\` option. Did you mean \`.${extraExtension}\`?`); + } + if (DEFAULT_EXTRA_FILE_EXTENSIONS.includes(extraExtension)) { + errorLines.push(`You unnecessarily included the extension \`${extraExtension}\` with the \`parserOptions.extraFileExtensions\` option. This extension is already handled by the parser by default.`); + } + }); + const fileExtension = path_1.default.extname(parseSettings.filePath); + if (!DEFAULT_EXTRA_FILE_EXTENSIONS.includes(fileExtension)) { + const nonStandardExt = `The extension for the file (\`${fileExtension}\`) is non-standard`; + if (extraFileExtensions.length > 0) { + if (!extraFileExtensions.includes(fileExtension)) { + errorLines.push(`${nonStandardExt}. It should be added to your existing \`parserOptions.extraFileExtensions\`.`); + hasMatchedAnError = true; + } + } + else { + errorLines.push(`${nonStandardExt}. You should add \`parserOptions.extraFileExtensions\` to your config.`); + hasMatchedAnError = true; + } + } + if (!hasMatchedAnError) { + const [describedInclusions, describedSpecifiers] = parseSettings.projects.length === 1 + ? ['that TSConfig does not', 'that TSConfig'] + : ['none of those TSConfigs', 'one of those TSConfigs']; + errorLines.push(`However, ${describedInclusions} include this file. Either:`, `- Change ESLint's list of included files to not include this file`, `- Change ${describedSpecifiers} to include this file`, `- Create a new TSConfig that includes this file and include it in your parserOptions.project`, `See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file`); + } + throw new Error(errorLines.join('\n')); +} +exports.createProjectProgram = createProjectProgram; +//# sourceMappingURL=createProjectProgram.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map new file mode 100644 index 0000000000..8f8bcd6e80 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createProjectProgram.js","sourceRoot":"","sources":["../../src/create-program/createProjectProgram.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,g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KACF;IAED,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,GAC9C,aAAa,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;YACjC,CAAC,CAAC,CAAC,wBAAwB,EAAE,eAAe,CAAC;YAC7C,CAAC,CAAC,CAAC,yBAAyB,EAAE,wBAAwB,CAAC,CAAC;QAC5D,UAAU,CAAC,IAAI,CACb,YAAY,mBAAmB,6BAA6B,EAC5D,mEAAmE,EACnE,YAAY,mBAAmB,uBAAuB,EACtD,8FAA8F,EAC9F,oOAAoO,CACrO,CAAC;KACH;IAED,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACzC,CAAC;AAEQ,oDAAoB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.d.ts new file mode 100644 index 0000000000..4576d6d10c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.d.ts @@ -0,0 +1,4 @@ +import type * as ts from 'typescript/lib/tsserverlibrary'; +export type TypeScriptProjectService = ts.server.ProjectService; +export declare function createProjectService(): TypeScriptProjectService; +//# sourceMappingURL=createProjectService.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.d.ts.map new file mode 100644 index 0000000000..597cb61f6b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createProjectService.d.ts","sourceRoot":"","sources":["../../src/create-program/createProjectService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAQ1D,MAAM,MAAM,wBAAwB,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC;AAEhE,wBAAgB,oBAAoB,IAAI,wBAAwB,CAoC/D"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.js new file mode 100644 index 0000000000..46240fe17a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProjectService = void 0; +const doNothing = () => { }; +const createStubFileWatcher = () => ({ + close: doNothing, +}); +function createProjectService() { + // We import this lazily to avoid its cost for users who don't use the service + const tsserver = require('typescript/lib/tsserverlibrary'); + // TODO: see getWatchProgramsForProjects + // We don't watch the disk, we just refer to these when ESLint calls us + // there's a whole separate update pass in maybeInvalidateProgram at the bottom of getWatchProgramsForProjects + // (this "goes nuclear on TypeScript") + const system = { + ...tsserver.sys, + clearImmediate, + clearTimeout, + setImmediate, + setTimeout, + watchDirectory: createStubFileWatcher, + watchFile: createStubFileWatcher, + }; + return new tsserver.server.ProjectService({ + host: system, + cancellationToken: { isCancellationRequested: () => false }, + useSingleInferredProject: false, + useInferredProjectPerProjectRoot: false, + logger: { + close: doNothing, + endGroup: doNothing, + getLogFileName: () => undefined, + hasLevel: () => false, + info: doNothing, + loggingEnabled: () => false, + msg: doNothing, + perftrc: doNothing, + startGroup: doNothing, + }, + session: undefined, + }); +} +exports.createProjectService = createProjectService; +/* eslint-enable @typescript-eslint/no-empty-function */ +//# sourceMappingURL=createProjectService.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.js.map new file mode 100644 index 0000000000..a1b06940e9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectService.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createProjectService.js","sourceRoot":"","sources":["../../src/create-program/createProjectService.ts"],"names":[],"mappings":";;;AAGA,MAAM,SAAS,GAAG,GAAS,EAAE,GAAE,CAAC,CAAC;AAEjC,MAAM,qBAAqB,GAAG,GAAmB,EAAE,CAAC,CAAC;IACnD,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AAIH,SAAgB,oBAAoB;IAClC,8EAA8E;IAC9E,MAAM,QAAQ,GAAG,OAAO,CAAC,gCAAgC,CAAc,CAAC;IAExE,wCAAwC;IACxC,uEAAuE;IACvE,8GAA8G;IAC9G,sCAAsC;IACtC,MAAM,MAAM,GAAyB;QACnC,GAAG,QAAQ,CAAC,GAAG;QACf,cAAc;QACd,YAAY;QACZ,YAAY;QACZ,UAAU;QACV,cAAc,EAAE,qBAAqB;QACrC,SAAS,EAAE,qBAAqB;KACjC,CAAC;IAEF,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC;QACxC,IAAI,EAAE,MAAM;QACZ,iBAAiB,EAAE,EAAE,uBAAuB,EAAE,GAAY,EAAE,CAAC,KAAK,EAAE;QACpE,wBAAwB,EAAE,KAAK;QAC/B,gCAAgC,EAAE,KAAK;QACvC,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,SAAS;YACnB,cAAc,EAAE,GAAG,EAAE,CAAC,SAAS;YAC/B,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;YACrB,IAAI,EAAE,SAAS;YACf,cAAc,EAAE,GAAG,EAAE,CAAC,KAAK;YAC3B,GAAG,EAAE,SAAS;YACd,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,SAAS;SACtB;QACD,OAAO,EAAE,SAAS;KACnB,CAAC,CAAC;AACL,CAAC;AApCD,oDAoCC;AACD,wDAAwD"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts new file mode 100644 index 0000000000..c3d994d50c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts @@ -0,0 +1,7 @@ +import * as ts from 'typescript'; +import type { ParseSettings } from '../parseSettings'; +import type { ASTAndNoProgram } from './shared'; +declare function createSourceFile(parseSettings: ParseSettings): ts.SourceFile; +declare function createNoProgram(parseSettings: ParseSettings): ASTAndNoProgram; +export { createSourceFile, createNoProgram }; +//# sourceMappingURL=createSourceFile.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts.map new file mode 100644 index 0000000000..7faf3f62b4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createSourceFile.d.ts","sourceRoot":"","sources":["../../src/create-program/createSourceFile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,iBAAS,gBAAgB,CAAC,aAAa,EAAE,aAAa,GAAG,EAAE,CAAC,UAAU,CAgBrE;AAED,iBAAS,eAAe,CAAC,aAAa,EAAE,aAAa,GAAG,eAAe,CAKtE;AAED,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js new file mode 100644 index 0000000000..adcc6e1ddf --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js @@ -0,0 +1,50 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.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 }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createNoProgram = exports.createSourceFile = void 0; +const debug_1 = __importDefault(require("debug")); +const ts = __importStar(require("typescript")); +const source_files_1 = require("../source-files"); +const getScriptKind_1 = require("./getScriptKind"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:createSourceFile'); +function createSourceFile(parseSettings) { + log('Getting AST without type information in %s mode for: %s', parseSettings.jsx ? 'TSX' : 'TS', parseSettings.filePath); + return (0, source_files_1.isSourceFile)(parseSettings.code) + ? parseSettings.code + : ts.createSourceFile(parseSettings.filePath, parseSettings.codeFullText, ts.ScriptTarget.Latest, + /* setParentNodes */ true, (0, getScriptKind_1.getScriptKind)(parseSettings.filePath, parseSettings.jsx)); +} +exports.createSourceFile = createSourceFile; +function createNoProgram(parseSettings) { + return { + ast: createSourceFile(parseSettings), + program: null, + }; +} +exports.createNoProgram = createNoProgram; +//# sourceMappingURL=createSourceFile.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js.map new file mode 100644 index 0000000000..3f657d6acc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createSourceFile.js","sourceRoot":"","sources":["../../src/create-program/createSourceFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+CAAiC;AAGjC,kDAA+C;AAC/C,mDAAgD;AAGhD,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,sDAAsD,CAAC,CAAC;AAE1E,SAAS,gBAAgB,CAAC,aAA4B;IACpD,GAAG,CACD,yDAAyD,EACzD,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAChC,aAAa,CAAC,QAAQ,CACvB,CAAC;IAEF,OAAO,IAAA,2BAAY,EAAC,aAAa,CAAC,IAAI,CAAC;QACrC,CAAC,CAAC,aAAa,CAAC,IAAI;QACpB,CAAC,CAAC,EAAE,CAAC,gBAAgB,CACjB,aAAa,CAAC,QAAQ,EACtB,aAAa,CAAC,YAAY,EAC1B,EAAE,CAAC,YAAY,CAAC,MAAM;QACtB,oBAAoB,CAAC,IAAI,EACzB,IAAA,6BAAa,EAAC,aAAa,CAAC,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,CACzD,CAAC;AACR,CAAC;AASQ,4CAAgB;AAPzB,SAAS,eAAe,CAAC,aAA4B;IACnD,OAAO;QACL,GAAG,EAAE,gBAAgB,CAAC,aAAa,CAAC;QACpC,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAE0B,0CAAe"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts new file mode 100644 index 0000000000..d46f86aa75 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts @@ -0,0 +1,2 @@ +export declare function describeFilePath(filePath: string, tsconfigRootDir: string): string; +//# sourceMappingURL=describeFilePath.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map new file mode 100644 index 0000000000..6d049bedbd --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"describeFilePath.d.ts","sourceRoot":"","sources":["../../src/create-program/describeFilePath.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,GACtB,MAAM,CAyBR"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js new file mode 100644 index 0000000000..ba35361527 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js @@ -0,0 +1,32 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.describeFilePath = void 0; +const path_1 = __importDefault(require("path")); +function describeFilePath(filePath, tsconfigRootDir) { + // If the TSConfig root dir is a parent of the filePath, use + // `` as a prefix for the path. + const relative = path_1.default.relative(tsconfigRootDir, filePath); + if (relative && !relative.startsWith('..') && !path_1.default.isAbsolute(relative)) { + return `/${relative}`; + } + // Root-like Mac/Linux (~/*, ~*) or Windows (C:/*, /) paths that aren't + // relative to the TSConfig root dir should be fully described. + // This avoids strings like /../../../../repo/file.ts. + // https://github.com/typescript-eslint/typescript-eslint/issues/6289 + if (/^[(\w+:)\\/~]/.test(filePath)) { + return filePath; + } + // Similarly, if the relative path would contain a lot of ../.., then + // ignore it and print the file path directly. + if (/\.\.[/\\]\.\./.test(relative)) { + return filePath; + } + // Lastly, since we've eliminated all special cases, we know the cleanest + // path to print is probably the prefixed relative one. + return `/${relative}`; +} +exports.describeFilePath = describeFilePath; +//# sourceMappingURL=describeFilePath.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js.map new file mode 100644 index 0000000000..1d650edfac --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js.map @@ -0,0 +1 @@ +{"version":3,"file":"describeFilePath.js","sourceRoot":"","sources":["../../src/create-program/describeFilePath.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,SAAgB,gBAAgB,CAC9B,QAAgB,EAChB,eAAuB;IAEvB,4DAA4D;IAC5D,gDAAgD;IAChD,MAAM,QAAQ,GAAG,cAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC1D,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,cAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QACxE,OAAO,qBAAqB,QAAQ,EAAE,CAAC;KACxC;IAED,uEAAuE;IACvE,+DAA+D;IAC/D,uEAAuE;IACvE,qEAAqE;IACrE,IAAI,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClC,OAAO,QAAQ,CAAC;KACjB;IAED,qEAAqE;IACrE,8CAA8C;IAC9C,IAAI,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClC,OAAO,QAAQ,CAAC;KACjB;IAED,yEAAyE;IACzE,uDAAuD;IACvD,OAAO,qBAAqB,QAAQ,EAAE,CAAC;AACzC,CAAC;AA5BD,4CA4BC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts new file mode 100644 index 0000000000..6db5058741 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts @@ -0,0 +1,5 @@ +import * as ts from 'typescript'; +declare function getScriptKind(filePath: string, jsx: boolean): ts.ScriptKind; +declare function getLanguageVariant(scriptKind: ts.ScriptKind): ts.LanguageVariant; +export { getScriptKind, getLanguageVariant }; +//# sourceMappingURL=getScriptKind.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts.map new file mode 100644 index 0000000000..a53274ef91 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getScriptKind.d.ts","sourceRoot":"","sources":["../../src/create-program/getScriptKind.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,iBAAS,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,EAAE,CAAC,UAAU,CA8BpE;AAED,iBAAS,kBAAkB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,EAAE,CAAC,eAAe,CAYzE;AAED,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js new file mode 100644 index 0000000000..964439ba2b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js @@ -0,0 +1,72 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.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 }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getLanguageVariant = exports.getScriptKind = void 0; +const path_1 = __importDefault(require("path")); +const ts = __importStar(require("typescript")); +function getScriptKind(filePath, jsx) { + const extension = path_1.default.extname(filePath).toLowerCase(); + // note - we only respect the user's jsx setting for unknown extensions + // this is so that we always match TS's internal script kind logic, preventing + // weird errors due to a mismatch. + // https://github.com/microsoft/TypeScript/blob/da00ba67ed1182ad334f7c713b8254fba174aeba/src/compiler/utilities.ts#L6948-L6968 + switch (extension) { + case ts.Extension.Js: + case ts.Extension.Cjs: + case ts.Extension.Mjs: + return ts.ScriptKind.JS; + case ts.Extension.Jsx: + return ts.ScriptKind.JSX; + case ts.Extension.Ts: + case ts.Extension.Cts: + case ts.Extension.Mts: + return ts.ScriptKind.TS; + case ts.Extension.Tsx: + return ts.ScriptKind.TSX; + case ts.Extension.Json: + return ts.ScriptKind.JSON; + default: + // unknown extension, force typescript to ignore the file extension, and respect the user's setting + return jsx ? ts.ScriptKind.TSX : ts.ScriptKind.TS; + } +} +exports.getScriptKind = getScriptKind; +function getLanguageVariant(scriptKind) { + // https://github.com/microsoft/TypeScript/blob/d6e483b8dabd8fd37c00954c3f2184bb7f1eb90c/src/compiler/utilities.ts#L6281-L6285 + switch (scriptKind) { + case ts.ScriptKind.TSX: + case ts.ScriptKind.JSX: + case ts.ScriptKind.JS: + case ts.ScriptKind.JSON: + return ts.LanguageVariant.JSX; + default: + return ts.LanguageVariant.Standard; + } +} +exports.getLanguageVariant = getLanguageVariant; +//# sourceMappingURL=getScriptKind.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js.map new file mode 100644 index 0000000000..23e1a75df5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getScriptKind.js","sourceRoot":"","sources":["../../src/create-program/getScriptKind.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,+CAAiC;AAEjC,SAAS,aAAa,CAAC,QAAgB,EAAE,GAAY;IACnD,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IACvD,uEAAuE;IACvE,8EAA8E;IAC9E,kCAAkC;IAClC,8HAA8H;IAC9H,QAAQ,SAAS,EAAE;QACjB,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;QACrB,KAAK,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC;QACtB,KAAK,EAAE,CAAC,SAAS,CAAC,GAAG;YACnB,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;QAE1B,KAAK,EAAE,CAAC,SAAS,CAAC,GAAG;YACnB,OAAO,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QAE3B,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;QACrB,KAAK,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC;QACtB,KAAK,EAAE,CAAC,SAAS,CAAC,GAAG;YACnB,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;QAE1B,KAAK,EAAE,CAAC,SAAS,CAAC,GAAG;YACnB,OAAO,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QAE3B,KAAK,EAAE,CAAC,SAAS,CAAC,IAAI;YACpB,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;QAE5B;YACE,mGAAmG;YACnG,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;KACrD;AACH,CAAC;AAgBQ,sCAAa;AAdtB,SAAS,kBAAkB,CAAC,UAAyB;IACnD,8HAA8H;IAC9H,QAAQ,UAAU,EAAE;QAClB,KAAK,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QACvB,KAAK,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QACvB,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;QACtB,KAAK,EAAE,CAAC,UAAU,CAAC,IAAI;YACrB,OAAO,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC;QAEhC;YACE,OAAO,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC;KACtC;AACH,CAAC;AAEuB,gDAAkB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts new file mode 100644 index 0000000000..621d9bd645 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts @@ -0,0 +1,15 @@ +import * as ts from 'typescript'; +import type { ParseSettings } from '../parseSettings'; +/** + * Clear all of the parser caches. + * This should only be used in testing to ensure the parser is clean between tests. + */ +declare function clearWatchCaches(): void; +/** + * Calculate project environments using options provided by consumer and paths from config + * @param parseSettings Internal settings for parsing the file + * @returns The programs corresponding to the supplied tsconfig paths + */ +declare function getWatchProgramsForProjects(parseSettings: ParseSettings): ts.Program[]; +export { clearWatchCaches, getWatchProgramsForProjects }; +//# sourceMappingURL=getWatchProgramsForProjects.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map new file mode 100644 index 0000000000..b6d07a9666 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getWatchProgramsForProjects.d.ts","sourceRoot":"","sources":["../../src/create-program/getWatchProgramsForProjects.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA8CtD;;;GAGG;AACH,iBAAS,gBAAgB,IAAI,IAAI,CAOhC;AAgED;;;;GAIG;AACH,iBAAS,2BAA2B,CAClC,aAAa,EAAE,aAAa,GAC3B,EAAE,CAAC,OAAO,EAAE,CAsHd;AAkQD,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js new file mode 100644 index 0000000000..04f55aec3f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js @@ -0,0 +1,377 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.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 }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getWatchProgramsForProjects = exports.clearWatchCaches = void 0; +const debug_1 = __importDefault(require("debug")); +const fs_1 = __importDefault(require("fs")); +const ts = __importStar(require("typescript")); +const source_files_1 = require("../source-files"); +const shared_1 = require("./shared"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:createWatchProgram'); +/** + * Maps tsconfig paths to their corresponding file contents and resulting watches + */ +const knownWatchProgramMap = new Map(); +/** + * Maps file/folder paths to their set of corresponding watch callbacks + * There may be more than one per file/folder if a file/folder is shared between projects + */ +const fileWatchCallbackTrackingMap = new Map(); +const folderWatchCallbackTrackingMap = new Map(); +/** + * Stores the list of known files for each program + */ +const programFileListCache = new Map(); +/** + * Caches the last modified time of the tsconfig files + */ +const tsconfigLastModifiedTimestampCache = new Map(); +const parsedFilesSeenHash = new Map(); +/** + * Clear all of the parser caches. + * This should only be used in testing to ensure the parser is clean between tests. + */ +function clearWatchCaches() { + knownWatchProgramMap.clear(); + fileWatchCallbackTrackingMap.clear(); + folderWatchCallbackTrackingMap.clear(); + parsedFilesSeenHash.clear(); + programFileListCache.clear(); + tsconfigLastModifiedTimestampCache.clear(); +} +exports.clearWatchCaches = clearWatchCaches; +function saveWatchCallback(trackingMap) { + return (fileName, callback) => { + const normalizedFileName = (0, shared_1.getCanonicalFileName)(fileName); + const watchers = (() => { + let watchers = trackingMap.get(normalizedFileName); + if (!watchers) { + watchers = new Set(); + trackingMap.set(normalizedFileName, watchers); + } + return watchers; + })(); + watchers.add(callback); + return { + close: () => { + watchers.delete(callback); + }, + }; + }; +} +/** + * Holds information about the file currently being linted + */ +const currentLintOperationState = { + code: '', + filePath: '', +}; +/** + * Appropriately report issues found when reading a config file + * @param diagnostic The diagnostic raised when creating a program + */ +function diagnosticReporter(diagnostic) { + throw new Error(ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine)); +} +function updateCachedFileList(tsconfigPath, program, parseSettings) { + const fileList = parseSettings.EXPERIMENTAL_useSourceOfProjectReferenceRedirect + ? new Set(program.getSourceFiles().map(sf => (0, shared_1.getCanonicalFileName)(sf.fileName))) + : new Set(program.getRootFileNames().map(f => (0, shared_1.getCanonicalFileName)(f))); + programFileListCache.set(tsconfigPath, fileList); + return fileList; +} +/** + * Calculate project environments using options provided by consumer and paths from config + * @param parseSettings Internal settings for parsing the file + * @returns The programs corresponding to the supplied tsconfig paths + */ +function getWatchProgramsForProjects(parseSettings) { + const filePath = (0, shared_1.getCanonicalFileName)(parseSettings.filePath); + const results = []; + // preserve reference to code and file being linted + currentLintOperationState.code = parseSettings.code; + currentLintOperationState.filePath = filePath; + // Update file version if necessary + const fileWatchCallbacks = fileWatchCallbackTrackingMap.get(filePath); + const codeHash = (0, shared_1.createHash)((0, source_files_1.getCodeText)(parseSettings.code)); + if (parsedFilesSeenHash.get(filePath) !== codeHash && + fileWatchCallbacks && + fileWatchCallbacks.size > 0) { + fileWatchCallbacks.forEach(cb => cb(filePath, ts.FileWatcherEventKind.Changed)); + } + const currentProjectsFromSettings = new Set(parseSettings.projects); + /* + * before we go into the process of attempting to find and update every program + * see if we know of a program that contains this file + */ + for (const [tsconfigPath, existingWatch] of knownWatchProgramMap.entries()) { + if (!currentProjectsFromSettings.has(tsconfigPath)) { + // the current parser run doesn't specify this tsconfig in parserOptions.project + // so we don't want to consider it for caching purposes. + // + // if we did consider it we might return a program for a project + // that wasn't specified in the current parser run (which is obv bad!). + continue; + } + let fileList = programFileListCache.get(tsconfigPath); + let updatedProgram = null; + if (!fileList) { + updatedProgram = existingWatch.getProgram().getProgram(); + fileList = updateCachedFileList(tsconfigPath, updatedProgram, parseSettings); + } + if (fileList.has(filePath)) { + log('Found existing program for file. %s', filePath); + updatedProgram ??= existingWatch.getProgram().getProgram(); + // sets parent pointers in source files + updatedProgram.getTypeChecker(); + return [updatedProgram]; + } + } + log('File did not belong to any existing programs, moving to create/update. %s', filePath); + /* + * We don't know of a program that contains the file, this means that either: + * - the required program hasn't been created yet, or + * - the file is new/renamed, and the program hasn't been updated. + */ + for (const tsconfigPath of parseSettings.projects) { + const existingWatch = knownWatchProgramMap.get(tsconfigPath); + if (existingWatch) { + const updatedProgram = maybeInvalidateProgram(existingWatch, filePath, tsconfigPath); + if (!updatedProgram) { + continue; + } + // sets parent pointers in source files + updatedProgram.getTypeChecker(); + // cache and check the file list + const fileList = updateCachedFileList(tsconfigPath, updatedProgram, parseSettings); + if (fileList.has(filePath)) { + log('Found updated program for file. %s', filePath); + // we can return early because we know this program contains the file + return [updatedProgram]; + } + results.push(updatedProgram); + continue; + } + const programWatch = createWatchProgram(tsconfigPath, parseSettings); + knownWatchProgramMap.set(tsconfigPath, programWatch); + const program = programWatch.getProgram().getProgram(); + // sets parent pointers in source files + program.getTypeChecker(); + // cache and check the file list + const fileList = updateCachedFileList(tsconfigPath, program, parseSettings); + if (fileList.has(filePath)) { + log('Found program for file. %s', filePath); + // we can return early because we know this program contains the file + return [program]; + } + results.push(program); + } + return results; +} +exports.getWatchProgramsForProjects = getWatchProgramsForProjects; +function createWatchProgram(tsconfigPath, parseSettings) { + log('Creating watch program for %s.', tsconfigPath); + // create compiler host + const watchCompilerHost = ts.createWatchCompilerHost(tsconfigPath, (0, shared_1.createDefaultCompilerOptionsFromExtra)(parseSettings), ts.sys, ts.createAbstractBuilder, diagnosticReporter, + // TODO: file issue on TypeScript to suggest making optional? + // eslint-disable-next-line @typescript-eslint/no-empty-function + /*reportWatchStatus*/ () => { }); + // ensure readFile reads the code being linted instead of the copy on disk + const oldReadFile = watchCompilerHost.readFile; + watchCompilerHost.readFile = (filePathIn, encoding) => { + const filePath = (0, shared_1.getCanonicalFileName)(filePathIn); + const fileContent = filePath === currentLintOperationState.filePath + ? (0, source_files_1.getCodeText)(currentLintOperationState.code) + : oldReadFile(filePath, encoding); + if (fileContent !== undefined) { + parsedFilesSeenHash.set(filePath, (0, shared_1.createHash)(fileContent)); + } + return fileContent; + }; + // ensure process reports error on failure instead of exiting process immediately + watchCompilerHost.onUnRecoverableConfigFileDiagnostic = diagnosticReporter; + // ensure process doesn't emit programs + watchCompilerHost.afterProgramCreate = (program) => { + // report error if there are any errors in the config file + const configFileDiagnostics = program + .getConfigFileParsingDiagnostics() + .filter(diag => diag.category === ts.DiagnosticCategory.Error && diag.code !== 18003); + if (configFileDiagnostics.length > 0) { + diagnosticReporter(configFileDiagnostics[0]); + } + }; + /* + * From the CLI, the file watchers won't matter, as the files will be parsed once and then forgotten. + * When running from an IDE, these watchers will let us tell typescript about changes. + * + * ESLint IDE plugins will send us unfinished file content as the user types (before it's saved to disk). + * We use the file watchers to tell typescript about this latest file content. + * + * When files are created (or renamed), we won't know about them because we have no filesystem watchers attached. + * We use the folder watchers to tell typescript it needs to go and find new files in the project folders. + */ + watchCompilerHost.watchFile = saveWatchCallback(fileWatchCallbackTrackingMap); + watchCompilerHost.watchDirectory = saveWatchCallback(folderWatchCallbackTrackingMap); + // allow files with custom extensions to be included in program (uses internal ts api) + const oldOnDirectoryStructureHostCreate = watchCompilerHost.onCachedDirectoryStructureHostCreate; + watchCompilerHost.onCachedDirectoryStructureHostCreate = (host) => { + const oldReadDirectory = host.readDirectory; + host.readDirectory = (path, extensions, exclude, include, depth) => oldReadDirectory(path, !extensions + ? undefined + : extensions.concat(parseSettings.extraFileExtensions), exclude, include, depth); + oldOnDirectoryStructureHostCreate(host); + }; + // This works only on 3.9 + watchCompilerHost.extraFileExtensions = parseSettings.extraFileExtensions.map(extension => ({ + extension, + isMixedContent: true, + scriptKind: ts.ScriptKind.Deferred, + })); + watchCompilerHost.trace = log; + /** + * TODO: this needs refinement and development, but we're allowing users to opt-in to this for now for testing and feedback. + * See https://github.com/typescript-eslint/typescript-eslint/issues/2094 + */ + watchCompilerHost.useSourceOfProjectReferenceRedirect = () => parseSettings.EXPERIMENTAL_useSourceOfProjectReferenceRedirect; + // Since we don't want to asynchronously update program we want to disable timeout methods + // So any changes in the program will be delayed and updated when getProgram is called on watch + watchCompilerHost.setTimeout = undefined; + watchCompilerHost.clearTimeout = undefined; + return ts.createWatchProgram(watchCompilerHost); +} +function hasTSConfigChanged(tsconfigPath) { + const stat = fs_1.default.statSync(tsconfigPath); + const lastModifiedAt = stat.mtimeMs; + const cachedLastModifiedAt = tsconfigLastModifiedTimestampCache.get(tsconfigPath); + tsconfigLastModifiedTimestampCache.set(tsconfigPath, lastModifiedAt); + if (cachedLastModifiedAt === undefined) { + return false; + } + return Math.abs(cachedLastModifiedAt - lastModifiedAt) > Number.EPSILON; +} +function maybeInvalidateProgram(existingWatch, filePath, tsconfigPath) { + /* + * By calling watchProgram.getProgram(), it will trigger a resync of the program based on + * whatever new file content we've given it from our input. + */ + let updatedProgram = existingWatch.getProgram().getProgram(); + // In case this change causes problems in larger real world codebases + // Provide an escape hatch so people don't _have_ to revert to an older version + if (process.env.TSESTREE_NO_INVALIDATION === 'true') { + return updatedProgram; + } + if (hasTSConfigChanged(tsconfigPath)) { + /* + * If the stat of the tsconfig has changed, that could mean the include/exclude/files lists has changed + * We need to make sure typescript knows this so it can update appropriately + */ + log('tsconfig has changed - triggering program update. %s', tsconfigPath); + fileWatchCallbackTrackingMap + .get(tsconfigPath) + .forEach(cb => cb(tsconfigPath, ts.FileWatcherEventKind.Changed)); + // tsconfig change means that the file list more than likely changed, so clear the cache + programFileListCache.delete(tsconfigPath); + } + let sourceFile = updatedProgram.getSourceFile(filePath); + if (sourceFile) { + return updatedProgram; + } + /* + * Missing source file means our program's folder structure might be out of date. + * So we need to tell typescript it needs to update the correct folder. + */ + log('File was not found in program - triggering folder update. %s', filePath); + // Find the correct directory callback by climbing the folder tree + const currentDir = (0, shared_1.canonicalDirname)(filePath); + let current = null; + let next = currentDir; + let hasCallback = false; + while (current !== next) { + current = next; + const folderWatchCallbacks = folderWatchCallbackTrackingMap.get(current); + if (folderWatchCallbacks) { + folderWatchCallbacks.forEach(cb => { + if (currentDir !== current) { + cb(currentDir, ts.FileWatcherEventKind.Changed); + } + cb(current, ts.FileWatcherEventKind.Changed); + }); + hasCallback = true; + } + next = (0, shared_1.canonicalDirname)(current); + } + if (!hasCallback) { + /* + * No callback means the paths don't matchup - so no point returning any program + * this will signal to the caller to skip this program + */ + log('No callback found for file, not part of this program. %s', filePath); + return null; + } + // directory update means that the file list more than likely changed, so clear the cache + programFileListCache.delete(tsconfigPath); + // force the immediate resync + updatedProgram = existingWatch.getProgram().getProgram(); + sourceFile = updatedProgram.getSourceFile(filePath); + if (sourceFile) { + return updatedProgram; + } + /* + * At this point we're in one of two states: + * - The file isn't supposed to be in this program due to exclusions + * - The file is new, and was renamed from an old, included filename + * + * For the latter case, we need to tell typescript that the old filename is now deleted + */ + log('File was still not found in program after directory update - checking file deletions. %s', filePath); + const rootFilenames = updatedProgram.getRootFileNames(); + // use find because we only need to "delete" one file to cause typescript to do a full resync + const deletedFile = rootFilenames.find(file => !fs_1.default.existsSync(file)); + if (!deletedFile) { + // There are no deleted files, so it must be the former case of the file not belonging to this program + return null; + } + const fileWatchCallbacks = fileWatchCallbackTrackingMap.get((0, shared_1.getCanonicalFileName)(deletedFile)); + if (!fileWatchCallbacks) { + // shouldn't happen, but just in case + log('Could not find watch callbacks for root file. %s', deletedFile); + return updatedProgram; + } + log('Marking file as deleted. %s', deletedFile); + fileWatchCallbacks.forEach(cb => cb(deletedFile, ts.FileWatcherEventKind.Deleted)); + // deleted files means that the file list _has_ changed, so clear the cache + programFileListCache.delete(tsconfigPath); + updatedProgram = existingWatch.getProgram().getProgram(); + sourceFile = updatedProgram.getSourceFile(filePath); + if (sourceFile) { + return updatedProgram; + } + log('File was still not found in program after deletion check, assuming it is not part of this program. %s', filePath); + return null; +} +//# sourceMappingURL=getWatchProgramsForProjects.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js.map new file mode 100644 index 0000000000..2675429509 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getWatchProgramsForProjects.js","sourceRoot":"","sources":["../../src/create-program/getWatchProgramsForProjects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4CAAoB;AACpB,+CAAiC;AAGjC,kDAA8C;AAE9C,qCAKkB;AAGlB,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,wDAAwD,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAGjC,CAAC;AAEJ;;;GAGG;AACH,MAAM,4BAA4B,GAAG,IAAI,GAAG,EAGzC,CAAC;AACJ,MAAM,8BAA8B,GAAG,IAAI,GAAG,EAG3C,CAAC;AAEJ;;GAEG;AACH,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAqC,CAAC;AAE1E;;GAEG;AACH,MAAM,kCAAkC,GAAG,IAAI,GAAG,EAAyB,CAAC;AAE5E,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAyB,CAAC;AAE7D;;;GAGG;AACH,SAAS,gBAAgB;IACvB,oBAAoB,CAAC,KAAK,EAAE,CAAC;IAC7B,4BAA4B,CAAC,KAAK,EAAE,CAAC;IACrC,8BAA8B,CAAC,KAAK,EAAE,CAAC;IACvC,mBAAmB,CAAC,KAAK,EAAE,CAAC;IAC5B,oBAAoB,CAAC,KAAK,EAAE,CAAC;IAC7B,kCAAkC,CAAC,KAAK,EA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AG,CACzD,IAAA,6BAAoB,EAAC,WAAW,CAAC,CAClC,CAAC;IACF,IAAI,CAAC,kBAAkB,EAAE;QACvB,qCAAqC;QACrC,GAAG,CAAC,kDAAkD,EAAE,WAAW,CAAC,CAAC;QACrE,OAAO,cAAc,CAAC;KACvB;IAED,GAAG,CAAC,6BAA6B,EAAE,WAAW,CAAC,CAAC;IAChD,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAC9B,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC,CACjD,CAAC;IAEF,2EAA2E;IAC3E,oBAAoB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAE1C,cAAc,GAAG,aAAa,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE,CAAC;IACzD,UAAU,GAAG,cAAc,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACpD,IAAI,UAAU,EAAE;QACd,OAAO,cAAc,CAAC;KACvB;IAED,GAAG,CACD,uGAAuG,EACvG,QAAQ,CACT,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts new file mode 100644 index 0000000000..d49a59a273 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts @@ -0,0 +1,32 @@ +import type { Program } from 'typescript'; +import * as ts from 'typescript'; +import type { ParseSettings } from '../parseSettings'; +interface ASTAndNoProgram { + ast: ts.SourceFile; + program: null; +} +interface ASTAndDefiniteProgram { + ast: ts.SourceFile; + program: ts.Program; +} +type ASTAndProgram = ASTAndDefiniteProgram | ASTAndNoProgram; +/** + * Compiler options required to avoid critical functionality issues + */ +declare const CORE_COMPILER_OPTIONS: ts.CompilerOptions; +declare function createDefaultCompilerOptionsFromExtra(parseSettings: ParseSettings): ts.CompilerOptions; +type CanonicalPath = string & { + __brand: unknown; +}; +declare function getCanonicalFileName(filePath: string): CanonicalPath; +declare function ensureAbsolutePath(p: string, tsconfigRootDir: string): string; +declare function canonicalDirname(p: CanonicalPath): CanonicalPath; +declare function getAstFromProgram(currentProgram: Program, filePath: string): ASTAndDefiniteProgram | undefined; +/** + * Hash content for compare content. + * @param content hashed contend + * @returns hashed result + */ +declare function createHash(content: string): string; +export { ASTAndDefiniteProgram, ASTAndNoProgram, ASTAndProgram, CORE_COMPILER_OPTIONS, canonicalDirname, CanonicalPath, createDefaultCompilerOptionsFromExtra, createHash, ensureAbsolutePath, getCanonicalFileName, getAstFromProgram, }; +//# sourceMappingURL=shared.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map new file mode 100644 index 0000000000..60fe8efa73 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/create-program/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,UAAU,eAAe;IACvB,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC;IACnB,OAAO,EAAE,IAAI,CAAC;CACf;AACD,UAAU,qBAAqB;IAC7B,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC;IACnB,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC;CACrB;AACD,KAAK,aAAa,GAAG,qBAAqB,GAAG,eAAe,CAAC;AAE7D;;GAEG;AACH,QAAA,MAAM,qBAAqB,EAAE,EAAE,CAAC,eAQ/B,CAAC;AAYF,iBAAS,qCAAqC,CAC5C,aAAa,EAAE,aAAa,GAC3B,EAAE,CAAC,eAAe,CASpB;AAGD,KAAK,aAAa,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AASnD,iBAAS,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,CAM7D;AAED,iBAAS,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAItE;AAED,iBAAS,gBAAgB,CAAC,CAAC,EAAE,aAAa,GAAG,aAAa,CAEzD;AAmBD,iBAAS,iBAAiB,CACxB,cAAc,EAAE,OAAO,EACvB,QAAQ,EAAE,MAAM,GACf,qBAAqB,GAAG,SAAS,CAWnC;AAED;;;;GAIG;AACH,iBAAS,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAM3C;AAED,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,qCAAqC,EACrC,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,GAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js new file mode 100644 index 0000000000..8ef5a6bce1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js @@ -0,0 +1,121 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.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 }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAstFromProgram = exports.getCanonicalFileName = exports.ensureAbsolutePath = exports.createHash = exports.createDefaultCompilerOptionsFromExtra = exports.canonicalDirname = exports.CORE_COMPILER_OPTIONS = void 0; +const path_1 = __importDefault(require("path")); +const ts = __importStar(require("typescript")); +/** + * Compiler options required to avoid critical functionality issues + */ +const CORE_COMPILER_OPTIONS = { + noEmit: true, + /** + * Flags required to make no-unused-vars work + */ + noUnusedLocals: true, + noUnusedParameters: true, +}; +exports.CORE_COMPILER_OPTIONS = CORE_COMPILER_OPTIONS; +/** + * Default compiler options for program generation + */ +const DEFAULT_COMPILER_OPTIONS = { + ...CORE_COMPILER_OPTIONS, + allowNonTsExtensions: true, + allowJs: true, + checkJs: true, +}; +function createDefaultCompilerOptionsFromExtra(parseSettings) { + if (parseSettings.debugLevel.has('typescript')) { + return { + ...DEFAULT_COMPILER_OPTIONS, + extendedDiagnostics: true, + }; + } + return DEFAULT_COMPILER_OPTIONS; +} +exports.createDefaultCompilerOptionsFromExtra = createDefaultCompilerOptionsFromExtra; +// typescript doesn't provide a ts.sys implementation for browser environments +const useCaseSensitiveFileNames = ts.sys !== undefined ? ts.sys.useCaseSensitiveFileNames : true; +const correctPathCasing = useCaseSensitiveFileNames + ? (filePath) => filePath + : (filePath) => filePath.toLowerCase(); +function getCanonicalFileName(filePath) { + let normalized = path_1.default.normalize(filePath); + if (normalized.endsWith(path_1.default.sep)) { + normalized = normalized.slice(0, -1); + } + return correctPathCasing(normalized); +} +exports.getCanonicalFileName = getCanonicalFileName; +function ensureAbsolutePath(p, tsconfigRootDir) { + return path_1.default.isAbsolute(p) + ? p + : path_1.default.join(tsconfigRootDir || process.cwd(), p); +} +exports.ensureAbsolutePath = ensureAbsolutePath; +function canonicalDirname(p) { + return path_1.default.dirname(p); +} +exports.canonicalDirname = canonicalDirname; +const DEFINITION_EXTENSIONS = [ + ts.Extension.Dts, + ts.Extension.Dcts, + ts.Extension.Dmts, +]; +function getExtension(fileName) { + if (!fileName) { + return null; + } + return (DEFINITION_EXTENSIONS.find(definitionExt => fileName.endsWith(definitionExt)) ?? path_1.default.extname(fileName)); +} +function getAstFromProgram(currentProgram, filePath) { + const ast = currentProgram.getSourceFile(filePath); + // working around https://github.com/typescript-eslint/typescript-eslint/issues/1573 + const expectedExt = getExtension(filePath); + const returnedExt = getExtension(ast?.fileName); + if (expectedExt !== returnedExt) { + return undefined; + } + return ast && { ast, program: currentProgram }; +} +exports.getAstFromProgram = getAstFromProgram; +/** + * Hash content for compare content. + * @param content hashed contend + * @returns hashed result + */ +function createHash(content) { + // No ts.sys in browser environments. + if (ts.sys?.createHash) { + return ts.sys.createHash(content); + } + return content; +} +exports.createHash = createHash; +//# sourceMappingURL=shared.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map new file mode 100644 index 0000000000..58dec415d3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/create-program/shared.ts"],"names":[],"mappings":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;AAxBnB;;;;GAIG;AACH,SAAS,UAAU,CAAC,OAAe;IACjC,qCAAqC;IACrC,IAAI,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE;QACtB,OAAO,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;KACnC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAUC,gCAAU"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts new file mode 100644 index 0000000000..61161389c5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts @@ -0,0 +1,16 @@ +import * as ts from 'typescript'; +import type { ASTAndDefiniteProgram } from './shared'; +export interface ProvidedProgramsSettings { + filePath: string; + tsconfigRootDir: string; +} +declare function useProvidedPrograms(programInstances: Iterable, { filePath, tsconfigRootDir }: ProvidedProgramsSettings): ASTAndDefiniteProgram | undefined; +/** + * Utility offered by parser to help consumers construct their own program instance. + * + * @param configFile the path to the tsconfig.json file, relative to `projectDirectory` + * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()` + */ +declare function createProgramFromConfigFile(configFile: string, projectDirectory?: string): ts.Program; +export { useProvidedPrograms, createProgramFromConfigFile }; +//# sourceMappingURL=useProvidedPrograms.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts.map new file mode 100644 index 0000000000..6a2bfcc97c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useProvidedPrograms.d.ts","sourceRoot":"","sources":["../../src/create-program/useProvidedPrograms.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAKtD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,iBAAS,mBAAmB,CAC1B,gBAAgB,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,EACtC,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,wBAAwB,GACtD,qBAAqB,GAAG,SAAS,CA4BnC;AAED;;;;;GAKG;AACH,iBAAS,2BAA2B,CAClC,UAAU,EAAE,MAAM,EAClB,gBAAgB,CAAC,EAAE,MAAM,GACxB,EAAE,CAAC,OAAO,CA4BZ;AAUD,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js new file mode 100644 index 0000000000..f5a7c877f8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js @@ -0,0 +1,93 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.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 }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createProgramFromConfigFile = exports.useProvidedPrograms = void 0; +const debug_1 = __importDefault(require("debug")); +const fs = __importStar(require("fs")); +const path = __importStar(require("path")); +const ts = __importStar(require("typescript")); +const shared_1 = require("./shared"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:useProvidedProgram'); +function useProvidedPrograms(programInstances, { filePath, tsconfigRootDir }) { + log('Retrieving ast for %s from provided program instance(s)', filePath); + let astAndProgram; + for (const programInstance of programInstances) { + astAndProgram = (0, shared_1.getAstFromProgram)(programInstance, filePath); + // Stop at the first applicable program instance + if (astAndProgram) { + break; + } + } + if (!astAndProgram) { + const relativeFilePath = path.relative(tsconfigRootDir || process.cwd(), filePath); + const errorLines = [ + '"parserOptions.programs" has been provided for @typescript-eslint/parser.', + `The file was not found in any of the provided program instance(s): ${relativeFilePath}`, + ]; + throw new Error(errorLines.join('\n')); + } + astAndProgram.program.getTypeChecker(); // ensure parent pointers are set in source files + return astAndProgram; +} +exports.useProvidedPrograms = useProvidedPrograms; +/** + * Utility offered by parser to help consumers construct their own program instance. + * + * @param configFile the path to the tsconfig.json file, relative to `projectDirectory` + * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()` + */ +function createProgramFromConfigFile(configFile, projectDirectory) { + if (ts.sys === undefined) { + throw new Error('`createProgramFromConfigFile` is only supported in a Node-like environment.'); + } + const parsed = ts.getParsedCommandLineOfConfigFile(configFile, shared_1.CORE_COMPILER_OPTIONS, { + onUnRecoverableConfigFileDiagnostic: diag => { + throw new Error(formatDiagnostics([diag])); // ensures that `parsed` is defined. + }, + fileExists: fs.existsSync, + getCurrentDirectory: () => (projectDirectory && path.resolve(projectDirectory)) || process.cwd(), + readDirectory: ts.sys.readDirectory, + readFile: file => fs.readFileSync(file, 'utf-8'), + useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, + }); + const result = parsed; // parsed is not undefined, since we throw on failure. + if (result.errors.length) { + throw new Error(formatDiagnostics(result.errors)); + } + const host = ts.createCompilerHost(result.options, true); + return ts.createProgram(result.fileNames, result.options, host); +} +exports.createProgramFromConfigFile = createProgramFromConfigFile; +function formatDiagnostics(diagnostics) { + return ts.formatDiagnostics(diagnostics, { + getCanonicalFileName: f => f, + getCurrentDirectory: process.cwd, + getNewLine: () => '\n', + }); +} +//# sourceMappingURL=useProvidedPrograms.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js.map new file mode 100644 index 0000000000..d09a7fcfad --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/create-program/useProvidedPrograms.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useProvidedPrograms.js","sourceRoot":"","sources":["../../src/create-program/useProvidedPrograms.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,uCAAyB;AACzB,2CAA6B;AAC7B,+CAAiC;AAGjC,qCAAoE;AAEpE,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,wDAAwD,CAAC,CAAC;AAO5E,SAAS,mBAAmB,CAC1B,gBAAsC,EACtC,EAAE,QAAQ,EAAE,eAAe,EAA4B;IAEvD,GAAG,CAAC,yDAAyD,EAAE,QAAQ,CAAC,CAAC;IAEzE,IAAI,aAAgD,CAAC;IACrD,KAAK,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AC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC;QAChD,yBAAyB,EAAE,EAAE,CAAC,GAAG,CAAC,yBAAyB;KAC5D,CACF,CAAC;IACF,MAAM,MAAM,GAAG,MAAO,CAAC,CAAC,sDAAsD;IAC9E,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;KACnD;IACD,MAAM,IAAI,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACzD,OAAO,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC;AAU6B,kEAA2B;AARzD,SAAS,iBAAiB,CAAC,WAA4B;IACrD,OAAO,EAAE,CAAC,iBAAiB,CAAC,WAAW,EAAE;QACvC,oBAAoB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5B,mBAAmB,EAAE,OAAO,CAAC,GAAG;QAChC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI;KACvB,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts new file mode 100644 index 0000000000..28b98fe833 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts @@ -0,0 +1,5 @@ +import type * as ts from 'typescript'; +import type { ASTMaps } from './convert'; +import type { ParserServices } from './parser-options'; +export declare function createParserServices(astMaps: ASTMaps, program: ts.Program | null): ParserServices; +//# sourceMappingURL=createParserServices.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts.map new file mode 100644 index 0000000000..86804fda5f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createParserServices.d.ts","sourceRoot":"","sources":["../src/createParserServices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,EAAE,CAAC,OAAO,GAAG,IAAI,GACzB,cAAc,CAkBhB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js new file mode 100644 index 0000000000..49fa99b492 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createParserServices = void 0; +function createParserServices(astMaps, program) { + if (!program) { + // we always return the node maps because + // (a) they don't require type info and + // (b) they can be useful when using some of TS's internal non-type-aware AST utils + return { program, ...astMaps }; + } + const checker = program.getTypeChecker(); + return { + program, + ...astMaps, + getSymbolAtLocation: node => checker.getSymbolAtLocation(astMaps.esTreeNodeToTSNodeMap.get(node)), + getTypeAtLocation: node => checker.getTypeAtLocation(astMaps.esTreeNodeToTSNodeMap.get(node)), + }; +} +exports.createParserServices = createParserServices; +//# sourceMappingURL=createParserServices.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js.map new file mode 100644 index 0000000000..2e52f08b2d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/createParserServices.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createParserServices.js","sourceRoot":"","sources":["../src/createParserServices.ts"],"names":[],"mappings":";;;AAKA,SAAgB,oBAAoB,CAClC,OAAgB,EAChB,OAA0B;IAE1B,IAAI,CAAC,OAAO,EAAE;QACZ,yCAAyC;QACzC,uCAAuC;QACvC,mFAAmF;QACnF,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;KAChC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAEzC,OAAO;QACL,OAAO;QACP,GAAG,OAAO;QACV,mBAAmB,EAAE,IAAI,CAAC,EAAE,CAC1B,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACtE,iBAAiB,EAAE,IAAI,CAAC,EAAE,CACxB,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACrE,CAAC;AACJ,CAAC;AArBD,oDAqBC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts new file mode 100644 index 0000000000..c312b154bc --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts @@ -0,0 +1,4 @@ +import * as ts from 'typescript'; +export declare function getModifiers(node: ts.Node | null | undefined, includeIllegalModifiers?: boolean): ts.Modifier[] | undefined; +export declare function getDecorators(node: ts.Node | null | undefined, includeIllegalDecorators?: boolean): ts.Decorator[] | undefined; +//# sourceMappingURL=getModifiers.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts.map new file mode 100644 index 0000000000..a67408e653 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getModifiers.d.ts","sourceRoot":"","sources":["../src/getModifiers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAMjC,wBAAgB,YAAY,CAC1B,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,EAChC,uBAAuB,UAAQ,GAC9B,EAAE,CAAC,QAAQ,EAAE,GAAG,SAAS,CAsB3B;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,EAChC,wBAAwB,UAAQ,GAC/B,EAAE,CAAC,SAAS,EAAE,GAAG,SAAS,CAoB5B"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js new file mode 100644 index 0000000000..fc6c760bf0 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js @@ -0,0 +1,66 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getDecorators = exports.getModifiers = void 0; +const ts = __importStar(require("typescript")); +const version_check_1 = require("./version-check"); +const isAtLeast48 = version_check_1.typescriptVersionIsAtLeast['4.8']; +function getModifiers(node, includeIllegalModifiers = false) { + if (node == null) { + return undefined; + } + if (isAtLeast48) { + // eslint-disable-next-line deprecation/deprecation -- this is safe as it's guarded + if (includeIllegalModifiers || ts.canHaveModifiers(node)) { + // eslint-disable-next-line deprecation/deprecation -- this is safe as it's guarded + const modifiers = ts.getModifiers(node); + return modifiers ? Array.from(modifiers) : undefined; + } + return undefined; + } + return ( + // @ts-expect-error intentional fallback for older TS versions + node.modifiers?.filter((m) => !ts.isDecorator(m))); +} +exports.getModifiers = getModifiers; +function getDecorators(node, includeIllegalDecorators = false) { + if (node == null) { + return undefined; + } + if (isAtLeast48) { + // eslint-disable-next-line deprecation/deprecation -- this is safe as it's guarded + if (includeIllegalDecorators || ts.canHaveDecorators(node)) { + // eslint-disable-next-line deprecation/deprecation -- this is safe as it's guarded + const decorators = ts.getDecorators(node); + return decorators ? Array.from(decorators) : undefined; + } + return undefined; + } + return ( + // @ts-expect-error intentional fallback for older TS versions + node.decorators?.filter(ts.isDecorator)); +} +exports.getDecorators = getDecorators; +//# sourceMappingURL=getModifiers.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js.map new file mode 100644 index 0000000000..f940e81559 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getModifiers.js","sourceRoot":"","sources":["../src/getModifiers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAEjC,mDAA6D;AAE7D,MAAM,WAAW,GAAG,0CAA0B,CAAC,KAAK,CAAC,CAAC;AAEtD,SAAgB,YAAY,CAC1B,IAAgC,EAChC,uBAAuB,GAAG,KAAK;IAE/B,IAAI,IAAI,IAAI,IAAI,EAAE;QAChB,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,WAAW,EAAE;QACf,mFAAmF;QACnF,IAAI,uBAAuB,IAAI,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE;YACxD,mFAAmF;YACnF,MAAM,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC,IAAuB,CAAC,CAAC;YAC3D,OAAO,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SACtD;QAED,OAAO,SAAS,CAAC;KAClB;IAED,OAAO;IACL,8DAA8D;IAC7D,IAAI,CAAC,SAA2B,EAAE,MAAM,CACvC,CAAC,CAAC,EAAoB,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAC5C,CACF,CAAC;AACJ,CAAC;AAzBD,oCAyBC;AAED,SAAgB,aAAa,CAC3B,IAAgC,EAChC,wBAAwB,GAAG,KAAK;IAEhC,IAAI,IAAI,IAAI,IAAI,EAAE;QAChB,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,WAAW,EAAE;QACf,mFAAmF;QACnF,IAAI,wBAAwB,IAAI,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE;YAC1D,mFAAmF;YACnF,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,IAAwB,CAAC,CAAC;YAC9D,OAAO,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;SACxD;QAED,OAAO,SAAS,CAAC;KAClB;IAED,OAAO;IACL,8DAA8D;IAC7D,IAAI,CAAC,UAAwB,EAAE,MAAM,CAAC,EAAE,CAAC,WAAW,CAAC,CACvD,CAAC;AACJ,CAAC;AAvBD,sCAuBC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts new file mode 100644 index 0000000000..af4c105d7e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts @@ -0,0 +1,13 @@ +export { AST, parse, parseAndGenerateServices, ParseAndGenerateServicesResult, } from './parser'; +export { ParserServices, ParserServicesWithTypeInformation, ParserServicesWithoutTypeInformation, TSESTreeOptions, } from './parser-options'; +export { simpleTraverse } from './simple-traverse'; +export * from './ts-estree'; +export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedPrograms'; +export * from './create-program/getScriptKind'; +export { getCanonicalFileName } from './create-program/shared'; +export { typescriptVersionIsAtLeast } from './version-check'; +export * from './getModifiers'; +export { TSError } from './node-utils'; +export * from './clear-caches'; +export declare const version: string; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map new file mode 100644 index 0000000000..ad11f398c2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,KAAK,EACL,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,cAAc,EACd,iCAAiC,EACjC,oCAAoC,EACpC,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,2BAA2B,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACpG,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAI/B,eAAO,MAAM,OAAO,EAAE,MAA2C,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.js new file mode 100644 index 0000000000..816ac19bbf --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.js @@ -0,0 +1,38 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = exports.TSError = exports.typescriptVersionIsAtLeast = exports.getCanonicalFileName = exports.createProgram = exports.simpleTraverse = exports.parseAndGenerateServices = exports.parse = void 0; +var parser_1 = require("./parser"); +Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parser_1.parse; } }); +Object.defineProperty(exports, "parseAndGenerateServices", { enumerable: true, get: function () { return parser_1.parseAndGenerateServices; } }); +var simple_traverse_1 = require("./simple-traverse"); +Object.defineProperty(exports, "simpleTraverse", { enumerable: true, get: function () { return simple_traverse_1.simpleTraverse; } }); +__exportStar(require("./ts-estree"), exports); +var useProvidedPrograms_1 = require("./create-program/useProvidedPrograms"); +Object.defineProperty(exports, "createProgram", { enumerable: true, get: function () { return useProvidedPrograms_1.createProgramFromConfigFile; } }); +__exportStar(require("./create-program/getScriptKind"), exports); +var shared_1 = require("./create-program/shared"); +Object.defineProperty(exports, "getCanonicalFileName", { enumerable: true, get: function () { return shared_1.getCanonicalFileName; } }); +var version_check_1 = require("./version-check"); +Object.defineProperty(exports, "typescriptVersionIsAtLeast", { enumerable: true, get: function () { return version_check_1.typescriptVersionIsAtLeast; } }); +__exportStar(require("./getModifiers"), exports); +var node_utils_1 = require("./node-utils"); +Object.defineProperty(exports, "TSError", { enumerable: true, get: function () { return node_utils_1.TSError; } }); +__exportStar(require("./clear-caches"), exports); +// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access +exports.version = require('../package.json').version; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map new file mode 100644 index 0000000000..5a7c837752 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mCAKkB;AAHhB,+FAAA,KAAK,OAAA;AACL,kHAAA,wBAAwB,OAAA;AAS1B,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,8CAA4B;AAC5B,4EAAoG;AAA3F,oHAAA,2BAA2B,OAAiB;AACrD,iEAA+C;AAC/C,kDAA+D;AAAtD,8GAAA,oBAAoB,OAAA;AAC7B,iDAA6D;AAApD,2HAAA,0BAA0B,OAAA;AACnC,iDAA+B;AAC/B,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAChB,iDAA+B;AAE/B,sHAAsH;AACtH,+GAA+G;AAClG,QAAA,OAAO,GAAW,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts new file mode 100644 index 0000000000..7953cc6fee --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts @@ -0,0 +1,2 @@ +export declare const xhtmlEntities: Record; +//# sourceMappingURL=xhtml-entities.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts.map new file mode 100644 index 0000000000..ce45e83d3d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xhtml-entities.d.ts","sourceRoot":"","sources":["../../src/jsx/xhtml-entities.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA8PhD,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js new file mode 100644 index 0000000000..bf58e96574 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js @@ -0,0 +1,259 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.xhtmlEntities = void 0; +exports.xhtmlEntities = { + quot: '\u0022', + amp: '&', + apos: '\u0027', + lt: '<', + gt: '>', + nbsp: '\u00A0', + iexcl: '\u00A1', + cent: '\u00A2', + pound: '\u00A3', + curren: '\u00A4', + yen: '\u00A5', + brvbar: '\u00A6', + sect: '\u00A7', + uml: '\u00A8', + copy: '\u00A9', + ordf: '\u00AA', + laquo: '\u00AB', + not: '\u00AC', + shy: '\u00AD', + reg: '\u00AE', + macr: '\u00AF', + deg: '\u00B0', + plusmn: '\u00B1', + sup2: '\u00B2', + sup3: '\u00B3', + acute: '\u00B4', + micro: '\u00B5', + para: '\u00B6', + middot: '\u00B7', + cedil: '\u00B8', + sup1: '\u00B9', + ordm: '\u00BA', + raquo: '\u00BB', + frac14: '\u00BC', + frac12: '\u00BD', + frac34: '\u00BE', + iquest: '\u00BF', + Agrave: '\u00C0', + Aacute: '\u00C1', + Acirc: '\u00C2', + Atilde: '\u00C3', + Auml: '\u00C4', + Aring: '\u00C5', + AElig: '\u00C6', + Ccedil: '\u00C7', + Egrave: '\u00C8', + Eacute: '\u00C9', + Ecirc: '\u00CA', + Euml: '\u00CB', + Igrave: '\u00CC', + Iacute: '\u00CD', + Icirc: '\u00CE', + Iuml: '\u00CF', + ETH: '\u00D0', + Ntilde: '\u00D1', + Ograve: '\u00D2', + Oacute: '\u00D3', + Ocirc: '\u00D4', + Otilde: '\u00D5', + Ouml: '\u00D6', + times: '\u00D7', + Oslash: '\u00D8', + Ugrave: '\u00D9', + Uacute: '\u00DA', + Ucirc: '\u00DB', + Uuml: '\u00DC', + Yacute: '\u00DD', + THORN: '\u00DE', + szlig: '\u00DF', + agrave: '\u00E0', + aacute: '\u00E1', + acirc: '\u00E2', + atilde: '\u00E3', + auml: '\u00E4', + aring: '\u00E5', + aelig: '\u00E6', + ccedil: '\u00E7', + egrave: '\u00E8', + eacute: '\u00E9', + ecirc: '\u00EA', + euml: '\u00EB', + igrave: '\u00EC', + iacute: '\u00ED', + icirc: '\u00EE', + iuml: '\u00EF', + eth: '\u00F0', + ntilde: '\u00F1', + ograve: '\u00F2', + oacute: '\u00F3', + ocirc: '\u00F4', + otilde: '\u00F5', + ouml: '\u00F6', + divide: '\u00F7', + oslash: '\u00F8', + ugrave: '\u00F9', + uacute: '\u00FA', + ucirc: '\u00FB', + uuml: '\u00FC', + yacute: '\u00FD', + thorn: '\u00FE', + yuml: '\u00FF', + OElig: '\u0152', + oelig: '\u0153', + Scaron: '\u0160', + scaron: '\u0161', + Yuml: '\u0178', + fnof: '\u0192', + circ: '\u02C6', + tilde: '\u02DC', + Alpha: '\u0391', + Beta: '\u0392', + Gamma: '\u0393', + Delta: '\u0394', + Epsilon: '\u0395', + Zeta: '\u0396', + Eta: '\u0397', + Theta: '\u0398', + Iota: '\u0399', + Kappa: '\u039A', + Lambda: '\u039B', + Mu: '\u039C', + Nu: '\u039D', + Xi: '\u039E', + Omicron: '\u039F', + Pi: '\u03A0', + Rho: '\u03A1', + Sigma: '\u03A3', + Tau: '\u03A4', + Upsilon: '\u03A5', + Phi: '\u03A6', + Chi: '\u03A7', + Psi: '\u03A8', + Omega: '\u03A9', + alpha: '\u03B1', + beta: '\u03B2', + gamma: '\u03B3', + delta: '\u03B4', + epsilon: '\u03B5', + zeta: '\u03B6', + eta: '\u03B7', + theta: '\u03B8', + iota: '\u03B9', + kappa: '\u03BA', + lambda: '\u03BB', + mu: '\u03BC', + nu: '\u03BD', + xi: '\u03BE', + omicron: '\u03BF', + pi: '\u03C0', + rho: '\u03C1', + sigmaf: '\u03C2', + sigma: '\u03C3', + tau: '\u03C4', + upsilon: '\u03C5', + phi: '\u03C6', + chi: '\u03C7', + psi: '\u03C8', + omega: '\u03C9', + thetasym: '\u03D1', + upsih: '\u03D2', + piv: '\u03D6', + ensp: '\u2002', + emsp: '\u2003', + thinsp: '\u2009', + zwnj: '\u200C', + zwj: '\u200D', + lrm: '\u200E', + rlm: '\u200F', + ndash: '\u2013', + mdash: '\u2014', + lsquo: '\u2018', + rsquo: '\u2019', + sbquo: '\u201A', + ldquo: '\u201C', + rdquo: '\u201D', + bdquo: '\u201E', + dagger: '\u2020', + Dagger: '\u2021', + bull: '\u2022', + hellip: '\u2026', + permil: '\u2030', + prime: '\u2032', + Prime: '\u2033', + lsaquo: '\u2039', + rsaquo: '\u203A', + oline: '\u203E', + frasl: '\u2044', + euro: '\u20AC', + image: '\u2111', + weierp: '\u2118', + real: '\u211C', + trade: '\u2122', + alefsym: '\u2135', + larr: '\u2190', + uarr: '\u2191', + rarr: '\u2192', + darr: '\u2193', + harr: '\u2194', + crarr: '\u21B5', + lArr: '\u21D0', + uArr: '\u21D1', + rArr: '\u21D2', + dArr: '\u21D3', + hArr: '\u21D4', + forall: '\u2200', + part: '\u2202', + exist: '\u2203', + empty: '\u2205', + nabla: '\u2207', + isin: '\u2208', + notin: '\u2209', + ni: '\u220B', + prod: '\u220F', + sum: '\u2211', + minus: '\u2212', + lowast: '\u2217', + radic: '\u221A', + prop: '\u221D', + infin: '\u221E', + ang: '\u2220', + and: '\u2227', + or: '\u2228', + cap: '\u2229', + cup: '\u222A', + int: '\u222B', + there4: '\u2234', + sim: '\u223C', + cong: '\u2245', + asymp: '\u2248', + ne: '\u2260', + equiv: '\u2261', + le: '\u2264', + ge: '\u2265', + sub: '\u2282', + sup: '\u2283', + nsub: '\u2284', + sube: '\u2286', + supe: '\u2287', + oplus: '\u2295', + otimes: '\u2297', + perp: '\u22A5', + sdot: '\u22C5', + lceil: '\u2308', + rceil: '\u2309', + lfloor: '\u230A', + rfloor: '\u230B', + lang: '\u2329', + rang: '\u232A', + loz: '\u25CA', + spades: '\u2660', + clubs: '\u2663', + hearts: '\u2665', + diams: '\u2666', +}; +//# sourceMappingURL=xhtml-entities.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js.map new file mode 100644 index 0000000000..30c14ec78b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/jsx/xhtml-entities.js.map @@ -0,0 +1 @@ +{"version":3,"file":"xhtml-entities.js","sourceRoot":"","sources":["../../src/jsx/xhtml-entities.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAA2B;IACnD,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,QAAQ;IACd,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,QAAQ;IACb,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,QAAQ;IACb,MAAM,EAAE,QAAQ;IAChB,IAA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AE,QAAQ;IACb,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,QAAQ;IACf,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,QAAQ;IACb,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;CAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts new file mode 100644 index 0000000000..c60792348e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts @@ -0,0 +1,253 @@ +import * as ts from 'typescript'; +import type { TSESTree, TSNode } from './ts-estree'; +import { AST_NODE_TYPES, AST_TOKEN_TYPES } from './ts-estree'; +declare const SyntaxKind: typeof ts.SyntaxKind; +type LogicalOperatorKind = ts.SyntaxKind.AmpersandAmpersandToken | ts.SyntaxKind.BarBarToken | ts.SyntaxKind.QuestionQuestionToken; +interface TokenToText extends TSESTree.PunctuatorTokenToText, TSESTree.BinaryOperatorToText { + [SyntaxKind.ImportKeyword]: 'import'; + [SyntaxKind.NewKeyword]: 'new'; + [SyntaxKind.KeyOfKeyword]: 'keyof'; + [SyntaxKind.ReadonlyKeyword]: 'readonly'; + [SyntaxKind.UniqueKeyword]: 'unique'; +} +type AssignmentOperatorKind = keyof TSESTree.AssignmentOperatorToText; +type BinaryOperatorKind = keyof TSESTree.BinaryOperatorToText; +type DeclarationKind = TSESTree.VariableDeclaration['kind']; +/** + * Returns true if the given ts.Token is a logical operator + * @param operator the operator token + * @returns is a logical operator + */ +export declare function isLogicalOperator(operator: ts.BinaryOperatorToken): operator is ts.Token; +export declare function isESTreeBinaryOperator(operator: ts.BinaryOperatorToken): operator is ts.Token; +type TokenForTokenKind = T extends keyof TokenToText ? TokenToText[T] : string | undefined; +/** + * Returns the string form of the given TSToken SyntaxKind + * @param kind the token's SyntaxKind + * @returns the token applicable token as a string + */ +export declare function getTextForTokenKind(kind: T): TokenForTokenKind; +/** + * Returns true if the given ts.Node is a valid ESTree class member + * @param node TypeScript AST node + * @returns is valid ESTree class member + */ +export declare function isESTreeClassMember(node: ts.Node): boolean; +/** + * Checks if a ts.Node has a modifier + * @param modifierKind TypeScript SyntaxKind modifier + * @param node TypeScript AST node + * @returns has the modifier specified + */ +export declare function hasModifier(modifierKind: ts.KeywordSyntaxKind, node: ts.Node): boolean; +/** + * Get last last modifier in ast + * @param node TypeScript AST node + * @returns returns last modifier if present or null + */ +export declare function getLastModifier(node: ts.Node): ts.Modifier | null; +/** + * Returns true if the given ts.Token is a comma + * @param token the TypeScript token + * @returns is comma + */ +export declare function isComma(token: ts.Node): token is ts.Token; +/** + * Returns true if the given ts.Node is a comment + * @param node the TypeScript node + * @returns is comment + */ +export declare function isComment(node: ts.Node): boolean; +/** + * Returns the binary expression type of the given ts.Token + * @param operator the operator token + * @returns the binary expression type + */ +export declare function getBinaryExpressionType(operator: ts.BinaryOperatorToken): { + type: AST_NODE_TYPES.AssignmentExpression; + operator: TokenForTokenKind; +} | { + type: AST_NODE_TYPES.BinaryExpression; + operator: TokenForTokenKind; +} | { + type: AST_NODE_TYPES.LogicalExpression; + operator: TokenForTokenKind; +}; +/** + * Returns line and column data for the given positions, + * @param pos position to check + * @param ast the AST object + * @returns line and column + */ +export declare function getLineAndCharacterFor(pos: number, ast: ts.SourceFile): TSESTree.Position; +/** + * Returns line and column data for the given start and end positions, + * for the given AST + * @param range start end data + * @param ast the AST object + * @returns the loc data + */ +export declare function getLocFor(range: TSESTree.Range, ast: ts.SourceFile): TSESTree.SourceLocation; +/** + * Check whatever node can contain directive + * @param node + * @returns returns true if node can contain directive + */ +export declare function canContainDirective(node: ts.Block | ts.ClassStaticBlockDeclaration | ts.ModuleBlock | ts.SourceFile): boolean; +/** + * Returns range for the given ts.Node + * @param node the ts.Node or ts.Token + * @param ast the AST object + * @returns the range data + */ +export declare function getRange(node: Pick, ast: ts.SourceFile): [number, number]; +/** + * Returns true if a given ts.Node is a JSX token + * @param node ts.Node to be checked + * @returns is a JSX token + */ +export declare function isJSXToken(node: ts.Node): boolean; +/** + * Returns the declaration kind of the given ts.Node + * @param node TypeScript AST node + * @returns declaration kind + */ +export declare function getDeclarationKind(node: ts.VariableDeclarationList): DeclarationKind; +/** + * Gets a ts.Node's accessibility level + * @param node The ts.Node + * @returns accessibility "public", "protected", "private", or null + */ +export declare function getTSNodeAccessibility(node: ts.Node): 'private' | 'protected' | 'public' | undefined; +/** + * Finds the next token based on the previous one and its parent + * Had to copy this from TS instead of using TS's version because theirs doesn't pass the ast to getChildren + * @param previousToken The previous TSToken + * @param parent The parent TSNode + * @param ast The TS AST + * @returns the next TSToken + */ +export declare function findNextToken(previousToken: ts.TextRange, parent: ts.Node, ast: ts.SourceFile): ts.Node | undefined; +/** + * Find the first matching ancestor based on the given predicate function. + * @param node The current ts.Node + * @param predicate The predicate function to apply to each checked ancestor + * @returns a matching parent ts.Node + */ +export declare function findFirstMatchingAncestor(node: ts.Node, predicate: (node: ts.Node) => boolean): ts.Node | undefined; +/** + * Returns true if a given ts.Node has a JSX token within its hierarchy + * @param node ts.Node to be checked + * @returns has JSX ancestor + */ +export declare function hasJSXAncestor(node: ts.Node): boolean; +/** + * Unescape the text content of string literals, e.g. & -> & + * @param text The escaped string literal text. + * @returns The unescaped string literal text. + */ +export declare function unescapeStringLiteralText(text: string): string; +/** + * Returns true if a given ts.Node is a computed property + * @param node ts.Node to be checked + * @returns is Computed Property + */ +export declare function isComputedProperty(node: ts.Node): node is ts.ComputedPropertyName; +/** + * Returns true if a given ts.Node is optional (has QuestionToken) + * @param node ts.Node to be checked + * @returns is Optional + */ +export declare function isOptional(node: { + questionToken?: ts.QuestionToken; +}): boolean; +/** + * Returns true if the node is an optional chain node + */ +export declare function isChainExpression(node: TSESTree.Node): node is TSESTree.ChainExpression; +/** + * Returns true of the child of property access expression is an optional chain + */ +export declare function isChildUnwrappableOptionalChain(node: ts.CallExpression | ts.ElementAccessExpression | ts.NonNullExpression | ts.PropertyAccessExpression, child: TSESTree.Node): boolean; +/** + * Returns the type of a given ts.Token + * @param token the ts.Token + * @returns the token type + */ +export declare function getTokenType(token: ts.Identifier | ts.Token): Exclude; +/** + * Extends and formats a given ts.Token, for a given AST + * @param token the ts.Token + * @param ast the AST object + * @returns the converted Token + */ +export declare function convertToken(token: ts.Token, ast: ts.SourceFile): TSESTree.Token; +/** + * Converts all tokens for the given AST + * @param ast the AST object + * @returns the converted Tokens + */ +export declare function convertTokens(ast: ts.SourceFile): TSESTree.Token[]; +export declare class TSError extends Error { + readonly fileName: string; + readonly location: { + start: { + line: number; + column: number; + offset: number; + }; + end: { + line: number; + column: number; + offset: number; + }; + }; + constructor(message: string, fileName: string, location: { + start: { + line: number; + column: number; + offset: number; + }; + end: { + line: number; + column: number; + offset: number; + }; + }); + get index(): number; + get lineNumber(): number; + get column(): number; +} +/** + * @param message the error message + * @param ast the AST object + * @param startIndex the index at which the error starts + * @param endIndex the index at which the error ends + * @returns converted error object + */ +export declare function createError(message: string, ast: ts.SourceFile, startIndex: number, endIndex?: number): TSError; +export declare function nodeHasIllegalDecorators(node: ts.Node): node is ts.Node & { + illegalDecorators: ts.Node[]; +}; +/** + * @param n the TSNode + * @param ast the TS AST + */ +export declare function nodeHasTokens(n: ts.Node, ast: ts.SourceFile): boolean; +/** + * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). + * @template T + * @template U + * @param array + * @param callback + */ +export declare function firstDefined(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined; +export declare function identifierIsThisKeyword(id: ts.Identifier): boolean; +export declare function isThisIdentifier(node: ts.Node | undefined): node is ts.Identifier; +export declare function isThisInTypeQuery(node: ts.Node): boolean; +export declare function nodeIsPresent(node: ts.Node | undefined): node is ts.Node; +export declare function getContainingFunction(node: ts.Node): ts.SignatureDeclaration | undefined; +export declare function nodeCanBeDecorated(node: TSNode): boolean; +export declare function getNamespaceModifiers(node: ts.ModuleDeclaration): ts.Modifier[] | undefined; +export {}; +//# sourceMappingURL=node-utils.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map new file mode 100644 index 0000000000..dca7109193 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"node-utils.d.ts","sourceRoot":"","sources":["../src/node-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAIjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAK9D,QAAA,MAAM,UAAU,sBAAgB,CAAC;AAEjC,KAAK,mBAAmB,GACpB,EAAE,CAAC,UAAU,CAAC,uBAAuB,GACrC,EAAE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AAE,EAAE,CAAC,UAAU,GAAG,OAAO,CAMlE;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,SAAS,GACxB,IAAI,IAAI,EAAE,CAAC,UAAU,CAMvB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,OAAO,CAUxD;AAeD,wBAAgB,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,IAAI,CAExE;AAGD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,EAAE,CAAC,oBAAoB,GAAG,SAAS,CAErC;AA4BD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAuDxD;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,EAAE,CAAC,iBAAiB,GACzB,EAAE,CAAC,QAAQ,EAAE,GAAG,SAAS,CAiB3B"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js new file mode 100644 index 0000000000..0d6c638969 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js @@ -0,0 +1,777 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getNamespaceModifiers = exports.nodeCanBeDecorated = exports.getContainingFunction = exports.nodeIsPresent = exports.isThisInTypeQuery = exports.isThisIdentifier = exports.identifierIsThisKeyword = exports.firstDefined = exports.nodeHasTokens = exports.nodeHasIllegalDecorators = exports.createError = exports.TSError = exports.convertTokens = exports.convertToken = exports.getTokenType = exports.isChildUnwrappableOptionalChain = exports.isChainExpression = exports.isOptional = exports.isComputedProperty = exports.unescapeStringLiteralText = exports.hasJSXAncestor = exports.findFirstMatchingAncestor = exports.findNextToken = exports.getTSNodeAccessibility = exports.getDeclarationKind = exports.isJSXToken = exports.getRange = exports.canContainDirective = exports.getLocFor = exports.getLineAndCharacterFor = exports.getBinaryExpressionType = exports.isComment = exports.isComma = exports.getLastModifier = exports.hasModifier = exports.isESTreeClassMember = exports.getTextForTokenKind = exports.isESTreeBinaryOperator = exports.isLogicalOperator = void 0; +const ts = __importStar(require("typescript")); +const getModifiers_1 = require("./getModifiers"); +const xhtml_entities_1 = require("./jsx/xhtml-entities"); +const ts_estree_1 = require("./ts-estree"); +const version_check_1 = require("./version-check"); +const isAtLeast50 = version_check_1.typescriptVersionIsAtLeast['5.0']; +const SyntaxKind = ts.SyntaxKind; +const LOGICAL_OPERATORS = new Set([ + SyntaxKind.BarBarToken, + SyntaxKind.AmpersandAmpersandToken, + SyntaxKind.QuestionQuestionToken, +]); +const ASSIGNMENT_OPERATORS = new Set([ + ts.SyntaxKind.EqualsToken, + ts.SyntaxKind.PlusEqualsToken, + ts.SyntaxKind.MinusEqualsToken, + ts.SyntaxKind.AsteriskEqualsToken, + ts.SyntaxKind.AsteriskAsteriskEqualsToken, + ts.SyntaxKind.SlashEqualsToken, + ts.SyntaxKind.PercentEqualsToken, + ts.SyntaxKind.LessThanLessThanEqualsToken, + ts.SyntaxKind.GreaterThanGreaterThanEqualsToken, + ts.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken, + ts.SyntaxKind.AmpersandEqualsToken, + ts.SyntaxKind.BarEqualsToken, + ts.SyntaxKind.BarBarEqualsToken, + ts.SyntaxKind.AmpersandAmpersandEqualsToken, + ts.SyntaxKind.QuestionQuestionEqualsToken, + ts.SyntaxKind.CaretEqualsToken, +]); +const BINARY_OPERATORS = new Set([ + SyntaxKind.InstanceOfKeyword, + SyntaxKind.InKeyword, + SyntaxKind.AsteriskAsteriskToken, + SyntaxKind.AsteriskToken, + SyntaxKind.SlashToken, + SyntaxKind.PercentToken, + SyntaxKind.PlusToken, + SyntaxKind.MinusToken, + SyntaxKind.AmpersandToken, + SyntaxKind.BarToken, + SyntaxKind.CaretToken, + SyntaxKind.LessThanLessThanToken, + SyntaxKind.GreaterThanGreaterThanToken, + SyntaxKind.GreaterThanGreaterThanGreaterThanToken, + SyntaxKind.AmpersandAmpersandToken, + SyntaxKind.BarBarToken, + SyntaxKind.LessThanToken, + SyntaxKind.LessThanEqualsToken, + SyntaxKind.GreaterThanToken, + SyntaxKind.GreaterThanEqualsToken, + SyntaxKind.EqualsEqualsToken, + SyntaxKind.EqualsEqualsEqualsToken, + SyntaxKind.ExclamationEqualsEqualsToken, + SyntaxKind.ExclamationEqualsToken, +]); +/** + * Returns true if the given ts.Token is the assignment operator + * @param operator the operator token + * @returns is assignment + */ +function isAssignmentOperator(operator) { + return ASSIGNMENT_OPERATORS.has(operator.kind); +} +/** + * Returns true if the given ts.Token is a logical operator + * @param operator the operator token + * @returns is a logical operator + */ +function isLogicalOperator(operator) { + return LOGICAL_OPERATORS.has(operator.kind); +} +exports.isLogicalOperator = isLogicalOperator; +function isESTreeBinaryOperator(operator) { + return BINARY_OPERATORS.has(operator.kind); +} +exports.isESTreeBinaryOperator = isESTreeBinaryOperator; +/** + * Returns the string form of the given TSToken SyntaxKind + * @param kind the token's SyntaxKind + * @returns the token applicable token as a string + */ +function getTextForTokenKind(kind) { + return ts.tokenToString(kind); +} +exports.getTextForTokenKind = getTextForTokenKind; +/** + * Returns true if the given ts.Node is a valid ESTree class member + * @param node TypeScript AST node + * @returns is valid ESTree class member + */ +function isESTreeClassMember(node) { + return node.kind !== SyntaxKind.SemicolonClassElement; +} +exports.isESTreeClassMember = isESTreeClassMember; +/** + * Checks if a ts.Node has a modifier + * @param modifierKind TypeScript SyntaxKind modifier + * @param node TypeScript AST node + * @returns has the modifier specified + */ +function hasModifier(modifierKind, node) { + const modifiers = (0, getModifiers_1.getModifiers)(node); + return modifiers?.some(modifier => modifier.kind === modifierKind) === true; +} +exports.hasModifier = hasModifier; +/** + * Get last last modifier in ast + * @param node TypeScript AST node + * @returns returns last modifier if present or null + */ +function getLastModifier(node) { + const modifiers = (0, getModifiers_1.getModifiers)(node); + if (modifiers == null) { + return null; + } + return modifiers[modifiers.length - 1] ?? null; +} +exports.getLastModifier = getLastModifier; +/** + * Returns true if the given ts.Token is a comma + * @param token the TypeScript token + * @returns is comma + */ +function isComma(token) { + return token.kind === SyntaxKind.CommaToken; +} +exports.isComma = isComma; +/** + * Returns true if the given ts.Node is a comment + * @param node the TypeScript node + * @returns is comment + */ +function isComment(node) { + return (node.kind === SyntaxKind.SingleLineCommentTrivia || + node.kind === SyntaxKind.MultiLineCommentTrivia); +} +exports.isComment = isComment; +/** + * Returns true if the given ts.Node is a JSDoc comment + * @param node the TypeScript node + * @returns is JSDoc comment + */ +function isJSDocComment(node) { + return node.kind === SyntaxKind.JSDocComment; +} +/** + * Returns the binary expression type of the given ts.Token + * @param operator the operator token + * @returns the binary expression type + */ +function getBinaryExpressionType(operator) { + if (isAssignmentOperator(operator)) { + return { + type: ts_estree_1.AST_NODE_TYPES.AssignmentExpression, + operator: getTextForTokenKind(operator.kind), + }; + } + else if (isLogicalOperator(operator)) { + return { + type: ts_estree_1.AST_NODE_TYPES.LogicalExpression, + operator: getTextForTokenKind(operator.kind), + }; + } + else if (isESTreeBinaryOperator(operator)) { + return { + type: ts_estree_1.AST_NODE_TYPES.BinaryExpression, + operator: getTextForTokenKind(operator.kind), + }; + } + throw new Error(`Unexpected binary operator ${ts.tokenToString(operator.kind)}`); +} +exports.getBinaryExpressionType = getBinaryExpressionType; +/** + * Returns line and column data for the given positions, + * @param pos position to check + * @param ast the AST object + * @returns line and column + */ +function getLineAndCharacterFor(pos, ast) { + const loc = ast.getLineAndCharacterOfPosition(pos); + return { + line: loc.line + 1, + column: loc.character, + }; +} +exports.getLineAndCharacterFor = getLineAndCharacterFor; +/** + * Returns line and column data for the given start and end positions, + * for the given AST + * @param range start end data + * @param ast the AST object + * @returns the loc data + */ +function getLocFor(range, ast) { + const [start, end] = range.map(pos => getLineAndCharacterFor(pos, ast)); + return { start, end }; +} +exports.getLocFor = getLocFor; +/** + * Check whatever node can contain directive + * @param node + * @returns returns true if node can contain directive + */ +function canContainDirective(node) { + if (node.kind === ts.SyntaxKind.Block) { + switch (node.parent.kind) { + case ts.SyntaxKind.Constructor: + case ts.SyntaxKind.GetAccessor: + case ts.SyntaxKind.SetAccessor: + case ts.SyntaxKind.ArrowFunction: + case ts.SyntaxKind.FunctionExpression: + case ts.SyntaxKind.FunctionDeclaration: + case ts.SyntaxKind.MethodDeclaration: + return true; + default: + return false; + } + } + return true; +} +exports.canContainDirective = canContainDirective; +/** + * Returns range for the given ts.Node + * @param node the ts.Node or ts.Token + * @param ast the AST object + * @returns the range data + */ +function getRange(node, ast) { + return [node.getStart(ast), node.getEnd()]; +} +exports.getRange = getRange; +/** + * Returns true if a given ts.Node is a token + * @param node the ts.Node + * @returns is a token + */ +function isToken(node) { + return (node.kind >= SyntaxKind.FirstToken && node.kind <= SyntaxKind.LastToken); +} +/** + * Returns true if a given ts.Node is a JSX token + * @param node ts.Node to be checked + * @returns is a JSX token + */ +function isJSXToken(node) { + return (node.kind >= SyntaxKind.JsxElement && node.kind <= SyntaxKind.JsxAttribute); +} +exports.isJSXToken = isJSXToken; +/** + * Returns the declaration kind of the given ts.Node + * @param node TypeScript AST node + * @returns declaration kind + */ +function getDeclarationKind(node) { + if (node.flags & ts.NodeFlags.Let) { + return 'let'; + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison + if ((node.flags & ts.NodeFlags.AwaitUsing) === ts.NodeFlags.AwaitUsing) { + return 'await using'; + } + if (node.flags & ts.NodeFlags.Const) { + return 'const'; + } + if (node.flags & ts.NodeFlags.Using) { + return 'using'; + } + return 'var'; +} +exports.getDeclarationKind = getDeclarationKind; +/** + * Gets a ts.Node's accessibility level + * @param node The ts.Node + * @returns accessibility "public", "protected", "private", or null + */ +function getTSNodeAccessibility(node) { + const modifiers = (0, getModifiers_1.getModifiers)(node); + if (modifiers == null) { + return undefined; + } + for (const modifier of modifiers) { + switch (modifier.kind) { + case SyntaxKind.PublicKeyword: + return 'public'; + case SyntaxKind.ProtectedKeyword: + return 'protected'; + case SyntaxKind.PrivateKeyword: + return 'private'; + default: + break; + } + } + return undefined; +} +exports.getTSNodeAccessibility = getTSNodeAccessibility; +/** + * Finds the next token based on the previous one and its parent + * Had to copy this from TS instead of using TS's version because theirs doesn't pass the ast to getChildren + * @param previousToken The previous TSToken + * @param parent The parent TSNode + * @param ast The TS AST + * @returns the next TSToken + */ +function findNextToken(previousToken, parent, ast) { + return find(parent); + function find(n) { + if (ts.isToken(n) && n.pos === previousToken.end) { + // this is token that starts at the end of previous token - return it + return n; + } + return firstDefined(n.getChildren(ast), (child) => { + const shouldDiveInChildNode = + // previous token is enclosed somewhere in the child + (child.pos <= previousToken.pos && child.end > previousToken.end) || + // previous token ends exactly at the beginning of child + child.pos === previousToken.end; + return shouldDiveInChildNode && nodeHasTokens(child, ast) + ? find(child) + : undefined; + }); + } +} +exports.findNextToken = findNextToken; +/** + * Find the first matching ancestor based on the given predicate function. + * @param node The current ts.Node + * @param predicate The predicate function to apply to each checked ancestor + * @returns a matching parent ts.Node + */ +function findFirstMatchingAncestor(node, predicate) { + while (node) { + if (predicate(node)) { + return node; + } + node = node.parent; + } + return undefined; +} +exports.findFirstMatchingAncestor = findFirstMatchingAncestor; +/** + * Returns true if a given ts.Node has a JSX token within its hierarchy + * @param node ts.Node to be checked + * @returns has JSX ancestor + */ +function hasJSXAncestor(node) { + return !!findFirstMatchingAncestor(node, isJSXToken); +} +exports.hasJSXAncestor = hasJSXAncestor; +/** + * Unescape the text content of string literals, e.g. & -> & + * @param text The escaped string literal text. + * @returns The unescaped string literal text. + */ +function unescapeStringLiteralText(text) { + return text.replace(/&(?:#\d+|#x[\da-fA-F]+|[0-9a-zA-Z]+);/g, entity => { + const item = entity.slice(1, -1); + if (item[0] === '#') { + const codePoint = item[1] === 'x' + ? parseInt(item.slice(2), 16) + : parseInt(item.slice(1), 10); + return codePoint > 0x10ffff // RangeError: Invalid code point + ? entity + : String.fromCodePoint(codePoint); + } + return xhtml_entities_1.xhtmlEntities[item] || entity; + }); +} +exports.unescapeStringLiteralText = unescapeStringLiteralText; +/** + * Returns true if a given ts.Node is a computed property + * @param node ts.Node to be checked + * @returns is Computed Property + */ +function isComputedProperty(node) { + return node.kind === SyntaxKind.ComputedPropertyName; +} +exports.isComputedProperty = isComputedProperty; +/** + * Returns true if a given ts.Node is optional (has QuestionToken) + * @param node ts.Node to be checked + * @returns is Optional + */ +function isOptional(node) { + return node.questionToken + ? node.questionToken.kind === SyntaxKind.QuestionToken + : false; +} +exports.isOptional = isOptional; +/** + * Returns true if the node is an optional chain node + */ +function isChainExpression(node) { + return node.type === ts_estree_1.AST_NODE_TYPES.ChainExpression; +} +exports.isChainExpression = isChainExpression; +/** + * Returns true of the child of property access expression is an optional chain + */ +function isChildUnwrappableOptionalChain(node, child) { + return (isChainExpression(child) && + // (x?.y).z is semantically different, and as such .z is no longer optional + node.expression.kind !== ts.SyntaxKind.ParenthesizedExpression); +} +exports.isChildUnwrappableOptionalChain = isChildUnwrappableOptionalChain; +/** + * Returns the type of a given ts.Token + * @param token the ts.Token + * @returns the token type + */ +function getTokenType(token) { + let keywordKind; + if (isAtLeast50 && token.kind === SyntaxKind.Identifier) { + keywordKind = ts.identifierToKeywordKind(token); + } + else if ('originalKeywordKind' in token) { + // eslint-disable-next-line deprecation/deprecation -- intentional fallback for older TS versions + keywordKind = token.originalKeywordKind; + } + if (keywordKind) { + if (keywordKind === SyntaxKind.NullKeyword) { + return ts_estree_1.AST_TOKEN_TYPES.Null; + } + else if (keywordKind >= SyntaxKind.FirstFutureReservedWord && + keywordKind <= SyntaxKind.LastKeyword) { + return ts_estree_1.AST_TOKEN_TYPES.Identifier; + } + return ts_estree_1.AST_TOKEN_TYPES.Keyword; + } + if (token.kind >= SyntaxKind.FirstKeyword && + token.kind <= SyntaxKind.LastFutureReservedWord) { + if (token.kind === SyntaxKind.FalseKeyword || + token.kind === SyntaxKind.TrueKeyword) { + return ts_estree_1.AST_TOKEN_TYPES.Boolean; + } + return ts_estree_1.AST_TOKEN_TYPES.Keyword; + } + if (token.kind >= SyntaxKind.FirstPunctuation && + token.kind <= SyntaxKind.LastPunctuation) { + return ts_estree_1.AST_TOKEN_TYPES.Punctuator; + } + if (token.kind >= SyntaxKind.NoSubstitutionTemplateLiteral && + token.kind <= SyntaxKind.TemplateTail) { + return ts_estree_1.AST_TOKEN_TYPES.Template; + } + switch (token.kind) { + case SyntaxKind.NumericLiteral: + return ts_estree_1.AST_TOKEN_TYPES.Numeric; + case SyntaxKind.JsxText: + return ts_estree_1.AST_TOKEN_TYPES.JSXText; + case SyntaxKind.StringLiteral: + // A TypeScript-StringLiteral token with a TypeScript-JsxAttribute or TypeScript-JsxElement parent, + // must actually be an ESTree-JSXText token + if (token.parent.kind === SyntaxKind.JsxAttribute || + token.parent.kind === SyntaxKind.JsxElement) { + return ts_estree_1.AST_TOKEN_TYPES.JSXText; + } + return ts_estree_1.AST_TOKEN_TYPES.String; + case SyntaxKind.RegularExpressionLiteral: + return ts_estree_1.AST_TOKEN_TYPES.RegularExpression; + case SyntaxKind.Identifier: + case SyntaxKind.ConstructorKeyword: + case SyntaxKind.GetKeyword: + case SyntaxKind.SetKeyword: + // intentional fallthrough + default: + } + // Some JSX tokens have to be determined based on their parent + if (token.kind === SyntaxKind.Identifier) { + if (isJSXToken(token.parent)) { + return ts_estree_1.AST_TOKEN_TYPES.JSXIdentifier; + } + if (token.parent.kind === SyntaxKind.PropertyAccessExpression && + hasJSXAncestor(token)) { + return ts_estree_1.AST_TOKEN_TYPES.JSXIdentifier; + } + } + return ts_estree_1.AST_TOKEN_TYPES.Identifier; +} +exports.getTokenType = getTokenType; +/** + * Extends and formats a given ts.Token, for a given AST + * @param token the ts.Token + * @param ast the AST object + * @returns the converted Token + */ +function convertToken(token, ast) { + const start = token.kind === SyntaxKind.JsxText + ? token.getFullStart() + : token.getStart(ast); + const end = token.getEnd(); + const value = ast.text.slice(start, end); + const tokenType = getTokenType(token); + const range = [start, end]; + const loc = getLocFor(range, ast); + if (tokenType === ts_estree_1.AST_TOKEN_TYPES.RegularExpression) { + return { + type: tokenType, + value, + range, + loc, + regex: { + pattern: value.slice(1, value.lastIndexOf('/')), + flags: value.slice(value.lastIndexOf('/') + 1), + }, + }; + } + // @ts-expect-error TS is complaining about `value` not being the correct + // type but it is + return { + type: tokenType, + value, + range, + loc, + }; +} +exports.convertToken = convertToken; +/** + * Converts all tokens for the given AST + * @param ast the AST object + * @returns the converted Tokens + */ +function convertTokens(ast) { + const result = []; + /** + * @param node the ts.Node + */ + function walk(node) { + // TypeScript generates tokens for types in JSDoc blocks. Comment tokens + // and their children should not be walked or added to the resulting tokens list. + if (isComment(node) || isJSDocComment(node)) { + return; + } + if (isToken(node) && node.kind !== SyntaxKind.EndOfFileToken) { + const converted = convertToken(node, ast); + if (converted) { + result.push(converted); + } + } + else { + node.getChildren(ast).forEach(walk); + } + } + walk(ast); + return result; +} +exports.convertTokens = convertTokens; +class TSError extends Error { + constructor(message, fileName, location) { + super(message); + this.fileName = fileName; + this.location = location; + Object.defineProperty(this, 'name', { + value: new.target.name, + enumerable: false, + configurable: true, + }); + } + // For old version of ESLint https://github.com/typescript-eslint/typescript-eslint/pull/6556#discussion_r1123237311 + get index() { + return this.location.start.offset; + } + // https://github.com/eslint/eslint/blob/b09a512107249a4eb19ef5a37b0bd672266eafdb/lib/linter/linter.js#L853 + get lineNumber() { + return this.location.start.line; + } + // https://github.com/eslint/eslint/blob/b09a512107249a4eb19ef5a37b0bd672266eafdb/lib/linter/linter.js#L854 + get column() { + return this.location.start.column; + } +} +exports.TSError = TSError; +/** + * @param message the error message + * @param ast the AST object + * @param startIndex the index at which the error starts + * @param endIndex the index at which the error ends + * @returns converted error object + */ +function createError(message, ast, startIndex, endIndex = startIndex) { + const [start, end] = [startIndex, endIndex].map(offset => { + const { line, character: column } = ast.getLineAndCharacterOfPosition(offset); + return { line: line + 1, column, offset }; + }); + return new TSError(message, ast.fileName, { start, end }); +} +exports.createError = createError; +function nodeHasIllegalDecorators(node) { + return !!('illegalDecorators' in node && + node.illegalDecorators?.length); +} +exports.nodeHasIllegalDecorators = nodeHasIllegalDecorators; +/** + * @param n the TSNode + * @param ast the TS AST + */ +function nodeHasTokens(n, ast) { + // If we have a token or node that has a non-zero width, it must have tokens. + // Note: getWidth() does not take trivia into account. + return n.kind === SyntaxKind.EndOfFileToken + ? !!n.jsDoc + : n.getWidth(ast) !== 0; +} +exports.nodeHasTokens = nodeHasTokens; +/** + * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). + * @template T + * @template U + * @param array + * @param callback + */ +function firstDefined(array, callback) { + if (array === undefined) { + return undefined; + } + for (let i = 0; i < array.length; i++) { + const result = callback(array[i], i); + if (result !== undefined) { + return result; + } + } + return undefined; +} +exports.firstDefined = firstDefined; +function identifierIsThisKeyword(id) { + return ( + // eslint-disable-next-line deprecation/deprecation -- intentional for older TS versions + (isAtLeast50 ? ts.identifierToKeywordKind(id) : id.originalKeywordKind) === + SyntaxKind.ThisKeyword); +} +exports.identifierIsThisKeyword = identifierIsThisKeyword; +function isThisIdentifier(node) { + return (!!node && + node.kind === SyntaxKind.Identifier && + identifierIsThisKeyword(node)); +} +exports.isThisIdentifier = isThisIdentifier; +function isThisInTypeQuery(node) { + if (!isThisIdentifier(node)) { + return false; + } + while (ts.isQualifiedName(node.parent) && node.parent.left === node) { + node = node.parent; + } + return node.parent.kind === SyntaxKind.TypeQuery; +} +exports.isThisInTypeQuery = isThisInTypeQuery; +// `ts.nodeIsMissing` +function nodeIsMissing(node) { + if (node === undefined) { + return true; + } + return (node.pos === node.end && + node.pos >= 0 && + node.kind !== SyntaxKind.EndOfFileToken); +} +// `ts.nodeIsPresent` +function nodeIsPresent(node) { + return !nodeIsMissing(node); +} +exports.nodeIsPresent = nodeIsPresent; +// `ts.getContainingFunction` +function getContainingFunction(node) { + return ts.findAncestor(node.parent, ts.isFunctionLike); +} +exports.getContainingFunction = getContainingFunction; +// `ts.hasAbstractModifier` +function hasAbstractModifier(node) { + return hasModifier(SyntaxKind.AbstractKeyword, node); +} +// `ts.getThisParameter` +function getThisParameter(signature) { + if (signature.parameters.length && !ts.isJSDocSignature(signature)) { + const thisParameter = signature.parameters[0]; + if (parameterIsThisKeyword(thisParameter)) { + return thisParameter; + } + } + return null; +} +// `ts.parameterIsThisKeyword` +function parameterIsThisKeyword(parameter) { + return isThisIdentifier(parameter.name); +} +// Rewrite version of `ts.nodeCanBeDecorated` +// Returns `true` for both `useLegacyDecorators: true` and `useLegacyDecorators: false` +function nodeCanBeDecorated(node) { + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + return true; + case SyntaxKind.ClassExpression: + // `ts.nodeCanBeDecorated` returns `false` if `useLegacyDecorators: true` + return true; + case SyntaxKind.PropertyDeclaration: { + const { parent } = node; + // `ts.nodeCanBeDecorated` uses this if `useLegacyDecorators: true` + if (ts.isClassDeclaration(parent)) { + return true; + } + // `ts.nodeCanBeDecorated` uses this if `useLegacyDecorators: false` + if (ts.isClassLike(parent) && !hasAbstractModifier(node)) { + return true; + } + return false; + } + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.MethodDeclaration: { + const { parent } = node; + // In `ts.nodeCanBeDecorated` + // when `useLegacyDecorators: true` uses `ts.isClassDeclaration` + // when `useLegacyDecorators: true` uses `ts.isClassLike` + return (Boolean(node.body) && + (ts.isClassDeclaration(parent) || ts.isClassLike(parent))); + } + case SyntaxKind.Parameter: { + // `ts.nodeCanBeDecorated` returns `false` if `useLegacyDecorators: false` + const { parent } = node; + const grandparent = parent.parent; + return (Boolean(parent) && + 'body' in parent && + Boolean(parent.body) && + (parent.kind === SyntaxKind.Constructor || + parent.kind === SyntaxKind.MethodDeclaration || + parent.kind === SyntaxKind.SetAccessor) && + getThisParameter(parent) !== node && + Boolean(grandparent) && + grandparent.kind === SyntaxKind.ClassDeclaration); + } + } + return false; +} +exports.nodeCanBeDecorated = nodeCanBeDecorated; +function getNamespaceModifiers(node) { + // For following nested namespaces, use modifiers given to the topmost namespace + // export declare namespace foo.bar.baz {} + let modifiers = (0, getModifiers_1.getModifiers)(node); + let moduleDeclaration = node; + while ((!modifiers || modifiers.length === 0) && + ts.isModuleDeclaration(moduleDeclaration.parent) && + moduleDeclaration.parent.name) { + const parentModifiers = (0, getModifiers_1.getModifiers)(moduleDeclaration.parent); + if (parentModifiers && parentModifiers?.length > 0) { + modifiers = parentModifiers; + } + moduleDeclaration = moduleDeclaration.parent; + } + return modifiers; +} +exports.getNamespaceModifiers = getNamespaceModifiers; +//# sourceMappingURL=node-utils.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map new file mode 100644 index 0000000000..86938c4407 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"node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D,iBAAiB,GAAG,iBAAiB,CAAC,MAAM,CAAC;KAC9C;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAnBD,sDAmBC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts new file mode 100644 index 0000000000..28d3b45e2a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts @@ -0,0 +1,17 @@ +import type { CacheDurationSeconds } from '@typescript-eslint/types'; +export declare const DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS = 30; +export interface CacheLike { + get(key: Key): Value | void; + set(key: Key, value: Value): this; +} +/** + * A map with key-level expiration. + */ +export declare class ExpiringCache implements CacheLike { + #private; + constructor(cacheDurationSeconds: CacheDurationSeconds); + set(key: TKey, value: TValue): this; + get(key: TKey): TValue | undefined; + clear(): void; +} +//# sourceMappingURL=ExpiringCache.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map new file mode 100644 index 0000000000..7b0102b713 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExpiringCache.d.ts","sourceRoot":"","sources":["../../src/parseSettings/ExpiringCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,uCAAuC,KAAK,CAAC;AAG1D,MAAM,WAAW,SAAS,CAAC,GAAG,EAAE,KAAK;IACnC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC;IAC5B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,qBAAa,aAAa,CAAC,IAAI,EAAE,MAAM,CAAE,YAAW,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;;gBAW7D,oBAAoB,EAAE,oBAAoB;IAItD,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAYnC,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS;IAmBlC,KAAK,IAAI,IAAI;CAGd"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js new file mode 100644 index 0000000000..f414ac8584 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js @@ -0,0 +1,60 @@ +"use strict"; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _ExpiringCache_cacheDurationSeconds, _ExpiringCache_map; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExpiringCache = exports.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS = void 0; +exports.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS = 30; +const ZERO_HR_TIME = [0, 0]; +/** + * A map with key-level expiration. + */ +class ExpiringCache { + constructor(cacheDurationSeconds) { + _ExpiringCache_cacheDurationSeconds.set(this, void 0); + _ExpiringCache_map.set(this, new Map()); + __classPrivateFieldSet(this, _ExpiringCache_cacheDurationSeconds, cacheDurationSeconds, "f"); + } + set(key, value) { + __classPrivateFieldGet(this, _ExpiringCache_map, "f").set(key, { + value, + lastSeen: __classPrivateFieldGet(this, _ExpiringCache_cacheDurationSeconds, "f") === 'Infinity' + ? // no need to waste time calculating the hrtime in infinity mode as there's no expiry + ZERO_HR_TIME + : process.hrtime(), + }); + return this; + } + get(key) { + const entry = __classPrivateFieldGet(this, _ExpiringCache_map, "f").get(key); + if (entry?.value != null) { + if (__classPrivateFieldGet(this, _ExpiringCache_cacheDurationSeconds, "f") === 'Infinity') { + return entry.value; + } + const ageSeconds = process.hrtime(entry.lastSeen)[0]; + if (ageSeconds < __classPrivateFieldGet(this, _ExpiringCache_cacheDurationSeconds, "f")) { + // cache hit woo! + return entry.value; + } + // key has expired - clean it up to free up memory + __classPrivateFieldGet(this, _ExpiringCache_map, "f").delete(key); + } + // no hit :'( + return undefined; + } + clear() { + __classPrivateFieldGet(this, _ExpiringCache_map, "f").clear(); + } +} +exports.ExpiringCache = ExpiringCache; +_ExpiringCache_cacheDurationSeconds = new WeakMap(), _ExpiringCache_map = new WeakMap(); +//# sourceMappingURL=ExpiringCache.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js.map new file mode 100644 index 0000000000..5c649e35dd --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExpiringCache.js","sourceRoot":"","sources":["../../src/parseSettings/ExpiringCache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEa,QAAA,uCAAuC,GAAG,EAAE,CAAC;AAC1D,MAAM,YAAY,GAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAO9C;;GAEG;AACH,MAAa,aAAa;IAWxB,YAAY,oBAA0C;QAV7C,sDAA4C;QAE5C,6BAAO,IAAI,GAAG,EAMpB,EAAC;QAGF,uBAAA,IAAI,uCAAyB,oBAAoB,MAAA,CAAC;IACpD,CAAC;IAED,GAAG,CAAC,GAAS,EAAE,KAAa;QAC1B,uBAAA,IAAI,0BAAK,CAAC,GAAG,CAAC,GAAG,EAAE;YACjB,KAAK;YACL,QAAQ,EACN,uBAAA,IAAI,2CAAsB,KAAK,UAAU;gBACvC,CAAC,CAAC,qFAAqF;oBACrF,YAAY;gBACd,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;SACvB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,GAAS;QACX,MAAM,KAAK,GAAG,uBAAA,IAAI,0BAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,KAAK,EAAE,KAAK,IAAI,IAAI,EAAE;YACxB,IAAI,uBAAA,IAAI,2CAAsB,KAAK,UAAU,EAAE;gBAC7C,OAAO,KAAK,CAAC,KAAK,CAAC;aACpB;YAED,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YACrD,IAAI,UAAU,GAAG,uBAAA,IAAI,2CAAsB,EAAE;gBAC3C,iBAAiB;gBACjB,OAAO,KAAK,CAAC,KAAK,CAAC;aACpB;YACD,kDAAkD;YAClD,uBAAA,IAAI,0BAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,aAAa;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK;QACH,uBAAA,IAAI,0BAAK,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;CACF;AAjDD,sCAiDC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts new file mode 100644 index 0000000000..7311d5d4df --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts @@ -0,0 +1,7 @@ +import type * as ts from 'typescript'; +import type { TSESTreeOptions } from '../parser-options'; +import type { MutableParseSettings } from './index'; +export declare function createParseSettings(code: ts.SourceFile | string, options?: Partial): MutableParseSettings; +export declare function clearTSConfigMatchCache(): void; +export declare function clearTSServerProjectService(): void; +//# sourceMappingURL=createParseSettings.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map new file mode 100644 index 0000000000..f361d2c917 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createParseSettings.d.ts","sourceRoot":"","sources":["../../src/parseSettings/createParseSettings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAKtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAYpD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,EAC5B,OAAO,GAAE,OAAO,CAAC,eAAe,CAAM,GACrC,oBAAoB,CAgHtB;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C;AAED,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js new file mode 100644 index 0000000000..f4cb4e3799 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js @@ -0,0 +1,139 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.clearTSServerProjectService = exports.clearTSConfigMatchCache = exports.createParseSettings = void 0; +const debug_1 = __importDefault(require("debug")); +const createProjectService_1 = require("../create-program/createProjectService"); +const shared_1 = require("../create-program/shared"); +const source_files_1 = require("../source-files"); +const ExpiringCache_1 = require("./ExpiringCache"); +const getProjectConfigFiles_1 = require("./getProjectConfigFiles"); +const inferSingleRun_1 = require("./inferSingleRun"); +const resolveProjectList_1 = require("./resolveProjectList"); +const warnAboutTSVersion_1 = require("./warnAboutTSVersion"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:parser:parseSettings:createParseSettings'); +let TSCONFIG_MATCH_CACHE; +let TSSERVER_PROJECT_SERVICE = null; +function createParseSettings(code, options = {}) { + const codeFullText = enforceCodeString(code); + const singleRun = (0, inferSingleRun_1.inferSingleRun)(options); + const tsconfigRootDir = typeof options.tsconfigRootDir === 'string' + ? options.tsconfigRootDir + : process.cwd(); + const parseSettings = { + allowInvalidAST: options.allowInvalidAST === true, + code, + codeFullText, + comment: options.comment === true, + comments: [], + DEPRECATED__createDefaultProgram: + // eslint-disable-next-line deprecation/deprecation -- will be cleaned up with the next major + options.DEPRECATED__createDefaultProgram === true, + debugLevel: options.debugLevel === true + ? new Set(['typescript-eslint']) + : Array.isArray(options.debugLevel) + ? new Set(options.debugLevel) + : new Set(), + errorOnTypeScriptSyntacticAndSemanticIssues: false, + errorOnUnknownASTType: options.errorOnUnknownASTType === true, + EXPERIMENTAL_projectService: (options.EXPERIMENTAL_useProjectService === true && + process.env.TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER !== 'false') || + (process.env.TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER === 'true' && + options.EXPERIMENTAL_useProjectService !== false) + ? (TSSERVER_PROJECT_SERVICE ??= (0, createProjectService_1.createProjectService)()) + : undefined, + EXPERIMENTAL_useSourceOfProjectReferenceRedirect: options.EXPERIMENTAL_useSourceOfProjectReferenceRedirect === true, + extraFileExtensions: Array.isArray(options.extraFileExtensions) && + options.extraFileExtensions.every(ext => typeof ext === 'string') + ? options.extraFileExtensions + : [], + filePath: (0, shared_1.ensureAbsolutePath)(typeof options.filePath === 'string' && options.filePath !== '' + ? options.filePath + : getFileName(options.jsx), tsconfigRootDir), + jsx: options.jsx === true, + loc: options.loc === true, + log: typeof options.loggerFn === 'function' + ? options.loggerFn + : options.loggerFn === false + ? () => { } // eslint-disable-line @typescript-eslint/no-empty-function + : console.log, + preserveNodeMaps: options.preserveNodeMaps !== false, + programs: Array.isArray(options.programs) ? options.programs : null, + projects: [], + range: options.range === true, + singleRun, + suppressDeprecatedPropertyWarnings: options.suppressDeprecatedPropertyWarnings ?? + process.env.NODE_ENV !== 'test', + tokens: options.tokens === true ? [] : null, + tsconfigMatchCache: (TSCONFIG_MATCH_CACHE ??= new ExpiringCache_1.ExpiringCache(singleRun + ? 'Infinity' + : options.cacheLifetime?.glob ?? + ExpiringCache_1.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS)), + tsconfigRootDir, + }; + // debug doesn't support multiple `enable` calls, so have to do it all at once + if (parseSettings.debugLevel.size > 0) { + const namespaces = []; + if (parseSettings.debugLevel.has('typescript-eslint')) { + namespaces.push('typescript-eslint:*'); + } + if (parseSettings.debugLevel.has('eslint') || + // make sure we don't turn off the eslint debug if it was enabled via --debug + debug_1.default.enabled('eslint:*,-eslint:code-path')) { + // https://github.com/eslint/eslint/blob/9dfc8501fb1956c90dc11e6377b4cb38a6bea65d/bin/eslint.js#L25 + namespaces.push('eslint:*,-eslint:code-path'); + } + debug_1.default.enable(namespaces.join(',')); + } + if (Array.isArray(options.programs)) { + if (!options.programs.length) { + throw new Error(`You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.`); + } + log('parserOptions.programs was provided, so parserOptions.project will be ignored.'); + } + // Providing a program or project service overrides project resolution + if (!parseSettings.programs && !parseSettings.EXPERIMENTAL_projectService) { + parseSettings.projects = (0, resolveProjectList_1.resolveProjectList)({ + cacheLifetime: options.cacheLifetime, + project: (0, getProjectConfigFiles_1.getProjectConfigFiles)(parseSettings, options.project), + projectFolderIgnoreList: options.projectFolderIgnoreList, + singleRun: parseSettings.singleRun, + tsconfigRootDir: tsconfigRootDir, + }); + } + (0, warnAboutTSVersion_1.warnAboutTSVersion)(parseSettings); + return parseSettings; +} +exports.createParseSettings = createParseSettings; +function clearTSConfigMatchCache() { + TSCONFIG_MATCH_CACHE?.clear(); +} +exports.clearTSConfigMatchCache = clearTSConfigMatchCache; +function clearTSServerProjectService() { + TSSERVER_PROJECT_SERVICE = null; +} +exports.clearTSServerProjectService = clearTSServerProjectService; +/** + * Ensures source code is a string. + */ +function enforceCodeString(code) { + return (0, source_files_1.isSourceFile)(code) + ? code.getFullText(code) + : typeof code === 'string' + ? code + : String(code); +} +/** + * Compute the filename based on the parser options. + * + * Even if jsx option is set in typescript compiler, filename still has to + * contain .tsx file extension. + * + * @param options Parser options + */ +function getFileName(jsx) { + return jsx ? 'estree.tsx' : 'estree.ts'; +} +//# sourceMappingURL=createParseSettings.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map new file mode 100644 index 0000000000..e6b8c04d19 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createParseSettings.js","sourceRoot":"","sources":["../../src/parseSettings/createParseSettings.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAI1B,iFAA8E;AAC9E,qDAA8D;AAE9D,kDAA+C;AAC/C,mDAGyB;AACzB,mEAAgE;AAEhE,qDAAkD;AAClD,6DAA0D;AAC1D,6DAA0D;AAE1D,MAAM,GAAG,GAAG,IAAA,eAAK,EACf,8EAA8E,CAC/E,CAAC;AAEF,IAAI,oBAA0D,CAAC;AAC/D,IAAI,wBAAwB,GAAoC,IAAI,CAAC;AAErE,SAAgB,mBAAmB,CACjC,IAA4B,EAC5B,UAAoC,EAAE;IAEtC,MAAM,YAAY,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,eAAe,GACnB,OAAO,OAAO,CAAC,eAAe,KAAK,QAAQ;QACzC,CAAC,CAAC,OAAO,CAAC,eAAe;QACzB,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IACpB,MAAM,aAAa,GAAyB;QAC1C,eAAe,EAAE,OAAO,CAAC,eAAe,KAAK,IAAI;QACjD,IAAI;QACJ,YAAY;QACZ,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,IAAI;QACjC,QAAQ,EAAE,EAAE;QACZ,gCAAgC;QAC9B,6FAA6F;QAC7F,OAA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,CAAC;QACxB,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ;YAC1B,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACnB,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,WAAW,CAAC,GAAa;IAChC,OAAO,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts new file mode 100644 index 0000000000..248e0c9519 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts @@ -0,0 +1,12 @@ +import type { ParseSettings } from '.'; +/** + * Checks for a matching TSConfig to a file including its parent directories, + * permanently caching results under each directory it checks. + * + * @remarks + * We don't (yet!) have a way to attach file watchers on disk, but still need to + * cache file checks for rapid subsequent calls to fs.existsSync. See discussion + * in https://github.com/typescript-eslint/typescript-eslint/issues/101. + */ +export declare function getProjectConfigFiles(parseSettings: Pick, project: string[] | string | true | null | undefined): string[] | null; +//# sourceMappingURL=getProjectConfigFiles.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map new file mode 100644 index 0000000000..31113d5829 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getProjectConfigFiles.d.ts","sourceRoot":"","sources":["../../src/parseSettings/getProjectConfigFiles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;AAIvC;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,IAAI,CACjB,aAAa,EACb,UAAU,GAAG,oBAAoB,GAAG,iBAAiB,CACtD,EACD,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GACnD,MAAM,EAAE,GAAG,IAAI,CAuCjB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js new file mode 100644 index 0000000000..4b7dd2c34c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js @@ -0,0 +1,74 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.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 }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getProjectConfigFiles = void 0; +const debug_1 = __importDefault(require("debug")); +const fs = __importStar(require("fs")); +const path = __importStar(require("path")); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:getProjectConfigFiles'); +/** + * Checks for a matching TSConfig to a file including its parent directories, + * permanently caching results under each directory it checks. + * + * @remarks + * We don't (yet!) have a way to attach file watchers on disk, but still need to + * cache file checks for rapid subsequent calls to fs.existsSync. See discussion + * in https://github.com/typescript-eslint/typescript-eslint/issues/101. + */ +function getProjectConfigFiles(parseSettings, project) { + if (project !== true) { + if (project == null) { + return null; + } + if (Array.isArray(project)) { + return project; + } + return [project]; + } + log('Looking for tsconfig.json at or above file: %s', parseSettings.filePath); + let directory = path.dirname(parseSettings.filePath); + const checkedDirectories = [directory]; + do { + log('Checking tsconfig.json path: %s', directory); + const tsconfigPath = path.join(directory, 'tsconfig.json'); + const cached = parseSettings.tsconfigMatchCache.get(directory) ?? + (fs.existsSync(tsconfigPath) && tsconfigPath); + if (cached) { + for (const directory of checkedDirectories) { + parseSettings.tsconfigMatchCache.set(directory, cached); + } + return [cached]; + } + directory = path.dirname(directory); + checkedDirectories.push(directory); + } while (directory.length > 1 && + directory.length >= parseSettings.tsconfigRootDir.length); + throw new Error(`project was set to \`true\` but couldn't find any tsconfig.json relative to '${parseSettings.filePath}' within '${parseSettings.tsconfigRootDir}'.`); +} +exports.getProjectConfigFiles = getProjectConfigFiles; +//# sourceMappingURL=getProjectConfigFiles.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js.map new file mode 100644 index 0000000000..798332dea1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js.map @@ -0,0 +1 @@ +{"version":3,"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AS,CAAC,CAAC;QACpC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACpC,QACC,SAAS,CAAC,MAAM,GAAG,CAAC;QACpB,SAAS,CAAC,MAAM,IAAI,aAAa,CAAC,eAAe,CAAC,MAAM,EACxD;IAEF,MAAM,IAAI,KAAK,CACb,gFAAgF,aAAa,CAAC,QAAQ,aAAa,aAAa,CAAC,eAAe,IAAI,CACrJ,CAAC;AACJ,CAAC;AA7CD,sDA6CC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts new file mode 100644 index 0000000000..4be4c1db94 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts @@ -0,0 +1,122 @@ +import type * as ts from 'typescript'; +import type * as tsserverlibrary from 'typescript/lib/tsserverlibrary'; +import type { CanonicalPath } from '../create-program/shared'; +import type { TSESTree } from '../ts-estree'; +import type { CacheLike } from './ExpiringCache'; +type DebugModule = 'eslint' | 'typescript-eslint' | 'typescript'; +/** + * Internal settings used by the parser to run on a file. + */ +export interface MutableParseSettings { + /** + * Prevents the parser from throwing an error if it receives an invalid AST from TypeScript. + */ + allowInvalidAST: boolean; + /** + * Code of the file being parsed, or raw source file containing it. + */ + code: ts.SourceFile | string; + /** + * Full text of the file being parsed. + */ + codeFullText: string; + /** + * Whether the `comment` parse option is enabled. + */ + comment: boolean; + /** + * If the `comment` parse option is enabled, retrieved comments. + */ + comments: TSESTree.Comment[]; + /** + * @deprecated + * This is a legacy option that comes with severe performance penalties. + * Please do not use it. + */ + DEPRECATED__createDefaultProgram: boolean; + /** + * Which debug areas should be logged. + */ + debugLevel: Set; + /** + * Whether to error if TypeScript reports a semantic or syntactic error diagnostic. + */ + errorOnTypeScriptSyntacticAndSemanticIssues: boolean; + /** + * Whether to error if an unknown AST node type is encountered. + */ + errorOnUnknownASTType: boolean; + /** + * Experimental: TypeScript server to power program creation. + */ + EXPERIMENTAL_projectService: tsserverlibrary.server.ProjectService | undefined; + /** + * Whether TS should use the source files for referenced projects instead of the compiled .d.ts files. + * + * @remarks + * This feature is not yet optimized, and is likely to cause OOMs for medium to large projects. + * This flag REQUIRES at least TS v3.9, otherwise it does nothing. + */ + EXPERIMENTAL_useSourceOfProjectReferenceRedirect: boolean; + /** + * Any non-standard file extensions which will be parsed. + */ + extraFileExtensions: string[]; + /** + * Path of the file being parsed. + */ + filePath: string; + /** + * Whether parsing of JSX is enabled. + * + * @remarks The applicable file extension is still required. + */ + jsx: boolean; + /** + * Whether to add `loc` information to each node. + */ + loc: boolean; + /** + * Log function, if not `console.log`. + */ + log: (message: string) => void; + /** + * Whether two-way AST node maps are preserved during the AST conversion process. + */ + preserveNodeMaps?: boolean; + /** + * One or more instances of TypeScript Program objects to be used for type information. + */ + programs: Iterable | null; + /** + * Normalized paths to provided project paths. + */ + projects: readonly CanonicalPath[]; + /** + * Whether to add the `range` property to AST nodes. + */ + range: boolean; + /** + * Whether this is part of a single run, rather than a long-running process. + */ + singleRun: boolean; + /** + * Whether deprecated AST properties should skip calling console.warn on accesses. + */ + suppressDeprecatedPropertyWarnings: boolean; + /** + * If the `tokens` parse option is enabled, retrieved tokens. + */ + tokens: TSESTree.Token[] | null; + /** + * Caches searches for TSConfigs from project directories. + */ + tsconfigMatchCache: CacheLike; + /** + * The absolute path to the root directory for all provided `project`s. + */ + tsconfigRootDir: string; +} +export type ParseSettings = Readonly; +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map new file mode 100644 index 0000000000..3deae6b589 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parseSettings/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,KAAK,WAAW,GAAG,QAAQ,GAAG,mBAAmB,GAAG,YAAY,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,CAAC;IAE7B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;IAE7B;;;;OAIG;IACH,gCAAgC,EAAE,OAAO,CAAC;IAE1C;;OAEG;IACH,UAAU,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IAE7B;;OAEG;IACH,2CAA2C,EAAE,OAAO,CAAC;IAErD;;OAEG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,2BAA2B,EACvB,eAAe,CAAC,MAAM,CAAC,cAAc,GACrC,SAAS,CAAC;IAEd;;;;;;OAMG;IACH,gDAAgD,EAAE,OAAO,CAAC;IAE1D;;OAEG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAE9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,GAAG,EAAE,OAAO,CAAC;IAEb;;OAEG;IACH,GAAG,EAAE,OAAO,CAAC;IAEb;;OAEG;IACH,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAE/B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAEtC;;OAEG;IACH,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IAEnC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,kCAAkC,EAAE,OAAO,CAAC;IAE5C;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,kBAAkB,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE9C;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js new file mode 100644 index 0000000000..aa219d8f2a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js.map new file mode 100644 index 0000000000..66056421d1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/parseSettings/index.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts new file mode 100644 index 0000000000..1b28697f5e --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts @@ -0,0 +1,15 @@ +import type { TSESTreeOptions } from '../parser-options'; +/** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. We therefore use the following logic to figure out which + * of these contexts applies to the current execution. + * + * @returns Whether this is part of a single run, rather than a long-running process. + */ +export declare function inferSingleRun(options: TSESTreeOptions | undefined): boolean; +//# sourceMappingURL=inferSingleRun.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts.map new file mode 100644 index 0000000000..6a4de9868d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inferSingleRun.d.ts","sourceRoot":"","sources":["../../src/parseSettings/inferSingleRun.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,GAAG,OAAO,CAuC5E"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js new file mode 100644 index 0000000000..b6fb0c08d2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js @@ -0,0 +1,53 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.inferSingleRun = void 0; +const path_1 = require("path"); +/** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. We therefore use the following logic to figure out which + * of these contexts applies to the current execution. + * + * @returns Whether this is part of a single run, rather than a long-running process. + */ +function inferSingleRun(options) { + if ( + // single-run implies type-aware linting - no projects means we can't be in single-run mode + options?.project == null || + // programs passed via options means the user should be managing the programs, so we shouldn't + // be creating our own single-run programs accidentally + options?.programs != null) { + return false; + } + // Allow users to explicitly inform us of their intent to perform a single run (or not) with TSESTREE_SINGLE_RUN + if (process.env.TSESTREE_SINGLE_RUN === 'false') { + return false; + } + if (process.env.TSESTREE_SINGLE_RUN === 'true') { + return true; + } + // Currently behind a flag while we gather real-world feedback + if (options?.allowAutomaticSingleRunInference) { + if ( + // Default to single runs for CI processes. CI=true is set by most CI providers by default. + process.env.CI === 'true' || + // This will be true for invocations such as `npx eslint ...` and `./node_modules/.bin/eslint ...` + process.argv[1].endsWith((0, path_1.normalize)('node_modules/.bin/eslint'))) { + return true; + } + } + /** + * We default to assuming that this run could be part of a long-running session (e.g. in an IDE) + * and watch programs will therefore be required. + * + * Unless we can reliably infer otherwise, we default to assuming that this run could be part + * of a long-running session (e.g. in an IDE) and watch programs will therefore be required + */ + return false; +} +exports.inferSingleRun = inferSingleRun; +//# sourceMappingURL=inferSingleRun.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js.map new file mode 100644 index 0000000000..01c06ecb8d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/inferSingleRun.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inferSingleRun.js","sourceRoot":"","sources":["../../src/parseSettings/inferSingleRun.ts"],"names":[],"mappings":";;;AAAA,+BAAiC;AAIjC;;;;;;;;;;;GAWG;AACH,SAAgB,cAAc,CAAC,OAAoC;IACjE;IACE,2FAA2F;IAC3F,OAAO,EAAE,OAAO,IAAI,IAAI;QACxB,8FAA8F;QAC9F,uDAAuD;QACvD,OAAO,EAAE,QAAQ,IAAI,IAAI,EACzB;QACA,OAAO,KAAK,CAAC;KACd;IAED,gHAAgH;IAChH,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,OAAO,EAAE;QAC/C,OAAO,KAAK,CAAC;KACd;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,MAAM,EAAE;QAC9C,OAAO,IAAI,CAAC;KACb;IAED,8DAA8D;IAC9D,IAAI,OAAO,EAAE,gCAAgC,EAAE;QAC7C;QACE,2FAA2F;QAC3F,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM;YACzB,kGAAkG;YAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAA,gBAAS,EAAC,0BAA0B,CAAC,CAAC,EAC/D;YACA,OAAO,IAAI,CAAC;SACb;KACF;IAED;;;;;;OAMG;IACH,OAAO,KAAK,CAAC;AACf,CAAC;AAvCD,wCAuCC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts new file mode 100644 index 0000000000..387f2e56f5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts @@ -0,0 +1,19 @@ +import type { CanonicalPath } from '../create-program/shared'; +import type { TSESTreeOptions } from '../parser-options'; +export declare function clearGlobCache(): void; +/** + * Normalizes, sanitizes, resolves and filters the provided project paths + */ +export declare function resolveProjectList(options: Readonly<{ + cacheLifetime?: TSESTreeOptions['cacheLifetime']; + project: string[] | null; + projectFolderIgnoreList: TSESTreeOptions['projectFolderIgnoreList']; + singleRun: boolean; + tsconfigRootDir: string; +}>): readonly CanonicalPath[]; +/** + * Exported for testing purposes only + * @internal + */ +export declare function clearGlobResolutionCache(): void; +//# sourceMappingURL=resolveProjectList.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map new file mode 100644 index 0000000000..5f702ec1c8 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resolveProjectList.d.ts","sourceRoot":"","sources":["../../src/parseSettings/resolveProjectList.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAM9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAazD,wBAAgB,cAAc,IAAI,IAAI,CAErC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,QAAQ,CAAC;IAChB,aAAa,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;IACjD,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACzB,uBAAuB,EAAE,eAAe,CAAC,yBAAyB,CAAC,CAAC;IACpE,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC,GACD,SAAS,aAAa,EAAE,CA+E1B;AAuBD;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js new file mode 100644 index 0000000000..8c328d73c4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js @@ -0,0 +1,100 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.clearGlobResolutionCache = exports.resolveProjectList = exports.clearGlobCache = void 0; +const debug_1 = __importDefault(require("debug")); +const globby_1 = require("globby"); +const is_glob_1 = __importDefault(require("is-glob")); +const shared_1 = require("../create-program/shared"); +const ExpiringCache_1 = require("./ExpiringCache"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:parser:parseSettings:resolveProjectList'); +let RESOLUTION_CACHE = null; +function clearGlobCache() { + RESOLUTION_CACHE?.clear(); +} +exports.clearGlobCache = clearGlobCache; +/** + * Normalizes, sanitizes, resolves and filters the provided project paths + */ +function resolveProjectList(options) { + const sanitizedProjects = []; + // Normalize and sanitize the project paths + if (options.project != null) { + for (const project of options.project) { + if (typeof project === 'string') { + sanitizedProjects.push(project); + } + } + } + if (sanitizedProjects.length === 0) { + return []; + } + const projectFolderIgnoreList = (options.projectFolderIgnoreList ?? ['**/node_modules/**']) + .reduce((acc, folder) => { + if (typeof folder === 'string') { + acc.push(folder); + } + return acc; + }, []) + // prefix with a ! for not match glob + .map(folder => (folder.startsWith('!') ? folder : `!${folder}`)); + const cacheKey = getHash({ + project: sanitizedProjects, + projectFolderIgnoreList, + tsconfigRootDir: options.tsconfigRootDir, + }); + if (RESOLUTION_CACHE == null) { + // note - we initialize the global cache based on the first config we encounter. + // this does mean that you can't have multiple lifetimes set per folder + // I doubt that anyone will really bother reconfiguring this, let alone + // try to do complicated setups, so we'll deal with this later if ever. + RESOLUTION_CACHE = new ExpiringCache_1.ExpiringCache(options.singleRun + ? 'Infinity' + : options.cacheLifetime?.glob ?? + ExpiringCache_1.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS); + } + else { + const cached = RESOLUTION_CACHE.get(cacheKey); + if (cached) { + return cached; + } + } + // Transform glob patterns into paths + const nonGlobProjects = sanitizedProjects.filter(project => !(0, is_glob_1.default)(project)); + const globProjects = sanitizedProjects.filter(project => (0, is_glob_1.default)(project)); + const uniqueCanonicalProjectPaths = new Set(nonGlobProjects + .concat(globProjects.length === 0 + ? [] + : (0, globby_1.sync)([...globProjects, ...projectFolderIgnoreList], { + cwd: options.tsconfigRootDir, + })) + .map(project => (0, shared_1.getCanonicalFileName)((0, shared_1.ensureAbsolutePath)(project, options.tsconfigRootDir)))); + log('parserOptions.project (excluding ignored) matched projects: %s', uniqueCanonicalProjectPaths); + const returnValue = Array.from(uniqueCanonicalProjectPaths); + RESOLUTION_CACHE.set(cacheKey, returnValue); + return returnValue; +} +exports.resolveProjectList = resolveProjectList; +function getHash({ project, projectFolderIgnoreList, tsconfigRootDir, }) { + // create a stable representation of the config + const hashObject = { + tsconfigRootDir, + // the project order does matter and can impact the resolved globs + project, + // the ignore order won't doesn't ever matter + projectFolderIgnoreList: [...projectFolderIgnoreList].sort(), + }; + return (0, shared_1.createHash)(JSON.stringify(hashObject)); +} +/** + * Exported for testing purposes only + * @internal + */ +function clearGlobResolutionCache() { + RESOLUTION_CACHE?.clear(); + RESOLUTION_CACHE = null; +} +exports.clearGlobResolutionCache = clearGlobResolutionCache; +//# sourceMappingURL=resolveProjectList.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js.map new file mode 100644 index 0000000000..2995e72e05 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolveProjectList.js","sourceRoot":"","sources":["../../src/parseSettings/resolveProjectList.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,mCAA0C;AAC1C,sDAA6B;AAG7B,qDAIkC;AAElC,mDAGyB;AAEzB,MAAM,GAAG,GAAG,IAAA,eAAK,EACf,6EAA6E,CAC9E,CAAC;AAEF,IAAI,gBAAgB,GAClB,IAAI,CAAC;AAEP,SAAgB,cAAc;IAC5B,gBAAgB,EAAE,KAAK,EAAE,CAAC;AAC5B,CAAC;AAFD,wCAEC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAChC,OAME;IAEF,MAAM,iBAAiB,GAAa,EAAE,CAAC;IAEvC,2CAA2C;IAC3C,IAAI,OAAO,CAAC,OAAO,IAAI,IAAI,EAAE;QAC3B,KAAK,MAAM,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE;YACrC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;gBAC/B,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACjC;SACF;KACF;IAED,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;QAClC,OAAO,EAAE,CAAC;KACX;IAED,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AC,CAAC,CAAC;IAE1E,MAAM,2BAA2B,GAAG,IAAI,GAAG,CACzC,eAAe;SACZ,MAAM,CACL,YAAY,CAAC,MAAM,KAAK,CAAC;QACvB,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,IAAA,aAAQ,EAAC,CAAC,GAAG,YAAY,EAAE,GAAG,uBAAuB,CAAC,EAAE;YACtD,GAAG,EAAE,OAAO,CAAC,eAAe;SAC7B,CAAC,CACP;SACA,GAAG,CAAC,OAAO,CAAC,EAAE,CACb,IAAA,6BAAoB,EAClB,IAAA,2BAAkB,EAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CACrD,CACF,CACJ,CAAC;IAEF,GAAG,CACD,gEAAgE,EAChE,2BAA2B,CAC5B,CAAC;IAEF,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IAC5D,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC5C,OAAO,WAAW,CAAC;AACrB,CAAC;AAvFD,gDAuFC;AAED,SAAS,OAAO,CAAC,EACf,OAAO,EACP,uBAAuB,EACvB,eAAe,GAKf;IACA,+CAA+C;IAC/C,MAAM,UAAU,GAAG;QACjB,eAAe;QACf,kEAAkE;QAClE,OAAO;QACP,6CAA6C;QAC7C,uBAAuB,EAAE,CAAC,GAAG,uBAAuB,CAAC,CAAC,IAAI,EAAE;KAC7D,CAAC;IAEF,OAAO,IAAA,mBAAU,EAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AAChD,CAAC;AAED;;;GAGG;AACH,SAAgB,wBAAwB;IACtC,gBAAgB,EAAE,KAAK,EAAE,CAAC;IAC1B,gBAAgB,GAAG,IAAI,CAAC;AAC1B,CAAC;AAHD,4DAGC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts new file mode 100644 index 0000000000..54a7f47a69 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts @@ -0,0 +1,3 @@ +import type { ParseSettings } from './index'; +export declare function warnAboutTSVersion(parseSettings: ParseSettings): void; +//# sourceMappingURL=warnAboutTSVersion.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts.map new file mode 100644 index 0000000000..82efcac915 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"warnAboutTSVersion.d.ts","sourceRoot":"","sources":["../../src/parseSettings/warnAboutTSVersion.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAsB7C,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAmBrE"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js new file mode 100644 index 0000000000..0ceb027830 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js @@ -0,0 +1,67 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.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 }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.warnAboutTSVersion = void 0; +const semver_1 = __importDefault(require("semver")); +const ts = __importStar(require("typescript")); +/** + * This needs to be kept in sync with /docs/users/Versioning.mdx + * in the typescript-eslint monorepo + */ +const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.3.5 <5.3.0'; +/* + * The semver package will ignore prerelease ranges, and we don't want to explicitly document every one + * List them all separately here, so we can automatically create the full string + */ +const SUPPORTED_PRERELEASE_RANGES = []; +const ACTIVE_TYPESCRIPT_VERSION = ts.version; +const isRunningSupportedTypeScriptVersion = semver_1.default.satisfies(ACTIVE_TYPESCRIPT_VERSION, [SUPPORTED_TYPESCRIPT_VERSIONS] + .concat(SUPPORTED_PRERELEASE_RANGES) + .join(' || ')); +let warnedAboutTSVersion = false; +function warnAboutTSVersion(parseSettings) { + if (!isRunningSupportedTypeScriptVersion && !warnedAboutTSVersion) { + const isTTY = typeof process === 'undefined' ? false : process.stdout?.isTTY; + if (isTTY) { + const border = '============='; + const versionWarning = [ + border, + 'WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.', + 'You may find that it works just fine, or you may not.', + `SUPPORTED TYPESCRIPT VERSIONS: ${SUPPORTED_TYPESCRIPT_VERSIONS}`, + `YOUR TYPESCRIPT VERSION: ${ACTIVE_TYPESCRIPT_VERSION}`, + 'Please only submit bug reports when using the officially supported version.', + border, + ]; + parseSettings.log(versionWarning.join('\n\n')); + } + warnedAboutTSVersion = true; + } +} +exports.warnAboutTSVersion = warnAboutTSVersion; +//# sourceMappingURL=warnAboutTSVersion.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map new file mode 100644 index 0000000000..2556f1ea89 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map @@ -0,0 +1 @@ +{"version":3,"file":"warnAboutTSVersion.js","sourceRoot":"","sources":["../../src/parseSettings/warnAboutTSVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAA4B;AAC5B,+CAAiC;AAGjC;;;GAGG;AACH,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAEvD;;;GAGG;AACH,MAAM,2BAA2B,GAAa,EAAE,CAAC;AACjD,MAAM,yBAAyB,GAAG,EAAE,CAAC,OAAO,CAAC;AAC7C,MAAM,mCAAmC,GAAG,gBAAM,CAAC,SAAS,CAC1D,yBAAyB,EACzB,CAAC,6BAA6B,CAAC;KAC5B,MAAM,CAAC,2BAA2B,CAAC;KACnC,IAAI,CAAC,MAAM,CAAC,CAChB,CAAC;AAEF,IAAI,oBAAoB,GAAG,KAAK,CAAC;AAEjC,SAAgB,kBAAkB,CAAC,aAA4B;IAC7D,IAAI,CAAC,mCAAmC,IAAI,CAAC,oBAAoB,EAAE;QACjE,MAAM,KAAK,GACT,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;QACjE,IAAI,KAAK,EAAE;YACT,MAAM,MAAM,GAAG,eAAe,CAAC;YAC/B,MAAM,cAAc,GAAG;gBACrB,MAAM;gBACN,uIAAuI;gBACvI,uDAAuD;gBACvD,kCAAkC,6BAA6B,EAAE;gBACjE,4BAA4B,yBAAyB,EAAE;gBACvD,6EAA6E;gBAC7E,MAAM;aACP,CAAC;YACF,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SAChD;QACD,oBAAoB,GAAG,IAAI,CAAC;KAC7B;AACH,CAAC;AAnBD,gDAmBC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts new file mode 100644 index 0000000000..994065d439 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts @@ -0,0 +1,192 @@ +import type { CacheDurationSeconds, DebugLevel } from '@typescript-eslint/types'; +import type * as ts from 'typescript'; +import type { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree'; +interface ParseOptions { + /** + * Prevents the parser from throwing an error if it receives an invalid AST from TypeScript. + * This case only usually occurs when attempting to lint invalid code. + */ + allowInvalidAST?: boolean; + /** + * create a top-level comments array containing all comments + */ + comment?: boolean; + /** + * An array of modules to turn explicit debugging on for. + * - 'typescript-eslint' is the same as setting the env var `DEBUG=typescript-eslint:*` + * - 'eslint' is the same as setting the env var `DEBUG=eslint:*` + * - 'typescript' is the same as setting `extendedDiagnostics: true` in your tsconfig compilerOptions + * + * For convenience, also supports a boolean: + * - true === ['typescript-eslint'] + * - false === [] + */ + debugLevel?: DebugLevel; + /** + * Cause the parser to error if it encounters an unknown AST node type (useful for testing). + * This case only usually occurs when TypeScript releases new features. + */ + errorOnUnknownASTType?: boolean; + /** + * Absolute (or relative to `cwd`) path to the file being parsed. + */ + filePath?: string; + /** + * Enable parsing of JSX. + * For more details, see https://www.typescriptlang.org/docs/handbook/jsx.html + * + * NOTE: this setting does not effect known file types (.js, .cjs, .mjs, .jsx, .ts, .mts, .cts, .tsx, .json) because the + * TypeScript compiler has its own internal handling for known file extensions. + * + * For the exact behavior, see https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser#parseroptionsecmafeaturesjsx + */ + jsx?: boolean; + /** + * Controls whether the `loc` information to each node. + * The `loc` property is an object which contains the exact line/column the node starts/ends on. + * This is similar to the `range` property, except it is line/column relative. + */ + loc?: boolean; + loggerFn?: false | ((message: string) => void); + /** + * Controls whether the `range` property is included on AST nodes. + * The `range` property is a [number, number] which indicates the start/end index of the node in the file contents. + * This is similar to the `loc` property, except this is the absolute index. + */ + range?: boolean; + /** + * Set to true to create a top-level array containing all tokens from the file. + */ + tokens?: boolean; + /** + * Whether deprecated AST properties should skip calling console.warn on accesses. + */ + suppressDeprecatedPropertyWarnings?: boolean; +} +interface ParseAndGenerateServicesOptions extends ParseOptions { + /** + * Causes the parser to error if the TypeScript compiler returns any unexpected syntax/semantic errors. + */ + errorOnTypeScriptSyntacticAndSemanticIssues?: boolean; + /** + * ***EXPERIMENTAL FLAG*** - Use this at your own risk. + * + * Whether to create a shared TypeScript server to power program creation. + * + * @see https://github.com/typescript-eslint/typescript-eslint/issues/6575 + */ + EXPERIMENTAL_useProjectService?: boolean; + /** + * ***EXPERIMENTAL FLAG*** - Use this at your own risk. + * + * Causes TS to use the source files for referenced projects instead of the compiled .d.ts files. + * This feature is not yet optimized, and is likely to cause OOMs for medium to large projects. + * + * This flag REQUIRES at least TS v3.9, otherwise it does nothing. + * + * @see https://github.com/typescript-eslint/typescript-eslint/issues/2094 + */ + EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean; + /** + * When `project` is provided, this controls the non-standard file extensions which will be parsed. + * It accepts an array of file extensions, each preceded by a `.`. + */ + extraFileExtensions?: string[]; + /** + * Absolute (or relative to `tsconfigRootDir`) path to the file being parsed. + * When `project` is provided, this is required, as it is used to fetch the file from the TypeScript compiler's cache. + */ + filePath?: string; + /** + * Allows the user to control whether or not two-way AST node maps are preserved + * during the AST conversion process. + * + * By default: the AST node maps are NOT preserved, unless `project` has been specified, + * in which case the maps are made available on the returned `parserServices`. + * + * NOTE: If `preserveNodeMaps` is explicitly set by the user, it will be respected, + * regardless of whether or not `project` is in use. + */ + preserveNodeMaps?: boolean; + /** + * Absolute (or relative to `tsconfigRootDir`) paths to the tsconfig(s), + * or `true` to find the nearest tsconfig.json to the file. + * If this is provided, type information will be returned. + */ + project?: string[] | string | true | null; + /** + * If you provide a glob (or globs) to the project option, you can use this option to ignore certain folders from + * being matched by the globs. + * This accepts an array of globs to ignore. + * + * By default, this is set to ["**\/node_modules/**"] + */ + projectFolderIgnoreList?: string[]; + /** + * The absolute path to the root directory for all provided `project`s. + */ + tsconfigRootDir?: string; + /** + * An array of one or more instances of TypeScript Program objects to be used for type information. + * This overrides any program or programs that would have been computed from the `project` option. + * All linted files must be part of the provided program(s). + */ + programs?: ts.Program[] | null; + /** + * @deprecated - this flag will be removed in the next major. + * Do not rely on the behavior provided by this flag. + */ + DEPRECATED__createDefaultProgram?: boolean; + /** + * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, + * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback + * on a file in an IDE). + * + * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction + * is important because there is significant overhead to managing the so called Watch Programs + * needed for the long-running use-case. + * + * When allowAutomaticSingleRunInference is enabled, we will use common heuristics to infer + * whether or not ESLint is being used as part of a single run. + */ + allowAutomaticSingleRunInference?: boolean; + /** + * Granular control of the expiry lifetime of our internal caches. + * You can specify the number of seconds as an integer number, or the string + * 'Infinity' if you never want the cache to expire. + * + * By default cache entries will be evicted after 30 seconds, or will persist + * indefinitely if `allowAutomaticSingleRunInference = true` AND the parser + * infers that it is a single run. + */ + cacheLifetime?: { + /** + * Glob resolution for `parserOptions.project` values. + */ + glob?: CacheDurationSeconds; + }; +} +export type TSESTreeOptions = ParseAndGenerateServicesOptions; +export interface ParserWeakMap { + get(key: TKey): TValue; + has(key: unknown): boolean; +} +export interface ParserWeakMapESTreeToTSNode { + get(key: TKeyBase): TSESTreeToTSNode; + has(key: unknown): boolean; +} +export interface ParserServicesNodeMaps { + esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; + tsNodeToESTreeNodeMap: ParserWeakMap; +} +export interface ParserServicesWithTypeInformation extends ParserServicesNodeMaps { + program: ts.Program; + getSymbolAtLocation: (node: TSESTree.Node) => ts.Symbol | undefined; + getTypeAtLocation: (node: TSESTree.Node) => ts.Type; +} +export interface ParserServicesWithoutTypeInformation extends ParserServicesNodeMaps { + program: null; +} +export type ParserServices = ParserServicesWithoutTypeInformation | ParserServicesWithTypeInformation; +export {}; +//# sourceMappingURL=parser-options.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map new file mode 100644 index 0000000000..aa9ee04802 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser-options.d.ts","sourceRoot":"","sources":["../src/parser-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EACX,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAM/E,UAAU,YAAY;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,O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CAAiC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js new file mode 100644 index 0000000000..66f40a290d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=parser-options.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js.map new file mode 100644 index 0000000000..22b7b8ab93 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parser-options.js","sourceRoot":"","sources":["../src/parser-options.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts new file mode 100644 index 0000000000..c7be51cd27 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts @@ -0,0 +1,20 @@ +import type * as ts from 'typescript'; +import type { ParserServices, TSESTreeOptions } from './parser-options'; +import type { TSESTree } from './ts-estree'; +declare function clearProgramCache(): void; +interface EmptyObject { +} +type AST = TSESTree.Program & (T['comment'] extends true ? { + comments: TSESTree.Comment[]; +} : EmptyObject) & (T['tokens'] extends true ? { + tokens: TSESTree.Token[]; +} : EmptyObject); +interface ParseAndGenerateServicesResult { + ast: AST; + services: ParserServices; +} +declare function parse(code: string, options?: T): AST; +declare function clearParseAndGenerateServicesCalls(): void; +declare function parseAndGenerateServices(code: ts.SourceFile | string, options: T): ParseAndGenerateServicesResult; +export { AST, parse, parseAndGenerateServices, ParseAndGenerateServicesResult, clearProgramCache, clearParseAndGenerateServicesCalls, }; +//# sourceMappingURL=parser.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map new file mode 100644 index 0000000000..8dd598fbf3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAkBtC,OAAO,KAAK,EACV,cAAc,EAEd,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAW5C,iBAAS,iBAAiB,IAAI,IAAI,CAEjC;AA0DD,UAAU,WAAW;CAAG;AACxB,KAAK,GAAG,CAAC,CAAC,SAAS,eAAe,IAAI,QAAQ,CAAC,OAAO,GACpD,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,IAAI,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAA;CAAE,GAAG,WAAW,CAAC,GAC5E,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,IAAI,GAAG;IAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAA;CAAE,GAAG,WAAW,CAAC,CAAC;AAE1E,UAAU,8BAA8B,CAAC,CAAC,SAAS,eAAe;IAChE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACZ,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAMD,iBAAS,KAAK,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EACxD,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,CAAC,GACV,GAAG,CAAC,CAAC,CAAC,CAGR;AA4CD,iBAAS,kCAAkC,IAAI,IAAI,CAElD;AAED,iBAAS,wBAAwB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EAC3E,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,EAC5B,OAAO,EAAE,CAAC,GACT,8BAA8B,CAAC,CAAC,CAAC,CAkHnC;AAED,OAAO,EACL,GAAG,EACH,KAAK,EACL,wBAAwB,EACxB,8BAA8B,EAC9B,iBAAiB,EACjB,kCAAkC,GACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.js new file mode 100644 index 0000000000..c69b8ac623 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.js @@ -0,0 +1,193 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.clearParseAndGenerateServicesCalls = exports.clearProgramCache = exports.parseAndGenerateServices = exports.parse = void 0; +const debug_1 = __importDefault(require("debug")); +const ast_converter_1 = require("./ast-converter"); +const convert_1 = require("./convert"); +const createDefaultProgram_1 = require("./create-program/createDefaultProgram"); +const createIsolatedProgram_1 = require("./create-program/createIsolatedProgram"); +const createProjectProgram_1 = require("./create-program/createProjectProgram"); +const createSourceFile_1 = require("./create-program/createSourceFile"); +const getWatchProgramsForProjects_1 = require("./create-program/getWatchProgramsForProjects"); +const useProvidedPrograms_1 = require("./create-program/useProvidedPrograms"); +const createParserServices_1 = require("./createParserServices"); +const createParseSettings_1 = require("./parseSettings/createParseSettings"); +const semantic_or_syntactic_errors_1 = require("./semantic-or-syntactic-errors"); +const useProgramFromProjectService_1 = require("./useProgramFromProjectService"); +const log = (0, debug_1.default)('typescript-eslint:typescript-estree:parser'); +/** + * Cache existing programs for the single run use-case. + * + * clearProgramCache() is only intended to be used in testing to ensure the parser is clean between tests. + */ +const existingPrograms = new Map(); +function clearProgramCache() { + existingPrograms.clear(); +} +exports.clearProgramCache = clearProgramCache; +/** + * @param parseSettings Internal settings for parsing the file + * @param hasFullTypeInformation True if the program should be attempted to be calculated from provided tsconfig files + * @returns Returns a source file and program corresponding to the linted code + */ +function getProgramAndAST(parseSettings, hasFullTypeInformation) { + if (parseSettings.EXPERIMENTAL_projectService) { + const fromProjectService = (0, useProgramFromProjectService_1.useProgramFromProjectService)(parseSettings.EXPERIMENTAL_projectService, parseSettings); + if (fromProjectService) { + return fromProjectService; + } + } + if (parseSettings.programs) { + const fromProvidedPrograms = (0, useProvidedPrograms_1.useProvidedPrograms)(parseSettings.programs, parseSettings); + if (fromProvidedPrograms) { + return fromProvidedPrograms; + } + } + // no need to waste time creating a program as the caller didn't want parser services + // so we can save time and just create a lonesome source file + if (!hasFullTypeInformation) { + return (0, createSourceFile_1.createNoProgram)(parseSettings); + } + const fromProjectProgram = (0, createProjectProgram_1.createProjectProgram)(parseSettings, (0, getWatchProgramsForProjects_1.getWatchProgramsForProjects)(parseSettings)); + if (fromProjectProgram) { + return fromProjectProgram; + } + // eslint-disable-next-line deprecation/deprecation -- will be cleaned up with the next major + if (parseSettings.DEPRECATED__createDefaultProgram) { + // eslint-disable-next-line deprecation/deprecation -- will be cleaned up with the next major + const fromDefaultProgram = (0, createDefaultProgram_1.createDefaultProgram)(parseSettings); + if (fromDefaultProgram) { + return fromDefaultProgram; + } + } + return (0, createIsolatedProgram_1.createIsolatedProgram)(parseSettings); +} +function parse(code, options) { + const { ast } = parseWithNodeMapsInternal(code, options, false); + return ast; +} +exports.parse = parse; +function parseWithNodeMapsInternal(code, options, shouldPreserveNodeMaps) { + /** + * Reset the parse configuration + */ + const parseSettings = (0, createParseSettings_1.createParseSettings)(code, options); + /** + * Ensure users do not attempt to use parse() when they need parseAndGenerateServices() + */ + if (options?.errorOnTypeScriptSyntacticAndSemanticIssues) { + throw new Error(`"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()`); + } + /** + * Create a ts.SourceFile directly, no ts.Program is needed for a simple parse + */ + const ast = (0, createSourceFile_1.createSourceFile)(parseSettings); + /** + * Convert the TypeScript AST to an ESTree-compatible one + */ + const { estree, astMaps } = (0, ast_converter_1.astConverter)(ast, parseSettings, shouldPreserveNodeMaps); + return { + ast: estree, + esTreeNodeToTSNodeMap: astMaps.esTreeNodeToTSNodeMap, + tsNodeToESTreeNodeMap: astMaps.tsNodeToESTreeNodeMap, + }; +} +let parseAndGenerateServicesCalls = {}; +// Privately exported utility intended for use in typescript-eslint unit tests only +function clearParseAndGenerateServicesCalls() { + parseAndGenerateServicesCalls = {}; +} +exports.clearParseAndGenerateServicesCalls = clearParseAndGenerateServicesCalls; +function parseAndGenerateServices(code, options) { + /** + * Reset the parse configuration + */ + const parseSettings = (0, createParseSettings_1.createParseSettings)(code, options); + /** + * If this is a single run in which the user has not provided any existing programs but there + * are programs which need to be created from the provided "project" option, + * create an Iterable which will lazily create the programs as needed by the iteration logic + */ + if (parseSettings.singleRun && + !parseSettings.programs && + parseSettings.projects?.length > 0) { + parseSettings.programs = { + *[Symbol.iterator]() { + for (const configFile of parseSettings.projects) { + const existingProgram = existingPrograms.get(configFile); + if (existingProgram) { + yield existingProgram; + } + else { + log('Detected single-run/CLI usage, creating Program once ahead of time for project: %s', configFile); + const newProgram = (0, useProvidedPrograms_1.createProgramFromConfigFile)(configFile); + existingPrograms.set(configFile, newProgram); + yield newProgram; + } + } + }, + }; + } + /** + * Generate a full ts.Program or offer provided instances in order to be able to provide parser services, such as type-checking + */ + const hasFullTypeInformation = parseSettings.programs != null || parseSettings.projects?.length > 0; + if (options !== undefined) { + if (typeof options.errorOnTypeScriptSyntacticAndSemanticIssues === + 'boolean' && + options.errorOnTypeScriptSyntacticAndSemanticIssues) { + parseSettings.errorOnTypeScriptSyntacticAndSemanticIssues = true; + } + if (parseSettings.errorOnTypeScriptSyntacticAndSemanticIssues && + !hasFullTypeInformation) { + throw new Error('Cannot calculate TypeScript semantic issues without a valid project.'); + } + } + /** + * If we are in singleRun mode but the parseAndGenerateServices() function has been called more than once for the current file, + * it must mean that we are in the middle of an ESLint automated fix cycle (in which parsing can be performed up to an additional + * 10 times in order to apply all possible fixes for the file). + * + * In this scenario we cannot rely upon the singleRun AOT compiled programs because the SourceFiles will not contain the source + * with the latest fixes applied. Therefore we fallback to creating the quickest possible isolated program from the updated source. + */ + if (parseSettings.singleRun && options.filePath) { + parseAndGenerateServicesCalls[options.filePath] = + (parseAndGenerateServicesCalls[options.filePath] || 0) + 1; + } + const { ast, program } = parseSettings.singleRun && + options.filePath && + parseAndGenerateServicesCalls[options.filePath] > 1 + ? (0, createIsolatedProgram_1.createIsolatedProgram)(parseSettings) + : getProgramAndAST(parseSettings, hasFullTypeInformation); + /** + * Convert the TypeScript AST to an ESTree-compatible one, and optionally preserve + * mappings between converted and original AST nodes + */ + const shouldPreserveNodeMaps = typeof parseSettings.preserveNodeMaps === 'boolean' + ? parseSettings.preserveNodeMaps + : true; + const { estree, astMaps } = (0, ast_converter_1.astConverter)(ast, parseSettings, shouldPreserveNodeMaps); + /** + * Even if TypeScript parsed the source code ok, and we had no problems converting the AST, + * there may be other syntactic or semantic issues in the code that we can optionally report on. + */ + if (program && parseSettings.errorOnTypeScriptSyntacticAndSemanticIssues) { + const error = (0, semantic_or_syntactic_errors_1.getFirstSemanticOrSyntacticError)(program, ast); + if (error) { + throw (0, convert_1.convertError)(error); + } + } + /** + * Return the converted AST and additional parser services + */ + return { + ast: estree, + services: (0, createParserServices_1.createParserServices)(astMaps, program), + }; +} +exports.parseAndGenerateServices = parseAndGenerateServices; +//# sourceMappingURL=parser.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map new file mode 100644 index 0000000000..45fbdda21d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,mDAA+C;AAC/C,uCAAyC;AACzC,gFAA6E;AAC7E,kFAA+E;AAC/E,gFAA6E;AAC7E,wEAG2C;AAC3C,8FAA2F;AAE3F,8EAG8C;AAC9C,iEAA8D;AAO9D,6EAA0E;AAC1E,iFAAkF;AAElF,iFAA8E;AAE9E,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,4CAA4C,CAAC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA6B,CAAC;AAC9D,SAAS,iBAAiB;IACxB,gBAAgB,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC;AA0PC,8CAAiB;AAxPnB;;;;GAIG;AACH,SAAS,gBAAgB,CACvB,aAA4B,EAC5B,sBAA+B;IAE/B,IAAI,aAAa,CAAC,2BAA2B,EAAE;QAC7C,MAAM,kBAAkB,GAAG,IAAA,2DAA4B,EACrD,aAAa,CAAC,2BAA2B,EACzC,aAAa,CACd,CAAC;QACF,IAAI,kBAAkB,EAAE;YACtB,OAAO,kBAAkB,CAAC;SAC3B;KACF;IAED,IAAI,aAAa,CAAC,QAAQ,EAAE;QAC1B,MAAM,oBAAoB,GAAG,IAAA,yCAAmB,EAC9C,aAAa,CAAC,QAAQ,EACtB,aAAa,CACd,CAAC;QACF,IAAI,oBAAoB,EAAE;YACxB,OAAO,oBAAoB,CAAC;SAC7B;KACF;IAED,qFAAqF;IACrF,6DAA6D;IAC7D,IAAI,CAAC,sBAAsB,EAAE;QAC3B,OAAO,IAAA,kCAAe,EAAC,aAAa,CAAC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ules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts new file mode 100644 index 0000000000..bd35968c3b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts @@ -0,0 +1,13 @@ +import type { Diagnostic, Program, SourceFile } from 'typescript'; +export interface SemanticOrSyntacticError extends Diagnostic { + message: string; +} +/** + * By default, diagnostics from the TypeScript compiler contain all errors - regardless of whether + * they are related to generic ECMAScript standards, or TypeScript-specific constructs. + * + * Therefore, we filter out all diagnostics, except for the ones we explicitly want to consider when + * the user opts in to throwing errors on semantic issues. + */ +export declare function getFirstSemanticOrSyntacticError(program: Program, ast: SourceFile): SemanticOrSyntacticError | undefined; +//# sourceMappingURL=semantic-or-syntactic-errors.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts.map new file mode 100644 index 0000000000..d17a7ae662 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"semantic-or-syntactic-errors.d.ts","sourceRoot":"","sources":["../src/semantic-or-syntactic-errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAEV,OAAO,EACP,UAAU,EACX,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,wBAAyB,SAAQ,UAAU;IAC1D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,UAAU,GACd,wBAAwB,GAAG,SAAS,CAmCtC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js new file mode 100644 index 0000000000..4384f116a3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js @@ -0,0 +1,96 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getFirstSemanticOrSyntacticError = void 0; +const typescript_1 = require("typescript"); +/** + * By default, diagnostics from the TypeScript compiler contain all errors - regardless of whether + * they are related to generic ECMAScript standards, or TypeScript-specific constructs. + * + * Therefore, we filter out all diagnostics, except for the ones we explicitly want to consider when + * the user opts in to throwing errors on semantic issues. + */ +function getFirstSemanticOrSyntacticError(program, ast) { + try { + const supportedSyntacticDiagnostics = allowlistSupportedDiagnostics(program.getSyntacticDiagnostics(ast)); + if (supportedSyntacticDiagnostics.length > 0) { + return convertDiagnosticToSemanticOrSyntacticError(supportedSyntacticDiagnostics[0]); + } + const supportedSemanticDiagnostics = allowlistSupportedDiagnostics(program.getSemanticDiagnostics(ast)); + if (supportedSemanticDiagnostics.length > 0) { + return convertDiagnosticToSemanticOrSyntacticError(supportedSemanticDiagnostics[0]); + } + return undefined; + } + catch (e) { + /** + * TypeScript compiler has certain Debug.fail() statements in, which will cause the diagnostics + * retrieval above to throw. + * + * E.g. from ast-alignment-tests + * "Debug Failure. Shouldn't ever directly check a JsxOpeningElement" + * + * For our current use-cases this is undesired behavior, so we just suppress it + * and log a a warning. + */ + /* istanbul ignore next */ + console.warn(`Warning From TSC: "${e.message}`); // eslint-disable-line no-console + /* istanbul ignore next */ + return undefined; + } +} +exports.getFirstSemanticOrSyntacticError = getFirstSemanticOrSyntacticError; +function allowlistSupportedDiagnostics(diagnostics) { + return diagnostics.filter(diagnostic => { + switch (diagnostic.code) { + case 1013: // "A rest parameter or binding pattern may not have a trailing comma." + case 1014: // "A rest parameter must be last in a parameter list." + case 1044: // "'{0}' modifier cannot appear on a module or namespace element." + case 1045: // "A '{0}' modifier cannot be used with an interface declaration." + case 1048: // "A rest parameter cannot have an initializer." + case 1049: // "A 'set' accessor must have exactly one parameter." + case 1070: // "'{0}' modifier cannot appear on a type member." + case 1071: // "'{0}' modifier cannot appear on an index signature." + case 1085: // "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'." + case 1090: // "'{0}' modifier cannot appear on a parameter." + case 1096: // "An index signature must have exactly one parameter." + case 1097: // "'{0}' list cannot be empty." + case 1098: // "Type parameter list cannot be empty." + case 1099: // "Type argument list cannot be empty." + case 1117: // "An object literal cannot have multiple properties with the same name in strict mode." + case 1121: // "Octal literals are not allowed in strict mode." + case 1123: // "Variable declaration list cannot be empty." + case 1141: // "String literal expected." + case 1162: // "An object member cannot be declared optional." + case 1164: // "Computed property names are not allowed in enums." + case 1172: // "'extends' clause already seen." + case 1173: // "'extends' clause must precede 'implements' clause." + case 1175: // "'implements' clause already seen." + case 1176: // "Interface declaration cannot have 'implements' clause." + case 1190: // "The variable declaration of a 'for...of' statement cannot have an initializer." + case 1196: // "Catch clause variable type annotation must be 'any' or 'unknown' if specified." + case 1200: // "Line terminator not permitted before arrow." + case 1206: // "Decorators are not valid here." + case 1211: // "A class declaration without the 'default' modifier must have a name." + case 1242: // "'abstract' modifier can only appear on a class, method, or property declaration." + case 1246: // "An interface property cannot have an initializer." + case 1255: // "A definite assignment assertion '!' is not permitted in this context." + case 1308: // "'await' expression is only allowed within an async function." + case 2364: // "The left-hand side of an assignment expression must be a variable or a property access." + case 2369: // "A parameter property is only allowed in a constructor implementation." + case 2452: // "An enum member cannot have a numeric name." + case 2462: // "A rest element must be last in a destructuring pattern." + case 8017: // "Octal literal types must use ES2015 syntax. Use the syntax '{0}'." + case 17012: // "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?" + case 17013: // "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor." + return true; + } + return false; + }); +} +function convertDiagnosticToSemanticOrSyntacticError(diagnostic) { + return { + ...diagnostic, + message: (0, typescript_1.flattenDiagnosticMessageText)(diagnostic.messageText, typescript_1.sys.newLine), + }; +} +//# sourceMappingURL=semantic-or-syntactic-errors.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js.map new file mode 100644 index 0000000000..705790874c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/semantic-or-syntactic-errors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"semantic-or-syntactic-errors.js","sourceRoot":"","sources":["../src/semantic-or-syntactic-errors.ts"],"names":[],"mappings":";;;AAMA,2CAA+D;AAM/D;;;;;;GAMG;AACH,SAAgB,gCAAgC,CAC9C,OAAgB,EAChB,GAAe;IAEf,IAAI;QACF,MAAM,6BAA6B,GAAG,6BAA6B,CACjE,OAAO,CAAC,uBAAuB,CAAC,GAAG,CAAC,CACrC,CAAC;QACF,IAAI,6BAA6B,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5C,OAAO,2CAA2C,CAChD,6BAA6B,CAAC,CAAC,CAAC,CACjC,CAAC;SACH;QACD,MAAM,4BAA4B,GAAG,6BAA6B,CAChE,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CACpC,CAAC;QACF,IAAI,4BAA4B,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3C,OAAO,2CAA2C,CAChD,4BAA4B,CAAC,CAAC,CAAC,CAChC,CAAC;SACH;QACD,OAAO,SAAS,CAAC;KAClB;IAAC,OAAO,CAAC,EAAE;QACV;;;;;;;;;WASG;QACH,0BAA0B;QAC1B,OAAO,CAAC,IAAI,CAAC,sBAAuB,CAAW,CAAC,OAA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C,CAAC,mFAAmF;YAC9F,KAAK,IAAI,CAAC,CAAC,gDAAgD;YAC3D,KAAK,IAAI,CAAC,CAAC,mCAAmC;YAC9C,KAAK,IAAI,CAAC,CAAC,yEAAyE;YACpF,KAAK,IAAI,CAAC,CAAC,qFAAqF;YAChG,KAAK,IAAI,CAAC,CAAC,sDAAsD;YACjE,KAAK,IAAI,CAAC,CAAC,0EAA0E;YACrF,KAAK,IAAI,CAAC,CAAC,iEAAiE;YAC5E,KAAK,IAAI,CAAC,CAAC,4FAA4F;YACvG,KAAK,IAAI,CAAC,CAAC,0EAA0E;YACrF,KAAK,IAAI,CAAC,CAAC,+CAA+C;YAC1D,KAAK,IAAI,CAAC,CAAC,4DAA4D;YACvE,KAAK,IAAI,CAAC,CAAC,sEAAsE;YACjF,KAAK,KAAK,CAAC,CAAC,8EAA8E;YAC1F,KAAK,KAAK,EAAE,oHAAoH;gBAC9H,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,2CAA2C,CAClD,UAAsB;IAEtB,OAAO;QACL,GAAG,UAAU;QACb,OAAO,EAAE,IAAA,yCAA4B,EAAC,UAAU,CAAC,WAAW,EAAE,gBAAG,CAAC,OAAO,CAAC;KAC3E,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts new file mode 100644 index 0000000000..7a8e276391 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts @@ -0,0 +1,12 @@ +import type { VisitorKeys } from '@typescript-eslint/visitor-keys'; +import type { TSESTree } from './ts-estree'; +type SimpleTraverseOptions = Readonly<{ + visitorKeys?: Readonly; + enter: (node: TSESTree.Node, parent: TSESTree.Node | undefined) => void; +} | { + visitorKeys?: Readonly; + visitors: Record void>; +}>; +export declare function simpleTraverse(startingNode: TSESTree.Node, options: SimpleTraverseOptions, setParentPointers?: boolean): void; +export {}; +//# sourceMappingURL=simple-traverse.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts.map new file mode 100644 index 0000000000..8716a5e11a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"simple-traverse.d.ts","sourceRoot":"","sources":["../src/simple-traverse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAGnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAmB5C,KAAK,qBAAqB,GAAG,QAAQ,CACjC;IACE,WAAW,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IACpC,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;CACzE,GACD;IACE,WAAW,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IACpC,QAAQ,EAAE,MAAM,CACd,MAAM,EACN,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,KAAK,IAAI,CACjE,CAAC;CACH,CACJ,CAAC;AAiDF,wBAAgB,cAAc,CAC5B,YAAY,EAAE,QAAQ,CAAC,IAAI,EAC3B,OAAO,EAAE,qBAAqB,EAC9B,iBAAiB,UAAQ,GACxB,IAAI,CAKN"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js new file mode 100644 index 0000000000..c8b212835a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.simpleTraverse = void 0; +const visitor_keys_1 = require("@typescript-eslint/visitor-keys"); +function isValidNode(x) { + return (typeof x === 'object' && + x != null && + 'type' in x && + typeof x.type === 'string'); +} +function getVisitorKeysForNode(allVisitorKeys, node) { + const keys = allVisitorKeys[node.type]; + return (keys ?? []); +} +class SimpleTraverser { + constructor(selectors, setParentPointers = false) { + this.allVisitorKeys = visitor_keys_1.visitorKeys; + this.selectors = selectors; + this.setParentPointers = setParentPointers; + if (selectors.visitorKeys) { + this.allVisitorKeys = selectors.visitorKeys; + } + } + traverse(node, parent) { + if (!isValidNode(node)) { + return; + } + if (this.setParentPointers) { + node.parent = parent; + } + if ('enter' in this.selectors) { + this.selectors.enter(node, parent); + } + else if (node.type in this.selectors.visitors) { + this.selectors.visitors[node.type](node, parent); + } + const keys = getVisitorKeysForNode(this.allVisitorKeys, node); + if (keys.length < 1) { + return; + } + for (const key of keys) { + const childOrChildren = node[key]; + if (Array.isArray(childOrChildren)) { + for (const child of childOrChildren) { + this.traverse(child, node); + } + } + else { + this.traverse(childOrChildren, node); + } + } + } +} +function simpleTraverse(startingNode, options, setParentPointers = false) { + new SimpleTraverser(options, setParentPointers).traverse(startingNode, undefined); +} +exports.simpleTraverse = simpleTraverse; +//# sourceMappingURL=simple-traverse.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js.map new file mode 100644 index 0000000000..7a42e9b733 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"simple-traverse.js","sourceRoot":"","sources":["../src/simple-traverse.ts"],"names":[],"mappings":";;;AACA,kEAA8D;AAI9D,SAAS,WAAW,CAAC,CAAU;IAC7B,OAAO,CACL,OAAO,CAAC,KAAK,QAAQ;QACrB,CAAC,IAAI,IAAI;QACT,MAAM,IAAI,CAAC;QACX,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,CAC3B,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAC5B,cAAkC,EAClC,IAAmB;IAEnB,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAU,CAAC;AAC/B,CAAC;AAgBD,MAAM,eAAe;IAKnB,YAAY,SAAgC,EAAE,iBAAiB,GAAG,KAAK;QAJtD,mBAAc,GAA0B,0BAAW,CAAC;QAKnE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,SAAS,CAAC,WAAW,EAAE;YACzB,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC,WAAW,CAAC;SAC7C;IACH,CAAC;IAED,QAAQ,CAAC,IAAa,EAAE,MAAiC;QACvD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;YACtB,OAAO;SACR;QAED,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;SACtB;QAED,IAAI,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE;YAC7B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;SACpC;aAAM,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC/C,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;SAClD;QAED,MAAM,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QAC9D,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,OAAO;SACR;QAED,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;YAElC,IAAI,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE;gBAClC,KAAK,MAAM,KAAK,IAAI,eAAe,EAAE;oBACnC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;iBAC5B;aACF;iBAAM;gBACL,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;aACtC;SACF;IACH,CAAC;CACF;AAED,SAAgB,cAAc,CAC5B,YAA2B,EAC3B,OAA8B,EAC9B,iBAAiB,GAAG,KAAK;IAEzB,IAAI,eAAe,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,QAAQ,CACtD,YAAY,EACZ,SAAS,CACV,CAAC;AACJ,CAAC;AATD,wCASC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts new file mode 100644 index 0000000000..46d2ea25ac --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts @@ -0,0 +1,4 @@ +import * as ts from 'typescript'; +export declare function isSourceFile(code: unknown): code is ts.SourceFile; +export declare function getCodeText(code: ts.SourceFile | string): string; +//# sourceMappingURL=source-files.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts.map new file mode 100644 index 0000000000..cee19bda54 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"source-files.d.ts","sourceRoot":"","sources":["../src/source-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC,UAAU,CAUjE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,MAAM,GAAG,MAAM,CAEhE"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js new file mode 100644 index 0000000000..3ab4b3fcc7 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js @@ -0,0 +1,41 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCodeText = exports.isSourceFile = void 0; +const ts = __importStar(require("typescript")); +function isSourceFile(code) { + if (typeof code !== 'object' || code == null) { + return false; + } + const maybeSourceFile = code; + return (maybeSourceFile.kind === ts.SyntaxKind.SourceFile && + typeof maybeSourceFile.getFullText === 'function'); +} +exports.isSourceFile = isSourceFile; +function getCodeText(code) { + return isSourceFile(code) ? code.getFullText(code) : code; +} +exports.getCodeText = getCodeText; +//# sourceMappingURL=source-files.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js.map new file mode 100644 index 0000000000..8d32bc6c25 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/source-files.js.map @@ -0,0 +1 @@ +{"version":3,"file":"source-files.js","sourceRoot":"","sources":["../src/source-files.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAEjC,SAAgB,YAAY,CAAC,IAAa;IACxC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,IAAI,IAAI,EAAE;QAC5C,OAAO,KAAK,CAAC;KACd;IAED,MAAM,eAAe,GAAG,IAA8B,CAAC;IACvD,OAAO,CACL,eAAe,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU;QACjD,OAAO,eAAe,CAAC,WAAW,KAAK,UAAU,CAClD,CAAC;AACJ,CAAC;AAVD,oCAUC;AAED,SAAgB,WAAW,CAAC,IAA4B;IACtD,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5D,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts new file mode 100644 index 0000000000..21ae819cdd --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts @@ -0,0 +1,178 @@ +import type { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/types'; +import type * as ts from 'typescript'; +import type { TSNode } from './ts-nodes'; +export interface EstreeToTsNodeTypes { + [AST_NODE_TYPES.AccessorProperty]: ts.PropertyDeclaration; + [AST_NODE_TYPES.ArrayExpression]: ts.ArrayLiteralExpression; + [AST_NODE_TYPES.ArrayPattern]: ts.ArrayBindingPattern | ts.ArrayLiteralExpression; + [AST_NODE_TYPES.ArrowFunctionExpression]: ts.ArrowFunction; + [AST_NODE_TYPES.AssignmentExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.AssignmentPattern]: ts.BinaryExpression | ts.BindingElement | ts.ParameterDeclaration | ts.ShorthandPropertyAssignment; + [AST_NODE_TYPES.AwaitExpression]: ts.AwaitExpression; + [AST_NODE_TYPES.BinaryExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.BlockStatement]: ts.Block; + [AST_NODE_TYPES.BreakStatement]: ts.BreakStatement; + [AST_NODE_TYPES.CallExpression]: ts.CallExpression; + [AST_NODE_TYPES.CatchClause]: ts.CatchClause; + [AST_NODE_TYPES.ChainExpression]: ts.CallExpression | ts.ElementAccessExpression | ts.NonNullExpression | ts.PropertyAccessExpression; + [AST_NODE_TYPES.ClassBody]: ts.ClassDeclaration | ts.ClassExpression; + [AST_NODE_TYPES.ClassDeclaration]: ts.ClassDeclaration; + [AST_NODE_TYPES.ClassExpression]: ts.ClassExpression; + [AST_NODE_TYPES.PropertyDefinition]: ts.PropertyDeclaration; + [AST_NODE_TYPES.ConditionalExpression]: ts.ConditionalExpression; + [AST_NODE_TYPES.ContinueStatement]: ts.ContinueStatement; + [AST_NODE_TYPES.DebuggerStatement]: ts.DebuggerStatement; + [AST_NODE_TYPES.Decorator]: ts.Decorator; + [AST_NODE_TYPES.DoWhileStatement]: ts.DoStatement; + [AST_NODE_TYPES.EmptyStatement]: ts.EmptyStatement; + [AST_NODE_TYPES.ExportAllDeclaration]: ts.ExportDeclaration; + [AST_NODE_TYPES.ExportDefaultDeclaration]: ts.ClassDeclaration | ts.ClassExpression | ts.EnumDeclaration | ts.ExportAssignment | ts.FunctionDeclaration | ts.InterfaceDeclaration | ts.ModuleDeclaration | ts.TypeAliasDeclaration | ts.VariableStatement; + [AST_NODE_TYPES.ExportNamedDeclaration]: ts.ClassDeclaration | ts.ClassExpression | ts.EnumDeclaration | ts.ExportDeclaration | ts.FunctionDeclaration | ts.ImportEqualsDeclaration | ts.InterfaceDeclaration | ts.ModuleDeclaration | ts.TypeAliasDeclaration | ts.VariableStatement; + [AST_NODE_TYPES.ExportSpecifier]: ts.ExportSpecifier; + [AST_NODE_TYPES.ExpressionStatement]: ts.ExpressionStatement; + [AST_NODE_TYPES.ForInStatement]: ts.ForInStatement; + [AST_NODE_TYPES.ForOfStatement]: ts.ForOfStatement; + [AST_NODE_TYPES.ForStatement]: ts.ForStatement; + [AST_NODE_TYPES.FunctionDeclaration]: ts.FunctionDeclaration; + [AST_NODE_TYPES.FunctionExpression]: ts.ConstructorDeclaration | ts.FunctionExpression | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.Identifier]: ts.ConstructorDeclaration | ts.Identifier | ts.Token; + [AST_NODE_TYPES.PrivateIdentifier]: ts.PrivateIdentifier; + [AST_NODE_TYPES.IfStatement]: ts.IfStatement; + [AST_NODE_TYPES.ImportAttribute]: ts.AssertEntry; + [AST_NODE_TYPES.ImportDeclaration]: ts.ImportDeclaration; + [AST_NODE_TYPES.ImportDefaultSpecifier]: ts.ImportClause; + [AST_NODE_TYPES.ImportExpression]: ts.CallExpression; + [AST_NODE_TYPES.ImportNamespaceSpecifier]: ts.NamespaceImport; + [AST_NODE_TYPES.ImportSpecifier]: ts.ImportSpecifier; + [AST_NODE_TYPES.JSXAttribute]: ts.JsxAttribute; + [AST_NODE_TYPES.JSXClosingElement]: ts.JsxClosingElement; + [AST_NODE_TYPES.JSXClosingFragment]: ts.JsxClosingFragment; + [AST_NODE_TYPES.JSXElement]: ts.JsxElement | ts.JsxSelfClosingElement; + [AST_NODE_TYPES.JSXEmptyExpression]: ts.JsxExpression; + [AST_NODE_TYPES.JSXExpressionContainer]: ts.JsxExpression; + [AST_NODE_TYPES.JSXFragment]: ts.JsxFragment; + [AST_NODE_TYPES.JSXIdentifier]: ts.Identifier | ts.ThisExpression; + [AST_NODE_TYPES.JSXOpeningElement]: ts.JsxOpeningElement | ts.JsxSelfClosingElement; + [AST_NODE_TYPES.JSXOpeningFragment]: ts.JsxOpeningFragment; + [AST_NODE_TYPES.JSXSpreadAttribute]: ts.JsxSpreadAttribute; + [AST_NODE_TYPES.JSXSpreadChild]: ts.JsxExpression; + [AST_NODE_TYPES.JSXMemberExpression]: ts.PropertyAccessExpression; + [AST_NODE_TYPES.JSXNamespacedName]: ts.JsxNamespacedName; + [AST_NODE_TYPES.JSXText]: ts.JsxText; + [AST_NODE_TYPES.LabeledStatement]: ts.LabeledStatement; + [AST_NODE_TYPES.Literal]: ts.BigIntLiteral | ts.BooleanLiteral | ts.NullLiteral | ts.NumericLiteral | ts.RegularExpressionLiteral | ts.StringLiteral; + [AST_NODE_TYPES.LogicalExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.MemberExpression]: ts.ElementAccessExpression | ts.PropertyAccessExpression; + [AST_NODE_TYPES.MetaProperty]: ts.MetaProperty; + [AST_NODE_TYPES.MethodDefinition]: ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.NewExpression]: ts.NewExpression; + [AST_NODE_TYPES.ObjectExpression]: ts.ObjectLiteralExpression; + [AST_NODE_TYPES.ObjectPattern]: ts.ObjectBindingPattern | ts.ObjectLiteralExpression; + [AST_NODE_TYPES.Program]: ts.SourceFile; + [AST_NODE_TYPES.Property]: ts.BindingElement | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.PropertyAssignment | ts.SetAccessorDeclaration | ts.ShorthandPropertyAssignment; + [AST_NODE_TYPES.RestElement]: ts.BindingElement | ts.ParameterDeclaration | ts.SpreadAssignment | ts.SpreadElement; + [AST_NODE_TYPES.ReturnStatement]: ts.ReturnStatement; + [AST_NODE_TYPES.SequenceExpression]: ts.BinaryExpression; + [AST_NODE_TYPES.SpreadElement]: ts.SpreadAssignment | ts.SpreadElement; + [AST_NODE_TYPES.StaticBlock]: ts.ClassStaticBlockDeclaration; + [AST_NODE_TYPES.Super]: ts.SuperExpression; + [AST_NODE_TYPES.SwitchCase]: ts.CaseClause | ts.DefaultClause; + [AST_NODE_TYPES.SwitchStatement]: ts.SwitchStatement; + [AST_NODE_TYPES.TaggedTemplateExpression]: ts.TaggedTemplateExpression; + [AST_NODE_TYPES.TemplateElement]: ts.NoSubstitutionTemplateLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail; + [AST_NODE_TYPES.TemplateLiteral]: ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression; + [AST_NODE_TYPES.ThisExpression]: ts.Identifier | ts.KeywordTypeNode | ts.ThisExpression; + [AST_NODE_TYPES.ThrowStatement]: ts.ThrowStatement; + [AST_NODE_TYPES.TryStatement]: ts.TryStatement; + [AST_NODE_TYPES.TSAbstractAccessorProperty]: ts.PropertyDeclaration; + [AST_NODE_TYPES.TSAbstractPropertyDefinition]: ts.PropertyDeclaration; + [AST_NODE_TYPES.TSAbstractMethodDefinition]: ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.TSArrayType]: ts.ArrayTypeNode; + [AST_NODE_TYPES.TSAsExpression]: ts.AsExpression; + [AST_NODE_TYPES.TSCallSignatureDeclaration]: ts.CallSignatureDeclaration; + [AST_NODE_TYPES.TSClassImplements]: ts.ExpressionWithTypeArguments; + [AST_NODE_TYPES.TSConditionalType]: ts.ConditionalTypeNode; + [AST_NODE_TYPES.TSConstructorType]: ts.ConstructorTypeNode; + [AST_NODE_TYPES.TSConstructSignatureDeclaration]: ts.ConstructSignatureDeclaration; + [AST_NODE_TYPES.TSDeclareFunction]: ts.FunctionDeclaration; + [AST_NODE_TYPES.TSEnumDeclaration]: ts.EnumDeclaration; + [AST_NODE_TYPES.TSEnumMember]: ts.EnumMember; + [AST_NODE_TYPES.TSExportAssignment]: ts.ExportAssignment; + [AST_NODE_TYPES.TSExternalModuleReference]: ts.ExternalModuleReference; + [AST_NODE_TYPES.TSFunctionType]: ts.FunctionTypeNode; + [AST_NODE_TYPES.TSImportEqualsDeclaration]: ts.ImportEqualsDeclaration; + [AST_NODE_TYPES.TSImportType]: ts.ImportTypeNode; + [AST_NODE_TYPES.TSIndexedAccessType]: ts.IndexedAccessTypeNode; + [AST_NODE_TYPES.TSIndexSignature]: ts.IndexSignatureDeclaration; + [AST_NODE_TYPES.TSInferType]: ts.InferTypeNode; + [AST_NODE_TYPES.TSInterfaceDeclaration]: ts.InterfaceDeclaration; + [AST_NODE_TYPES.TSInterfaceBody]: ts.InterfaceDeclaration; + [AST_NODE_TYPES.TSInterfaceHeritage]: ts.ExpressionWithTypeArguments; + [AST_NODE_TYPES.TSIntersectionType]: ts.IntersectionTypeNode; + [AST_NODE_TYPES.TSInstantiationExpression]: ts.ExpressionWithTypeArguments; + [AST_NODE_TYPES.TSSatisfiesExpression]: ts.SatisfiesExpression; + [AST_NODE_TYPES.TSLiteralType]: ts.LiteralTypeNode; + [AST_NODE_TYPES.TSMappedType]: ts.MappedTypeNode; + [AST_NODE_TYPES.TSMethodSignature]: ts.GetAccessorDeclaration | ts.MethodSignature | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.TSModuleBlock]: ts.ModuleBlock; + [AST_NODE_TYPES.TSModuleDeclaration]: ts.ModuleDeclaration; + [AST_NODE_TYPES.TSNamedTupleMember]: ts.NamedTupleMember; + [AST_NODE_TYPES.TSNamespaceExportDeclaration]: ts.NamespaceExportDeclaration; + [AST_NODE_TYPES.TSNonNullExpression]: ts.NonNullExpression; + [AST_NODE_TYPES.TSOptionalType]: ts.OptionalTypeNode; + [AST_NODE_TYPES.TSParameterProperty]: ts.ParameterDeclaration; + [AST_NODE_TYPES.TSPropertySignature]: ts.PropertySignature; + [AST_NODE_TYPES.TSQualifiedName]: ts.Identifier | ts.QualifiedName; + [AST_NODE_TYPES.TSRestType]: ts.NamedTupleMember | ts.RestTypeNode; + [AST_NODE_TYPES.TSThisType]: ts.ThisTypeNode; + [AST_NODE_TYPES.TSTupleType]: ts.TupleTypeNode; + [AST_NODE_TYPES.TSTemplateLiteralType]: ts.TemplateLiteralTypeNode; + [AST_NODE_TYPES.TSTypeAliasDeclaration]: ts.TypeAliasDeclaration; + [AST_NODE_TYPES.TSTypeAnnotation]: undefined; + [AST_NODE_TYPES.TSTypeAssertion]: ts.TypeAssertion; + [AST_NODE_TYPES.TSTypeLiteral]: ts.TypeLiteralNode; + [AST_NODE_TYPES.TSTypeOperator]: ts.TypeOperatorNode; + [AST_NODE_TYPES.TSTypeParameter]: ts.TypeParameterDeclaration; + [AST_NODE_TYPES.TSTypeParameterDeclaration]: undefined; + [AST_NODE_TYPES.TSTypeParameterInstantiation]: ts.CallExpression | ts.ExpressionWithTypeArguments | ts.ImportTypeNode | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.NewExpression | ts.TaggedTemplateExpression | ts.TypeQueryNode | ts.TypeReferenceNode; + [AST_NODE_TYPES.TSTypePredicate]: ts.TypePredicateNode; + [AST_NODE_TYPES.TSTypeQuery]: ts.ImportTypeNode | ts.TypeQueryNode; + [AST_NODE_TYPES.TSTypeReference]: ts.TypeReferenceNode; + [AST_NODE_TYPES.TSUnionType]: ts.UnionTypeNode; + [AST_NODE_TYPES.UpdateExpression]: ts.PostfixUnaryExpression | ts.PrefixUnaryExpression; + [AST_NODE_TYPES.UnaryExpression]: ts.DeleteExpression | ts.PostfixUnaryExpression | ts.PrefixUnaryExpression | ts.TypeOfExpression | ts.VoidExpression; + [AST_NODE_TYPES.VariableDeclaration]: ts.VariableDeclarationList | ts.VariableStatement; + [AST_NODE_TYPES.VariableDeclarator]: ts.VariableDeclaration; + [AST_NODE_TYPES.WhileStatement]: ts.WhileStatement; + [AST_NODE_TYPES.WithStatement]: ts.WithStatement; + [AST_NODE_TYPES.YieldExpression]: ts.YieldExpression; + [AST_NODE_TYPES.TSEmptyBodyFunctionExpression]: ts.ConstructorDeclaration | ts.FunctionExpression | ts.GetAccessorDeclaration | ts.MethodDeclaration | ts.SetAccessorDeclaration; + [AST_NODE_TYPES.TSAbstractKeyword]: ts.Token; + [AST_NODE_TYPES.TSNullKeyword]: ts.KeywordTypeNode | ts.NullLiteral; + [AST_NODE_TYPES.TSAnyKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSBigIntKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSBooleanKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSIntrinsicKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSNeverKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSNumberKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSObjectKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSStringKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSSymbolKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSUnknownKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSVoidKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSUndefinedKeyword]: ts.KeywordTypeNode; + [AST_NODE_TYPES.TSAsyncKeyword]: ts.Token; + [AST_NODE_TYPES.TSDeclareKeyword]: ts.Token; + [AST_NODE_TYPES.TSExportKeyword]: ts.Token; + [AST_NODE_TYPES.TSStaticKeyword]: ts.Token; + [AST_NODE_TYPES.TSPublicKeyword]: ts.Token; + [AST_NODE_TYPES.TSPrivateKeyword]: ts.Token; + [AST_NODE_TYPES.TSProtectedKeyword]: ts.Token; + [AST_NODE_TYPES.TSReadonlyKeyword]: ts.Token; +} +/** + * Maps TSESTree AST Node type to the expected TypeScript AST Node type(s). + * This mapping is based on the internal logic of the parser. + */ +export type TSESTreeToTSNode = Extract | TSNode, EstreeToTsNodeTypes[T['type']]>; +//# sourceMappingURL=estree-to-ts-node-types.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map new file mode 100644 index 0000000000..60eb2c8a32 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"estree-to-ts-node-types.d.ts","sourceRoot":"","sources":["../../src/ts-estree/estree-to-ts-node-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,WAAW,mBAAmB;IAClC,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC;IAC1D,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,sBAAsB,CAAC;IAC5D,CAAC,cAAc,CAAC,YAAY,CAA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E,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACxE,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACxE,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IAC1E,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9E,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;CAC7E;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,OAAO,CAC7E,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,MAAM,EAEzE,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAC/B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js new file mode 100644 index 0000000000..e92a96f286 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=estree-to-ts-node-types.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js.map new file mode 100644 index 0000000000..a9cfa15f26 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"estree-to-ts-node-types.js","sourceRoot":"","sources":["../../src/ts-estree/estree-to-ts-node-types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts new file mode 100644 index 0000000000..37f26a3959 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts @@ -0,0 +1,4 @@ +export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types'; +export * from './ts-nodes'; +export * from './estree-to-ts-node-types'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts.map new file mode 100644 index 0000000000..6a839dc66d --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ts-estree/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,eAAe,EACf,QAAQ,GACT,MAAM,0BAA0B,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js new file mode 100644 index 0000000000..6d010024b5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js @@ -0,0 +1,25 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TSESTree = exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0; +// for simplicity and backwards-compatibility +var types_1 = require("@typescript-eslint/types"); +Object.defineProperty(exports, "AST_NODE_TYPES", { enumerable: true, get: function () { return types_1.AST_NODE_TYPES; } }); +Object.defineProperty(exports, "AST_TOKEN_TYPES", { enumerable: true, get: function () { return types_1.AST_TOKEN_TYPES; } }); +Object.defineProperty(exports, "TSESTree", { enumerable: true, get: function () { return types_1.TSESTree; } }); +__exportStar(require("./ts-nodes"), exports); +__exportStar(require("./estree-to-ts-node-types"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js.map new file mode 100644 index 0000000000..fc698263ac --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ts-estree/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,kDAIkC;AAHhC,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,iGAAA,QAAQ,OAAA;AAEV,6CAA2B;AAC3B,4DAA0C"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts new file mode 100644 index 0000000000..e865902f3b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts @@ -0,0 +1,14 @@ +import type * as ts from 'typescript'; +declare module 'typescript' { + interface AssertClause extends ts.Node { + } + interface AssertEntry extends ts.Node { + } + interface SatisfiesExpression extends ts.Node { + } + interface JsxNamespacedName extends ts.Node { + } +} +export type TSToken = ts.Token; +export type TSNode = ts.AssertClause | ts.AssertEntry | ts.Modifier | ts.Identifier | ts.PrivateIdentifier | ts.QualifiedName | ts.ComputedPropertyName | ts.Decorator | ts.TypeParameterDeclaration | ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration | ts.VariableDeclaration | ts.VariableDeclarationList | ts.ParameterDeclaration | ts.BindingElement | ts.PropertySignature | ts.PropertyDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment | ts.ObjectBindingPattern | ts.ArrayBindingPattern | ts.FunctionDeclaration | ts.MethodSignature | ts.MethodDeclaration | ts.ConstructorDeclaration | ts.SemicolonClassElement | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.IndexSignatureDeclaration | ts.KeywordTypeNode | ts.ImportTypeNode | ts.ThisTypeNode | ts.ClassStaticBlockDeclaration | ts.ConstructorTypeNode | ts.FunctionTypeNode | ts.TypeReferenceNode | ts.TypePredicateNode | ts.TypeQueryNode | ts.TypeLiteralNode | ts.ArrayTypeNode | ts.NamedTupleMember | ts.TupleTypeNode | ts.OptionalTypeNode | ts.RestTypeNode | ts.UnionTypeNode | ts.IntersectionTypeNode | ts.ConditionalTypeNode | ts.InferTypeNode | ts.ParenthesizedTypeNode | ts.TypeOperatorNode | ts.IndexedAccessTypeNode | ts.MappedTypeNode | ts.LiteralTypeNode | ts.StringLiteral | ts.OmittedExpression | ts.PartiallyEmittedExpression | ts.PrefixUnaryExpression | ts.PostfixUnaryExpression | ts.NullLiteral | ts.BooleanLiteral | ts.ThisExpression | ts.SuperExpression | ts.ImportExpression | ts.DeleteExpression | ts.TypeOfExpression | ts.VoidExpression | ts.AwaitExpression | ts.YieldExpression | ts.SyntheticExpression | ts.BinaryExpression | ts.ConditionalExpression | ts.FunctionExpression | ts.ArrowFunction | ts.RegularExpressionLiteral | ts.NoSubstitutionTemplateLiteral | ts.NumericLiteral | ts.BigIntLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail | ts.TemplateExpression | ts.TemplateSpan | ts.ParenthesizedExpression | ts.ArrayLiteralExpression | ts.SpreadElement | ts.ObjectLiteralExpression | ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.CallExpression | ts.ExpressionWithTypeArguments | ts.NewExpression | ts.TaggedTemplateExpression | ts.AsExpression | ts.TypeAssertion | ts.NonNullExpression | ts.MetaProperty | ts.JsxElement | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.JsxFragment | ts.JsxOpeningFragment | ts.JsxClosingFragment | ts.JsxAttribute | ts.JsxSpreadAttribute | ts.JsxClosingElement | ts.JsxExpression | ts.JsxNamespacedName | ts.JsxText | ts.NotEmittedStatement | ts.CommaListExpression | ts.EmptyStatement | ts.DebuggerStatement | ts.MissingDeclaration | ts.Block | ts.VariableStatement | ts.ExpressionStatement | ts.IfStatement | ts.DoStatement | ts.WhileStatement | ts.ForStatement | ts.ForInStatement | ts.ForOfStatement | ts.BreakStatement | ts.ContinueStatement | ts.ReturnStatement | ts.WithStatement | ts.SwitchStatement | ts.CaseBlock | ts.CaseClause | ts.DefaultClause | ts.LabeledStatement | ts.ThrowStatement | ts.TryStatement | ts.CatchClause | ts.ClassDeclaration | ts.ClassExpression | ts.InterfaceDeclaration | ts.HeritageClause | ts.TypeAliasDeclaration | ts.EnumMember | ts.EnumDeclaration | ts.ModuleDeclaration | ts.ModuleBlock | ts.ImportEqualsDeclaration | ts.ExternalModuleReference | ts.ImportDeclaration | ts.ImportClause | ts.NamespaceImport | ts.NamespaceExportDeclaration | ts.ExportDeclaration | ts.NamedImports | ts.NamedExports | ts.ImportSpecifier | ts.ExportSpecifier | ts.ExportAssignment | ts.SourceFile | ts.Bundle | ts.InputFiles | ts.UnparsedSource | ts.JsonMinusNumericLiteral | ts.TemplateLiteralTypeNode | ts.SatisfiesExpression | ts.JSDoc | ts.JSDocTypeExpression | ts.JSDocUnknownTag | ts.JSDocAugmentsTag | ts.JSDocClassTag | ts.JSDocEnumTag | ts.JSDocThisTag | ts.JSDocTemplateTag | ts.JSDocReturnTag | ts.JSDocTypeTag | ts.JSDocTypedefTag | ts.JSDocCallbackTag | ts.JSDocSignature | ts.JSDocPropertyTag | ts.JSDocParameterTag | ts.JSDocTypeLiteral | ts.JSDocFunctionType | ts.JSDocAllType | ts.JSDocUnknownType | ts.JSDocNullableType | ts.JSDocNonNullableType | ts.JSDocOptionalType | ts.JSDocVariadicType | ts.JSDocAuthorTag; +//# sourceMappingURL=ts-nodes.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts.map new file mode 100644 index 0000000000..edcc6c2688 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts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AgB,GACnB,EAAE,CAAC,cAAc,GACjB,EAAE,CAAC,gBAAgB,GACnB,EAAE,CAAC,iBAAiB,GACpB,EAAE,CAAC,gBAAgB,GACnB,EAAE,CAAC,iBAAiB,GACpB,EAAE,CAAC,YAAY,GACf,EAAE,CAAC,gBAAgB,GACnB,EAAE,CAAC,iBAAiB,GACpB,EAAE,CAAC,oBAAoB,GACvB,EAAE,CAAC,iBAAiB,GACpB,EAAE,CAAC,iBAAiB,GACpB,EAAE,CAAC,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js new file mode 100644 index 0000000000..ba99b5f136 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=ts-nodes.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js.map new file mode 100644 index 0000000000..a4fa02c491 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ts-nodes.js","sourceRoot":"","sources":["../../src/ts-estree/ts-nodes.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts new file mode 100644 index 0000000000..c8e90daf6a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts @@ -0,0 +1,7 @@ +export * from './create-program/getScriptKind'; +export * from './ast-converter'; +export type { ParseSettings } from './parseSettings'; +export * from './getModifiers'; +export { typescriptVersionIsAtLeast } from './version-check'; +export { getCanonicalFileName } from './create-program/shared'; +//# sourceMappingURL=use-at-your-own-risk.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts.map new file mode 100644 index 0000000000..2e545be7e2 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"use-at-your-own-risk.d.ts","sourceRoot":"","sources":["../src/use-at-your-own-risk.ts"],"names":[],"mappings":"AACA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js new file mode 100644 index 0000000000..69469f4870 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js @@ -0,0 +1,28 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCanonicalFileName = exports.typescriptVersionIsAtLeast = void 0; +// required by website +__exportStar(require("./create-program/getScriptKind"), exports); +__exportStar(require("./ast-converter"), exports); +// required by packages/utils/src/ts-estree.ts +__exportStar(require("./getModifiers"), exports); +var version_check_1 = require("./version-check"); +Object.defineProperty(exports, "typescriptVersionIsAtLeast", { enumerable: true, get: function () { return version_check_1.typescriptVersionIsAtLeast; } }); +// required by packages/type-utils +var shared_1 = require("./create-program/shared"); +Object.defineProperty(exports, "getCanonicalFileName", { enumerable: true, get: function () { return shared_1.getCanonicalFileName; } }); +//# sourceMappingURL=use-at-your-own-risk.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js.map new file mode 100644 index 0000000000..8239312a49 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/use-at-your-own-risk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"use-at-your-own-risk.js","sourceRoot":"","sources":["../src/use-at-your-own-risk.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sBAAsB;AACtB,iEAA+C;AAC/C,kDAAgC;AAGhC,8CAA8C;AAC9C,iDAA+B;AAC/B,iDAA6D;AAApD,2HAAA,0BAA0B,OAAA;AAEnC,kCAAkC;AAClC,kDAA+D;AAAtD,8GAAA,oBAAoB,OAAA"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts new file mode 100644 index 0000000000..6a19655bb5 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts @@ -0,0 +1,5 @@ +import type { server } from 'typescript/lib/tsserverlibrary'; +import { type ASTAndDefiniteProgram } from './create-program/shared'; +import type { MutableParseSettings } from './parseSettings'; +export declare function useProgramFromProjectService(projectService: server.ProjectService, parseSettings: Readonly): ASTAndDefiniteProgram | undefined; +//# sourceMappingURL=useProgramFromProjectService.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts.map new file mode 100644 index 0000000000..e496aed82c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useProgramFromProjectService.d.ts","sourceRoot":"","sources":["../src/useProgramFromProjectService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAG7D,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,MAAM,CAAC,cAAc,EACrC,aAAa,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAC5C,qBAAqB,GAAG,SAAS,CA4BnC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js new file mode 100644 index 0000000000..94bff4011c --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js @@ -0,0 +1,31 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.useProgramFromProjectService = void 0; +const path_1 = __importDefault(require("path")); +const createProjectProgram_1 = require("./create-program/createProjectProgram"); +function useProgramFromProjectService(projectService, parseSettings) { + const opened = projectService.openClientFile(absolutify(parseSettings.filePath), parseSettings.codeFullText, + /* scriptKind */ undefined, parseSettings.tsconfigRootDir); + if (!opened.configFileName) { + return undefined; + } + const scriptInfo = projectService.getScriptInfo(parseSettings.filePath); + const program = projectService + .getDefaultProjectForFile(scriptInfo.fileName, true) + .getLanguageService(/*ensureSynchronized*/ true) + .getProgram(); + if (!program) { + return undefined; + } + return (0, createProjectProgram_1.createProjectProgram)(parseSettings, [program]); + function absolutify(filePath) { + return path_1.default.isAbsolute(filePath) + ? filePath + : path_1.default.join(projectService.host.getCurrentDirectory(), filePath); + } +} +exports.useProgramFromProjectService = useProgramFromProjectService; +//# sourceMappingURL=useProgramFromProjectService.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js.map new file mode 100644 index 0000000000..cf65140f19 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/useProgramFromProjectService.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useProgramFromProjectService.js","sourceRoot":"","sources":["../src/useProgramFromProjectService.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAIxB,gFAA6E;AAI7E,SAAgB,4BAA4B,CAC1C,cAAqC,EACrC,aAA6C;IAE7C,MAAM,MAAM,GAAG,cAAc,CAAC,cAAc,CAC1C,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,EAClC,aAAa,CAAC,YAAY;IAC1B,gBAAgB,CAAC,SAAS,EAC1B,aAAa,CAAC,eAAe,CAC9B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;QAC1B,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,UAAU,GAAG,cAAc,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACxE,MAAM,OAAO,GAAG,cAAc;SAC3B,wBAAwB,CAAC,UAAW,CAAC,QAAQ,EAAE,IAAI,CAAE;SACrD,kBAAkB,CAAC,sBAAsB,CAAC,IAAI,CAAC;SAC/C,UAAU,EAAE,CAAC;IAEhB,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,IAAA,2CAAoB,EAAC,aAAa,EAAE,CAAC,OAAqB,CAAC,CAAC,CAAC;IAEpE,SAAS,UAAU,CAAC,QAAgB;QAClC,OAAO,cAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC9B,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,cAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AA/BD,oEA+BC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts new file mode 100644 index 0000000000..9d6c6196b9 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts @@ -0,0 +1,3 @@ +declare const typescriptVersionIsAtLeast: Record<"4.3" | "4.4" | "4.5" | "4.6" | "4.7" | "4.8" | "4.9" | "5.0" | "5.1" | "5.2", boolean>; +export { typescriptVersionIsAtLeast }; +//# sourceMappingURL=version-check.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map new file mode 100644 index 0000000000..945a23a973 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"version-check.d.ts","sourceRoot":"","sources":["../src/version-check.ts"],"names":[],"mappings":"AA2BA,QAAA,MAAM,0BAA0B,gGAAkC,CAAC;AAKnE,OAAO,EAAE,0BAA0B,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js new file mode 100644 index 0000000000..60c00c064a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js @@ -0,0 +1,51 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.typescriptVersionIsAtLeast = void 0; +const semver = __importStar(require("semver")); +const ts = __importStar(require("typescript")); +function semverCheck(version) { + return semver.satisfies(ts.version, `>= ${version}.0 || >= ${version}.1-rc || >= ${version}.0-beta`, { + includePrerelease: true, + }); +} +const versions = [ + '4.3', + '4.4', + '4.5', + '4.6', + '4.7', + '4.8', + '4.9', + '5.0', + '5.1', + '5.2', +]; +const typescriptVersionIsAtLeast = {}; +exports.typescriptVersionIsAtLeast = typescriptVersionIsAtLeast; +for (const version of versions) { + typescriptVersionIsAtLeast[version] = semverCheck(version); +} +//# sourceMappingURL=version-check.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js.map new file mode 100644 index 0000000000..cf98807873 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version-check.js","sourceRoot":"","sources":["../src/version-check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,+CAAiC;AAEjC,SAAS,WAAW,CAAC,OAAe;IAClC,OAAO,MAAM,CAAC,SAAS,CACrB,EAAE,CAAC,OAAO,EACV,MAAM,OAAO,YAAY,OAAO,eAAe,OAAO,SAAS,EAC/D;QACE,iBAAiB,EAAE,IAAI;KACxB,CACF,CAAC;AACJ,CAAC;AAED,MAAM,QAAQ,GAAG;IACf,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;CACG,CAAC;AAGX,MAAM,0BAA0B,GAAG,EAA+B,CAAC;AAK1D,gEAA0B;AAJnC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;IAC9B,0BAA0B,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CAC5D"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/package.json b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/package.json new file mode 100644 index 0000000000..85e95e19e3 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree/package.json @@ -0,0 +1,92 @@ +{ + "name": "@typescript-eslint/typescript-estree", + "version": "6.6.0", + "description": "A parser that converts TypeScript source code into an ESTree compatible form", + "files": [ + "dist", + "_ts4.3", + "README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json", + "./use-at-your-own-risk": { + "types": "./dist/use-at-your-own-risk.d.ts", + "default": "./dist/use-at-your-own-risk.js" + } + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/typescript-estree" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "license": "BSD-2-Clause", + "keywords": [ + "ast", + "estree", + "ecmascript", + "javascript", + "typescript", + "parser", + "syntax" + ], + "scripts": { + "build": "tsc -b tsconfig.build.json", + "postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3", + "clean": "tsc -b tsconfig.build.json --clean", + "postclean": "rimraf dist && rimraf _ts4.3 && rimraf coverage", + "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", + "lint": "nx lint", + "test": "jest --coverage --runInBand --verbose", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "dependencies": { + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "devDependencies": { + "@babel/code-frame": "*", + "@babel/parser": "*", + "glob": "*", + "jest": "29.6.4", + "jest-specific-snapshot": "^8.0.0", + "make-dir": "*", + "prettier": "^2.8.4", + "rimraf": "*", + "tmp": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "typesVersions": { + "<4.7": { + "*": [ + "_ts4.3/*" + ] + } + }, + "gitHead": "a3a39321296f74caa9d18577491a86119b450c18" +} diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/LICENSE b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/LICENSE new file mode 100644 index 0000000000..a1164108d4 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 typescript-eslint and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/README.md b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/README.md new file mode 100644 index 0000000000..1745172a6f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/README.md @@ -0,0 +1,10 @@ +# `@typescript-eslint/visitor-keys` + +> Visitor keys used to help traverse the TypeScript-ESTree AST. + +## ✋ Internal Package + +This is an _internal package_ to the [typescript-eslint monorepo](https://github.com/typescript-eslint/typescript-eslint). +You likely don't want to use it directly. + +👉 See **https://typescript-eslint.io** for docs on typescript-eslint. diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts new file mode 100644 index 0000000000..344a7c4259 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts @@ -0,0 +1,4 @@ +import type { TSESTree } from '@typescript-eslint/types'; +declare const getKeys: (node: TSESTree.Node) => readonly string[]; +export { getKeys }; +//# sourceMappingURL=get-keys.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts.map new file mode 100644 index 0000000000..69e629d3d1 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"get-keys.d.ts","sourceRoot":"","sources":["../src/get-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,QAAA,MAAM,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,KAAK,SAAS,MAAM,EAAoB,CAAC;AAE5E,OAAO,EAAE,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js new file mode 100644 index 0000000000..309b72b959 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getKeys = void 0; +const eslint_visitor_keys_1 = require("eslint-visitor-keys"); +const getKeys = eslint_visitor_keys_1.getKeys; +exports.getKeys = getKeys; +//# sourceMappingURL=get-keys.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js.map new file mode 100644 index 0000000000..153ab38c5f --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/get-keys.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-keys.js","sourceRoot":"","sources":["../src/get-keys.ts"],"names":[],"mappings":";;;AACA,6DAAiE;AAEjE,MAAM,OAAO,GAA+C,6BAAe,CAAC;AAEnE,0BAAO"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts new file mode 100644 index 0000000000..895ff52b8a --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts @@ -0,0 +1,3 @@ +export { getKeys } from './get-keys'; +export { visitorKeys, VisitorKeys } from './visitor-keys'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts.map new file mode 100644 index 0000000000..393a70678b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.js new file mode 100644 index 0000000000..a5b4b62aec --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.visitorKeys = exports.getKeys = void 0; +var get_keys_1 = require("./get-keys"); +Object.defineProperty(exports, "getKeys", { enumerable: true, get: function () { return get_keys_1.getKeys; } }); +var visitor_keys_1 = require("./visitor-keys"); +Object.defineProperty(exports, "visitorKeys", { enumerable: true, get: function () { return visitor_keys_1.visitorKeys; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.js.map new file mode 100644 index 0000000000..5f74496fae --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,+CAA0D;AAAjD,2GAAA,WAAW,OAAA"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts new file mode 100644 index 0000000000..d37b01f594 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts @@ -0,0 +1,4 @@ +type VisitorKeys = Record; +declare const visitorKeys: VisitorKeys; +export { visitorKeys, VisitorKeys }; +//# sourceMappingURL=visitor-keys.d.ts.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map new file mode 100644 index 0000000000..df9b9e93ed --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor-keys.d.ts","sourceRoot":"","sources":["../src/visitor-keys.ts"],"names":[],"mappings":"AAGA,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AAgRjE,QAAA,MAAM,WAAW,EAAE,WAAyD,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js new file mode 100644 index 0000000000..d67758e163 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js @@ -0,0 +1,190 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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 (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.visitorKeys = void 0; +const eslintVisitorKeys = __importStar(require("eslint-visitor-keys")); +/* + ********************************** IMPORTANT NOTE ******************************** + * * + * The key arrays should be sorted in the order in which you would want to visit * + * the child keys. * + * * + * DO NOT SORT THEM ALPHABETICALLY! * + * * + * They should be sorted in the order that they appear in the source code. * + * For example: * + * * + * class Foo extends Bar { prop: 1 } * + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ClassDeclaration * + * ^^^ id ^^^ superClass * + * ^^^^^^^^^^^ body * + * * + * It would be incorrect to provide the visitor keys ['body', 'id', 'superClass'] * + * because the body comes AFTER everything else in the source code. * + * Instead the correct ordering would be ['id', 'superClass', 'body']. * + * * + ********************************************************************************** + */ +const SharedVisitorKeys = (() => { + const FunctionType = ['typeParameters', 'params', 'returnType']; + const AnonymousFunction = [...FunctionType, 'body']; + const AbstractPropertyDefinition = [ + 'decorators', + 'key', + 'typeAnnotation', + ]; + return { + AnonymousFunction, + Function: ['id', ...AnonymousFunction], + FunctionType, + ClassDeclaration: [ + 'decorators', + 'id', + 'typeParameters', + 'superClass', + 'superTypeArguments', + 'implements', + 'body', + ], + AbstractPropertyDefinition: ['decorators', 'key', 'typeAnnotation'], + PropertyDefinition: [...AbstractPropertyDefinition, 'value'], + TypeAssertion: ['expression', 'typeAnnotation'], + }; +})(); +const additionalKeys = { + AccessorProperty: SharedVisitorKeys.PropertyDefinition, + ArrayPattern: ['decorators', 'elements', 'typeAnnotation'], + ArrowFunctionExpression: SharedVisitorKeys.AnonymousFunction, + AssignmentPattern: ['decorators', 'left', 'right', 'typeAnnotation'], + CallExpression: ['callee', 'typeArguments', 'arguments'], + ClassDeclaration: SharedVisitorKeys.ClassDeclaration, + ClassExpression: SharedVisitorKeys.ClassDeclaration, + Decorator: ['expression'], + ExportAllDeclaration: ['exported', 'source', 'assertions'], + ExportNamedDeclaration: ['declaration', 'specifiers', 'source', 'assertions'], + FunctionDeclaration: SharedVisitorKeys.Function, + FunctionExpression: SharedVisitorKeys.Function, + Identifier: ['decorators', 'typeAnnotation'], + ImportAttribute: ['key', 'value'], + ImportDeclaration: ['specifiers', 'source', 'assertions'], + ImportExpression: ['source', 'attributes'], + JSXClosingFragment: [], + JSXOpeningElement: ['name', 'typeArguments', 'attributes'], + JSXOpeningFragment: [], + JSXSpreadChild: ['expression'], + MethodDefinition: ['decorators', 'key', 'value'], + NewExpression: ['callee', 'typeArguments', 'arguments'], + ObjectPattern: ['decorators', 'properties', 'typeAnnotation'], + PropertyDefinition: SharedVisitorKeys.PropertyDefinition, + RestElement: ['decorators', 'argument', 'typeAnnotation'], + StaticBlock: ['body'], + TaggedTemplateExpression: ['tag', 'typeArguments', 'quasi'], + TSAbstractAccessorProperty: SharedVisitorKeys.AbstractPropertyDefinition, + TSAbstractKeyword: [], + TSAbstractMethodDefinition: ['key', 'value'], + TSAbstractPropertyDefinition: SharedVisitorKeys.AbstractPropertyDefinition, + TSAnyKeyword: [], + TSArrayType: ['elementType'], + TSAsExpression: SharedVisitorKeys.TypeAssertion, + TSAsyncKeyword: [], + TSBigIntKeyword: [], + TSBooleanKeyword: [], + TSCallSignatureDeclaration: SharedVisitorKeys.FunctionType, + TSClassImplements: ['expression', 'typeArguments'], + TSConditionalType: ['checkType', 'extendsType', 'trueType', 'falseType'], + TSConstructorType: SharedVisitorKeys.FunctionType, + TSConstructSignatureDeclaration: SharedVisitorKeys.FunctionType, + TSDeclareFunction: SharedVisitorKeys.Function, + TSDeclareKeyword: [], + TSEmptyBodyFunctionExpression: ['id', ...SharedVisitorKeys.FunctionType], + TSEnumDeclaration: ['id', 'members'], + TSEnumMember: ['id', 'initializer'], + TSExportAssignment: ['expression'], + TSExportKeyword: [], + TSExternalModuleReference: ['expression'], + TSFunctionType: SharedVisitorKeys.FunctionType, + TSImportEqualsDeclaration: ['id', 'moduleReference'], + TSImportType: ['argument', 'qualifier', 'typeArguments'], + TSIndexedAccessType: ['indexType', 'objectType'], + TSIndexSignature: ['parameters', 'typeAnnotation'], + TSInferType: ['typeParameter'], + TSInstantiationExpression: ['expression', 'typeArguments'], + TSInterfaceBody: ['body'], + TSInterfaceDeclaration: ['id', 'typeParameters', 'extends', 'body'], + TSInterfaceHeritage: ['expression', 'typeArguments'], + TSIntersectionType: ['types'], + TSIntrinsicKeyword: [], + TSLiteralType: ['literal'], + TSMappedType: ['nameType', 'typeParameter', 'typeAnnotation'], + TSMethodSignature: ['typeParameters', 'key', 'params', 'returnType'], + TSModuleBlock: ['body'], + TSModuleDeclaration: ['id', 'body'], + TSNamedTupleMember: ['label', 'elementType'], + TSNamespaceExportDeclaration: ['id'], + TSNeverKeyword: [], + TSNonNullExpression: ['expression'], + TSNullKeyword: [], + TSNumberKeyword: [], + TSObjectKeyword: [], + TSOptionalType: ['typeAnnotation'], + TSParameterProperty: ['decorators', 'parameter'], + TSPrivateKeyword: [], + TSPropertySignature: ['typeAnnotation', 'key'], + TSProtectedKeyword: [], + TSPublicKeyword: [], + TSQualifiedName: ['left', 'right'], + TSReadonlyKeyword: [], + TSRestType: ['typeAnnotation'], + TSSatisfiesExpression: [ + // this is intentionally different to SharedVisitorKeys.TypeAssertion because + // the type annotation comes first in the source code + 'typeAnnotation', + 'expression', + ], + TSStaticKeyword: [], + TSStringKeyword: [], + TSSymbolKeyword: [], + TSTemplateLiteralType: ['quasis', 'types'], + TSThisType: [], + TSTupleType: ['elementTypes'], + TSTypeAliasDeclaration: ['id', 'typeParameters', 'typeAnnotation'], + TSTypeAnnotation: ['typeAnnotation'], + TSTypeAssertion: SharedVisitorKeys.TypeAssertion, + TSTypeLiteral: ['members'], + TSTypeOperator: ['typeAnnotation'], + TSTypeParameter: ['name', 'constraint', 'default'], + TSTypeParameterDeclaration: ['params'], + TSTypeParameterInstantiation: ['params'], + TSTypePredicate: ['typeAnnotation', 'parameterName'], + TSTypeQuery: ['exprName', 'typeArguments'], + TSTypeReference: ['typeName', 'typeArguments'], + TSUndefinedKeyword: [], + TSUnionType: ['types'], + TSUnknownKeyword: [], + TSVoidKeyword: [], +}; +const visitorKeys = eslintVisitorKeys.unionWith(additionalKeys); +exports.visitorKeys = visitorKeys; +//# sourceMappingURL=visitor-keys.js.map \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map new file mode 100644 index 0000000000..41932f063b --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map @@ -0,0 +1 @@ +{"version":3,"file":"visitor-keys.js","sourceRoot":"","sources":["../src/visitor-keys.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uEAAyD;AA4GzD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE;IAC9B,MAAM,YAAY,GAAG,CAAC,gBAAgB,EAAE,QAAQ,EAAE,YAAY,CAAU,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tC,4BAA4B,EAAE,CAAC,QAAQ,CAAC;IACxC,eAAe,EAAE,CAAC,gBAAgB,EAAE,eAAe,CAAC;IACpD,WAAW,EAAE,CAAC,UAAU,EAAE,eAAe,CAAC;IAC1C,eAAe,EAAE,CAAC,UAAU,EAAE,eAAe,CAAC;IAC9C,kBAAkB,EAAE,EAAE;IACtB,WAAW,EAAE,CAAC,OAAO,CAAC;IACtB,gBAAgB,EAAE,EAAE;IACpB,aAAa,EAAE,EAAE;CAClB,CAAC;AAEF,MAAM,WAAW,GAAgB,iBAAiB,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;AAEpE,kCAAW"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/package.json b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/package.json new file mode 100644 index 0000000000..52b5c81694 --- /dev/null +++ b/node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys/package.json @@ -0,0 +1,71 @@ +{ + "name": "@typescript-eslint/visitor-keys", + "version": "6.6.0", + "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", + "files": [ + "dist", + "_ts4.3", + "package.json", + "README.md", + "LICENSE" + ], + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/typescript-eslint/typescript-eslint.git", + "directory": "packages/visitor-keys" + }, + "bugs": { + "url": "https://github.com/typescript-eslint/typescript-eslint/issues" + }, + "license": "MIT", + "keywords": [ + "eslint", + "typescript", + "estree" + ], + "scripts": { + "build": "tsc -b tsconfig.build.json", + "postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3", + "clean": "tsc -b tsconfig.build.json --clean", + "postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", + "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", + "lint": "nx lint", + "test": "jest --coverage", + "typecheck": "tsc -p tsconfig.json --noEmit" + }, + "dependencies": { + "@typescript-eslint/types": "6.6.0", + "eslint-visitor-keys": "^3.4.1" + }, + "devDependencies": { + "@types/eslint-visitor-keys": "*", + "downlevel-dts": "*", + "jest": "29.6.4", + "prettier": "^2.8.4", + "rimraf": "*", + "typescript": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "typesVersions": { + "<4.7": { + "*": [ + "_ts4.3/*" + ] + } + }, + "gitHead": "a3a39321296f74caa9d18577491a86119b450c18" +} diff --git a/node_modules/@typescript-eslint/parser/package.json b/node_modules/@typescript-eslint/parser/package.json index e1e0c41c48..c999a2643e 100644 --- a/node_modules/@typescript-eslint/parser/package.json +++ b/node_modules/@typescript-eslint/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "6.4.1", + "version": "6.6.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -51,17 +51,17 @@ "eslint": "^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "6.4.1", - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/typescript-estree": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4" }, "devDependencies": { "@types/glob": "*", "downlevel-dts": "*", "glob": "*", - "jest": "29.6.2", + "jest": "29.6.4", "prettier": "^2.8.4", "rimraf": "*", "typescript": "*" @@ -82,5 +82,5 @@ ] } }, - "gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59" + "gitHead": "a3a39321296f74caa9d18577491a86119b450c18" } diff --git a/node_modules/@typescript-eslint/scope-manager/package.json b/node_modules/@typescript-eslint/scope-manager/package.json index 9b8a23a311..e681607343 100644 --- a/node_modules/@typescript-eslint/scope-manager/package.json +++ b/node_modules/@typescript-eslint/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "6.4.1", + "version": "6.5.0", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -44,12 +44,12 @@ "typecheck": "nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1" + "@typescript-eslint/types": "6.5.0", + "@typescript-eslint/visitor-keys": "6.5.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "6.4.1", + "@typescript-eslint/typescript-estree": "6.5.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", @@ -69,5 +69,5 @@ ] } }, - "gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59" + "gitHead": "4f34d0ba34474926ba1eed623704b583a037f886" } diff --git a/node_modules/@typescript-eslint/type-utils/package.json b/node_modules/@typescript-eslint/type-utils/package.json index 6d8e9848a3..c9d34eccb0 100644 --- a/node_modules/@typescript-eslint/type-utils/package.json +++ b/node_modules/@typescript-eslint/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "6.4.1", + "version": "6.5.0", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -45,13 +45,13 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "6.4.1", - "@typescript-eslint/utils": "6.4.1", + "@typescript-eslint/typescript-estree": "6.5.0", + "@typescript-eslint/utils": "6.5.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "devDependencies": { - "@typescript-eslint/parser": "6.4.1", + "@typescript-eslint/parser": "6.5.0", "ajv": "^6.10.0", "downlevel-dts": "*", "jest": "29.6.2", @@ -78,5 +78,5 @@ ] } }, - "gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59" + "gitHead": "4f34d0ba34474926ba1eed623704b583a037f886" } diff --git a/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts b/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts index 8a966f536c..5c0aab2024 100644 --- a/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +++ b/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts @@ -562,16 +562,17 @@ export declare interface ExpressionStatement extends BaseNode { expression: Expression; directive: string | undefined; } -export declare type ForInitialiser = Expression | VariableDeclaration; +export declare type ForInitialiser = Expression | LetOrConstOrVarDeclaration; export declare interface ForInStatement extends BaseNode { type: AST_NODE_TYPES.ForInStatement; left: ForInitialiser; right: Expression; body: Statement; } +declare type ForOfInitialiser = Expression | LetOrConstOrVarDeclaration | UsingInForOfDeclaration; export declare interface ForOfStatement extends BaseNode { type: AST_NODE_TYPES.ForOfStatement; - left: ForInitialiser; + left: ForOfInitialiser; right: Expression; body: Statement; await: boolean; @@ -826,6 +827,40 @@ export declare interface LabeledStatement extends BaseNode { body: Statement; } export declare type LeftHandSideExpression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | CallExpression | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | LiteralExpression | MemberExpression | MetaProperty | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | ThisExpression | TSAsExpression | TSNonNullExpression | TSTypeAssertion; +export declare interface LetOrConstOrVarDeclaration extends BaseNode { + type: AST_NODE_TYPES.VariableDeclaration; + /** + * The variables declared by this declaration. + * Note that there may be 0 declarations (i.e. `const;`). + * ``` + * let x; + * let y, z; + * ``` + */ + declarations: LetOrConstOrVarDeclarator[]; + /** + * Whether the declaration is `declare`d + * ``` + * declare const x = 1; + * ``` + */ + declare: boolean; + /** + * The keyword used to declare the variable(s) + * ``` + * const x = 1; + * let y = 2; + * var z = 3; + * ``` + */ + kind: 'const' | 'let' | 'var'; +} +export declare interface LetOrConstOrVarDeclarator extends BaseNode { + type: AST_NODE_TYPES.VariableDeclarator; + id: BindingName; + init: Expression | null; + definite: boolean; +} export declare interface LineComment extends BaseToken { type: AST_TOKEN_TYPES.Line; } @@ -1761,41 +1796,72 @@ export declare interface UpdateExpression extends UnaryExpressionBase { type: AST_NODE_TYPES.UpdateExpression; operator: '--' | '++'; } -declare type ValueOf = T[keyof T]; -export declare interface VariableDeclaration extends BaseNode { +export declare type UsingDeclaration = UsingInForOfDeclaration | UsingInNomalConextDeclaration; +export declare type UsingDeclarator = UsingInForOfDeclarator | UsingInNomalConextDeclarator; +export declare interface UsingInForOfDeclaration extends BaseNode { type: AST_NODE_TYPES.VariableDeclaration; /** * The variables declared by this declaration. * Note that there may be 0 declarations (i.e. `const;`). * ``` - * let x; - * let y, z; + * for(using x of y){} * ``` */ - declarations: VariableDeclarator[]; + declarations: UsingInForOfDeclarator[]; /** - * Whether the declaration is `declare`d + * This value will always be `false` + * because 'declare' modifier cannot appear on a 'using' declaration. + */ + declare: false; + /** + * The keyword used to declare the variable(s) * ``` - * declare const x = 1; + * for(using x of y){} + * for(await using x of y){} * ``` */ - declare: boolean; + kind: 'await using' | 'using'; +} +export declare interface UsingInForOfDeclarator extends BaseNode { + type: AST_NODE_TYPES.VariableDeclarator; + id: Identifier; + init: null; + definite: boolean; +} +export declare interface UsingInNomalConextDeclaration extends BaseNode { + type: AST_NODE_TYPES.VariableDeclaration; + /** + * The variables declared by this declaration. + * Note that there may be 0 declarations (i.e. `const;`). + * ``` + * using x = 1; + * using y =1, z = 2; + * ``` + */ + declarations: UsingInNomalConextDeclarator[]; + /** + * This value will always be `false` + * because 'declare' modifier cannot appear on a 'using' declaration. + */ + declare: false; /** * The keyword used to declare the variable(s) * ``` - * const x = 1; - * let y = 2; - * var z = 3; + * using x = 1; + * await using y = 2; * ``` */ - kind: 'const' | 'let' | 'var'; + kind: 'await using' | 'using'; } -export declare interface VariableDeclarator extends BaseNode { +export declare interface UsingInNomalConextDeclarator extends BaseNode { type: AST_NODE_TYPES.VariableDeclarator; - id: BindingName; - init: Expression | null; + id: Identifier; + init: Expression; definite: boolean; } +declare type ValueOf = T[keyof T]; +export declare type VariableDeclaration = LetOrConstOrVarDeclaration | UsingDeclaration; +export declare type VariableDeclarator = LetOrConstOrVarDeclarator | UsingDeclarator; export declare interface WhileStatement extends BaseNode { type: AST_NODE_TYPES.WhileStatement; test: Expression; diff --git a/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map b/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map index 1821619cdc..c586e7f909 100644 --- a/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +++ b/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ast-spec.d.ts","sourceRoot":"","sources":["../../src/generated/ast-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;gDAQgD;AAEhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,CAAC,OAAO,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEvE,MAAM,CAAC,OAAO,MAAM,gBAAgB,GAChC,4BAA4B,GAC5B,+BAA+B,CAAC;AAEpC,MAAM,CAAC,OAAO,WAAW,4BACvB,SAAQ,kCAAkC;IAC1C,IAAI,EAAE,cAAc,CAAC,gBAAgB,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,WAAW,+BACvB,SAAQ,qCAAqC;IAC7C,IAAI,EAAE,cAAc,CAAC,gBAAgB,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,QAAQ;IACvD,IAAI,EAAE,cAAc,CAAC,eAAe,CAAC;IACrC;;OAEG;IACH,QAAQ,EAAE,CAAC,UAAU,GAAG,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,QAAQ;IACpD,IAA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AAmB,CAAC;IACzC;;;;;;;OAOG;IACH,YAAY,EAAE,4BAA4B,EAAE,CAAC;IAC7C;;;OAGG;IACH,OAAO,EAAE,KAAK,CAAC;IACf;;;;;;OAMG;IACH,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,WAAW,4BAA6B,SAAQ,QAAQ;IACpE,IAAI,EAAE,cAAc,CAAC,kBAAkB,CAAC;IACxC,EAAE,EAAE,UAAU,CAAC;IACf,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,OAAO,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAErC,MAAM,CAAC,OAAO,MAAM,mBAAmB,GACnC,0BAA0B,GAC1B,gBAAgB,CAAC;AAErB,MAAM,CAAC,OAAO,MAAM,kBAAkB,GAClC,yBAAyB,GACzB,eAAe,CAAC;AAEpB,MAAM,CAAC,OAAO,WAAW,cAAe,SAAQ,QAAQ;IACtD,IAAI,EAAE,cAAc,CAAC,cAAc,CAAC;IACpC,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,aAAc,SAAQ,QAAQ;IACrD,IAAI,EAAE,cAAc,CAAC,aAAa,CAAC;IACnC,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,QAAQ;IACvD,IAAI,EAAE,cAAc,CAAC,eAAe,CAAC;IACrC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;CAClC;AAED,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/types/package.json b/node_modules/@typescript-eslint/types/package.json index 1fa7d8af1b..9863e19042 100644 --- a/node_modules/@typescript-eslint/types/package.json +++ b/node_modules/@typescript-eslint/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "6.4.1", + "version": "6.5.0", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", @@ -90,5 +90,5 @@ ] } }, - "gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59" + "gitHead": "4f34d0ba34474926ba1eed623704b583a037f886" } diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map b/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map index 22aca6b198..d16d1cf83a 100644 --- a/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +++ b/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAGjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA4B5C,OAAO,KAAK,EACV,aAAa,EACb,2BAA2B,EAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAoB,MAAM,EAAE,MAAM,aAAa,CAAC;AAKtE,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,wBAAwB,GAAG,EAAE,CAAC,sBAAsB,GAC1D,OAAO,CAMT;AAED,MAAM,WAAW,OAAO;IACtB,qBAAqB,EAAE,2BAA2B,CAAC;IACnD,qBAAqB,EAAE,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC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CAAC,SAAS;IA8BjB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAyElB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAItB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,oCAAoC;IAe5C;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IAsB7B;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAiC9B;;;;;OAKG;IACH,OAAO,CAAC,gDAAgD;IAexD;;;;OAIG;IACH,OAAO,CAAC,kDAAkD;IAmB1D;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,sBAAsB;IA4C9B;;;;OAIG;IACH,OAAO,CAAC,UAAU;IA+FlB,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,+BAA+B;IAiDvC;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,sBAAsB;IAoC9B,OAAO,CAAC,mBAAmB;IAQ3B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,qBAAqB;IAsB7B;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;CAypFpB"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/convert.js b/node_modules/@typescript-eslint/typescript-estree/dist/convert.js index 2c4e91591f..428eaf6167 100644 --- a/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +++ b/node_modules/@typescript-eslint/typescript-estree/dist/convert.js @@ -741,6 +741,16 @@ class Converter { if (!result.declarations.length) { __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwUnlessAllowInvalidAST).call(this, node, 'A variable declaration list must have at least one variable declarator.'); } + if (result.kind === 'using' || result.kind === 'await using') { + node.declarationList.declarations.forEach((declaration, i) => { + if (result.declarations[i].init == null) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration, `'${result.kind}' declarations must be initialized.`); + } + if (result.declarations[i].id.type !== ts_estree_1.AST_NODE_TYPES.Identifier) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration.name, `'${result.kind}' declarations may not have binding patterns.`); + } + }); + } /** * Semantically, decorators are not allowed on variable declarations, * Pre 4.8 TS would include them in the AST, so we did as well. @@ -751,13 +761,25 @@ class Converter { return this.fixExports(node, result); } // mostly for for-of, for-in - case SyntaxKind.VariableDeclarationList: - return this.createNode(node, { + case SyntaxKind.VariableDeclarationList: { + const result = this.createNode(node, { type: ts_estree_1.AST_NODE_TYPES.VariableDeclaration, declarations: node.declarations.map(el => this.convertChild(el)), declare: false, kind: (0, node_utils_1.getDeclarationKind)(node), }); + if (result.kind === 'using' || result.kind === 'await using') { + node.declarations.forEach((declaration, i) => { + if (result.declarations[i].init != null) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration, `'${result.kind}' declarations may not be initialized in for statement.`); + } + if (result.declarations[i].id.type !== ts_estree_1.AST_NODE_TYPES.Identifier) { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, declaration.name, `'${result.kind}' declarations may not have binding patterns.`); + } + }); + } + return result; + } // Expressions case SyntaxKind.ExpressionStatement: return this.createNode(node, { @@ -2410,6 +2432,13 @@ _Converter_instances = new WeakSet(), _Converter_checkModifiers = function _Conv !ts.isPropertyDeclaration(node)) { __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'${ts.tokenToString(modifier.kind)}' modifier cannot appear on class elements of this kind.`); } + if (modifier.kind === SyntaxKind.DeclareKeyword && + ts.isVariableStatement(node)) { + const declarationKind = (0, node_utils_1.getDeclarationKind)(node.declarationList); + if (declarationKind === 'using' || declarationKind === 'await using') { + __classPrivateFieldGet(this, _Converter_instances, "m", _Converter_throwError).call(this, modifier, `'declare' modifier cannot appear on a '${declarationKind}' declaration.`); + } + } if (modifier.kind === SyntaxKind.AbstractKeyword && node.kind !== SyntaxKind.ClassDeclaration && node.kind !== SyntaxKind.ConstructorType && diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map b/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map index 1653d14037..5bafe8f2e1 100644 --- a/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +++ b/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map @@ -1 +1 @@ -{"version":3,"file":"convert.js","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA2D;AAC3D,oNAAoN;AACpN,+CAAiC;AAEjC,iDAA6D;AAE7D,6CA0BsB;AAOtB,2CAA6C;AAE7C,MAAM,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;AASjC;;;;GAIG;AACH,SAAgB,YAAY,CAC1B,KAA2D;IAE3D,OAAO,IAAA,wBAAW,EAChB,CAAC,SAAS,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,IAAK,KAAK,CAAC,WAAsB,EACtE,KAAK,CAAC,IAAK,EACX,KAAK,CAAC,KAAM,CACb,CAAC;AACJ,CAAC;AARD,oCAQC;AAOD,MAAa,SAAS;IAQpB;;;;;OAKG;IACH,YAAY,GAAkB,EAAE,OAA0B;;QAXzC,0BAAqB,GAAG,IAAI,OAAO,EAAE,CAAC;QACtC,0BAAqB,GAAG,IAAI,OAAO,EAAE,CAAC;QAE/C,iBAAY,GAAG,KAAK,CAAC;QAS3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;IAChC,CAAC;IAED,UAAU;QACR,OAAO;YACL,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;YACjD,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;SAClD,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,SAAS,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/node-utils.d.ts b/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts index e4ed8f5294..c60792348e 100644 --- a/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts +++ b/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts @@ -12,6 +12,7 @@ interface TokenToText extends TSESTree.PunctuatorTokenToText, TSESTree.BinaryOpe } type AssignmentOperatorKind = keyof TSESTree.AssignmentOperatorToText; type BinaryOperatorKind = keyof TSESTree.BinaryOperatorToText; +type DeclarationKind = TSESTree.VariableDeclaration['kind']; /** * Returns true if the given ts.Token is a logical operator * @param operator the operator token @@ -111,7 +112,7 @@ export declare function isJSXToken(node: ts.Node): boolean; * @param node TypeScript AST node * @returns declaration kind */ -export declare function getDeclarationKind(node: ts.VariableDeclarationList): 'const' | 'let' | 'var'; +export declare function getDeclarationKind(node: ts.VariableDeclarationList): DeclarationKind; /** * Gets a ts.Node's accessibility level * @param node The ts.Node diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map b/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map index c43d1c14d1..dca7109193 100644 --- a/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map +++ b/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"node-utils.d.ts","sourceRoot":"","sources":["../src/node-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAIjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAK9D,QAAA,MAAM,UAAU,sBAAgB,CAAC;AAEjC,KAAK,mBAAmB,GACpB,EAAE,CAAC,UAAU,CAAC,uBAAuB,GACrC,EAAE,CAAC,UAAU,CAAC,WAAW,GACzB,EAAE,CAAC,UAAU,CAAC,qBAAqB,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BAAgB,qBAAqB,CACnC,IAAI,EAAE,EAAE,CAAC,IAAI,GACZ,EAAE,CAAC,oBAAoB,GAAG,SAAS,CAErC;AA4BD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAuDxD;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,EAAE,CAAC,iBAAiB,GACzB,EAAE,CAAC,QAAQ,EAAE,GAAG,SAAS,CAiB3B"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js b/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js index e50e62d589..0d6c638969 100644 --- a/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +++ b/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js @@ -282,9 +282,16 @@ function getDeclarationKind(node) { if (node.flags & ts.NodeFlags.Let) { return 'let'; } + // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison + if ((node.flags & ts.NodeFlags.AwaitUsing) === ts.NodeFlags.AwaitUsing) { + return 'await using'; + } if (node.flags & ts.NodeFlags.Const) { return 'const'; } + if (node.flags & ts.NodeFlags.Using) { + return 'using'; + } return 'var'; } exports.getDeclarationKind = getDeclarationKind; diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map b/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map index be8f4bf0c1..86938c4407 100644 --- a/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +++ b/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map @@ -1 +1 @@ -{"version":3,"file":"node-utils.js","sourceRoot":"","sources":["../src/node-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAEjC,iDAA8C;AAC9C,yDAAqD;AAErD,2CAA8D;AAC9D,mDAA6D;AAE7D,MAAM,WAAW,GAAG,0CAA0B,CAAC,KAAK,CAAC,CAAC;AAEtD,MAAM,UAAU,GAAG,EAAE,C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K,UAAU,CAAC,WAAW;oBACrC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,iBAAiB;oBAC5C,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,WAAW,CAAC;gBACzC,gBAAgB,CAAC,MAAM,CAAC,KAAK,IAAI;gBACjC,OAAO,CAAC,WAAW,CAAC;gBACpB,WAAW,CAAC,IAAI,KAAK,UAAU,CAAC,gBAAgB,CACjD,CAAC;SACH;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAvDD,gDAuDC;AAED,SAAgB,qBAAqB,CACnC,IAA0B;IAE1B,gFAAgF;IAChF,4CAA4C;IAC5C,IAAI,SAAS,GAAG,IAAA,2BAAY,EAAC,IAAI,CAAC,CAAC;IACnC,IAAI,iBAAiB,GAAG,IAAI,CAAC;IAC7B,OACE,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC;QACtC,EAAE,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,MAAM,CAAC;QAChD,iBAAiB,CAAC,MAAM,CAAC,IAAI,EAC7B;QACA,MAAM,eAAe,GAAG,IAAA,2BAAY,EAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAI,eAAe,IAAI,eAAe,EAAE,MAAM,GAAG,CAAC,EAAE;YAClD,SAAS,GAAG,eAAe,CAAC;SAC7B;QACD,iBAAiB,GAAG,iBAAiB,CAAC,MAAM,CAAC;KAC9C;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAnBD,sDAmBC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js b/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js index 3eec0b46c9..0ceb027830 100644 --- a/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +++ b/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js @@ -33,12 +33,12 @@ const ts = __importStar(require("typescript")); * This needs to be kept in sync with /docs/users/Versioning.mdx * in the typescript-eslint monorepo */ -const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.3.5 <5.2.0'; +const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.3.5 <5.3.0'; /* * The semver package will ignore prerelease ranges, and we don't want to explicitly document every one * List them all separately here, so we can automatically create the full string */ -const SUPPORTED_PRERELEASE_RANGES = ['5.2.1-rc']; +const SUPPORTED_PRERELEASE_RANGES = []; const ACTIVE_TYPESCRIPT_VERSION = ts.version; const isRunningSupportedTypeScriptVersion = semver_1.default.satisfies(ACTIVE_TYPESCRIPT_VERSION, [SUPPORTED_TYPESCRIPT_VERSIONS] .concat(SUPPORTED_PRERELEASE_RANGES) diff --git a/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map b/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map index 7df85ea412..2556f1ea89 100644 --- a/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map +++ b/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map @@ -1 +1 @@ -{"version":3,"file":"warnAboutTSVersion.js","sourceRoot":"","sources":["../../src/parseSettings/warnAboutTSVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAA4B;AAC5B,+CAAiC;AAGjC;;;GAGG;AACH,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAEvD;;;GAGG;AACH,MAAM,2BAA2B,GAAa,CAAC,UAAU,CAAC,CAAC;AAC3D,MAAM,yBAAyB,GAAG,EAAE,CAAC,OAAO,CAAC;AAC7C,MAAM,mCAAmC,GAAG,gBAAM,CAAC,SAAS,CAC1D,yBAAyB,EACzB,CAAC,6BAA6B,CAAC;KAC5B,MAAM,CAAC,2BAA2B,CAAC;KACnC,IAAI,CAAC,MAAM,CAAC,CAChB,CAAC;AAEF,IAAI,oBAAoB,GAAG,KAAK,CAAC;AAEjC,SAAgB,kBAAkB,CAAC,aAA4B;IAC7D,IAAI,CAAC,mCAAmC,IAAI,CAAC,oBAAoB,EAAE;QACjE,MAAM,KAAK,GACT,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;QACjE,IAAI,KAAK,EAAE;YACT,MAAM,MAAM,GAAG,eAAe,CAAC;YAC/B,MAAM,cAAc,GAAG;gBACrB,MAAM;gBACN,uIAAuI;gBACvI,uDAAuD;gBACvD,kCAAkC,6BAA6B,EAAE;gBACjE,4BAA4B,yBAAyB,EAAE;gBACvD,6EAA6E;gBAC7E,MAAM;aACP,CAAC;YACF,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SAChD;QACD,oBAAoB,GAAG,IAAI,CAAC;KAC7B;AACH,CAAC;AAnBD,gDAmBC"} \ No newline at end of file +{"version":3,"file":"warnAboutTSVersion.js","sourceRoot":"","sources":["../../src/parseSettings/warnAboutTSVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAA4B;AAC5B,+CAAiC;AAGjC;;;GAGG;AACH,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAEvD;;;GAGG;AACH,MAAM,2BAA2B,GAAa,EAAE,CAAC;AACjD,MAAM,yBAAyB,GAAG,EAAE,CAAC,OAAO,CAAC;AAC7C,MAAM,mCAAmC,GAAG,gBAAM,CAAC,SAAS,CAC1D,yBAAyB,EACzB,CAAC,6BAA6B,CAAC;KAC5B,MAAM,CAAC,2BAA2B,CAAC;KACnC,IAAI,CAAC,MAAM,CAAC,CAChB,CAAC;AAEF,IAAI,oBAAoB,GAAG,KAAK,CAAC;AAEjC,SAAgB,kBAAkB,CAAC,aAA4B;IAC7D,IAAI,CAAC,mCAAmC,IAAI,CAAC,oBAAoB,EAAE;QACjE,MAAM,KAAK,GACT,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;QACjE,IAAI,KAAK,EAAE;YACT,MAAM,MAAM,GAAG,eAAe,CAAC;YAC/B,MAAM,cAAc,GAAG;gBACrB,MAAM;gBACN,uIAAuI;gBACvI,uDAAuD;gBACvD,kCAAkC,6BAA6B,EAAE;gBACjE,4BAA4B,yBAAyB,EAAE;gBACvD,6EAA6E;gBAC7E,MAAM;aACP,CAAC;YACF,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SAChD;QACD,oBAAoB,GAAG,IAAI,CAAC;KAC7B;AACH,CAAC;AAnBD,gDAmBC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/typescript-estree/package.json b/node_modules/@typescript-eslint/typescript-estree/package.json index a79e2e3e81..9fc46b200e 100644 --- a/node_modules/@typescript-eslint/typescript-estree/package.json +++ b/node_modules/@typescript-eslint/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "6.4.1", + "version": "6.5.0", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -52,8 +52,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "@typescript-eslint/types": "6.5.0", + "@typescript-eslint/visitor-keys": "6.5.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -88,5 +88,5 @@ ] } }, - "gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59" + "gitHead": "4f34d0ba34474926ba1eed623704b583a037f886" } diff --git a/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts b/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts index fad889790e..80e7e6b226 100644 --- a/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts +++ b/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts @@ -371,9 +371,17 @@ export declare const isNodeOfType: (nodeType: N type: NodeType; }> | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract | Extract n * ``` */ declare const isTypeAssertion: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSTypeAssertion; -declare const isVariableDeclarator: (node: TSESTree.Node | null | undefined) => node is TSESTree.VariableDeclarator; +declare const isVariableDeclarator: (node: TSESTree.Node | null | undefined) => node is TSESTree.LetOrConstOrVarDeclarator | TSESTree.UsingInForOfDeclarator | TSESTree.UsingInNomalConextDeclarator; declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression; declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName; declare const isFunctionOrFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructorType | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName; diff --git a/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map b/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map index 4eddde4100..02f064a5ba 100644 --- a/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map +++ b/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/ast-utils/predicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAU7C,QAAA,MAAM,yBAAyB;;4BAG9B,CAAC;AAEF,QAAA,MAAM,4BAA4B,gYAGjC,CAAC;AAEF,QAAA,MAAM,4BAA4B;;4BAGjC,CAAC;AAEF,QAAA,MAAM,+BAA+B,gYAGpC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,wBAAwB;;2BAK7B,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,mBAAmB,sHAGxB,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,wGAGV,CAAC;AAEZ,QAAA,MAAM,oBAAoB,iFAAkD,CAAC;AAO7E,QAAA,MAAM,UAAU,0MAA+B,CAAC;AAUhD,QAAA,MAAM,cAAc,yTAAmC,CAAC;AAExD,QAAA,MAAM,wBAAwB,gdAGnB,CAAC;AAEZ,QAAA,MAAM,gBAAgB,6EAA8C,CAAC;AAErE,QAAA,MAAM,mBAAmB,gFAAiD,CAAC;AAE3E,QAAA,MAAM,oBAAoB,ixBAef,CAAC;AAEZ;;GAEG;AACH,QAAA,MAAM,aAAa,+OAGlB,CAAC;AAEF;;GAEG;AACH,iBAAS,QAAQ,CACf,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,GAC9B,IAAI,IAAI;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GAAG,CAAC,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAO3E;AAED,QAAA,MAAM,YAAY,yEAA0C,CAAC;AAE7D;;GAEG;AACH,QAAA,MAAM,iBAAiB,8EAA+C,CAAC;AAEvE;;GAEG;AACH,QAAA,MAAM,cAAc;;4BAElB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,aAAa;;4BAEjB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,eAAe;;yBAEnB,CAAC;AAEH,QAAA,MAAM,MAAM,qLAMD,CAAC;AAEZ,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,wBAAwB,EACxB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,MAAM,EACN,mBAAmB,EACnB,4BAA4B,EAC5B,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,oBAAoB,GACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/ast-utils/predicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAU7C,QAAA,MAAM,yBAAyB;;4BAG9B,CAAC;AAEF,QAAA,MAAM,4BAA4B,gYAGjC,CAAC;AAEF,QAAA,MAAM,4BAA4B;;4BAGjC,CAAC;AAEF,QAAA,MAAM,+BAA+B,gYAGpC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,wBAAwB;;2BAK7B,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,mBAAmB,sHAGxB,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,wGAGV,CAAC;AAEZ,QAAA,MAAM,oBAAoB,kKAAkD,CAAC;AAO7E,QAAA,MAAM,UAAU,0MAA+B,CAAC;AAUhD,QAAA,MAAM,cAAc,yTAAmC,CAAC;AAExD,QAAA,MAAM,wBAAwB,gdAGnB,CAAC;AAEZ,QAAA,MAAM,gBAAgB,6EAA8C,CAAC;AAErE,QAAA,MAAM,mBAAmB,gFAAiD,CAAC;AAE3E,QAAA,MAAM,oBAAoB,ixBAef,CAAC;AAEZ;;GAEG;AACH,QAAA,MAAM,aAAa,+OAGlB,CAAC;AAEF;;GAEG;AACH,iBAAS,QAAQ,CACf,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,GAC9B,IAAI,IAAI;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GAAG,CAAC,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAO3E;AAED,QAAA,MAAM,YAAY,yEAA0C,CAAC;AAE7D;;GAEG;AACH,QAAA,MAAM,iBAAiB,8EAA+C,CAAC;AAEvE;;GAEG;AACH,QAAA,MAAM,cAAc;;4BAElB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,aAAa;;4BAEjB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,eAAe;;yBAEnB,CAAC;AAEH,QAAA,MAAM,MAAM,qLAMD,CAAC;AAEZ,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,wBAAwB,EACxB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,MAAM,EACN,mBAAmB,EACnB,4BAA4B,EAC5B,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,oBAAoB,GACrB,CAAC"} \ No newline at end of file diff --git a/node_modules/@typescript-eslint/utils/package.json b/node_modules/@typescript-eslint/utils/package.json index cea9da3345..d36204f3a4 100644 --- a/node_modules/@typescript-eslint/utils/package.json +++ b/node_modules/@typescript-eslint/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "6.4.1", + "version": "6.5.0", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -68,16 +68,16 @@ "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.4.1", - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/typescript-estree": "6.4.1", + "@typescript-eslint/scope-manager": "6.5.0", + "@typescript-eslint/types": "6.5.0", + "@typescript-eslint/typescript-estree": "6.5.0", "semver": "^7.5.4" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { - "@typescript-eslint/parser": "6.4.1", + "@typescript-eslint/parser": "6.5.0", "downlevel-dts": "*", "jest": "29.6.2", "prettier": "^2.8.4", @@ -95,5 +95,5 @@ ] } }, - "gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59" + "gitHead": "4f34d0ba34474926ba1eed623704b583a037f886" } diff --git a/node_modules/@typescript-eslint/visitor-keys/package.json b/node_modules/@typescript-eslint/visitor-keys/package.json index 7bee2b0e5a..d347fb0bc6 100644 --- a/node_modules/@typescript-eslint/visitor-keys/package.json +++ b/node_modules/@typescript-eslint/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "6.4.1", + "version": "6.5.0", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -45,7 +45,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.4.1", + "@typescript-eslint/types": "6.5.0", "eslint-visitor-keys": "^3.4.1" }, "devDependencies": { @@ -67,5 +67,5 @@ ] } }, - "gitHead": "ef1367eeed112fd6bbb94e0c9bd56d7e167a1a59" + "gitHead": "4f34d0ba34474926ba1eed623704b583a037f886" } diff --git a/node_modules/eslint-plugin-github/lib/configs/react.js b/node_modules/eslint-plugin-github/lib/configs/react.js index 8299f44b9d..a63c80ffbf 100644 --- a/node_modules/eslint-plugin-github/lib/configs/react.js +++ b/node_modules/eslint-plugin-github/lib/configs/react.js @@ -30,5 +30,17 @@ module.exports = { canvas: ['img'], }, ], + // Remove once https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/pull/950 is shipped. + 'jsx-a11y/no-noninteractive-element-to-interactive-role': [ + 'error', + { + ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'], + ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'], + li: ['menuitem', 'menuitemradio', 'menuitemcheckbox', 'option', 'row', 'tab', 'treeitem'], + table: ['grid'], + td: ['gridcell'], + fieldset: ['radiogroup', 'presentation'], + }, + ], }, } diff --git a/node_modules/eslint-plugin-github/lib/rules/a11y-no-visually-hidden-interactive-element.js b/node_modules/eslint-plugin-github/lib/rules/a11y-no-visually-hidden-interactive-element.js index ac3e7142b0..70f7c3cd05 100644 --- a/node_modules/eslint-plugin-github/lib/rules/a11y-no-visually-hidden-interactive-element.js +++ b/node_modules/eslint-plugin-github/lib/rules/a11y-no-visually-hidden-interactive-element.js @@ -8,7 +8,6 @@ const defaultcomponentName = 'VisuallyHidden' const schema = generateObjSchema({ className: {type: 'string'}, componentName: {type: 'string'}, - htmlPropName: {type: 'string'}, }) /** Note: we are not including input elements at this time diff --git a/node_modules/eslint-plugin-github/package.json b/node_modules/eslint-plugin-github/package.json index 703b46d335..b50014d3f1 100644 --- a/node_modules/eslint-plugin-github/package.json +++ b/node_modules/eslint-plugin-github/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-github", - "version": "4.9.2", + "version": "4.10.0", "description": "An opinionated collection of ESLint shared configs and rules used by GitHub.", "main": "lib/index.js", "entries": [ diff --git a/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js b/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js index fd2726a993..3b8dbb41be 100644 --- a/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js +++ b/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js @@ -1,5 +1,5 @@ /** - * @fileoverview A class of the code path segment. + * @fileoverview The CodePathSegment class. * @author Toru Nagashima */ @@ -30,10 +30,22 @@ function isReachable(segment) { /** * A code path segment. + * + * Each segment is arranged in a series of linked lists (implemented by arrays) + * that keep track of the previous and next segments in a code path. In this way, + * you can navigate between all segments in any code path so long as you have a + * reference to any segment in that code path. + * + * When first created, the segment is in a detached state, meaning that it knows the + * segments that came before it but those segments don't know that this new segment + * follows it. Only when `CodePathSegment#markUsed()` is called on a segment does it + * officially become part of the code path by updating the previous segments to know + * that this new segment follows. */ class CodePathSegment { /** + * Creates a new instance. * @param {string} id An identifier. * @param {CodePathSegment[]} allPrevSegments An array of the previous segments. * This array includes unreachable segments. @@ -49,27 +61,25 @@ class CodePathSegment { this.id = id; /** - * An array of the next segments. + * An array of the next reachable segments. * @type {CodePathSegment[]} */ this.nextSegments = []; /** - * An array of the previous segments. + * An array of the previous reachable segments. * @type {CodePathSegment[]} */ this.prevSegments = allPrevSegments.filter(isReachable); /** - * An array of the next segments. - * This array includes unreachable segments. + * An array of all next segments including reachable and unreachable. * @type {CodePathSegment[]} */ this.allNextSegments = []; /** - * An array of the previous segments. - * This array includes unreachable segments. + * An array of all previous segments including reachable and unreachable. * @type {CodePathSegment[]} */ this.allPrevSegments = allPrevSegments; @@ -83,7 +93,11 @@ class CodePathSegment { // Internal data. Object.defineProperty(this, "internal", { value: { + + // determines if the segment has been attached to the code path used: false, + + // array of previous segments coming from the end of a loop loopedPrevSegments: [] } }); @@ -113,9 +127,10 @@ class CodePathSegment { } /** - * Creates a segment that follows given segments. + * Creates a new segment and appends it after the given segments. * @param {string} id An identifier. - * @param {CodePathSegment[]} allPrevSegments An array of the previous segments. + * @param {CodePathSegment[]} allPrevSegments An array of the previous segments + * to append to. * @returns {CodePathSegment} The created segment. */ static newNext(id, allPrevSegments) { @@ -127,7 +142,7 @@ class CodePathSegment { } /** - * Creates an unreachable segment that follows given segments. + * Creates an unreachable segment and appends it after the given segments. * @param {string} id An identifier. * @param {CodePathSegment[]} allPrevSegments An array of the previous segments. * @returns {CodePathSegment} The created segment. @@ -137,7 +152,7 @@ class CodePathSegment { /* * In `if (a) return a; foo();` case, the unreachable segment preceded by - * the return statement is not used but must not be remove. + * the return statement is not used but must not be removed. */ CodePathSegment.markUsed(segment); @@ -157,7 +172,7 @@ class CodePathSegment { } /** - * Makes a given segment being used. + * Marks a given segment as used. * * And this function registers the segment into the previous segments as a next. * @param {CodePathSegment} segment A segment to mark. @@ -172,6 +187,13 @@ class CodePathSegment { let i; if (segment.reachable) { + + /* + * If the segment is reachable, then it's officially part of the + * code path. This loops through all previous segments to update + * their list of next segments. Because the segment is reachable, + * it's added to both `nextSegments` and `allNextSegments`. + */ for (i = 0; i < segment.allPrevSegments.length; ++i) { const prevSegment = segment.allPrevSegments[i]; @@ -179,6 +201,13 @@ class CodePathSegment { prevSegment.nextSegments.push(segment); } } else { + + /* + * If the segment is not reachable, then it's not officially part of the + * code path. This loops through all previous segments to update + * their list of next segments. Because the segment is not reachable, + * it's added only to `allNextSegments`. + */ for (i = 0; i < segment.allPrevSegments.length; ++i) { segment.allPrevSegments[i].allNextSegments.push(segment); } @@ -196,19 +225,20 @@ class CodePathSegment { } /** - * Replaces unused segments with the previous segments of each unused segment. - * @param {CodePathSegment[]} segments An array of segments to replace. - * @returns {CodePathSegment[]} The replaced array. + * Creates a new array based on an array of segments. If any segment in the + * array is unused, then it is replaced by all of its previous segments. + * All used segments are returned as-is without replacement. + * @param {CodePathSegment[]} segments The array of segments to flatten. + * @returns {CodePathSegment[]} The flattened array. */ static flattenUnusedSegments(segments) { - const done = Object.create(null); - const retv = []; + const done = new Set(); for (let i = 0; i < segments.length; ++i) { const segment = segments[i]; // Ignores duplicated. - if (done[segment.id]) { + if (done.has(segment)) { continue; } @@ -217,18 +247,16 @@ class CodePathSegment { for (let j = 0; j < segment.allPrevSegments.length; ++j) { const prevSegment = segment.allPrevSegments[j]; - if (!done[prevSegment.id]) { - done[prevSegment.id] = true; - retv.push(prevSegment); + if (!done.has(prevSegment)) { + done.add(prevSegment); } } } else { - done[segment.id] = true; - retv.push(segment); + done.add(segment); } } - return retv; + return [...done]; } } diff --git a/node_modules/eslint/lib/rule-tester/flat-rule-tester.js b/node_modules/eslint/lib/rule-tester/flat-rule-tester.js index f143873f7b..5a93be1cce 100644 --- a/node_modules/eslint/lib/rule-tester/flat-rule-tester.js +++ b/node_modules/eslint/lib/rule-tester/flat-rule-tester.js @@ -32,6 +32,7 @@ const { ConfigArraySymbol } = require("@humanwhocodes/config-array"); /** @typedef {import("../shared/types").Parser} Parser */ /** @typedef {import("../shared/types").LanguageOptions} LanguageOptions */ +/** @typedef {import("../shared/types").Rule} Rule */ /** @@ -446,7 +447,7 @@ class FlatRuleTester { /** * Adds a new rule test to execute. * @param {string} ruleName The name of the rule to run. - * @param {Function} rule The rule to test. + * @param {Function | Rule} rule The rule to test. * @param {{ * valid: (ValidTestCase | string)[], * invalid: InvalidTestCase[] @@ -1011,29 +1012,35 @@ class FlatRuleTester { /* * This creates a mocha test suite and pipes all supplied info through * one of the templates above. + * The test suites for valid/invalid are created conditionally as + * test runners (eg. vitest) fail for empty test suites. */ this.constructor.describe(ruleName, () => { - this.constructor.describe("valid", () => { - test.valid.forEach(valid => { - this.constructor[valid.only ? "itOnly" : "it"]( - sanitize(typeof valid === "object" ? valid.name || valid.code : valid), - () => { - testValidTemplate(valid); - } - ); + if (test.valid.length > 0) { + this.constructor.describe("valid", () => { + test.valid.forEach(valid => { + this.constructor[valid.only ? "itOnly" : "it"]( + sanitize(typeof valid === "object" ? valid.name || valid.code : valid), + () => { + testValidTemplate(valid); + } + ); + }); }); - }); + } - this.constructor.describe("invalid", () => { - test.invalid.forEach(invalid => { - this.constructor[invalid.only ? "itOnly" : "it"]( - sanitize(invalid.name || invalid.code), - () => { - testInvalidTemplate(invalid); - } - ); + if (test.invalid.length > 0) { + this.constructor.describe("invalid", () => { + test.invalid.forEach(invalid => { + this.constructor[invalid.only ? "itOnly" : "it"]( + sanitize(invalid.name || invalid.code), + () => { + testInvalidTemplate(invalid); + } + ); + }); }); - }); + } }); } } diff --git a/node_modules/eslint/lib/rule-tester/rule-tester.js b/node_modules/eslint/lib/rule-tester/rule-tester.js index e4dc126783..030a986867 100644 --- a/node_modules/eslint/lib/rule-tester/rule-tester.js +++ b/node_modules/eslint/lib/rule-tester/rule-tester.js @@ -62,6 +62,7 @@ const { SourceCode } = require("../source-code"); //------------------------------------------------------------------------------ /** @typedef {import("../shared/types").Parser} Parser */ +/** @typedef {import("../shared/types").Rule} Rule */ /** @@ -508,17 +509,20 @@ class RuleTester { /** * Define a rule for one particular run of tests. * @param {string} name The name of the rule to define. - * @param {Function} rule The rule definition. + * @param {Function | Rule} rule The rule definition. * @returns {void} */ defineRule(name, rule) { + if (typeof rule === "function") { + emitLegacyRuleAPIWarning(name); + } this.rules[name] = rule; } /** * Adds a new rule test to execute. * @param {string} ruleName The name of the rule to run. - * @param {Function} rule The rule to test. + * @param {Function | Rule} rule The rule to test. * @param {{ * valid: (ValidTestCase | string)[], * invalid: InvalidTestCase[] @@ -1021,29 +1025,35 @@ class RuleTester { /* * This creates a mocha test suite and pipes all supplied info through * one of the templates above. + * The test suites for valid/invalid are created conditionally as + * test runners (eg. vitest) fail for empty test suites. */ this.constructor.describe(ruleName, () => { - this.constructor.describe("valid", () => { - test.valid.forEach(valid => { - this.constructor[valid.only ? "itOnly" : "it"]( - sanitize(typeof valid === "object" ? valid.name || valid.code : valid), - () => { - testValidTemplate(valid); - } - ); + if (test.valid.length > 0) { + this.constructor.describe("valid", () => { + test.valid.forEach(valid => { + this.constructor[valid.only ? "itOnly" : "it"]( + sanitize(typeof valid === "object" ? valid.name || valid.code : valid), + () => { + testValidTemplate(valid); + } + ); + }); }); - }); + } - this.constructor.describe("invalid", () => { - test.invalid.forEach(invalid => { - this.constructor[invalid.only ? "itOnly" : "it"]( - sanitize(invalid.name || invalid.code), - () => { - testInvalidTemplate(invalid); - } - ); + if (test.invalid.length > 0) { + this.constructor.describe("invalid", () => { + test.invalid.forEach(invalid => { + this.constructor[invalid.only ? "itOnly" : "it"]( + sanitize(invalid.name || invalid.code), + () => { + testInvalidTemplate(invalid); + } + ); + }); }); - }); + } }); } } diff --git a/node_modules/eslint/lib/rules/for-direction.js b/node_modules/eslint/lib/rules/for-direction.js index 4ed7350158..3f2ad9df64 100644 --- a/node_modules/eslint/lib/rules/for-direction.js +++ b/node_modules/eslint/lib/rules/for-direction.js @@ -5,6 +5,12 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const { getStaticValue } = require("@eslint-community/eslint-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -29,6 +35,7 @@ module.exports = { }, create(context) { + const { sourceCode } = context; /** * report an error. @@ -46,17 +53,17 @@ module.exports = { * check the right side of the assignment * @param {ASTNode} update UpdateExpression to check * @param {int} dir expected direction that could either be turned around or invalidated - * @returns {int} return dir, the negated dir or zero if it's not clear for identifiers + * @returns {int} return dir, the negated dir, or zero if the counter does not change or the direction is not clear */ function getRightDirection(update, dir) { - if (update.right.type === "UnaryExpression") { - if (update.right.operator === "-") { - return -dir; - } - } else if (update.right.type === "Identifier") { - return 0; + const staticValue = getStaticValue(update.right, sourceCode.getScope(update)); + + if (staticValue && ["bigint", "boolean", "number"].includes(typeof staticValue.value)) { + const sign = Math.sign(Number(staticValue.value)) || 0; // convert NaN to 0 + + return dir * sign; } - return dir; + return 0; } /** diff --git a/node_modules/eslint/lib/rules/no-promise-executor-return.js b/node_modules/eslint/lib/rules/no-promise-executor-return.js index d46a730e47..e6ed7a22ef 100644 --- a/node_modules/eslint/lib/rules/no-promise-executor-return.js +++ b/node_modules/eslint/lib/rules/no-promise-executor-return.js @@ -10,6 +10,7 @@ //------------------------------------------------------------------------------ const { findVariable } = require("@eslint-community/eslint-utils"); +const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ // Helpers @@ -59,6 +60,78 @@ function isPromiseExecutor(node, scope) { isGlobalReference(parent.callee, getOuterScope(scope)); } +/** + * Checks if the given node is a void expression. + * @param {ASTNode} node The node to check. + * @returns {boolean} - `true` if the node is a void expression + */ +function expressionIsVoid(node) { + return node.type === "UnaryExpression" && node.operator === "void"; +} + +/** + * Fixes the linting error by prepending "void " to the given node + * @param {Object} sourceCode context given by context.sourceCode + * @param {ASTNode} node The node to fix. + * @param {Object} fixer The fixer object provided by ESLint. + * @returns {Array} - An array of fix objects to apply to the node. + */ +function voidPrependFixer(sourceCode, node, fixer) { + + const requiresParens = + + // prepending `void ` will fail if the node has a lower precedence than void + astUtils.getPrecedence(node) < astUtils.getPrecedence({ type: "UnaryExpression", operator: "void" }) && + + // check if there are parentheses around the node to avoid redundant parentheses + !astUtils.isParenthesised(sourceCode, node); + + // avoid parentheses issues + const returnOrArrowToken = sourceCode.getTokenBefore( + node, + node.parent.type === "ArrowFunctionExpression" + ? astUtils.isArrowToken + + // isReturnToken + : token => token.type === "Keyword" && token.value === "return" + ); + + const firstToken = sourceCode.getTokenAfter(returnOrArrowToken); + + const prependSpace = + + // is return token, as => allows void to be adjacent + returnOrArrowToken.value === "return" && + + // If two tokens (return and "(") are adjacent + returnOrArrowToken.range[1] === firstToken.range[0]; + + return [ + fixer.insertTextBefore(firstToken, `${prependSpace ? " " : ""}void ${requiresParens ? "(" : ""}`), + fixer.insertTextAfter(node, requiresParens ? ")" : "") + ]; +} + +/** + * Fixes the linting error by `wrapping {}` around the given node's body. + * @param {Object} sourceCode context given by context.sourceCode + * @param {ASTNode} node The node to fix. + * @param {Object} fixer The fixer object provided by ESLint. + * @returns {Array} - An array of fix objects to apply to the node. + */ +function curlyWrapFixer(sourceCode, node, fixer) { + + // https://github.com/eslint/eslint/pull/17282#issuecomment-1592795923 + const arrowToken = sourceCode.getTokenBefore(node.body, astUtils.isArrowToken); + const firstToken = sourceCode.getTokenAfter(arrowToken); + const lastToken = sourceCode.getLastToken(node); + + return [ + fixer.insertTextBefore(firstToken, "{"), + fixer.insertTextAfter(lastToken, "}") + ]; +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -74,10 +147,27 @@ module.exports = { url: "https://eslint.org/docs/latest/rules/no-promise-executor-return" }, - schema: [], + hasSuggestions: true, + + schema: [{ + type: "object", + properties: { + allowVoid: { + type: "boolean", + default: false + } + }, + additionalProperties: false + }], messages: { - returnsValue: "Return values from promise executor functions cannot be read." + returnsValue: "Return values from promise executor functions cannot be read.", + + // arrow and function suggestions + prependVoid: "Prepend `void` to the expression.", + + // only arrow suggestions + wrapBraces: "Wrap the expression in `{}`." } }, @@ -85,26 +175,52 @@ module.exports = { let funcInfo = null; const sourceCode = context.sourceCode; - - /** - * Reports the given node. - * @param {ASTNode} node Node to report. - * @returns {void} - */ - function report(node) { - context.report({ node, messageId: "returnsValue" }); - } + const { + allowVoid = false + } = context.options[0] || {}; return { onCodePathStart(_, node) { funcInfo = { upper: funcInfo, - shouldCheck: functionTypesToCheck.has(node.type) && isPromiseExecutor(node, sourceCode.getScope(node)) + shouldCheck: + functionTypesToCheck.has(node.type) && + isPromiseExecutor(node, sourceCode.getScope(node)) }; - if (funcInfo.shouldCheck && node.type === "ArrowFunctionExpression" && node.expression) { - report(node.body); + if (// Is a Promise executor + funcInfo.shouldCheck && + node.type === "ArrowFunctionExpression" && + node.expression && + + // Except void + !(allowVoid && expressionIsVoid(node.body)) + ) { + const suggest = []; + + // prevent useless refactors + if (allowVoid) { + suggest.push({ + messageId: "prependVoid", + fix(fixer) { + return voidPrependFixer(sourceCode, node.body, fixer); + } + }); + } + + suggest.push({ + messageId: "wrapBraces", + fix(fixer) { + return curlyWrapFixer(sourceCode, node, fixer); + } + }); + + context.report({ + node: node.body, + messageId: "returnsValue", + suggest + }); } }, @@ -113,9 +229,31 @@ module.exports = { }, ReturnStatement(node) { - if (funcInfo.shouldCheck && node.argument) { - report(node); + if (!(funcInfo.shouldCheck && node.argument)) { + return; } + + // node is `return ` + if (!allowVoid) { + context.report({ node, messageId: "returnsValue" }); + return; + } + + if (expressionIsVoid(node.argument)) { + return; + } + + // allowVoid && !expressionIsVoid + context.report({ + node, + messageId: "returnsValue", + suggest: [{ + messageId: "prependVoid", + fix(fixer) { + return voidPrependFixer(sourceCode, node.argument, fixer); + } + }] + }); } }; } diff --git a/node_modules/eslint/messages/eslintrc-incompat.js b/node_modules/eslint/messages/eslintrc-incompat.js index deffca57c5..ee77cb2328 100644 --- a/node_modules/eslint/messages/eslintrc-incompat.js +++ b/node_modules/eslint/messages/eslintrc-incompat.js @@ -19,7 +19,7 @@ A config object is using the "extends" key, which is not supported in flat confi Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array. Please see the following page for more information: -https://eslint.org/docs/latest/use/configure/migration-guide#predefined-configs +https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs `, globals: ` diff --git a/node_modules/eslint/package.json b/node_modules/eslint/package.json index 661e8fcaf4..7b58827056 100644 --- a/node_modules/eslint/package.json +++ b/node_modules/eslint/package.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "8.47.0", + "version": "8.48.0", "author": "Nicholas C. Zakas ", "description": "An AST-based pattern checker for JavaScript.", "bin": { @@ -63,7 +63,7 @@ "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "^8.47.0", + "@eslint/js": "8.48.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", diff --git a/node_modules/typescript/lib/lib.decorators.d.ts b/node_modules/typescript/lib/lib.decorators.d.ts index 2d2b4ee2af..11a8ca6de6 100644 --- a/node_modules/typescript/lib/lib.decorators.d.ts +++ b/node_modules/typescript/lib/lib.decorators.d.ts @@ -35,6 +35,11 @@ type DecoratorContext = | ClassMemberDecoratorContext ; +type DecoratorMetadataObject = Record & object; + +type DecoratorMetadata = + typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined; + /** * Context provided to a class decorator. * @template Class The type of the decorated class associated with this context. @@ -66,6 +71,8 @@ interface ClassDecoratorContext< * ``` */ addInitializer(initializer: (this: Class) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -130,6 +137,8 @@ interface ClassMethodDecoratorContext< * ``` */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -175,6 +184,8 @@ interface ClassGetterDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -220,6 +231,8 @@ interface ClassSetterDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -274,6 +287,8 @@ interface ClassAccessorDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } /** @@ -369,4 +384,6 @@ interface ClassFieldDecoratorContext< * decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; + + readonly metadata: DecoratorMetadata; } diff --git a/node_modules/typescript/lib/lib.dom.d.ts b/node_modules/typescript/lib/lib.dom.d.ts index da240ccf65..91596a00ae 100644 --- a/node_modules/typescript/lib/lib.dom.d.ts +++ b/node_modules/typescript/lib/lib.dom.d.ts @@ -750,6 +750,7 @@ interface Keyframe { interface KeyframeAnimationOptions extends KeyframeEffectOptions { id?: string; + timeline?: AnimationTimeline | null; } interface KeyframeEffectOptions extends EffectTiming { @@ -1034,7 +1035,7 @@ interface NotificationOptions { lang?: string; renotify?: boolean; requireInteraction?: boolean; - silent?: boolean; + silent?: boolean | null; tag?: string; timestamp?: EpochTimeStamp; vibrate?: VibratePattern; @@ -1351,7 +1352,6 @@ interface RTCEncodedAudioFrameMetadata { } interface RTCEncodedVideoFrameMetadata { - contributingSources?: number[]; dependencies?: number[]; frameId?: number; height?: number; @@ -1871,8 +1871,13 @@ interface TextDecoderOptions { } interface TextEncoderEncodeIntoResult { - read?: number; - written?: number; + read: number; + written: number; +} + +interface ToggleEventInit extends EventInit { + newState?: string; + oldState?: string; } interface TouchEventInit extends EventModifierInit { @@ -2105,6 +2110,32 @@ interface WebGLContextEventInit extends EventInit { statusMessage?: string; } +interface WebTransportCloseInfo { + closeCode?: number; + reason?: string; +} + +interface WebTransportErrorOptions { + source?: WebTransportErrorSource; + streamErrorCode?: number | null; +} + +interface WebTransportHash { + algorithm?: string; + value?: BufferSource; +} + +interface WebTransportOptions { + allowPooling?: boolean; + congestionControl?: WebTransportCongestionControl; + requireUnreliable?: boolean; + serverCertificateHashes?: WebTransportHash[]; +} + +interface WebTransportSendStreamOptions { + sendOrder?: number | null; +} + interface WheelEventInit extends MouseEventInit { deltaMode?: number; deltaX?: number; @@ -2304,9 +2335,9 @@ interface AbortSignal extends EventTarget { declare var AbortSignal: { prototype: AbortSignal; new(): AbortSignal; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */ abort(reason?: any): AbortSignal; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */ timeout(milliseconds: number): AbortSignal; }; @@ -3344,7 +3375,7 @@ interface CSSImportRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/media) */ readonly media: MediaList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/styleSheet) */ - readonly styleSheet: CSSStyleSheet; + readonly styleSheet: CSSStyleSheet | null; } declare var CSSImportRule: { @@ -3377,6 +3408,7 @@ declare var CSSKeyframeRule: { interface CSSKeyframesRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/cssRules) */ readonly cssRules: CSSRuleList; + readonly length: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/name) */ name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/appendRule) */ @@ -3597,7 +3629,7 @@ interface CSSNumericValue extends CSSStyleValue { declare var CSSNumericValue: { prototype: CSSNumericValue; new(): CSSNumericValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/parse) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/parse_static) */ parse(cssText: string): CSSNumericValue; }; @@ -4108,8 +4140,11 @@ interface CSSStyleDeclaration { fontStyle: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis) */ fontSynthesis: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps) */ fontSynthesisSmallCaps: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style) */ fontSynthesisStyle: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight) */ fontSynthesisWeight: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-variant) */ fontVariant: string; @@ -4129,6 +4164,8 @@ interface CSSStyleDeclaration { fontVariationSettings: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font-weight) */ fontWeight: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust) */ + forcedColorAdjust: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/gap) */ gap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/grid) */ @@ -4996,12 +5033,15 @@ declare var CSSStyleDeclaration: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule) */ interface CSSStyleRule extends CSSRule { + readonly cssRules: CSSRuleList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/selectorText) */ selectorText: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/style) */ readonly style: CSSStyleDeclaration; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleRule/styleMap) */ readonly styleMap: StylePropertyMap; + deleteRule(index: number): void; + insertRule(rule: string, index?: number): number; } declare var CSSStyleRule: { @@ -5060,9 +5100,9 @@ interface CSSStyleValue { declare var CSSStyleValue: { prototype: CSSStyleValue; new(): CSSStyleValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parse) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parse_static) */ parse(property: string, cssText: string): CSSStyleValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parseAll) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue/parseAll_static) */ parseAll(property: string, cssText: string): CSSStyleValue[]; }; @@ -5438,6 +5478,8 @@ interface CanvasShadowStyles { } interface CanvasState { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/reset) */ + reset(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/restore) */ restore(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/save) */ @@ -5623,8 +5665,6 @@ declare var ClipboardEvent: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem) */ interface ClipboardItem { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem/presentationStyle) */ - readonly presentationStyle: PresentationStyle; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem/types) */ readonly types: ReadonlyArray; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardItem/getType) */ @@ -6174,7 +6214,7 @@ interface DOMPoint extends DOMPointReadOnly { declare var DOMPoint: { prototype: DOMPoint; new(x?: number, y?: number, z?: number, w?: number): DOMPoint; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint_static) */ fromPoint(other?: DOMPointInit): DOMPoint; }; @@ -6200,7 +6240,7 @@ interface DOMPointReadOnly { declare var DOMPointReadOnly: { prototype: DOMPointReadOnly; new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static) */ fromPoint(other?: DOMPointInit): DOMPointReadOnly; }; @@ -6278,7 +6318,7 @@ interface DOMRectReadOnly { declare var DOMRectReadOnly: { prototype: DOMRectReadOnly; new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect_static) */ fromRect(other?: DOMRectInit): DOMRectReadOnly; }; @@ -7118,6 +7158,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; createEvent(eventInterface: "StorageEvent"): StorageEvent; createEvent(eventInterface: "SubmitEvent"): SubmitEvent; + createEvent(eventInterface: "ToggleEvent"): ToggleEvent; createEvent(eventInterface: "TouchEvent"): TouchEvent; createEvent(eventInterface: "TrackEvent"): TrackEvent; createEvent(eventInterface: "TransitionEvent"): TransitionEvent; @@ -8865,6 +8906,7 @@ interface GlobalEventHandlersEventMap { "reset": Event; "resize": UIEvent; "scroll": Event; + "scrollend": Event; "securitypolicyviolation": SecurityPolicyViolationEvent; "seeked": Event; "seeking": Event; @@ -9037,7 +9079,7 @@ interface GlobalEventHandlers { * Fires when an error occurs during object loading. * @param ev The event. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/error_event) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */ onerror: OnErrorEventHandler; /** @@ -9215,6 +9257,8 @@ interface GlobalEventHandlers { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scroll_event) */ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scrollend_event) */ + onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/securitypolicyviolation_event) */ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null; /** @@ -9636,7 +9680,7 @@ declare var HTMLBodyElement: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement) */ -interface HTMLButtonElement extends HTMLElement { +interface HTMLButtonElement extends HTMLElement, PopoverInvokerElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/disabled) */ disabled: boolean; /** @@ -10032,6 +10076,8 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit readonly offsetWidth: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/outerText) */ outerText: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/popover) */ + popover: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/spellcheck) */ spellcheck: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/title) */ @@ -10041,6 +10087,12 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit attachInternals(): ElementInternals; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/click) */ click(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidePopover) */ + hidePopover(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover) */ + showPopover(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover) */ + togglePopover(force?: boolean): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -10232,7 +10284,7 @@ interface HTMLFormElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/autocomplete) */ - autocomplete: string; + autocomplete: AutoFillBase; /** * Retrieves a collection, in source order, of all controls in a given form. * @@ -10885,7 +10937,7 @@ declare var HTMLImageElement: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement) */ -interface HTMLInputElement extends HTMLElement { +interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { /** Sets or retrieves a comma-separated list of content types. */ accept: string; /** @@ -10900,7 +10952,7 @@ interface HTMLInputElement extends HTMLElement { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/autocomplete) */ - autocomplete: string; + autocomplete: AutoFill; capture: string; /** Sets or retrieves the state of the check box or radio button. */ checked: boolean; @@ -12270,7 +12322,7 @@ interface HTMLScriptElement extends HTMLElement { declare var HTMLScriptElement: { prototype: HTMLScriptElement; new(): HTMLScriptElement; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/supports) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/supports_static) */ supports(type: string): boolean; }; @@ -12281,7 +12333,7 @@ declare var HTMLScriptElement: { */ interface HTMLSelectElement extends HTMLElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/autocomplete) */ - autocomplete: string; + autocomplete: AutoFill; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/disabled) */ disabled: boolean; /** @@ -13083,7 +13135,7 @@ declare var HTMLTemplateElement: { */ interface HTMLTextAreaElement extends HTMLElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/autocomplete) */ - autocomplete: string; + autocomplete: AutoFill; /** Sets or retrieves the width of the object. */ cols: number; /** Sets or retrieves the initial contents of the object. */ @@ -13391,6 +13443,8 @@ interface Headers { delete(name: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */ get(name: string): string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */ + getSetCookie(): string[]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */ has(name: string): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */ @@ -13768,25 +13822,25 @@ declare var IDBKeyRange: { /** * Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound_static) */ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange; /** * Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound_static) */ lowerBound(lower: any, open?: boolean): IDBKeyRange; /** * Returns a new IDBKeyRange spanning only key. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only_static) */ only(value: any): IDBKeyRange; /** * Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound_static) */ upperBound(upper: any, open?: boolean): IDBKeyRange; }; @@ -14229,6 +14283,8 @@ interface InnerHTML { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/InputDeviceInfo) */ interface InputDeviceInfo extends MediaDeviceInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/InputDeviceInfo/getCapabilities) */ + getCapabilities(): MediaTrackCapabilities; } declare var InputDeviceInfo: { @@ -15111,7 +15167,7 @@ interface MediaRecorder extends EventTarget { declare var MediaRecorder: { prototype: MediaRecorder; new(stream: MediaStream, options?: MediaRecorderOptions): MediaRecorder; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/isTypeSupported) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/isTypeSupported_static) */ isTypeSupported(type: string): boolean; }; @@ -15177,7 +15233,7 @@ interface MediaSource extends EventTarget { declare var MediaSource: { prototype: MediaSource; new(): MediaSource; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaSource/isTypeSupported) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaSource/isTypeSupported_static) */ isTypeSupported(type: string): boolean; }; @@ -16342,6 +16398,8 @@ interface Notification extends EventTarget { onerror: ((this: Notification, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/show_event) */ onshow: ((this: Notification, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/silent) */ + readonly silent: boolean | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/tag) */ readonly tag: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/title) */ @@ -16357,9 +16415,9 @@ interface Notification extends EventTarget { declare var Notification: { prototype: Notification; new(title: string, options?: NotificationOptions): Notification; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission_static) */ readonly permission: NotificationPermission; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/requestPermission) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/requestPermission_static) */ requestPermission(deprecatedCallback?: NotificationPermissionCallback): Promise; }; @@ -17099,7 +17157,7 @@ interface PerformanceObserver { declare var PerformanceObserver: { prototype: PerformanceObserver; new(callback: PerformanceObserverCallback): PerformanceObserver; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes_static) */ readonly supportedEntryTypes: ReadonlyArray; }; @@ -17577,6 +17635,13 @@ declare var PopStateEvent: { new(type: string, eventInitDict?: PopStateEventInit): PopStateEvent; }; +interface PopoverInvokerElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/popoverTargetAction) */ + popoverTargetAction: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/popoverTargetElement) */ + popoverTargetElement: Element | null; +} + /** * A processing instruction embeds application-specific instructions in XML which can be ignored by other applications that don't recognize them. * @@ -17645,7 +17710,7 @@ declare var PublicKeyCredential: { prototype: PublicKeyCredential; new(): PublicKeyCredential; isConditionalMediationAvailable(): Promise; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable_static) */ isUserVerifyingPlatformAuthenticatorAvailable(): Promise; }; @@ -17667,7 +17732,7 @@ interface PushManager { declare var PushManager: { prototype: PushManager; new(): PushManager; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings_static) */ readonly supportedContentEncodings: ReadonlyArray; }; @@ -18112,7 +18177,7 @@ interface RTCPeerConnection extends EventTarget { declare var RTCPeerConnection: { prototype: RTCPeerConnection; new(configuration?: RTCConfiguration): RTCPeerConnection; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/generateCertificate) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/generateCertificate_static) */ generateCertificate(keygenAlgorithm: AlgorithmIdentifier): Promise; }; @@ -18172,7 +18237,7 @@ interface RTCRtpReceiver { declare var RTCRtpReceiver: { prototype: RTCRtpReceiver; new(): RTCRtpReceiver; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/getCapabilities) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpReceiver/getCapabilities_static) */ getCapabilities(kind: string): RTCRtpCapabilities | null; }; @@ -18203,7 +18268,7 @@ interface RTCRtpSender { declare var RTCRtpSender: { prototype: RTCRtpSender; new(): RTCRtpSender; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/getCapabilities) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpSender/getCapabilities_static) */ getCapabilities(kind: string): RTCRtpCapabilities | null; }; @@ -18748,9 +18813,11 @@ interface Response extends Body { declare var Response: { prototype: Response; new(body?: BodyInit | null, init?: ResponseInit): Response; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error_static) */ error(): Response; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */ + json(data: any, init?: ResponseInit): Response; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */ redirect(url: string | URL, status?: number): Response; }; @@ -20915,8 +20982,6 @@ interface ScreenOrientation extends EventTarget { onchange: ((this: ScreenOrientation, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/type) */ readonly type: OrientationType; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/lock) */ - lock(orientation: OrientationLockType): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ScreenOrientation/unlock) */ unlock(): void; addEventListener(type: K, listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -21110,7 +21175,6 @@ interface ServiceWorkerContainer extends EventTarget { oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/message_event) */ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/messageerror_event) */ onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/ready) */ readonly ready: Promise; @@ -21847,7 +21911,7 @@ interface TextDecoder extends TextDecoderCommon { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode) */ - decode(input?: BufferSource, options?: TextDecodeOptions): string; + decode(input?: AllowSharedBufferSource, options?: TextDecodeOptions): string; } declare var TextDecoder: { @@ -22229,6 +22293,19 @@ declare var TimeRanges: { new(): TimeRanges; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */ +interface ToggleEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */ + readonly newState: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */ + readonly oldState: string; +} + +declare var ToggleEvent: { + prototype: ToggleEvent; + new(type: string, eventInitDict?: ToggleEventInit): ToggleEvent; +}; + /** * A single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad. * @@ -22481,9 +22558,11 @@ interface URL { declare var URL: { prototype: URL; new(url: string | URL, base?: string | URL): URL; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ + canParse(url: string | URL, base?: string): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */ createObjectURL(obj: Blob | MediaSource): string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */ revokeObjectURL(url: string): void; }; @@ -22492,6 +22571,8 @@ declare var webkitURL: typeof URL; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */ interface URLSearchParams { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */ + readonly size: number; /** * Appends a specified key/value pair as a new search parameter. * @@ -22503,7 +22584,7 @@ interface URLSearchParams { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete) */ - delete(name: string): void; + delete(name: string, value?: string): void; /** * Returns the first value associated to the given search parameter. * @@ -22521,7 +22602,7 @@ interface URLSearchParams { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has) */ - has(name: string): boolean; + has(name: string, value?: string): boolean; /** * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. * @@ -22621,6 +22702,7 @@ declare var VTTRegion: { interface ValidityState { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/badInput) */ readonly badInput: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/customError) */ readonly customError: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/patternMismatch) */ readonly patternMismatch: boolean; @@ -22636,7 +22718,9 @@ interface ValidityState { readonly tooShort: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/typeMismatch) */ readonly typeMismatch: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/valid) */ readonly valid: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/valueMissing) */ readonly valueMissing: boolean; } @@ -25351,6 +25435,96 @@ declare var WebSocket: { readonly CLOSED: 3; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport) + */ +interface WebTransport { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed) */ + readonly closed: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/datagrams) */ + readonly datagrams: WebTransportDatagramDuplexStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingBidirectionalStreams) */ + readonly incomingBidirectionalStreams: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams) */ + readonly incomingUnidirectionalStreams: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready) */ + readonly ready: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/close) */ + close(closeInfo?: WebTransportCloseInfo): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createBidirectionalStream) */ + createBidirectionalStream(options?: WebTransportSendStreamOptions): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream) */ + createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise; +} + +declare var WebTransport: { + prototype: WebTransport; + new(url: string | URL, options?: WebTransportOptions): WebTransport; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream) + */ +interface WebTransportBidirectionalStream { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/readable) */ + readonly readable: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/writable) */ + readonly writable: WritableStream; +} + +declare var WebTransportBidirectionalStream: { + prototype: WebTransportBidirectionalStream; + new(): WebTransportBidirectionalStream; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream) + */ +interface WebTransportDatagramDuplexStream { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark) */ + incomingHighWaterMark: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge) */ + incomingMaxAge: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/maxDatagramSize) */ + readonly maxDatagramSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark) */ + outgoingHighWaterMark: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge) */ + outgoingMaxAge: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/readable) */ + readonly readable: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable) */ + readonly writable: WritableStream; +} + +declare var WebTransportDatagramDuplexStream: { + prototype: WebTransportDatagramDuplexStream; + new(): WebTransportDatagramDuplexStream; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError) + */ +interface WebTransportError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/source) */ + readonly source: WebTransportErrorSource; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/streamErrorCode) */ + readonly streamErrorCode: number | null; +} + +declare var WebTransportError: { + prototype: WebTransportError; + new(message?: string, options?: WebTransportErrorOptions): WebTransportError; +}; + /** * Events that occur due to the user moving a mouse wheel or similar input device. * @@ -26294,96 +26468,120 @@ declare var console: Console; /** Holds useful CSS-related methods. No object with this interface are implemented: it contains only static methods and therefore is a utilitarian interface. */ declare namespace CSS { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/Hz) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function Hz(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/Q) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function Q(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/ch) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function ch(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/cm) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cm(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqb(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqh(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqi(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqmax(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqmin(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function cqw(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/deg) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function deg(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/dpcm) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dpcm(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/dpi) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dpi(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/dppx) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dppx(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvb(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvh(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvi(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvmax(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvmin(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function dvw(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/em) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function em(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/escape) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/escape_static) */ function escape(ident: string): string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/ex) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function ex(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/fr) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function fr(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/grad) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function grad(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/kHz) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function kHz(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvb(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvh(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvi(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvmax(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvmin(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function lvw(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/mm) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function mm(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/ms) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function ms(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/number) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function number(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/pc) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function pc(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/percent) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function percent(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/pt) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function pt(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/px) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function px(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/rad) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function rad(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/registerProperty) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/registerProperty_static) */ function registerProperty(definition: PropertyDefinition): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/rem) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function rem(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/s) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function s(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/supports) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/supports_static) */ function supports(property: string, value: string): boolean; function supports(conditionText: string): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svb(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svh(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svi(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svmax(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svmin(value: number): CSSUnitValue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function svw(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/turn) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function turn(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vb) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vb(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vh) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vh(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vi) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vi(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vmax) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vmax(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vmin) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vmin(value: number): CSSUnitValue; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/vw) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSS/factory_functions_static) */ function vw(value: number): CSSUnitValue; } @@ -26398,16 +26596,16 @@ declare namespace WebAssembly { }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global) */ - interface Global { + interface Global { /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/value) */ - value: any; + value: ValueTypeMap[T]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/valueOf) */ - valueOf(): any; + valueOf(): ValueTypeMap[T]; } var Global: { prototype: Global; - new(descriptor: GlobalDescriptor, v?: any): Global; + new(descriptor: GlobalDescriptor, v?: ValueTypeMap[T]): Global; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance) */ @@ -26484,9 +26682,9 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; - interface GlobalDescriptor { + interface GlobalDescriptor { mutable?: boolean; - value: ValueType; + value: T; } interface MemoryDescriptor { @@ -26512,6 +26710,16 @@ declare namespace WebAssembly { maximum?: number; } + interface ValueTypeMap { + anyfunc: Function; + externref: any; + f32: number; + f64: number; + i32: number; + i64: bigint; + v128: never; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; @@ -26519,12 +26727,12 @@ declare namespace WebAssembly { type ImportExportKind = "function" | "global" | "memory" | "table"; type TableKind = "anyfunc" | "externref"; - type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; + type ValueType = keyof ValueTypeMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) */ function compile(bytes: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming) */ @@ -27368,7 +27576,7 @@ declare var onended: ((this: Window, ev: Event) => any) | null; * Fires when an error occurs during object loading. * @param ev The event. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/error_event) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */ declare var onerror: OnErrorEventHandler; /** @@ -27546,6 +27754,8 @@ declare var onresize: ((this: Window, ev: UIEvent) => any) | null; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scroll_event) */ declare var onscroll: ((this: Window, ev: Event) => any) | null; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scrollend_event) */ +declare var onscrollend: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/securitypolicyviolation_event) */ declare var onsecuritypolicyviolation: ((this: Window, ev: SecurityPolicyViolationEvent) => any) | null; /** @@ -27742,6 +27952,10 @@ declare function addEventListener(type: string, listener: EventListenerOrEventLi declare function removeEventListener(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; type AlgorithmIdentifier = Algorithm | string; +type AllowSharedBufferSource = ArrayBuffer | ArrayBufferView; +type AutoFill = AutoFillBase | `${OptionalPrefixToken}${OptionalPrefixToken}${AutoFillField}${OptionalPostfixToken}`; +type AutoFillField = AutoFillNormalField | `${OptionalPrefixToken}${AutoFillContactField}`; +type AutoFillSection = `section-${string}`; type BigInteger = Uint8Array; type BinaryData = ArrayBuffer | ArrayBufferView; type BlobPart = BufferSource | Blob | string; @@ -27792,6 +28006,8 @@ type NamedCurve = string; type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null; type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; +type OptionalPostfixToken = ` ${T}` | ""; +type OptionalPrefixToken = `${T} ` | ""; type PerformanceEntryList = PerformanceEntry[]; type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; @@ -27816,6 +28032,12 @@ type AudioContextLatencyCategory = "balanced" | "interactive" | "playback"; type AudioContextState = "closed" | "running" | "suspended"; type AuthenticatorAttachment = "cross-platform" | "platform"; type AuthenticatorTransport = "ble" | "hybrid" | "internal" | "nfc" | "usb"; +type AutoFillAddressKind = "billing" | "shipping"; +type AutoFillBase = "" | "off" | "on"; +type AutoFillContactField = "email" | "tel" | "tel-area-code" | "tel-country-code" | "tel-extension" | "tel-local" | "tel-local-prefix" | "tel-local-suffix" | "tel-national"; +type AutoFillContactKind = "home" | "mobile" | "work"; +type AutoFillCredentialField = "webauthn"; +type AutoFillNormalField = "additional-name" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "address-line1" | "address-line2" | "address-line3" | "bday-day" | "bday-month" | "bday-year" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-family-name" | "cc-given-name" | "cc-name" | "cc-number" | "cc-type" | "country" | "country-name" | "current-password" | "family-name" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name" | "new-password" | "one-time-code" | "organization" | "postal-code" | "street-address" | "transaction-amount" | "transaction-currency" | "username"; type AutoKeyword = "auto"; type AutomationRate = "a-rate" | "k-rate"; type AvcBitstreamFormat = "annexb" | "avc"; @@ -27898,7 +28120,6 @@ type NavigationTimingType = "back_forward" | "navigate" | "prerender" | "reload" type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationPermission = "default" | "denied" | "granted"; type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu"; -type OrientationLockType = "any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary"; type OrientationType = "landscape-primary" | "landscape-secondary" | "portrait-primary" | "portrait-secondary"; type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle"; type OverSampleType = "2x" | "4x" | "none"; @@ -27936,7 +28157,7 @@ type RTCSctpTransportState = "closed" | "connected" | "connecting"; type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback"; type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable"; type RTCStatsIceCandidatePairState = "failed" | "frozen" | "in-progress" | "inprogress" | "succeeded" | "waiting"; -type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "track" | "transport"; +type RTCStatsType = "candidate-pair" | "certificate" | "codec" | "data-channel" | "inbound-rtp" | "local-candidate" | "media-source" | "outbound-rtp" | "peer-connection" | "remote-candidate" | "remote-inbound-rtp" | "remote-outbound-rtp" | "transport"; type ReadableStreamReaderMode = "byob"; type ReadableStreamType = "bytes"; type ReadyState = "closed" | "ended" | "open"; @@ -27976,6 +28197,8 @@ type VideoPixelFormat = "BGRA" | "BGRX" | "I420" | "I420A" | "I422" | "I444" | " type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m"; type WakeLockType = "screen"; type WebGLPowerPreference = "default" | "high-performance" | "low-power"; +type WebTransportCongestionControl = "default" | "low-latency" | "throughput"; +type WebTransportErrorSource = "session" | "stream"; type WorkerType = "classic" | "module"; type WriteCommandType = "seek" | "truncate" | "write"; type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; diff --git a/node_modules/typescript/lib/lib.es2015.collection.d.ts b/node_modules/typescript/lib/lib.es2015.collection.d.ts index b97201ae48..f94c48543e 100644 --- a/node_modules/typescript/lib/lib.es2015.collection.d.ts +++ b/node_modules/typescript/lib/lib.es2015.collection.d.ts @@ -60,7 +60,7 @@ interface ReadonlyMap { readonly size: number; } -interface WeakMap { +interface WeakMap { /** * Removes the specified element from the WeakMap. * @returns true if the element was successfully removed, or false if it was not present. @@ -76,14 +76,14 @@ interface WeakMap { has(key: K): boolean; /** * Adds a new element with a specified key and value. - * @param key Must be an object. + * @param key Must be an object or symbol. */ set(key: K, value: V): this; } interface WeakMapConstructor { - new (entries?: readonly (readonly [K, V])[] | null): WeakMap; - readonly prototype: WeakMap; + new (entries?: readonly (readonly [K, V])[] | null): WeakMap; + readonly prototype: WeakMap; } declare var WeakMap: WeakMapConstructor; @@ -125,9 +125,9 @@ interface ReadonlySet { readonly size: number; } -interface WeakSet { +interface WeakSet { /** - * Appends a new object to the end of the WeakSet. + * Appends a new value to the end of the WeakSet. */ add(value: T): this; /** @@ -136,13 +136,13 @@ interface WeakSet { */ delete(value: T): boolean; /** - * @returns a boolean indicating whether an object exists in the WeakSet or not. + * @returns a boolean indicating whether a value exists in the WeakSet or not. */ has(value: T): boolean; } interface WeakSetConstructor { - new (values?: readonly T[] | null): WeakSet; - readonly prototype: WeakSet; + new (values?: readonly T[] | null): WeakSet; + readonly prototype: WeakSet; } declare var WeakSet: WeakSetConstructor; diff --git a/node_modules/typescript/lib/lib.es2015.core.d.ts b/node_modules/typescript/lib/lib.es2015.core.d.ts index 1ca098d8a4..ecd2e029ef 100644 --- a/node_modules/typescript/lib/lib.es2015.core.d.ts +++ b/node_modules/typescript/lib/lib.es2015.core.d.ts @@ -56,10 +56,10 @@ interface Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; } interface ArrayConstructor { diff --git a/node_modules/typescript/lib/lib.es2015.iterable.d.ts b/node_modules/typescript/lib/lib.es2015.iterable.d.ts index 31be935fea..7aa2601f4d 100644 --- a/node_modules/typescript/lib/lib.es2015.iterable.d.ts +++ b/node_modules/typescript/lib/lib.es2015.iterable.d.ts @@ -159,10 +159,10 @@ interface MapConstructor { new (iterable?: Iterable | null): Map; } -interface WeakMap { } +interface WeakMap { } interface WeakMapConstructor { - new (iterable: Iterable): WeakMap; + new (iterable: Iterable): WeakMap; } interface Set { @@ -207,10 +207,10 @@ interface SetConstructor { new (iterable?: Iterable | null): Set; } -interface WeakSet { } +interface WeakSet { } interface WeakSetConstructor { - new (iterable: Iterable): WeakSet; + new (iterable: Iterable): WeakSet; } interface Promise { } diff --git a/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts b/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts index f2d9b4f0a0..06bcc35b3d 100644 --- a/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +++ b/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts @@ -137,7 +137,7 @@ interface Map { readonly [Symbol.toStringTag]: string; } -interface WeakMap { +interface WeakMap { readonly [Symbol.toStringTag]: string; } @@ -145,7 +145,7 @@ interface Set { readonly [Symbol.toStringTag]: string; } -interface WeakSet { +interface WeakSet { readonly [Symbol.toStringTag]: string; } diff --git a/node_modules/typescript/lib/lib.es2017.d.ts b/node_modules/typescript/lib/lib.es2017.d.ts index bbeabf4225..e0bd4eeb72 100644 --- a/node_modules/typescript/lib/lib.es2017.d.ts +++ b/node_modules/typescript/lib/lib.es2017.d.ts @@ -22,3 +22,4 @@ and limitations under the License. /// /// /// +/// diff --git a/node_modules/typescript/lib/lib.es2017.date.d.ts b/node_modules/typescript/lib/lib.es2017.date.d.ts new file mode 100644 index 0000000000..6f137ba524 --- /dev/null +++ b/node_modules/typescript/lib/lib.es2017.date.d.ts @@ -0,0 +1,31 @@ +/*! ***************************************************************************** +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 + +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. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + +/// + +interface DateConstructor { + /** + * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. + * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. + * @param monthIndex The month as a number between 0 and 11 (January to December). + * @param date The date as a number between 1 and 31. + * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour. + * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes. + * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. + * @param ms A number from 0 to 999 that specifies the milliseconds. + */ + UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; +} diff --git a/node_modules/typescript/lib/lib.es2020.bigint.d.ts b/node_modules/typescript/lib/lib.es2020.bigint.d.ts index f7727a6ac5..73df22e21e 100644 --- a/node_modules/typescript/lib/lib.es2020.bigint.d.ts +++ b/node_modules/typescript/lib/lib.es2020.bigint.d.ts @@ -165,10 +165,10 @@ interface BigInt64Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, bigint]>; @@ -437,10 +437,10 @@ interface BigUint64Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** Yields index, value pairs for every entry in the array. */ entries(): IterableIterator<[number, bigint]>; diff --git a/node_modules/typescript/lib/lib.es2021.weakref.d.ts b/node_modules/typescript/lib/lib.es2021.weakref.d.ts index 9ff32d0dda..3a8be269a7 100644 --- a/node_modules/typescript/lib/lib.es2021.weakref.d.ts +++ b/node_modules/typescript/lib/lib.es2021.weakref.d.ts @@ -16,12 +16,13 @@ and limitations under the License. /// -interface WeakRef { +interface WeakRef { readonly [Symbol.toStringTag]: "WeakRef"; /** - * Returns the WeakRef instance's target object, or undefined if the target object has been + * Returns the WeakRef instance's target value, or undefined if the target value has been * reclaimed. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. */ deref(): T | undefined; } @@ -30,10 +31,11 @@ interface WeakRefConstructor { readonly prototype: WeakRef; /** - * Creates a WeakRef instance for the given target object. - * @param target The target object for the WeakRef instance. + * Creates a WeakRef instance for the given target value. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value for the WeakRef instance. */ - new(target: T): WeakRef; + new(target: T): WeakRef; } declare var WeakRef: WeakRefConstructor; @@ -42,22 +44,23 @@ interface FinalizationRegistry { readonly [Symbol.toStringTag]: "FinalizationRegistry"; /** - * Registers an object with the registry. - * @param target The target object to register. - * @param heldValue The value to pass to the finalizer for this object. This cannot be the - * target object. + * Registers a value with the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. + * @param target The target value to register. + * @param heldValue The value to pass to the finalizer for this value. This cannot be the + * target value. * @param unregisterToken The token to pass to the unregister method to unregister the target - * object. If provided (and not undefined), this must be an object. If not provided, the target - * cannot be unregistered. + * value. If not provided, the target cannot be unregistered. */ - register(target: object, heldValue: T, unregisterToken?: object): void; + register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void; /** - * Unregisters an object from the registry. + * Unregisters a value from the registry. + * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. * @param unregisterToken The token that was used as the unregisterToken argument when calling - * register to register the target object. + * register to register the target value. */ - unregister(unregisterToken: object): void; + unregister(unregisterToken: WeakKey): void; } interface FinalizationRegistryConstructor { @@ -65,7 +68,7 @@ interface FinalizationRegistryConstructor { /** * Creates a finalization registry with an associated cleanup callback - * @param cleanupCallback The callback to call after an object in the registry has been reclaimed. + * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. */ new(cleanupCallback: (heldValue: T) => void): FinalizationRegistry; } diff --git a/node_modules/typescript/lib/lib.es2023.array.d.ts b/node_modules/typescript/lib/lib.es2023.array.d.ts index 9b01b26bde..d8d5cc9cb6 100644 --- a/node_modules/typescript/lib/lib.es2023.array.d.ts +++ b/node_modules/typescript/lib/lib.es2023.array.d.ts @@ -39,6 +39,50 @@ interface Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number; + + /** + * Returns a copy of an array with its elements reversed. + */ + toReversed(): T[]; + + /** + * Returns a copy of an array with its elements sorted. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; + + /** + * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns The copied array. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; + + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to write into the copied array. + * @returns The copied array with the updated value. + */ + with(index: number, value: T): T[]; } interface ReadonlyArray { @@ -51,8 +95,14 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T | undefined; + findLast( + predicate: (value: T, index: number, array: readonly T[]) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any + ): T | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -63,7 +113,54 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): number; + findLastIndex( + predicate: (value: T, index: number, array: readonly T[]) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copied array with all of its elements reversed. + */ + toReversed(): T[]; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: T, b: T) => number): T[]; + + /** + * Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @param items Elements to insert into the copied array in place of the deleted elements. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount: number, ...items: T[]): T[]; + + /** + * Copies an array and removes elements while returning the remaining elements. + * @param start The zero-based location in the array from which to start removing elements. + * @param deleteCount The number of elements to remove. + * @returns A copy of the original array with the remaining elements. + */ + toSpliced(start: number, deleteCount?: number): T[]; + + /** + * Copies an array, then overwrites the value at the provided index with the + * given value. If the index is negative, then it replaces from the end + * of the array + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: T): T[]; } interface Int8Array { @@ -76,8 +173,18 @@ interface Int8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Int8Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Int8Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Int8Array) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -88,7 +195,36 @@ interface Int8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: (value: number, index: number, array: Int8Array) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Uint8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8Array; } interface Uint8Array { @@ -101,8 +237,18 @@ interface Uint8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Uint8Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint8Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Uint8Array) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -113,7 +259,36 @@ interface Uint8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: (value: number, index: number, array: Uint8Array) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Uint8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8Array; } interface Uint8ClampedArray { @@ -126,8 +301,22 @@ interface Uint8ClampedArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Uint8ClampedArray) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint8ClampedArray + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint8ClampedArray + ) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -138,7 +327,40 @@ interface Uint8ClampedArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: number, + index: number, + array: Uint8ClampedArray + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint8ClampedArray; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint8ClampedArray; } interface Int16Array { @@ -151,8 +373,18 @@ interface Int16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Int16Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Int16Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Int16Array) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -163,7 +395,36 @@ interface Int16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: (value: number, index: number, array: Int16Array) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int16Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Int16Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int16Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int16Array; } interface Uint16Array { @@ -176,8 +437,22 @@ interface Uint16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Uint16Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint16Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint16Array + ) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -188,7 +463,40 @@ interface Uint16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: number, + index: number, + array: Uint16Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint16Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Uint16Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint16Array; } interface Int32Array { @@ -201,8 +509,18 @@ interface Int32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Int32Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Int32Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: (value: number, index: number, array: Int32Array) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -213,7 +531,36 @@ interface Int32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: (value: number, index: number, array: Int32Array) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Int32Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Int32Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Int32Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Int32Array; } interface Uint32Array { @@ -226,8 +573,22 @@ interface Uint32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Uint32Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint32Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Uint32Array + ) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -238,7 +599,40 @@ interface Uint32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: number, + index: number, + array: Uint32Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Uint32Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Uint32Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Uint32Array; } interface Float32Array { @@ -251,8 +645,22 @@ interface Float32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Float32Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Float32Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Float32Array + ) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -263,7 +671,40 @@ interface Float32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: number, + index: number, + array: Float32Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float32Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float32Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float32Array; } interface Float64Array { @@ -276,8 +717,22 @@ interface Float64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: number, index: number, array: Float64Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Float64Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: number, + index: number, + array: Float64Array + ) => unknown, + thisArg?: any + ): number | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -288,7 +743,40 @@ interface Float64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: number, + index: number, + array: Float64Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): Float64Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] + * ``` + */ + toSorted(compareFn?: (a: number, b: number) => number): Float64Array; + + /** + * Copies the array and inserts the given number at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: number): Float64Array; } interface BigInt64Array { @@ -301,8 +789,22 @@ interface BigInt64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: bigint, index: number, array: BigInt64Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): bigint | undefined; + findLast( + predicate: ( + value: bigint, + index: number, + array: BigInt64Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: bigint, + index: number, + array: BigInt64Array + ) => unknown, + thisArg?: any + ): bigint | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -313,7 +815,40 @@ interface BigInt64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: BigInt64Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigInt64Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; + + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigInt64Array; } interface BigUint64Array { @@ -326,8 +861,22 @@ interface BigUint64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLast(predicate: (value: bigint, index: number, array: BigUint64Array) => value is S, thisArg?: any): S | undefined; - findLast(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): bigint | undefined; + findLast( + predicate: ( + value: bigint, + index: number, + array: BigUint64Array + ) => value is S, + thisArg?: any + ): S | undefined; + findLast( + predicate: ( + value: bigint, + index: number, + array: BigUint64Array + ) => unknown, + thisArg?: any + ): bigint | undefined; /** * Returns the index of the last element in the array where predicate is true, and -1 @@ -338,5 +887,38 @@ interface BigUint64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findLastIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, thisArg?: any): number; + findLastIndex( + predicate: ( + value: bigint, + index: number, + array: BigUint64Array + ) => unknown, + thisArg?: any + ): number; + + /** + * Copies the array and returns the copy with the elements in reverse order. + */ + toReversed(): BigUint64Array; + + /** + * Copies and sorts the array. + * @param compareFn Function used to determine the order of the elements. It is expected to return + * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive + * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] + * ``` + */ + toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; + + /** + * Copies the array and inserts the given bigint at the provided index. + * @param index The index of the value to overwrite. If the index is + * negative, then it replaces from the end of the array. + * @param value The value to insert into the copied array. + * @returns A copy of the original array with the inserted value. + */ + with(index: number, value: bigint): BigUint64Array; } diff --git a/node_modules/typescript/lib/lib.es2023.collection.d.ts b/node_modules/typescript/lib/lib.es2023.collection.d.ts new file mode 100644 index 0000000000..fd4b578430 --- /dev/null +++ b/node_modules/typescript/lib/lib.es2023.collection.d.ts @@ -0,0 +1,21 @@ +/*! ***************************************************************************** +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 + +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. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + +/// + +interface WeakKeyTypes { + symbol: symbol; +} diff --git a/node_modules/typescript/lib/lib.es2023.d.ts b/node_modules/typescript/lib/lib.es2023.d.ts index d8e0657746..b70830cea5 100644 --- a/node_modules/typescript/lib/lib.es2023.d.ts +++ b/node_modules/typescript/lib/lib.es2023.d.ts @@ -18,3 +18,4 @@ and limitations under the License. /// /// +/// diff --git a/node_modules/typescript/lib/lib.es5.d.ts b/node_modules/typescript/lib/lib.es5.d.ts index 870d8a04c0..a88d3b6a0d 100644 --- a/node_modules/typescript/lib/lib.es5.d.ts +++ b/node_modules/typescript/lib/lib.es5.d.ts @@ -1665,6 +1665,15 @@ type Uncapitalize = intrinsic; */ interface ThisType { } +/** + * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry + */ +interface WeakKeyTypes { + object: object; +} + +type WeakKey = WeakKeyTypes[keyof WeakKeyTypes]; + /** * Represents a raw buffer of binary data, which is used to store data for the * different typed arrays. ArrayBuffers cannot be read from or written to directly, @@ -1880,10 +1889,10 @@ interface Int8Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** * Determines whether all the members of an array satisfy the specified test. @@ -2162,10 +2171,10 @@ interface Uint8Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** * Determines whether all the members of an array satisfy the specified test. @@ -2444,10 +2453,10 @@ interface Uint8ClampedArray { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** * Determines whether all the members of an array satisfy the specified test. @@ -2725,10 +2734,10 @@ interface Int16Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** * Determines whether all the members of an array satisfy the specified test. @@ -3007,10 +3016,10 @@ interface Uint16Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** * Determines whether all the members of an array satisfy the specified test. @@ -3289,10 +3298,10 @@ interface Int32Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** * Determines whether all the members of an array satisfy the specified test. @@ -3571,10 +3580,10 @@ interface Uint32Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** * Determines whether all the members of an array satisfy the specified test. @@ -3852,10 +3861,10 @@ interface Float32Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** * Determines whether all the members of an array satisfy the specified test. @@ -4135,10 +4144,10 @@ interface Float64Array { * @param target If target is negative, it is treated as length+target where length is the * length of the array. * @param start If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. If start is omitted, `0` is used. + * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ - copyWithin(target: number, start?: number, end?: number): this; + copyWithin(target: number, start: number, end?: number): this; /** * Determines whether all the members of an array satisfy the specified test. diff --git a/node_modules/typescript/lib/lib.esnext.d.ts b/node_modules/typescript/lib/lib.esnext.d.ts index e04d1f8b73..a788452494 100644 --- a/node_modules/typescript/lib/lib.esnext.d.ts +++ b/node_modules/typescript/lib/lib.esnext.d.ts @@ -18,3 +18,5 @@ and limitations under the License. /// /// +/// +/// diff --git a/node_modules/typescript/lib/lib.esnext.decorators.d.ts b/node_modules/typescript/lib/lib.esnext.decorators.d.ts new file mode 100644 index 0000000000..c919b3f2ee --- /dev/null +++ b/node_modules/typescript/lib/lib.esnext.decorators.d.ts @@ -0,0 +1,28 @@ +/*! ***************************************************************************** +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 + +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. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + +/// + +/// +/// + +interface SymbolConstructor { + readonly metadata: unique symbol; +} + +interface Function { + [Symbol.metadata]: DecoratorMetadata | null; +} diff --git a/node_modules/typescript/lib/lib.esnext.disposable.d.ts b/node_modules/typescript/lib/lib.esnext.disposable.d.ts new file mode 100644 index 0000000000..2051e48885 --- /dev/null +++ b/node_modules/typescript/lib/lib.esnext.disposable.d.ts @@ -0,0 +1,185 @@ +/*! ***************************************************************************** +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 + +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. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + + +/// + +/// + +interface SymbolConstructor { + /** + * A method that is used to release resources held by an object. Called by the semantics of the `using` statement. + */ + readonly dispose: unique symbol; + + /** + * A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement. + */ + readonly asyncDispose: unique symbol; +} + +interface Disposable { + [Symbol.dispose](): void; +} + +interface AsyncDisposable { + [Symbol.asyncDispose](): PromiseLike; +} + +interface SuppressedError extends Error { + error: any; + suppressed: any; +} + +interface SuppressedErrorConstructor extends ErrorConstructor { + new (error: any, suppressed: any, message?: string): SuppressedError; + (error: any, suppressed: any, message?: string): SuppressedError; + readonly prototype: SuppressedError; +} +declare var SuppressedError: SuppressedErrorConstructor; + +interface DisposableStack { + /** + * Returns a value indicating whether this stack has been disposed. + */ + readonly disposed: boolean; + /** + * Disposes each resource in the stack in the reverse order that they were added. + */ + dispose(): void; + /** + * Adds a disposable resource to the stack, returning the resource. + * @param value The resource to add. `null` and `undefined` will not be added, but will be returned. + * @returns The provided {@link value}. + */ + use(value: T): T; + /** + * Adds a value and associated disposal callback as a resource to the stack. + * @param value The value to add. + * @param onDispose The callback to use in place of a `[Symbol.dispose]()` method. Will be invoked with `value` + * as the first parameter. + * @returns The provided {@link value}. + */ + adopt(value: T, onDispose: (value: T) => void): T; + /** + * Adds a callback to be invoked when the stack is disposed. + */ + defer(onDispose: () => void): void; + /** + * Move all resources out of this stack and into a new `DisposableStack`, and marks this stack as disposed. + * @example + * ```ts + * class C { + * #res1: Disposable; + * #res2: Disposable; + * #disposables: DisposableStack; + * constructor() { + * // stack will be disposed when exiting constructor for any reason + * using stack = new DisposableStack(); + * + * // get first resource + * this.#res1 = stack.use(getResource1()); + * + * // get second resource. If this fails, both `stack` and `#res1` will be disposed. + * this.#res2 = stack.use(getResource2()); + * + * // all operations succeeded, move resources out of `stack` so that they aren't disposed + * // when constructor exits + * this.#disposables = stack.move(); + * } + * + * [Symbol.dispose]() { + * this.#disposables.dispose(); + * } + * } + * ``` + */ + move(): DisposableStack; + [Symbol.dispose](): void; + readonly [Symbol.toStringTag]: string; +} + +interface DisposableStackConstructor { + new(): DisposableStack; + readonly prototype: DisposableStack; +} +declare var DisposableStack: DisposableStackConstructor; + +interface AsyncDisposableStack { + /** + * Returns a value indicating whether this stack has been disposed. + */ + readonly disposed: boolean; + /** + * Disposes each resource in the stack in the reverse order that they were added. + */ + disposeAsync(): Promise; + /** + * Adds a disposable resource to the stack, returning the resource. + * @param value The resource to add. `null` and `undefined` will not be added, but will be returned. + * @returns The provided {@link value}. + */ + use(value: T): T; + /** + * Adds a value and associated disposal callback as a resource to the stack. + * @param value The value to add. + * @param onDisposeAsync The callback to use in place of a `[Symbol.asyncDispose]()` method. Will be invoked with `value` + * as the first parameter. + * @returns The provided {@link value}. + */ + adopt(value: T, onDisposeAsync: (value: T) => PromiseLike | void): T; + /** + * Adds a callback to be invoked when the stack is disposed. + */ + defer(onDisposeAsync: () => PromiseLike | void): void; + /** + * Move all resources out of this stack and into a new `DisposableStack`, and marks this stack as disposed. + * @example + * ```ts + * class C { + * #res1: Disposable; + * #res2: Disposable; + * #disposables: DisposableStack; + * constructor() { + * // stack will be disposed when exiting constructor for any reason + * using stack = new DisposableStack(); + * + * // get first resource + * this.#res1 = stack.use(getResource1()); + * + * // get second resource. If this fails, both `stack` and `#res1` will be disposed. + * this.#res2 = stack.use(getResource2()); + * + * // all operations succeeded, move resources out of `stack` so that they aren't disposed + * // when constructor exits + * this.#disposables = stack.move(); + * } + * + * [Symbol.dispose]() { + * this.#disposables.dispose(); + * } + * } + * ``` + */ + move(): AsyncDisposableStack; + [Symbol.asyncDispose](): Promise; + readonly [Symbol.toStringTag]: string; +} + +interface AsyncDisposableStackConstructor { + new(): AsyncDisposableStack; + readonly prototype: AsyncDisposableStack; +} +declare var AsyncDisposableStack: AsyncDisposableStackConstructor; diff --git a/node_modules/typescript/lib/lib.webworker.d.ts b/node_modules/typescript/lib/lib.webworker.d.ts index b4e21e234c..e371b06f9e 100644 --- a/node_modules/typescript/lib/lib.webworker.d.ts +++ b/node_modules/typescript/lib/lib.webworker.d.ts @@ -454,7 +454,7 @@ interface NotificationOptions { lang?: string; renotify?: boolean; requireInteraction?: boolean; - silent?: boolean; + silent?: boolean | null; tag?: string; timestamp?: EpochTimeStamp; vibrate?: VibratePattern; @@ -539,7 +539,6 @@ interface RTCEncodedAudioFrameMetadata { } interface RTCEncodedVideoFrameMetadata { - contributingSources?: number[]; dependencies?: number[]; frameId?: number; height?: number; @@ -709,8 +708,8 @@ interface TextDecoderOptions { } interface TextEncoderEncodeIntoResult { - read?: number; - written?: number; + read: number; + written: number; } interface Transformer { @@ -866,6 +865,32 @@ interface WebGLContextEventInit extends EventInit { statusMessage?: string; } +interface WebTransportCloseInfo { + closeCode?: number; + reason?: string; +} + +interface WebTransportErrorOptions { + source?: WebTransportErrorSource; + streamErrorCode?: number | null; +} + +interface WebTransportHash { + algorithm?: string; + value?: BufferSource; +} + +interface WebTransportOptions { + allowPooling?: boolean; + congestionControl?: WebTransportCongestionControl; + requireUnreliable?: boolean; + serverCertificateHashes?: WebTransportHash[]; +} + +interface WebTransportSendStreamOptions { + sendOrder?: number | null; +} + interface WorkerOptions { credentials?: RequestCredentials; name?: string; @@ -950,9 +975,9 @@ interface AbortSignal extends EventTarget { declare var AbortSignal: { prototype: AbortSignal; new(): AbortSignal; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */ abort(reason?: any): AbortSignal; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */ timeout(milliseconds: number): AbortSignal; }; @@ -1633,6 +1658,8 @@ interface CanvasShadowStyles { } interface CanvasState { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/reset) */ + reset(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/restore) */ restore(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/save) */ @@ -2083,7 +2110,7 @@ interface DOMPoint extends DOMPointReadOnly { declare var DOMPoint: { prototype: DOMPoint; new(x?: number, y?: number, z?: number, w?: number): DOMPoint; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint_static) */ fromPoint(other?: DOMPointInit): DOMPoint; }; @@ -2106,7 +2133,7 @@ interface DOMPointReadOnly { declare var DOMPointReadOnly: { prototype: DOMPointReadOnly; new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static) */ fromPoint(other?: DOMPointInit): DOMPointReadOnly; }; @@ -2170,7 +2197,7 @@ interface DOMRectReadOnly { declare var DOMRectReadOnly: { prototype: DOMRectReadOnly; new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect_static) */ fromRect(other?: DOMRectInit): DOMRectReadOnly; }; @@ -2878,11 +2905,11 @@ interface FileSystemSyncAccessHandle { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/getSize) */ getSize(): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/read) */ - read(buffer: BufferSource, options?: FileSystemReadWriteOptions): number; + read(buffer: AllowSharedBufferSource, options?: FileSystemReadWriteOptions): number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/truncate) */ truncate(newSize: number): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/write) */ - write(buffer: BufferSource, options?: FileSystemReadWriteOptions): number; + write(buffer: AllowSharedBufferSource, options?: FileSystemReadWriteOptions): number; } declare var FileSystemSyncAccessHandle: { @@ -3045,6 +3072,8 @@ interface Headers { delete(name: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */ get(name: string): string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */ + getSetCookie(): string[]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */ has(name: string): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */ @@ -3393,25 +3422,25 @@ declare var IDBKeyRange: { /** * Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/bound_static) */ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange; /** * Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound_static) */ lowerBound(lower: any, open?: boolean): IDBKeyRange; /** * Returns a new IDBKeyRange spanning only key. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/only_static) */ only(value: any): IDBKeyRange; /** * Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound_static) */ upperBound(upper: any, open?: boolean): IDBKeyRange; }; @@ -4111,6 +4140,8 @@ interface Notification extends EventTarget { onerror: ((this: Notification, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/show_event) */ onshow: ((this: Notification, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/silent) */ + readonly silent: boolean | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/tag) */ readonly tag: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/title) */ @@ -4126,7 +4157,7 @@ interface Notification extends EventTarget { declare var Notification: { prototype: Notification; new(title: string, options?: NotificationOptions): Notification; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission_static) */ readonly permission: NotificationPermission; }; @@ -4450,7 +4481,7 @@ interface PerformanceObserver { declare var PerformanceObserver: { prototype: PerformanceObserver; new(callback: PerformanceObserverCallback): PerformanceObserver; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes_static) */ readonly supportedEntryTypes: ReadonlyArray; }; @@ -4638,7 +4669,7 @@ interface PushManager { declare var PushManager: { prototype: PushManager; new(): PushManager; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings_static) */ readonly supportedContentEncodings: ReadonlyArray; }; @@ -5004,9 +5035,11 @@ interface Response extends Body { declare var Response: { prototype: Response; new(body?: BodyInit | null, init?: ResponseInit): Response; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error_static) */ error(): Response; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */ + json(data: any, init?: ResponseInit): Response; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */ redirect(url: string | URL, status?: number): Response; }; @@ -5097,7 +5130,6 @@ interface ServiceWorkerContainer extends EventTarget { oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/message_event) */ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/messageerror_event) */ onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/ready) */ readonly ready: Promise; @@ -5351,7 +5383,7 @@ interface TextDecoder extends TextDecoderCommon { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode) */ - decode(input?: BufferSource, options?: TextDecodeOptions): string; + decode(input?: AllowSharedBufferSource, options?: TextDecodeOptions): string; } declare var TextDecoder: { @@ -5559,14 +5591,18 @@ interface URL { declare var URL: { prototype: URL; new(url: string | URL, base?: string | URL): URL; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ + canParse(url: string | URL, base?: string): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */ createObjectURL(obj: Blob): string; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */ revokeObjectURL(url: string): void; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */ interface URLSearchParams { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */ + readonly size: number; /** * Appends a specified key/value pair as a new search parameter. * @@ -5578,7 +5614,7 @@ interface URLSearchParams { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete) */ - delete(name: string): void; + delete(name: string, value?: string): void; /** * Returns the first value associated to the given search parameter. * @@ -5596,7 +5632,7 @@ interface URLSearchParams { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has) */ - has(name: string): boolean; + has(name: string, value?: string): boolean; /** * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. * @@ -8197,6 +8233,96 @@ declare var WebSocket: { readonly CLOSED: 3; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport) + */ +interface WebTransport { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed) */ + readonly closed: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/datagrams) */ + readonly datagrams: WebTransportDatagramDuplexStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingBidirectionalStreams) */ + readonly incomingBidirectionalStreams: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams) */ + readonly incomingUnidirectionalStreams: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready) */ + readonly ready: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/close) */ + close(closeInfo?: WebTransportCloseInfo): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createBidirectionalStream) */ + createBidirectionalStream(options?: WebTransportSendStreamOptions): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream) */ + createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise; +} + +declare var WebTransport: { + prototype: WebTransport; + new(url: string | URL, options?: WebTransportOptions): WebTransport; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream) + */ +interface WebTransportBidirectionalStream { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/readable) */ + readonly readable: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/writable) */ + readonly writable: WritableStream; +} + +declare var WebTransportBidirectionalStream: { + prototype: WebTransportBidirectionalStream; + new(): WebTransportBidirectionalStream; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream) + */ +interface WebTransportDatagramDuplexStream { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark) */ + incomingHighWaterMark: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge) */ + incomingMaxAge: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/maxDatagramSize) */ + readonly maxDatagramSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark) */ + outgoingHighWaterMark: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge) */ + outgoingMaxAge: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/readable) */ + readonly readable: ReadableStream; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable) */ + readonly writable: WritableStream; +} + +declare var WebTransportDatagramDuplexStream: { + prototype: WebTransportDatagramDuplexStream; + new(): WebTransportDatagramDuplexStream; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError) + */ +interface WebTransportError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/source) */ + readonly source: WebTransportErrorSource; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/streamErrorCode) */ + readonly streamErrorCode: number | null; +} + +declare var WebTransportError: { + prototype: WebTransportError; + new(message?: string, options?: WebTransportErrorOptions): WebTransportError; +}; + /** * This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. * @@ -8718,16 +8844,16 @@ declare namespace WebAssembly { }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global) */ - interface Global { + interface Global { /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/value) */ - value: any; + value: ValueTypeMap[T]; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global/valueOf) */ - valueOf(): any; + valueOf(): ValueTypeMap[T]; } var Global: { prototype: Global; - new(descriptor: GlobalDescriptor, v?: any): Global; + new(descriptor: GlobalDescriptor, v?: ValueTypeMap[T]): Global; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance) */ @@ -8804,9 +8930,9 @@ declare namespace WebAssembly { new(descriptor: TableDescriptor, value?: any): Table; }; - interface GlobalDescriptor { + interface GlobalDescriptor { mutable?: boolean; - value: ValueType; + value: T; } interface MemoryDescriptor { @@ -8832,6 +8958,16 @@ declare namespace WebAssembly { maximum?: number; } + interface ValueTypeMap { + anyfunc: Function; + externref: any; + f32: number; + f64: number; + i32: number; + i64: bigint; + v128: never; + } + interface WebAssemblyInstantiatedSource { instance: Instance; module: Module; @@ -8839,12 +8975,12 @@ declare namespace WebAssembly { type ImportExportKind = "function" | "global" | "memory" | "table"; type TableKind = "anyfunc" | "externref"; - type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128"; type ExportValue = Function | Global | Memory | Table; type Exports = Record; type ImportValue = ExportValue | number; type Imports = Record; type ModuleImports = Record; + type ValueType = keyof ValueTypeMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile) */ function compile(bytes: BufferSource): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming) */ @@ -9057,6 +9193,7 @@ declare function addEventListener(type: string, listener: EventListenerOrEventLi declare function removeEventListener(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; type AlgorithmIdentifier = Algorithm | string; +type AllowSharedBufferSource = ArrayBuffer | ArrayBufferView; type BigInteger = Uint8Array; type BinaryData = ArrayBuffer | ArrayBufferView; type BlobPart = BufferSource | Blob | string; @@ -9180,6 +9317,8 @@ type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m"; type VideoPixelFormat = "BGRA" | "BGRX" | "I420" | "I420A" | "I422" | "I444" | "NV12" | "RGBA" | "RGBX"; type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m"; type WebGLPowerPreference = "default" | "high-performance" | "low-power"; +type WebTransportCongestionControl = "default" | "low-latency" | "throughput"; +type WebTransportErrorSource = "session" | "stream"; type WorkerType = "classic" | "module"; type WriteCommandType = "seek" | "truncate" | "write"; type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; diff --git a/node_modules/typescript/lib/tsc.js b/node_modules/typescript/lib/tsc.js index 5e73584630..8c0c6bfdd6 100644 --- a/node_modules/typescript/lib/tsc.js +++ b/node_modules/typescript/lib/tsc.js @@ -17,8 +17,8 @@ and limitations under the License. "use strict"; // src/compiler/corePublic.ts -var versionMajorMinor = "5.1"; -var version = "5.1.6"; +var versionMajorMinor = "5.2"; +var version = "5.2.2"; // src/compiler/core.ts var emptyArray = []; @@ -908,7 +908,7 @@ function identity(x) { function toLowerCase(x) { return x.toLowerCase(); } -var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; +var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; function toFileNameLowerCase(x) { return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x; } @@ -1145,8 +1145,8 @@ function unorderedRemoveFirstItemWhere(array, predicate) { } return false; } -function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; +function createGetCanonicalFileName(useCaseSensitiveFileNames2) { + return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase; } function patternText({ prefix, suffix }) { return `${prefix}*${suffix}`; @@ -1526,7 +1526,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return func.name; } else { const text = Function.prototype.toString.call(func); - const match = /^function\s+([\w\$]+)\s*\(/.exec(text); + const match = /^function\s+([\w$]+)\s*\(/.exec(text); return match ? match[1] : ""; } } @@ -1600,6 +1600,15 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, ); } Debug2.formatSnippetKind = formatSnippetKind; + function formatScriptKind(kind) { + return formatEnum( + kind, + ScriptKind, + /*isFlags*/ + false + ); + } + Debug2.formatScriptKind = formatScriptKind; function formatNodeFlags(flags) { return formatEnum( flags, @@ -2300,13 +2309,13 @@ ${lanes.join("\n")} })(Debug || (Debug = {})); // src/compiler/semver.ts -var versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; +var versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; var prereleaseRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i; var prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i; var buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i; var buildPartRegExp = /^[a-z0-9-]+$/i; var numericIdentifierRegExp = /^(0|[1-9]\d*)$/; -var _Version = class { +var _Version = class _Version { constructor(major, minor = 0, patch = 0, prerelease = "", build2 = "") { if (typeof major === "string") { const result = Debug.checkDefined(tryParseComponents(major), "Invalid version"); @@ -2370,8 +2379,8 @@ var _Version = class { return result; } }; +_Version.zero = new _Version(0, 0, 0, ["0"]); var Version = _Version; -Version.zero = new _Version(0, 0, 0, ["0"]); function tryParseComponents(text) { const match = versionRegExp.exec(text); if (!match) @@ -2418,14 +2427,14 @@ function comparePrereleaseIdentifiers(left, right) { } return compareValues(left.length, right.length); } -var VersionRange = class { +var VersionRange = class _VersionRange { constructor(spec) { this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray; } static tryParse(text) { const sets = parseRange(text); if (sets) { - const range = new VersionRange(""); + const range = new _VersionRange(""); range._alternatives = sets; return range; } @@ -3194,210 +3203,211 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["UndefinedKeyword"] = 157] = "UndefinedKeyword"; SyntaxKind4[SyntaxKind4["UniqueKeyword"] = 158] = "UniqueKeyword"; SyntaxKind4[SyntaxKind4["UnknownKeyword"] = 159] = "UnknownKeyword"; - SyntaxKind4[SyntaxKind4["FromKeyword"] = 160] = "FromKeyword"; - SyntaxKind4[SyntaxKind4["GlobalKeyword"] = 161] = "GlobalKeyword"; - SyntaxKind4[SyntaxKind4["BigIntKeyword"] = 162] = "BigIntKeyword"; - SyntaxKind4[SyntaxKind4["OverrideKeyword"] = 163] = "OverrideKeyword"; - SyntaxKind4[SyntaxKind4["OfKeyword"] = 164] = "OfKeyword"; - SyntaxKind4[SyntaxKind4["QualifiedName"] = 165] = "QualifiedName"; - SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 166] = "ComputedPropertyName"; - SyntaxKind4[SyntaxKind4["TypeParameter"] = 167] = "TypeParameter"; - SyntaxKind4[SyntaxKind4["Parameter"] = 168] = "Parameter"; - SyntaxKind4[SyntaxKind4["Decorator"] = 169] = "Decorator"; - SyntaxKind4[SyntaxKind4["PropertySignature"] = 170] = "PropertySignature"; - SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 171] = "PropertyDeclaration"; - SyntaxKind4[SyntaxKind4["MethodSignature"] = 172] = "MethodSignature"; - SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 173] = "MethodDeclaration"; - SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 174] = "ClassStaticBlockDeclaration"; - SyntaxKind4[SyntaxKind4["Constructor"] = 175] = "Constructor"; - SyntaxKind4[SyntaxKind4["GetAccessor"] = 176] = "GetAccessor"; - SyntaxKind4[SyntaxKind4["SetAccessor"] = 177] = "SetAccessor"; - SyntaxKind4[SyntaxKind4["CallSignature"] = 178] = "CallSignature"; - SyntaxKind4[SyntaxKind4["ConstructSignature"] = 179] = "ConstructSignature"; - SyntaxKind4[SyntaxKind4["IndexSignature"] = 180] = "IndexSignature"; - SyntaxKind4[SyntaxKind4["TypePredicate"] = 181] = "TypePredicate"; - SyntaxKind4[SyntaxKind4["TypeReference"] = 182] = "TypeReference"; - SyntaxKind4[SyntaxKind4["FunctionType"] = 183] = "FunctionType"; - SyntaxKind4[SyntaxKind4["ConstructorType"] = 184] = "ConstructorType"; - SyntaxKind4[SyntaxKind4["TypeQuery"] = 185] = "TypeQuery"; - SyntaxKind4[SyntaxKind4["TypeLiteral"] = 186] = "TypeLiteral"; - SyntaxKind4[SyntaxKind4["ArrayType"] = 187] = "ArrayType"; - SyntaxKind4[SyntaxKind4["TupleType"] = 188] = "TupleType"; - SyntaxKind4[SyntaxKind4["OptionalType"] = 189] = "OptionalType"; - SyntaxKind4[SyntaxKind4["RestType"] = 190] = "RestType"; - SyntaxKind4[SyntaxKind4["UnionType"] = 191] = "UnionType"; - SyntaxKind4[SyntaxKind4["IntersectionType"] = 192] = "IntersectionType"; - SyntaxKind4[SyntaxKind4["ConditionalType"] = 193] = "ConditionalType"; - SyntaxKind4[SyntaxKind4["InferType"] = 194] = "InferType"; - SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 195] = "ParenthesizedType"; - SyntaxKind4[SyntaxKind4["ThisType"] = 196] = "ThisType"; - SyntaxKind4[SyntaxKind4["TypeOperator"] = 197] = "TypeOperator"; - SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 198] = "IndexedAccessType"; - SyntaxKind4[SyntaxKind4["MappedType"] = 199] = "MappedType"; - SyntaxKind4[SyntaxKind4["LiteralType"] = 200] = "LiteralType"; - SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 201] = "NamedTupleMember"; - SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 202] = "TemplateLiteralType"; - SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 203] = "TemplateLiteralTypeSpan"; - SyntaxKind4[SyntaxKind4["ImportType"] = 204] = "ImportType"; - SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 205] = "ObjectBindingPattern"; - SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 206] = "ArrayBindingPattern"; - SyntaxKind4[SyntaxKind4["BindingElement"] = 207] = "BindingElement"; - SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 208] = "ArrayLiteralExpression"; - SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 209] = "ObjectLiteralExpression"; - SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 210] = "PropertyAccessExpression"; - SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 211] = "ElementAccessExpression"; - SyntaxKind4[SyntaxKind4["CallExpression"] = 212] = "CallExpression"; - SyntaxKind4[SyntaxKind4["NewExpression"] = 213] = "NewExpression"; - SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 214] = "TaggedTemplateExpression"; - SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 215] = "TypeAssertionExpression"; - SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 216] = "ParenthesizedExpression"; - SyntaxKind4[SyntaxKind4["FunctionExpression"] = 217] = "FunctionExpression"; - SyntaxKind4[SyntaxKind4["ArrowFunction"] = 218] = "ArrowFunction"; - SyntaxKind4[SyntaxKind4["DeleteExpression"] = 219] = "DeleteExpression"; - SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 220] = "TypeOfExpression"; - SyntaxKind4[SyntaxKind4["VoidExpression"] = 221] = "VoidExpression"; - SyntaxKind4[SyntaxKind4["AwaitExpression"] = 222] = "AwaitExpression"; - SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 223] = "PrefixUnaryExpression"; - SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 224] = "PostfixUnaryExpression"; - SyntaxKind4[SyntaxKind4["BinaryExpression"] = 225] = "BinaryExpression"; - SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 226] = "ConditionalExpression"; - SyntaxKind4[SyntaxKind4["TemplateExpression"] = 227] = "TemplateExpression"; - SyntaxKind4[SyntaxKind4["YieldExpression"] = 228] = "YieldExpression"; - SyntaxKind4[SyntaxKind4["SpreadElement"] = 229] = "SpreadElement"; - SyntaxKind4[SyntaxKind4["ClassExpression"] = 230] = "ClassExpression"; - SyntaxKind4[SyntaxKind4["OmittedExpression"] = 231] = "OmittedExpression"; - SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 232] = "ExpressionWithTypeArguments"; - SyntaxKind4[SyntaxKind4["AsExpression"] = 233] = "AsExpression"; - SyntaxKind4[SyntaxKind4["NonNullExpression"] = 234] = "NonNullExpression"; - SyntaxKind4[SyntaxKind4["MetaProperty"] = 235] = "MetaProperty"; - SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 236] = "SyntheticExpression"; - SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 237] = "SatisfiesExpression"; - SyntaxKind4[SyntaxKind4["TemplateSpan"] = 238] = "TemplateSpan"; - SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 239] = "SemicolonClassElement"; - SyntaxKind4[SyntaxKind4["Block"] = 240] = "Block"; - SyntaxKind4[SyntaxKind4["EmptyStatement"] = 241] = "EmptyStatement"; - SyntaxKind4[SyntaxKind4["VariableStatement"] = 242] = "VariableStatement"; - SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 243] = "ExpressionStatement"; - SyntaxKind4[SyntaxKind4["IfStatement"] = 244] = "IfStatement"; - SyntaxKind4[SyntaxKind4["DoStatement"] = 245] = "DoStatement"; - SyntaxKind4[SyntaxKind4["WhileStatement"] = 246] = "WhileStatement"; - SyntaxKind4[SyntaxKind4["ForStatement"] = 247] = "ForStatement"; - SyntaxKind4[SyntaxKind4["ForInStatement"] = 248] = "ForInStatement"; - SyntaxKind4[SyntaxKind4["ForOfStatement"] = 249] = "ForOfStatement"; - SyntaxKind4[SyntaxKind4["ContinueStatement"] = 250] = "ContinueStatement"; - SyntaxKind4[SyntaxKind4["BreakStatement"] = 251] = "BreakStatement"; - SyntaxKind4[SyntaxKind4["ReturnStatement"] = 252] = "ReturnStatement"; - SyntaxKind4[SyntaxKind4["WithStatement"] = 253] = "WithStatement"; - SyntaxKind4[SyntaxKind4["SwitchStatement"] = 254] = "SwitchStatement"; - SyntaxKind4[SyntaxKind4["LabeledStatement"] = 255] = "LabeledStatement"; - SyntaxKind4[SyntaxKind4["ThrowStatement"] = 256] = "ThrowStatement"; - SyntaxKind4[SyntaxKind4["TryStatement"] = 257] = "TryStatement"; - SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 258] = "DebuggerStatement"; - SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 259] = "VariableDeclaration"; - SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 260] = "VariableDeclarationList"; - SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 261] = "FunctionDeclaration"; - SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 262] = "ClassDeclaration"; - SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 263] = "InterfaceDeclaration"; - SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 264] = "TypeAliasDeclaration"; - SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 265] = "EnumDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 266] = "ModuleDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleBlock"] = 267] = "ModuleBlock"; - SyntaxKind4[SyntaxKind4["CaseBlock"] = 268] = "CaseBlock"; - SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 269] = "NamespaceExportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 270] = "ImportEqualsDeclaration"; - SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 271] = "ImportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportClause"] = 272] = "ImportClause"; - SyntaxKind4[SyntaxKind4["NamespaceImport"] = 273] = "NamespaceImport"; - SyntaxKind4[SyntaxKind4["NamedImports"] = 274] = "NamedImports"; - SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 275] = "ImportSpecifier"; - SyntaxKind4[SyntaxKind4["ExportAssignment"] = 276] = "ExportAssignment"; - SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 277] = "ExportDeclaration"; - SyntaxKind4[SyntaxKind4["NamedExports"] = 278] = "NamedExports"; - SyntaxKind4[SyntaxKind4["NamespaceExport"] = 279] = "NamespaceExport"; - SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 280] = "ExportSpecifier"; - SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 281] = "MissingDeclaration"; - SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 282] = "ExternalModuleReference"; - SyntaxKind4[SyntaxKind4["JsxElement"] = 283] = "JsxElement"; - SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 284] = "JsxSelfClosingElement"; - SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 285] = "JsxOpeningElement"; - SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 286] = "JsxClosingElement"; - SyntaxKind4[SyntaxKind4["JsxFragment"] = 287] = "JsxFragment"; - SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 288] = "JsxOpeningFragment"; - SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 289] = "JsxClosingFragment"; - SyntaxKind4[SyntaxKind4["JsxAttribute"] = 290] = "JsxAttribute"; - SyntaxKind4[SyntaxKind4["JsxAttributes"] = 291] = "JsxAttributes"; - SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 292] = "JsxSpreadAttribute"; - SyntaxKind4[SyntaxKind4["JsxExpression"] = 293] = "JsxExpression"; - SyntaxKind4[SyntaxKind4["JsxNamespacedName"] = 294] = "JsxNamespacedName"; - SyntaxKind4[SyntaxKind4["CaseClause"] = 295] = "CaseClause"; - SyntaxKind4[SyntaxKind4["DefaultClause"] = 296] = "DefaultClause"; - SyntaxKind4[SyntaxKind4["HeritageClause"] = 297] = "HeritageClause"; - SyntaxKind4[SyntaxKind4["CatchClause"] = 298] = "CatchClause"; - SyntaxKind4[SyntaxKind4["AssertClause"] = 299] = "AssertClause"; - SyntaxKind4[SyntaxKind4["AssertEntry"] = 300] = "AssertEntry"; - SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 301] = "ImportTypeAssertionContainer"; - SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 302] = "PropertyAssignment"; - SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 303] = "ShorthandPropertyAssignment"; - SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 304] = "SpreadAssignment"; - SyntaxKind4[SyntaxKind4["EnumMember"] = 305] = "EnumMember"; - SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 306] = "UnparsedPrologue"; - SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 307] = "UnparsedPrepend"; - SyntaxKind4[SyntaxKind4["UnparsedText"] = 308] = "UnparsedText"; - SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 309] = "UnparsedInternalText"; - SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 310] = "UnparsedSyntheticReference"; - SyntaxKind4[SyntaxKind4["SourceFile"] = 311] = "SourceFile"; - SyntaxKind4[SyntaxKind4["Bundle"] = 312] = "Bundle"; - SyntaxKind4[SyntaxKind4["UnparsedSource"] = 313] = "UnparsedSource"; - SyntaxKind4[SyntaxKind4["InputFiles"] = 314] = "InputFiles"; - SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 315] = "JSDocTypeExpression"; - SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 316] = "JSDocNameReference"; - SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 317] = "JSDocMemberName"; - SyntaxKind4[SyntaxKind4["JSDocAllType"] = 318] = "JSDocAllType"; - SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 319] = "JSDocUnknownType"; - SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 320] = "JSDocNullableType"; - SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 321] = "JSDocNonNullableType"; - SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 322] = "JSDocOptionalType"; - SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 323] = "JSDocFunctionType"; - SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 324] = "JSDocVariadicType"; - SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 325] = "JSDocNamepathType"; - SyntaxKind4[SyntaxKind4["JSDoc"] = 326] = "JSDoc"; - SyntaxKind4[SyntaxKind4["JSDocComment"] = 326 /* JSDoc */] = "JSDocComment"; - SyntaxKind4[SyntaxKind4["JSDocText"] = 327] = "JSDocText"; - SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 328] = "JSDocTypeLiteral"; - SyntaxKind4[SyntaxKind4["JSDocSignature"] = 329] = "JSDocSignature"; - SyntaxKind4[SyntaxKind4["JSDocLink"] = 330] = "JSDocLink"; - SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 331] = "JSDocLinkCode"; - SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 332] = "JSDocLinkPlain"; - SyntaxKind4[SyntaxKind4["JSDocTag"] = 333] = "JSDocTag"; - SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 334] = "JSDocAugmentsTag"; - SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 335] = "JSDocImplementsTag"; - SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 336] = "JSDocAuthorTag"; - SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 337] = "JSDocDeprecatedTag"; - SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 338] = "JSDocClassTag"; - SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 339] = "JSDocPublicTag"; - SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 340] = "JSDocPrivateTag"; - SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 341] = "JSDocProtectedTag"; - SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 342] = "JSDocReadonlyTag"; - SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 343] = "JSDocOverrideTag"; - SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 344] = "JSDocCallbackTag"; - SyntaxKind4[SyntaxKind4["JSDocOverloadTag"] = 345] = "JSDocOverloadTag"; - SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 346] = "JSDocEnumTag"; - SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 347] = "JSDocParameterTag"; - SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 348] = "JSDocReturnTag"; - SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 349] = "JSDocThisTag"; - SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 350] = "JSDocTypeTag"; - SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 351] = "JSDocTemplateTag"; - SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 352] = "JSDocTypedefTag"; - SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 353] = "JSDocSeeTag"; - SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 354] = "JSDocPropertyTag"; - SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 355] = "JSDocThrowsTag"; - SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 356] = "JSDocSatisfiesTag"; - SyntaxKind4[SyntaxKind4["SyntaxList"] = 357] = "SyntaxList"; - SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 358] = "NotEmittedStatement"; - SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression"; - SyntaxKind4[SyntaxKind4["CommaListExpression"] = 360] = "CommaListExpression"; - SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression"; - SyntaxKind4[SyntaxKind4["Count"] = 362] = "Count"; + SyntaxKind4[SyntaxKind4["UsingKeyword"] = 160] = "UsingKeyword"; + SyntaxKind4[SyntaxKind4["FromKeyword"] = 161] = "FromKeyword"; + SyntaxKind4[SyntaxKind4["GlobalKeyword"] = 162] = "GlobalKeyword"; + SyntaxKind4[SyntaxKind4["BigIntKeyword"] = 163] = "BigIntKeyword"; + SyntaxKind4[SyntaxKind4["OverrideKeyword"] = 164] = "OverrideKeyword"; + SyntaxKind4[SyntaxKind4["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind4[SyntaxKind4["QualifiedName"] = 166] = "QualifiedName"; + SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 167] = "ComputedPropertyName"; + SyntaxKind4[SyntaxKind4["TypeParameter"] = 168] = "TypeParameter"; + SyntaxKind4[SyntaxKind4["Parameter"] = 169] = "Parameter"; + SyntaxKind4[SyntaxKind4["Decorator"] = 170] = "Decorator"; + SyntaxKind4[SyntaxKind4["PropertySignature"] = 171] = "PropertySignature"; + SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 172] = "PropertyDeclaration"; + SyntaxKind4[SyntaxKind4["MethodSignature"] = 173] = "MethodSignature"; + SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 174] = "MethodDeclaration"; + SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; + SyntaxKind4[SyntaxKind4["Constructor"] = 176] = "Constructor"; + SyntaxKind4[SyntaxKind4["GetAccessor"] = 177] = "GetAccessor"; + SyntaxKind4[SyntaxKind4["SetAccessor"] = 178] = "SetAccessor"; + SyntaxKind4[SyntaxKind4["CallSignature"] = 179] = "CallSignature"; + SyntaxKind4[SyntaxKind4["ConstructSignature"] = 180] = "ConstructSignature"; + SyntaxKind4[SyntaxKind4["IndexSignature"] = 181] = "IndexSignature"; + SyntaxKind4[SyntaxKind4["TypePredicate"] = 182] = "TypePredicate"; + SyntaxKind4[SyntaxKind4["TypeReference"] = 183] = "TypeReference"; + SyntaxKind4[SyntaxKind4["FunctionType"] = 184] = "FunctionType"; + SyntaxKind4[SyntaxKind4["ConstructorType"] = 185] = "ConstructorType"; + SyntaxKind4[SyntaxKind4["TypeQuery"] = 186] = "TypeQuery"; + SyntaxKind4[SyntaxKind4["TypeLiteral"] = 187] = "TypeLiteral"; + SyntaxKind4[SyntaxKind4["ArrayType"] = 188] = "ArrayType"; + SyntaxKind4[SyntaxKind4["TupleType"] = 189] = "TupleType"; + SyntaxKind4[SyntaxKind4["OptionalType"] = 190] = "OptionalType"; + SyntaxKind4[SyntaxKind4["RestType"] = 191] = "RestType"; + SyntaxKind4[SyntaxKind4["UnionType"] = 192] = "UnionType"; + SyntaxKind4[SyntaxKind4["IntersectionType"] = 193] = "IntersectionType"; + SyntaxKind4[SyntaxKind4["ConditionalType"] = 194] = "ConditionalType"; + SyntaxKind4[SyntaxKind4["InferType"] = 195] = "InferType"; + SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 196] = "ParenthesizedType"; + SyntaxKind4[SyntaxKind4["ThisType"] = 197] = "ThisType"; + SyntaxKind4[SyntaxKind4["TypeOperator"] = 198] = "TypeOperator"; + SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 199] = "IndexedAccessType"; + SyntaxKind4[SyntaxKind4["MappedType"] = 200] = "MappedType"; + SyntaxKind4[SyntaxKind4["LiteralType"] = 201] = "LiteralType"; + SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 202] = "NamedTupleMember"; + SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 203] = "TemplateLiteralType"; + SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; + SyntaxKind4[SyntaxKind4["ImportType"] = 205] = "ImportType"; + SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; + SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; + SyntaxKind4[SyntaxKind4["BindingElement"] = 208] = "BindingElement"; + SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; + SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; + SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; + SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 212] = "ElementAccessExpression"; + SyntaxKind4[SyntaxKind4["CallExpression"] = 213] = "CallExpression"; + SyntaxKind4[SyntaxKind4["NewExpression"] = 214] = "NewExpression"; + SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; + SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; + SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; + SyntaxKind4[SyntaxKind4["FunctionExpression"] = 218] = "FunctionExpression"; + SyntaxKind4[SyntaxKind4["ArrowFunction"] = 219] = "ArrowFunction"; + SyntaxKind4[SyntaxKind4["DeleteExpression"] = 220] = "DeleteExpression"; + SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 221] = "TypeOfExpression"; + SyntaxKind4[SyntaxKind4["VoidExpression"] = 222] = "VoidExpression"; + SyntaxKind4[SyntaxKind4["AwaitExpression"] = 223] = "AwaitExpression"; + SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 224] = "PrefixUnaryExpression"; + SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 225] = "PostfixUnaryExpression"; + SyntaxKind4[SyntaxKind4["BinaryExpression"] = 226] = "BinaryExpression"; + SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 227] = "ConditionalExpression"; + SyntaxKind4[SyntaxKind4["TemplateExpression"] = 228] = "TemplateExpression"; + SyntaxKind4[SyntaxKind4["YieldExpression"] = 229] = "YieldExpression"; + SyntaxKind4[SyntaxKind4["SpreadElement"] = 230] = "SpreadElement"; + SyntaxKind4[SyntaxKind4["ClassExpression"] = 231] = "ClassExpression"; + SyntaxKind4[SyntaxKind4["OmittedExpression"] = 232] = "OmittedExpression"; + SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 233] = "ExpressionWithTypeArguments"; + SyntaxKind4[SyntaxKind4["AsExpression"] = 234] = "AsExpression"; + SyntaxKind4[SyntaxKind4["NonNullExpression"] = 235] = "NonNullExpression"; + SyntaxKind4[SyntaxKind4["MetaProperty"] = 236] = "MetaProperty"; + SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 237] = "SyntheticExpression"; + SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 238] = "SatisfiesExpression"; + SyntaxKind4[SyntaxKind4["TemplateSpan"] = 239] = "TemplateSpan"; + SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 240] = "SemicolonClassElement"; + SyntaxKind4[SyntaxKind4["Block"] = 241] = "Block"; + SyntaxKind4[SyntaxKind4["EmptyStatement"] = 242] = "EmptyStatement"; + SyntaxKind4[SyntaxKind4["VariableStatement"] = 243] = "VariableStatement"; + SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 244] = "ExpressionStatement"; + SyntaxKind4[SyntaxKind4["IfStatement"] = 245] = "IfStatement"; + SyntaxKind4[SyntaxKind4["DoStatement"] = 246] = "DoStatement"; + SyntaxKind4[SyntaxKind4["WhileStatement"] = 247] = "WhileStatement"; + SyntaxKind4[SyntaxKind4["ForStatement"] = 248] = "ForStatement"; + SyntaxKind4[SyntaxKind4["ForInStatement"] = 249] = "ForInStatement"; + SyntaxKind4[SyntaxKind4["ForOfStatement"] = 250] = "ForOfStatement"; + SyntaxKind4[SyntaxKind4["ContinueStatement"] = 251] = "ContinueStatement"; + SyntaxKind4[SyntaxKind4["BreakStatement"] = 252] = "BreakStatement"; + SyntaxKind4[SyntaxKind4["ReturnStatement"] = 253] = "ReturnStatement"; + SyntaxKind4[SyntaxKind4["WithStatement"] = 254] = "WithStatement"; + SyntaxKind4[SyntaxKind4["SwitchStatement"] = 255] = "SwitchStatement"; + SyntaxKind4[SyntaxKind4["LabeledStatement"] = 256] = "LabeledStatement"; + SyntaxKind4[SyntaxKind4["ThrowStatement"] = 257] = "ThrowStatement"; + SyntaxKind4[SyntaxKind4["TryStatement"] = 258] = "TryStatement"; + SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 259] = "DebuggerStatement"; + SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 260] = "VariableDeclaration"; + SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 261] = "VariableDeclarationList"; + SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 262] = "FunctionDeclaration"; + SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 263] = "ClassDeclaration"; + SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 264] = "InterfaceDeclaration"; + SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 265] = "TypeAliasDeclaration"; + SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 266] = "EnumDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 267] = "ModuleDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleBlock"] = 268] = "ModuleBlock"; + SyntaxKind4[SyntaxKind4["CaseBlock"] = 269] = "CaseBlock"; + SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 270] = "NamespaceExportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 271] = "ImportEqualsDeclaration"; + SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 272] = "ImportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportClause"] = 273] = "ImportClause"; + SyntaxKind4[SyntaxKind4["NamespaceImport"] = 274] = "NamespaceImport"; + SyntaxKind4[SyntaxKind4["NamedImports"] = 275] = "NamedImports"; + SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 276] = "ImportSpecifier"; + SyntaxKind4[SyntaxKind4["ExportAssignment"] = 277] = "ExportAssignment"; + SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 278] = "ExportDeclaration"; + SyntaxKind4[SyntaxKind4["NamedExports"] = 279] = "NamedExports"; + SyntaxKind4[SyntaxKind4["NamespaceExport"] = 280] = "NamespaceExport"; + SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 281] = "ExportSpecifier"; + SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 282] = "MissingDeclaration"; + SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 283] = "ExternalModuleReference"; + SyntaxKind4[SyntaxKind4["JsxElement"] = 284] = "JsxElement"; + SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 285] = "JsxSelfClosingElement"; + SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 286] = "JsxOpeningElement"; + SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 287] = "JsxClosingElement"; + SyntaxKind4[SyntaxKind4["JsxFragment"] = 288] = "JsxFragment"; + SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 289] = "JsxOpeningFragment"; + SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 290] = "JsxClosingFragment"; + SyntaxKind4[SyntaxKind4["JsxAttribute"] = 291] = "JsxAttribute"; + SyntaxKind4[SyntaxKind4["JsxAttributes"] = 292] = "JsxAttributes"; + SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 293] = "JsxSpreadAttribute"; + SyntaxKind4[SyntaxKind4["JsxExpression"] = 294] = "JsxExpression"; + SyntaxKind4[SyntaxKind4["JsxNamespacedName"] = 295] = "JsxNamespacedName"; + SyntaxKind4[SyntaxKind4["CaseClause"] = 296] = "CaseClause"; + SyntaxKind4[SyntaxKind4["DefaultClause"] = 297] = "DefaultClause"; + SyntaxKind4[SyntaxKind4["HeritageClause"] = 298] = "HeritageClause"; + SyntaxKind4[SyntaxKind4["CatchClause"] = 299] = "CatchClause"; + SyntaxKind4[SyntaxKind4["AssertClause"] = 300] = "AssertClause"; + SyntaxKind4[SyntaxKind4["AssertEntry"] = 301] = "AssertEntry"; + SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; + SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 303] = "PropertyAssignment"; + SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; + SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 305] = "SpreadAssignment"; + SyntaxKind4[SyntaxKind4["EnumMember"] = 306] = "EnumMember"; + SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 307] = "UnparsedPrologue"; + SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 308] = "UnparsedPrepend"; + SyntaxKind4[SyntaxKind4["UnparsedText"] = 309] = "UnparsedText"; + SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 310] = "UnparsedInternalText"; + SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 311] = "UnparsedSyntheticReference"; + SyntaxKind4[SyntaxKind4["SourceFile"] = 312] = "SourceFile"; + SyntaxKind4[SyntaxKind4["Bundle"] = 313] = "Bundle"; + SyntaxKind4[SyntaxKind4["UnparsedSource"] = 314] = "UnparsedSource"; + SyntaxKind4[SyntaxKind4["InputFiles"] = 315] = "InputFiles"; + SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 316] = "JSDocTypeExpression"; + SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 317] = "JSDocNameReference"; + SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 318] = "JSDocMemberName"; + SyntaxKind4[SyntaxKind4["JSDocAllType"] = 319] = "JSDocAllType"; + SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 320] = "JSDocUnknownType"; + SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 321] = "JSDocNullableType"; + SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 322] = "JSDocNonNullableType"; + SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 323] = "JSDocOptionalType"; + SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 324] = "JSDocFunctionType"; + SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 325] = "JSDocVariadicType"; + SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 326] = "JSDocNamepathType"; + SyntaxKind4[SyntaxKind4["JSDoc"] = 327] = "JSDoc"; + SyntaxKind4[SyntaxKind4["JSDocComment"] = 327 /* JSDoc */] = "JSDocComment"; + SyntaxKind4[SyntaxKind4["JSDocText"] = 328] = "JSDocText"; + SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 329] = "JSDocTypeLiteral"; + SyntaxKind4[SyntaxKind4["JSDocSignature"] = 330] = "JSDocSignature"; + SyntaxKind4[SyntaxKind4["JSDocLink"] = 331] = "JSDocLink"; + SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 332] = "JSDocLinkCode"; + SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 333] = "JSDocLinkPlain"; + SyntaxKind4[SyntaxKind4["JSDocTag"] = 334] = "JSDocTag"; + SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 335] = "JSDocAugmentsTag"; + SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 336] = "JSDocImplementsTag"; + SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 337] = "JSDocAuthorTag"; + SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 338] = "JSDocDeprecatedTag"; + SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 339] = "JSDocClassTag"; + SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 340] = "JSDocPublicTag"; + SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 341] = "JSDocPrivateTag"; + SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 342] = "JSDocProtectedTag"; + SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 343] = "JSDocReadonlyTag"; + SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 344] = "JSDocOverrideTag"; + SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 345] = "JSDocCallbackTag"; + SyntaxKind4[SyntaxKind4["JSDocOverloadTag"] = 346] = "JSDocOverloadTag"; + SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 347] = "JSDocEnumTag"; + SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 348] = "JSDocParameterTag"; + SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 349] = "JSDocReturnTag"; + SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 350] = "JSDocThisTag"; + SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 351] = "JSDocTypeTag"; + SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 352] = "JSDocTemplateTag"; + SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 353] = "JSDocTypedefTag"; + SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 354] = "JSDocSeeTag"; + SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 355] = "JSDocPropertyTag"; + SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 356] = "JSDocThrowsTag"; + SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 357] = "JSDocSatisfiesTag"; + SyntaxKind4[SyntaxKind4["SyntaxList"] = 358] = "SyntaxList"; + SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 359] = "NotEmittedStatement"; + SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 360] = "PartiallyEmittedExpression"; + SyntaxKind4[SyntaxKind4["CommaListExpression"] = 361] = "CommaListExpression"; + SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 362] = "SyntheticReferenceExpression"; + SyntaxKind4[SyntaxKind4["Count"] = 363] = "Count"; SyntaxKind4[SyntaxKind4["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment"; SyntaxKind4[SyntaxKind4["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -3405,15 +3415,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["FirstReservedWord"] = 83 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind4[SyntaxKind4["LastReservedWord"] = 118 /* WithKeyword */] = "LastReservedWord"; SyntaxKind4[SyntaxKind4["FirstKeyword"] = 83 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind4[SyntaxKind4["LastKeyword"] = 164 /* OfKeyword */] = "LastKeyword"; + SyntaxKind4[SyntaxKind4["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; SyntaxKind4[SyntaxKind4["FirstFutureReservedWord"] = 119 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind4[SyntaxKind4["LastFutureReservedWord"] = 127 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 181 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind4[SyntaxKind4["LastTypeNode"] = 204 /* ImportType */] = "LastTypeNode"; + SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind4[SyntaxKind4["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; SyntaxKind4[SyntaxKind4["FirstPunctuation"] = 19 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind4[SyntaxKind4["LastPunctuation"] = 79 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind4[SyntaxKind4["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind4[SyntaxKind4["LastToken"] = 164 /* LastKeyword */] = "LastToken"; + SyntaxKind4[SyntaxKind4["LastToken"] = 165 /* LastKeyword */] = "LastToken"; SyntaxKind4[SyntaxKind4["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind4[SyntaxKind4["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind4[SyntaxKind4["FirstLiteralToken"] = 9 /* NumericLiteral */] = "FirstLiteralToken"; @@ -3422,56 +3432,59 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["LastTemplateToken"] = 18 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind4[SyntaxKind4["FirstBinaryOperator"] = 30 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind4[SyntaxKind4["LastBinaryOperator"] = 79 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind4[SyntaxKind4["FirstStatement"] = 242 /* VariableStatement */] = "FirstStatement"; - SyntaxKind4[SyntaxKind4["LastStatement"] = 258 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind4[SyntaxKind4["FirstNode"] = 165 /* QualifiedName */] = "FirstNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 315 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 356 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 333 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 356 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; + SyntaxKind4[SyntaxKind4["FirstStatement"] = 243 /* VariableStatement */] = "FirstStatement"; + SyntaxKind4[SyntaxKind4["LastStatement"] = 259 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind4[SyntaxKind4["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 316 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 334 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 128 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 164 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind4; })(SyntaxKind || {}); var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { NodeFlags3[NodeFlags3["None"] = 0] = "None"; NodeFlags3[NodeFlags3["Let"] = 1] = "Let"; NodeFlags3[NodeFlags3["Const"] = 2] = "Const"; - NodeFlags3[NodeFlags3["NestedNamespace"] = 4] = "NestedNamespace"; - NodeFlags3[NodeFlags3["Synthesized"] = 8] = "Synthesized"; - NodeFlags3[NodeFlags3["Namespace"] = 16] = "Namespace"; - NodeFlags3[NodeFlags3["OptionalChain"] = 32] = "OptionalChain"; - NodeFlags3[NodeFlags3["ExportContext"] = 64] = "ExportContext"; - NodeFlags3[NodeFlags3["ContainsThis"] = 128] = "ContainsThis"; - NodeFlags3[NodeFlags3["HasImplicitReturn"] = 256] = "HasImplicitReturn"; - NodeFlags3[NodeFlags3["HasExplicitReturn"] = 512] = "HasExplicitReturn"; - NodeFlags3[NodeFlags3["GlobalAugmentation"] = 1024] = "GlobalAugmentation"; - NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 2048] = "HasAsyncFunctions"; - NodeFlags3[NodeFlags3["DisallowInContext"] = 4096] = "DisallowInContext"; - NodeFlags3[NodeFlags3["YieldContext"] = 8192] = "YieldContext"; - NodeFlags3[NodeFlags3["DecoratorContext"] = 16384] = "DecoratorContext"; - NodeFlags3[NodeFlags3["AwaitContext"] = 32768] = "AwaitContext"; - NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 65536] = "DisallowConditionalTypesContext"; - NodeFlags3[NodeFlags3["ThisNodeHasError"] = 131072] = "ThisNodeHasError"; - NodeFlags3[NodeFlags3["JavaScriptFile"] = 262144] = "JavaScriptFile"; - NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 524288] = "ThisNodeOrAnySubNodesHasError"; - NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 1048576] = "HasAggregatedChildData"; - NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 2097152] = "PossiblyContainsDynamicImport"; - NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 4194304] = "PossiblyContainsImportMeta"; - NodeFlags3[NodeFlags3["JSDoc"] = 8388608] = "JSDoc"; - NodeFlags3[NodeFlags3["Ambient"] = 16777216] = "Ambient"; - NodeFlags3[NodeFlags3["InWithStatement"] = 33554432] = "InWithStatement"; - NodeFlags3[NodeFlags3["JsonFile"] = 67108864] = "JsonFile"; - NodeFlags3[NodeFlags3["TypeCached"] = 134217728] = "TypeCached"; - NodeFlags3[NodeFlags3["Deprecated"] = 268435456] = "Deprecated"; - NodeFlags3[NodeFlags3["BlockScoped"] = 3] = "BlockScoped"; - NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags"; - NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 2816] = "ReachabilityAndEmitFlags"; - NodeFlags3[NodeFlags3["ContextFlags"] = 50720768] = "ContextFlags"; - NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 40960] = "TypeExcludesFlags"; - NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 6291456] = "PermanentlySetIncrementalFlags"; - NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 128 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; - NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 2048 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; + NodeFlags3[NodeFlags3["Using"] = 4] = "Using"; + NodeFlags3[NodeFlags3["AwaitUsing"] = 6] = "AwaitUsing"; + NodeFlags3[NodeFlags3["NestedNamespace"] = 8] = "NestedNamespace"; + NodeFlags3[NodeFlags3["Synthesized"] = 16] = "Synthesized"; + NodeFlags3[NodeFlags3["Namespace"] = 32] = "Namespace"; + NodeFlags3[NodeFlags3["OptionalChain"] = 64] = "OptionalChain"; + NodeFlags3[NodeFlags3["ExportContext"] = 128] = "ExportContext"; + NodeFlags3[NodeFlags3["ContainsThis"] = 256] = "ContainsThis"; + NodeFlags3[NodeFlags3["HasImplicitReturn"] = 512] = "HasImplicitReturn"; + NodeFlags3[NodeFlags3["HasExplicitReturn"] = 1024] = "HasExplicitReturn"; + NodeFlags3[NodeFlags3["GlobalAugmentation"] = 2048] = "GlobalAugmentation"; + NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 4096] = "HasAsyncFunctions"; + NodeFlags3[NodeFlags3["DisallowInContext"] = 8192] = "DisallowInContext"; + NodeFlags3[NodeFlags3["YieldContext"] = 16384] = "YieldContext"; + NodeFlags3[NodeFlags3["DecoratorContext"] = 32768] = "DecoratorContext"; + NodeFlags3[NodeFlags3["AwaitContext"] = 65536] = "AwaitContext"; + NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 131072] = "DisallowConditionalTypesContext"; + NodeFlags3[NodeFlags3["ThisNodeHasError"] = 262144] = "ThisNodeHasError"; + NodeFlags3[NodeFlags3["JavaScriptFile"] = 524288] = "JavaScriptFile"; + NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 1048576] = "ThisNodeOrAnySubNodesHasError"; + NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 2097152] = "HasAggregatedChildData"; + NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 4194304] = "PossiblyContainsDynamicImport"; + NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 8388608] = "PossiblyContainsImportMeta"; + NodeFlags3[NodeFlags3["JSDoc"] = 16777216] = "JSDoc"; + NodeFlags3[NodeFlags3["Ambient"] = 33554432] = "Ambient"; + NodeFlags3[NodeFlags3["InWithStatement"] = 67108864] = "InWithStatement"; + NodeFlags3[NodeFlags3["JsonFile"] = 134217728] = "JsonFile"; + NodeFlags3[NodeFlags3["TypeCached"] = 268435456] = "TypeCached"; + NodeFlags3[NodeFlags3["Deprecated"] = 536870912] = "Deprecated"; + NodeFlags3[NodeFlags3["BlockScoped"] = 7] = "BlockScoped"; + NodeFlags3[NodeFlags3["Constant"] = 6] = "Constant"; + NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 1536] = "ReachabilityCheckFlags"; + NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 5632] = "ReachabilityAndEmitFlags"; + NodeFlags3[NodeFlags3["ContextFlags"] = 101441536] = "ContextFlags"; + NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 81920] = "TypeExcludesFlags"; + NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 12582912] = "PermanentlySetIncrementalFlags"; + NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 256 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; + NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 4096 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; return NodeFlags3; })(NodeFlags || {}); var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { @@ -3749,7 +3762,8 @@ var SignatureFlags = /* @__PURE__ */ ((SignatureFlags4) => { SignatureFlags4[SignatureFlags4["IsOuterCallChain"] = 16] = "IsOuterCallChain"; SignatureFlags4[SignatureFlags4["IsUntypedSignatureInJSFile"] = 32] = "IsUntypedSignatureInJSFile"; SignatureFlags4[SignatureFlags4["IsNonInferrable"] = 64] = "IsNonInferrable"; - SignatureFlags4[SignatureFlags4["PropagatingFlags"] = 39] = "PropagatingFlags"; + SignatureFlags4[SignatureFlags4["IsSignatureCandidateForOverloadFailure"] = 128] = "IsSignatureCandidateForOverloadFailure"; + SignatureFlags4[SignatureFlags4["PropagatingFlags"] = 167] = "PropagatingFlags"; SignatureFlags4[SignatureFlags4["CallChainFlags"] = 24] = "CallChainFlags"; return SignatureFlags4; })(SignatureFlags || {}); @@ -3787,6 +3801,17 @@ var ModuleKind = /* @__PURE__ */ ((ModuleKind2) => { ModuleKind2[ModuleKind2["NodeNext"] = 199] = "NodeNext"; return ModuleKind2; })(ModuleKind || {}); +var ScriptKind = /* @__PURE__ */ ((ScriptKind3) => { + ScriptKind3[ScriptKind3["Unknown"] = 0] = "Unknown"; + ScriptKind3[ScriptKind3["JS"] = 1] = "JS"; + ScriptKind3[ScriptKind3["JSX"] = 2] = "JSX"; + ScriptKind3[ScriptKind3["TS"] = 3] = "TS"; + ScriptKind3[ScriptKind3["TSX"] = 4] = "TSX"; + ScriptKind3[ScriptKind3["External"] = 5] = "External"; + ScriptKind3[ScriptKind3["JSON"] = 6] = "JSON"; + ScriptKind3[ScriptKind3["Deferred"] = 7] = "Deferred"; + return ScriptKind3; +})(ScriptKind || {}); var TransformFlags = /* @__PURE__ */ ((TransformFlags3) => { TransformFlags3[TransformFlags3["None"] = 0] = "None"; TransformFlags3[TransformFlags3["ContainsTypeScript"] = 1] = "ContainsTypeScript"; @@ -4149,10 +4174,10 @@ function createDynamicPriorityPollingWatchFile(host) { pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval)); } } -function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) { +function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) { const fileWatcherCallbacks = createMultiMap(); const dirWatchers = /* @__PURE__ */ new Map(); - const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2); return nonPollingWatchFile; function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) { const filePath = toCanonicalName(fileName); @@ -4228,8 +4253,8 @@ function createFixedChunkSizePollingWatchFile(host) { pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue"); } } -function createSingleWatcherPerName(cache, useCaseSensitiveFileNames, name, callback, createWatcher) { - const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); +function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) { + const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const path = toCanonicalFileName(name); const existing = cache.get(path); if (existing) { @@ -4281,7 +4306,7 @@ function setSysLog(logger) { } function createDirectoryWatcherSupportingRecursive({ watchDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, getAccessibleSortedChildDirectories, fileSystemEntryExists, @@ -4293,8 +4318,8 @@ function createDirectoryWatcherSupportingRecursive({ const callbackCache = createMultiMap(); const cacheToUpdateChildWatches = /* @__PURE__ */ new Map(); let timerToUpdateChildWatches; - const filePathComparer = getStringComparer(!useCaseSensitiveFileNames); - const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames); + const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2); + const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2); return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options); function createDirectoryWatcher(dirName, options, callback) { const dirPath = toCanonicalFilePath(dirName); @@ -4461,12 +4486,12 @@ function createDirectoryWatcherSupportingRecursive({ } } function isIgnoredPath(path, options) { - return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames, getCurrentDirectory); + return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory); } function isInPath(path, searchPath) { if (stringContains(path, searchPath)) return true; - if (useCaseSensitiveFileNames) + if (useCaseSensitiveFileNames2) return false; return stringContains(toCanonicalFilePath(path), searchPath); } @@ -4484,14 +4509,14 @@ function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModi } }; } -function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames, getCurrentDirectory) { - return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames, getCurrentDirectory())); +function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) { + return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames2, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2, getCurrentDirectory())); } -function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory) { +function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) { return (eventName, relativeFileName) => { if (eventName === "rename") { const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName)); - if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames, getCurrentDirectory)) { + if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) { callback(fileName); } } @@ -4504,7 +4529,7 @@ function createSystemWatchFunctions({ clearTimeout: clearTimeout2, fsWatchWorker, fileSystemEntryExists, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories, @@ -4576,7 +4601,7 @@ function createSystemWatchFunctions({ ); case 5 /* UseFsEventsOnParentDirectory */: if (!nonPollingWatchFile) { - nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames); + nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2); } return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options)); default: @@ -4625,7 +4650,7 @@ function createSystemWatchFunctions({ return fsWatch( directoryName, 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), + createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), recursive, 500 /* Medium */, getFallbackOptions(options) @@ -4633,7 +4658,7 @@ function createSystemWatchFunctions({ } if (!hostRecursiveDirectoryWatcher) { hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({ - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fileSystemEntryExists, getAccessibleSortedChildDirectories, @@ -4679,7 +4704,7 @@ function createSystemWatchFunctions({ return fsWatch( directoryName, 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), + createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), recursive, 500 /* Medium */, getFallbackOptions(watchDirectoryOptions) @@ -4707,7 +4732,7 @@ function createSystemWatchFunctions({ function pollingWatchFile(fileName, callback, pollingInterval, options) { return createSingleWatcherPerName( pollingWatches, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, fileName, callback, (cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options) @@ -4716,7 +4741,7 @@ function createSystemWatchFunctions({ function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) { return createSingleWatcherPerName( recursive ? fsWatchesRecursive : fsWatches, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, fileOrDirectory, callback, (cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions) @@ -4844,7 +4869,7 @@ var sys = (() => { const Buffer = require("buffer").Buffer; const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin"; const platform = _os.platform(); - const useCaseSensitiveFileNames = isFileSystemCaseSensitive(); + const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive(); const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync; const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename; const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin"; @@ -4855,7 +4880,7 @@ var sys = (() => { setTimeout, clearTimeout, fsWatchWorker, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fileSystemEntryExists, // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows @@ -4872,7 +4897,7 @@ var sys = (() => { const nodeSystem = { args: process.argv.slice(2), newLine: _os.EOL, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, write(s) { process.stdout.write(s); }, @@ -4937,7 +4962,7 @@ var sys = (() => { disableCPUProfiler, cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"), realpath, - debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)), + debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay, tryEnableSourceMapsForHost() { try { require("source-map-support").install(); @@ -5001,12 +5026,12 @@ var sys = (() => { for (const node of profile.nodes) { if (node.callFrame.url) { const url = normalizeSlashes(node.callFrame.url); - if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames)) { + if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) { node.callFrame.url = getRelativePathToDirectoryOrUrl( fileUrlRoot, url, fileUrlRoot, - createGetCanonicalFileName(useCaseSensitiveFileNames), + createGetCanonicalFileName(useCaseSensitiveFileNames2), /*isAbsolutePathAnUrl*/ true ); @@ -5186,7 +5211,7 @@ var sys = (() => { } } function readDirectory(path, extensions, excludes, includes, depth) { - return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); + return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); } function fileSystemEntryExists(path, entryKind) { const originalStackTraceLimit = Error.stackTraceLimit; @@ -5739,6 +5764,7 @@ var Diagnostics = { Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, 1 /* Error */, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, 1 /* Error */, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: diag(1065, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065", "The return type of an async function or method must be the global Promise type."), In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, 1 /* Error */, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, 1 /* Error */, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, 1 /* Error */, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), @@ -5768,6 +5794,7 @@ var Diagnostics = { A_return_statement_can_only_be_used_within_a_function_body: diag(1108, 1 /* Error */, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), Expression_expected: diag(1109, 1 /* Error */, "Expression_expected_1109", "Expression expected."), Type_expected: diag(1110, 1 /* Error */, "Type_expected_1110", "Type expected."), + Private_field_0_must_be_declared_in_an_enclosing_class: diag(1111, 1 /* Error */, "Private_field_0_must_be_declared_in_an_enclosing_class_1111", "Private field '{0}' must be declared in an enclosing class."), A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, 1 /* Error */, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), Duplicate_label_0: diag(1114, 1 /* Error */, "Duplicate_label_0_1114", "Duplicate label '{0}'."), A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, 1 /* Error */, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), @@ -5802,9 +5829,8 @@ var Diagnostics = { Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, 1 /* Error */, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, 1 /* Error */, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, 1 /* Error */, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), - const_declarations_must_be_initialized: diag(1155, 1 /* Error */, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."), - const_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."), - let_declarations_can_only_be_declared_inside_a_block: diag(1157, 1 /* Error */, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."), + _0_declarations_must_be_initialized: diag(1155, 1 /* Error */, "_0_declarations_must_be_initialized_1155", "'{0}' declarations must be initialized."), + _0_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "_0_declarations_can_only_be_declared_inside_a_block_1156", "'{0}' declarations can only be declared inside a block."), Unterminated_template_literal: diag(1160, 1 /* Error */, "Unterminated_template_literal_1160", "Unterminated template literal."), Unterminated_regular_expression_literal: diag(1161, 1 /* Error */, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), An_object_member_cannot_be_declared_optional: diag(1162, 1 /* Error */, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), @@ -5986,8 +6012,6 @@ var Diagnostics = { Class_constructor_may_not_be_a_generator: diag(1368, 1 /* Error */, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), Did_you_mean_0: diag(1369, 3 /* Message */, "Did_you_mean_0_1369", "Did you mean '{0}'?"), This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, 1 /* Error */, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."), - Convert_to_type_only_import: diag(1373, 3 /* 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, 3 /* 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, 1 /* 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."), _0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."), _0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."), @@ -6091,6 +6115,11 @@ var Diagnostics = { Escape_sequence_0_is_not_allowed: diag(1488, 1 /* Error */, "Escape_sequence_0_is_not_allowed_1488", "Escape sequence '{0}' is not allowed."), Decimals_with_leading_zeros_are_not_allowed: diag(1489, 1 /* Error */, "Decimals_with_leading_zeros_are_not_allowed_1489", "Decimals with leading zeros are not allowed."), File_appears_to_be_binary: diag(1490, 1 /* Error */, "File_appears_to_be_binary_1490", "File appears to be binary."), + _0_modifier_cannot_appear_on_a_using_declaration: diag(1491, 1 /* Error */, "_0_modifier_cannot_appear_on_a_using_declaration_1491", "'{0}' modifier cannot appear on a 'using' declaration."), + _0_declarations_may_not_have_binding_patterns: diag(1492, 1 /* Error */, "_0_declarations_may_not_have_binding_patterns_1492", "'{0}' declarations may not have binding patterns."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), + The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), + _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* 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, 1 /* 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( @@ -6185,7 +6214,6 @@ var Diagnostics = { This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, 1 /* Error */, "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}'."), Type_0_does_not_satisfy_the_constraint_1: diag(2344, 1 /* Error */, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, 1 /* Error */, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), - Call_target_does_not_contain_any_signatures: diag(2346, 1 /* Error */, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), Untyped_function_calls_may_not_accept_type_arguments: diag(2347, 1 /* Error */, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, 1 /* Error */, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), This_expression_is_not_callable: diag(2349, 1 /* Error */, "This_expression_is_not_callable_2349", "This expression is not callable."), @@ -6637,6 +6665,11 @@ var Diagnostics = { A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: diag(2846, 1 /* Error */, "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"), The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression: diag(2848, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848", "The right-hand side of an 'instanceof' expression must not be an instantiation expression."), Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1: diag(2849, 1 /* Error */, "Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849", "Target signature provides too few arguments. Expected {0} or more, but got {1}."), + The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined: diag(2850, 1 /* Error */, "The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850", "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: diag(2851, 1 /* Error */, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), + await_using_statements_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(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* 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, 1 /* 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, 1 /* 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}'."), @@ -6790,7 +6823,6 @@ var Diagnostics = { Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: diag(5081, 1 /* Error */, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: diag(5082, 1 /* Error */, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), Cannot_read_file_0: diag(5083, 1 /* Error */, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), - Tuple_members_must_all_have_names_or_all_not_have_names: diag(5084, 1 /* Error */, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."), A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, 1 /* Error */, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, 1 /* Error */, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, 1 /* Error */, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), @@ -6813,6 +6845,8 @@ var Diagnostics = { Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), + Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."), + Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -7193,6 +7227,8 @@ var Diagnostics = { Resolved_under_condition_0: diag(6414, 3 /* Message */, "Resolved_under_condition_0_6414", "Resolved under condition '{0}'."), Failed_to_resolve_under_condition_0: diag(6415, 3 /* Message */, "Failed_to_resolve_under_condition_0_6415", "Failed to resolve under condition '{0}'."), Exiting_conditional_exports: diag(6416, 3 /* Message */, "Exiting_conditional_exports_6416", "Exiting conditional exports."), + Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: diag(6417, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", "Searching all ancestor node_modules directories for preferred extensions: {0}."), + Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: diag(6418, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", "Searching all ancestor node_modules directories for fallback extensions: {0}."), The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* Message */, "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_this_index_signature: diag(6501, 3 /* Message */, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, 3 /* Message */, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), @@ -7431,6 +7467,7 @@ var Diagnostics = { Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, 1 /* Error */, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, 1 /* Error */, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, 1 /* Error */, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), + Signature_declarations_can_only_be_used_in_TypeScript_files: diag(8017, 1 /* Error */, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."), Report_errors_in_js_files: diag(8019, 3 /* Message */, "Report_errors_in_js_files_8019", "Report errors in .js files."), JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, 1 /* Error */, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, 1 /* Error */, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), @@ -7705,6 +7742,14 @@ var Diagnostics = { Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."), Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"), Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"), + Use_import_type: diag(95180, 3 /* Message */, "Use_import_type_95180", "Use 'import type'"), + Use_type_0: diag(95181, 3 /* Message */, "Use_type_0_95181", "Use 'type {0}'"), + Fix_all_with_type_only_imports: diag(95182, 3 /* Message */, "Fix_all_with_type_only_imports_95182", "Fix all with type-only imports"), + Cannot_move_statements_to_the_selected_file: diag(95183, 3 /* Message */, "Cannot_move_statements_to_the_selected_file_95183", "Cannot move statements to the selected file"), + Inline_variable: diag(95184, 3 /* Message */, "Inline_variable_95184", "Inline variable"), + Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."), + Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."), + Add_missing_comma_for_object_member_completion_0: diag(95187, 3 /* Message */, "Add_missing_comma_for_object_member_completion_0_95187", "Add missing comma for object member completion '{0}'."), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* 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, 1 /* 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, 1 /* 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?"), @@ -7731,8 +7776,8 @@ var Diagnostics = { Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, 3 /* Message */, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, 1 /* Error */, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, 1 /* Error */, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), - Await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."), - For_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."), + await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "await_expression_cannot_be_used_inside_a_class_static_block_18037", "'await' expression cannot be used inside a class static block."), + for_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "for_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'for await' loops cannot be used inside a class static block."), Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, 1 /* Error */, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, 1 /* Error */, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, 1 /* Error */, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), @@ -7746,7 +7791,8 @@ var Diagnostics = { The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."), Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"), - Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type.") + Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."), + await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block.") }; // src/compiler/scanner.ts @@ -7763,7 +7809,7 @@ var textToKeywordObj = { as: 130 /* AsKeyword */, asserts: 131 /* AssertsKeyword */, assert: 132 /* AssertKeyword */, - bigint: 162 /* BigIntKeyword */, + bigint: 163 /* BigIntKeyword */, boolean: 136 /* BooleanKeyword */, break: 83 /* BreakKeyword */, case: 84 /* CaseKeyword */, @@ -7784,7 +7830,7 @@ var textToKeywordObj = { false: 97 /* FalseKeyword */, finally: 98 /* FinallyKeyword */, for: 99 /* ForKeyword */, - from: 160 /* FromKeyword */, + from: 161 /* FromKeyword */, function: 100 /* FunctionKeyword */, get: 139 /* GetKeyword */, if: 101 /* IfKeyword */, @@ -7809,11 +7855,11 @@ var textToKeywordObj = { private: 123 /* PrivateKeyword */, protected: 124 /* ProtectedKeyword */, public: 125 /* PublicKeyword */, - override: 163 /* OverrideKeyword */, + override: 164 /* OverrideKeyword */, out: 147 /* OutKeyword */, readonly: 148 /* ReadonlyKeyword */, require: 149 /* RequireKeyword */, - global: 161 /* GlobalKeyword */, + global: 162 /* GlobalKeyword */, return: 107 /* ReturnKeyword */, satisfies: 152 /* SatisfiesKeyword */, set: 153 /* SetKeyword */, @@ -7831,6 +7877,7 @@ var textToKeywordObj = { undefined: 157 /* UndefinedKeyword */, unique: 158 /* UniqueKeyword */, unknown: 159 /* UnknownKeyword */, + using: 160 /* UsingKeyword */, var: 115 /* VarKeyword */, void: 116 /* VoidKeyword */, while: 117 /* WhileKeyword */, @@ -7838,7 +7885,7 @@ var textToKeywordObj = { yield: 127 /* YieldKeyword */, async: 134 /* AsyncKeyword */, await: 135 /* AwaitKeyword */, - of: 164 /* OfKeyword */ + of: 165 /* OfKeyword */ }; var textToKeyword = new Map(Object.entries(textToKeywordObj)); var textToToken = new Map(Object.entries({ @@ -8528,7 +8575,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (withMinus) start2--; error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal); - return { type: 9 /* NumericLiteral */, value: tokenValue }; + return 9 /* NumericLiteral */; } } else { mainFragment = scanNumberFragment(); @@ -8568,20 +8615,18 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } if (tokenFlags & 8192 /* ContainsLeadingZero */) { error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2); - return { type: 9 /* NumericLiteral */, value: "" + +result }; + tokenValue = "" + +result; + return 9 /* NumericLiteral */; } if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) { checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */)); - return { - type: 9 /* NumericLiteral */, - value: "" + +result - // if value is not an integer, it can be safely coerced to a number - }; + tokenValue = "" + +result; + return 9 /* NumericLiteral */; } else { tokenValue = result; const type = checkBigIntSuffix(); checkForIdentifierStartAfterNumericLiteral(start2); - return { type, value: tokenValue }; + return type; } } function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) { @@ -9190,7 +9235,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return token = 41 /* MinusToken */; case 46 /* dot */: if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = scanNumber().value; + scanNumber(); return token = 9 /* NumericLiteral */; } if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { @@ -9308,8 +9353,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan case 55 /* _7 */: case 56 /* _8 */: case 57 /* _9 */: - ({ type: token, value: tokenValue } = scanNumber()); - return token; + return token = scanNumber(); case 58 /* colon */: pos++; return token = 59 /* ColonToken */; @@ -10026,7 +10070,7 @@ function createTextChangeRange(span, newLength) { } var unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); function isParameterPropertyDeclaration(node, parent) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 175 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 176 /* Constructor */; } function walkUpBindingElementsAndPatterns(binding) { let node = binding.parent; @@ -10040,14 +10084,14 @@ function getCombinedFlags(node, getFlags) { node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 259 /* VariableDeclaration */) { + if (node.kind === 260 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 260 /* VariableDeclarationList */) { + if (node && node.kind === 261 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 242 /* VariableStatement */) { + if (node && node.kind === 243 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -10056,12 +10100,15 @@ function getCombinedModifierFlags(node) { return getCombinedFlags(node, getEffectiveModifierFlags); } function getCombinedNodeFlags(node) { - return getCombinedFlags(node, (n) => n.flags); + return getCombinedFlags(node, getNodeFlags); +} +function getNodeFlags(node) { + return node.flags; } var supportedLocaleDirectories = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]; function validateLocaleAndSetLanguage(locale, sys2, errors) { const lowerCaseLocale = locale.toLowerCase(); - const matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(lowerCaseLocale); + const matchResult = /^([a-z]+)([_-]([a-z]+))?$/.exec(lowerCaseLocale); if (!matchResult) { if (errors) { errors.push(createCompilerDiagnostic(Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp")); @@ -10134,7 +10181,7 @@ function findAncestor(node, callback) { return void 0; } function isParseTreeNode(node) { - return (node.flags & 8 /* Synthesized */) === 0; + return (node.flags & 16 /* Synthesized */) === 0; } function getParseTreeNode(node, nodeTest) { if (node === void 0 || isParseTreeNode(node)) { @@ -10177,30 +10224,30 @@ function nameForNamelessJSDocTypedef(declaration) { return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 225 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { + if (expr.kind === 226 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return expr.name; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 216 /* ParenthesizedExpression */: { + case 217 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 255 /* LabeledStatement */: { + case 256 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -10231,16 +10278,16 @@ function getNonAssignedNameOfDeclaration(declaration) { switch (declaration.kind) { case 80 /* Identifier */: return declaration; - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: { + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 165 /* QualifiedName */) { + if (name.kind === 166 /* QualifiedName */) { return name.right; } break; } - case 212 /* CallExpression */: - case 225 /* BinaryExpression */: { + case 213 /* CallExpression */: + case 226 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -10256,15 +10303,15 @@ function getNonAssignedNameOfDeclaration(declaration) { return void 0; } } - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 346 /* JSDocEnumTag */: + case 347 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -10486,10 +10533,10 @@ function getAllJSDocTags(node, predicate) { return getJSDocTags(node).filter(predicate); } function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 327 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 328 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 330 /* JSDocLink */ ? "link" : link.kind === 331 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 331 /* JSDocLink */ ? "link" : link.kind === 332 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -10505,7 +10552,7 @@ function getEffectiveTypeParameterDeclarations(node) { return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 326 /* JSDoc */); + Debug.assert(node.parent.kind === 327 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -10533,20 +10580,20 @@ function isMemberName(node) { return node.kind === 80 /* Identifier */ || node.kind === 81 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 177 /* SetAccessor */ || node.kind === 176 /* GetAccessor */; + return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */; } function isPropertyAccessChain(node) { - return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isPropertyAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isElementAccessChain(node) { - return isElementAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isElementAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isCallChain(node) { - return isCallExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isCallExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */ || kind === 212 /* CallExpression */ || kind === 234 /* NonNullExpression */); + return !!(node.flags & 64 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 235 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -10558,7 +10605,7 @@ function isOutermostOptionalChain(node) { return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; + return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -10567,31 +10614,31 @@ function skipPartiallyEmittedExpressions(node) { return skipOuterExpressions(node, 8 /* PartiallyEmittedExpressions */); } function isNonNullChain(node) { - return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isNonNullExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isNamedExportBindings(node) { - return node.kind === 279 /* NamespaceExport */ || node.kind === 278 /* NamedExports */; + return node.kind === 280 /* NamespaceExport */ || node.kind === 279 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 308 /* UnparsedText */: - case 309 /* UnparsedInternalText */: + case 309 /* UnparsedText */: + case 310 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 306 /* UnparsedPrologue */ || node.kind === 310 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 307 /* UnparsedPrologue */ || node.kind === 311 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 354 /* JSDocPropertyTag */ || node.kind === 347 /* JSDocParameterTag */; + return node.kind === 355 /* JSDocPropertyTag */ || node.kind === 348 /* JSDocParameterTag */; } function isNodeKind(kind) { - return kind >= 165 /* FirstNode */; + return kind >= 166 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 164 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; } function isNodeArray(array) { return hasProperty(array, "pos") && hasProperty(array, "end"); @@ -10604,11 +10651,11 @@ function isLiteralExpression(node) { } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: case 14 /* RegularExpressionLiteral */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: return true; } return false; @@ -10625,23 +10672,23 @@ function isImportOrExportSpecifier(node) { } function isTypeOnlyImportDeclaration(node) { switch (node.kind) { - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.isTypeOnly; - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: return node.isTypeOnly; } return false; } function isTypeOnlyExportDeclaration(node) { switch (node.kind) { - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause; - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return node.parent.isTypeOnly; } return false; @@ -10660,6 +10707,10 @@ function isGeneratedPrivateIdentifier(node) { var _a; return isPrivateIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0; } +function isFileLevelReservedGeneratedIdentifier(node) { + const flags = node.emitNode.autoGenerate.flags; + return !!(flags & 32 /* FileLevel */) && !!(flags & 16 /* Optimistic */) && !!(flags & 8 /* ReservedInNestedScopes */); +} function isPrivateIdentifierClassElementDeclaration(node) { return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name); } @@ -10682,7 +10733,7 @@ function isModifierKind(token) { case 148 /* ReadonlyKeyword */: case 126 /* StaticKeyword */: case 147 /* OutKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return true; } return false; @@ -10691,22 +10742,22 @@ function isParameterPropertyModifier(kind) { return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 163 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; + return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; } function isModifier(node) { return isModifierKind(node.kind); } function isEntityName(node) { const kind = node.kind; - return kind === 165 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 166 /* ComputedPropertyName */; + return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 205 /* ObjectBindingPattern */ || kind === 206 /* ArrayBindingPattern */; + return kind === 80 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -10722,13 +10773,13 @@ function isBooleanLiteral(node) { } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: return false; @@ -10736,14 +10787,14 @@ function isFunctionLikeDeclarationKind(kind) { } function isFunctionLikeKind(kind) { switch (kind) { - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 183 /* FunctionType */: - case 323 /* JSDocFunctionType */: - case 184 /* ConstructorType */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 184 /* FunctionType */: + case 324 /* JSDocFunctionType */: + case 185 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -10754,22 +10805,22 @@ function isFunctionOrModuleBlock(node) { } function isClassElement(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 180 /* IndexSignature */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 239 /* SemicolonClassElement */; + return kind === 176 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 240 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */); + return node && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */); } function isAccessor(node) { - return node && (node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */); + return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -10777,10 +10828,10 @@ function isMethodOrAccessor(node) { } function isNamedClassElement(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: return true; default: return false; @@ -10791,19 +10842,19 @@ function isModifierLike(node) { } function isTypeElement(node) { const kind = node.kind; - return kind === 179 /* ConstructSignature */ || kind === 178 /* CallSignature */ || kind === 170 /* PropertySignature */ || kind === 172 /* MethodSignature */ || kind === 180 /* IndexSignature */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 304 /* SpreadAssignment */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 305 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return true; } return false; @@ -10811,23 +10862,23 @@ function isFunctionOrConstructorTypeNode(node) { function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 206 /* ArrayBindingPattern */ || kind === 205 /* ObjectBindingPattern */; + return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 208 /* ArrayLiteralExpression */ || kind === 209 /* ObjectLiteralExpression */; + return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 207 /* BindingElement */ || kind === 231 /* OmittedExpression */; + return kind === 208 /* BindingElement */ || kind === 232 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: return true; } return false; @@ -10840,40 +10891,40 @@ function isBindingOrAssignmentPattern(node) { } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 205 /* ObjectBindingPattern */: - case 209 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 210 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return true; } return false; } function isArrayBindingOrAssignmentElement(node) { switch (node.kind) { - case 207 /* BindingElement */: - case 231 /* OmittedExpression */: - case 229 /* SpreadElement */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: + case 208 /* BindingElement */: + case 232 /* OmittedExpression */: + case 230 /* SpreadElement */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return true; } return isAssignmentExpression( @@ -10884,46 +10935,46 @@ function isArrayBindingOrAssignmentElement(node) { } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 210 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */ || kind === 204 /* ImportType */; + return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 205 /* ImportType */; } function isCallLikeExpression(node) { switch (node.kind) { - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 169 /* Decorator */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 170 /* Decorator */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 212 /* CallExpression */ || node.kind === 213 /* NewExpression */; + return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 227 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; + return kind === 228 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 213 /* NewExpression */: - case 212 /* CallExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: - case 214 /* TaggedTemplateExpression */: - case 208 /* ArrayLiteralExpression */: - case 216 /* ParenthesizedExpression */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 214 /* NewExpression */: + case 213 /* CallExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: + case 215 /* TaggedTemplateExpression */: + case 209 /* ArrayLiteralExpression */: + case 217 /* ParenthesizedExpression */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: case 80 /* Identifier */: case 81 /* PrivateIdentifier */: case 14 /* RegularExpressionLiteral */: @@ -10931,17 +10982,17 @@ function isLeftHandSideExpressionKind(kind) { case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 110 /* ThisKeyword */: case 112 /* TrueKeyword */: case 108 /* SuperKeyword */: - case 234 /* NonNullExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 235 /* MetaProperty */: + case 235 /* NonNullExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 236 /* MetaProperty */: case 102 /* ImportKeyword */: - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return true; default: return false; @@ -10952,13 +11003,13 @@ function isUnaryExpression(node) { } function isUnaryExpressionKind(kind) { switch (kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: - case 219 /* DeleteExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 222 /* AwaitExpression */: - case 215 /* TypeAssertionExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 220 /* DeleteExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 223 /* AwaitExpression */: + case 216 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -10969,7 +11020,7 @@ function isLiteralTypeLiteral(node) { case 106 /* NullKeyword */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -10980,16 +11031,16 @@ function isExpression(node) { } function isExpressionKind(kind) { switch (kind) { - case 226 /* ConditionalExpression */: - case 228 /* YieldExpression */: - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 229 /* SpreadElement */: - case 233 /* AsExpression */: - case 231 /* OmittedExpression */: - case 360 /* CommaListExpression */: - case 359 /* PartiallyEmittedExpression */: - case 237 /* SatisfiesExpression */: + case 227 /* ConditionalExpression */: + case 229 /* YieldExpression */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 230 /* SpreadElement */: + case 234 /* AsExpression */: + case 232 /* OmittedExpression */: + case 361 /* CommaListExpression */: + case 360 /* PartiallyEmittedExpression */: + case 238 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -10997,17 +11048,17 @@ function isExpressionKind(kind) { } function isAssertionExpression(node) { const kind = node.kind; - return kind === 215 /* TypeAssertionExpression */ || kind === 233 /* AsExpression */; + return kind === 216 /* TypeAssertionExpression */ || kind === 234 /* AsExpression */; } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return true; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -11025,7 +11076,7 @@ function isExternalModuleIndicator(result) { return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); } function isForInOrOfStatement(node) { - return node.kind === 248 /* ForInStatement */ || node.kind === 249 /* ForOfStatement */; + return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -11035,81 +11086,81 @@ function isForInitializer(node) { } function isModuleBody(node) { const kind = node.kind; - return kind === 267 /* ModuleBlock */ || kind === 266 /* ModuleDeclaration */ || kind === 80 /* Identifier */; + return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */ || kind === 80 /* Identifier */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 274 /* NamedImports */ || kind === 273 /* NamespaceImport */; + return kind === 275 /* NamedImports */ || kind === 274 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */ || node.kind === 265 /* EnumDeclaration */; + return node.kind === 267 /* ModuleDeclaration */ || node.kind === 266 /* EnumDeclaration */; } function canHaveSymbol(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 207 /* BindingElement */: - case 212 /* CallExpression */: - case 178 /* CallSignature */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 174 /* ClassStaticBlockDeclaration */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 211 /* ElementAccessExpression */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: - case 280 /* ExportSpecifier */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 208 /* BindingElement */: + case 213 /* CallExpression */: + case 179 /* CallSignature */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 175 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 212 /* ElementAccessExpression */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: + case 281 /* ExportSpecifier */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: case 80 /* Identifier */: - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: - case 323 /* JSDocFunctionType */: - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: - case 329 /* JSDocSignature */: - case 352 /* JSDocTypedefTag */: - case 328 /* JSDocTypeLiteral */: - case 290 /* JsxAttribute */: - case 291 /* JsxAttributes */: - case 292 /* JsxSpreadAttribute */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 201 /* NamedTupleMember */: - case 279 /* NamespaceExport */: - case 269 /* NamespaceExportDeclaration */: - case 273 /* NamespaceImport */: - case 213 /* NewExpression */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: + case 324 /* JSDocFunctionType */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 330 /* JSDocSignature */: + case 353 /* JSDocTypedefTag */: + case 329 /* JSDocTypeLiteral */: + case 291 /* JsxAttribute */: + case 292 /* JsxAttributes */: + case 293 /* JsxSpreadAttribute */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 202 /* NamedTupleMember */: + case 280 /* NamespaceExport */: + case 270 /* NamespaceExportDeclaration */: + case 274 /* NamespaceImport */: + case 214 /* NewExpression */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: - case 209 /* ObjectLiteralExpression */: - case 168 /* Parameter */: - case 210 /* PropertyAccessExpression */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 311 /* SourceFile */: - case 304 /* SpreadAssignment */: + case 210 /* ObjectLiteralExpression */: + case 169 /* Parameter */: + case 211 /* PropertyAccessExpression */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 312 /* SourceFile */: + case 305 /* SpreadAssignment */: case 11 /* StringLiteral */: - case 264 /* TypeAliasDeclaration */: - case 186 /* TypeLiteral */: - case 167 /* TypeParameter */: - case 259 /* VariableDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 187 /* TypeLiteral */: + case 168 /* TypeParameter */: + case 260 /* VariableDeclaration */: return true; default: return false; @@ -11117,53 +11168,53 @@ function canHaveSymbol(node) { } function canHaveLocals(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 240 /* Block */: - case 178 /* CallSignature */: - case 268 /* CaseBlock */: - case 298 /* CatchClause */: - case 174 /* ClassStaticBlockDeclaration */: - case 193 /* ConditionalType */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: - case 180 /* IndexSignature */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 352 /* JSDocTypedefTag */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 177 /* SetAccessor */: - case 311 /* SourceFile */: - case 264 /* TypeAliasDeclaration */: + case 219 /* ArrowFunction */: + case 241 /* Block */: + case 179 /* CallSignature */: + case 269 /* CaseBlock */: + case 299 /* CatchClause */: + case 175 /* ClassStaticBlockDeclaration */: + case 194 /* ConditionalType */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: + case 181 /* IndexSignature */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 353 /* JSDocTypedefTag */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 178 /* SetAccessor */: + case 312 /* SourceFile */: + case 265 /* TypeAliasDeclaration */: return true; default: return false; } } function isDeclarationKind(kind) { - return kind === 218 /* ArrowFunction */ || kind === 207 /* BindingElement */ || kind === 262 /* ClassDeclaration */ || kind === 230 /* ClassExpression */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 175 /* Constructor */ || kind === 265 /* EnumDeclaration */ || kind === 305 /* EnumMember */ || kind === 280 /* ExportSpecifier */ || kind === 261 /* FunctionDeclaration */ || kind === 217 /* FunctionExpression */ || kind === 176 /* GetAccessor */ || kind === 272 /* ImportClause */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 275 /* ImportSpecifier */ || kind === 263 /* InterfaceDeclaration */ || kind === 290 /* JsxAttribute */ || kind === 173 /* MethodDeclaration */ || kind === 172 /* MethodSignature */ || kind === 266 /* ModuleDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 273 /* NamespaceImport */ || kind === 279 /* NamespaceExport */ || kind === 168 /* Parameter */ || kind === 302 /* PropertyAssignment */ || kind === 171 /* PropertyDeclaration */ || kind === 170 /* PropertySignature */ || kind === 177 /* SetAccessor */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 264 /* TypeAliasDeclaration */ || kind === 167 /* TypeParameter */ || kind === 259 /* VariableDeclaration */ || kind === 352 /* JSDocTypedefTag */ || kind === 344 /* JSDocCallbackTag */ || kind === 354 /* JSDocPropertyTag */; + return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 176 /* Constructor */ || kind === 266 /* EnumDeclaration */ || kind === 306 /* EnumMember */ || kind === 281 /* ExportSpecifier */ || kind === 262 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 273 /* ImportClause */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 276 /* ImportSpecifier */ || kind === 264 /* InterfaceDeclaration */ || kind === 291 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 267 /* ModuleDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 274 /* NamespaceImport */ || kind === 280 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 303 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 265 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 260 /* VariableDeclaration */ || kind === 353 /* JSDocTypedefTag */ || kind === 345 /* JSDocCallbackTag */ || kind === 355 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 261 /* FunctionDeclaration */ || kind === 281 /* MissingDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 269 /* NamespaceExportDeclaration */; + return kind === 262 /* FunctionDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 270 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 251 /* BreakStatement */ || kind === 250 /* ContinueStatement */ || kind === 258 /* DebuggerStatement */ || kind === 245 /* DoStatement */ || kind === 243 /* ExpressionStatement */ || kind === 241 /* EmptyStatement */ || kind === 248 /* ForInStatement */ || kind === 249 /* ForOfStatement */ || kind === 247 /* ForStatement */ || kind === 244 /* IfStatement */ || kind === 255 /* LabeledStatement */ || kind === 252 /* ReturnStatement */ || kind === 254 /* SwitchStatement */ || kind === 256 /* ThrowStatement */ || kind === 257 /* TryStatement */ || kind === 242 /* VariableStatement */ || kind === 246 /* WhileStatement */ || kind === 253 /* WithStatement */ || kind === 358 /* NotEmittedStatement */; + return kind === 252 /* BreakStatement */ || kind === 251 /* ContinueStatement */ || kind === 259 /* DebuggerStatement */ || kind === 246 /* DoStatement */ || kind === 244 /* ExpressionStatement */ || kind === 242 /* EmptyStatement */ || kind === 249 /* ForInStatement */ || kind === 250 /* ForOfStatement */ || kind === 248 /* ForStatement */ || kind === 245 /* IfStatement */ || kind === 256 /* LabeledStatement */ || kind === 253 /* ReturnStatement */ || kind === 255 /* SwitchStatement */ || kind === 257 /* ThrowStatement */ || kind === 258 /* TryStatement */ || kind === 243 /* VariableStatement */ || kind === 247 /* WhileStatement */ || kind === 254 /* WithStatement */ || kind === 359 /* NotEmittedStatement */; } function isDeclaration(node) { - if (node.kind === 167 /* TypeParameter */) { - return node.parent && node.parent.kind !== 351 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 168 /* TypeParameter */) { + return node.parent && node.parent.kind !== 352 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -11178,10 +11229,10 @@ function isStatement(node) { return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 240 /* Block */) + if (node.kind !== 241 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 257 /* TryStatement */ || node.parent.kind === 298 /* CatchClause */) { + if (node.parent.kind === 258 /* TryStatement */ || node.parent.kind === 299 /* CatchClause */) { return false; } } @@ -11189,47 +11240,47 @@ function isBlockStatement(node) { } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 240 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 241 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 282 /* ExternalModuleReference */ || kind === 165 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 283 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 210 /* PropertyAccessExpression */ || kind === 294 /* JsxNamespacedName */; + return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 211 /* PropertyAccessExpression */ || kind === 295 /* JsxNamespacedName */; } function isJsxChild(node) { const kind = node.kind; - return kind === 283 /* JsxElement */ || kind === 293 /* JsxExpression */ || kind === 284 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 287 /* JsxFragment */; + return kind === 284 /* JsxElement */ || kind === 294 /* JsxExpression */ || kind === 285 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 288 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 290 /* JsxAttribute */ || kind === 292 /* JsxSpreadAttribute */; + return kind === 291 /* JsxAttribute */ || kind === 293 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 11 /* StringLiteral */ || kind === 293 /* JsxExpression */; + return kind === 11 /* StringLiteral */ || kind === 294 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 285 /* JsxOpeningElement */ || kind === 284 /* JsxSelfClosingElement */; + return kind === 286 /* JsxOpeningElement */ || kind === 285 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 295 /* CaseClause */ || kind === 296 /* DefaultClause */; + return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 315 /* FirstJSDocNode */ && node.kind <= 356 /* LastJSDocNode */; + return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 357 /* LastJSDocNode */; } function isJSDocTag(node) { - return node.kind >= 333 /* FirstJSDocTagNode */ && node.kind <= 356 /* LastJSDocTagNode */; + return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <= 357 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 177 /* SetAccessor */; + return node.kind === 178 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 176 /* GetAccessor */; + return node.kind === 177 /* GetAccessor */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) @@ -11245,19 +11296,19 @@ function hasInitializer(node) { } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: - case 305 /* EnumMember */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: + case 306 /* EnumMember */: return true; default: return false; } } function isTypeReferenceType(node) { - return node.kind === 182 /* TypeReference */ || node.kind === 232 /* ExpressionWithTypeArguments */; + return node.kind === 183 /* TypeReference */ || node.kind === 233 /* ExpressionWithTypeArguments */; } var MAX_SMI_X86 = 1073741823; function guessIndentation(lines) { @@ -11285,7 +11336,7 @@ function isStringLiteralLike(node) { return node.kind === 11 /* StringLiteral */ || node.kind === 15 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 330 /* JSDocLink */ || node.kind === 331 /* JSDocLinkCode */ || node.kind === 332 /* JSDocLinkPlain */; + return node.kind === 331 /* JSDocLink */ || node.kind === 332 /* JSDocLinkCode */ || node.kind === 333 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -11293,7 +11344,7 @@ function hasRestParameter(s) { } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 324 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 325 /* JSDocVariadicType */; } // src/compiler/utilities.ts @@ -11494,19 +11545,19 @@ function hasChangesInResolutions(names, newSourceFile, newResolutions, oldResolu } function containsParseError(node) { aggregateChildData(node); - return (node.flags & 524288 /* ThisNodeOrAnySubNodesHasError */) !== 0; + return (node.flags & 1048576 /* ThisNodeOrAnySubNodesHasError */) !== 0; } function aggregateChildData(node) { - if (!(node.flags & 1048576 /* HasAggregatedChildData */)) { - const thisNodeOrAnySubNodesHasError = (node.flags & 131072 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); + if (!(node.flags & 2097152 /* HasAggregatedChildData */)) { + const thisNodeOrAnySubNodesHasError = (node.flags & 262144 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); if (thisNodeOrAnySubNodesHasError) { - node.flags |= 524288 /* ThisNodeOrAnySubNodesHasError */; + node.flags |= 1048576 /* ThisNodeOrAnySubNodesHasError */; } - node.flags |= 1048576 /* HasAggregatedChildData */; + node.flags |= 2097152 /* HasAggregatedChildData */; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 311 /* SourceFile */) { + while (node && node.kind !== 312 /* SourceFile */) { node = node.parent; } return node; @@ -11519,11 +11570,11 @@ function isPlainJsFile(file, checkJs) { } function isStatementWithLocals(node) { switch (node.kind) { - case 240 /* Block */: - case 268 /* CaseBlock */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return true; } return false; @@ -11640,7 +11691,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) { if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 357 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 358 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return skipTrivia( @@ -12145,11 +12196,11 @@ function makeIdentifierFromModuleName(moduleName) { return getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); } function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 3 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclarationOrBindingElement(declaration); + return (getCombinedNodeFlags(declaration) & 7 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclarationOrBindingElement(declaration); } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 259 /* VariableDeclaration */ && node.parent.kind === 298 /* CatchClause */; + return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 11 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -12167,22 +12218,22 @@ function isShorthandAmbientModuleSymbol(moduleSymbol) { return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 266 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 267 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 311 /* SourceFile */ || node.kind === 266 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 312 /* SourceFile */ || node.kind === 267 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { - return !!(module2.flags & 1024 /* GlobalAugmentation */); + return !!(module2.flags & 2048 /* GlobalAugmentation */); } function isExternalModuleAugmentation(node) { return isAmbientModule(node) && isModuleAugmentationExternal(node); } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return isExternalModule(node.parent); - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -12225,36 +12276,36 @@ function isEffectiveStrictModeSourceFile(node, compilerOptions) { return false; } function isAmbientPropertyDeclaration(node) { - return !!(node.flags & 16777216 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); + return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); } function isBlockScope(node, parentNode) { switch (node.kind) { - case 311 /* SourceFile */: - case 268 /* CaseBlock */: - case 298 /* CatchClause */: - case 266 /* ModuleDeclaration */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 171 /* PropertyDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: + case 312 /* SourceFile */: + case 269 /* CaseBlock */: + case 299 /* CatchClause */: + case 267 /* ModuleDeclaration */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 172 /* PropertyDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return true; - case 240 /* Block */: + case 241 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; } function isAnyImportSyntax(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: return true; default: return false; @@ -12262,15 +12313,15 @@ function isAnyImportSyntax(node) { } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 242 /* VariableStatement */: - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 243 /* VariableStatement */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: return true; default: return false; @@ -12282,6 +12333,9 @@ function hasPossibleExternalModuleReference(node) { function isAnyImportOrReExport(node) { return isAnyImportSyntax(node) || isExportDeclaration(node); } +function getEnclosingContainer(node) { + return findAncestor(node.parent, (n) => !!(getContainerFlags(n) & 1 /* IsContainer */)); +} function getEnclosingBlockScopeContainer(node) { return findAncestor(node.parent, (current) => isBlockScope(current, current.parent)); } @@ -12299,7 +12353,7 @@ function getNameFromIndexInfo(info) { return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 166 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a; @@ -12311,11 +12365,11 @@ function tryGetTextOfPropertyName(name) { case 9 /* NumericLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -12331,17 +12385,17 @@ function entityNameToString(name) { case 81 /* PrivateIdentifier */: case 80 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 317 /* JSDocMemberName */: + case 318 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return entityNameToString(name.namespace) + ":" + entityNameToString(name.name); default: return Debug.assertNever(name); @@ -12447,7 +12501,7 @@ function scanTokenAtPosition(sourceFile, pos) { } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 240 /* Block */) { + if (node.body && node.body.kind === 241 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -12459,7 +12513,7 @@ function getErrorSpanForArrowFunction(sourceFile, node) { function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 311 /* SourceFile */: { + case 312 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -12471,43 +12525,43 @@ function getErrorSpanForNode(sourceFile, node) { } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 264 /* TypeAliasDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 273 /* NamespaceImport */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 265 /* TypeAliasDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 274 /* NamespaceImport */: errorNode = node.name; break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: { + case 296 /* CaseClause */: + case 297 /* DefaultClause */: { const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); } - case 252 /* ReturnStatement */: - case 228 /* YieldExpression */: { + case 253 /* ReturnStatement */: + case 229 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 237 /* SatisfiesExpression */: { + case 238 /* SatisfiesExpression */: { const pos2 = skipTrivia(sourceFile.text, node.expression.end); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 356 /* JSDocSatisfiesTag */: { + case 357 /* JSDocSatisfiesTag */: { const pos2 = skipTrivia(sourceFile.text, node.tagName.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } @@ -12539,17 +12593,23 @@ function isEnumConst(node) { function isDeclarationReadonly(declaration) { return !!(getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); } +function isVarAwaitUsing(node) { + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 6 /* AwaitUsing */; +} +function isVarUsing(node) { + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 4 /* Using */; +} function isVarConst(node) { - return !!(getCombinedNodeFlags(node) & 2 /* Const */); + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 2 /* Const */; } function isLet(node) { - return !!(getCombinedNodeFlags(node) & 1 /* Let */); + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 1 /* Let */; } function isSuperCall(n) { - return n.kind === 212 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; + return n.kind === 213 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 212 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */; + return n.kind === 213 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */; } function isImportMeta(n) { return isMetaProperty(n) && n.keywordToken === 102 /* ImportKeyword */ && n.name.escapedText === "meta"; @@ -12558,7 +12618,7 @@ function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 243 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; + return node.kind === 244 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -12576,7 +12636,7 @@ function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 168 /* Parameter */ || node.kind === 167 /* TypeParameter */ || node.kind === 217 /* FunctionExpression */ || node.kind === 218 /* ArrowFunction */ || node.kind === 216 /* ParenthesizedExpression */ || node.kind === 259 /* VariableDeclaration */ || node.kind === 280 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 260 /* VariableDeclaration */ || node.kind === 281 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } var fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; @@ -12586,14 +12646,14 @@ var fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; var defaultLibReferenceRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (181 /* FirstTypeNode */ <= node.kind && node.kind <= 204 /* LastTypeNode */) { + if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) { return true; } switch (node.kind) { case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 154 /* StringKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: @@ -12603,64 +12663,64 @@ function isPartOfTypeNode(node) { case 146 /* NeverKeyword */: return true; case 116 /* VoidKeyword */: - return node.parent.kind !== 221 /* VoidExpression */; - case 232 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 222 /* VoidExpression */; + case 233 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 167 /* TypeParameter */: - return node.parent.kind === 199 /* MappedType */ || node.parent.kind === 194 /* InferType */; + case 168 /* TypeParameter */: + return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */; case 80 /* Identifier */: - if (node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 80 /* Identifier */ || node.kind === 165 /* QualifiedName */ || node.kind === 210 /* PropertyAccessExpression */, + node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 165 /* QualifiedName */: - case 210 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: case 110 /* ThisKeyword */: { const { parent } = node; - if (parent.kind === 185 /* TypeQuery */) { + if (parent.kind === 186 /* TypeQuery */) { return false; } - if (parent.kind === 204 /* ImportType */) { + if (parent.kind === 205 /* ImportType */) { return !parent.isTypeOf; } - if (181 /* FirstTypeNode */ <= parent.kind && parent.kind <= 204 /* LastTypeNode */) { + if (182 /* FirstTypeNode */ <= parent.kind && parent.kind <= 205 /* LastTypeNode */) { return true; } switch (parent.kind) { - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isHeritageClause(parent.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return node === parent.constraint; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return node === parent.constraint; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 168 /* Parameter */: - case 259 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 169 /* Parameter */: + case 260 /* VariableDeclaration */: return node === parent.type; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return node === parent.type; - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return node === parent.type; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return node === parent.type; - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: return contains(parent.typeArguments, node); } } @@ -12671,23 +12731,23 @@ function forEachReturnStatement(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitor(node); - case 268 /* CaseBlock */: - case 240 /* Block */: - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 253 /* WithStatement */: - case 254 /* SwitchStatement */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 255 /* LabeledStatement */: - case 257 /* TryStatement */: - case 298 /* CatchClause */: + case 269 /* CaseBlock */: + case 241 /* Block */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 254 /* WithStatement */: + case 255 /* SwitchStatement */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 256 /* LabeledStatement */: + case 258 /* TryStatement */: + case 299 /* CatchClause */: return forEachChild(node, traverse); } } @@ -12696,21 +12756,21 @@ function forEachYieldExpression(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 265 /* EnumDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -12721,9 +12781,9 @@ function forEachYieldExpression(body, visitor) { } } function getRestParameterElementType(node) { - if (node && node.kind === 187 /* ArrayType */) { + if (node && node.kind === 188 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 182 /* TypeReference */) { + } else if (node && node.kind === 183 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -12731,26 +12791,26 @@ function getRestParameterElementType(node) { } function getMembersOfDeclaration(node) { switch (node.kind) { - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 186 /* TypeLiteral */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 187 /* TypeLiteral */: return node.members; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 207 /* BindingElement */: - case 305 /* EnumMember */: - case 168 /* Parameter */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 303 /* ShorthandPropertyAssignment */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 306 /* EnumMember */: + case 169 /* Parameter */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 304 /* ShorthandPropertyAssignment */: + case 260 /* VariableDeclaration */: return true; } } @@ -12760,7 +12820,7 @@ function isVariableLikeOrAccessor(node) { return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 260 /* VariableDeclarationList */ && node.parent.parent.kind === 242 /* VariableStatement */; + return node.parent.kind === 261 /* VariableDeclarationList */ && node.parent.parent.kind === 243 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -12777,13 +12837,13 @@ function isValidESSymbolDeclaration(node) { } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return true; } return false; @@ -12793,20 +12853,20 @@ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) { if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 255 /* LabeledStatement */) { + if (node.statement.kind !== 256 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 240 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 241 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 173 /* MethodDeclaration */ && node.parent.kind === 209 /* ObjectLiteralExpression */; + return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 173 /* MethodDeclaration */ || node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */) && (node.parent.kind === 209 /* ObjectLiteralExpression */ || node.parent.kind === 230 /* ClassExpression */); + return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 231 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -12855,64 +12915,68 @@ function getContainingClassStaticBlock(node) { function getContainingFunctionOrClassStaticBlock(node) { return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration); } +function getContainingClassExcludingClassDecorators(node) { + const decorator = findAncestor(node.parent, (n) => isClassLike(n) ? "quit" : isDecorator(n)); + return decorator && isClassLike(decorator.parent) ? getContainingClass(decorator.parent) : getContainingClass(decorator ?? node); +} function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) { - Debug.assert(node.kind !== 311 /* SourceFile */); + Debug.assert(node.kind !== 312 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) { return node; } node = node.parent.parent; break; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 266 /* ModuleDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 265 /* EnumDeclaration */: - case 311 /* SourceFile */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 267 /* ModuleDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 266 /* EnumDeclaration */: + case 312 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 171 /* PropertyDeclaration */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 172 /* PropertyDeclaration */: return true; - case 240 /* Block */: + case 241 /* Block */: switch (node.parent.kind) { - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -12944,9 +13008,9 @@ function getNewTargetContainer(node) { ); if (container) { switch (container.kind) { - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return container; } } @@ -12959,26 +13023,26 @@ function getSuperContainer(node, stopOnFunctions) { return void 0; } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: node = node.parent; break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: return node; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -12988,25 +13052,25 @@ function getSuperContainer(node, stopOnFunctions) { } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 217 /* FunctionExpression */ || func.kind === 218 /* ArrowFunction */) { + if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) { let prev = func; let parent = func.parent; - while (parent.kind === 216 /* ParenthesizedExpression */) { + while (parent.kind === 217 /* ParenthesizedExpression */) { prev = parent; parent = parent.parent; } - if (parent.kind === 212 /* CallExpression */ && parent.expression === prev) { + if (parent.kind === 213 /* CallExpression */ && parent.expression === prev) { return parent; } } } function isSuperProperty(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a; @@ -13017,22 +13081,22 @@ function isThisInitializedObjectBindingExpression(node) { } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 80 /* Identifier */: - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return node.tag; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -13043,20 +13107,20 @@ function nodeCanBeDecorated(useLegacyDecorators, node, parent, grandparent) { return false; } switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return true; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return !useLegacyDecorators; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return parent !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent) : isClassLike(parent) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: return node.body !== void 0 && parent !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent) : isClassLike(parent)); - case 168 /* Parameter */: + case 169 /* Parameter */: if (!useLegacyDecorators) return false; - return parent !== void 0 && parent.body !== void 0 && (parent.kind === 175 /* Constructor */ || parent.kind === 173 /* MethodDeclaration */ || parent.kind === 177 /* SetAccessor */) && getThisParameter(parent) !== node && grandparent !== void 0 && grandparent.kind === 262 /* ClassDeclaration */; + return parent !== void 0 && parent.body !== void 0 && (parent.kind === 176 /* Constructor */ || parent.kind === 174 /* MethodDeclaration */ || parent.kind === 178 /* SetAccessor */) && getThisParameter(parent) !== node && grandparent !== void 0 && grandparent.kind === 263 /* ClassDeclaration */; } return false; } @@ -13068,13 +13132,13 @@ function nodeOrChildIsDecorated(useLegacyDecorators, node, parent, grandparent) } function childIsDecorated(useLegacyDecorators, node, parent) { switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent)); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent)); - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent)); default: return false; @@ -13125,7 +13189,7 @@ function isEmptyStringLiteral(node) { } function isJSXTagName(node) { const { parent } = node; - if (parent.kind === 285 /* JsxOpeningElement */ || parent.kind === 284 /* JsxSelfClosingElement */ || parent.kind === 286 /* JsxClosingElement */) { + if (parent.kind === 286 /* JsxOpeningElement */ || parent.kind === 285 /* JsxSelfClosingElement */ || parent.kind === 287 /* JsxClosingElement */) { return parent.tagName === node; } return false; @@ -13137,54 +13201,54 @@ function isExpressionNode(node) { case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: case 14 /* RegularExpressionLiteral */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 233 /* AsExpression */: - case 215 /* TypeAssertionExpression */: - case 237 /* SatisfiesExpression */: - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 220 /* TypeOfExpression */: - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: - case 225 /* BinaryExpression */: - case 226 /* ConditionalExpression */: - case 229 /* SpreadElement */: - case 227 /* TemplateExpression */: - case 231 /* OmittedExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: - case 228 /* YieldExpression */: - case 222 /* AwaitExpression */: - case 235 /* MetaProperty */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 234 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 238 /* SatisfiesExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 221 /* TypeOfExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 226 /* BinaryExpression */: + case 227 /* ConditionalExpression */: + case 230 /* SpreadElement */: + case 228 /* TemplateExpression */: + case 232 /* OmittedExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: + case 229 /* YieldExpression */: + case 223 /* AwaitExpression */: + case 236 /* MetaProperty */: return true; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); - case 165 /* QualifiedName */: - while (node.parent.kind === 165 /* QualifiedName */) { + case 166 /* QualifiedName */: + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 317 /* JSDocMemberName */: + return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 318 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); case 81 /* PrivateIdentifier */: return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 103 /* InKeyword */; case 80 /* Identifier */: - if (node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 9 /* NumericLiteral */: @@ -13200,64 +13264,64 @@ function isExpressionNode(node) { function isInExpressionContext(node) { const { parent } = node; switch (parent.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 305 /* EnumMember */: - case 302 /* PropertyAssignment */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 306 /* EnumMember */: + case 303 /* PropertyAssignment */: + case 208 /* BindingElement */: return parent.initializer === node; - case 243 /* ExpressionStatement */: - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 252 /* ReturnStatement */: - case 253 /* WithStatement */: - case 254 /* SwitchStatement */: - case 295 /* CaseClause */: - case 256 /* ThrowStatement */: + case 244 /* ExpressionStatement */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 253 /* ReturnStatement */: + case 254 /* WithStatement */: + case 255 /* SwitchStatement */: + case 296 /* CaseClause */: + case 257 /* ThrowStatement */: return parent.expression === node; - case 247 /* ForStatement */: + case 248 /* ForStatement */: const forStatement = parent; - return forStatement.initializer === node && forStatement.initializer.kind !== 260 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: const forInStatement = parent; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 260 /* VariableDeclarationList */ || forInStatement.expression === node; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInStatement.expression === node; + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return node === parent.expression; - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return node === parent.expression; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return node === parent.expression; - case 169 /* Decorator */: - case 293 /* JsxExpression */: - case 292 /* JsxSpreadAttribute */: - case 304 /* SpreadAssignment */: + case 170 /* Decorator */: + case 294 /* JsxExpression */: + case 293 /* JsxSpreadAttribute */: + case 305 /* SpreadAssignment */: return true; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return parent.expression === node && !isPartOfTypeNode(parent); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return parent.objectAssignmentInitializer === node; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return node === parent.expression; default: return isExpressionNode(parent); } } function isPartOfTypeQuery(node) { - while (node.kind === 165 /* QualifiedName */ || node.kind === 80 /* Identifier */) { + while (node.kind === 166 /* QualifiedName */ || node.kind === 80 /* Identifier */) { node = node.parent; } - return node.kind === 185 /* TypeQuery */; + return node.kind === 186 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 282 /* ExternalModuleReference */; + return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -13267,28 +13331,28 @@ function getExternalModuleRequireArgument(node) { return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 282 /* ExternalModuleReference */; + return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 283 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); } function isInJSFile(node) { - return !!node && !!(node.flags & 262144 /* JavaScriptFile */); + return !!node && !!(node.flags & 524288 /* JavaScriptFile */); } function isInJsonFile(node) { - return !!node && !!(node.flags & 67108864 /* JsonFile */); + return !!node && !!(node.flags & 134217728 /* JsonFile */); } function isSourceFileNotJson(file) { return !isJsonSourceFile(file); } function isInJSDoc(node) { - return !!node && !!(node.flags & 8388608 /* JSDoc */); + return !!node && !!(node.flags & 16777216 /* JSDoc */); } function isJSDocIndexSignature(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 154 /* StringKeyword */ || node.typeArguments[0].kind === 150 /* NumberKeyword */); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 212 /* CallExpression */) { + if (callExpression.kind !== 213 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -13365,9 +13429,9 @@ function getAssignedExpandoInitializer(node) { function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 217 /* FunctionExpression */ || e.kind === 218 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 217 /* FunctionExpression */ || initializer.kind === 230 /* ClassExpression */ || initializer.kind === 218 /* ArrowFunction */) { + if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 231 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -13558,11 +13622,11 @@ function isPrototypePropertyAssignment(node) { return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 243 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 244 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; - if (!valueDeclaration || !(node.flags & 16777216 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 16777216 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) { + if (!valueDeclaration || !(node.flags & 33554432 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 33554432 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) { symbol.valueDeclaration = node; } } @@ -13571,29 +13635,29 @@ function isFunctionSymbol(symbol) { return false; } const decl = symbol.valueDeclaration; - return decl.kind === 261 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 262 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a, _b; switch (node.kind) { - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: return (_a = findAncestor(node.initializer, (node2) => isRequireCall( node2, /*requireStringLiteralLikeArgument*/ true ))) == null ? void 0 : _a.arguments[0]; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); - case 272 /* ImportClause */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 280 /* NamespaceExport */: return tryCast(node.parent.moduleSpecifier, isStringLiteralLike); - case 273 /* NamespaceImport */: - case 280 /* ExportSpecifier */: + case 274 /* NamespaceImport */: + case 281 /* ExportSpecifier */: return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); default: Debug.assertNever(node); @@ -13601,16 +13665,16 @@ function tryGetModuleSpecifierFromDeclaration(node) { } function getExternalModuleName(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: return node.moduleSpecifier; - case 270 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 282 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 204 /* ImportType */: + case 271 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 283 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 205 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return node.arguments[0]; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return node.name.kind === 11 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -13618,18 +13682,18 @@ function getExternalModuleName(node) { } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return node; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 271 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 272 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -13646,13 +13710,13 @@ function forEachImportClauseDeclaration(node, action) { function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 168 /* Parameter */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 303 /* ShorthandPropertyAssignment */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 169 /* Parameter */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 304 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -13664,7 +13728,7 @@ function isJSDocConstructSignature(node) { return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 352 /* JSDocTypedefTag */ || node.kind === 344 /* JSDocCallbackTag */ || node.kind === 346 /* JSDocEnumTag */; + return node.kind === 353 /* JSDocTypedefTag */ || node.kind === 345 /* JSDocCallbackTag */ || node.kind === 347 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -13677,12 +13741,12 @@ function getSourceOfDefaultedAssignment(node) { } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return node.initializer; } } @@ -13690,26 +13754,26 @@ function getSingleVariableOfVariableStatement(node) { return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 266 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 267 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveFlowNode(node) { - if (node.kind >= 242 /* FirstStatement */ && node.kind <= 258 /* LastStatement */) { + if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */) { return true; } switch (node.kind) { case 80 /* Identifier */: case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 165 /* QualifiedName */: - case 235 /* MetaProperty */: - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: - case 207 /* BindingElement */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 166 /* QualifiedName */: + case 236 /* MetaProperty */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 208 /* BindingElement */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -13717,72 +13781,72 @@ function canHaveFlowNode(node) { } function canHaveJSDoc(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 240 /* Block */: - case 251 /* BreakStatement */: - case 178 /* CallSignature */: - case 295 /* CaseClause */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 174 /* ClassStaticBlockDeclaration */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 250 /* ContinueStatement */: - case 258 /* DebuggerStatement */: - case 245 /* DoStatement */: - case 211 /* ElementAccessExpression */: - case 241 /* EmptyStatement */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 241 /* Block */: + case 252 /* BreakStatement */: + case 179 /* CallSignature */: + case 296 /* CaseClause */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 175 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 251 /* ContinueStatement */: + case 259 /* DebuggerStatement */: + case 246 /* DoStatement */: + case 212 /* ElementAccessExpression */: + case 242 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: - case 280 /* ExportSpecifier */: - case 243 /* ExpressionStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: + case 281 /* ExportSpecifier */: + case 244 /* ExpressionStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: case 80 /* Identifier */: - case 244 /* IfStatement */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 255 /* LabeledStatement */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 201 /* NamedTupleMember */: - case 269 /* NamespaceExportDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 168 /* Parameter */: - case 216 /* ParenthesizedExpression */: - case 210 /* PropertyAccessExpression */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 252 /* ReturnStatement */: - case 239 /* SemicolonClassElement */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: - case 254 /* SwitchStatement */: - case 256 /* ThrowStatement */: - case 257 /* TryStatement */: - case 264 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: - case 259 /* VariableDeclaration */: - case 242 /* VariableStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: + case 245 /* IfStatement */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 256 /* LabeledStatement */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 202 /* NamedTupleMember */: + case 270 /* NamespaceExportDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 169 /* Parameter */: + case 217 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 253 /* ReturnStatement */: + case 240 /* SemicolonClassElement */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: + case 255 /* SwitchStatement */: + case 257 /* ThrowStatement */: + case 258 /* TryStatement */: + case 265 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 260 /* VariableDeclaration */: + case 243 /* VariableStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: return true; default: return false; @@ -13798,11 +13862,11 @@ function getJSDocCommentsAndTags(hostNode, noCache) { if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -13822,7 +13886,7 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent = node.parent; - if (parent.kind === 302 /* PropertyAssignment */ || parent.kind === 276 /* ExportAssignment */ || parent.kind === 171 /* PropertyDeclaration */ || parent.kind === 243 /* ExpressionStatement */ && node.kind === 210 /* PropertyAccessExpression */ || parent.kind === 252 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { + if (parent.kind === 303 /* PropertyAssignment */ || parent.kind === 277 /* ExportAssignment */ || parent.kind === 172 /* PropertyDeclaration */ || parent.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { return parent; } else if (parent.parent && (getSingleVariableOfVariableStatement(parent.parent) === node || isBinaryExpression(parent) && parent.operatorToken.kind === 64 /* EqualsToken */)) { return parent.parent; @@ -13889,32 +13953,32 @@ function getAssignmentTargetKind(node) { let parent = node.parent; while (true) { switch (parent.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const binaryOperator = parent.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent.left === node ? binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: const unaryOperator = parent.operator; return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return parent.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 216 /* ParenthesizedExpression */: - case 208 /* ArrayLiteralExpression */: - case 229 /* SpreadElement */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 209 /* ArrayLiteralExpression */: + case 230 /* SpreadElement */: + case 235 /* NonNullExpression */: node = parent; break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: node = parent.parent; break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: if (parent.name !== node) { return 0 /* None */; } node = parent.parent; break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (parent.name === node) { return 0 /* None */; } @@ -13931,22 +13995,22 @@ function isAssignmentTarget(node) { } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 240 /* Block */: - case 242 /* VariableStatement */: - case 253 /* WithStatement */: - case 244 /* IfStatement */: - case 254 /* SwitchStatement */: - case 268 /* CaseBlock */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 255 /* LabeledStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 257 /* TryStatement */: - case 298 /* CatchClause */: + case 241 /* Block */: + case 243 /* VariableStatement */: + case 254 /* WithStatement */: + case 245 /* IfStatement */: + case 255 /* SwitchStatement */: + case 269 /* CaseBlock */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 256 /* LabeledStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 258 /* TryStatement */: + case 299 /* CatchClause */: return true; } return false; @@ -13961,14 +14025,14 @@ function walkUp(node, kind) { return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 195 /* ParenthesizedType */); + return walkUp(node, 196 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 216 /* ParenthesizedExpression */); + return walkUp(node, 217 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 195 /* ParenthesizedType */) { + while (node && node.kind === 196 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -13984,11 +14048,11 @@ function skipParentheses(node, excludeJSDocTypeAssertions) { return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 210 /* PropertyAccessExpression */ && node.kind !== 211 /* ElementAccessExpression */) { + if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 219 /* DeleteExpression */; + return node && node.kind === 220 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -14002,49 +14066,49 @@ function isDeclarationName(name) { return !isSourceFile(name) && !isBindingPattern(name) && isDeclaration(name.parent) && name.parent.name === name; } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent = node.parent; switch (parent.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 305 /* EnumMember */: - case 302 /* PropertyAssignment */: - case 210 /* PropertyAccessExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 306 /* EnumMember */: + case 303 /* PropertyAssignment */: + case 211 /* PropertyAccessExpression */: return parent.name === node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return parent.right === node; - case 207 /* BindingElement */: - case 275 /* ImportSpecifier */: + case 208 /* BindingElement */: + case 276 /* ImportSpecifier */: return parent.propertyName === node; - case 280 /* ExportSpecifier */: - case 290 /* JsxAttribute */: - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: + case 281 /* ExportSpecifier */: + case 291 /* JsxAttribute */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: return true; } return false; } function getAliasDeclarationFromName(node) { switch (node.parent.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 273 /* NamespaceImport */: - case 280 /* ExportSpecifier */: - case 276 /* ExportAssignment */: - case 270 /* ImportEqualsDeclaration */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 274 /* NamespaceImport */: + case 281 /* ExportSpecifier */: + case 277 /* ExportAssignment */: + case 271 /* ImportEqualsDeclaration */: + case 280 /* NamespaceExport */: return node.parent; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 165 /* QualifiedName */); + } while (node.parent.kind === 166 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -14059,7 +14123,7 @@ function getExportAssignmentExpression(node) { return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 303 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 302 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 304 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 303 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -14107,7 +14171,7 @@ function getAncestor(node, kind) { return void 0; } function isKeyword(token) { - return 83 /* FirstKeyword */ <= token && token <= 164 /* LastKeyword */; + return 83 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; } function isPunctuation(token) { return 19 /* FirstPunctuation */ <= token && token <= 79 /* LastPunctuation */; @@ -14116,7 +14180,7 @@ function isKeywordOrPunctuation(token) { return isKeyword(token) || isPunctuation(token); } function isContextualKeyword(token) { - return 128 /* FirstContextualKeyword */ <= token && token <= 164 /* LastContextualKeyword */; + return 128 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); @@ -14135,13 +14199,13 @@ function getFunctionFlags(node) { } let flags = 0 /* Normal */; switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -14154,10 +14218,10 @@ function getFunctionFlags(node) { } function isAsyncFunction(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -14173,7 +14237,7 @@ function hasDynamicName(declaration) { return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 166 /* ComputedPropertyName */ || name.kind === 211 /* ElementAccessExpression */)) { + if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -14187,7 +14251,7 @@ function getPropertyNameForPropertyNameNode(name) { case 11 /* StringLiteral */: case 9 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -14198,7 +14262,7 @@ function getPropertyNameForPropertyNameNode(name) { return nameExpression.operand.text; } return void 0; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -14233,13 +14297,17 @@ function isProtoSetter(node) { function isAnonymousFunctionDefinition(node, cb) { node = skipOuterExpressions(node); switch (node.kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 231 /* ClassExpression */: + if (classHasDeclaredOrExplicitlyAssignedName(node)) { + return false; + } + break; + case 218 /* FunctionExpression */: if (node.name) { return false; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: break; default: return false; @@ -14248,19 +14316,19 @@ function isAnonymousFunctionDefinition(node, cb) { } function isNamedEvaluationSource(node) { switch (node.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return !isProtoSetter(node.name); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return !!node.objectAssignmentInitializer; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return isIdentifier(node.name) && !!node.initializer; - case 168 /* Parameter */: + case 169 /* Parameter */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return !!node.initializer; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 77 /* AmpersandAmpersandEqualsToken */: @@ -14269,7 +14337,7 @@ function isNamedEvaluationSource(node) { return isIdentifier(node.left); } break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return true; } return false; @@ -14278,18 +14346,18 @@ function isNamedEvaluation(node, cb) { if (!isNamedEvaluationSource(node)) return false; switch (node.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb); - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isAnonymousFunctionDefinition(node.right, cb); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return isAnonymousFunctionDefinition(node.expression, cb); } } @@ -14298,39 +14366,39 @@ function isPushOrUnshiftIdentifier(node) { } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 168 /* Parameter */; + return root.kind === 169 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 207 /* BindingElement */) { + while (node.kind === 208 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 217 /* FunctionExpression */ || kind === 261 /* FunctionDeclaration */ || kind === 218 /* ArrowFunction */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 266 /* ModuleDeclaration */ || kind === 311 /* SourceFile */; + return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 262 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 267 /* ModuleDeclaration */ || kind === 312 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); } function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 213 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 213 /* NewExpression */: + case 214 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 223 /* PrefixUnaryExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 222 /* AwaitExpression */: - case 226 /* ConditionalExpression */: - case 228 /* YieldExpression */: + case 224 /* PrefixUnaryExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 223 /* AwaitExpression */: + case 227 /* ConditionalExpression */: + case 229 /* YieldExpression */: return 1 /* Right */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (operator) { case 43 /* AsteriskAsteriskToken */: case 64 /* EqualsToken */: @@ -14356,13 +14424,13 @@ function getOperatorAssociativity(kind, operator, hasArguments) { } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 213 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 225 /* BinaryExpression */) { + if (expression.kind === 226 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 223 /* PrefixUnaryExpression */ || expression.kind === 224 /* PostfixUnaryExpression */) { + } else if (expression.kind === 224 /* PrefixUnaryExpression */ || expression.kind === 225 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -14370,15 +14438,15 @@ function getOperator(expression) { } function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return 0 /* Comma */; - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return 1 /* Spread */; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return 2 /* Yield */; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return 4 /* Conditional */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (operatorKind) { case 28 /* CommaToken */: return 0 /* Comma */; @@ -14402,27 +14470,27 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { default: return getBinaryOperatorPrecedence(operatorKind); } - case 215 /* TypeAssertionExpression */: - case 234 /* NonNullExpression */: - case 223 /* PrefixUnaryExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 222 /* AwaitExpression */: + case 216 /* TypeAssertionExpression */: + case 235 /* NonNullExpression */: + case 224 /* PrefixUnaryExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 223 /* AwaitExpression */: return 16 /* Unary */; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return 17 /* Update */; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return 18 /* LeftHandSide */; - case 213 /* NewExpression */: + case 214 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 214 /* TaggedTemplateExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 235 /* MetaProperty */: + case 215 /* TaggedTemplateExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 236 /* MetaProperty */: return 19 /* Member */; - case 233 /* AsExpression */: - case 237 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 238 /* SatisfiesExpression */: return 11 /* Relational */; case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: @@ -14434,19 +14502,19 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 230 /* ClassExpression */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 231 /* ClassExpression */: case 14 /* RegularExpressionLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: - case 216 /* ParenthesizedExpression */: - case 231 /* OmittedExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: + case 228 /* TemplateExpression */: + case 217 /* ParenthesizedExpression */: + case 232 /* OmittedExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -14499,7 +14567,7 @@ function getBinaryOperatorPrecedence(kind) { function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return !!i.expression; case 12 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -14576,9 +14644,9 @@ function escapeTemplateSubstitution(str) { function hasInvalidEscape(template) { return template && !!(isNoSubstitutionTemplateLiteral(template) ? template.templateFlags : template.head.templateFlags || some(template.templateSpans, (span) => !!span.literal.templateFlags)); } -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 = /\r\n|[\\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; +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 = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; var escapedCharsMap = new Map(Object.entries({ " ": "\\t", "\v": "\\v", @@ -14623,8 +14691,8 @@ function escapeNonAsciiString(s, quoteChar) { s = escapeString(s, quoteChar); return nonAsciiCharacters.test(s) ? s.replace(nonAsciiCharacters, (c) => encodeUtf16EscapeSequence(c.charCodeAt(0))) : s; } -var jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g; -var jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g; +var jsxDoubleQuoteEscapedCharsRegExp = /["\u0000-\u001f\u2028\u2029\u0085]/g; +var jsxSingleQuoteEscapedCharsRegExp = /['\u0000-\u001f\u2028\u2029\u0085]/g; var jsxEscapedCharsMap = new Map(Object.entries({ '"': """, "'": "'" @@ -14996,6 +15064,12 @@ function parameterIsThisKeyword(parameter) { function isThisIdentifier(node) { return !!node && node.kind === 80 /* Identifier */ && identifierIsThisKeyword(node); } +function isInTypeQuery(node) { + return !!findAncestor( + node, + (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit" + ); +} function isThisInTypeQuery(node) { if (!isThisIdentifier(node)) { return false; @@ -15003,7 +15077,7 @@ function isThisInTypeQuery(node) { while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */; + return node.parent.kind === 186 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.escapedText === "this"; @@ -15015,9 +15089,9 @@ function getAllAccessorDeclarations(declarations, accessor) { let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 176 /* GetAccessor */) { + if (accessor.kind === 177 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 177 /* SetAccessor */) { + } else if (accessor.kind === 178 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -15033,10 +15107,10 @@ function getAllAccessorDeclarations(declarations, accessor) { } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 176 /* GetAccessor */ && !getAccessor) { + if (member.kind === 177 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 177 /* SetAccessor */ && !setAccessor) { + if (member.kind === 178 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -15065,7 +15139,7 @@ function getJSDocTypeParameterDeclarations(node) { return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 326 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 327 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -15255,7 +15329,7 @@ function getSelectedSyntacticModifierFlags(node, flags) { return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 164 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -15305,7 +15379,7 @@ function getEffectiveModifierFlagsNoCache(node) { } function getSyntacticModifierFlagsNoCache(node) { let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */; - if (node.flags & 4 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { flags |= 1 /* Export */; } return flags; @@ -15345,13 +15419,13 @@ function modifierToFlag(token) { return 512 /* Async */; case 148 /* ReadonlyKeyword */: return 64 /* Readonly */; - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return 16384 /* Override */; case 103 /* InKeyword */: return 32768 /* In */; case 147 /* OutKeyword */: return 65536 /* Out */; - case 169 /* Decorator */: + case 170 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -15405,7 +15479,7 @@ function isDestructuringAssignment(node) { true )) { const kind = node.left.kind; - return kind === 209 /* ObjectLiteralExpression */ || kind === 208 /* ArrayLiteralExpression */; + return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; } return false; } @@ -15419,12 +15493,12 @@ function getFirstIdentifier(node) { switch (node.kind) { case 80 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 80 /* Identifier */); return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 80 /* Identifier */); @@ -15432,7 +15506,7 @@ function getFirstIdentifier(node) { } } function isDottedName(node) { - return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 235 /* MetaProperty */ || node.kind === 210 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 216 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 236 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -15459,16 +15533,16 @@ function isPrototypeAccess(node) { return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node; } function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } function isEmptyObjectLiteral(expression) { - return expression.kind === 209 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 208 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -15673,8 +15747,8 @@ function isDeclarationNameOfEnumOrNamespace(node) { const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 265 /* EnumDeclaration */: - case 266 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -15724,24 +15798,24 @@ function isWriteAccess(node) { function accessKind(node) { const { parent } = node; switch (parent == null ? void 0 : parent.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return accessKind(parent); - case 224 /* PostfixUnaryExpression */: - case 223 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const { operator } = parent; return operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const { left, operatorToken } = parent; return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 64 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return parent.name !== node ? 0 /* Read */ : accessKind(parent); - case 302 /* PropertyAssignment */: { + case 303 /* PropertyAssignment */: { const parentAccess = accessKind(parent.parent); return node === parent.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return node === parent.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent.parent); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return accessKind(parent); default: return 0 /* Read */; @@ -15831,10 +15905,10 @@ function getLastChild(node) { return lastChild; } function isTypeNodeKind(kind) { - return kind >= 181 /* FirstTypeNode */ && kind <= 204 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 232 /* ExpressionWithTypeArguments */ || kind === 318 /* JSDocAllType */ || kind === 319 /* JSDocUnknownType */ || kind === 320 /* JSDocNullableType */ || kind === 321 /* JSDocNonNullableType */ || kind === 322 /* JSDocOptionalType */ || kind === 323 /* JSDocFunctionType */ || kind === 324 /* JSDocVariadicType */; + return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 163 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 233 /* ExpressionWithTypeArguments */ || kind === 319 /* JSDocAllType */ || kind === 320 /* JSDocUnknownType */ || kind === 321 /* JSDocNullableType */ || kind === 322 /* JSDocNonNullableType */ || kind === 323 /* JSDocOptionalType */ || kind === 324 /* JSDocFunctionType */ || kind === 325 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 210 /* PropertyAccessExpression */ || node.kind === 211 /* ElementAccessExpression */; + return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; } function isBundleFileTextLike(section) { switch (section.kind) { @@ -15854,28 +15928,28 @@ function getLeftmostAccessExpression(expr) { function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: node = node.operand; continue; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: node = node.left; continue; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: node = node.condition; continue; - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: node = node.tag; continue; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 233 /* AsExpression */: - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: - case 234 /* NonNullExpression */: - case 359 /* PartiallyEmittedExpression */: - case 237 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 235 /* NonNullExpression */: + case 360 /* PartiallyEmittedExpression */: + case 238 /* SatisfiesExpression */: node = node.expression; continue; } @@ -16313,6 +16387,9 @@ function getAllowJSCompilerOption(compilerOptions) { function getUseDefineForClassFields(compilerOptions) { return compilerOptions.useDefineForClassFields === void 0 ? getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ : compilerOptions.useDefineForClassFields; } +function getEmitStandardClassFields(compilerOptions) { + return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */; +} function compilerOptionsAffectSemanticDiagnostics(newOptions, oldOptions) { return optionsHaveChanges(oldOptions, newOptions, semanticDiagnosticsOptionDeclarations); } @@ -16410,7 +16487,7 @@ function guessDirectorySymlink(a, b, cwd, getCanonicalFileName) { function isNodeModulesOrScopedPackageDirectory(s, getCanonicalFileName) { return s !== void 0 && (getCanonicalFileName(s) === "node_modules" || startsWith(s, "@")); } -var reservedCharacterPattern = /[^\w\s\/]/g; +var reservedCharacterPattern = /[^\w\s/]/g; var wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; var commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; var implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`; @@ -16523,7 +16600,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm function replaceWildcardCharacter(match, singleAsteriskRegexFragment) { return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match; } -function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { +function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) { path = normalizePath(path); currentDirectory = normalizePath(currentDirectory); const absolutePath = combinePaths(currentDirectory, path); @@ -16532,22 +16609,22 @@ function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNa includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"), excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"), - basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames) + basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2) }; } -function getRegexFromPattern(pattern, useCaseSensitiveFileNames) { - return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i"); +function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) { + return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i"); } -function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) { +function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) { path = normalizePath(path); currentDirectory = normalizePath(currentDirectory); - const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory); - const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames)); - const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames); - const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames); + const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory); + const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2)); + const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2); + const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2); const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]]; const visited = /* @__PURE__ */ new Map(); - const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames); + const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2); for (const basePath of patterns.basePaths) { visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); } @@ -16589,7 +16666,7 @@ function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNa } } } -function getBasePaths(path, includes, useCaseSensitiveFileNames) { +function getBasePaths(path, includes, useCaseSensitiveFileNames2) { const basePaths = [path]; if (includes) { const includeBasePaths = []; @@ -16597,9 +16674,9 @@ function getBasePaths(path, includes, useCaseSensitiveFileNames) { const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include)); includeBasePaths.push(getIncludeBasePath(absolute)); } - includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames)); + includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2)); for (const includeBasePath of includeBasePaths) { - if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames))) { + if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) { basePaths.push(includeBasePath); } } @@ -16961,39 +17038,39 @@ function isValidBigIntString(s, roundTripOnly) { return success && result === 10 /* BigIntLiteral */ && scanner.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner.getTokenValue()) })); } function isValidTypeOnlyAliasUseSite(useSite) { - return !!(useSite.flags & 16777216 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); + return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); } function isShorthandPropertyNameUseSite(useSite) { return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 80 /* Identifier */ || node.kind === 210 /* PropertyAccessExpression */) { + while (node.kind === 80 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 263 /* InterfaceDeclaration */ || containerKind === 186 /* TypeLiteral */; + return containerKind === 264 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 80 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent) => { switch (parent.kind) { - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return true; - case 210 /* PropertyAccessExpression */: - case 232 /* ExpressionWithTypeArguments */: + case 211 /* PropertyAccessExpression */: + case 233 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 263 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 264 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -17105,20 +17182,20 @@ function getContainingNodeArray(node) { if (!node.parent) return void 0; switch (node.kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: const { parent: parent2 } = node; - return parent2.kind === 194 /* InferType */ ? void 0 : parent2.typeParameters; - case 168 /* Parameter */: + return parent2.kind === 195 /* InferType */ ? void 0 : parent2.typeParameters; + case 169 /* Parameter */: return node.parent.parameters; - case 203 /* TemplateLiteralTypeSpan */: + case 204 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return node.parent.templateSpans; - case 169 /* Decorator */: { + case 170 /* Decorator */: { const { parent: parent3 } = node; return canHaveDecorators(parent3) ? parent3.modifiers : void 0; } - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return node.parent.heritageClauses; } const { parent } = node; @@ -17126,43 +17203,43 @@ function getContainingNodeArray(node) { return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent.kind) { - case 186 /* TypeLiteral */: - case 263 /* InterfaceDeclaration */: + case 187 /* TypeLiteral */: + case 264 /* InterfaceDeclaration */: return isTypeElement(node) ? parent.members : void 0; - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return parent.types; - case 188 /* TupleType */: - case 208 /* ArrayLiteralExpression */: - case 360 /* CommaListExpression */: - case 274 /* NamedImports */: - case 278 /* NamedExports */: + case 189 /* TupleType */: + case 209 /* ArrayLiteralExpression */: + case 361 /* CommaListExpression */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: return parent.elements; - case 209 /* ObjectLiteralExpression */: - case 291 /* JsxAttributes */: + case 210 /* ObjectLiteralExpression */: + case 292 /* JsxAttributes */: return parent.properties; - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: return isTypeNode(node) ? parent.typeArguments : parent.expression === node ? void 0 : parent.arguments; - case 283 /* JsxElement */: - case 287 /* JsxFragment */: + case 284 /* JsxElement */: + case 288 /* JsxFragment */: return isJsxChild(node) ? parent.children : void 0; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent.typeArguments : void 0; - case 240 /* Block */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 268 /* ModuleBlock */: return parent.statements; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return parent.clauses; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return isClassElement(node) ? parent.members : void 0; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return isEnumMember(node) ? parent.members : void 0; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return parent.statements; } } @@ -17171,7 +17248,7 @@ function hasContextSensitiveParameters(node) { if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 218 /* ArrowFunction */) { + if (node.kind !== 219 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -17184,14 +17261,14 @@ function isInfinityOrNaNString(name) { return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 259 /* VariableDeclaration */ && node.parent.kind === 298 /* CatchClause */; + return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 217 /* FunctionExpression */ || node.kind === 218 /* ArrowFunction */; + return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */; } function isNumericLiteralName(name) { return (+name).toString() === name; @@ -17251,19 +17328,19 @@ function getNodeModulePathParts(fullPath) { } function isTypeDeclaration(node) { switch (node.kind) { - case 167 /* TypeParameter */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 168 /* TypeParameter */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return true; - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.isTypeOnly; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -17277,7 +17354,7 @@ function isOptionalJSDocPropertyLikeTag(node) { return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 322 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 323 /* JSDocOptionalType */; } function canUsePropertyAccess(name, languageVersion) { if (name.length === 0) { @@ -17288,17 +17365,17 @@ function canUsePropertyAccess(name, languageVersion) { } function isJSDocOptionalParameter(node) { return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType - (node.type && node.type.kind === 322 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 322 /* JSDocOptionalType */)); + (node.type && node.type.kind === 323 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 323 /* JSDocOptionalType */)); } function isOptionalDeclaration(declaration) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !!declaration.questionToken; - case 168 /* Parameter */: + case 169 /* Parameter */: return !!declaration.questionToken || isJSDocOptionalParameter(declaration); - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: return isOptionalJSDocPropertyLikeTag(declaration); default: return false; @@ -17306,7 +17383,7 @@ function isOptionalDeclaration(declaration) { } function isNonNullAccess(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && isNonNullExpression(node.expression); + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && isNonNullExpression(node.expression); } function isJSDocSatisfiesExpression(node) { return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); @@ -17326,7 +17403,7 @@ function getTextOfJsxAttributeName(node) { } function isJsxAttributeName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 294 /* JsxNamespacedName */; + return kind === 80 /* Identifier */ || kind === 295 /* JsxNamespacedName */; } function getEscapedTextOfJsxNamespacedName(node) { return `${node.namespace.escapedText}:${idText(node.name)}`; @@ -17337,6 +17414,18 @@ function getTextOfJsxNamespacedName(node) { function intrinsicTagNameToString(node) { return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node); } +function isTypeUsableAsPropertyName(type) { + return !!(type.flags & 8576 /* StringOrNumberLiteralOrUnique */); +} +function getPropertyNameFromType(type) { + if (type.flags & 8192 /* UniqueESSymbol */) { + return type.escapedName; + } + if (type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { + return escapeLeadingUnderscores("" + type.value); + } + return Debug.fail(); +} // src/compiler/factory/baseNodeFactory.ts function createBaseNodeFactory() { @@ -17459,16 +17548,16 @@ function createParenthesizerRules(factory2) { return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(225 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(225 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(226 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 218 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 228 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 229 /* YieldExpression */) { return false; } return true; @@ -17502,7 +17591,7 @@ function createParenthesizerRules(factory2) { if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { + if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -17515,7 +17604,7 @@ function createParenthesizerRules(factory2) { } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 216 /* ParenthesizedExpression */) { + if (skipped.kind === 217 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -17541,7 +17630,7 @@ function createParenthesizerRules(factory2) { return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(226 /* ConditionalExpression */, 58 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(227 /* ConditionalExpression */, 58 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -17562,8 +17651,8 @@ function createParenthesizerRules(factory2) { /*stopAtCallExpressions*/ false ).kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: needsParens = true; } } @@ -17576,16 +17665,16 @@ function createParenthesizerRules(factory2) { true ); switch (leftmostExpr.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 213 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -17603,7 +17692,7 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(225 /* BinaryExpression */, 28 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, 28 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -17611,7 +17700,7 @@ function createParenthesizerRules(factory2) { if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 217 /* FunctionExpression */ || kind === 218 /* ArrowFunction */) { + if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -17626,7 +17715,7 @@ function createParenthesizerRules(factory2) { /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 209 /* ObjectLiteralExpression */ || leftmostExpressionKind === 217 /* FunctionExpression */) { + if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -17636,31 +17725,31 @@ function createParenthesizerRules(factory2) { body, /*stopAtCallExpressions*/ false - ).kind === 209 /* ObjectLiteralExpression */)) { + ).kind === 210 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 193 /* ConditionalType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 194 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -17670,8 +17759,8 @@ function createParenthesizerRules(factory2) { } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -17681,23 +17770,23 @@ function createParenthesizerRules(factory2) { } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 194 /* InferType */: - case 197 /* TypeOperator */: - case 185 /* TypeQuery */: + case 195 /* InferType */: + case 198 /* TypeOperator */: + case 186 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -17782,6 +17871,7 @@ function createNodeConverters(factory2) { return { convertToFunctionBlock, convertToFunctionExpression, + convertToClassExpression, convertToArrayAssignmentElement, convertToObjectAssignmentElement, convertToAssignmentPattern, @@ -17799,10 +17889,11 @@ function createNodeConverters(factory2) { return body; } function convertToFunctionExpression(node) { + var _a; if (!node.body) return Debug.fail(`Cannot convert a FunctionDeclaration without a body`); const updated = factory2.createFunctionExpression( - getModifiers(node), + (_a = getModifiers(node)) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), node.asteriskToken, node.name, node.typeParameters, @@ -17821,6 +17912,26 @@ function createNodeConverters(factory2) { } return updated; } + function convertToClassExpression(node) { + var _a; + const updated = factory2.createClassExpression( + (_a = node.modifiers) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), + node.name, + node.typeParameters, + node.heritageClauses, + node.members + ); + setOriginalNode(updated, node); + setTextRange(updated, node); + if (getStartsOnNewLine(node)) { + setStartsOnNewLine( + updated, + /*newLine*/ + true + ); + } + return updated; + } function convertToArrayAssignmentElement(element) { if (isBindingElement(element)) { if (element.dotDotDotToken) { @@ -17855,11 +17966,11 @@ function createNodeConverters(factory2) { } function convertToAssignmentPattern(node) { switch (node.kind) { - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 205 /* ObjectBindingPattern */: - case 209 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 210 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -17897,6 +18008,7 @@ function createNodeConverters(factory2) { var nullNodeConverters = { convertToFunctionBlock: notImplemented, convertToFunctionExpression: notImplemented, + convertToClassExpression: notImplemented, convertToArrayAssignmentElement: notImplemented, convertToObjectAssignmentElement: notImplemented, convertToAssignmentPattern: notImplemented, @@ -18206,40 +18318,40 @@ function createNodeFactory(flags, baseFactory2) { updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(318 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(319 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(319 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(320 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(322 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(322 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(320 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(320 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(322 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(323 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(322 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(323 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(324 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(325 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(324 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(325 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(326 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(326 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -18279,82 +18391,82 @@ function createNodeFactory(flags, baseFactory2) { updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(348 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(349 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(349 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(350 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(339 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(339 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(340 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(340 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(341 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(341 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(342 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(342 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(343 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(343 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(344 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(344 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(355 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(356 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(355 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(356 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(357 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(357 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -18529,6 +18641,7 @@ function createNodeFactory(flags, baseFactory2) { createExportDefault, createExternalModuleExport, createTypeCheck, + createIsNotTypeCheck, createMethodCall, createGlobalMethodCall, createFunctionBindCall, @@ -18560,7 +18673,8 @@ function createNodeFactory(flags, baseFactory2) { ensureUseStrict, liftToBlock, mergeLexicalEnvironment, - updateModifiers + updateModifiers, + updateModifierLike }; forEach(nodeFactoryPatchers, (fn) => fn(factory2)); return factory2; @@ -18718,11 +18832,11 @@ function createNodeFactory(flags, baseFactory2) { } const node = createBaseIdentifier(escapeLeadingUnderscores(text)); if (hasExtendedUnicodeEscape) - node.flags |= 128 /* IdentifierHasExtendedUnicodeEscape */; + node.flags |= 256 /* IdentifierHasExtendedUnicodeEscape */; if (node.escapedText === "await") { node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */; } - if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) { + if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { node.transformFlags |= 1024 /* ContainsES2015 */; } return node; @@ -18817,7 +18931,7 @@ function createNodeFactory(flags, baseFactory2) { return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 164 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* LastToken */, "Invalid token"); Debug.assert(token <= 15 /* FirstTemplateToken */ || token >= 18 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 9 /* FirstLiteralToken */ || token >= 15 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 80 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); @@ -18827,6 +18941,9 @@ function createNodeFactory(flags, baseFactory2) { case 134 /* AsyncKeyword */: transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; break; + case 160 /* UsingKeyword */: + transformFlags = 4 /* ContainsESNext */; + break; case 125 /* PublicKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: @@ -18836,12 +18953,12 @@ function createNodeFactory(flags, baseFactory2) { case 87 /* ConstKeyword */: case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 146 /* NeverKeyword */: case 151 /* ObjectKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 154 /* StringKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: @@ -18909,7 +19026,7 @@ function createNodeFactory(flags, baseFactory2) { if (flags2 & 32 /* Static */) result.push(createModifier(126 /* StaticKeyword */)); if (flags2 & 16384 /* Override */) - result.push(createModifier(163 /* OverrideKeyword */)); + result.push(createModifier(164 /* OverrideKeyword */)); if (flags2 & 64 /* Readonly */) result.push(createModifier(148 /* ReadonlyKeyword */)); if (flags2 & 128 /* Accessor */) @@ -18923,7 +19040,7 @@ function createNodeFactory(flags, baseFactory2) { return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(165 /* QualifiedName */); + const node = createBaseNode(166 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -18934,7 +19051,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(166 /* ComputedPropertyName */); + const node = createBaseNode(167 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -18943,7 +19060,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(167 /* TypeParameter */); + const node = createBaseDeclaration(168 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -18957,7 +19074,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.default !== defaultType ? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node) : node; } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { - const node = createBaseDeclaration(168 /* Parameter */); + const node = createBaseDeclaration(169 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -18976,7 +19093,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(169 /* Decorator */); + const node = createBaseNode(170 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -18989,7 +19106,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(170 /* PropertySignature */); + const node = createBaseDeclaration(171 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -19009,14 +19126,14 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(171 /* PropertyDeclaration */); + const node = createBaseDeclaration(172 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.type = type; node.initializer = asInitializer(initializer); - const isAmbient = node.flags & 16777216 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; + const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; node.jsDoc = void 0; return node; @@ -19025,7 +19142,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(172 /* MethodSignature */); + const node = createBaseDeclaration(173 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -19043,7 +19160,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(173 /* MethodDeclaration */); + const node = createBaseDeclaration(174 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -19080,7 +19197,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(174 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(175 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -19101,7 +19218,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(175 /* Constructor */); + const node = createBaseDeclaration(176 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; @@ -19127,7 +19244,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(176 /* GetAccessor */); + const node = createBaseDeclaration(177 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -19158,7 +19275,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(177 /* SetAccessor */); + const node = createBaseDeclaration(178 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -19190,7 +19307,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(178 /* CallSignature */); + const node = createBaseDeclaration(179 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -19205,7 +19322,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(179 /* ConstructSignature */); + const node = createBaseDeclaration(180 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -19220,7 +19337,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(180 /* IndexSignature */); + const node = createBaseDeclaration(181 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -19235,7 +19352,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(203 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -19248,7 +19365,7 @@ function createNodeFactory(flags, baseFactory2) { return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(181 /* TypePredicate */); + const node = createBaseNode(182 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -19259,7 +19376,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(182 /* TypeReference */); + const node = createBaseNode(183 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -19269,7 +19386,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(183 /* FunctionType */); + const node = createBaseDeclaration(184 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -19294,7 +19411,7 @@ function createNodeFactory(flags, baseFactory2) { return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(184 /* ConstructorType */); + const node = createBaseDeclaration(185 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -19325,7 +19442,7 @@ function createNodeFactory(flags, baseFactory2) { return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(185 /* TypeQuery */); + const node = createBaseNode(186 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -19335,7 +19452,7 @@ function createNodeFactory(flags, baseFactory2) { return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(186 /* TypeLiteral */); + const node = createBaseDeclaration(187 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19344,7 +19461,7 @@ function createNodeFactory(flags, baseFactory2) { return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(187 /* ArrayType */); + const node = createBaseNode(188 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19353,7 +19470,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(188 /* TupleType */); + const node = createBaseNode(189 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19362,7 +19479,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(201 /* NamedTupleMember */); + const node = createBaseDeclaration(202 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -19375,7 +19492,7 @@ function createNodeFactory(flags, baseFactory2) { return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(189 /* OptionalType */); + const node = createBaseNode(190 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19384,7 +19501,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(190 /* RestType */); + const node = createBaseNode(191 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19402,19 +19519,19 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(191 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(192 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(193 /* ConditionalType */); + const node = createBaseNode(194 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -19428,7 +19545,7 @@ function createNodeFactory(flags, baseFactory2) { return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(194 /* InferType */); + const node = createBaseNode(195 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19437,7 +19554,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(202 /* TemplateLiteralType */); + const node = createBaseNode(203 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -19447,7 +19564,7 @@ function createNodeFactory(flags, baseFactory2) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(204 /* ImportType */); + const node = createBaseNode(205 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -19460,7 +19577,7 @@ function createNodeFactory(flags, baseFactory2) { return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(195 /* ParenthesizedType */); + const node = createBaseNode(196 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19469,12 +19586,12 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(196 /* ThisType */); + const node = createBaseNode(197 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(197 /* TypeOperator */); + const node = createBaseNode(198 /* TypeOperator */); node.operator = operator; node.type = operator === 148 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -19484,7 +19601,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(198 /* IndexedAccessType */); + const node = createBaseNode(199 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -19494,7 +19611,7 @@ function createNodeFactory(flags, baseFactory2) { return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(199 /* MappedType */); + const node = createBaseDeclaration(200 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -19510,7 +19627,7 @@ function createNodeFactory(flags, baseFactory2) { return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(200 /* LiteralType */); + const node = createBaseNode(201 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -19519,7 +19636,7 @@ function createNodeFactory(flags, baseFactory2) { return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(205 /* ObjectBindingPattern */); + const node = createBaseNode(206 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -19531,7 +19648,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(206 /* ArrayBindingPattern */); + const node = createBaseNode(207 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -19540,7 +19657,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(207 /* BindingElement */); + const node = createBaseDeclaration(208 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -19553,7 +19670,7 @@ function createNodeFactory(flags, baseFactory2) { return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(208 /* ArrayLiteralExpression */); + const node = createBaseNode(209 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -19565,7 +19682,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(209 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(210 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -19576,7 +19693,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(210 /* PropertyAccessExpression */); + const node = createBaseDeclaration(211 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -19617,16 +19734,16 @@ function createNodeFactory(flags, baseFactory2) { questionDotToken, asName(name) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updatePropertyAccessChain(node, expression, questionDotToken, name) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(211 /* ElementAccessExpression */); + const node = createBaseDeclaration(212 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -19667,16 +19784,16 @@ function createNodeFactory(flags, baseFactory2) { questionDotToken, asExpression(index) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(212 /* CallExpression */); + const node = createBaseDeclaration(213 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -19724,16 +19841,16 @@ function createNodeFactory(flags, baseFactory2) { asNodeArray(typeArguments), parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updateCallChain(node, expression, questionDotToken, typeArguments, argumentsArray) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(213 /* NewExpression */); + const node = createBaseDeclaration(214 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -19747,7 +19864,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(214 /* TaggedTemplateExpression */); + const node = createBaseNode(215 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -19768,7 +19885,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(215 /* TypeAssertionExpression */); + const node = createBaseNode(216 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -19778,7 +19895,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(216 /* ParenthesizedExpression */); + const node = createBaseNode(217 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -19788,7 +19905,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(217 /* FunctionExpression */); + const node = createBaseDeclaration(218 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -19813,7 +19930,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(218 /* ArrowFunction */); + const node = createBaseDeclaration(219 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -19835,7 +19952,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(219 /* DeleteExpression */); + const node = createBaseNode(220 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -19844,7 +19961,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(220 /* TypeOfExpression */); + const node = createBaseNode(221 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -19853,7 +19970,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(221 /* VoidExpression */); + const node = createBaseNode(222 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -19862,7 +19979,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(222 /* AwaitExpression */); + const node = createBaseNode(223 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -19871,7 +19988,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(223 /* PrefixUnaryExpression */); + const node = createBaseNode(224 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -19884,7 +20001,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(224 /* PostfixUnaryExpression */); + const node = createBaseNode(225 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -19897,7 +20014,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(225 /* BinaryExpression */); + const node = createBaseDeclaration(226 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -19930,7 +20047,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(226 /* ConditionalExpression */); + const node = createBaseNode(227 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken ?? createToken(58 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -19943,7 +20060,7 @@ function createNodeFactory(flags, baseFactory2) { return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(227 /* TemplateExpression */); + const node = createBaseNode(228 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -20018,7 +20135,7 @@ function createNodeFactory(flags, baseFactory2) { } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(228 /* YieldExpression */); + const node = createBaseNode(229 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -20028,7 +20145,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(229 /* SpreadElement */); + const node = createBaseNode(230 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -20037,7 +20154,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(230 /* ClassExpression */); + const node = createBaseDeclaration(231 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -20051,10 +20168,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(231 /* OmittedExpression */); + return createBaseNode(232 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(232 /* ExpressionWithTypeArguments */); + const node = createBaseNode(233 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -20068,7 +20185,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(233 /* AsExpression */); + const node = createBaseNode(234 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -20078,7 +20195,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(234 /* NonNullExpression */); + const node = createBaseNode(235 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -20094,7 +20211,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(237 /* SatisfiesExpression */); + const node = createBaseNode(238 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -20104,8 +20221,8 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(234 /* NonNullExpression */); - node.flags |= 32 /* OptionalChain */; + const node = createBaseNode(235 /* NonNullExpression */); + node.flags |= 64 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -20115,11 +20232,11 @@ function createNodeFactory(flags, baseFactory2) { return node; } function updateNonNullChain(node, expression) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(235 /* MetaProperty */); + const node = createBaseNode(236 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -20140,7 +20257,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(238 /* TemplateSpan */); + const node = createBaseNode(239 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -20150,12 +20267,12 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(239 /* SemicolonClassElement */); + const node = createBaseNode(240 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(240 /* Block */); + const node = createBaseNode(241 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -20168,7 +20285,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(242 /* VariableStatement */); + const node = createBaseNode(243 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -20183,12 +20300,12 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(241 /* EmptyStatement */); + const node = createBaseNode(242 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(243 /* ExpressionStatement */); + const node = createBaseNode(244 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -20199,7 +20316,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(244 /* IfStatement */); + const node = createBaseNode(245 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -20212,7 +20329,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(245 /* DoStatement */); + const node = createBaseNode(246 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -20224,7 +20341,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(246 /* WhileStatement */); + const node = createBaseNode(247 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -20236,7 +20353,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(247 /* ForStatement */); + const node = createBaseNode(248 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -20252,7 +20369,7 @@ function createNodeFactory(flags, baseFactory2) { return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(248 /* ForInStatement */); + const node = createBaseNode(249 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -20267,7 +20384,7 @@ function createNodeFactory(flags, baseFactory2) { return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(249 /* ForOfStatement */); + const node = createBaseNode(250 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -20285,7 +20402,7 @@ function createNodeFactory(flags, baseFactory2) { return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(250 /* ContinueStatement */); + const node = createBaseNode(251 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -20296,7 +20413,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(251 /* BreakStatement */); + const node = createBaseNode(252 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -20307,7 +20424,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(252 /* ReturnStatement */); + const node = createBaseNode(253 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -20318,7 +20435,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(253 /* WithStatement */); + const node = createBaseNode(254 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -20330,7 +20447,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(254 /* SwitchStatement */); + const node = createBaseNode(255 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -20343,7 +20460,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(255 /* LabeledStatement */); + const node = createBaseNode(256 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -20355,7 +20472,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(256 /* ThrowStatement */); + const node = createBaseNode(257 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -20366,7 +20483,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(257 /* TryStatement */); + const node = createBaseNode(258 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -20379,13 +20496,13 @@ function createNodeFactory(flags, baseFactory2) { return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(258 /* DebuggerStatement */); + const node = createBaseNode(259 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { - const node = createBaseDeclaration(259 /* VariableDeclaration */); + const node = createBaseDeclaration(260 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -20398,20 +20515,23 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(260 /* VariableDeclarationList */); - node.flags |= flags2 & 3 /* BlockScoped */; + const node = createBaseNode(261 /* VariableDeclarationList */); + node.flags |= flags2 & 7 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - if (flags2 & 3 /* BlockScoped */) { + if (flags2 & 7 /* BlockScoped */) { node.transformFlags |= 1024 /* ContainsES2015 */ | 262144 /* ContainsBlockScopedBinding */; } + if (flags2 & 4 /* Using */) { + node.transformFlags |= 4 /* ContainsESNext */; + } return node; } function updateVariableDeclarationList(node, declarations) { return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(261 /* FunctionDeclaration */); + const node = createBaseDeclaration(262 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -20447,7 +20567,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(262 /* ClassDeclaration */); + const node = createBaseDeclaration(263 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -20468,7 +20588,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(263 /* InterfaceDeclaration */); + const node = createBaseDeclaration(264 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -20482,7 +20602,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(264 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(265 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -20497,7 +20617,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(265 /* EnumDeclaration */); + const node = createBaseDeclaration(266 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -20510,9 +20630,9 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(266 /* ModuleDeclaration */); + const node = createBaseDeclaration(267 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); - node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); + node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); node.name = name; node.body = body; if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { @@ -20530,7 +20650,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(267 /* ModuleBlock */); + const node = createBaseNode(268 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -20540,7 +20660,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(268 /* CaseBlock */); + const node = createBaseNode(269 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -20551,7 +20671,7 @@ function createNodeFactory(flags, baseFactory2) { return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(269 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(270 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -20568,7 +20688,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(270 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(271 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -20585,7 +20705,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(271 /* ImportDeclaration */); + const node = createBaseNode(272 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -20599,7 +20719,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(272 /* ImportClause */); + const node = createBaseDeclaration(273 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -20614,7 +20734,7 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(299 /* AssertClause */); + const node = createBaseNode(300 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -20624,7 +20744,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(300 /* AssertEntry */); + const node = createBaseNode(301 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -20634,7 +20754,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(301 /* ImportTypeAssertionContainer */); + const node = createBaseNode(302 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -20643,7 +20763,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(273 /* NamespaceImport */); + const node = createBaseDeclaration(274 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -20653,7 +20773,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(279 /* NamespaceExport */); + const node = createBaseDeclaration(280 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 32 /* ContainsES2020 */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -20663,7 +20783,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(274 /* NamedImports */); + const node = createBaseNode(275 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -20673,7 +20793,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(275 /* ImportSpecifier */); + const node = createBaseDeclaration(276 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -20685,7 +20805,7 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(276 /* ExportAssignment */); + const node = createBaseDeclaration(277 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -20703,7 +20823,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(277 /* ExportDeclaration */); + const node = createBaseDeclaration(278 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -20726,7 +20846,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(278 /* NamedExports */); + const node = createBaseNode(279 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -20736,7 +20856,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(280 /* ExportSpecifier */); + const node = createBaseNode(281 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -20749,12 +20869,12 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(281 /* MissingDeclaration */); + const node = createBaseDeclaration(282 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(282 /* ExternalModuleReference */); + const node = createBaseNode(283 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -20786,7 +20906,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(323 /* JSDocFunctionType */); + const node = createBaseDeclaration(324 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -20800,7 +20920,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(328 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(329 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -20809,7 +20929,7 @@ function createNodeFactory(flags, baseFactory2) { return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(315 /* JSDocTypeExpression */); + const node = createBaseNode(316 /* JSDocTypeExpression */); node.type = type; return node; } @@ -20817,7 +20937,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(329 /* JSDocSignature */); + const node = createBaseDeclaration(330 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -20846,7 +20966,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(351 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); + const node = createBaseJSDocTag(352 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -20855,7 +20975,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(352 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(353 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -20867,7 +20987,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(347 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(348 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -20878,7 +20998,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(354 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(355 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -20889,7 +21009,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(344 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(345 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -20901,7 +21021,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(345 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); + const node = createBaseJSDocTag(346 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -20909,7 +21029,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(334 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); + const node = createBaseJSDocTag(335 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); node.class = className; return node; } @@ -20917,12 +21037,12 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(335 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); + const node = createBaseJSDocTag(336 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(353 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); + const node = createBaseJSDocTag(354 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); node.name = name; return node; } @@ -20930,7 +21050,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(316 /* JSDocNameReference */); + const node = createBaseNode(317 /* JSDocNameReference */); node.name = name; return node; } @@ -20938,7 +21058,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(317 /* JSDocMemberName */); + const node = createBaseNode(318 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -20948,7 +21068,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(330 /* JSDocLink */); + const node = createBaseNode(331 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -20957,7 +21077,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(331 /* JSDocLinkCode */); + const node = createBaseNode(332 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -20966,7 +21086,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(332 /* JSDocLinkPlain */); + const node = createBaseNode(333 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -20993,14 +21113,14 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(333 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(334 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(346 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(346 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(347 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(347 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -21010,7 +21130,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(327 /* JSDocText */); + const node = createBaseNode(328 /* JSDocText */); node.text = text; return node; } @@ -21018,7 +21138,7 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(326 /* JSDoc */); + const node = createBaseNode(327 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -21027,7 +21147,7 @@ function createNodeFactory(flags, baseFactory2) { return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(283 /* JsxElement */); + const node = createBaseNode(284 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -21038,7 +21158,7 @@ function createNodeFactory(flags, baseFactory2) { return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(284 /* JsxSelfClosingElement */); + const node = createBaseNode(285 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -21052,7 +21172,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(285 /* JsxOpeningElement */); + const node = createBaseNode(286 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -21066,7 +21186,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(286 /* JsxClosingElement */); + const node = createBaseNode(287 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -21075,7 +21195,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(287 /* JsxFragment */); + const node = createBaseNode(288 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -21096,17 +21216,17 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(288 /* JsxOpeningFragment */); + const node = createBaseNode(289 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(289 /* JsxClosingFragment */); + const node = createBaseNode(290 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(290 /* JsxAttribute */); + const node = createBaseDeclaration(291 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -21116,7 +21236,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(291 /* JsxAttributes */); + const node = createBaseDeclaration(292 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -21125,7 +21245,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(292 /* JsxSpreadAttribute */); + const node = createBaseNode(293 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -21134,7 +21254,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(293 /* JsxExpression */); + const node = createBaseNode(294 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -21144,7 +21264,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createJsxNamespacedName(namespace, name) { - const node = createBaseNode(294 /* JsxNamespacedName */); + const node = createBaseNode(295 /* JsxNamespacedName */); node.namespace = namespace; node.name = name; node.transformFlags |= propagateChildFlags(node.namespace) | propagateChildFlags(node.name) | 2 /* ContainsJsx */; @@ -21154,7 +21274,7 @@ function createNodeFactory(flags, baseFactory2) { return node.namespace !== namespace || node.name !== name ? update(createJsxNamespacedName(namespace, name), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(295 /* CaseClause */); + const node = createBaseNode(296 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -21165,7 +21285,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(296 /* DefaultClause */); + const node = createBaseNode(297 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -21174,7 +21294,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(297 /* HeritageClause */); + const node = createBaseNode(298 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -21194,7 +21314,7 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(298 /* CatchClause */); + const node = createBaseNode(299 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -21206,7 +21326,7 @@ function createNodeFactory(flags, baseFactory2) { return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(302 /* PropertyAssignment */); + const node = createBaseDeclaration(303 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -21228,7 +21348,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(303 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(304 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -21252,7 +21372,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(304 /* SpreadAssignment */); + const node = createBaseDeclaration(305 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -21262,7 +21382,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(305 /* EnumMember */); + const node = createBaseDeclaration(306 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -21273,7 +21393,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(311 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -21343,7 +21463,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneRedirectedSourceFile(source) { const node = createRedirectedSourceFile(source.redirectInfo); - node.flags |= source.flags & ~8 /* Synthesized */; + node.flags |= source.flags & ~16 /* Synthesized */; node.fileName = source.fileName; node.path = source.path; node.resolvedPath = source.resolvedPath; @@ -21354,8 +21474,8 @@ function createNodeFactory(flags, baseFactory2) { return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(311 /* SourceFile */); - node.flags |= source.flags & ~8 /* Synthesized */; + const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); + node.flags |= source.flags & ~16 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { continue; @@ -21388,7 +21508,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(312 /* Bundle */); + const node = createBaseNode(313 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; @@ -21401,7 +21521,7 @@ function createNodeFactory(flags, baseFactory2) { return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(313 /* UnparsedSource */); + const node = createBaseNode(314 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -21418,48 +21538,48 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(306 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(307 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(307 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(308 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 309 /* UnparsedInternalText */ : 308 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 310 /* UnparsedInternalText */ : 309 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(310 /* UnparsedSyntheticReference */); + const node = createBaseNode(311 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles() { - const node = createBaseNode(314 /* InputFiles */); + const node = createBaseNode(315 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(236 /* SyntheticExpression */); + const node = createBaseNode(237 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList(children) { - const node = createBaseNode(357 /* SyntaxList */); + const node = createBaseNode(358 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(358 /* NotEmittedStatement */); + const node = createBaseNode(359 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(359 /* PartiallyEmittedExpression */); + const node = createBaseNode(360 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -21481,7 +21601,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createCommaListExpression(elements) { - const node = createBaseNode(360 /* CommaListExpression */); + const node = createBaseNode(361 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -21490,7 +21610,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(361 /* SyntheticReferenceExpression */); + const node = createBaseNode(362 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -21501,7 +21621,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneGeneratedIdentifier(node) { const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); @@ -21509,7 +21629,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneIdentifier(node) { const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.jsDoc = node.jsDoc; clone2.flowNode = node.flowNode; clone2.symbol = node.symbol; @@ -21522,7 +21642,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneGeneratedPrivateIdentifier(node) { const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); @@ -21530,7 +21650,7 @@ function createNodeFactory(flags, baseFactory2) { } function clonePrivateIdentifier(node) { const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); return clone2; @@ -21555,7 +21675,7 @@ function createNodeFactory(flags, baseFactory2) { return clonePrivateIdentifier(node); } const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); for (const key in node) { @@ -21648,7 +21768,10 @@ function createNodeFactory(flags, baseFactory2) { ); } function createTypeCheck(value, tag) { - return tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + return tag === "null" ? factory2.createStrictEquality(value, createNull()) : tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + } + function createIsNotTypeCheck(value, tag) { + return tag === "null" ? factory2.createStrictInequality(value, createNull()) : tag === "undefined" ? factory2.createStrictInequality(value, createVoidZero()) : factory2.createStrictInequality(createTypeOfExpression(value), createStringLiteral(tag)); } function createMethodCall(object, methodName, argumentsList) { if (isCallChain(object)) { @@ -21723,17 +21846,17 @@ function createNodeFactory(flags, baseFactory2) { } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 233 /* AsExpression */: + case 234 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -21773,13 +21896,13 @@ function createNodeFactory(flags, baseFactory2) { case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: return false; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -22042,6 +22165,9 @@ function createNodeFactory(flags, baseFactory2) { } return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); } + function updateModifierLike(node, modifierArray) { + return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); + } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; } @@ -22090,43 +22216,43 @@ function updateWithOriginal(updated, original) { } function getDefaultTagNameForKind(kind) { switch (kind) { - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return "type"; - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: return "returns"; - case 349 /* JSDocThisTag */: + case 350 /* JSDocThisTag */: return "this"; - case 346 /* JSDocEnumTag */: + case 347 /* JSDocEnumTag */: return "enum"; - case 336 /* JSDocAuthorTag */: + case 337 /* JSDocAuthorTag */: return "author"; - case 338 /* JSDocClassTag */: + case 339 /* JSDocClassTag */: return "class"; - case 339 /* JSDocPublicTag */: + case 340 /* JSDocPublicTag */: return "public"; - case 340 /* JSDocPrivateTag */: + case 341 /* JSDocPrivateTag */: return "private"; - case 341 /* JSDocProtectedTag */: + case 342 /* JSDocProtectedTag */: return "protected"; - case 342 /* JSDocReadonlyTag */: + case 343 /* JSDocReadonlyTag */: return "readonly"; - case 343 /* JSDocOverrideTag */: + case 344 /* JSDocOverrideTag */: return "override"; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return "template"; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return "typedef"; - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return "param"; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return "prop"; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: return "callback"; - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return "overload"; - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return "augments"; - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -22210,70 +22336,70 @@ function aggregateChildrenFlags(children) { children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 181 /* FirstTypeNode */ && kind <= 204 /* LastTypeNode */) { + if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 208 /* ArrayLiteralExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 209 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 168 /* Parameter */: + case 169 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 175 /* Constructor */: + case 176 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 146 /* NeverKeyword */: case 154 /* StringKeyword */: case 151 /* ObjectKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: case 116 /* VoidKeyword */: - case 167 /* TypeParameter */: - case 170 /* PropertySignature */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 171 /* PropertySignature */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 298 /* CatchClause */: + case 299 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 215 /* TypeAssertionExpression */: - case 237 /* SatisfiesExpression */: - case 233 /* AsExpression */: - case 359 /* PartiallyEmittedExpression */: - case 216 /* ParenthesizedExpression */: + case 216 /* TypeAssertionExpression */: + case 238 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 360 /* PartiallyEmittedExpression */: + case 217 /* ParenthesizedExpression */: case 108 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -22281,7 +22407,7 @@ function getTransformFlagsSubtreeExclusions(kind) { } var baseFactory = createBaseNodeFactory(); function makeSynthetic(node) { - node.flags |= 8 /* Synthesized */; + node.flags |= 16 /* Synthesized */; return node; } var syntheticFactory = { @@ -22514,11 +22640,13 @@ function createInputFilesWithFileTexts(javascriptPath, javascriptText, javascrip return node; } function setOriginalNode(node, original) { - node.original = original; - if (original) { - const emitNode = original.emitNode; - if (emitNode) - node.emitNode = mergeEmitNode(emitNode, node.emitNode); + if (node.original !== original) { + node.original = original; + if (original) { + const emitNode = original.emitNode; + if (emitNode) + node.emitNode = mergeEmitNode(emitNode, node.emitNode); + } } return node; } @@ -22534,35 +22662,53 @@ function mergeEmitNode(sourceEmitNode, destEmitNode) { constantValue, helpers, startsOnNewLine, - snippetElement + snippetElement, + classThis, + assignedName } = sourceEmitNode; if (!destEmitNode) destEmitNode = {}; - if (leadingComments) - destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); - if (trailingComments) - destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); - if (flags) + if (flags) { destEmitNode.flags = flags; - if (internalFlags) + } + if (internalFlags) { destEmitNode.internalFlags = internalFlags & ~8 /* Immutable */; - if (commentRange) + } + if (leadingComments) { + destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); + } + if (trailingComments) { + destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); + } + if (commentRange) { destEmitNode.commentRange = commentRange; - if (sourceMapRange) + } + if (sourceMapRange) { destEmitNode.sourceMapRange = sourceMapRange; - if (tokenSourceMapRanges) + } + if (tokenSourceMapRanges) { destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges); - if (constantValue !== void 0) + } + if (constantValue !== void 0) { destEmitNode.constantValue = constantValue; + } if (helpers) { for (const helper of helpers) { destEmitNode.helpers = appendIfUnique(destEmitNode.helpers, helper); } } - if (startsOnNewLine !== void 0) + if (startsOnNewLine !== void 0) { destEmitNode.startsOnNewLine = startsOnNewLine; - if (snippetElement !== void 0) + } + if (snippetElement !== void 0) { destEmitNode.snippetElement = snippetElement; + } + if (classThis) { + destEmitNode.classThis = classThis; + } + if (assignedName) { + destEmitNode.assignedName = assignedName; + } return destEmitNode; } function mergeTokenSourceMapRanges(sourceRanges, destRanges) { @@ -22578,7 +22724,7 @@ function mergeTokenSourceMapRanges(sourceRanges, destRanges) { function getOrCreateEmitNode(node) { if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node))) ?? Debug.fail("Could not determine parsed source file."); @@ -22809,7 +22955,10 @@ function createEmitHelperFactory(context) { // Class Fields Helpers createClassPrivateFieldGetHelper, createClassPrivateFieldSetHelper, - createClassPrivateFieldInHelper + createClassPrivateFieldInHelper, + // 'using' helpers + createAddDisposableResourceHelper, + createDisposeResourcesHelper }; function getUnscopedHelperName(name) { return setEmitFlags(factory2.createIdentifier(name), 8192 /* HelperName */ | 4 /* AdviseOnEmitNode */); @@ -22864,10 +23013,12 @@ function createEmitHelperFactory(context) { ); } function createESDecorateClassContextObject(contextIn) { - return factory2.createObjectLiteralExpression([ + const properties = [ factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral("class")), - factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name) - ]); + factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name), + factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata) + ]; + return factory2.createObjectLiteralExpression(properties); } function createESDecorateClassElementAccessGetMethod(elementName) { const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name); @@ -22971,13 +23122,15 @@ function createEmitHelperFactory(context) { return factory2.createObjectLiteralExpression(properties); } function createESDecorateClassElementContextObject(contextIn) { - return factory2.createObjectLiteralExpression([ + const properties = [ factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral(contextIn.kind)), factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name.computed ? contextIn.name.name : factory2.createStringLiteralFromNode(contextIn.name.name)), factory2.createPropertyAssignment(factory2.createIdentifier("static"), contextIn.static ? factory2.createTrue() : factory2.createFalse()), factory2.createPropertyAssignment(factory2.createIdentifier("private"), contextIn.private ? factory2.createTrue() : factory2.createFalse()), - factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)) - ]); + factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)), + factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata) + ]; + return factory2.createObjectLiteralExpression(properties); } function createESDecorateContextObject(contextIn) { return contextIn.kind === "class" ? createESDecorateClassContextObject(contextIn) : createESDecorateClassElementContextObject(contextIn); @@ -23288,6 +23441,24 @@ function createEmitHelperFactory(context) { [state, receiver] ); } + function createAddDisposableResourceHelper(envBinding, value, async) { + context.requestEmitHelper(addDisposableResourceHelper); + return factory2.createCallExpression( + getUnscopedHelperName("__addDisposableResource"), + /*typeArguments*/ + void 0, + [envBinding, value, async ? factory2.createTrue() : factory2.createFalse()] + ); + } + function createDisposeResourcesHelper(envBinding) { + context.requestEmitHelper(disposeResourcesHelper); + return factory2.createCallExpression( + getUnscopedHelperName("__disposeResources"), + /*typeArguments*/ + void 0, + [envBinding] + ); + } } function compareEmitHelpers(x, y) { if (x === y) @@ -23732,6 +23903,63 @@ var classPrivateFieldInHelper = { return typeof state === "function" ? receiver === state : state.has(receiver); };` }; +var addDisposableResourceHelper = { + name: "typescript:addDisposableResource", + importName: "__addDisposableResource", + scoped: false, + text: ` + var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + };` +}; +var disposeResourcesHelper = { + name: "typescript:disposeResources", + importName: "__disposeResources", + scoped: false, + text: ` + var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + });` +}; var allUnscopedEmitHelpers; function getAllUnscopedEmitHelpers() { return allUnscopedEmitHelpers || (allUnscopedEmitHelpers = arrayToMap([ @@ -23762,7 +23990,9 @@ function getAllUnscopedEmitHelpers() { classPrivateFieldSetHelper, classPrivateFieldInHelper, createBindingHelper, - setModuleDefaultHelper + setModuleDefaultHelper, + addDisposableResourceHelper, + disposeResourcesHelper ], (helper) => helper.name)); } var asyncSuperHelper = { @@ -23870,502 +24100,502 @@ function isImportKeyword(node) { return node.kind === 102 /* ImportKeyword */; } function isQualifiedName(node) { - return node.kind === 165 /* QualifiedName */; + return node.kind === 166 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 166 /* ComputedPropertyName */; + return node.kind === 167 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 167 /* TypeParameter */; + return node.kind === 168 /* TypeParameter */; } function isParameter(node) { - return node.kind === 168 /* Parameter */; + return node.kind === 169 /* Parameter */; } function isDecorator(node) { - return node.kind === 169 /* Decorator */; + return node.kind === 170 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 170 /* PropertySignature */; + return node.kind === 171 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 171 /* PropertyDeclaration */; + return node.kind === 172 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 172 /* MethodSignature */; + return node.kind === 173 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 173 /* MethodDeclaration */; + return node.kind === 174 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 174 /* ClassStaticBlockDeclaration */; + return node.kind === 175 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 175 /* Constructor */; + return node.kind === 176 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 176 /* GetAccessor */; + return node.kind === 177 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 177 /* SetAccessor */; + return node.kind === 178 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 178 /* CallSignature */; + return node.kind === 179 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 179 /* ConstructSignature */; + return node.kind === 180 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 180 /* IndexSignature */; + return node.kind === 181 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 181 /* TypePredicate */; + return node.kind === 182 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 182 /* TypeReference */; + return node.kind === 183 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 183 /* FunctionType */; + return node.kind === 184 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 184 /* ConstructorType */; + return node.kind === 185 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 185 /* TypeQuery */; + return node.kind === 186 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 186 /* TypeLiteral */; + return node.kind === 187 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 187 /* ArrayType */; + return node.kind === 188 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 188 /* TupleType */; + return node.kind === 189 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 201 /* NamedTupleMember */; + return node.kind === 202 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 189 /* OptionalType */; + return node.kind === 190 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 190 /* RestType */; + return node.kind === 191 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 191 /* UnionType */; + return node.kind === 192 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 192 /* IntersectionType */; + return node.kind === 193 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 193 /* ConditionalType */; + return node.kind === 194 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 194 /* InferType */; + return node.kind === 195 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 195 /* ParenthesizedType */; + return node.kind === 196 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 196 /* ThisType */; + return node.kind === 197 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 197 /* TypeOperator */; + return node.kind === 198 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 198 /* IndexedAccessType */; + return node.kind === 199 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 199 /* MappedType */; + return node.kind === 200 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 200 /* LiteralType */; + return node.kind === 201 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 204 /* ImportType */; + return node.kind === 205 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 203 /* TemplateLiteralTypeSpan */; + return node.kind === 204 /* TemplateLiteralTypeSpan */; } function isObjectBindingPattern(node) { - return node.kind === 205 /* ObjectBindingPattern */; + return node.kind === 206 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 206 /* ArrayBindingPattern */; + return node.kind === 207 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 207 /* BindingElement */; + return node.kind === 208 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 208 /* ArrayLiteralExpression */; + return node.kind === 209 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 209 /* ObjectLiteralExpression */; + return node.kind === 210 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 210 /* PropertyAccessExpression */; + return node.kind === 211 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 211 /* ElementAccessExpression */; + return node.kind === 212 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 212 /* CallExpression */; + return node.kind === 213 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 213 /* NewExpression */; + return node.kind === 214 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 214 /* TaggedTemplateExpression */; + return node.kind === 215 /* TaggedTemplateExpression */; } function isParenthesizedExpression(node) { - return node.kind === 216 /* ParenthesizedExpression */; + return node.kind === 217 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 217 /* FunctionExpression */; + return node.kind === 218 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 218 /* ArrowFunction */; + return node.kind === 219 /* ArrowFunction */; } function isTypeOfExpression(node) { - return node.kind === 220 /* TypeOfExpression */; + return node.kind === 221 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 221 /* VoidExpression */; + return node.kind === 222 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 222 /* AwaitExpression */; + return node.kind === 223 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 223 /* PrefixUnaryExpression */; + return node.kind === 224 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 224 /* PostfixUnaryExpression */; + return node.kind === 225 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 225 /* BinaryExpression */; + return node.kind === 226 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 226 /* ConditionalExpression */; + return node.kind === 227 /* ConditionalExpression */; } function isSpreadElement(node) { - return node.kind === 229 /* SpreadElement */; + return node.kind === 230 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 230 /* ClassExpression */; + return node.kind === 231 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 231 /* OmittedExpression */; + return node.kind === 232 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 232 /* ExpressionWithTypeArguments */; + return node.kind === 233 /* ExpressionWithTypeArguments */; } function isNonNullExpression(node) { - return node.kind === 234 /* NonNullExpression */; + return node.kind === 235 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 235 /* MetaProperty */; + return node.kind === 236 /* MetaProperty */; } function isPartiallyEmittedExpression(node) { - return node.kind === 359 /* PartiallyEmittedExpression */; + return node.kind === 360 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 360 /* CommaListExpression */; + return node.kind === 361 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 238 /* TemplateSpan */; + return node.kind === 239 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 239 /* SemicolonClassElement */; + return node.kind === 240 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 240 /* Block */; + return node.kind === 241 /* Block */; } function isVariableStatement(node) { - return node.kind === 242 /* VariableStatement */; + return node.kind === 243 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 241 /* EmptyStatement */; + return node.kind === 242 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 243 /* ExpressionStatement */; + return node.kind === 244 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 244 /* IfStatement */; + return node.kind === 245 /* IfStatement */; } function isForStatement(node) { - return node.kind === 247 /* ForStatement */; + return node.kind === 248 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 248 /* ForInStatement */; + return node.kind === 249 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 249 /* ForOfStatement */; + return node.kind === 250 /* ForOfStatement */; } function isReturnStatement(node) { - return node.kind === 252 /* ReturnStatement */; + return node.kind === 253 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 253 /* WithStatement */; + return node.kind === 254 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 254 /* SwitchStatement */; + return node.kind === 255 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 255 /* LabeledStatement */; + return node.kind === 256 /* LabeledStatement */; } function isTryStatement(node) { - return node.kind === 257 /* TryStatement */; + return node.kind === 258 /* TryStatement */; } function isVariableDeclaration(node) { - return node.kind === 259 /* VariableDeclaration */; + return node.kind === 260 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 260 /* VariableDeclarationList */; + return node.kind === 261 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 261 /* FunctionDeclaration */; + return node.kind === 262 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 262 /* ClassDeclaration */; + return node.kind === 263 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 263 /* InterfaceDeclaration */; + return node.kind === 264 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 264 /* TypeAliasDeclaration */; + return node.kind === 265 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 265 /* EnumDeclaration */; + return node.kind === 266 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */; + return node.kind === 267 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 267 /* ModuleBlock */; + return node.kind === 268 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 268 /* CaseBlock */; + return node.kind === 269 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 269 /* NamespaceExportDeclaration */; + return node.kind === 270 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */; + return node.kind === 271 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 271 /* ImportDeclaration */; + return node.kind === 272 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 272 /* ImportClause */; + return node.kind === 273 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 301 /* ImportTypeAssertionContainer */; + return node.kind === 302 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 299 /* AssertClause */; + return node.kind === 300 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 300 /* AssertEntry */; + return node.kind === 301 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 273 /* NamespaceImport */; + return node.kind === 274 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 279 /* NamespaceExport */; + return node.kind === 280 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 274 /* NamedImports */; + return node.kind === 275 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 275 /* ImportSpecifier */; + return node.kind === 276 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 276 /* ExportAssignment */; + return node.kind === 277 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 277 /* ExportDeclaration */; + return node.kind === 278 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 278 /* NamedExports */; + return node.kind === 279 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 280 /* ExportSpecifier */; + return node.kind === 281 /* ExportSpecifier */; } function isNotEmittedStatement(node) { - return node.kind === 358 /* NotEmittedStatement */; + return node.kind === 359 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 361 /* SyntheticReferenceExpression */; + return node.kind === 362 /* SyntheticReferenceExpression */; } function isExternalModuleReference(node) { - return node.kind === 282 /* ExternalModuleReference */; + return node.kind === 283 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 283 /* JsxElement */; + return node.kind === 284 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 284 /* JsxSelfClosingElement */; + return node.kind === 285 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 285 /* JsxOpeningElement */; + return node.kind === 286 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 286 /* JsxClosingElement */; + return node.kind === 287 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 287 /* JsxFragment */; + return node.kind === 288 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 288 /* JsxOpeningFragment */; + return node.kind === 289 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 289 /* JsxClosingFragment */; + return node.kind === 290 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 290 /* JsxAttribute */; + return node.kind === 291 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 291 /* JsxAttributes */; + return node.kind === 292 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 292 /* JsxSpreadAttribute */; + return node.kind === 293 /* JsxSpreadAttribute */; } function isJsxNamespacedName(node) { - return node.kind === 294 /* JsxNamespacedName */; + return node.kind === 295 /* JsxNamespacedName */; } function isCaseClause(node) { - return node.kind === 295 /* CaseClause */; + return node.kind === 296 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 296 /* DefaultClause */; + return node.kind === 297 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 297 /* HeritageClause */; + return node.kind === 298 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 298 /* CatchClause */; + return node.kind === 299 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 302 /* PropertyAssignment */; + return node.kind === 303 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 303 /* ShorthandPropertyAssignment */; + return node.kind === 304 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 304 /* SpreadAssignment */; + return node.kind === 305 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 305 /* EnumMember */; + return node.kind === 306 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 307 /* UnparsedPrepend */; + return node.kind === 308 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 311 /* SourceFile */; + return node.kind === 312 /* SourceFile */; } function isBundle(node) { - return node.kind === 312 /* Bundle */; + return node.kind === 313 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 313 /* UnparsedSource */; + return node.kind === 314 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 315 /* JSDocTypeExpression */; + return node.kind === 316 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 316 /* JSDocNameReference */; + return node.kind === 317 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 317 /* JSDocMemberName */; + return node.kind === 318 /* JSDocMemberName */; } function isJSDocAllType(node) { - return node.kind === 318 /* JSDocAllType */; + return node.kind === 319 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 319 /* JSDocUnknownType */; + return node.kind === 320 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 320 /* JSDocNullableType */; + return node.kind === 321 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 321 /* JSDocNonNullableType */; + return node.kind === 322 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 322 /* JSDocOptionalType */; + return node.kind === 323 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 323 /* JSDocFunctionType */; + return node.kind === 324 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 324 /* JSDocVariadicType */; + return node.kind === 325 /* JSDocVariadicType */; } function isJSDoc(node) { - return node.kind === 326 /* JSDoc */; + return node.kind === 327 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 328 /* JSDocTypeLiteral */; + return node.kind === 329 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 329 /* JSDocSignature */; + return node.kind === 330 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 334 /* JSDocAugmentsTag */; + return node.kind === 335 /* JSDocAugmentsTag */; } function isJSDocClassTag(node) { - return node.kind === 338 /* JSDocClassTag */; + return node.kind === 339 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 344 /* JSDocCallbackTag */; + return node.kind === 345 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 339 /* JSDocPublicTag */; + return node.kind === 340 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 340 /* JSDocPrivateTag */; + return node.kind === 341 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 341 /* JSDocProtectedTag */; + return node.kind === 342 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 342 /* JSDocReadonlyTag */; + return node.kind === 343 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 343 /* JSDocOverrideTag */; + return node.kind === 344 /* JSDocOverrideTag */; } function isJSDocOverloadTag(node) { - return node.kind === 345 /* JSDocOverloadTag */; + return node.kind === 346 /* JSDocOverloadTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 337 /* JSDocDeprecatedTag */; + return node.kind === 338 /* JSDocDeprecatedTag */; } function isJSDocEnumTag(node) { - return node.kind === 346 /* JSDocEnumTag */; + return node.kind === 347 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 347 /* JSDocParameterTag */; + return node.kind === 348 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 348 /* JSDocReturnTag */; + return node.kind === 349 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 349 /* JSDocThisTag */; + return node.kind === 350 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 350 /* JSDocTypeTag */; + return node.kind === 351 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 351 /* JSDocTemplateTag */; + return node.kind === 352 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 352 /* JSDocTypedefTag */; + return node.kind === 353 /* JSDocTypedefTag */; } function isJSDocPropertyTag(node) { - return node.kind === 354 /* JSDocPropertyTag */; + return node.kind === 355 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 335 /* JSDocImplementsTag */; + return node.kind === 336 /* JSDocImplementsTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 356 /* JSDocSatisfiesTag */; + return node.kind === 357 /* JSDocSatisfiesTag */; } // src/compiler/factory/utilities.ts @@ -24662,14 +24892,14 @@ function createExpressionForObjectLiteralElementLike(factory2, node, property, r Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -24722,7 +24952,7 @@ function startsWithUseStrict(statements) { return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaExpression(node) { - return node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; + return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -24737,19 +24967,19 @@ function getJSDocTypeAssertionType(node) { } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 237 /* SatisfiesExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 238 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -24883,10 +25113,10 @@ function getLocalNameForExternalImport(factory2, node, sourceFile) { const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 271 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 272 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 277 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 278 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -24949,11 +25179,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -24972,11 +25202,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 168 /* Parameter */: - case 207 /* BindingElement */: + case 169 /* Parameter */: + case 208 /* BindingElement */: return bindingElement.dotDotDotToken; - case 229 /* SpreadElement */: - case 304 /* SpreadAssignment */: + case 230 /* SpreadElement */: + case 305 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -24988,7 +25218,7 @@ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 207 /* BindingElement */: + case 208 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -24997,7 +25227,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -25006,7 +25236,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -25023,11 +25253,11 @@ function isStringOrNumericLiteral(node) { } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return name.elements; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return name.properties; } } @@ -25044,15 +25274,15 @@ function getJSDocTypeAliasName(fullName) { } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 261 /* FunctionDeclaration */ || kind === 175 /* Constructor */ || kind === 180 /* IndexSignature */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 281 /* MissingDeclaration */ || kind === 242 /* VariableStatement */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 276 /* ExportAssignment */; + return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 243 /* VariableStatement */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 174 /* ClassStaticBlockDeclaration */ || kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 281 /* MissingDeclaration */ || kind === 269 /* NamespaceExportDeclaration */; + return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 282 /* MissingDeclaration */ || kind === 270 /* NamespaceExportDeclaration */; } function isQuestionOrExclamationToken(node) { return isQuestionToken(node) || isExclamationToken(node); @@ -25322,7 +25552,7 @@ function createAccessorPropertyBackingField(factory2, node, modifiers, initializ initializer ); } -function createAccessorPropertyGetRedirector(factory2, node, modifiers, name) { +function createAccessorPropertyGetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) { return factory2.createGetAccessorDeclaration( modifiers, name, @@ -25332,7 +25562,7 @@ function createAccessorPropertyGetRedirector(factory2, node, modifiers, name) { factory2.createBlock([ factory2.createReturnStatement( factory2.createPropertyAccessExpression( - factory2.createThis(), + receiver, factory2.getGeneratedPrivateNameForNode( node.name, /*prefix*/ @@ -25344,7 +25574,7 @@ function createAccessorPropertyGetRedirector(factory2, node, modifiers, name) { ]) ); } -function createAccessorPropertySetRedirector(factory2, node, modifiers, name) { +function createAccessorPropertySetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) { return factory2.createSetAccessorDeclaration( modifiers, name, @@ -25359,7 +25589,7 @@ function createAccessorPropertySetRedirector(factory2, node, modifiers, name) { factory2.createExpressionStatement( factory2.createAssignment( factory2.createPropertyAccessExpression( - factory2.createThis(), + receiver, factory2.getGeneratedPrivateNameForNode( node.name, /*prefix*/ @@ -25443,11 +25673,11 @@ function setTextRange(range, location) { } function canHaveModifiers(node) { const kind = node.kind; - return kind === 167 /* TypeParameter */ || kind === 168 /* Parameter */ || kind === 170 /* PropertySignature */ || kind === 171 /* PropertyDeclaration */ || kind === 172 /* MethodSignature */ || kind === 173 /* MethodDeclaration */ || kind === 175 /* Constructor */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 180 /* IndexSignature */ || kind === 184 /* ConstructorType */ || kind === 217 /* FunctionExpression */ || kind === 218 /* ArrowFunction */ || kind === 230 /* ClassExpression */ || kind === 242 /* VariableStatement */ || kind === 261 /* FunctionDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 277 /* ExportDeclaration */; + return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 231 /* ClassExpression */ || kind === 243 /* VariableStatement */ || kind === 262 /* FunctionDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 278 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 168 /* Parameter */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 230 /* ClassExpression */ || kind === 262 /* ClassDeclaration */; + return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 231 /* ClassExpression */ || kind === 263 /* ClassDeclaration */; } // src/compiler/parser.ts @@ -25490,7 +25720,7 @@ function isAnExternalModuleIndicatorNode(node) { return canHaveModifiers(node) && hasModifierOfKind(node, 95 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { - return sourceFile.flags & 4194304 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; + return sourceFile.flags & 8388608 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; } function walkTreeForImportMeta(node) { return isImportMeta2(node) ? node : forEachChild(node, walkTreeForImportMeta); @@ -25502,428 +25732,428 @@ function isImportMeta2(node) { return isMetaProperty(node) && node.keywordToken === 102 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [165 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [167 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [168 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [303 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [304 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [304 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [305 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [168 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [169 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [171 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [172 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [170 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [171 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [302 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [303 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [259 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [260 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [207 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [180 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [184 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [183 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [178 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [179 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [173 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [172 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [175 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [176 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [177 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [261 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [262 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [217 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [218 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [174 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [182 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [181 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [185 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [186 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [187 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [188 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [191 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [192 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [193 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [194 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [204 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [301 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [195 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [197 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [199 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [200 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [201 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [205 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [206 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [208 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [209 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [210 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [211 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [212 /* CallExpression */]: forEachChildInCallOrNewExpression, - [213 /* NewExpression */]: forEachChildInCallOrNewExpression, - [214 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [213 /* CallExpression */]: forEachChildInCallOrNewExpression, + [214 /* NewExpression */]: forEachChildInCallOrNewExpression, + [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [215 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [216 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [219 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [220 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [220 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [221 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [222 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [223 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [224 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [228 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [229 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [222 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [223 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [224 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [225 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [225 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [226 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [233 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [234 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [234 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [235 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [237 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [238 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [235 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [236 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [226 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [227 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [229 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [230 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [240 /* Block */]: forEachChildInBlock, - [267 /* ModuleBlock */]: forEachChildInBlock, - [311 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [241 /* Block */]: forEachChildInBlock, + [268 /* ModuleBlock */]: forEachChildInBlock, + [312 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [242 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [243 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [260 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [261 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [243 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [244 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [244 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [245 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [245 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [246 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [246 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [247 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [247 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [248 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [248 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [249 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [249 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [250 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [250 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [251 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [252 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [251 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [252 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [253 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [253 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [254 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [254 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [255 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [268 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [269 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [295 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [296 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [296 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [297 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [255 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [256 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [256 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [257 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [257 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [258 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [298 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [299 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [169 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [262 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [230 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [263 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [263 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [231 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [264 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [264 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [265 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [265 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [266 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [305 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [306 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [266 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [267 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [270 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [271 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [271 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [272 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [299 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [300 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [269 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [273 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [274 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [279 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [280 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [274 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [278 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [277 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [275 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [280 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [276 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [277 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [227 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [228 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [238 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [239 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [202 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [203 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [166 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [297 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [298 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [232 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [233 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [282 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [283 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [281 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [360 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [361 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [283 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [287 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [288 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [284 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [285 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [291 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [285 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [286 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [292 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [290 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [291 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [292 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [293 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [293 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [294 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [286 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [287 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [294 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { + [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.namespace) || visitNode2(cbNode, node.name); }, - [189 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [190 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [315 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [320 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [322 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [316 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [322 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [323 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [325 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [324 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [326 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [327 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [353 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [354 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [316 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [317 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [317 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [318 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [347 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [354 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [336 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [348 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [355 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [337 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [335 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [336 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [334 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [335 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [351 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [352 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [352 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 315 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [353 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 316 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [344 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [345 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [348 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [350 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [349 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [356 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [355 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [345 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [329 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [349 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [351 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [350 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [347 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [357 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [356 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [346 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [330 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [330 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [331 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [332 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [328 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [331 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [332 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [333 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [329 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [333 /* JSDocTag */]: forEachChildInJSDocTag, - [338 /* JSDocClassTag */]: forEachChildInJSDocTag, - [339 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [340 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [341 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [342 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [337 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [343 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [359 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [334 /* JSDocTag */]: forEachChildInJSDocTag, + [339 /* JSDocClassTag */]: forEachChildInJSDocTag, + [340 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [341 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [342 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [343 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [338 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [344 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [360 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -25978,7 +26208,7 @@ function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 164 /* LastToken */) { + if (node === void 0 || node.kind <= 165 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -26013,7 +26243,7 @@ function forEachChildRecursively(rootNode, cbNode, cbNodes) { continue; return res; } - if (current.kind >= 165 /* FirstNode */) { + if (current.kind >= 166 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -26099,7 +26329,7 @@ var Parser; /*skipTrivia*/ true ); - var disallowInAndDecoratorContext = 4096 /* DisallowInContext */ | 16384 /* DecoratorContext */; + var disallowInAndDecoratorContext = 8192 /* DisallowInContext */ | 32768 /* DecoratorContext */; var NodeConstructor2; var TokenConstructor2; var IdentifierConstructor2; @@ -26344,10 +26574,10 @@ var Parser; switch (scriptKind) { case 1 /* JS */: case 2 /* JSX */: - contextFlags = 262144 /* JavaScriptFile */; + contextFlags = 524288 /* JavaScriptFile */; break; case 6 /* JSON */: - contextFlags = 262144 /* JavaScriptFile */ | 67108864 /* JsonFile */; + contextFlags = 524288 /* JavaScriptFile */ | 134217728 /* JsonFile */; break; default: contextFlags = 0 /* None */; @@ -26379,13 +26609,14 @@ var Parser; function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) { const isDeclarationFile = isDeclarationFileName(fileName); if (isDeclarationFile) { - contextFlags |= 16777216 /* Ambient */; + contextFlags |= 33554432 /* Ambient */; } sourceFlags = contextFlags; nextToken(); const statements = parseList(0 /* SourceElements */, parseStatement); Debug.assert(token() === 1 /* EndOfFileToken */); - const endOfFileToken = addJSDocComment(parseTokenNode()); + const endHasJSDoc = hasPrecedingJSDocComment(); + const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc); const sourceFile = createSourceFile2(fileName, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator2); processCommentPragmas(sourceFile, sourceText); processPragmasIntoFields(sourceFile, reportPragmaDiagnostic); @@ -26405,18 +26636,18 @@ var Parser; parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic)); } } - function withJSDoc(node, hasJSDoc) { - return hasJSDoc ? addJSDocComment(node) : node; - } let hasDeprecatedTag = false; - function addJSDocComment(node) { + function withJSDoc(node, hasJSDoc) { + if (!hasJSDoc) { + return node; + } Debug.assert(!node.jsDoc); const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), (comment) => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos)); if (jsDoc.length) node.jsDoc = jsDoc; if (hasDeprecatedTag) { hasDeprecatedTag = false; - node.flags |= 268435456 /* Deprecated */; + node.flags |= 536870912 /* Deprecated */; } return node; } @@ -26441,7 +26672,7 @@ var Parser; } speculationHelper(() => { const savedContextFlags = contextFlags; - contextFlags |= 32768 /* AwaitContext */; + contextFlags |= 65536 /* AwaitContext */; scanner.resetTokenState(nextStatement.pos); nextToken(); while (token() !== 1 /* EndOfFileToken */) { @@ -26476,7 +26707,7 @@ var Parser; syntaxCursor = savedSyntaxCursor; return factory2.updateSourceFile(sourceFile, setTextRange(factoryCreateNodeArray(statements), sourceFile.statements)); function containsPossibleTopLevelAwait(node) { - return !(node.flags & 32768 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); + return !(node.flags & 65536 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); } function findNextStatementWithAwait(statements2, start2) { for (let i = start2; i < statements2.length; i++) { @@ -26540,16 +26771,16 @@ var Parser; } } function setDisallowInContext(val) { - setContextFlag(val, 4096 /* DisallowInContext */); + setContextFlag(val, 8192 /* DisallowInContext */); } function setYieldContext(val) { - setContextFlag(val, 8192 /* YieldContext */); + setContextFlag(val, 16384 /* YieldContext */); } function setDecoratorContext(val) { - setContextFlag(val, 16384 /* DecoratorContext */); + setContextFlag(val, 32768 /* DecoratorContext */); } function setAwaitContext(val) { - setContextFlag(val, 32768 /* AwaitContext */); + setContextFlag(val, 65536 /* AwaitContext */); } function doOutsideOfContext(context, func) { const contextFlagsToClear = context & contextFlags; @@ -26588,52 +26819,52 @@ var Parser; return func(); } function allowInAnd(func) { - return doOutsideOfContext(4096 /* DisallowInContext */, func); + return doOutsideOfContext(8192 /* DisallowInContext */, func); } function disallowInAnd(func) { - return doInsideOfContext(4096 /* DisallowInContext */, func); + return doInsideOfContext(8192 /* DisallowInContext */, func); } function allowConditionalTypesAnd(func) { - return doOutsideOfContext(65536 /* DisallowConditionalTypesContext */, func); + return doOutsideOfContext(131072 /* DisallowConditionalTypesContext */, func); } function disallowConditionalTypesAnd(func) { - return doInsideOfContext(65536 /* DisallowConditionalTypesContext */, func); + return doInsideOfContext(131072 /* DisallowConditionalTypesContext */, func); } function doInYieldContext(func) { - return doInsideOfContext(8192 /* YieldContext */, func); + return doInsideOfContext(16384 /* YieldContext */, func); } function doInDecoratorContext(func) { - return doInsideOfContext(16384 /* DecoratorContext */, func); + return doInsideOfContext(32768 /* DecoratorContext */, func); } function doInAwaitContext(func) { - return doInsideOfContext(32768 /* AwaitContext */, func); + return doInsideOfContext(65536 /* AwaitContext */, func); } function doOutsideOfAwaitContext(func) { - return doOutsideOfContext(32768 /* AwaitContext */, func); + return doOutsideOfContext(65536 /* AwaitContext */, func); } function doInYieldAndAwaitContext(func) { - return doInsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + return doInsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); } function doOutsideOfYieldAndAwaitContext(func) { - return doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + return doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); } function inContext(flags) { return (contextFlags & flags) !== 0; } function inYieldContext() { - return inContext(8192 /* YieldContext */); + return inContext(16384 /* YieldContext */); } function inDisallowInContext() { - return inContext(4096 /* DisallowInContext */); + return inContext(8192 /* DisallowInContext */); } function inDisallowConditionalTypesContext() { - return inContext(65536 /* DisallowConditionalTypesContext */); + return inContext(131072 /* DisallowConditionalTypesContext */); } function inDecoratorContext() { - return inContext(16384 /* DecoratorContext */); + return inContext(32768 /* DecoratorContext */); } function inAwaitContext() { - return inContext(32768 /* AwaitContext */); + return inContext(65536 /* AwaitContext */); } function parseErrorAtCurrentToken(message, ...args) { return parseErrorAt(scanner.getTokenStart(), scanner.getTokenEnd(), message, ...args); @@ -26957,7 +27188,7 @@ var Parser; } if (parseErrorBeforeNextFinishedNode) { parseErrorBeforeNextFinishedNode = false; - node.flags |= 131072 /* ThisNodeHasError */; + node.flags |= 262144 /* ThisNodeHasError */; } return node; } @@ -26986,7 +27217,7 @@ var Parser; "", /*isSingleQuote*/ void 0 - ) : kind === 281 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 282 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -27203,6 +27434,9 @@ var Parser; case 22 /* HeritageClauses */: return isHeritageClause2(); case 23 /* ImportOrExportSpecifiers */: + if (token() === 161 /* FromKeyword */ && lookAhead(nextTokenIsStringLiteral)) { + return false; + } return tokenIsIdentifierOrKeyword(token()); case 13 /* JsxAttributes */: return tokenIsIdentifierOrKeyword(token()) || token() === 19 /* OpenBraceToken */; @@ -27359,7 +27593,7 @@ var Parser; if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { return void 0; } - const nodeContextFlags = node.flags & 50720768 /* ContextFlags */; + const nodeContextFlags = node.flags & 101441536 /* ContextFlags */; if (nodeContextFlags !== contextFlags) { return void 0; } @@ -27417,14 +27651,14 @@ var Parser; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 175 /* Constructor */: - case 180 /* IndexSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 239 /* SemicolonClassElement */: + case 176 /* Constructor */: + case 181 /* IndexSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 240 /* SemicolonClassElement */: return true; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 80 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -27435,8 +27669,8 @@ var Parser; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return true; } } @@ -27445,65 +27679,65 @@ var Parser; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 242 /* VariableStatement */: - case 240 /* Block */: - case 244 /* IfStatement */: - case 243 /* ExpressionStatement */: - case 256 /* ThrowStatement */: - case 252 /* ReturnStatement */: - case 254 /* SwitchStatement */: - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 241 /* EmptyStatement */: - case 257 /* TryStatement */: - case 255 /* LabeledStatement */: - case 245 /* DoStatement */: - case 258 /* DebuggerStatement */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 262 /* FunctionDeclaration */: + case 243 /* VariableStatement */: + case 241 /* Block */: + case 245 /* IfStatement */: + case 244 /* ExpressionStatement */: + case 257 /* ThrowStatement */: + case 253 /* ReturnStatement */: + case 255 /* SwitchStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 242 /* EmptyStatement */: + case 258 /* TryStatement */: + case 256 /* LabeledStatement */: + case 246 /* DoStatement */: + case 259 /* DebuggerStatement */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 305 /* EnumMember */; + return node.kind === 306 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 170 /* PropertySignature */: - case 178 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 171 /* PropertySignature */: + case 179 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 259 /* VariableDeclaration */) { + if (node.kind !== 260 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 168 /* Parameter */) { + if (node.kind !== 169 /* Parameter */) { return false; } const parameter = node; @@ -27561,6 +27795,9 @@ var Parser; case 22 /* HeritageClauses */: return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_expected); case 23 /* ImportOrExportSpecifiers */: + if (token() === 161 /* FromKeyword */) { + return parseErrorAtCurrentToken(Diagnostics._0_expected, "}"); + } return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case 13 /* JsxAttributes */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); @@ -27840,14 +28077,14 @@ var Parser; } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return nodeIsMissing(node.typeName); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: { + case 184 /* FunctionType */: + case 185 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -28139,7 +28376,7 @@ var Parser; function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 179 /* ConstructSignature */) { + if (kind === 180 /* ConstructSignature */) { parseExpected(105 /* NewKeyword */); } const typeParameters = parseTypeParameters(); @@ -28150,7 +28387,7 @@ var Parser; true ); parseTypeMemberSemicolon(); - const node = kind === 178 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -28235,10 +28472,10 @@ var Parser; } function parseTypeMember() { if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { - return parseSignatureMember(178 /* CallSignature */); + return parseSignatureMember(179 /* CallSignature */); } if (token() === 105 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(179 /* ConstructSignature */); + return parseSignatureMember(180 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -28247,10 +28484,10 @@ var Parser; false ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -28459,7 +28696,7 @@ var Parser; return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos); } function parseImportType() { - sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); const isTypeOf = parseOptional(114 /* TypeOfKeyword */); parseExpected(102 /* ImportKeyword */); @@ -28484,7 +28721,7 @@ var Parser; case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 155 /* SymbolKeyword */: case 136 /* BooleanKeyword */: case 157 /* UndefinedKeyword */: @@ -28550,7 +28787,7 @@ var Parser; case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 148 /* ReadonlyKeyword */: case 155 /* SymbolKeyword */: @@ -28796,8 +29033,8 @@ var Parser; return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); } function parseType() { - if (contextFlags & 40960 /* TypeExcludesFlags */) { - return doOutsideOfContext(40960 /* TypeExcludesFlags */, parseType); + if (contextFlags & 81920 /* TypeExcludesFlags */) { + return doOutsideOfContext(81920 /* TypeExcludesFlags */, parseType); } if (isStartOfFunctionTypeOrConstructorType()) { return parseFunctionOrConstructorType(); @@ -28918,12 +29155,14 @@ var Parser; return arrowExpression; } const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); if (expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) { return parseSimpleArrowFunctionExpression( pos, expr, allowReturnTypeInArrowFunction, + hasJSDoc, /*asyncModifier*/ void 0 ); @@ -28969,7 +29208,7 @@ var Parser; ), pos); } } - function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, asyncModifier) { + function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier) { Debug.assert(token() === 39 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); const parameter = factory2.createParameterDeclaration( /*modifiers*/ @@ -29002,7 +29241,7 @@ var Parser; equalsGreaterThanToken, body ); - return addJSDocComment(finishNode(node, pos)); + return withJSDoc(finishNode(node, pos), hasJSDoc); } function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { const triState = isParenthesizedArrowFunctionExpression(); @@ -29130,9 +29369,10 @@ var Parser; if (token() === 134 /* AsyncKeyword */) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const asyncModifier = parseModifiersForArrowFunction(); const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); - return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, asyncModifier); + return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier); } } return void 0; @@ -29186,7 +29426,7 @@ var Parser; return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 195 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -29249,7 +29489,7 @@ var Parser; return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 103 /* InKeyword */ || t === 164 /* OfKeyword */; + return t === 103 /* InKeyword */ || t === 165 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -29331,7 +29571,7 @@ var Parser; if (token() === 43 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 215 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { Debug.assert(isKeywordOrPunctuation(unaryOperator)); @@ -29418,13 +29658,13 @@ var Parser; let expression; if (token() === 102 /* ImportKeyword */) { if (lookAhead(nextTokenIsOpenParenOrLessThan)) { - sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; expression = parseTokenNode(); } else if (lookAhead(nextTokenIsDot)) { nextToken(); nextToken(); expression = finishNode(factory2.createMetaProperty(102 /* ImportKeyword */, parseIdentifierName()), pos); - sourceFlags |= 4194304 /* PossiblyContainsImportMeta */; + sourceFlags |= 8388608 /* PossiblyContainsImportMeta */; } else { expression = parseMemberExpressionOrHigher(); } @@ -29471,11 +29711,11 @@ var Parser; const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 285 /* JsxOpeningElement */) { + if (opening.kind === 286 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 283 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -29499,10 +29739,10 @@ var Parser; } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 288 /* JsxOpeningFragment */) { + } else if (opening.kind === 289 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 284 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 285 /* JsxSelfClosingElement */); result = opening; } if (!mustBeUnary && inExpressionContext && token() === 30 /* LessThanToken */) { @@ -29575,7 +29815,7 @@ var Parser; if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 283 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -29594,7 +29834,7 @@ var Parser; return finishNode(factory2.createJsxOpeningFragment(), pos); } const tagName = parseJsxElementName(); - const typeArguments = (contextFlags & 262144 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; + const typeArguments = (contextFlags & 524288 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; const attributes = parseJsxAttributes(); let node; if (token() === 32 /* GreaterThanToken */) { @@ -29772,17 +30012,17 @@ var Parser; return token() === 29 /* QuestionDotToken */ && lookAhead(nextTokenIsIdentifierOrKeywordOrOpenBracketOrTemplate); } function tryReparseOptionalChain(node) { - if (node.flags & 32 /* OptionalChain */) { + if (node.flags & 64 /* OptionalChain */) { return true; } if (isNonNullExpression(node)) { let expr = node.expression; - while (isNonNullExpression(expr) && !(expr.flags & 32 /* OptionalChain */)) { + while (isNonNullExpression(expr) && !(expr.flags & 64 /* OptionalChain */)) { expr = expr.expression; } - if (expr.flags & 32 /* OptionalChain */) { + if (expr.flags & 64 /* OptionalChain */) { while (isNonNullExpression(node)) { - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node = node.expression; } return true; @@ -29848,7 +30088,7 @@ var Parser; continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 232 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -29887,8 +30127,8 @@ var Parser; true ) ); - if (questionDotToken || tag.flags & 32 /* OptionalChain */) { - tagExpression.flags |= 32 /* OptionalChain */; + if (questionDotToken || tag.flags & 64 /* OptionalChain */) { + tagExpression.flags |= 64 /* OptionalChain */; } tagExpression.questionDotToken = questionDotToken; return finishNode(tagExpression, pos); @@ -29911,7 +30151,7 @@ var Parser; } } if (typeArguments || token() === 21 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -29940,7 +30180,7 @@ var Parser; return result; } function parseTypeArgumentsInExpression() { - if ((contextFlags & 262144 /* JavaScriptFile */) !== 0) { + if ((contextFlags & 524288 /* JavaScriptFile */) !== 0) { return void 0; } if (reScanLessThanToken() !== 30 /* LessThanToken */) { @@ -30072,10 +30312,10 @@ var Parser; true ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -30169,7 +30409,7 @@ var Parser; false ); let typeArguments; - if (expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (expression.kind === 233 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -30279,7 +30519,7 @@ var Parser; parseExpected(21 /* OpenParenToken */); let initializer; if (token() !== 27 /* SemicolonToken */) { - if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */) { + if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -30289,7 +30529,7 @@ var Parser; } } let node; - if (awaitToken ? parseExpected(164 /* OfKeyword */) : parseOptional(164 /* OfKeyword */)) { + if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ true @@ -30313,10 +30553,10 @@ var Parser; function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 251 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); + parseExpected(kind === 252 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 251 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 252 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -30335,7 +30575,7 @@ var Parser; const openParenParsed = parseExpected(21 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition); - const statement = doInsideOfContext(33554432 /* InWithStatement */, parseStatement); + const statement = doInsideOfContext(67108864 /* InWithStatement */, parseStatement); return withJSDoc(finishNode(factory2.createWithStatement(expression, statement), pos), hasJSDoc); } function parseCaseClause() { @@ -30475,6 +30715,10 @@ var Parser; case 86 /* ClassKeyword */: case 94 /* EnumKeyword */: return true; + case 160 /* UsingKeyword */: + return isUsingDeclaration(); + case 135 /* AwaitKeyword */: + return isAwaitUsingDeclaration(); case 120 /* InterfaceKeyword */: case 156 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); @@ -30489,12 +30733,16 @@ var Parser; case 124 /* ProtectedKeyword */: case 125 /* PublicKeyword */: case 148 /* ReadonlyKeyword */: + const previousToken = token(); nextToken(); if (scanner.hasPrecedingLineBreak()) { return false; } + if (previousToken === 138 /* DeclareKeyword */ && token() === 156 /* TypeKeyword */) { + return true; + } continue; - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: nextToken(); return token() === 19 /* OpenBraceToken */ || token() === 80 /* Identifier */ || token() === 95 /* ExportKeyword */; case 102 /* ImportKeyword */: @@ -30527,6 +30775,7 @@ var Parser; case 19 /* OpenBraceToken */: case 115 /* VarKeyword */: case 121 /* LetKeyword */: + case 160 /* UsingKeyword */: case 100 /* FunctionKeyword */: case 86 /* ClassKeyword */: case 94 /* EnumKeyword */: @@ -30556,7 +30805,7 @@ var Parser; case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: case 156 /* TypeKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: return true; case 129 /* AccessorKeyword */: case 125 /* PublicKeyword */: @@ -30576,6 +30825,36 @@ var Parser; function isLetDeclaration() { return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuring); } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf() { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine( + /*disallowOf*/ + true + ); + } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf) { + nextToken(); + if (disallowOf && token() === 165 /* OfKeyword */) + return false; + return (isBindingIdentifier() || token() === 19 /* OpenBraceToken */) && !scanner.hasPrecedingLineBreak(); + } + function isUsingDeclaration() { + return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); + } + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { + return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine( + /*disallowOf*/ + true + ); + } + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) { + if (nextToken() === 160 /* UsingKeyword */) { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); + } + return false; + } + function isAwaitUsingDeclaration() { + return lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine); + } function parseStatement() { switch (token()) { case 27 /* SemicolonToken */: @@ -30602,6 +30881,26 @@ var Parser; ); } break; + case 135 /* AwaitKeyword */: + if (isAwaitUsingDeclaration()) { + return parseVariableStatement( + getNodePos(), + hasPrecedingJSDocComment(), + /*modifiers*/ + void 0 + ); + } + break; + case 160 /* UsingKeyword */: + if (isUsingDeclaration()) { + return parseVariableStatement( + getNodePos(), + hasPrecedingJSDocComment(), + /*modifiers*/ + void 0 + ); + } + break; case 100 /* FunctionKeyword */: return parseFunctionDeclaration( getNodePos(), @@ -30625,9 +30924,9 @@ var Parser; case 99 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 88 /* ContinueKeyword */: - return parseBreakOrContinueStatement(250 /* ContinueStatement */); + return parseBreakOrContinueStatement(251 /* ContinueStatement */); case 83 /* BreakKeyword */: - return parseBreakOrContinueStatement(251 /* BreakStatement */); + return parseBreakOrContinueStatement(252 /* BreakStatement */); case 107 /* ReturnKeyword */: return parseReturnStatement(); case 118 /* WithKeyword */: @@ -30661,7 +30960,7 @@ var Parser; case 129 /* AccessorKeyword */: case 126 /* StaticKeyword */: case 148 /* ReadonlyKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -30686,15 +30985,15 @@ var Parser; return node; } for (const m of modifiers) { - m.flags |= 16777216 /* Ambient */; + m.flags |= 33554432 /* Ambient */; } - return doInsideOfContext(16777216 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); + return doInsideOfContext(33554432 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); } else { return parseDeclarationWorker(pos, hasJSDoc, modifiers); } } function tryReuseAmbientDeclaration(pos) { - return doInsideOfContext(16777216 /* Ambient */, () => { + return doInsideOfContext(33554432 /* Ambient */, () => { const node = currentNode(parsingContext, pos); if (node) { return consumeNode(node); @@ -30706,6 +31005,8 @@ var Parser; case 115 /* VarKeyword */: case 121 /* LetKeyword */: case 87 /* ConstKeyword */: + case 160 /* UsingKeyword */: + case 135 /* AwaitKeyword */: return parseVariableStatement(pos, hasJSDoc, modifiersIn); case 100 /* FunctionKeyword */: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); @@ -30717,7 +31018,7 @@ var Parser; return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); case 94 /* EnumKeyword */: return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); @@ -30737,7 +31038,7 @@ var Parser; default: if (modifiersIn) { const missing = createMissingNode( - 281 /* MissingDeclaration */, + 282 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -30749,6 +31050,9 @@ var Parser; return void 0; } } + function nextTokenIsStringLiteral() { + return nextToken() === 11 /* StringLiteral */; + } function nextTokenIsIdentifierOrStringLiteralOnSameLine() { nextToken(); return !scanner.hasPrecedingLineBreak() && (isIdentifier2() || token() === 11 /* StringLiteral */); @@ -30801,14 +31105,14 @@ var Parser; function parseObjectBindingPattern() { const pos = getNodePos(); parseExpected(19 /* OpenBraceToken */); - const elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); + const elements = allowInAnd(() => parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement)); parseExpected(20 /* CloseBraceToken */); return finishNode(factory2.createObjectBindingPattern(elements), pos); } function parseArrayBindingPattern() { const pos = getNodePos(); parseExpected(23 /* OpenBracketToken */); - const elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); + const elements = allowInAnd(() => parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement)); parseExpected(24 /* CloseBracketToken */); return finishNode(factory2.createArrayBindingPattern(elements), pos); } @@ -30855,12 +31159,20 @@ var Parser; case 87 /* ConstKeyword */: flags |= 2 /* Const */; break; + case 160 /* UsingKeyword */: + flags |= 4 /* Using */; + break; + case 135 /* AwaitKeyword */: + Debug.assert(isAwaitUsingDeclaration()); + flags |= 6 /* AwaitUsing */; + nextToken(); + break; default: Debug.fail(); } nextToken(); let declarations; - if (token() === 164 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -30966,7 +31278,7 @@ var Parser; function parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken) { const exclamationToken = !questionToken && !scanner.hasPrecedingLineBreak() ? parseOptionalToken(54 /* ExclamationToken */) : void 0; const type = parseTypeAnnotation(); - const initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer); + const initializer = doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */ | 8192 /* DisallowInContext */, parseInitializer); parseSemicolonAfterPropertyName(name, type, initializer); const node = factory2.createPropertyDeclaration( modifiers, @@ -31006,7 +31318,7 @@ var Parser; false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 176 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -31172,10 +31484,10 @@ var Parser; return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); } if (token() === 137 /* ConstructorKeyword */ || token() === 11 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); @@ -31190,9 +31502,9 @@ var Parser; const isAmbient = some(modifiers, isDeclareModifier); if (isAmbient) { for (const m of modifiers) { - m.flags |= 16777216 /* Ambient */; + m.flags |= 33554432 /* Ambient */; } - return doInsideOfContext(16777216 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); + return doInsideOfContext(33554432 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); } else { return parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers); } @@ -31223,10 +31535,10 @@ var Parser; true ); if (token() === 86 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 230 /* ClassExpression */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 231 /* ClassExpression */); } const missing = createMissingNode( - 281 /* MissingDeclaration */, + 282 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -31241,11 +31553,11 @@ var Parser; hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 230 /* ClassExpression */ + 231 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 262 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 263 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); @@ -31266,7 +31578,7 @@ var Parser; members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 262 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 263 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { @@ -31292,7 +31604,7 @@ var Parser; function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (expression.kind === 233 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -31318,6 +31630,9 @@ var Parser; } function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { parseExpected(156 /* TypeKeyword */); + if (scanner.hasPrecedingLineBreak()) { + parseErrorAtCurrentToken(Diagnostics.Line_break_not_permitted_here); + } const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(64 /* EqualsToken */); @@ -31358,7 +31673,7 @@ var Parser; return finishNode(factory2.createModuleBlock(statements), pos); } function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) { - const namespaceFlag = flags & 16 /* Namespace */; + const namespaceFlag = flags & 32 /* Namespace */; const name = parseIdentifier(); const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration( getNodePos(), @@ -31366,7 +31681,7 @@ var Parser; false, /*modifiers*/ void 0, - 4 /* NestedNamespace */ | namespaceFlag + 8 /* NestedNamespace */ | namespaceFlag ) : parseModuleBlock(); const node = factory2.createModuleDeclaration(modifiers, name, body, flags); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -31374,9 +31689,9 @@ var Parser; function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; let name; - if (token() === 161 /* GlobalKeyword */) { + if (token() === 162 /* GlobalKeyword */) { name = parseIdentifier(); - flags |= 1024 /* GlobalAugmentation */; + flags |= 2048 /* GlobalAugmentation */; } else { name = parseLiteralNode(); name.text = internIdentifier(name.text); @@ -31392,10 +31707,10 @@ var Parser; } function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; - if (token() === 161 /* GlobalKeyword */) { + if (token() === 162 /* GlobalKeyword */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); } else if (parseOptional(145 /* NamespaceKeyword */)) { - flags |= 16 /* Namespace */; + flags |= 32 /* Namespace */; } else { parseExpected(144 /* ModuleKeyword */); if (token() === 11 /* StringLiteral */) { @@ -31433,7 +31748,7 @@ var Parser; identifier = parseIdentifier(); } let isTypeOnly = false; - if (token() !== 160 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { + if (token() !== 161 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { isTypeOnly = true; identifier = isIdentifier2() ? parseIdentifier() : void 0; } @@ -31445,7 +31760,7 @@ var Parser; token() === 42 /* AsteriskToken */ || // import * token() === 19 /* OpenBraceToken */) { importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(160 /* FromKeyword */); + parseExpected(161 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); let assertClause; @@ -31510,7 +31825,7 @@ var Parser; return token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */; } function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 28 /* CommaToken */ || token() === 160 /* FromKeyword */; + return token() === 28 /* CommaToken */ || token() === 161 /* FromKeyword */; } function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { parseExpected(64 /* EqualsToken */); @@ -31523,7 +31838,7 @@ var Parser; function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(28 /* CommaToken */)) { - namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(274 /* NamedImports */); + namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(275 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -31559,15 +31874,15 @@ var Parser; } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 274 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); + const node = kind === 275 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(280 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(281 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(275 /* ImportSpecifier */); + return parseImportOrExportSpecifier(276 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -31611,10 +31926,10 @@ var Parser; parseExpected(130 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 275 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 276 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 275 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 276 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -31641,12 +31956,12 @@ var Parser; if (parseOptional(130 /* AsKeyword */)) { exportClause = parseNamespaceExport(namespaceExportPos); } - parseExpected(160 /* FromKeyword */); + parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(278 /* NamedExports */); - if (token() === 160 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner.hasPrecedingLineBreak()) { - parseExpected(160 /* FromKeyword */); + exportClause = parseNamedImportsOrExports(279 /* NamedExports */); + if (token() === 161 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner.hasPrecedingLineBreak()) { + parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } } @@ -31751,7 +32066,7 @@ var Parser; function parseJSDocTypeExpression(mayOmitBraces) { const pos = getNodePos(); const hasBrace = (mayOmitBraces ? parseOptional : parseExpected)(19 /* OpenBraceToken */); - const type = doInsideOfContext(8388608 /* JSDoc */, parseJSDocType); + const type = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); if (!mayOmitBraces || hasBrace) { parseExpectedJSDoc(20 /* CloseBraceToken */); } @@ -31790,7 +32105,7 @@ var Parser; void 0, 1 /* JS */ ); - const jsDoc = doInsideOfContext(8388608 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); + const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); const sourceFile = { languageVariant: 0 /* Standard */, text: content }; const diagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); clearState(); @@ -31801,9 +32116,9 @@ var Parser; const saveToken = currentToken; const saveParseDiagnosticsLength = parseDiagnostics.length; const saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; - const comment = doInsideOfContext(8388608 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); + const comment = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); setParent(comment, parent); - if (contextFlags & 262144 /* JavaScriptFile */) { + if (contextFlags & 524288 /* JavaScriptFile */) { if (!jsDocDiagnostics) { jsDocDiagnostics = []; } @@ -32284,7 +32599,7 @@ var Parser; switch (node.kind) { case 151 /* ObjectKeyword */: return true; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -32300,7 +32615,7 @@ var Parser; typeExpression = tryParseTypeExpression(); } const comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); - const nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent2); + const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent2); if (nestedTypeLiteral) { typeExpression = nestedTypeLiteral; isNameFirst = true; @@ -32314,14 +32629,14 @@ var Parser; let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { - if (child.kind === 347 /* JSDocParameterTag */ || child.kind === 354 /* JSDocPropertyTag */) { + if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) { children = append(children, child); - } else if (child.kind === 351 /* JSDocTemplateTag */) { + } else if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 187 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -32456,11 +32771,11 @@ var Parser; let jsDocPropertyTags; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent2))) { - if (child.kind === 351 /* JSDocTemplateTag */) { + if (child.kind === 352 /* JSDocTemplateTag */) { break; } hasChildren = true; - if (child.kind === 350 /* JSDocTypeTag */) { + if (child.kind === 351 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -32475,7 +32790,7 @@ var Parser; } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 187 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -32504,12 +32819,12 @@ var Parser; void 0, typeNameOrNamespaceName, body, - nested ? 4 /* NestedNamespace */ : void 0 + nested ? 8 /* NestedNamespace */ : void 0 ); return finishNode(jsDocNamespaceNode, start2); } if (nested) { - typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */; + typeNameOrNamespaceName.flags |= 4096 /* IdentifierIsInJSDocNamespace */; } return typeNameOrNamespaceName; } @@ -32518,7 +32833,7 @@ var Parser; let child; let parameters; while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent2))) { - if (child.kind === 351 /* JSDocTemplateTag */) { + if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); break; } @@ -32531,7 +32846,7 @@ var Parser; const returnTag = tryParse(() => { if (parseOptionalJsdoc(60 /* AtToken */)) { const tag = parseTag(indent2); - if (tag && tag.kind === 348 /* JSDocReturnTag */) { + if (tag && tag.kind === 349 /* JSDocReturnTag */) { return tag; } } @@ -32586,7 +32901,7 @@ var Parser; case 60 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent2); - if (child && (child.kind === 347 /* JSDocParameterTag */ || child.kind === 354 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -32651,7 +32966,7 @@ var Parser; if (isBracketed) { skipWhitespace(); parseExpected(64 /* EqualsToken */); - defaultType = doInsideOfContext(8388608 /* JSDoc */, parseJSDocType); + defaultType = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); parseExpected(24 /* CloseBracketToken */); } if (nodeIsMissing(name)) { @@ -33219,7 +33534,7 @@ function getNamedArgRegEx(name) { return result; } var tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/im; -var singleLinePragmaRegEx = /^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im; +var singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im; function extractPragmas(pragmas, range, text) { const tripleSlash = range.kind === 2 /* SingleLineCommentTrivia */ && tripleSlashXMLCommentStartRegEx.exec(text); if (tripleSlash) { @@ -33311,7 +33626,7 @@ function tagNamesAreEquivalent(lhs, rhs) { if (lhs.kind === 110 /* ThisKeyword */) { return true; } - if (lhs.kind === 294 /* JsxNamespacedName */) { + if (lhs.kind === 295 /* JsxNamespacedName */) { return lhs.namespace.escapedText === rhs.namespace.escapedText && lhs.name.escapedText === rhs.name.escapedText; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -33364,6 +33679,7 @@ var libEntries = [ ["es2015.symbol", "lib.es2015.symbol.d.ts"], ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], ["es2016.array.include", "lib.es2016.array.include.d.ts"], + ["es2017.date", "lib.es2017.date.d.ts"], ["es2017.object", "lib.es2017.object.d.ts"], ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], ["es2017.string", "lib.es2017.string.d.ts"], @@ -33399,14 +33715,18 @@ var libEntries = [ ["es2022.string", "lib.es2022.string.d.ts"], ["es2022.regexp", "lib.es2022.regexp.d.ts"], ["es2023.array", "lib.es2023.array.d.ts"], + ["es2023.collection", "lib.es2023.collection.d.ts"], ["esnext.array", "lib.es2023.array.d.ts"], + ["esnext.collection", "lib.es2023.collection.d.ts"], ["esnext.symbol", "lib.es2019.symbol.d.ts"], ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], ["esnext.intl", "lib.esnext.intl.d.ts"], + ["esnext.disposable", "lib.esnext.disposable.d.ts"], ["esnext.bigint", "lib.es2020.bigint.d.ts"], ["esnext.string", "lib.es2022.string.d.ts"], ["esnext.promise", "lib.es2021.promise.d.ts"], ["esnext.weakref", "lib.es2021.weakref.d.ts"], + ["esnext.decorators", "lib.esnext.decorators.d.ts"], ["decorators", "lib.decorators.d.ts"], ["decorators.legacy", "lib.decorators.legacy.d.ts"] ]; @@ -33814,6 +34134,7 @@ var commandOptionsWithoutBuild = [ { name: "checkJs", type: "boolean", + affectsModuleResolution: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, @@ -34040,7 +34361,7 @@ var commandOptionsWithoutBuild = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any, - defaultValueDescription: false + defaultValueDescription: Diagnostics.false_unless_strict_is_set }, { name: "alwaysStrict", @@ -35220,7 +35541,7 @@ function getTsconfigRootOptionsMap() { function convertConfigFileToObject(sourceFile, errors, jsonConversionNotifier) { var _a; const rootExpression = (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression; - if (rootExpression && rootExpression.kind !== 209 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -35272,7 +35593,7 @@ function convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConv var _a; const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 302 /* PropertyAssignment */) { + if (element.kind !== 303 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -35317,15 +35638,15 @@ function convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConv return valueExpression.text; case 9 /* NumericLiteral */: return Number(valueExpression.text); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: if (valueExpression.operator !== 41 /* MinusToken */ || valueExpression.operand.kind !== 9 /* NumericLiteral */) { break; } return -Number(valueExpression.operand.text); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: const objectLiteralExpression = valueExpression; return convertObjectLiteralExpressionToJson(objectLiteralExpression, option); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return convertArrayLiteralExpressionToJson( valueExpression.elements, option && option.element @@ -36224,19 +36545,19 @@ function getFileNamesFromConfigSpecs(configFileSpecs, basePath, options, host, e const wildcardFiles = arrayFrom(wildcardFileMap.values()); return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values())); } -function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames, currentDirectory) { +function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) { const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec; if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs)) return false; basePath = normalizePath(basePath); - const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames); + const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2); if (validatedFilesSpec) { for (const fileName of validatedFilesSpec) { if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck) return false; } } - return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath); + return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath); } function invalidDotDotAfterRecursiveWildcard(s) { const wildcardIndex = startsWith(s, "**/") ? 0 : s.indexOf("/**/"); @@ -36246,17 +36567,17 @@ function invalidDotDotAfterRecursiveWildcard(s) { const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../"); return lastDotIndex > wildcardIndex; } -function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) { +function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) { return matchesExcludeWorker( pathToCheck, filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)), - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, currentDirectory ); } -function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) { +function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) { const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude"); - const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames); + const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2); if (!excludeRegex) return false; if (excludeRegex.test(pathToCheck)) @@ -36286,9 +36607,9 @@ function specToDiagnostic(spec, disallowTrailingRecursion) { return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec]; } } -function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames) { +function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames2) { const rawExcludeRegex = getRegularExpressionForWildcard(exclude, path, "exclude"); - const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i"); + const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? "" : "i"); const wildcardDirectories = {}; if (include !== void 0) { const recursiveKeys = []; @@ -36297,7 +36618,7 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu if (excludeRegex && excludeRegex.test(spec)) { continue; } - const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames); + const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2); if (match) { const { key, flags } = match; const existingFlags = wildcardDirectories[key]; @@ -36312,7 +36633,7 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu for (const key in wildcardDirectories) { if (hasProperty(wildcardDirectories, key)) { for (const recursiveKey of recursiveKeys) { - if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) { + if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames2)) { delete wildcardDirectories[key]; } } @@ -36321,20 +36642,20 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu } return wildcardDirectories; } -function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames) { +function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) { const match = wildcardDirectoryPattern.exec(spec); if (match) { const questionWildcardIndex = spec.indexOf("?"); const starWildcardIndex = spec.indexOf("*"); const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator); return { - key: useCaseSensitiveFileNames ? match[0] : toFileNameLowerCase(match[0]), + key: useCaseSensitiveFileNames2 ? match[0] : toFileNameLowerCase(match[0]), flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */ }; } if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) { return { - key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : toFileNameLowerCase(spec)), + key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames2 ? spec : toFileNameLowerCase(spec)), flags: 1 /* Recursive */ }; } @@ -36616,8 +36937,8 @@ function getDefaultTypeRoots(currentDirectory) { } var nodeModulesAtTypes = combinePaths("node_modules", "@types"); function arePathsEqual(path1, path2, host) { - const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; - return comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0 /* EqualTo */; + const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; + return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */; } function getOriginalAndResolvedFileName(fileName, host, traceEnabled) { const resolvedFileName = realPath(fileName, host, traceEnabled); @@ -36905,7 +37226,7 @@ function compilerOptionValueToString(value) { return str + "}"; } function getKeyForCompilerOptions(options, affectingOptionDeclarations) { - return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + (options.pathsBasePath ? `|${options.pathsBasePath}` : void 0); + return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + `|${options.pathsBasePath}`; } function createCacheWithRedirects(ownOptions) { const redirectsMap = /* @__PURE__ */ new Map(); @@ -38012,6 +38333,9 @@ function loadModuleFromSelfNameReference(extensions, moduleName, directory, stat } const trailingParts = parts.slice(nameParts.length); const subpath = !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`; + if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) { + return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference); + } const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference); @@ -38359,13 +38683,10 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec function combineDirectoryPath(root, dir) { return ensureTrailingDirectorySeparator(combinePaths(root, dir)); } - function useCaseSensitiveFileNames() { - return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); - } function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { var _a, _b, _c, _d; - if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames()) : true)) { - const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames }); + if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { + const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses = []; if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName)); @@ -38394,7 +38715,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec for (const commonSourceDirGuess of commonSourceDirGuesses) { const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess); for (const candidateDir of candidateDirectories) { - if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) { + if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) { const pathFragment = finalPath.slice(candidateDir.length + 1); const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment); const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */]; @@ -38404,7 +38725,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec for (const possibleExt of inputExts) { if (!extensionIsOk(extensions, possibleExt)) continue; - const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames()); + const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state)); if (state.host.fileExists(possibleInputWithInputExtension)) { return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField( extensions, @@ -38478,11 +38799,13 @@ function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); if (priorityExtensions) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, formatExtensions(priorityExtensions)); const result = lookup(priorityExtensions); if (result) return result; } if (secondaryExtensions && !typesScopeOnly) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0, formatExtensions(secondaryExtensions)); return lookup(secondaryExtensions); } function lookup(extensions2) { @@ -38819,6 +39142,9 @@ function traceIfEnabled(state, diagnostic, ...args) { trace(state.host, diagnostic, ...args); } } +function useCaseSensitiveFileNames(state) { + return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); +} // src/compiler/binder.ts function getModuleInstanceState(node, visited) { @@ -38844,23 +39170,23 @@ function getModuleInstanceStateCached(node, visited = /* @__PURE__ */ new Map()) } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 278 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 279 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -38874,7 +39200,7 @@ function getModuleInstanceStateWorker(node, visited) { return state; } break; - case 267 /* ModuleBlock */: { + case 268 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -38893,10 +39219,10 @@ function getModuleInstanceStateWorker(node, visited) { }); return state; } - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 80 /* Identifier */: - if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { return 0 /* NonInstantiated */; } } @@ -38926,6 +39252,9 @@ function getModuleInstanceStateForAliasTarget(specifier, visited) { if (found === 1 /* Instantiated */) { return found; } + if (statement.kind === 271 /* ImportEqualsDeclaration */) { + found = 1 /* Instantiated */; + } } } if (found !== void 0) { @@ -39060,7 +39389,7 @@ function createBinder() { } } function getDeclarationName(node) { - if (node.kind === 276 /* ExportAssignment */) { + if (node.kind === 277 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -39069,7 +39398,7 @@ function createBinder() { const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -39094,31 +39423,31 @@ function createBinder() { return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return "__constructor" /* Constructor */; - case 183 /* FunctionType */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: + case 184 /* FunctionType */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: return "__call" /* Call */; - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: return "__new" /* New */; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return "__index" /* Index */; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return "export=" /* ExportEquals */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); break; - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 168 /* Parameter */: - Debug.assert(node.parent.kind === 323 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 169 /* Parameter */: + Debug.assert(node.parent.kind === 324 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); const functionType = node.parent; const index = functionType.parameters.indexOf(node); return "arg" + index; @@ -39165,7 +39494,7 @@ function createBinder() { messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 276 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 277 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -39204,7 +39533,7 @@ function createBinder() { function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 280 /* ExportSpecifier */ || node.kind === 270 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { Debug.assertNode(container, canHaveLocals); @@ -39220,7 +39549,7 @@ function createBinder() { } else { if (isJSDocTypeAlias(node)) Debug.assert(isInJSFile(node)); - if (!isAmbientModule(node) && (hasExportModifier || container.flags & 64 /* ExportContext */)) { + if (!isAmbientModule(node) && (hasExportModifier || container.flags & 128 /* ExportContext */)) { if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } @@ -39271,7 +39600,7 @@ function createBinder() { const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 218 /* ArrowFunction */) { + if (node.kind !== 219 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -39293,35 +39622,35 @@ function createBinder() { const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 174 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 175 /* Constructor */ || isInJSFile(node) && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; activeLabelList = void 0; hasExplicitReturn = false; bindChildren(node); - node.flags &= ~2816 /* ReachabilityAndEmitFlags */; + node.flags &= ~5632 /* ReachabilityAndEmitFlags */; if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && nodeIsPresent(node.body)) { - node.flags |= 256 /* HasImplicitReturn */; + node.flags |= 512 /* HasImplicitReturn */; if (hasExplicitReturn) - node.flags |= 512 /* HasExplicitReturn */; + node.flags |= 1024 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 175 /* Constructor */ || node.kind === 174 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */)) { + if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -39338,7 +39667,7 @@ function createBinder() { seenThisKeyword = false; bindChildren(node); Debug.assertNotNode(node, isIdentifier); - node.flags = seenThisKeyword ? node.flags | 128 /* ContainsThis */ : node.flags & ~128 /* ContainsThis */; + node.flags = seenThisKeyword ? node.flags | 256 /* ContainsThis */ : node.flags & ~256 /* ContainsThis */; } else { bindChildren(node); } @@ -39347,8 +39676,8 @@ function createBinder() { blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 261 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 261 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 262 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 262 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -39368,59 +39697,59 @@ function createBinder() { inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 242 /* FirstStatement */ && node.kind <= 258 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: bindWhileStatement(node); break; - case 245 /* DoStatement */: + case 246 /* DoStatement */: bindDoStatement(node); break; - case 247 /* ForStatement */: + case 248 /* ForStatement */: bindForStatement(node); break; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 244 /* IfStatement */: + case 245 /* IfStatement */: bindIfStatement(node); break; - case 252 /* ReturnStatement */: - case 256 /* ThrowStatement */: + case 253 /* ReturnStatement */: + case 257 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: bindTryStatement(node); break; - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: bindSwitchStatement(node); break; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: bindCaseBlock(node); break; - case 295 /* CaseClause */: + case 296 /* CaseClause */: bindCaseClause(node); break; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: bindLabeledStatement(node); break; - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -39428,49 +39757,49 @@ function createBinder() { } bindBinaryExpressionFlow(node); break; - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: bindCallExpressionFlow(node); break; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 311 /* SourceFile */: { + case 312 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 240 /* Block */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 268 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: bindBindingElementFlow(node); break; - case 168 /* Parameter */: + case 169 /* Parameter */: bindParameterFlow(node); break; - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: - case 302 /* PropertyAssignment */: - case 229 /* SpreadElement */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: + case 303 /* PropertyAssignment */: + case 230 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -39484,19 +39813,19 @@ function createBinder() { case 80 /* Identifier */: case 81 /* PrivateIdentifier */: case 110 /* ThisKeyword */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return hasNarrowableArgument(expr); - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return expr.operator === 54 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -39515,7 +39844,7 @@ function createBinder() { } } } - if (expr.expression.kind === 210 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -39546,9 +39875,9 @@ function createBinder() { } function isNarrowableOperand(expr) { switch (expr.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 64 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -39621,21 +39950,21 @@ function createBinder() { function isStatementCondition(node) { const parent2 = node.parent; switch (parent2.kind) { - case 244 /* IfStatement */: - case 246 /* WhileStatement */: - case 245 /* DoStatement */: + case 245 /* IfStatement */: + case 247 /* WhileStatement */: + case 246 /* DoStatement */: return parent2.expression === node; - case 247 /* ForStatement */: - case 226 /* ConditionalExpression */: + case 248 /* ForStatement */: + case 227 /* ConditionalExpression */: return parent2.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 216 /* ParenthesizedExpression */) { + if (node.kind === 217 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 223 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { + } else if (node.kind === 224 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { node = node.operand; } else { return isLogicalOrCoalescingBinaryExpression(node); @@ -39678,7 +40007,7 @@ function createBinder() { } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 255 /* LabeledStatement */) { + while (label && node.parent.kind === 256 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -39729,12 +40058,12 @@ function createBinder() { bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 249 /* ForOfStatement */) { + if (node.kind === 250 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 260 /* VariableDeclarationList */) { + if (node.initializer.kind !== 261 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -39756,7 +40085,7 @@ function createBinder() { } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 252 /* ReturnStatement */) { + if (node.kind === 253 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -39773,7 +40102,7 @@ function createBinder() { return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 251 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 252 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -39843,7 +40172,7 @@ function createBinder() { preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 296 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 297 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -39886,7 +40215,7 @@ function createBinder() { maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { const call = node; if (call.expression.kind !== 108 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); @@ -39912,7 +40241,7 @@ function createBinder() { currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { + if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -39921,21 +40250,21 @@ function createBinder() { function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 208 /* ArrayLiteralExpression */) { + } else if (node.kind === 209 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 229 /* SpreadElement */) { + if (e.kind === 230 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 209 /* ObjectLiteralExpression */) { + } else if (node.kind === 210 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 302 /* PropertyAssignment */) { + if (p.kind === 303 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 303 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 304 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 304 /* SpreadAssignment */) { + } else if (p.kind === 305 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -40066,7 +40395,7 @@ function createBinder() { const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 64 /* EqualsToken */ && node.left.kind === 211 /* ElementAccessExpression */) { + if (operator === 64 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -40094,7 +40423,7 @@ function createBinder() { } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 210 /* PropertyAccessExpression */) { + if (node.expression.kind === 211 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -40159,7 +40488,7 @@ function createBinder() { } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 346 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 347 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive( node.fullName, @@ -40174,7 +40503,7 @@ function createBinder() { function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 173 /* MethodDeclaration */) { + if (host && host.kind !== 174 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -40187,15 +40516,15 @@ function createBinder() { } function bindOptionalChainRest(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -40242,7 +40571,7 @@ function createBinder() { bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 217 /* FunctionExpression */ || expr.kind === 218 /* ArrowFunction */) { + if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -40253,7 +40582,7 @@ function createBinder() { } } } - if (node.expression.kind === 210 /* PropertyAccessExpression */) { + if (node.expression.kind === 211 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -40268,39 +40597,39 @@ function createBinder() { } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 311 /* SourceFile */: + case 312 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 209 /* ObjectLiteralExpression */: - case 263 /* InterfaceDeclaration */: - case 291 /* JsxAttributes */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 210 /* ObjectLiteralExpression */: + case 264 /* InterfaceDeclaration */: + case 292 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 329 /* JSDocSignature */: - case 180 /* IndexSignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 323 /* JSDocFunctionType */: - case 174 /* ClassStaticBlockDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 199 /* MappedType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 330 /* JSDocSignature */: + case 181 /* IndexSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 324 /* JSDocFunctionType */: + case 175 /* ClassStaticBlockDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 200 /* MappedType */: if (container.locals) Debug.assertNode(container, canHaveLocals); return declareSymbol( @@ -40331,10 +40660,10 @@ function createBinder() { return !!body && body.statements.some((s) => isExportDeclaration(s) || isExportAssignment(s)); } function setExportContextFlag(node) { - if (node.flags & 16777216 /* Ambient */ && !hasExportDeclarations(node)) { - node.flags |= 64 /* ExportContext */; + if (node.flags & 33554432 /* Ambient */ && !hasExportDeclarations(node)) { + node.flags |= 128 /* ExportContext */; } else { - node.flags &= ~64 /* ExportContext */; + node.flags &= ~128 /* ExportContext */; } } function bindModuleDeclaration(node) { @@ -40402,10 +40731,10 @@ function createBinder() { } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -40437,7 +40766,7 @@ function createBinder() { const saveCurrentFlow = currentFlow; for (const typeAlias of delayedTypeAliases) { const host = typeAlias.parent.parent; - container = findAncestor(host.parent, (n) => !!(getContainerFlags(n) & 1 /* IsContainer */)) || file; + container = getEnclosingContainer(host) || file; blockScopeContainer = getEnclosingBlockScopeContainer(host) || file; currentFlow = initFlowNode({ flags: 2 /* Start */ }); parent = typeAlias; @@ -40495,7 +40824,7 @@ function createBinder() { currentFlow = saveCurrentFlow; } function checkContextualIdentifier(node) { - if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) { + if (!file.parseDiagnostics.length && !(node.flags & 33554432 /* Ambient */) && !(node.flags & 16777216 /* JSDoc */) && !isIdentifierName(node)) { const originalKeywordKind = identifierToKeywordKind(node); if (originalKeywordKind === void 0) { return; @@ -40513,14 +40842,14 @@ function createBinder() { Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, declarationNameToString(node) )); - } else if (node.flags & 32768 /* AwaitContext */) { + } else if (node.flags & 65536 /* AwaitContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node) )); } - } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { + } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 16384 /* YieldContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, @@ -40608,7 +40937,7 @@ function createBinder() { } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 311 /* SourceFile */ && blockScopeContainer.kind !== 266 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 312 /* SourceFile */ && blockScopeContainer.kind !== 267 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -40670,7 +40999,7 @@ function createBinder() { node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 164 /* LastToken */) { + if (node.kind > 165 /* LastToken */) { const saveParent = parent; parent = node; const containerFlags = getContainerFlags(node); @@ -40727,7 +41056,7 @@ function createBinder() { function bindWorker(node) { switch (node.kind) { case 80 /* Identifier */: - if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { let parentNode = node.parent; while (parentNode && !isJSDocTypeAlias(parentNode)) { parentNode = parentNode.parent; @@ -40736,23 +41065,23 @@ function createBinder() { break; } case 110 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent.kind === 303 /* ShorthandPropertyAssignment */)) { + if (currentFlow && (isExpression(node) || parent.kind === 304 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: case 108 /* SuperKeyword */: node.flowNode = currentFlow; break; case 81 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -40771,7 +41100,7 @@ function createBinder() { ); } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -40806,81 +41135,81 @@ function createBinder() { Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return checkStrictModeCatchClause(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return checkStrictModeWithStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 196 /* ThisType */: + case 197 /* ThisType */: seenThisKeyword = true; return; - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return bindTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return bindParameter(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return bindPropertyWorker(node); - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 305 /* EnumMember */: + case 306 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return declareSymbolAndAddToSymbolTable( node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */ ); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 183 /* FunctionType */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 185 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 199 /* MappedType */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 200 /* MappedType */: return bindAnonymousTypeWorker(node); - case 338 /* JSDocClassTag */: + case 339 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return bindFunctionExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -40898,60 +41227,60 @@ function createBinder() { bindCallExpression(node); } break; - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return bindJsxAttributes(node); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 270 /* ImportEqualsDeclaration */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 271 /* ImportEqualsDeclaration */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return bindImportClause(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return bindExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return bindExportAssignment(node); - case 311 /* SourceFile */: + case 312 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 240 /* Block */: + case 241 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 347 /* JSDocParameterTag */: - if (node.parent.kind === 329 /* JSDocSignature */) { + case 348 /* JSDocParameterTag */: + if (node.parent.kind === 330 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 328 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 329 /* JSDocTypeLiteral */) { break; } - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 322 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 323 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return bind(node.typeExpression); } } @@ -41103,8 +41432,8 @@ function createBinder() { false ); switch (thisContainer.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 64 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -41122,12 +41451,12 @@ function createBinder() { addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -41144,7 +41473,7 @@ function createBinder() { ); } break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -41153,7 +41482,7 @@ function createBinder() { declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */); } break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: break; default: Debug.failBadSyntaxKind(thisContainer); @@ -41181,7 +41510,7 @@ function createBinder() { function bindSpecialPropertyDeclaration(node) { if (node.expression.kind === 110 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 311 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 312 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -41230,7 +41559,7 @@ function createBinder() { } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 311 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 312 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces( namespaceSymbol, node.arguments[0], @@ -41344,7 +41673,7 @@ function createBinder() { declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 311 /* SourceFile */ : propertyAccess.parent.parent.kind === 311 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 312 /* SourceFile */ : propertyAccess.parent.parent.kind === 312 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -41406,7 +41735,7 @@ function createBinder() { } } function bindClassLikeDeclaration(node) { - if (node.kind === 262 /* ClassDeclaration */) { + if (node.kind === 263 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -41435,7 +41764,7 @@ function createBinder() { checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 259 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -41448,10 +41777,10 @@ function createBinder() { } } function bindParameter(node) { - if (node.kind === 347 /* JSDocParameterTag */ && container.kind !== 329 /* JSDocSignature */) { + if (node.kind === 348 /* JSDocParameterTag */ && container.kind !== 330 /* JSDocSignature */) { return; } - if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { + if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) { checkStrictModeEvalOrArguments(node, node.name); } if (isBindingPattern(node.name)) { @@ -41465,9 +41794,9 @@ function createBinder() { } } function bindFunctionDeclaration(node) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */)) { + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) { if (isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + emitFlags |= 4096 /* HasAsyncFunctions */; } } checkStrictModeFunctionName(node); @@ -41479,9 +41808,9 @@ function createBinder() { } } function bindFunctionExpression(node) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */)) { + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) { if (isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + emitFlags |= 4096 /* HasAsyncFunctions */; } } if (currentFlow) { @@ -41492,8 +41821,8 @@ function createBinder() { return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); } function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */) && isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */) && isAsyncFunction(node)) { + emitFlags |= 4096 /* HasAsyncFunctions */; } if (currentFlow && isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { node.flowNode = currentFlow; @@ -41521,7 +41850,7 @@ function createBinder() { } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 194 /* InferType */) { + } else if (node.parent.kind === 195 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { Debug.assertNode(container2, canHaveLocals); @@ -41552,14 +41881,14 @@ function createBinder() { if (currentFlow === unreachableFlow) { const reportError = ( // report error on all statements except empty ones - isStatementButNotDeclaration(node) && node.kind !== 241 /* EmptyStatement */ || // report error on class declarations - node.kind === 262 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - node.kind === 266 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) + isStatementButNotDeclaration(node) && node.kind !== 242 /* EmptyStatement */ || // report error on class declarations + node.kind === 263 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + node.kind === 267 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) ); if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { - const isError = unreachableCodeIsError(options) && !(node.flags & 16777216 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 3 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer)); + const isError = unreachableCodeIsError(options) && !(node.flags & 33554432 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 7 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer)); eachUnreachableRange(node, (start, end) => errorOrSuggestionOnRange(isError, start, end, Diagnostics.Unreachable_code_detected)); } } @@ -41578,16 +41907,16 @@ function eachUnreachableRange(node, cb) { } function isExecutableStatement(s) { return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && !isEnumDeclaration(s) && // `var x;` may declare a variable used above - !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & (1 /* Let */ | 2 /* Const */)) && s.declarationList.declarations.some((d) => !d.initializer)); + !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & 7 /* BlockScoped */) && s.declarationList.declarations.some((d) => !d.initializer)); } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -41622,54 +41951,54 @@ function isExportsOrModuleExportsOrAlias(sourceFile, node) { } function getContainerFlags(node) { switch (node.kind) { - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 291 /* JsxAttributes */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 292 /* JsxAttributes */: return 1 /* IsContainer */; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 199 /* MappedType */: - case 180 /* IndexSignature */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 200 /* MappedType */: + case 181 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: - case 323 /* JSDocFunctionType */: - case 183 /* FunctionType */: - case 179 /* ConstructSignature */: - case 184 /* ConstructorType */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: + case 324 /* JSDocFunctionType */: + case 184 /* FunctionType */: + case 180 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 175 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 298 /* CatchClause */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 268 /* CaseBlock */: + case 299 /* CatchClause */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 269 /* CaseBlock */: return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - case 240 /* Block */: + case 241 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; } return 0 /* None */; @@ -41830,7 +42159,7 @@ function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignatu symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 185 /* TypeQuery */) { + if (d.type && d.type.kind === 186 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -42206,7 +42535,7 @@ function tryGetModuleNameFromAmbientModule(moduleSymbol, checker) { if (originalExportSymbol === d.symbol) return topNamespace.parent.parent; function getTopNamespace(namespaceDeclaration) { - while (namespaceDeclaration.flags & 4 /* NestedNamespace */) { + while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { namespaceDeclaration = namespaceDeclaration.parent; } return namespaceDeclaration; @@ -42236,7 +42565,9 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, hos for (const { ending, value } of candidates) { if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) { const matchedStar = value.substring(prefix.length, value.length - suffix.length); - return pathIsRelative(matchedStar) ? void 0 : key.replace("*", matchedStar); + if (!pathIsRelative(matchedStar)) { + return key.replace("*", matchedStar); + } } } } else if (some(candidates, (c) => c.ending !== 0 /* Minimal */ && pattern === c.value) || some(candidates, (c) => c.ending === 0 /* Minimal */ && pattern === c.value && validateEnding(c))) { @@ -42308,7 +42639,7 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, for (const key of getOwnKeys(exports)) { if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = exports[key]; - const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions); + const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode); if (result) { return result; } @@ -42651,6 +42982,7 @@ var CheckMode = /* @__PURE__ */ ((CheckMode3) => { CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; CheckMode3[CheckMode3["IsForStringLiteralArgumentCompletions"] = 32] = "IsForStringLiteralArgumentCompletions"; CheckMode3[CheckMode3["RestBindingElement"] = 64] = "RestBindingElement"; + CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly"; return CheckMode3; })(CheckMode || {}); var SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => { @@ -42721,6 +43053,7 @@ function createTypeChecker(host) { var moduleKind = getEmitModuleKind(compilerOptions); var legacyDecorators = !!compilerOptions.experimentalDecorators; var useDefineForClassFields = getUseDefineForClassFields(compilerOptions); + var emitStandardClassFields = getEmitStandardClassFields(compilerOptions); var allowSyntheticDefaultImports = getAllowSyntheticDefaultImports(compilerOptions); var strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks"); var strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes"); @@ -42748,6 +43081,10 @@ function createTypeChecker(host) { var isolatedModulesLikeFlagName = compilerOptions.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"; var canCollectSymbolAliasAccessabilityData = !compilerOptions.verbatimModuleSyntax || !!compilerOptions.importsNotUsedAsValues; var apparentArgumentCount; + var lastGetCombinedNodeFlagsNode; + var lastGetCombinedNodeFlagsResult = 0 /* None */; + var lastGetCombinedModifierFlagsNode; + var lastGetCombinedModifierFlagsResult = 0 /* None */; const checker = { getNodeCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.nodeCount, 0), getIdentifierCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.identifierCount, 0), @@ -42807,7 +43144,7 @@ function createTypeChecker(host) { return node ? getTypeFromTypeNode(node) : errorType; }, getParameterType: getTypeAtPosition, - getParameterIdentifierNameAtPosition, + getParameterIdentifierInfoAtPosition, getPromisedTypeOfPromise, getAwaitedType: (type) => getAwaitedType(type), getReturnTypeOfSignature, @@ -42925,13 +43262,24 @@ function createTypeChecker(host) { getTypeOfPropertyOfContextualType, getFullyQualifiedName, getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */), - getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray) => runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - 32 /* IsForStringLiteralArgumentCompletions */ - )), + getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) => { + if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) { + return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( + call, + candidatesOutArray, + /*argumentCount*/ + void 0, + checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ + )); + } + return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( + call, + candidatesOutArray, + /*argumentCount*/ + void 0, + checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ + )); + }, getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)), getExpandedParameters, hasEffectiveRestParameter, @@ -43105,7 +43453,7 @@ function createTypeChecker(host) { Debug.assert(!!(getNodeLinks(file).flags & 1 /* TypeChecked */)); diagnostics2 = addRange(diagnostics2, suggestionDiagnostics.getDiagnostics(file.fileName)); checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(file), (containingNode, kind, diag2) => { - if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 16777216 /* Ambient */))) { + if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) { (diagnostics2 || (diagnostics2 = [])).push({ ...diag2, category: 2 /* Suggestion */ }); } }); @@ -43131,14 +43479,19 @@ function createTypeChecker(host) { typeHasCallOrConstructSignatures }; function runWithoutResolvedSignatureCaching(node, fn) { - const containingCall = findAncestor(node, isCallLikeExpression); - const containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; - if (containingCall) { - getNodeLinks(containingCall).resolvedSignature = void 0; + const cachedSignatures = []; + while (node) { + if (isCallLikeExpression(node)) { + const nodeLinks2 = getNodeLinks(node); + const resolvedSignature = nodeLinks2.resolvedSignature; + cachedSignatures.push([nodeLinks2, resolvedSignature]); + nodeLinks2.resolvedSignature = void 0; + } + node = node.parent; } const result = fn(); - if (containingCall) { - getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + for (const [nodeLinks2, resolvedSignature] of cachedSignatures) { + nodeLinks2.resolvedSignature = resolvedSignature; } return result; } @@ -43444,7 +43797,7 @@ function createTypeChecker(host) { }; var amalgamatedDuplicates; var reverseMappedCache = /* @__PURE__ */ new Map(); - var inInferTypeForHomomorphicMappedType = false; + var homomorphicMappedTypeInferenceStack = []; var ambientModulesCache; var patternAmbientModules; var patternAmbientModuleAugmentations; @@ -43485,6 +43838,8 @@ function createTypeChecker(host) { var deferredGlobalImportMetaType; var deferredGlobalImportMetaExpressionType; var deferredGlobalImportCallOptionsType; + var deferredGlobalDisposableType; + var deferredGlobalAsyncDisposableType; var deferredGlobalExtractSymbol; var deferredGlobalOmitSymbol; var deferredGlobalAwaitedSymbol; @@ -43713,7 +44068,7 @@ function createTypeChecker(host) { return !!symbol.valueDeclaration && isDeprecatedDeclaration(symbol.valueDeclaration) || length(symbol.declarations) && every(symbol.declarations, isDeprecatedDeclaration); } function isDeprecatedDeclaration(declaration) { - return !!(getCombinedNodeFlags(declaration) & 268435456 /* Deprecated */); + return !!(getCombinedNodeFlagsCached(declaration) & 536870912 /* Deprecated */); } function addDeprecatedSuggestion(location, declarations, deprecatedEntity) { const diagnostic = createDiagnosticForNode(location, Diagnostics._0_is_deprecated, deprecatedEntity); @@ -43927,7 +44282,7 @@ function createTypeChecker(host) { if (isGlobalScopeAugmentation(moduleAugmentation)) { mergeSymbolTable(globals, moduleAugmentation.symbol.exports); } else { - const moduleNotFoundError = !(moduleName.parent.parent.flags & 16777216 /* Ambient */) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : void 0; + const moduleNotFoundError = !(moduleName.parent.parent.flags & 33554432 /* Ambient */) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : void 0; let mainModule = resolveExternalModuleNameWorker( moduleName, moduleName, @@ -43991,7 +44346,7 @@ function createTypeChecker(host) { return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 311 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 312 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { if (meaning) { @@ -44002,7 +44357,7 @@ function createTypeChecker(host) { return symbol; } if (symbol.flags & 2097152 /* Alias */) { - const targetFlags = getAllSymbolFlags(symbol); + const targetFlags = getSymbolFlags(symbol); if (targetFlags & meaning) { return symbol; } @@ -44025,7 +44380,7 @@ function createTypeChecker(host) { const useFile = getSourceFileOfNode(usage); const declContainer = getEnclosingBlockScopeContainer(declaration); if (declarationFile !== useFile) { - if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !outFile(compilerOptions) || isInTypeQuery(usage) || declaration.flags & 16777216 /* Ambient */) { + if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !outFile(compilerOptions) || isInTypeQuery(usage) || declaration.flags & 33554432 /* Ambient */) { return true; } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { @@ -44035,13 +44390,13 @@ function createTypeChecker(host) { return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 207 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 207 /* BindingElement */); + if (declaration.kind === 208 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 259 /* VariableDeclaration */), usage); - } else if (declaration.kind === 259 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 260 /* VariableDeclaration */), usage); + } else if (declaration.kind === 260 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -44053,21 +44408,21 @@ function createTypeChecker(host) { false ); } else if (isParameterPropertyDeclaration(declaration, declaration.parent)) { - return !(getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration)); + return !(emitStandardClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration)); } return true; } - if (usage.parent.kind === 280 /* ExportSpecifier */ || usage.parent.kind === 276 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 281 /* ExportSpecifier */ || usage.parent.kind === 277 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 276 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) { return true; } - if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { + if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { return true; } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { - if (getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ && useDefineForClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { + if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { return !isPropertyImmediatelyReferencedWithinDeclaration( declaration, usage, @@ -44081,9 +44436,9 @@ function createTypeChecker(host) { return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 242 /* VariableStatement */: - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: + case 243 /* VariableStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -44108,7 +44463,7 @@ function createTypeChecker(host) { const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 173 /* MethodDeclaration */) { + if (declaration2.kind === 174 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -44122,7 +44477,7 @@ function createTypeChecker(host) { } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 171 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -44141,15 +44496,15 @@ function createTypeChecker(host) { return "quit"; } switch (node.kind) { - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 240 /* Block */: + case 241 /* Block */: switch (node.parent.kind) { - case 176 /* GetAccessor */: - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: return true; default: return false; @@ -44179,19 +44534,19 @@ function createTypeChecker(host) { } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 175 /* Constructor */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: return false; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 302 /* PropertyAssignment */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 303 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasStaticModifier(node)) { - return target < 99 /* ESNext */ || !useDefineForClassFields; + return !emitStandardClassFields; } return requiresScopeChangeWorker(node.name); default: @@ -44230,7 +44585,7 @@ function createTypeChecker(host) { if (name === "const" && isConstAssertion(location)) { return void 0; } - if (isModuleDeclaration(location) && lastLocation && location.name === lastLocation) { + if (isModuleOrEnumDeclaration(location) && lastLocation && location.name === lastLocation) { lastLocation = location; location = location.parent; } @@ -44238,17 +44593,17 @@ function createTypeChecker(host) { if (result = lookup(location.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 326 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 168 /* Parameter */ || lastLocation.kind === 347 /* JSDocParameterTag */ || lastLocation.kind === 348 /* JSDocReturnTag */ || lastLocation.kind === 167 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 327 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 348 /* JSDocParameterTag */ || lastLocation.kind === 349 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 168 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 169 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 193 /* ConditionalType */) { + } else if (location.kind === 194 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -44260,13 +44615,13 @@ function createTypeChecker(host) { } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const moduleExports = ((_a = getSymbolOfDeclaration(location)) == null ? void 0 : _a.exports) || emptySymbols; - if (location.kind === 311 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 312 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 33554432 /* Ambient */ && !isGlobalScopeAugmentation(location)) { if (result = moduleExports.get("default" /* Default */)) { const localSymbol = getLocalSymbolForExportDefault(result); if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { @@ -44275,7 +44630,7 @@ function createTypeChecker(host) { result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 280 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 279 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 281 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 280 /* NamespaceExport */))) { break; } } @@ -44287,9 +44642,9 @@ function createTypeChecker(host) { } } break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { - if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 16777216 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { + if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 33554432 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { error( errorLocation, Diagnostics.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead, @@ -44301,7 +44656,7 @@ function createTypeChecker(host) { break loop; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -44312,9 +44667,9 @@ function createTypeChecker(host) { } } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -44336,7 +44691,7 @@ function createTypeChecker(host) { } } break; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: if (lastLocation === location.expression && location.parent.token === 96 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) { @@ -44347,9 +44702,9 @@ function createTypeChecker(host) { } } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 263 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 264 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); @@ -44358,21 +44713,21 @@ function createTypeChecker(host) { } } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -44385,37 +44740,37 @@ function createTypeChecker(host) { } } break; - case 169 /* Decorator */: - if (location.parent && location.parent.kind === 168 /* Parameter */) { + case 170 /* Decorator */: + if (location.parent && location.parent.kind === 169 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 262 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 263 /* ClassDeclaration */)) { location = location.parent; } break; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 194 /* InferType */: + case 195 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -44424,7 +44779,7 @@ function createTypeChecker(host) { } } break; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: if (lastLocation && lastLocation === location.propertyName && location.parent.parent.moduleSpecifier) { location = location.parent.parent.parent; } @@ -44462,7 +44817,7 @@ function createTypeChecker(host) { } } function checkAndReportErrorForInvalidInitializer() { - if (propertyWithInvalidInitializer && !(useDefineForClassFields && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */)) { + if (propertyWithInvalidInitializer && !emitStandardClassFields) { error( errorLocation, errorLocation && propertyWithInvalidInitializer.type && textRangeContainsPositionInclusive(propertyWithInvalidInitializer.type, errorLocation.pos) ? Diagnostics.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor : Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, @@ -44476,7 +44831,7 @@ function createTypeChecker(host) { if (!result) { if (nameNotFoundMessage) { addLazyDiagnostic(() => { - if (!errorLocation || errorLocation.parent.kind !== 330 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 + if (!errorLocation || errorLocation.parent.kind !== 331 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 !checkAndReportErrorForInvalidInitializer() && !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingNamespaceAsTypeOrValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { let suggestion; let suggestedLib; @@ -44530,7 +44885,7 @@ function createTypeChecker(host) { checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } - if (result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(originalLocation.flags & 8388608 /* JSDoc */)) { + if (result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(originalLocation.flags & 16777216 /* JSDoc */)) { const merged = getMergedSymbol(result); if (length(merged.declarations) && every(merged.declarations, (d) => isNamespaceExportDeclaration(d) || isSourceFile(d) && !!d.symbol.globalExports)) { errorOrSuggestion(!compilerOptions.allowUmdGlobalAccess, errorLocation, Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, unescapeLeadingUnderscores(name)); @@ -44548,7 +44903,7 @@ function createTypeChecker(host) { if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */); if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 279 /* NamespaceExport */ ? 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 message = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? 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 unescapedName = unescapeLeadingUnderscores(name); addTypeOnlyDeclarationRelatedInfo( error(errorLocation, message, unescapedName), @@ -44568,14 +44923,14 @@ function createTypeChecker(host) { diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 279 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 218 /* ArrowFunction */ && location.kind !== 217 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 171 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 219 /* ArrowFunction */ && location.kind !== 218 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 172 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -44587,12 +44942,12 @@ function createTypeChecker(host) { } function isSelfReferenceLocation(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 266 /* ModuleDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 267 /* ModuleDeclaration */: return true; default: return false; @@ -44604,7 +44959,7 @@ function createTypeChecker(host) { function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 167 /* TypeParameter */) { + if (decl.kind === 168 /* TypeParameter */) { const parent = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -44665,9 +45020,9 @@ function createTypeChecker(host) { function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -44735,7 +45090,7 @@ function createTypeChecker(host) { return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 280 /* ExportSpecifier */) { + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 281 /* ExportSpecifier */) { error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } @@ -44762,7 +45117,7 @@ function createTypeChecker(host) { /*isUse*/ false )); - const allFlags = symbol && getAllSymbolFlags(symbol); + const allFlags = symbol && getSymbolFlags(symbol); if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) { const rawName = unescapeLeadingUnderscores(name); if (isES2015OrLaterConstructorName(name)) { @@ -44859,11 +45214,11 @@ function createTypeChecker(host) { return; } const declaration = (_a = result.declarations) == null ? void 0 : _a.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 265 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 266 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); - if (!(declaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { + if (!(declaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { let diagnosticMessage; const declarationName = declarationNameToString(getNameOfDeclaration(declaration)); if (result.flags & 2 /* BlockScopedVariable */) { @@ -44886,13 +45241,13 @@ function createTypeChecker(host) { } function getAnyImportSyntax(node) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return node; - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.parent; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.parent; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -44902,7 +45257,7 @@ function createTypeChecker(host) { return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration); } function isAliasSymbolDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 269 /* NamespaceExportDeclaration */ || node.kind === 272 /* ImportClause */ && !!node.name || node.kind === 273 /* NamespaceImport */ || node.kind === 279 /* NamespaceExport */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 280 /* ExportSpecifier */ || node.kind === 276 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 303 /* ShorthandPropertyAssignment */ || node.kind === 302 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 259 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 207 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 304 /* ShorthandPropertyAssignment */ || node.kind === 303 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 260 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -44913,7 +45268,7 @@ function createTypeChecker(host) { const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; } - if (isVariableDeclaration(node) || node.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 283 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -44942,10 +45297,10 @@ function createTypeChecker(host) { false ) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node)); - const isExport = typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */; + const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */; 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 = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; - const name = typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); addRelatedInfo(error(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); } } @@ -45087,15 +45442,15 @@ function createTypeChecker(host) { } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.parent.moduleSpecifier; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -45428,26 +45783,26 @@ function createTypeChecker(host) { } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: - case 259 /* VariableDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 260 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 275 /* ImportSpecifier */: - case 207 /* BindingElement */: + case 276 /* ImportSpecifier */: + case 208 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 276 /* ExportAssignment */: - case 225 /* BinaryExpression */: + case 277 /* ExportAssignment */: + case 226 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return resolveEntityName( node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -45455,10 +45810,10 @@ function createTypeChecker(host) { true, dontRecursivelyResolve ); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -45498,11 +45853,23 @@ function createTypeChecker(host) { } return void 0; } - function getAllSymbolFlags(symbol) { - let flags = symbol.flags; + function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) { + const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol); + const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration); + const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName( + typeOnlyDeclaration.moduleSpecifier, + typeOnlyDeclaration.moduleSpecifier, + /*ignoreErrors*/ + true + ) : resolveAlias(typeOnlyDeclaration.symbol)); + const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0; + let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags; let seenSymbols; while (symbol.flags & 2097152 /* Alias */) { - const target = resolveAlias(symbol); + const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol)); + if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) { + break; + } if (target === unknownSymbol) { return 67108863 /* All */; } @@ -45559,8 +45926,8 @@ function createTypeChecker(host) { return links.typeOnlyDeclaration || void 0; } if (links.typeOnlyDeclaration) { - const resolved = links.typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); - return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; + const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); + return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; } return void 0; } @@ -45571,7 +45938,11 @@ function createTypeChecker(host) { const symbol = getSymbolOfDeclaration(node); const target = resolveAlias(symbol); if (target) { - const markAlias = target === unknownSymbol || getAllSymbolFlags(target) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); + const markAlias = target === unknownSymbol || getSymbolFlags( + symbol, + /*excludeTypeOnlyMeanings*/ + true + ) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -45586,7 +45957,7 @@ function createTypeChecker(host) { if (!node) return Debug.fail(); if (isInternalModuleImportEqualsDeclaration(node)) { - if (getAllSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) { + if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) { checkExpressionCached(node.moduleReference); } } @@ -45602,7 +45973,7 @@ function createTypeChecker(host) { if (entityName.kind === 80 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 165 /* QualifiedName */) { + if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) { return resolveEntityName( entityName, 1920 /* Namespace */, @@ -45611,7 +45982,7 @@ function createTypeChecker(host) { dontResolveAlias ); } else { - Debug.assert(entityName.parent.kind === 270 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 271 /* ImportEqualsDeclaration */); return resolveEntityName( entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -45684,9 +46055,9 @@ function createTypeChecker(host) { if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 165 /* QualifiedName */ || name.kind === 210 /* PropertyAccessExpression */) { - const left = name.kind === 165 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 165 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 166 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) { + const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName( left, namespaceMeaning, @@ -45753,7 +46124,7 @@ function createTypeChecker(host) { Debug.assertNever(name, "Unknown entity name kind."); } Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 276 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 277 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly( getAliasDeclarationFromName(name), symbol, @@ -45783,7 +46154,7 @@ function createTypeChecker(host) { } } function getAssignmentDeclarationLocation(node) { - const typeAlias = findAncestor(node, (node2) => !(isJSDocNode(node2) || node2.flags & 8388608 /* JSDoc */) ? "quit" : isJSDocTypeAlias(node2)); + const typeAlias = findAncestor(node, (node2) => !(isJSDocNode(node2) || node2.flags & 16777216 /* JSDoc */) ? "quit" : isJSDocTypeAlias(node2)); if (typeAlias) { return; } @@ -45846,7 +46217,7 @@ function createTypeChecker(host) { return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0; } function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i; + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; if (startsWith(moduleReference, "@types/")) { const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1; const withoutAtTypePrefix = removePrefix(moduleReference, "@types/"); @@ -45881,8 +46252,11 @@ function createTypeChecker(host) { ); } } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); - error(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); + const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { + const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); + error(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); + } } if (sourceFile.symbol) { if (resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) { @@ -45899,7 +46273,7 @@ function createTypeChecker(host) { if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) { const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration); const overrideClauseHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); - const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_h = overrideClauseHost.assertions) == null ? void 0 : _h.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; + const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_i = overrideClauseHost.assertions) == null ? void 0 : _i.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) { if (findAncestor(location, isImportEqualsDeclaration)) { error(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); @@ -46002,7 +46376,7 @@ function createTypeChecker(host) { error(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference); } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) { const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path)); - const suggestedExt = (_i = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _i[1]; + const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1]; if (suggestedExt) { error( errorNode, @@ -46077,7 +46451,7 @@ function createTypeChecker(host) { var _a; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 311 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 312 /* SourceFile */)) { const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; error(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); return symbol; @@ -46434,12 +46808,12 @@ function createTypeChecker(host) { return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol); } function symbolIsValue(symbol, includeTypeOnlyMembers) { - return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getAllSymbolFlags(symbol) & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol))); + return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */); } function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 175 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -46463,7 +46837,7 @@ function createTypeChecker(host) { function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) { const type = createType(kind); type.intrinsicName = intrinsicName; - type.objectFlags = objectFlags; + type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */; return type; } function createObjectType(objectFlags, symbol) { @@ -46557,11 +46931,11 @@ function createTypeChecker(host) { } } switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const sym = getSymbolOfDeclaration(location); if (result = callback( (sym == null ? void 0 : sym.exports) || emptySymbols, @@ -46574,9 +46948,9 @@ function createTypeChecker(host) { return result; } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: let table; (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -46654,7 +47028,7 @@ function createTypeChecker(host) { return [symbol]; } const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => { - if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 280 /* ExportSpecifier */))) { + if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -46699,9 +47073,9 @@ function createTypeChecker(host) { if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 280 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; - const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; + const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { qualify = true; return true; @@ -46714,10 +47088,10 @@ function createTypeChecker(host) { if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: continue; default: return false; @@ -46853,10 +47227,10 @@ function createTypeChecker(host) { return node && getSymbolOfDeclaration(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -46904,9 +47278,9 @@ function createTypeChecker(host) { } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 185 /* TypeQuery */ || entityName.parent.kind === 232 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 166 /* ComputedPropertyName */) { + if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 165 /* QualifiedName */ || entityName.kind === 210 /* PropertyAccessExpression */ || entityName.parent.kind === 270 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -46972,7 +47346,7 @@ function createTypeChecker(host) { return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 311 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 312 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode( 4 /* Unspecified */, @@ -46989,9 +47363,9 @@ function createTypeChecker(host) { function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 184 /* ConstructorType */ : 183 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 179 /* ConstructSignature */ : 178 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -47093,7 +47467,7 @@ function createTypeChecker(host) { return symbolToExpression(symbol, context, meaning); } function withContext(enclosingDeclaration, flags, tracker, cb) { - Debug.assert(enclosingDeclaration === void 0 || (enclosingDeclaration.flags & 8 /* Synthesized */) === 0); + Debug.assert(enclosingDeclaration === void 0 || (enclosingDeclaration.flags & 16 /* Synthesized */) === 0); const moduleResolverHost = (tracker == null ? void 0 : tracker.trackSymbol) ? tracker.moduleResolverHost : flags & 134217728 /* DoNotIncludeSymbolChain */ ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : void 0; const context = { enclosingDeclaration, @@ -47165,7 +47539,7 @@ function createTypeChecker(host) { } if (type.flags & 64 /* BigInt */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(162 /* BigIntKeyword */); + return factory.createKeywordTypeNode(163 /* BigIntKeyword */); } if (type.flags & 16 /* Boolean */ && !type.aliasSymbol) { context.approximateLength += 7; @@ -47438,11 +47812,13 @@ function createTypeChecker(host) { return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2); } function createMappedTypeNodeFromType(type2) { + var _a2; Debug.assert(!!(type2.flags & 524288 /* Object */)); const readonlyToken = type2.declaration.readonlyToken ? factory.createToken(type2.declaration.readonlyToken.kind) : void 0; const questionToken = type2.declaration.questionToken ? factory.createToken(type2.declaration.questionToken.kind) : void 0; let appropriateConstraintTypeNode; let newTypeVariable; + const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type2) && !(getModifiersTypeFromMappedType(type2).flags & 2 /* Unknown */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && !(getConstraintTypeFromMappedType(type2).flags & 262144 /* TypeParameter */ && ((_a2 = getConstraintOfTypeParameter(getConstraintTypeFromMappedType(type2))) == null ? void 0 : _a2.flags) & 4194304 /* Index */); if (isMappedTypeWithKeyofConstraintDeclaration(type2)) { if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) { const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); @@ -47450,6 +47826,11 @@ function createTypeChecker(host) { newTypeVariable = factory.createTypeReferenceNode(name); } appropriateConstraintTypeNode = factory.createTypeOperatorNode(143 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); + } else if (needsModifierPreservingWrapper) { + const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); + const name = typeParameterToName(newParam, context); + newTypeVariable = factory.createTypeReferenceNode(name); + appropriateConstraintTypeNode = newTypeVariable; } else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context); } @@ -47480,6 +47861,18 @@ function createTypeChecker(host) { result, factory.createKeywordTypeNode(146 /* NeverKeyword */) ); + } else if (needsModifierPreservingWrapper) { + return factory.createConditionalTypeNode( + typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context), + factory.createInferTypeNode(factory.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + factory.cloneNode(newTypeVariable.typeName), + factory.createTypeOperatorNode(143 /* KeyOfKeyword */, typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)) + )), + result, + factory.createKeywordTypeNode(146 /* NeverKeyword */) + ); } return result; } @@ -47531,7 +47924,7 @@ function createTypeChecker(host) { const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method some(symbol.declarations, (declaration) => isStatic(declaration)); const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol - forEach(symbol.declarations, (declaration) => declaration.parent.kind === 311 /* SourceFile */ || declaration.parent.kind === 267 /* ModuleBlock */)); + forEach(symbol.declarations, (declaration) => declaration.parent.kind === 312 /* SourceFile */ || declaration.parent.kind === 268 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && // it is type of the symbol uses itself recursively (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); @@ -47614,12 +48007,12 @@ function createTypeChecker(host) { } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 183 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context); return signatureNode; } } @@ -47659,19 +48052,18 @@ function createTypeChecker(host) { const arity = getTypeReferenceArity(type2); const tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, arity), context); if (tupleConstituentNodes) { - if (type2.target.labeledElementDeclarations) { - for (let i = 0; i < tupleConstituentNodes.length; i++) { - const flags = type2.target.elementFlags[i]; + const { labeledElementDeclarations } = type2.target; + for (let i = 0; i < tupleConstituentNodes.length; i++) { + const flags = type2.target.elementFlags[i]; + const labeledElementDeclaration = labeledElementDeclarations == null ? void 0 : labeledElementDeclarations[i]; + if (labeledElementDeclaration) { tupleConstituentNodes[i] = factory.createNamedTupleMember( flags & 12 /* Variable */ ? factory.createToken(26 /* DotDotDotToken */) : void 0, - factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(type2.target.labeledElementDeclarations[i]))), + factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(labeledElementDeclaration))), flags & 2 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i] ); - } - } else { - for (let i = 0; i < Math.min(arity, tupleConstituentNodes.length); i++) { - const flags = type2.target.elementFlags[i]; + } else { tupleConstituentNodes[i] = flags & 12 /* Variable */ ? factory.createRestTypeNode(flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]) : flags & 2 /* Optional */ ? factory.createOptionalTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]; } } @@ -47805,12 +48197,12 @@ function createTypeChecker(host) { } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 178 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -47894,39 +48286,41 @@ function createTypeChecker(host) { if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); for (const signature of signatures) { - const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 172 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } + if (signatures.length || !optionalToken) { + return; + } + } + let propertyTypeNode; + if (shouldUsePlaceholderForProperty(propertySymbol, context)) { + propertyTypeNode = createElidedInformationPlaceholder(context); } else { - let propertyTypeNode; - if (shouldUsePlaceholderForProperty(propertySymbol, context)) { - propertyTypeNode = createElidedInformationPlaceholder(context); - } else { - if (propertyIsReverseMapped) { - context.reverseMappedStack || (context.reverseMappedStack = []); - context.reverseMappedStack.push(propertySymbol); - } - propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */); - if (propertyIsReverseMapped) { - context.reverseMappedStack.pop(); - } + if (propertyIsReverseMapped) { + context.reverseMappedStack || (context.reverseMappedStack = []); + context.reverseMappedStack.push(propertySymbol); } - const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0; - if (modifiers) { - context.approximateLength += 9; + propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */); + if (propertyIsReverseMapped) { + context.reverseMappedStack.pop(); } - const propertySignature = factory.createPropertySignature( - modifiers, - propertyName, - optionalToken, - propertyTypeNode - ); - typeElements.push(preserveCommentsOn(propertySignature)); } + const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0; + if (modifiers) { + context.approximateLength += 9; + } + const propertySignature = factory.createPropertySignature( + modifiers, + propertyName, + optionalToken, + propertyTypeNode + ); + typeElements.push(preserveCommentsOn(propertySignature)); function preserveCommentsOn(node) { var _a2; - if (some(propertySymbol.declarations, (d) => d.kind === 354 /* JSDocPropertyTag */)) { - const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 354 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) { + const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */); const commentText = getTextOfJSDocComment(d.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -48032,6 +48426,7 @@ function createTypeChecker(host) { ); } function signatureToSignatureDeclarationHelper(signature, kind, context, options) { + var _a; const suppressAny = context.flags & 256 /* SuppressAnyReturnType */; if (suppressAny) context.flags &= ~256 /* SuppressAnyReturnType */; @@ -48081,7 +48476,7 @@ function createTypeChecker(host) { } } } - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 175 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); + const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context); if (thisParameter) { parameters.unshift(thisParameter); @@ -48102,11 +48497,11 @@ function createTypeChecker(host) { } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 184 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 178 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 179 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 172 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodDeclaration */ ? factory.createMethodDeclaration( + const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -48118,25 +48513,25 @@ function createTypeChecker(host) { returnTypeNode, /*body*/ void 0 - ) : kind === 175 /* Constructor */ ? factory.createConstructorDeclaration( + ) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration( modifiers, parameters, /*body*/ void 0 - ) : kind === 176 /* GetAccessor */ ? factory.createGetAccessorDeclaration( + ) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration( modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), parameters, returnTypeNode, /*body*/ void 0 - ) : kind === 177 /* SetAccessor */ ? factory.createSetAccessorDeclaration( + ) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration( modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), parameters, /*body*/ void 0 - ) : kind === 180 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 323 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 183 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 184 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 261 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( + ) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 324 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 262 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -48146,7 +48541,7 @@ function createTypeChecker(host) { returnTypeNode, /*body*/ void 0 - ) : kind === 217 /* FunctionExpression */ ? factory.createFunctionExpression( + ) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression( modifiers, /*asteriskToken*/ void 0, @@ -48155,7 +48550,7 @@ function createTypeChecker(host) { parameters, returnTypeNode, factory.createBlock([]) - ) : kind === 218 /* ArrowFunction */ ? factory.createArrowFunction( + ) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction( modifiers, typeParameters, parameters, @@ -48167,6 +48562,20 @@ function createTypeChecker(host) { if (typeArguments) { node.typeArguments = factory.createNodeArray(typeArguments); } + if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) { + const comment = getTextOfNode( + signature.declaration.parent.parent, + /*includeTrivia*/ + true + ).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n"); + addSyntheticLeadingComment( + node, + 3 /* MultiLineCommentTrivia */, + comment, + /*hasTrailingNewLine*/ + true + ); + } cleanup == null ? void 0 : cleanup(); return node; } @@ -48205,9 +48614,9 @@ function createTypeChecker(host) { return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 168 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 347 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -48217,7 +48626,7 @@ function createTypeChecker(host) { const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(26 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 165 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -48397,11 +48806,11 @@ function createTypeChecker(host) { return top; } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { - let file = getDeclarationOfKind(symbol, 311 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 312 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 311 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 312 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -48881,7 +49290,7 @@ function createTypeChecker(host) { } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 325 /* JSDocNamepathType */) { + if (isJSDocAllType(node) || node.kind === 326 /* JSDocNamepathType */) { return factory.createKeywordTypeNode(133 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { @@ -49045,13 +49454,13 @@ function createTypeChecker(host) { function symbolTableToDeclarationStatements(symbolTable, context, bundled) { const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, - 173 /* MethodDeclaration */, + 174 /* MethodDeclaration */, /*useAccessors*/ true ); const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol( (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), - 172 /* MethodSignature */, + 173 /* MethodSignature */, /*useAccessors*/ false ); @@ -49320,7 +49729,7 @@ function createTypeChecker(host) { if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags); } else { - const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstVariable(symbol) ? 2 /* Const */ : 1 /* Let */; + const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol); let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d)); if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) { @@ -49466,7 +49875,7 @@ function createTypeChecker(host) { if (additionalModifierFlags & 1 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { newModifierFlags |= 1 /* Export */; } - if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 16777216 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { + if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { newModifierFlags |= 2 /* Ambient */; } if (additionalModifierFlags & 1024 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { @@ -49510,8 +49919,8 @@ function createTypeChecker(host) { const baseTypes = getBaseTypes(interfaceType); const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0; const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType)); - const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 178 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 179 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 179 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(96 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( @@ -49528,7 +49937,7 @@ function createTypeChecker(host) { return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */)); } function isTypeOnlyNamespace(symbol) { - return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */)); + return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */)); } function serializeModule(symbol, symbolName2, modifierFlags) { const members = getNamespaceMembersForSerialization(symbol); @@ -49576,7 +49985,7 @@ function createTypeChecker(host) { void 0, factory.createIdentifier(localName), nsBody, - 16 /* Namespace */ + 32 /* Namespace */ ), 0 /* None */); } } @@ -49593,7 +50002,7 @@ function createTypeChecker(host) { function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 261 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 262 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); addResult(setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags); } if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) { @@ -49633,7 +50042,7 @@ function createTypeChecker(host) { void 0, factory.createIdentifier(localName), factory.createModuleBlock([]), - 16 /* Namespace */ + 32 /* Namespace */ ); setParent(fakespace, enclosingDeclaration); fakespace.locals = createSymbolTable(props); @@ -49777,7 +50186,7 @@ function createTypeChecker(host) { [], /*body*/ void 0 - )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 175 /* Constructor */); + )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -49829,8 +50238,8 @@ function createTypeChecker(host) { const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 207 /* BindingElement */: - if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 259 /* VariableDeclaration */) { + case 208 /* BindingElement */: + if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -49856,15 +50265,15 @@ function createTypeChecker(host) { } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); break; - case 303 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 225 /* BinaryExpression */) { + case 304 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 226 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -49887,7 +50296,7 @@ function createTypeChecker(host) { ), modifierFlags); break; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) { serializeMaybeAliasAssignment(symbol); break; @@ -49908,10 +50317,10 @@ function createTypeChecker(host) { ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 272 /* ImportClause */: { + case 273 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -49929,7 +50338,7 @@ function createTypeChecker(host) { ), 0 /* None */); break; } - case 273 /* NamespaceImport */: { + case 274 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -49947,7 +50356,7 @@ function createTypeChecker(host) { ), 0 /* None */); break; } - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: addResult(factory.createExportDeclaration( /*modifiers*/ void 0, @@ -49957,7 +50366,7 @@ function createTypeChecker(host) { factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 275 /* ImportSpecifier */: { + case 276 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -49982,7 +50391,7 @@ function createTypeChecker(host) { ), 0 /* None */); break; } - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -49990,12 +50399,12 @@ function createTypeChecker(host) { specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 225 /* BinaryExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 226 /* BinaryExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -50102,7 +50511,7 @@ function createTypeChecker(host) { void 0, serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled) ) - ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 266 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) + ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) ); addResult( statement, @@ -50475,10 +50884,10 @@ function createTypeChecker(host) { return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 267 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 268 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 311 /* SourceFile */ || isAmbientModule(location); + return location.kind === 312 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -50526,17 +50935,17 @@ function createTypeChecker(host) { if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 259 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 260 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 230 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 231 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -50553,66 +50962,66 @@ function createTypeChecker(host) { return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: - case 346 /* JSDocEnumTag */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 347 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 261 /* FunctionDeclaration */: - case 265 /* EnumDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 262 /* FunctionDeclaration */: + case 266 /* EnumDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 270 /* ImportEqualsDeclaration */ && parent.kind !== 311 /* SourceFile */ && parent.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlagsCached(node) & 1 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent.kind !== 312 /* SourceFile */ && parent.flags & 33554432 /* Ambient */)) { return isGlobalSourceFile(parent); } return isDeclarationVisible(parent); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 175 /* Constructor */: - case 179 /* ConstructSignature */: - case 178 /* CallSignature */: - case 180 /* IndexSignature */: - case 168 /* Parameter */: - case 267 /* ModuleBlock */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 186 /* TypeLiteral */: - case 182 /* TypeReference */: - case 187 /* ArrayType */: - case 188 /* TupleType */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: + case 176 /* Constructor */: + case 180 /* ConstructSignature */: + case 179 /* CallSignature */: + case 181 /* IndexSignature */: + case 169 /* Parameter */: + case 268 /* ModuleBlock */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 187 /* TypeLiteral */: + case 183 /* TypeReference */: + case 188 /* ArrayType */: + case 189 /* TupleType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: return false; - case 167 /* TypeParameter */: - case 311 /* SourceFile */: - case 269 /* NamespaceExportDeclaration */: + case 168 /* TypeParameter */: + case 312 /* SourceFile */: + case 270 /* NamespaceExportDeclaration */: return true; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return false; default: return false; @@ -50621,7 +51030,7 @@ function createTypeChecker(host) { } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 276 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 277 /* ExportAssignment */) { exportSymbol = resolveName( node, node.escapedText, @@ -50632,7 +51041,7 @@ function createTypeChecker(host) { /*isUse*/ false ); - } else if (node.parent.kind === 280 /* ExportSpecifier */) { + } else if (node.parent.kind === 281 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -50736,12 +51145,12 @@ function createTypeChecker(host) { function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 259 /* VariableDeclaration */: - case 260 /* VariableDeclarationList */: - case 275 /* ImportSpecifier */: - case 274 /* NamedImports */: - case 273 /* NamespaceImport */: - case 272 /* ImportClause */: + case 260 /* VariableDeclaration */: + case 261 /* VariableDeclarationList */: + case 276 /* ImportSpecifier */: + case 275 /* NamedImports */: + case 274 /* NamespaceImport */: + case 273 /* ImportClause */: return false; default: return true; @@ -50760,6 +51169,17 @@ function createTypeChecker(host) { var _a; return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType; } + function getTypeOfPropertyOrIndexSignatureOfType(type, name) { + var _a; + let propType; + return getTypeOfPropertyOfType(type, name) || (propType = (_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) && addOptionality( + propType, + /*isProperty*/ + true, + /*isOptional*/ + true + ); + } function isTypeAny(type) { return type && (type.flags & 1 /* Any */) !== 0; } @@ -50859,23 +51279,23 @@ function createTypeChecker(host) { function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return ancestor.initializer; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent = node.parent; - if (node.kind === 207 /* BindingElement */ && parent.kind === 205 /* ObjectBindingPattern */) { + if (node.kind === 208 /* BindingElement */ && parent.kind === 206 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 302 /* PropertyAssignment */ || node.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent.elements.indexOf(node); @@ -50894,13 +51314,13 @@ function createTypeChecker(host) { return parentType; } const pattern = declaration.parent; - if (strictNullChecks && declaration.flags & 16777216 /* Ambient */ && isParameterDeclaration(declaration)) { + if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isParameterDeclaration(declaration)) { parentType = getNonNullableType(parentType); } else if (strictNullChecks && pattern.parent.initializer && !(getTypeFacts(getTypeOfInitializer(pattern.parent.initializer)) & 65536 /* EQUndefined */)) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 205 /* ObjectBindingPattern */) { + if (pattern.kind === 206 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { @@ -50964,13 +51384,13 @@ function createTypeChecker(host) { /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 208 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, isProperty = false, isOptional = true) { return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type; } function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) { - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression( declaration.parent.parent.expression, /*checkMode*/ @@ -50978,7 +51398,7 @@ function createTypeChecker(host) { ))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -50997,8 +51417,8 @@ function createTypeChecker(host) { if (declaredType) { return addOptionality(declaredType, isProperty, isOptional); } - if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlags(declaration) & 1 /* Export */) && !(declaration.flags & 16777216 /* Ambient */)) { - if (!(getCombinedNodeFlags(declaration) & 2 /* Const */) && (!declaration.initializer || isNullOrUndefined2(declaration.initializer))) { + if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 1 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { + if (!(getCombinedNodeFlagsCached(declaration) & 6 /* Constant */) && (!declaration.initializer || isNullOrUndefined2(declaration.initializer))) { return autoType; } if (declaration.initializer && isEmptyArrayLiteral2(declaration.initializer)) { @@ -51007,8 +51427,8 @@ function createTypeChecker(host) { } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 177 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 176 /* GetAccessor */); + if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 177 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -51082,7 +51502,7 @@ function createTypeChecker(host) { const links = getSymbolLinks(symbol); if (links.isConstructorDeclaredProperty === void 0) { links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 211 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( /*declaredType*/ void 0, declaration, @@ -51110,7 +51530,7 @@ function createTypeChecker(host) { /*includeClassComputedPropertyName*/ false ); - if (container && (container.kind === 175 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -51225,7 +51645,7 @@ function createTypeChecker(host) { false, definedInMethod && !definedInConstructor )); - if (symbol.valueDeclaration && filterType(widened, (t) => !!(t.flags & ~98304 /* Nullable */)) === neverType) { + if (symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && filterType(widened, (t) => !!(t.flags & ~98304 /* Nullable */)) === neverType) { reportImplicitAny(symbol.valueDeclaration, anyType); return anyType; } @@ -51390,7 +51810,7 @@ function createTypeChecker(host) { /*includeClassComputedPropertyName*/ false ); - return thisContainer.kind === 175 /* Constructor */ || thisContainer.kind === 261 /* FunctionDeclaration */ || thisContainer.kind === 217 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 262 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -51464,7 +51884,7 @@ function createTypeChecker(host) { function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 207 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -51480,7 +51900,7 @@ function createTypeChecker(host) { return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 205 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration( @@ -51521,7 +51941,7 @@ function createTypeChecker(host) { } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 168 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -51595,7 +52015,7 @@ function createTypeChecker(host) { return reportCircularityError(symbol); } let type; - if (declaration.kind === 276 /* ExportAssignment */) { + if (declaration.kind === 277 /* ExportAssignment */) { type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) { type = getWidenedTypeForAssignmentDeclaration(symbol); @@ -51636,13 +52056,13 @@ function createTypeChecker(host) { function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -51667,9 +52087,9 @@ function createTypeChecker(host) { if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 176 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration( accessor, /*reportErrors*/ @@ -51707,7 +52127,7 @@ function createTypeChecker(host) { if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { @@ -51747,7 +52167,7 @@ function createTypeChecker(host) { const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 225 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 225 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 226 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 226 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -51789,7 +52209,7 @@ function createTypeChecker(host) { true ); const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0); - links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getAllSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; + links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; } return links.type; } @@ -51811,7 +52231,7 @@ function createTypeChecker(host) { ); return errorType; } - if (noImplicitAny && (declaration.kind !== 168 /* Parameter */ || declaration.initializer)) { + if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { error( symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, @@ -51925,43 +52345,43 @@ function createTypeChecker(host) { return void 0; } switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 323 /* JSDocFunctionType */: - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 264 /* TypeAliasDeclaration */: - case 351 /* JSDocTemplateTag */: - case 352 /* JSDocTypedefTag */: - case 346 /* JSDocEnumTag */: - case 344 /* JSDocCallbackTag */: - case 199 /* MappedType */: - case 193 /* ConditionalType */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 324 /* JSDocFunctionType */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 265 /* TypeAliasDeclaration */: + case 352 /* JSDocTemplateTag */: + case 353 /* JSDocTypedefTag */: + case 347 /* JSDocEnumTag */: + case 345 /* JSDocCallbackTag */: + case 200 /* MappedType */: + case 194 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 199 /* MappedType */) { + if (node.kind === 200 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))); - } else if (node.kind === 193 /* ConditionalType */) { + } else if (node.kind === 194 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */ || node.kind === 263 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; + const thisType = includeThisTypes && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || node.kind === 264 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 326 /* JSDoc */: { + case 327 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -51971,14 +52391,14 @@ function createTypeChecker(host) { function getOuterTypeParametersOfClassOrInterface(symbol) { var _a; const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a = symbol.declarations) == null ? void 0 : _a.find((decl) => { - if (decl.kind === 263 /* InterfaceDeclaration */) { + if (decl.kind === 264 /* InterfaceDeclaration */) { return true; } - if (decl.kind !== 259 /* VariableDeclaration */) { + if (decl.kind !== 260 /* VariableDeclaration */) { return false; } const initializer = decl.initializer; - return !!initializer && (initializer.kind === 217 /* FunctionExpression */ || initializer.kind === 218 /* ArrowFunction */); + return !!initializer && (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 219 /* ArrowFunction */); }); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); @@ -51989,7 +52409,7 @@ function createTypeChecker(host) { } let result; for (const node of symbol.declarations) { - if (node.kind === 263 /* InterfaceDeclaration */ || node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -52127,7 +52547,7 @@ function createTypeChecker(host) { } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 262 /* ClassDeclaration */ || declaration.kind === 263 /* InterfaceDeclaration */) { + if (declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 264 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -52216,7 +52636,7 @@ function createTypeChecker(host) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 263 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 264 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -52244,8 +52664,8 @@ function createTypeChecker(host) { return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 263 /* InterfaceDeclaration */) { - if (declaration.flags & 128 /* ContainsThis */) { + if (declaration.kind === 264 /* InterfaceDeclaration */) { + if (declaration.flags & 256 /* ContainsThis */) { return false; } const baseTypeNodes = getInterfaceBaseTypeNodes(declaration); @@ -52316,7 +52736,7 @@ function createTypeChecker(host) { } } else { type = errorType; - if (declaration.kind === 346 /* JSDocEnumTag */) { + if (declaration.kind === 347 /* JSDocEnumTag */) { error(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } else { error(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); @@ -52335,7 +52755,7 @@ function createTypeChecker(host) { const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 265 /* EnumDeclaration */) { + if (declaration.kind === 266 /* EnumDeclaration */) { for (const member of declaration.members) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); @@ -52420,18 +52840,18 @@ function createTypeChecker(host) { case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: case 151 /* ObjectKeyword */: case 116 /* VoidKeyword */: case 157 /* UndefinedKeyword */: case 146 /* NeverKeyword */: - case 200 /* LiteralType */: + case 201 /* LiteralType */: return true; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return isThislessType(node.elementType); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -52447,21 +52867,21 @@ function createTypeChecker(host) { function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 175 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); } function isThisless(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { const declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -52504,9 +52924,6 @@ function createTypeChecker(host) { } return type; } - function isTypeUsableAsPropertyName(type) { - return !!(type.flags & 8576 /* StringOrNumberLiteralOrUnique */); - } function isLateBindableName(node) { if (!isComputedPropertyName(node) && !isElementAccessExpression(node)) { return false; @@ -52527,15 +52944,6 @@ function createTypeChecker(host) { function isNonBindableDynamicName(node) { return isDynamicName(node) && !isLateBindableName(node); } - function getPropertyNameFromType(type) { - if (type.flags & 8192 /* UniqueESSymbol */) { - return type.escapedName; - } - if (type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { - return escapeLeadingUnderscores("" + type.value); - } - return Debug.fail(); - } function addDeclarationToLateBoundSymbol(symbol, member, symbolFlags) { Debug.assert(!!(getCheckFlags(symbol) & 4096 /* Late */), "Expected a late-bound symbol."); symbol.flags |= symbolFlags; @@ -52585,6 +52993,7 @@ function createTypeChecker(host) { return links.resolvedSymbol; } function getResolvedMembersOrExportsOfSymbol(symbol, resolutionKind) { + var _a, _b, _c; const links = getSymbolLinks(symbol); if (!links[resolutionKind]) { const isStatic2 = resolutionKind === "resolvedExports" /* resolvedExports */; @@ -52603,7 +53012,7 @@ function createTypeChecker(host) { } } } - const assignments = symbol.assignmentDeclarationMembers; + const assignments = (((_a = symbol.valueDeclaration) == null ? void 0 : _a.kind) === 219 /* ArrowFunction */ || ((_b = symbol.valueDeclaration) == null ? void 0 : _b.kind) === 218 /* FunctionExpression */) && ((_c = getSymbolOfNode(symbol.valueDeclaration.parent)) == null ? void 0 : _c.assignmentDeclarationMembers) || symbol.assignmentDeclarationMembers; if (assignments) { const decls = arrayFrom(assignments.values()); for (const member of decls) { @@ -52732,7 +53141,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, sig.minArgumentCount, - sig.flags & 39 /* PropagatingFlags */ + sig.flags & 167 /* PropagatingFlags */ ); result.target = sig.target; result.mapper = sig.mapper; @@ -52770,17 +53179,18 @@ function createTypeChecker(host) { function getExpandedParameters(sig, skipUnionExpanding) { if (signatureHasRestParameter(sig)) { const restIndex = sig.parameters.length - 1; + const restName = sig.parameters[restIndex].escapedName; const restType = getTypeOfSymbol(sig.parameters[restIndex]); if (isTupleType(restType)) { - return [expandSignatureParametersWithTupleMembers(restType, restIndex)]; + return [expandSignatureParametersWithTupleMembers(restType, restIndex, restName)]; } else if (!skipUnionExpanding && restType.flags & 1048576 /* Union */ && every(restType.types, isTupleType)) { - return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex)); + return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex, restName)); } } return [sig.parameters]; - function expandSignatureParametersWithTupleMembers(restType, restIndex) { - const elementTypes = getElementTypes(restType); - const associatedNames = getUniqAssociatedNamesFromTupleType(restType); + function expandSignatureParametersWithTupleMembers(restType, restIndex, restName) { + const elementTypes = getTypeArguments(restType); + const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restName); const restParams = map(elementTypes, (t, i) => { const name = associatedNames && associatedNames[i] ? associatedNames[i] : getParameterNameAtPosition(sig, restIndex + i, restType); const flags = restType.target.elementFlags[i]; @@ -52791,10 +53201,10 @@ function createTypeChecker(host) { }); return concatenate(sig.parameters.slice(0, restIndex), restParams); } - function getUniqAssociatedNamesFromTupleType(type) { + function getUniqAssociatedNamesFromTupleType(type, restName) { const associatedNamesMap = /* @__PURE__ */ new Map(); - return map(type.target.labeledElementDeclarations, (labeledElement) => { - const name = getTupleElementLabel(labeledElement); + return map(type.target.labeledElementDeclarations, (labeledElement, i) => { + const name = getTupleElementLabel(labeledElement, i, restName); const prevCounter = associatedNamesMap.get(name); if (prevCounter === void 0) { associatedNamesMap.set(name, 1); @@ -53032,7 +53442,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, minArgCount, - (left.flags | right.flags) & 39 /* PropagatingFlags */ + (left.flags | right.flags) & 167 /* PropagatingFlags */ ); result.compositeKind = 1048576 /* Union */; result.compositeSignatures = concatenate(left.compositeKind !== 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); @@ -53180,20 +53590,17 @@ function createTypeChecker(host) { setStructuredTypeMembers(type, members2, callSignatures, constructSignatures, indexInfos2); return; } - let members = emptySymbols; + let members = getExportsOfSymbol(symbol); let indexInfos; - if (symbol.exports) { - members = getExportsOfSymbol(symbol); - if (symbol === globalThisSymbol) { - const varsOnly = /* @__PURE__ */ new Map(); - members.forEach((p) => { - var _a; - if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) { - varsOnly.set(p.escapedName, p); - } - }); - members = varsOnly; - } + if (symbol === globalThisSymbol) { + const varsOnly = /* @__PURE__ */ new Map(); + members.forEach((p) => { + var _a; + if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) { + varsOnly.set(p.escapedName, p); + } + }); + members = varsOnly; } let baseConstructorIndexInfo; setStructuredTypeMembers(type, members, emptyArray, emptyArray, emptyArray); @@ -53242,7 +53649,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, sig.minArgumentCount, - sig.flags & 39 /* PropagatingFlags */ + sig.flags & 167 /* PropagatingFlags */ ) : void 0 )); } @@ -53438,7 +53845,7 @@ function createTypeChecker(host) { } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 197 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; + return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -53593,9 +54000,9 @@ function createTypeChecker(host) { function getConstraintOfTypeParameter(typeParameter) { return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0; } - function isConstTypeVariable(type) { + function isConstTypeVariable(type, depth = 0) { var _a; - return !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, isConstTypeVariable) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type)) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0)); + return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); } function getConstraintOfIndexedAccess(type) { return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0; @@ -54152,7 +54559,35 @@ function createTypeChecker(host) { return emptyArray; } function getSignaturesOfType(type, kind) { - return getSignaturesOfStructuredType(getReducedApparentType(type), kind); + const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind); + if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) { + if (type.arrayFallbackSignatures) { + return type.arrayFallbackSignatures; + } + let memberName; + if (everyType(type, (t) => { + var _a; + return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName); + })) { + const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper)); + const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent))); + return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind); + } + type.arrayFallbackSignatures = result; + } + return result; + } + function isArrayOrTupleSymbol(symbol) { + if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) { + return false; + } + return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); + } + function isReadonlyArraySymbol(symbol) { + if (!symbol || !globalReadonlyArrayType.symbol) { + return false; + } + return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); } function findIndexInfo(indexInfos, keyType) { return find(indexInfos, (info) => info.keyType === keyType); @@ -54331,7 +54766,7 @@ function createTypeChecker(host) { } else { parameters.push(paramSymbol); } - if (type && type.kind === 200 /* LiteralType */) { + if (type && type.kind === 201 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -54339,8 +54774,8 @@ function createTypeChecker(host) { minArgumentCount = parameters.length; } } - if ((declaration.kind === 176 /* GetAccessor */ || declaration.kind === 177 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter || !thisParameter)) { - const otherKind = declaration.kind === 176 /* GetAccessor */ ? 177 /* SetAccessor */ : 176 /* GetAccessor */; + if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter || !thisParameter)) { + const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); @@ -54431,15 +54866,15 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - return node.name.kind === 166 /* ComputedPropertyName */ && traverse(node.name); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name); + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return traverse(node.expression); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -54526,7 +54961,7 @@ function createTypeChecker(host) { function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 196 /* ThisType */ ? createTypePredicate( + return parameterName.kind === 197 /* ThisType */ ? createTypePredicate( node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, /*parameterName*/ void 0, @@ -54576,7 +55011,7 @@ function createTypeChecker(host) { return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 175 /* Constructor */) { + if (declaration.kind === 176 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } const typeNode = getEffectiveReturnTypeNode(declaration); @@ -54592,12 +55027,12 @@ function createTypeChecker(host) { if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 176 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 177 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 178 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -54606,7 +55041,7 @@ function createTypeChecker(host) { return getReturnTypeOfTypeTag(declaration); } function isResolvingReturnTypeOfSignature(signature) { - return !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0; + return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0; } function getRestTypeOfSignature(signature) { return tryGetRestTypeOfSignature(signature) || anyType; @@ -54700,7 +55135,7 @@ function createTypeChecker(host) { var _a; if (!signature.isolatedSignatureType) { const kind = (_a = signature.declaration) == null ? void 0 : _a.kind; - const isConstructor = kind === void 0 || kind === 175 /* Constructor */ || kind === 179 /* ConstructSignature */ || kind === 184 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -54759,9 +55194,9 @@ function createTypeChecker(host) { let inferences; if ((_a = typeParameter.symbol) == null ? void 0 : _a.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 194 /* InferType */) { + if (declaration.parent.kind === 195 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 182 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference); if (typeParameters) { @@ -54779,13 +55214,13 @@ function createTypeChecker(host) { } } } - } else if (grandParent.kind === 168 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 190 /* RestType */ || grandParent.kind === 201 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 203 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 167 /* TypeParameter */ && grandParent.parent.kind === 199 /* MappedType */) { + } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 199 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 193 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 199 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -54810,7 +55245,7 @@ function createTypeChecker(host) { } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 199 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -54819,7 +55254,7 @@ function createTypeChecker(host) { return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 167 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -54904,7 +55339,7 @@ function createTypeChecker(host) { return ((_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 182 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 187 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { @@ -54943,7 +55378,7 @@ function createTypeChecker(host) { return errorType; } } - if (node.kind === 182 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference( type, node, @@ -55034,9 +55469,9 @@ function createTypeChecker(host) { } function getTypeReferenceName(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -55048,10 +55483,10 @@ function createTypeChecker(host) { return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 165 /* QualifiedName */ ? name.right : name.kind === 210 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 165 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 210 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -55103,7 +55538,7 @@ function createTypeChecker(host) { const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 204 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -55131,7 +55566,7 @@ function createTypeChecker(host) { return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 188 /* TupleType */ && node.elements.length === 1; + return node.kind === 189 /* TupleType */ && node.elements.length === 1; } function getImpliedConstraint(type, checkNode, extendsNode) { return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0; @@ -55139,17 +55574,17 @@ function createTypeChecker(host) { function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 326 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 327 /* JSDoc */) { const parent = node.parent; - if (parent.kind === 168 /* Parameter */) { + if (parent.kind === 169 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent.kind === 193 /* ConditionalType */ && node === parent.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent.kind === 194 /* ConditionalType */ && node === parent.trueType) { const constraint = getImpliedConstraint(type, parent.checkType, parent.extendsType); if (constraint) { constraints = append(constraints, constraint); } - } else if (type.flags & 262144 /* TypeParameter */ && parent.kind === 199 /* MappedType */ && node === parent.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent.kind === 200 /* MappedType */ && node === parent.type) { const mappedType = getTypeFromTypeNode(parent); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -55166,7 +55601,7 @@ function createTypeChecker(host) { return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 182 /* TypeReference */ || node.kind === 204 /* ImportType */); + return !!(node.flags & 16777216 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { @@ -55289,9 +55724,9 @@ function createTypeChecker(host) { if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: return declaration; } } @@ -55519,6 +55954,22 @@ function createTypeChecker(host) { reportErrors2 )) || emptyGenericType; } + function getGlobalDisposableType(reportErrors2) { + return deferredGlobalDisposableType || (deferredGlobalDisposableType = getGlobalType( + "Disposable", + /*arity*/ + 0, + reportErrors2 + )) || emptyObjectType; + } + function getGlobalAsyncDisposableType(reportErrors2) { + return deferredGlobalAsyncDisposableType || (deferredGlobalAsyncDisposableType = getGlobalType( + "AsyncDisposable", + /*arity*/ + 0, + reportErrors2 + )) || emptyObjectType; + } function getGlobalTypeOrUndefined(name, arity = 0) { const symbol = getGlobalSymbol( name, @@ -55664,11 +56115,11 @@ function createTypeChecker(host) { } function getTupleElementFlags(node) { switch (node.kind) { - case 189 /* OptionalType */: + case 190 /* OptionalType */: return 2 /* Optional */; - case 190 /* RestType */: + case 191 /* RestType */: return getRestTypeElementFlags(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -55684,60 +56135,57 @@ function createTypeChecker(host) { return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 201 /* NamedTupleMember */); - return getTupleTargetType( - elementFlags, - readonly, - /*associatedNames*/ - missingName ? void 0 : node.elements - ); + return getTupleTargetType(elementFlags, readonly, map(node.elements, memberIfLabeledElementDeclaration)); + } + function memberIfLabeledElementDeclaration(member) { + return isNamedTupleMember(member) || isParameter(member) ? member : void 0; } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 187 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 188 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent = node.parent; switch (parent.kind) { - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: - case 182 /* TypeReference */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 198 /* IndexedAccessType */: - case 193 /* ConditionalType */: - case 197 /* TypeOperator */: - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: + case 183 /* TypeReference */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 199 /* IndexedAccessType */: + case 194 /* ConditionalType */: + case 198 /* TypeOperator */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return isResolvedByTypeAlias(parent); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return true; - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 195 /* ParenthesizedType */: - case 189 /* OptionalType */: - case 201 /* NamedTupleMember */: - case 322 /* JSDocOptionalType */: - case 320 /* JSDocNullableType */: - case 321 /* JSDocNonNullableType */: - case 315 /* JSDocTypeExpression */: + case 196 /* ParenthesizedType */: + case 190 /* OptionalType */: + case 202 /* NamedTupleMember */: + case 323 /* JSDocOptionalType */: + case 321 /* JSDocNullableType */: + case 322 /* JSDocNonNullableType */: + case 316 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 190 /* RestType */: - return node.type.kind !== 187 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 191 /* RestType */: + return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 192 /* UnionType */: + case 193 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -55748,15 +56196,15 @@ function createTypeChecker(host) { const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 188 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 188 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( + } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( target, node, /*mapper*/ void 0 ); } else { - const elementTypes = node.kind === 187 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } @@ -55765,7 +56213,7 @@ function createTypeChecker(host) { function isReadonlyTypeOperator(node) { return isTypeOperatorNode(node) && node.operator === 148 /* ReadonlyKeyword */; } - function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations) { + function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations = []) { const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, (_) => 1 /* Required */), readonly, namedMemberDeclarations); return tupleTarget === emptyGenericType ? emptyObjectType : elementTypes.length ? createNormalizedTypeReference(tupleTarget, elementTypes) : tupleTarget; } @@ -55773,7 +56221,8 @@ function createTypeChecker(host) { if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) { return readonly ? globalReadonlyArrayType : globalArrayType; } - const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (namedMemberDeclarations && namedMemberDeclarations.length ? "," + map(namedMemberDeclarations, getNodeId).join(",") : ""); + const memberIds = mapDefined(namedMemberDeclarations, (node) => node ? getNodeId(node) : void 0); + const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : ""); let type = tupleTypes.get(key); if (!type) { tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations)); @@ -55855,7 +56304,7 @@ function createTypeChecker(host) { } const expandedTypes = []; const expandedFlags = []; - let expandedDeclarations = []; + const expandedDeclarations = []; let lastRequiredIndex = -1; let firstRestIndex = -1; let lastOptionalOrRestIndex = -1; @@ -55893,7 +56342,7 @@ function createTypeChecker(host) { )); expandedTypes.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedFlags.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); - expandedDeclarations == null ? void 0 : expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); + expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); } const tupleTarget = getTupleTargetType(expandedFlags, target.readonly, expandedDeclarations); return tupleTarget === emptyGenericType ? emptyObjectType : expandedFlags.length ? createTypeReference(tupleTarget, expandedTypes) : tupleTarget; @@ -55913,11 +56362,7 @@ function createTypeChecker(host) { true ) : type); expandedFlags.push(flags); - if (expandedDeclarations && declaration) { - expandedDeclarations.push(declaration); - } else { - expandedDeclarations = void 0; - } + expandedDeclarations.push(declaration); } } function sliceTupleType(type, index, endSkipCount = 0) { @@ -55944,6 +56389,9 @@ function createTypeChecker(host) { function getEndElementCount(type, flags) { return type.elementFlags.length - findLastIndex(type.elementFlags, (f) => !(f & flags)) - 1; } + function getTotalFixedElementCount(type) { + return type.fixedLength + getEndElementCount(type, 3 /* Fixed */); + } function getElementTypes(type) { const typeArguments = getTypeArguments(type); const arity = getTypeReferenceArity(type); @@ -56794,12 +57242,12 @@ function createTypeChecker(host) { if (isCallLikeExpression(parent)) { return isCallOrNewExpression(parent) && isIdentifier(node) && hasMatchingArgument(parent, node); } - return every(symbol.declarations, (d) => !isFunctionLike(d) || !!(getCombinedNodeFlags(d) & 268435456 /* Deprecated */)); + return every(symbol.declarations, (d) => !isFunctionLike(d) || isDeprecatedDeclaration(d)); } return true; } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { - const accessExpression = accessNode && accessNode.kind === 211 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -56849,10 +57297,7 @@ function createTypeChecker(host) { } if (index >= 0) { errorIfWritingToReadonlyIndex(getIndexInfoOfType(objectType, numberType)); - return mapType(objectType, (t) => { - const restType = getRestTypeOfTupleType(t) || undefinedType; - return accessFlags & 1 /* IncludeUndefined */ ? getUnionType([restType, missingType]) : restType; - }); + return getTupleElementTypeOutOfStartCount(objectType, index, accessFlags & 1 /* IncludeUndefined */ ? missingType : void 0); } } } @@ -56997,7 +57442,7 @@ function createTypeChecker(host) { } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 211 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 198 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 166 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { if (type.flags & 2097152 /* Intersection */) { @@ -57137,7 +57582,7 @@ function createTypeChecker(host) { } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 198 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)) || isGenericReducibleType(objectType))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target)) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target))) || isGenericReducibleType(objectType))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -57242,9 +57687,9 @@ function createTypeChecker(host) { ); if (freshMapper) { const freshCombinedMapper = combineTypeMappers(mapper, freshMapper); - for (const p of freshParams) { - if (root.inferTypeParameters.indexOf(p) === -1) { - p.mapper = freshCombinedMapper; + for (let i = 0; i < freshParams.length; i++) { + if (freshParams[i] !== root.inferTypeParameters[i]) { + freshParams[i].mapper = freshCombinedMapper; } } } @@ -57399,7 +57844,7 @@ function createTypeChecker(host) { links.resolvedSymbol = unknownSymbol; return links.resolvedType = errorType; } - const targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 8388608 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */; + const targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 16777216 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */; const innerModuleSymbol = resolveExternalModuleName(node, node.argument.literal); if (!innerModuleSymbol) { links.resolvedSymbol = unknownSymbol; @@ -57705,7 +58150,7 @@ function createTypeChecker(host) { false ); const parent = container && container.parent; - if (parent && (isClassLike(parent) || parent.kind === 263 /* InterfaceDeclaration */)) { + if (parent && (isClassLike(parent) || parent.kind === 264 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent)).thisType; } @@ -57713,7 +58158,7 @@ function createTypeChecker(host) { if (parent && isObjectLiteralExpression(parent) && isBinaryExpression(parent.parent) && getAssignmentDeclarationKind(parent.parent) === 6 /* Prototype */) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent.parent.left).parent).thisType; } - const host2 = node.flags & 8388608 /* JSDoc */ ? getHostSignatureFromJSDoc(node) : void 0; + const host2 = node.flags & 16777216 /* JSDoc */ ? getHostSignatureFromJSDoc(node) : void 0; if (host2 && isFunctionExpression(host2) && isBinaryExpression(host2.parent) && getAssignmentDeclarationKind(host2.parent) === 3 /* PrototypeProperty */) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(host2.parent.left).parent).thisType; } @@ -57735,17 +58180,17 @@ function createTypeChecker(host) { } function getArrayElementTypeNode(node) { switch (node.kind) { - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 188 /* TupleType */: + case 189 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 190 /* RestType */ || node.kind === 201 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return node.elementType; } return void 0; @@ -57765,8 +58210,8 @@ function createTypeChecker(host) { function getTypeFromTypeNodeWorker(node) { switch (node.kind) { case 133 /* AnyKeyword */: - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: return anyType; case 159 /* UnknownKeyword */: return unknownType; @@ -57774,7 +58219,7 @@ function createTypeChecker(host) { return stringType; case 150 /* NumberKeyword */: return numberType; - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: return bigintType; case 136 /* BooleanKeyword */: return booleanType; @@ -57789,69 +58234,69 @@ function createTypeChecker(host) { case 146 /* NeverKeyword */: return neverType; case 151 /* ObjectKeyword */: - return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; + return node.flags & 524288 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; case 141 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 196 /* ThisType */: + case 197 /* ThisType */: case 110 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return getTypeFromTypeReference(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 189 /* OptionalType */: + case 190 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 191 /* UnionType */: + case 192 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 195 /* ParenthesizedType */: - case 321 /* JSDocNonNullableType */: - case 315 /* JSDocTypeExpression */: + case 196 /* ParenthesizedType */: + case 322 /* JSDocNonNullableType */: + case 316 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 190 /* RestType */: + case 191 /* RestType */: return getTypeFromRestTypeNode(node); - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 194 /* InferType */: + case 195 /* InferType */: return getTypeFromInferTypeNode(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return getTypeFromImportTypeNode(node); case 80 /* Identifier */: - case 165 /* QualifiedName */: - case 210 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -57987,7 +58432,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, signature.minArgumentCount, - signature.flags & 39 /* PropagatingFlags */ + signature.flags & 167 /* PropagatingFlags */ ); result.target = signature; result.mapper = mapper; @@ -58049,26 +58494,31 @@ function createTypeChecker(host) { if (!result) { const newMapper = createTypeMapper(typeParameters, typeArguments); result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); - if (result.flags & 138117121 /* ObjectFlagsType */ && !(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { + target.instantiations.set(id, result); + const resultObjectFlags = getObjectFlags(result); + if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables); - if (!(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { - result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0); + if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) { + if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) { + result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0); + } else { + result.objectFlags |= !resultCouldContainTypeVariables ? 524288 /* CouldContainTypeVariablesComputed */ : 0; + } } } - target.instantiations.set(id, result); } return result; } return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 182 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 204 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); } function isTypeParameterPossiblyReferenced(tp, node) { if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { const container = tp.symbol.declarations[0].parent; for (let n = node; n !== container; n = n.parent) { - if (!n || n.kind === 240 /* Block */ || n.kind === 193 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 241 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -58077,17 +58527,17 @@ function createTypeChecker(host) { return true; function containsReference(node2) { switch (node2.kind) { - case 196 /* ThisType */: + case 197 /* ThisType */: return !!tp.isThisType; case 80 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); if (!isThisIdentifier(firstIdentifier)) { const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; - const tpScope = tpDeclaration.kind === 167 /* TypeParameter */ ? tpDeclaration.parent : ( + const tpScope = tpDeclaration.kind === 168 /* TypeParameter */ ? tpDeclaration.parent : ( // Type parameter is a regular type parameter, e.g. foo tp.isThisType ? tpDeclaration : ( // Type parameter is the this type, and its declaration is the class declaration. @@ -58099,8 +58549,8 @@ function createTypeChecker(host) { } } return true; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -58150,6 +58600,9 @@ function createTypeChecker(host) { const elementFlags = tupleType.target.elementFlags; const elementTypes = map(getElementTypes(tupleType), (t, i) => { const singleton = elementFlags[i] & 8 /* Variadic */ ? t : elementFlags[i] & 4 /* Rest */ ? createArrayType(t) : createTupleType([t], [elementFlags[i]]); + if (singleton === typeVariable) { + return mappedType; + } return instantiateMappedType(mappedType, prependTypeMapping(typeVariable, singleton, mapper)); }); const newReadonly = getModifiedReadonlyState(tupleType.target.readonly, getMappedTypeModifiers(mappedType)); @@ -58353,32 +58806,32 @@ function createTypeChecker(host) { return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 290 /* JsxAttribute */: { + case 291 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 293 /* JsxExpression */: { + case 294 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -58392,7 +58845,7 @@ function createTypeChecker(host) { if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) { return false; } - if (node.body.kind !== 240 /* Block */) { + if (node.body.kind !== 241 /* Block */) { return isContextSensitive(node.body); } return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression)); @@ -58487,23 +58940,27 @@ function createTypeChecker(host) { return true; } switch (node.kind) { - case 293 /* JsxExpression */: - case 216 /* ParenthesizedExpression */: + case 234 /* AsExpression */: + if (!isConstAssertion(node)) { + break; + } + case 294 /* JsxExpression */: + case 217 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 28 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -58803,16 +59260,16 @@ function createTypeChecker(host) { } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return { errorNode: child, innerExpression: child.expression, nameType }; case 12 /* JsxText */: if (child.containsOnlyTriviaWhiteSpaces) { break; } return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() }; - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -58962,13 +59419,13 @@ function createTypeChecker(host) { continue; } switch (prop.kind) { - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: - case 173 /* MethodDeclaration */: - case 303 /* ShorthandPropertyAssignment */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: + case 174 /* MethodDeclaration */: + case 304 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; break; default: @@ -59043,7 +59500,7 @@ function createTypeChecker(host) { void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 173 /* MethodDeclaration */ && kind !== 172 /* MethodSignature */ && kind !== 175 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -59362,6 +59819,7 @@ function createTypeChecker(host) { let errorInfo; let relatedInfo; let maybeKeys; + let maybeKeysSet; let sourceStack; let targetStack; let maybeCount = 0; @@ -60231,9 +60689,13 @@ function createTypeChecker(host) { } if (!maybeKeys) { maybeKeys = []; + maybeKeysSet = /* @__PURE__ */ new Set(); sourceStack = []; targetStack = []; } else { + if (maybeKeysSet.has(id)) { + return 3 /* Maybe */; + } const broadestEquivalentId = id.startsWith("*") ? getRelationKey( source2, target2, @@ -60242,10 +60704,8 @@ function createTypeChecker(host) { /*ignoreConstraints*/ true ) : void 0; - for (let i = 0; i < maybeCount; i++) { - if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) { - return 3 /* Maybe */; - } + if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) { + return 3 /* Maybe */; } if (sourceDepth === 100 || targetDepth === 100) { overflow = true; @@ -60254,6 +60714,7 @@ function createTypeChecker(host) { } const maybeStart = maybeCount; maybeKeys[maybeCount] = id; + maybeKeysSet.add(id); maybeCount++; const saveExpandingFlags = expandingFlags; if (recursionFlags & 1 /* Source */) { @@ -60306,17 +60767,34 @@ function createTypeChecker(host) { if (result2) { if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) { if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) { - for (let i = maybeStart; i < maybeCount; i++) { - relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); - } + resetMaybeStack( + /*markAllAsSucceeded*/ + true + ); + } else { + resetMaybeStack( + /*markAllAsSucceeded*/ + false + ); } - maybeCount = maybeStart; } } else { relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags); - maybeCount = maybeStart; + resetMaybeStack( + /*markAllAsSucceeded*/ + false + ); } return result2; + function resetMaybeStack(markAllAsSucceeded) { + for (let i = maybeStart; i < maybeCount; i++) { + maybeKeysSet.delete(maybeKeys[i]); + if (markAllAsSucceeded) { + relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); + } + } + maybeCount = maybeStart; + } } function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) { const saveErrorInfo = captureErrorCalculationState(); @@ -60728,26 +61206,6 @@ function createTypeChecker(host) { )) { return result2; } - if (sourceFlags & 8388608 /* IndexedAccess */) { - const indexType = source2.indexType; - if (indexType.flags & 4194304 /* Index */) { - const unresolvedIndexConstraint = getBaseConstraintOfType(indexType.type); - const indexConstraint = unresolvedIndexConstraint && unresolvedIndexConstraint !== noConstraintType ? getIndexType(unresolvedIndexConstraint) : keyofConstraintType; - const constraint2 = getIndexedAccessType(source2.objectType, indexConstraint); - if (result2 = isRelatedTo( - constraint2, - target2, - 1 /* Source */, - /*reportErrors*/ - false, - /*headMessage*/ - void 0, - intersectionState - )) { - return result2; - } - } - } if (isMappedTypeGenericIndexedAccess(source2)) { const indexConstraint = getConstraintOfType(source2.indexType); if (indexConstraint) { @@ -61433,7 +61891,7 @@ function createTypeChecker(host) { const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 175 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 175 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString( signature, /*enclosingDeclaration*/ @@ -61719,7 +62177,7 @@ function createTypeChecker(host) { let matched = false; for (let i = 0; i < types.length; i++) { if (include[i]) { - const targetType = getTypeOfPropertyOfType(types[i], propertyName); + const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName); if (targetType && related(getDiscriminatingType(), targetType)) { matched = true; } else { @@ -61733,7 +62191,7 @@ function createTypeChecker(host) { } } } - const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])) : target; + const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i]), 0 /* None */) : target; return filtered.flags & 131072 /* Never */ ? target : filtered; } function isWeakType(type) { @@ -61937,7 +62395,7 @@ function createTypeChecker(host) { } function getRecursionIdentity(type) { if (type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { - if (getObjectFlags(type) && 4 /* Reference */ && type.node) { + if (getObjectFlags(type) & 4 /* Reference */ && type.node) { return type.node; } if (type.symbol && !(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) { @@ -62118,7 +62576,7 @@ function createTypeChecker(host) { const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 210 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) { return void 0; } } @@ -62144,7 +62602,8 @@ function createTypeChecker(host) { return !!elementType && isEmptyLiteralType(elementType); } function isTupleLikeType(type) { - return isTupleType(type) || !!getPropertyOfType(type, "0"); + let lengthType; + return isTupleType(type) || !!getPropertyOfType(type, "0") || isArrayLikeType(type) && !!(lengthType = getTypeOfPropertyOfType(type, "length")) && everyType(lengthType, (t) => !!(t.flags & 256 /* NumberLiteral */)); } function isArrayOrTupleLikeType(type) { return isArrayLikeType(type) || isTupleLikeType(type); @@ -62155,17 +62614,7 @@ function createTypeChecker(host) { return propType; } if (everyType(type, isTupleType)) { - return mapType(type, (t) => { - const tupleType = t; - const restType = getRestTypeOfTupleType(tupleType); - if (!restType) { - return undefinedType; - } - if (compilerOptions.noUncheckedIndexedAccess && index >= tupleType.target.fixedLength + getEndElementCount(tupleType.target, 3 /* Fixed */)) { - return getUnionType([restType, undefinedType]); - } - return restType; - }); + return getTupleElementTypeOutOfStartCount(type, index, compilerOptions.noUncheckedIndexedAccess ? undefinedType : void 0); } return void 0; } @@ -62233,6 +62682,19 @@ function createTypeChecker(host) { function getRestTypeOfTupleType(type) { return getElementTypeOfSliceOfTupleType(type, type.target.fixedLength); } + function getTupleElementTypeOutOfStartCount(type, index, undefinedOrMissingType2) { + return mapType(type, (t) => { + const tupleType = t; + const restType = getRestTypeOfTupleType(tupleType); + if (!restType) { + return undefinedType; + } + if (undefinedOrMissingType2 && index >= getTotalFixedElementCount(tupleType.target)) { + return getUnionType([restType, undefinedOrMissingType2]); + } + return restType; + }); + } function getRestArrayTypeOfTupleType(type) { const restType = getRestTypeOfTupleType(type); return restType && createArrayType(restType); @@ -62517,12 +62979,12 @@ function createTypeChecker(host) { } let diagnostic; switch (declaration.kind) { - case 225 /* BinaryExpression */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 226 /* BinaryExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 168 /* Parameter */: + case 169 /* Parameter */: const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); @@ -62544,27 +63006,27 @@ function createTypeChecker(host) { } diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 329 /* JSDocSignature */: + case 330 /* JSDocSignature */: if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) { error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); } return; - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (noImplicitAny && !declaration.name) { if (wideningKind === 3 /* GeneratorYield */) { error(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); @@ -62575,7 +63037,7 @@ function createTypeChecker(host) { } diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; - case 199 /* MappedType */: + case 200 /* MappedType */: if (noImplicitAny) { error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } @@ -62672,7 +63134,7 @@ function createTypeChecker(host) { function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 173 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType(node, 2 /* NoConstraints */); + const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -62724,8 +63186,8 @@ function createTypeChecker(host) { } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 264 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 311 /* SourceFile */ ? true : n.kind === 266 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 265 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 312 /* SourceFile */ ? true : n.kind === 267 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -62767,17 +63229,18 @@ function createTypeChecker(host) { ); } function inferTypeForHomomorphicMappedType(source, target, constraint) { - if (inInferTypeForHomomorphicMappedType) { - return void 0; + const cacheKey = source.id + "," + target.id + "," + constraint.id; + if (reverseMappedCache.has(cacheKey)) { + return reverseMappedCache.get(cacheKey); } - const key = source.id + "," + target.id + "," + constraint.id; - if (reverseMappedCache.has(key)) { - return reverseMappedCache.get(key); + const recursionKey = source.id + "," + (target.target || target).id; + if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) { + return void 0; } - inInferTypeForHomomorphicMappedType = true; + homomorphicMappedTypeInferenceStack.push(recursionKey); const type = createReverseMappedType(source, target, constraint); - inInferTypeForHomomorphicMappedType = false; - reverseMappedCache.set(key, type); + homomorphicMappedTypeInferenceStack.pop(); + reverseMappedCache.set(cacheKey, type); return type; } function isPartiallyInferableType(type) { @@ -63550,7 +64013,7 @@ function createTypeChecker(host) { if (!(source.flags & 64 /* IsNonInferrable */)) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 173 /* MethodDeclaration */ || kind === 172 /* MethodSignature */ || kind === 175 /* Constructor */; + bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; } @@ -63650,7 +64113,7 @@ function createTypeChecker(host) { const constraint = getConstraintOfTypeParameter(inference.typeParameter); if (constraint) { const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper); - if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { + if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; } } @@ -63708,7 +64171,7 @@ function createTypeChecker(host) { return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer; } else { return Diagnostics.Cannot_find_name_0; @@ -63731,14 +64194,8 @@ function createTypeChecker(host) { } return links.resolvedSymbol; } - function isInTypeQuery(node) { - return !!findAncestor( - node, - (n) => n.kind === 185 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 165 /* QualifiedName */ ? false : "quit" - ); - } function isInAmbientOrTypeNode(node) { - return !!(node.flags & 16777216 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n))); + return !!(node.flags & 33554432 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n))); } function getFlowCacheKey(node, declaredType, initialType, flowContainer) { switch (node.kind) { @@ -63749,41 +64206,41 @@ function createTypeChecker(host) { } case 110 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 235 /* MetaProperty */: - return target.kind === 235 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 236 /* MetaProperty */: + return target.kind === 236 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 80 /* Identifier */: case 81 /* PrivateIdentifier */: return isThisInTypeQuery(source) ? target.kind === 110 /* ThisKeyword */ : target.kind === 80 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); @@ -63791,17 +64248,17 @@ function createTypeChecker(host) { return target.kind === 110 /* ThisKeyword */; case 108 /* SuperKeyword */: return target.kind === 108 /* SuperKeyword */; - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const sourcePropertyName = getAccessedPropertyName(source); const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0; return sourcePropertyName !== void 0 && targetPropertyName !== void 0 && targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -63835,7 +64292,7 @@ function createTypeChecker(host) { /*ignoreErrors*/ true ); - if (!symbol || !(isConstVariable(symbol) || symbol.flags & 8 /* EnumMember */)) + if (!symbol || !(isConstantVariable(symbol) || symbol.flags & 8 /* EnumMember */)) return void 0; const declaration = symbol.valueDeclaration; if (declaration === void 0) @@ -63954,7 +64411,7 @@ function createTypeChecker(host) { } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 302 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 303 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -63969,7 +64426,7 @@ function createTypeChecker(host) { } } } - if (expression.expression.kind === 210 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -64141,11 +64598,11 @@ function createTypeChecker(host) { ) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 208 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 302 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 303 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent) { - return parent.parent.kind === 225 /* BinaryExpression */ && parent.parent.left === parent || parent.parent.kind === 249 /* ForOfStatement */ && parent.parent.initializer === parent; + return parent.parent.kind === 226 /* BinaryExpression */ && parent.parent.left === parent || parent.parent.kind === 250 /* ForOfStatement */ && parent.parent.initializer === parent; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -64162,21 +64619,21 @@ function createTypeChecker(host) { function getAssignedType(node) { const { parent } = node; switch (parent.kind) { - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return stringType; - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return checkRightHandSideOfForOf(parent) || errorType; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return undefinedType; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent, node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent); } return errorType; @@ -64184,7 +64641,7 @@ function createTypeChecker(host) { function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 205 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); return getTypeWithDefault(type, node.initializer); } function getTypeOfInitializer(node) { @@ -64195,25 +64652,25 @@ function createTypeChecker(host) { if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 248 /* ForInStatement */) { + if (node.parent.parent.kind === 249 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 249 /* ForOfStatement */) { + if (node.parent.parent.kind === 250 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 259 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 260 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 259 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 207 /* BindingElement */ && node.parent.kind === 225 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 260 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 226 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 76 /* BarBarEqualsToken */: @@ -64228,10 +64685,10 @@ function createTypeChecker(host) { } function getReferenceRoot(node) { const { parent } = node; - return parent.kind === 216 /* ParenthesizedExpression */ || parent.kind === 225 /* BinaryExpression */ && parent.operatorToken.kind === 64 /* EqualsToken */ && parent.left === node || parent.kind === 225 /* BinaryExpression */ && parent.operatorToken.kind === 28 /* CommaToken */ && parent.right === node ? getReferenceRoot(parent) : node; + return parent.kind === 217 /* ParenthesizedExpression */ || parent.kind === 226 /* BinaryExpression */ && parent.operatorToken.kind === 64 /* EqualsToken */ && parent.left === node || parent.kind === 226 /* BinaryExpression */ && parent.operatorToken.kind === 28 /* CommaToken */ && parent.right === node ? getReferenceRoot(parent) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -64247,12 +64704,12 @@ function createTypeChecker(host) { return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 295 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 295 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 296 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -64410,8 +64867,8 @@ function createTypeChecker(host) { function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent) && (parent.name.escapedText === "length" || parent.parent.kind === 212 /* CallExpression */ && isIdentifier(parent.name) && isPushOrUnshiftIdentifier(parent.name)); - const isElementAssignment = parent.kind === 211 /* ElementAccessExpression */ && parent.expression === root && parent.parent.kind === 225 /* BinaryExpression */ && parent.parent.operatorToken.kind === 64 /* EqualsToken */ && parent.parent.left === parent && !isAssignmentTarget(parent.parent) && isTypeAssignableToKind(getTypeOfExpression(parent.argumentExpression), 296 /* NumberLike */); + const isLengthPushOrUnshift = isPropertyAccessExpression(parent) && (parent.name.escapedText === "length" || parent.parent.kind === 213 /* CallExpression */ && isIdentifier(parent.name) && isPushOrUnshiftIdentifier(parent.name)); + const isElementAssignment = parent.kind === 212 /* ElementAccessExpression */ && parent.expression === root && parent.parent.kind === 226 /* BinaryExpression */ && parent.parent.operatorToken.kind === 64 /* EqualsToken */ && parent.parent.left === parent && !isAssignmentTarget(parent.parent) && isTypeAssignableToKind(getTypeOfExpression(parent.argumentExpression), 296 /* NumberLike */); return isLengthPushOrUnshift || isElementAssignment; } function isDeclarationWithExplicitTypeAnnotation(node) { @@ -64434,7 +64891,7 @@ function createTypeChecker(host) { if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName( statement.expression, @@ -64459,7 +64916,7 @@ function createTypeChecker(host) { } } function getTypeOfDottedName(node, diagnostic) { - if (!(node.flags & 33554432 /* InWithStatement */)) { + if (!(node.flags & 67108864 /* InWithStatement */)) { switch (node.kind) { case 80 /* Identifier */: const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node)); @@ -64468,7 +64925,7 @@ function createTypeChecker(host) { return getExplicitThisType(node); case 108 /* SuperKeyword */: return checkSuperExpression(node); - case 210 /* PropertyAccessExpression */: { + case 211 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -64485,7 +64942,7 @@ function createTypeChecker(host) { } return void 0; } - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -64495,7 +64952,7 @@ function createTypeChecker(host) { let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 243 /* ExpressionStatement */) { + if (node.parent.kind === 244 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ @@ -64549,7 +65006,7 @@ function createTypeChecker(host) { /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 97 /* FalseKeyword */ || node.kind === 225 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + return node.kind === 97 /* FalseKeyword */ || node.kind === 226 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { @@ -64668,14 +65125,16 @@ function createTypeChecker(host) { } function isConstantReference(node) { switch (node.kind) { + case 110 /* ThisKeyword */: + return true; case 80 /* Identifier */: if (!isThisInTypeQuery(node)) { const symbol = getResolvedSymbol(node); - return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); + return isConstantVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } break; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -64695,7 +65154,7 @@ function createTypeChecker(host) { const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode)); sharedFlowCount = sharedFlowStart; const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType); - if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 234 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 235 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -64764,7 +65223,7 @@ function createTypeChecker(host) { target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 210 /* PropertyAccessExpression */ && reference.kind !== 211 /* ElementAccessExpression */ && reference.kind !== 110 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && !(reference.kind === 110 /* ThisKeyword */ && container.kind !== 219 /* ArrowFunction */)) { flow = container.flowNode; continue; } @@ -64783,7 +65242,7 @@ function createTypeChecker(host) { } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -64811,15 +65270,15 @@ function createTypeChecker(host) { if (!isReachableFlowNode(flow)) { return unreachableNeverType; } - if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { + if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConstLike(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 217 /* FunctionExpression */ || init.kind === 218 /* ArrowFunction */)) { + if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 248 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 249 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -64833,7 +65292,7 @@ function createTypeChecker(host) { if (node.kind === 97 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 225 /* BinaryExpression */) { + if (node.kind === 226 /* BinaryExpression */) { if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -64873,13 +65332,13 @@ function createTypeChecker(host) { function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 212 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { const flowType = getTypeAtFlowNode(flow.antecedent); const type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { let evolvedType2 = type; - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -64916,7 +65375,7 @@ function createTypeChecker(host) { let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 220 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -64928,7 +65387,7 @@ function createTypeChecker(host) { flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 220 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 221 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -65073,7 +65532,7 @@ function createTypeChecker(host) { } } else if (isIdentifier(expr)) { const symbol = getResolvedSymbol(expr); - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; if (isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isAccessExpression(declaration.initializer) && isMatchingReference(reference, declaration.initializer.expression)) { return declaration.initializer; @@ -65191,10 +65650,10 @@ function createTypeChecker(host) { const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 220 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 220 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -65232,12 +65691,15 @@ function createTypeChecker(host) { return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue); } const target = getReferenceCandidate(expr.right); - const leftType = getTypeOfExpression(expr.left); - if (leftType.flags & 8576 /* StringOrNumberLiteralOrUnique */) { - if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) { + if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target)) { + const leftType = getTypeOfExpression(expr.left); + if (isTypeUsableAsPropertyName(leftType) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) { return getTypeWithFacts(type, assumeTrue ? 524288 /* NEUndefined */ : 65536 /* EQUndefined */); } - if (isMatchingReference(reference, target)) { + } + if (isMatchingReference(reference, target)) { + const leftType = getTypeOfExpression(expr.left); + if (isTypeUsableAsPropertyName(leftType)) { return narrowTypeByInKeyword(type, leftType, assumeTrue); } } @@ -65453,7 +65915,7 @@ function createTypeChecker(host) { if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -65617,7 +66079,7 @@ function createTypeChecker(host) { case 80 /* Identifier */: if (!isMatchingReference(reference, expr) && inlineLevel < 5) { const symbol = getResolvedSymbol(expr); - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isConstantReference(reference)) { inlineLevel++; @@ -65629,17 +66091,17 @@ function createTypeChecker(host) { } case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: if (expr.operator === 54 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -65665,7 +66127,7 @@ function createTypeChecker(host) { location = location.parent; } if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) { - const type = getTypeOfExpression(location); + const type = removeOptionalTypeMarker(getTypeOfExpression(location)); if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) { return type; } @@ -65677,7 +66139,7 @@ function createTypeChecker(host) { return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 267 /* ModuleBlock */ || node2.kind === 311 /* SourceFile */ || node2.kind === 171 /* PropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -65685,8 +66147,8 @@ function createTypeChecker(host) { } const parent = getRootDeclaration(symbol.valueDeclaration).parent; const links = getNodeLinks(parent); - if (!(links.flags & 524288 /* AssignmentsMarked */)) { - links.flags |= 524288 /* AssignmentsMarked */; + if (!(links.flags & 131072 /* AssignmentsMarked */)) { + links.flags |= 131072 /* AssignmentsMarked */; if (!hasParentWithAssignmentsMarked(parent)) { markNodeAssignments(parent); } @@ -65694,7 +66156,7 @@ function createTypeChecker(host) { return symbol.isAssigned || false; } function hasParentWithAssignmentsMarked(node) { - return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 524288 /* AssignmentsMarked */)); + return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */)); } function markNodeAssignments(node) { if (node.kind === 80 /* Identifier */) { @@ -65708,8 +66170,8 @@ function createTypeChecker(host) { forEachChild(node, markNodeAssignments); } } - function isConstVariable(symbol) { - return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */) !== 0; + function isConstantVariable(symbol) { + return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */) !== 0; } function parameterInitializerContainsUndefined(declaration) { const links = getNodeLinks(declaration); @@ -65728,12 +66190,12 @@ function createTypeChecker(host) { return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 168 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { const parent = node.parent; - return parent.kind === 210 /* PropertyAccessExpression */ || parent.kind === 165 /* QualifiedName */ || parent.kind === 212 /* CallExpression */ && parent.expression === node || parent.kind === 211 /* ElementAccessExpression */ && parent.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent.argumentExpression))); + return parent.kind === 211 /* PropertyAccessExpression */ || parent.kind === 166 /* QualifiedName */ || parent.kind === 213 /* CallExpression */ && parent.expression === node || parent.kind === 212 /* ElementAccessExpression */ && parent.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent.argumentExpression))); } function isGenericTypeWithUnionConstraint(type) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */)); @@ -65776,9 +66238,13 @@ function createTypeChecker(host) { symbol, /*excludes*/ 111551 /* Value */ - ) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */)) { + ) && !isInTypeQuery(location)) { const target = resolveAlias(symbol); - if (getAllSymbolFlags(target) & (111551 /* Value */ | 1048576 /* ExportValue */)) { + if (getSymbolFlags( + symbol, + /*excludeTypeOnlyMeanings*/ + true + ) & (111551 /* Value */ | 1048576 /* ExportValue */)) { if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) { markAliasSymbolAsReferenced(symbol); } else { @@ -65794,14 +66260,14 @@ function createTypeChecker(host) { if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent = declaration.parent.parent; - if (parent.kind === 259 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent.kind === 168 /* Parameter */) { + if (parent.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || parent.kind === 169 /* Parameter */) { const links = getNodeLinks(parent); - if (!(links.flags & 16777216 /* InCheckIdentifier */)) { - links.flags |= 16777216 /* InCheckIdentifier */; + if (!(links.flags & 4194304 /* InCheckIdentifier */)) { + links.flags |= 4194304 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); - links.flags &= ~16777216 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent.kind === 168 /* Parameter */ && isSymbolAssigned(symbol))) { + links.flags &= ~4194304 /* InCheckIdentifier */; + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference( pattern, @@ -65858,7 +66324,7 @@ function createTypeChecker(host) { } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 218 /* ArrowFunction */) { + if (container.kind === 219 /* ArrowFunction */) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (hasSyntacticModifier(container, 512 /* Async */)) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); @@ -65877,17 +66343,7 @@ function createTypeChecker(host) { } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 262 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { - let container = getContainingClass(node); - while (container !== void 0) { - if (container === declaration && container.name !== node) { - getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; - getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */; - break; - } - container = getContainingClass(container); - } - } else if (declaration.kind === 230 /* ClassExpression */) { + if (isClassLike(declaration) && declaration.name !== node) { let container = getThisContainer( node, /*includeArrowFunctions*/ @@ -65895,14 +66351,7 @@ function createTypeChecker(host) { /*includeClassComputedPropertyName*/ false ); - while (container.kind !== 311 /* SourceFile */) { - if (container.parent === declaration) { - if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { - getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; - getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */; - } - break; - } + while (container.kind !== 312 /* SourceFile */ && container.parent !== declaration) { container = getThisContainer( container, /*includeArrowFunctions*/ @@ -65911,6 +66360,11 @@ function createTypeChecker(host) { false ); } + if (container.kind !== 312 /* SourceFile */) { + getNodeLinks(declaration).flags |= 262144 /* ContainsConstructorReference */; + getNodeLinks(container).flags |= 262144 /* ContainsConstructorReference */; + getNodeLinks(node).flags |= 536870912 /* ConstructorReference */; + } } } checkNestedBlockScopedBinding(node, symbol); @@ -65945,18 +66399,18 @@ function createTypeChecker(host) { return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 168 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 169 /* Parameter */; const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); const isModuleExports = symbol.flags & 134217728 /* ModuleExports */; const typeIsAutomatic = type === autoType || type === autoArrayType; - const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 234 /* NonNullExpression */; - while (flowContainer !== declarationContainer && (flowContainer.kind === 217 /* FunctionExpression */ || flowContainer.kind === 218 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 235 /* NonNullExpression */; + while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } - const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 280 /* ExportSpecifier */) || node.parent.kind === 234 /* NonNullExpression */ || declaration.kind === 259 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; + const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */; const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type); const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer); if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) { @@ -66010,7 +66464,7 @@ function createTypeChecker(host) { )); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 298 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 299 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -66020,7 +66474,7 @@ function createTypeChecker(host) { if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 260 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -66039,9 +66493,9 @@ function createTypeChecker(host) { } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 260 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { - getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */; + getNodeLinks(symbol.valueDeclaration).flags |= 65536 /* NeedsLoopOutParameter */; } } getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */; @@ -66056,13 +66510,13 @@ function createTypeChecker(host) { } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 216 /* ParenthesizedExpression */) { + while (current.parent.kind === 217 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 223 /* PrefixUnaryExpression */ || current.parent.kind === 224 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 224 /* PrefixUnaryExpression */ || current.parent.kind === 225 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; } @@ -66073,7 +66527,7 @@ function createTypeChecker(host) { } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 171 /* PropertyDeclaration */ || container.kind === 175 /* Constructor */) { + if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -66118,11 +66572,11 @@ function createTypeChecker(host) { ); let capturedByArrowFunction = false; let thisInComputedPropertyName = false; - if (container.kind === 175 /* Constructor */) { + if (container.kind === 176 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } while (true) { - if (container.kind === 218 /* ArrowFunction */) { + if (container.kind === 219 /* ArrowFunction */) { container = getThisContainer( container, /*includeArrowFunctions*/ @@ -66131,7 +66585,7 @@ function createTypeChecker(host) { ); capturedByArrowFunction = true; } - if (container.kind === 166 /* ComputedPropertyName */) { + if (container.kind === 167 /* ComputedPropertyName */) { container = getThisContainer( container, !capturedByArrowFunction, @@ -66148,13 +66602,13 @@ function createTypeChecker(host) { error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); } else { switch (container.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: error(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 175 /* Constructor */: + case 176 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } @@ -66248,36 +66702,33 @@ function createTypeChecker(host) { } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 217 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 173 /* MethodDeclaration */ && container.parent.kind === 209 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 217 /* FunctionExpression */ && container.parent.kind === 302 /* PropertyAssignment */ && container.parent.parent.kind === 209 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 303 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 217 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { + } else if (container.kind === 218 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.parent.arguments[0].expression; } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.arguments[0].expression; } } function getTypeForThisExpressionFromJSDoc(node) { - const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 323 /* JSDocFunctionType */) { - const jsDocFunctionType = jsdocType; - if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].name && jsDocFunctionType.parameters[0].name.escapedText === "this" /* This */) { - return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); - } - } const thisTag = getJSDocThisTag(node); if (thisTag && thisTag.typeExpression) { return getTypeFromTypeNode(thisTag.typeExpression); } + const signature = getSignatureOfTypeTag(node); + if (signature) { + return getThisTypeOfSignature(signature); + } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 168 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 212 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer( node, /*stopOnFunctions*/ @@ -66287,7 +66738,7 @@ function createTypeChecker(host) { let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 218 /* ArrowFunction */) { + while (container && container.kind === 219 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer( @@ -66302,19 +66753,19 @@ function createTypeChecker(host) { } let nodeCheckFlag = 0; if (!container || !isLegalUsageOfSuperExpression(container)) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 166 /* ComputedPropertyName */); - if (current && current.kind === 166 /* ComputedPropertyName */) { + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 167 /* ComputedPropertyName */); + if (current && current.kind === 167 /* ComputedPropertyName */) { error(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression2) { error(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 209 /* ObjectLiteralExpression */)) { + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 210 /* ObjectLiteralExpression */)) { error(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { error(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); } return errorType; } - if (!isCallExpression2 && immediateContainer.kind === 175 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 176 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if (isStatic(container) || isCallExpression2) { @@ -66322,7 +66773,7 @@ function createTypeChecker(host) { if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) { forEachEnclosingBlockScopeContainer(node.parent, (current) => { if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) { - getNodeLinks(current).flags |= 8388608 /* ContainsSuperPropertyInStaticInitializer */; + getNodeLinks(current).flags |= 2097152 /* ContainsSuperPropertyInStaticInitializer */; } }); } @@ -66330,7 +66781,7 @@ function createTypeChecker(host) { nodeCheckFlag = 16 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 173 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -66340,7 +66791,7 @@ function createTypeChecker(host) { if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 209 /* ObjectLiteralExpression */) { + if (container.parent.kind === 210 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { error(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return errorType; @@ -66358,20 +66809,20 @@ function createTypeChecker(host) { if (!baseClassType) { return errorType; } - if (container.kind === 175 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType); function isLegalUsageOfSuperExpression(container2) { if (isCallExpression2) { - return container2.kind === 175 /* Constructor */; + return container2.kind === 176 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 209 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 173 /* MethodDeclaration */ || container2.kind === 172 /* MethodSignature */ || container2.kind === 176 /* GetAccessor */ || container2.kind === 177 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 174 /* ClassStaticBlockDeclaration */; + return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 173 /* MethodDeclaration */ || container2.kind === 172 /* MethodSignature */ || container2.kind === 176 /* GetAccessor */ || container2.kind === 177 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 170 /* PropertySignature */ || container2.kind === 175 /* Constructor */; + return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 176 /* Constructor */; } } } @@ -66379,7 +66830,7 @@ function createTypeChecker(host) { } } function getContainingObjectLiteral(func) { - return (func.kind === 173 /* MethodDeclaration */ || func.kind === 176 /* GetAccessor */ || func.kind === 177 /* SetAccessor */) && func.parent.kind === 209 /* ObjectLiteralExpression */ ? func.parent : func.kind === 217 /* FunctionExpression */ && func.parent.kind === 302 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 303 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -66389,8 +66840,27 @@ function createTypeChecker(host) { return t.flags & 2097152 /* Intersection */ ? forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t); }); } + function getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType) { + let literal = containingLiteral; + let type = contextualType; + while (type) { + const thisType = getThisTypeFromContextualType(type); + if (thisType) { + return thisType; + } + if (literal.parent.kind !== 303 /* PropertyAssignment */) { + break; + } + literal = literal.parent.parent; + type = getApparentTypeOfContextualType( + literal, + /*contextFlags*/ + void 0 + ); + } + } function getContextualThisParameterType(func) { - if (func.kind === 218 /* ArrowFunction */) { + if (func.kind === 219 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -66411,27 +66881,14 @@ function createTypeChecker(host) { /*contextFlags*/ void 0 ); - let literal = containingLiteral; - let type = contextualType; - while (type) { - const thisType = getThisTypeFromContextualType(type); - if (thisType) { - return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); - } - if (literal.parent.kind !== 302 /* PropertyAssignment */) { - break; - } - literal = literal.parent.parent; - type = getApparentTypeOfContextualType( - literal, - /*contextFlags*/ - void 0 - ); + const thisType = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); + if (thisType) { + return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent = walkUpParenthesizedExpressions(func.parent); - if (parent.kind === 225 /* BinaryExpression */ && parent.operatorToken.kind === 64 /* EqualsToken */) { + if (parent.kind === 226 /* BinaryExpression */ && parent.operatorToken.kind === 64 /* EqualsToken */) { const target = parent.left; if (isAccessExpression(target)) { const { expression } = target; @@ -66486,11 +66943,11 @@ function createTypeChecker(host) { return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 168 /* Parameter */: + case 169 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -66499,10 +66956,10 @@ function createTypeChecker(host) { function getContextualTypeForBindingElement(declaration, contextFlags) { const parent = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent, contextFlags) || parent.kind !== 207 /* BindingElement */ && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent, contextFlags) || parent.kind !== 208 /* BindingElement */ && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent.name.kind === 206 /* ArrayBindingPattern */) { + if (parent.name.kind === 207 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -66652,7 +67109,7 @@ function createTypeChecker(host) { return signature ? getOrCreateTypeFromSignature(signature) : void 0; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 214 /* TaggedTemplateExpression */) { + if (template.parent.kind === 215 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -66870,7 +67327,7 @@ function createTypeChecker(host) { } function getContextualTypeForObjectLiteralMethod(node, contextFlags) { Debug.assert(isObjectLiteralMethod(node)); - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } return getContextualTypeForObjectLiteralElement(node, contextFlags); @@ -67006,16 +67463,17 @@ function createTypeChecker(host) { case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: + case 228 /* TemplateExpression */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 80 /* Identifier */: case 157 /* UndefinedKeyword */: return true; - case 210 /* PropertyAccessExpression */: - case 216 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 217 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -67025,7 +67483,7 @@ function createTypeChecker(host) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 302 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 303 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -67045,7 +67503,7 @@ function createTypeChecker(host) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 290 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 291 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -67110,7 +67568,7 @@ function createTypeChecker(host) { } function getContextualType(node, contextFlags) { var _a; - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } const index = findContextualNode( @@ -67123,47 +67581,47 @@ function createTypeChecker(host) { } const { parent } = node; switch (parent.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 208 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 218 /* ArrowFunction */: - case 252 /* ReturnStatement */: + case 219 /* ArrowFunction */: + case 253 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return getContextualTypeForYieldOperand(parent, contextFlags); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent, contextFlags); - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: return getContextualTypeForArgument(parent, node); - case 169 /* Decorator */: + case 170 /* Decorator */: return getContextualTypeForDecorator(parent); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return isConstTypeReference(parent.type) ? getContextualType(parent, contextFlags) : getTypeFromTypeNode(parent.type); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent, contextFlags); - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return getContextualType(parent.parent, contextFlags); - case 208 /* ArrayLiteralExpression */: { + case 209 /* ArrayLiteralExpression */: { const arrayLiteral = parent; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); const elementIndex = indexOfNode(arrayLiteral.elements, node); const spreadIndices = (_a = getNodeLinks(arrayLiteral)).spreadIndices ?? (_a.spreadIndices = getSpreadIndices(arrayLiteral.elements)); return getContextualTypeForElementExpression(type, elementIndex, arrayLiteral.elements.length, spreadIndices.first, spreadIndices.last); } - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 238 /* TemplateSpan */: - Debug.assert(parent.parent.kind === 227 /* TemplateExpression */); + case 239 /* TemplateSpan */: + Debug.assert(parent.parent.kind === 228 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 216 /* ParenthesizedExpression */: { + case 217 /* ParenthesizedExpression */: { if (isInJSFile(parent)) { if (isJSDocSatisfiesExpression(parent)) { return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent)); @@ -67175,19 +67633,19 @@ function createTypeChecker(host) { } return getContextualType(parent, contextFlags); } - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return getContextualType(parent, contextFlags); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return getTypeFromTypeNode(parent.type); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return getContextualTypeForJsxExpression(parent, contextFlags); - case 290 /* JsxAttribute */: - case 292 /* JsxSpreadAttribute */: + case 291 /* JsxAttribute */: + case 293 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent, contextFlags); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent, contextFlags); } return void 0; @@ -67416,7 +67874,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, minArgCount, - (left.flags | right.flags) & 39 /* PropagatingFlags */ + (left.flags | right.flags) & 167 /* PropagatingFlags */ ); result.compositeKind = 2097152 /* Intersection */; result.compositeSignatures = concatenate(left.compositeKind === 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); @@ -67447,7 +67905,7 @@ function createTypeChecker(host) { return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -67498,7 +67956,11 @@ function createTypeChecker(host) { return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 207 /* BindingElement */ && !!node.initializer || node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; + return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; + } + function isSpreadIntoCallOrNew(node) { + const parent = walkUpParenthesizedExpressions(node.parent); + return isSpreadElement(parent) && isCallOrNewExpression(parent.parent); } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -67507,18 +67969,17 @@ function createTypeChecker(host) { const elementFlags = []; pushCachedContextualType(node); const inDestructuringPattern = isAssignmentTarget(node); - const isSpreadIntoCallOrNew = isSpreadElement(node.parent) && isCallOrNewExpression(node.parent.parent); - const inConstContext = isSpreadIntoCallOrNew || isConstContext(node); + const inConstContext = isConstContext(node); const contextualType = getApparentTypeOfContextualType( node, /*contextFlags*/ void 0 ); - const inTupleContext = isSpreadIntoCallOrNew || !!contextualType && someType(contextualType, isTupleLikeType); + const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, isTupleLikeType); let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 229 /* SpreadElement */) { + if (e.kind === 230 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -67542,7 +68003,7 @@ function createTypeChecker(host) { elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 231 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 232 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(undefinedOrMissingType); elementFlags.push(2 /* Optional */); @@ -67589,7 +68050,7 @@ function createTypeChecker(host) { } function isNumericName(name) { switch (name.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return isNumericComputedName(name); case 80 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -67606,7 +68067,7 @@ function createTypeChecker(host) { function checkComputedPropertyName(node) { const links = getNodeLinks(node.expression); if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 176 /* GetAccessor */ && node.parent.kind !== 177 /* SetAccessor */) { + if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -67675,7 +68136,7 @@ function createTypeChecker(host) { /*contextFlags*/ void 0 ); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 205 /* ObjectBindingPattern */ || contextualType.pattern.kind === 209 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -67694,13 +68155,13 @@ function createTypeChecker(host) { let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfDeclaration(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 166 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 302 /* PropertyAssignment */ || memberDecl.kind === 303 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 302 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( + const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 303 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. // we don't want to say "could not find 'a'". - memberDecl.kind === 303 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) + memberDecl.kind === 304 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) ); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); @@ -67718,7 +68179,7 @@ function createTypeChecker(host) { prop.links.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 302 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 303 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 303 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -67744,13 +68205,13 @@ function createTypeChecker(host) { prop.links.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 302 /* PropertyAssignment */ || memberDecl.kind === 173 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 302 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 303 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } - } else if (memberDecl.kind === 304 /* SpreadAssignment */) { + } else if (memberDecl.kind === 305 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -67779,7 +68240,7 @@ function createTypeChecker(host) { } continue; } else { - Debug.assert(memberDecl.kind === 176 /* GetAccessor */ || memberDecl.kind === 177 /* SetAccessor */); + Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -67804,13 +68265,13 @@ function createTypeChecker(host) { if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 259 /* VariableDeclaration */ || n.kind === 225 /* BinaryExpression */ || n.kind === 168 /* Parameter */ + (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 304 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 304 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 305 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { @@ -67945,7 +68406,7 @@ function createTypeChecker(host) { addIntraExpressionInferenceSite(inferenceContext, inferenceNode, exprType); } } else { - Debug.assert(attributeDecl.kind === 292 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 293 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType( spread, @@ -67991,7 +68452,7 @@ function createTypeChecker(host) { ); } } - const parent = openingLikeElement.parent.kind === 283 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) { const childrenTypes = checkJsxChildren(parent, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { @@ -68050,7 +68511,7 @@ function createTypeChecker(host) { if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 293 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 294 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -68435,7 +68896,7 @@ function createTypeChecker(host) { } } function getDeclarationNodeFlagsFromSymbol(s) { - return s.valueDeclaration ? getCombinedNodeFlags(s.valueDeclaration) : 0; + return s.valueDeclaration ? getCombinedNodeFlagsCached(s.valueDeclaration) : 0; } function isPrototypeProperty(symbol) { if (symbol.flags & 8192 /* Method */ || getCheckFlags(symbol) & 4 /* SyntheticMethod */) { @@ -68447,7 +68908,7 @@ function createTypeChecker(host) { } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 165 /* QualifiedName */ ? node.right : node.kind === 204 /* ImportType */ ? node : node.kind === 207 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -68651,7 +69112,7 @@ function createTypeChecker(host) { return nonNullType; } function checkPropertyAccessExpression(node, checkMode, writeOnly) { - return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); + return node.flags & 64 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); } function checkPropertyAccessChain(node, checkMode) { const leftType = checkExpression(node.expression); @@ -68663,13 +69124,13 @@ function createTypeChecker(host) { return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 216 /* ParenthesizedExpression */) { + while (node.parent.kind === 217 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; } function lookupSymbolForPrivateIdentifierDeclaration(propName, location) { - for (let containingClass = getContainingClass(location); !!containingClass; containingClass = getContainingClass(containingClass)) { + for (let containingClass = getContainingClassExcludingClassDecorators(location); !!containingClass; containingClass = getContainingClass(containingClass)) { const { symbol } = containingClass; const name = getSymbolNameForPrivateIdentifier(symbol, propName); const prop = symbol.members && symbol.members.get(name) || symbol.exports && symbol.exports.get(name); @@ -68805,16 +69266,22 @@ function createTypeChecker(host) { if (lexicallyScopedSymbol) { return isErrorType(apparentType) ? errorType : apparentType; } - if (!getContainingClass(right)) { + if (getContainingClassExcludingClassDecorators(right) === void 0) { grammarErrorOnNode(right, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); return anyType; } } - prop = lexicallyScopedSymbol ? getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol) : void 0; - if (!prop && checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { - return errorType; + prop = lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol); + if (prop === void 0) { + if (checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { + return errorType; + } + const containingClass = getContainingClassExcludingClassDecorators(right); + if (containingClass && isPlainJsFile(getSourceFileOfNode(containingClass), compilerOptions.checkJs)) { + grammarErrorOnNode(right, Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class, idText(right)); + } } else { - const isSetonlyAccessor = prop && prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); + const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); if (isSetonlyAccessor && assignmentKind !== 1 /* Definite */) { error(node, Diagnostics.Private_accessor_was_defined_without_a_getter); } @@ -68832,10 +69299,10 @@ function createTypeChecker(host) { /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ - node.kind === 165 /* QualifiedName */ + node.kind === 166 /* QualifiedName */ ); } - if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 305 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 306 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -68871,7 +69338,7 @@ function createTypeChecker(host) { if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression(node)) { error(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText)); } - if (indexInfo.declaration && getCombinedNodeFlags(indexInfo.declaration) & 268435456 /* Deprecated */) { + if (indexInfo.declaration && isDeprecatedDeclaration(indexInfo.declaration)) { addDeprecatedSuggestion(right, [indexInfo.declaration], right.escapedText); } } else { @@ -68919,7 +69386,7 @@ function createTypeChecker(host) { if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 175 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 33554432 /* Ambient */)) { assumeUninitialized = true; } } @@ -68941,9 +69408,9 @@ function createTypeChecker(host) { } let diagnosticMessage; const declarationName = idText(right); - if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlags(valueDeclaration) & 32 /* Static */) && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { + if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); - } else if (valueDeclaration.kind === 262 /* ClassDeclaration */ && node.parent.kind !== 182 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { @@ -68956,25 +69423,25 @@ function createTypeChecker(host) { function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return true; - case 302 /* PropertyAssignment */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 304 /* SpreadAssignment */: - case 166 /* ComputedPropertyName */: - case 238 /* TemplateSpan */: - case 293 /* JsxExpression */: - case 290 /* JsxAttribute */: - case 291 /* JsxAttributes */: - case 292 /* JsxSpreadAttribute */: - case 285 /* JsxOpeningElement */: - case 232 /* ExpressionWithTypeArguments */: - case 297 /* HeritageClause */: + case 303 /* PropertyAssignment */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 305 /* SpreadAssignment */: + case 167 /* ComputedPropertyName */: + case 239 /* TemplateSpan */: + case 294 /* JsxExpression */: + case 291 /* JsxAttribute */: + case 292 /* JsxAttributes */: + case 293 /* JsxSpreadAttribute */: + case 286 /* JsxOpeningElement */: + case 233 /* ExpressionWithTypeArguments */: + case 298 /* HeritageClause */: return false; - case 218 /* ArrowFunction */: - case 243 /* ExpressionStatement */: + case 219 /* ArrowFunction */: + case 244 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -69219,9 +69686,9 @@ function createTypeChecker(host) { } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return isValidPropertyAccessWithType(node, node.expression.kind === 108 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -69229,7 +69696,7 @@ function createTypeChecker(host) { propertyName, getWidenedType(checkExpression(node.left)) ); - case 204 /* ImportType */: + case 205 /* ImportType */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -69242,7 +69709,7 @@ function createTypeChecker(host) { function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 210 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, + node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, /*isWrite*/ false, type, @@ -69275,7 +69742,7 @@ function createTypeChecker(host) { } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 260 /* VariableDeclarationList */) { + if (initializer.kind === 261 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfDeclaration(variable); @@ -69296,7 +69763,7 @@ function createTypeChecker(host) { let child = expr; let node = expr.parent; while (node) { - if (node.kind === 248 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 249 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -69307,7 +69774,7 @@ function createTypeChecker(host) { return false; } function checkIndexedAccess(node, checkMode) { - return node.flags & 32 /* OptionalChain */ ? checkElementAccessChain(node, checkMode) : checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode); + return node.flags & 64 /* OptionalChain */ ? checkElementAccessChain(node, checkMode) : checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode); } function checkElementAccessChain(node, checkMode) { const exprType = checkExpression(node.expression); @@ -69337,11 +69804,11 @@ function createTypeChecker(host) { if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 169 /* Decorator */) { + } else if (node.kind !== 170 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -69386,7 +69853,7 @@ function createTypeChecker(host) { } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 229 /* SpreadElement */ || arg.kind === 236 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 230 /* SpreadElement */ || arg.kind === 237 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -69402,9 +69869,9 @@ function createTypeChecker(host) { let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 227 /* TemplateExpression */) { + if (node.template.kind === 228 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -69412,7 +69879,7 @@ function createTypeChecker(host) { Debug.assert(templateLiteral.kind === 15 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 169 /* Decorator */) { + } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -69423,7 +69890,7 @@ function createTypeChecker(host) { effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 213 /* NewExpression */); + Debug.assert(node.kind === 214 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -69519,7 +69986,7 @@ function createTypeChecker(host) { if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 169 /* Decorator */) { + if (node.kind !== 170 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -69556,7 +70023,7 @@ function createTypeChecker(host) { } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 231 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 232 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -69584,11 +70051,11 @@ function createTypeChecker(host) { if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 236 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); + const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); if (isArrayLikeType(spreadType)) { return getMutableArrayOrTupleType(spreadType); } - return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 229 /* SpreadElement */ ? arg.expression : arg), inConstContext); + return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext); } } const types = []; @@ -69597,12 +70064,12 @@ function createTypeChecker(host) { for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 236 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 229 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { @@ -69612,7 +70079,7 @@ function createTypeChecker(host) { types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 236 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -69672,8 +70139,9 @@ function createTypeChecker(host) { void 0, checkMode ); + const checkAttributesType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(attributesType) : attributesType; return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate( - attributesType, + checkAttributesType, paramType, relation, reportErrors2 ? node.tagName : void 0, @@ -69789,7 +70257,7 @@ function createTypeChecker(host) { const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 231 /* OmittedExpression */) { + if (arg.kind !== 232 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType( arg, @@ -69847,7 +70315,7 @@ function createTypeChecker(host) { } } function getThisArgumentOfCall(node) { - const expression = node.kind === 212 /* CallExpression */ ? node.expression : node.kind === 214 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -69862,17 +70330,17 @@ function createTypeChecker(host) { return result; } function getEffectiveCallArguments(node) { - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 227 /* TemplateExpression */) { + if (template.kind === 228 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 169 /* Decorator */) { + if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -69884,7 +70352,7 @@ function createTypeChecker(host) { const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 229 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 230 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getElementTypes(spreadType), (t, i2) => { var _a; @@ -69923,16 +70391,16 @@ function createTypeChecker(host) { } function getLegacyDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return 1; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 168 /* Parameter */: + case 169 /* Parameter */: return 3; default: return Debug.fail(); @@ -70146,8 +70614,8 @@ function createTypeChecker(host) { return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) { - const isTaggedTemplate = node.kind === 214 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 169 /* Decorator */; + const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; @@ -70159,21 +70627,15 @@ function createTypeChecker(host) { } const candidates = candidatesOutArray || []; reorderCandidates(signatures, candidates, callChainFlags); - if (!candidates.length) { - if (reportErrors2) { - diagnostics.add(getDiagnosticForCallNode(node, Diagnostics.Call_target_does_not_contain_any_signatures)); - } - return resolveErrorCall(node); - } + Debug.assert(candidates.length, "Revert #54442 and add a testcase with whatever triggered this"); const args = getEffectiveCallArguments(node); const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters; let argCheckMode = !isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? 4 /* SkipContextSensitive */ : 0 /* Normal */; - argCheckMode |= checkMode & 32 /* IsForStringLiteralArgumentCompletions */; let candidatesForArgumentError; let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 212 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -70392,7 +70854,7 @@ function createTypeChecker(host) { continue; } if (argCheckMode) { - argCheckMode = checkMode & 32 /* IsForStringLiteralArgumentCompletions */; + argCheckMode = 0 /* Normal */; if (inferenceContext) { const typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext); checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext.inferredTypeParameters); @@ -70441,7 +70903,7 @@ function createTypeChecker(host) { parameters.push(createCombinedSymbolFromTypes(symbols, mapDefined(candidates, (candidate) => tryGetTypeAtPosition(candidate, i)))); } const restParameterSymbols = mapDefined(candidates, (c) => signatureHasRestParameter(c) ? last(c.parameters) : void 0); - let flags = 0 /* None */; + let flags = 128 /* IsSignatureCandidateForOverloadFailure */; if (restParameterSymbols.length !== 0) { const type = createArrayType(getUnionType(mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); @@ -70701,7 +71163,7 @@ function createTypeChecker(host) { } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 175 /* Constructor */) { + if (!modifiers || declaration.kind !== 176 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -70848,16 +71310,16 @@ function createTypeChecker(host) { } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 168 /* Parameter */: + case 169 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; default: return Debug.fail(); @@ -70980,16 +71442,16 @@ function createTypeChecker(host) { } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 169 /* Decorator */: + case 170 /* Decorator */: return resolveDecorator(node, candidatesOutArray, checkMode); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); @@ -71065,7 +71527,7 @@ function createTypeChecker(host) { let name; let decl; if (isVariableDeclaration(node.parent) && node.parent.initializer === node) { - if (!isInJSFile(node) && !(isVarConst(node.parent) && isFunctionLikeDeclaration(node))) { + if (!isInJSFile(node) && !(isVarConstLike(node.parent) && isFunctionLikeDeclaration(node))) { return void 0; } name = node.parent.name; @@ -71102,7 +71564,7 @@ function createTypeChecker(host) { return false; } let parent = node.parent; - while (parent && parent.kind === 210 /* PropertyAccessExpression */) { + while (parent && parent.kind === 211 /* PropertyAccessExpression */) { parent = parent.parent; } if (parent && isBinaryExpression(parent) && isPrototypeAccess(parent.left) && parent.operatorToken.kind === 64 /* EqualsToken */) { @@ -71126,9 +71588,9 @@ function createTypeChecker(host) { if (node.expression.kind === 108 /* SuperKeyword */) { return voidType; } - if (node.kind === 213 /* NewExpression */) { + if (node.kind === 214 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 175 /* Constructor */ && declaration.kind !== 179 /* ConstructSignature */ && declaration.kind !== 184 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 175 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 176 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } @@ -71142,7 +71604,7 @@ function createTypeChecker(host) { if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 212 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 243 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 244 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { if (!isDottedName(node.expression)) { error(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); } else if (!getEffectsSignature(node)) { @@ -71165,7 +71627,9 @@ function createTypeChecker(host) { return returnType; } function checkDeprecatedSignature(signature, node) { - if (signature.declaration && signature.declaration.flags & 268435456 /* Deprecated */) { + if (signature.flags & 128 /* IsSignatureCandidateForOverloadFailure */) + return; + if (signature.declaration && signature.declaration.flags & 536870912 /* Deprecated */) { const suggestionNode = getDeprecatedSuggestionNode(node); const name = tryGetPropertyAccessOrIdentifierToString(getInvokedExpression(node)); addDeprecatedSuggestionWithSignature(suggestionNode, signature.declaration, name, signatureToString(signature)); @@ -71174,20 +71638,20 @@ function createTypeChecker(host) { function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 212 /* CallExpression */: - case 169 /* Decorator */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 170 /* Decorator */: + case 214 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return node.argumentExpression; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.name; - case 182 /* TypeReference */: + case 183 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -71347,10 +71811,10 @@ function createTypeChecker(host) { if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 261 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 259 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 262 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 260 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); - return !!decl && !!(decl.flags & 16777216 /* Ambient */); + return !!decl && !!(decl.flags & 33554432 /* Ambient */); } return false; } @@ -71365,7 +71829,7 @@ function createTypeChecker(host) { return getReturnTypeOfSignature(signature); } function checkAssertion(node, checkMode) { - if (node.kind === 215 /* TypeAssertionExpression */) { + if (node.kind === 216 /* TypeAssertionExpression */) { const file = getSourceFileOfNode(node); if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) { grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); @@ -71381,18 +71845,18 @@ function createTypeChecker(host) { case 10 /* BigIntLiteral */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 227 /* TemplateExpression */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 228 /* TemplateExpression */: return true; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const op = node.operator; const arg = node.operand; return op === 41 /* MinusToken */ && (arg.kind === 9 /* NumericLiteral */ || arg.kind === 10 /* BigIntLiteral */) || op === 40 /* PlusToken */ && arg.kind === 9 /* NumericLiteral */; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = skipParentheses(node.expression); const symbol = isEntityNameExpression(expr) ? resolveEntityName( expr, @@ -71423,12 +71887,12 @@ function createTypeChecker(host) { let type; let expression; switch (node.kind) { - case 233 /* AsExpression */: - case 215 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 216 /* TypeAssertionExpression */: type = node.type; expression = node.expression; break; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: type = getJSDocTypeAssertionType(node); expression = node.expression; break; @@ -71462,18 +71926,18 @@ function createTypeChecker(host) { return propagateOptionalTypeMarker(getNonNullableType(nonOptionalType), node, nonOptionalType !== leftType); } function checkNonNullAssertion(node) { - return node.flags & 32 /* OptionalChain */ ? checkNonNullChain(node) : getNonNullableType(checkExpression(node.expression)); + return node.flags & 64 /* OptionalChain */ ? checkNonNullChain(node) : getNonNullableType(checkExpression(node.expression)); } function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); forEach(node.typeArguments, checkSourceElement); - if (node.kind === 232 /* ExpressionWithTypeArguments */) { + if (node.kind === 233 /* ExpressionWithTypeArguments */) { const parent = walkUpParenthesizedExpressions(node.parent); - if (parent.kind === 225 /* BinaryExpression */ && parent.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent.right)) { + if (parent.kind === 226 /* BinaryExpression */ && parent.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent.right)) { error(node, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); } } - const exprType = node.kind === 232 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 233 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); return getInstantiationExpressionType(exprType, node); } function getInstantiationExpressionType(exprType, node) { @@ -71557,7 +72021,7 @@ function createTypeChecker(host) { if (isErrorType(targetType)) { return targetType; } - const errorNode = findAncestor(target.parent, (n) => n.kind === 237 /* SatisfiesExpression */ || n.kind === 356 /* JSDocSatisfiesTag */); + const errorNode = findAncestor(target.parent, (n) => n.kind === 238 /* SatisfiesExpression */ || n.kind === 357 /* JSDocSatisfiesTag */); checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1); return exprType; } @@ -71587,7 +72051,7 @@ function createTypeChecker(host) { if (!container) { error(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return errorType; - } else if (container.kind === 175 /* Constructor */) { + } else if (container.kind === 176 /* Constructor */) { const symbol = getSymbolOfDeclaration(container.parent); return getTypeOfSymbol(symbol); } else { @@ -71604,7 +72068,7 @@ function createTypeChecker(host) { error(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); } const file = getSourceFileOfNode(node); - Debug.assert(!!(file.flags & 4194304 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); + Debug.assert(!!(file.flags & 8388608 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType; } function getTypeOfParameter(symbol) { @@ -71617,7 +72081,10 @@ function createTypeChecker(host) { } return type; } - function getTupleElementLabel(d) { + function getTupleElementLabel(d, index, restParameterName = "arg") { + if (!d) { + return `${restParameterName}_${index}`; + } Debug.assert(isIdentifier(d.name)); return d.name.escapedText; } @@ -71631,22 +72098,28 @@ function createTypeChecker(host) { if (isTupleType(restType)) { const associatedNames = restType.target.labeledElementDeclarations; const index = pos - paramCount; - return associatedNames && getTupleElementLabel(associatedNames[index]) || restParameter.escapedName + "_" + index; + return getTupleElementLabel(associatedNames == null ? void 0 : associatedNames[index], index, restParameter.escapedName); } return restParameter.escapedName; } - function getParameterIdentifierNameAtPosition(signature, pos) { + function getParameterIdentifierInfoAtPosition(signature, pos) { var _a; - if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 323 /* JSDocFunctionType */) { + if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 324 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { const param = signature.parameters[pos]; - return isParameterDeclarationWithIdentifierName(param) ? [param.escapedName, false] : void 0; + const paramIdent = getParameterDeclarationIdentifier(param); + return paramIdent ? { + parameter: paramIdent, + parameterName: param.escapedName, + isRestParameter: false + } : void 0; } const restParameter = signature.parameters[paramCount] || unknownSymbol; - if (!isParameterDeclarationWithIdentifierName(restParameter)) { + const restIdent = getParameterDeclarationIdentifier(restParameter); + if (!restIdent) { return void 0; } const restType = getTypeOfSymbol(restParameter); @@ -71655,21 +72128,22 @@ function createTypeChecker(host) { const index = pos - paramCount; const associatedName = associatedNames == null ? void 0 : associatedNames[index]; const isRestTupleElement = !!(associatedName == null ? void 0 : associatedName.dotDotDotToken); - return associatedName ? [ - getTupleElementLabel(associatedName), - isRestTupleElement - ] : void 0; + if (associatedName) { + Debug.assert(isIdentifier(associatedName.name)); + return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement }; + } + return void 0; } if (pos === paramCount) { - return [restParameter.escapedName, true]; + return { parameter: restIdent, parameterName: restParameter.escapedName, isRestParameter: true }; } return void 0; } - function isParameterDeclarationWithIdentifierName(symbol) { - return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); + function getParameterDeclarationIdentifier(symbol) { + return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name) && symbol.valueDeclaration.name; } function isValidDeclarationForTupleLabel(d) { - return d.kind === 201 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -72005,17 +72479,17 @@ function createTypeChecker(host) { if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: { const node = parent; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const contextType = createClassDecoratorContextType(targetType); links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType); break; } - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { const node = parent; if (!isClassLike(node.parent)) break; @@ -72027,7 +72501,7 @@ function createTypeChecker(host) { links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); break; } - case 171 /* PropertyDeclaration */: { + case 172 /* PropertyDeclaration */: { const node = parent; if (!isClassLike(node.parent)) break; @@ -72049,8 +72523,8 @@ function createTypeChecker(host) { if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: { const node = parent; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const targetParam = createParameter("target", targetType); @@ -72064,7 +72538,7 @@ function createTypeChecker(host) { ); break; } - case 168 /* Parameter */: { + case 169 /* Parameter */: { const node = parent; if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { break; @@ -72090,10 +72564,10 @@ function createTypeChecker(host) { ); break; } - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: { + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: { const node = parent; if (!isClassLike(node.parent)) break; @@ -72188,7 +72662,7 @@ function createTypeChecker(host) { let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 240 /* Block */) { + if (func.body.kind !== 241 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType( @@ -72371,7 +72845,7 @@ function createTypeChecker(host) { return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 220 /* TypeOfExpression */) { + if (node.expression.kind === 221 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -72404,7 +72878,7 @@ function createTypeChecker(host) { forEachReturnStatement(func.body, (returnStatement) => { const expr = returnStatement.expression; if (expr) { - if (expr.kind === 212 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { + if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { hasReturnOfTypeNever = true; return; } @@ -72436,11 +72910,11 @@ function createTypeChecker(host) { } function mayReturnNever(func) { switch (func.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; - case 173 /* MethodDeclaration */: - return func.parent.kind === 209 /* ObjectLiteralExpression */; + case 174 /* MethodDeclaration */: + return func.parent.kind === 210 /* ObjectLiteralExpression */; default: return false; } @@ -72454,10 +72928,10 @@ function createTypeChecker(host) { if (type && (maybeTypeOfKind(type, 16384 /* Void */) || type.flags & (1 /* Any */ | 32768 /* Undefined */))) { return; } - if (func.kind === 172 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 240 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 241 /* Block */ || !functionHasImplicitReturn(func)) { return; } - const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; + const hasExplicitReturn = func.flags & 1024 /* HasExplicitReturn */; const errorNode = getEffectiveReturnTypeNode(func) || func; if (type && type.flags & 131072 /* Never */) { error(errorNode, Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point); @@ -72480,7 +72954,7 @@ function createTypeChecker(host) { } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -72516,7 +72990,7 @@ function createTypeChecker(host) { return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 217 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -72565,7 +73039,7 @@ function createTypeChecker(host) { } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -72573,7 +73047,7 @@ function createTypeChecker(host) { if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 240 /* Block */) { + if (node.body.kind === 241 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -72635,7 +73109,7 @@ function createTypeChecker(host) { return !setProp; } function isReadonlySymbol(symbol) { - return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); + return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); } function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) { var _a, _b; @@ -72645,7 +73119,7 @@ function createTypeChecker(host) { if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 110 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 175 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -72666,7 +73140,7 @@ function createTypeChecker(host) { const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 273 /* NamespaceImport */; + return !!declaration && declaration.kind === 274 /* NamespaceImport */; } } } @@ -72678,7 +73152,7 @@ function createTypeChecker(host) { error(expr, invalidReferenceMessage); return false; } - if (node.flags & 32 /* OptionalChain */) { + if (node.flags & 64 /* OptionalChain */) { error(expr, invalidOptionalChainMessage); return false; } @@ -72718,24 +73192,24 @@ function createTypeChecker(host) { checkExpression(node.expression); return undefinedWideningType; } - function checkAwaitExpressionGrammar(node) { + function checkAwaitGrammar(node) { + let hasError = false; const container = getContainingFunctionOrClassStaticBlock(node); if (container && isClassStaticBlockDeclaration(container)) { - error(node, Diagnostics.Await_expression_cannot_be_used_inside_a_class_static_block); - } else if (!(node.flags & 32768 /* AwaitContext */)) { + const message = isAwaitExpression(node) ? Diagnostics.await_expression_cannot_be_used_inside_a_class_static_block : Diagnostics.await_using_statements_cannot_be_used_inside_a_class_static_block; + error(node, message); + hasError = true; + } else if (!(node.flags & 65536 /* AwaitContext */)) { if (isInTopLevelContext(node)) { const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { let span; if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - const diagnostic = createFileDiagnostic( - sourceFile, - span.start, - span.length, - Diagnostics.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 - ); + const message = isAwaitExpression(node) ? Diagnostics.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 : Diagnostics.await_using_statements_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; + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); diagnostics.add(diagnostic); + hasError = true; } switch (moduleKind) { case 100 /* Node16 */: @@ -72745,6 +73219,7 @@ function createTypeChecker(host) { diagnostics.add( createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) ); + hasError = true; break; } case 7 /* ES2022 */: @@ -72755,14 +73230,9 @@ function createTypeChecker(host) { } default: span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - diagnostics.add( - createFileDiagnostic( - sourceFile, - span.start, - span.length, - Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher - ) - ); + const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher : Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher; + diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message)); + hasError = true; break; } } @@ -72770,21 +73240,25 @@ function createTypeChecker(host) { const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); - const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); - if (container && container.kind !== 175 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + const message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules; + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); + if (container && container.kind !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } diagnostics.add(diagnostic); + hasError = true; } } } - if (isInParameterInitializerBeforeContainingFunction(node)) { + if (isAwaitExpression(node) && isInParameterInitializerBeforeContainingFunction(node)) { error(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer); + hasError = true; } + return hasError; } function checkAwaitExpression(node) { - addLazyDiagnostic(() => checkAwaitExpressionGrammar(node)); + addLazyDiagnostic(() => checkAwaitGrammar(node)); const operandType = checkExpression(node.expression); const awaitedType = checkAwaitedType( operandType, @@ -72980,7 +73454,7 @@ function createTypeChecker(host) { function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 302 /* PropertyAssignment */ || property.kind === 303 /* ShorthandPropertyAssignment */) { + if (property.kind === 303 /* PropertyAssignment */ || property.kind === 304 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -73001,8 +73475,8 @@ function createTypeChecker(host) { } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 303 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 304 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 304 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 305 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { @@ -73034,7 +73508,7 @@ function createTypeChecker(host) { let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 229 /* SpreadElement */) { + if (node.elements[i].kind === 230 /* SpreadElement */) { type = inBoundsType = inBoundsType ?? (checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType); } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -73044,8 +73518,8 @@ function createTypeChecker(host) { function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 231 /* OmittedExpression */) { - if (element.kind !== 229 /* SpreadElement */) { + if (element.kind !== 232 /* OmittedExpression */) { + if (element.kind !== 230 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -73060,7 +73534,7 @@ function createTypeChecker(host) { error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 225 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { + if (restExpression.kind === 226 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { error(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); } else { checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); @@ -73073,7 +73547,7 @@ function createTypeChecker(host) { } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 303 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -73085,25 +73559,25 @@ function createTypeChecker(host) { } else { target = exprOrAssignment; } - if (target.kind === 225 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { + if (target.kind === 226 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 209 /* ObjectLiteralExpression */) { + if (target.kind === 210 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 208 /* ArrayLiteralExpression */) { + if (target.kind === 209 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { const targetType = checkExpression(target, checkMode); - const error2 = target.parent.kind === 304 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; - const optionalError = target.parent.kind === 304 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + const error2 = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; + const optionalError = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; if (checkReferenceExpression(target, error2, optionalError)) { checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target); } @@ -73118,8 +73592,8 @@ function createTypeChecker(host) { case 80 /* Identifier */: case 11 /* StringLiteral */: case 14 /* RegularExpressionLiteral */: - case 214 /* TaggedTemplateExpression */: - case 227 /* TemplateExpression */: + case 215 /* TaggedTemplateExpression */: + case 228 /* TemplateExpression */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: @@ -73127,25 +73601,25 @@ function createTypeChecker(host) { case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 157 /* UndefinedKeyword */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 220 /* TypeOfExpression */: - case 234 /* NonNullExpression */: - case 284 /* JsxSelfClosingElement */: - case 283 /* JsxElement */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 221 /* TypeOfExpression */: + case 235 /* NonNullExpression */: + case 285 /* JsxSelfClosingElement */: + case 284 /* JsxElement */: return true; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: switch (node.operator) { case 54 /* ExclamationToken */: case 40 /* PlusToken */: @@ -73154,9 +73628,9 @@ function createTypeChecker(host) { return true; } return false; - case 221 /* VoidExpression */: - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 222 /* VoidExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: default: return false; } @@ -73200,7 +73674,7 @@ function createTypeChecker(host) { } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (node.left.kind === 209 /* ObjectLiteralExpression */ || node.left.kind === 208 /* ArrayLiteralExpression */)) { + if (operator === 64 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) { state.skip = true; setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 110 /* ThisKeyword */)); return state; @@ -73225,7 +73699,7 @@ function createTypeChecker(host) { const operator = operatorToken.kind; if (isLogicalOrCoalescingBinaryOperator(operator)) { let parent = node.parent; - while (parent.kind === 216 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent)) { + while (parent.kind === 217 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent)) { parent = parent.parent; } if (operator === 56 /* AmpersandAmpersandToken */ || isIfStatement(parent)) { @@ -73249,7 +73723,7 @@ function createTypeChecker(host) { Debug.assertIsDefined(leftType); const rightType = getLastResult(state); Debug.assertIsDefined(rightType); - result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node); + result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, state.checkMode, node); } state.skip = false; setLeftType( @@ -73301,7 +73775,7 @@ function createTypeChecker(host) { } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (left.kind === 209 /* ObjectLiteralExpression */ || left.kind === 208 /* ArrayLiteralExpression */)) { + if (operator === 64 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 110 /* ThisKeyword */); } let leftType; @@ -73311,9 +73785,9 @@ function createTypeChecker(host) { leftType = checkExpression(left, checkMode); } const rightType = checkExpression(right, checkMode); - return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode); } - function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode) { + function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode) { const operator = operatorToken.kind; switch (operator) { case 42 /* AsteriskToken */: @@ -73470,12 +73944,15 @@ function createTypeChecker(host) { case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - if (isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) { - const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; - error(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); + if (!(checkMode && checkMode & 128 /* TypeOnly */)) { + if ((isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && // only report for === and !== in JS, not == or != + (!isInJSFile(left) || (operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */))) { + const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; + error(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); + } + checkNaNEquality(errorNode, operator, left, right); + reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); } - checkNaNEquality(errorNode, operator, left, right); - reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); return booleanType; case 104 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); @@ -73562,7 +74039,7 @@ function createTypeChecker(host) { } } function isIndirectCall(node) { - return node.parent.kind === 216 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 214 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + return node.parent.kind === 217 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 215 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval"); } function checkForDisallowedESSymbolOperand(operator2) { @@ -73594,7 +74071,7 @@ function createTypeChecker(host) { } function checkAssignmentOperatorWorker() { let assigneeType = leftType; - if (isCompoundAssignment(operatorToken.kind) && left.kind === 210 /* PropertyAccessExpression */) { + if (isCompoundAssignment(operatorToken.kind) && left.kind === 211 /* PropertyAccessExpression */) { assigneeType = checkPropertyAccessExpression( left, /*checkMode*/ @@ -73777,7 +74254,7 @@ function createTypeChecker(host) { } return type; function checkYieldExpressionGrammar() { - if (!(node.flags & 8192 /* YieldContext */)) { + if (!(node.flags & 16384 /* YieldContext */)) { grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { @@ -73786,7 +74263,7 @@ function createTypeChecker(host) { } } function checkConditionalExpression(node, checkMode) { - const type = checkTruthinessExpression(node.condition); + const type = checkTruthinessExpression(node.condition, checkMode); checkTestingKnownTruthyCallableOrAwaitableType(node.condition, type, node.whenTrue); const type1 = checkExpression(node.whenTrue, checkMode); const type2 = checkExpression(node.whenFalse, checkMode); @@ -73807,11 +74284,15 @@ function createTypeChecker(host) { texts.push(span.literal.text); types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType); } - return isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType( + if (isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType( node, /*contextFlags*/ void 0 - ) || unknownType, isTemplateLiteralContextualType) ? getTemplateLiteralType(texts, types) : stringType; + ) || unknownType, isTemplateLiteralContextualType)) { + return getTemplateLiteralType(texts, types); + } + const evaluated = node.parent.kind !== 215 /* TaggedTemplateExpression */ && evaluateTemplateExpression(node); + return evaluated ? getFreshTypeOfLiteralType(getStringLiteralType(evaluated)) : stringType; } function isTemplateLiteralContextualType(type) { return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */)); @@ -73867,7 +74348,7 @@ function createTypeChecker(host) { /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 215 /* TypeAssertionExpression */ || node.kind === 233 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 234 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); @@ -73884,7 +74365,7 @@ function createTypeChecker(host) { void 0, checkMode || 0 /* Normal */ ) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 206 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; } function padTupleType(type, pattern) { const patternElements = pattern.elements; @@ -73892,7 +74373,7 @@ function createTypeChecker(host) { const elementFlags = type.target.elementFlags.slice(); for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) { const e = patternElements[i]; - if (i < patternElements.length - 1 || !(e.kind === 207 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 208 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement( e, /*includePatternInType*/ @@ -73909,7 +74390,7 @@ function createTypeChecker(host) { return createTupleType(elementTypes, elementFlags, type.target.readonly); } function widenTypeInferredFromInitializer(declaration, type) { - const widened = getCombinedNodeFlags(declaration) & 2 /* Const */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); + const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); if (isInJSFile(declaration)) { if (isEmptyLiteralType(widened)) { reportImplicitAny(declaration, anyType); @@ -73953,14 +74434,14 @@ function createTypeChecker(host) { )); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -74116,18 +74597,18 @@ function createTypeChecker(host) { if (quickType) { return quickType; } - if (node.flags & 134217728 /* TypeCached */ && flowTypeCache) { + if (node.flags & 268435456 /* TypeCached */ && flowTypeCache) { const cachedType = flowTypeCache[getNodeId(node)]; if (cachedType) { return cachedType; } } const startInvocationCount = flowInvocationCount; - const type = checkExpression(node); + const type = checkExpression(node, 128 /* TypeOnly */); if (flowInvocationCount !== startInvocationCount) { const cache = flowTypeCache || (flowTypeCache = []); cache[getNodeId(node)] = type; - setNodeFlags(node, node.flags | 134217728 /* TypeCached */); + setNodeFlags(node, node.flags | 268435456 /* TypeCached */); } return type; } @@ -74192,14 +74673,14 @@ function createTypeChecker(host) { return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 211 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 165 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 185 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 280 /* ExportSpecifier */; + const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 281 /* ExportSpecifier */; if (!ok) { error(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } if (getIsolatedModules(compilerOptions)) { Debug.assert(!!(type.symbol.flags & 128 /* ConstEnum */)); const constEnumDeclaration = type.symbol.valueDeclaration; - if (constEnumDeclaration.flags & 16777216 /* Ambient */) { + if (constEnumDeclaration.flags & 33554432 /* Ambient */ && !isValidTypeOnlyAliasUseSite(node)) { error(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); } } @@ -74219,9 +74700,9 @@ function createTypeChecker(host) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -74238,7 +74719,7 @@ function createTypeChecker(host) { return nullWideningType; case 15 /* NoSubstitutionTemplateLiteral */: case 11 /* StringLiteral */: - return hasSkipDirectInferenceFlag(node) ? anyType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -74252,81 +74733,81 @@ function createTypeChecker(host) { return trueType; case 97 /* FalseKeyword */: return falseType; - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return checkTemplateExpression(node); case 14 /* RegularExpressionLiteral */: return globalRegExpType; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (node.expression.kind === 102 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 213 /* NewExpression */: + case 214 /* NewExpression */: return checkCallExpression(node, checkMode); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return checkClassExpression(node); - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return checkAssertion(node, checkMode); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return checkNonNullAssertion(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return checkMetaProperty(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return checkDeleteExpression(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return checkVoidExpression(node); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return checkAwaitExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 231 /* OmittedExpression */: + case 232 /* OmittedExpression */: return undefinedWideningType; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return checkYieldExpression(node); - case 236 /* SyntheticExpression */: + case 237 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return checkJsxElement(node, checkMode); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return checkJsxFragment(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -74378,10 +74859,10 @@ function createTypeChecker(host) { checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 175 /* Constructor */ && nodeIsPresent(func.body))) { + if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 175 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } @@ -74392,13 +74873,13 @@ function createTypeChecker(host) { if (func.parameters.indexOf(node) !== 0) { error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 175 /* Constructor */ || func.kind === 179 /* ConstructSignature */ || func.kind === 184 /* ConstructorType */) { + if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) { error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 218 /* ArrowFunction */) { + if (func.kind === 219 /* ArrowFunction */) { error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 176 /* GetAccessor */ || func.kind === 177 /* SetAccessor */) { + if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) { error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } @@ -74458,13 +74939,13 @@ function createTypeChecker(host) { } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 218 /* ArrowFunction */: - case 178 /* CallSignature */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 219 /* ArrowFunction */: + case 179 /* CallSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: const parent = node.parent; if (node === parent.type) { return parent; @@ -74484,7 +74965,7 @@ function createTypeChecker(host) { predicateVariableName ); return true; - } else if (name.kind === 206 /* ArrayBindingPattern */ || name.kind === 205 /* ObjectBindingPattern */) { + } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -74496,9 +74977,9 @@ function createTypeChecker(host) { } } function checkSignatureDeclaration(node) { - if (node.kind === 180 /* IndexSignature */) { + if (node.kind === 181 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 183 /* FunctionType */ || node.kind === 261 /* FunctionDeclaration */ || node.kind === 184 /* ConstructorType */ || node.kind === 178 /* CallSignature */ || node.kind === 175 /* Constructor */ || node.kind === 179 /* ConstructSignature */) { + } else if (node.kind === 184 /* FunctionType */ || node.kind === 262 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -74522,35 +75003,46 @@ function createTypeChecker(host) { addLazyDiagnostic(checkSignatureDeclarationDiagnostics); function checkSignatureDeclarationDiagnostics() { checkCollisionWithArgumentsInGeneratedCode(node); - const returnTypeNode = getEffectiveReturnTypeNode(node); + let returnTypeNode = getEffectiveReturnTypeNode(node); + let returnTypeErrorLocation = returnTypeNode; + if (isInJSFile(node)) { + const typeTag = getJSDocTypeTag(node); + if (typeTag && typeTag.typeExpression && isTypeReferenceNode(typeTag.typeExpression.type)) { + const signature = getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression)); + if (signature && signature.declaration) { + returnTypeNode = getEffectiveReturnTypeNode(signature.declaration); + returnTypeErrorLocation = typeTag.typeExpression.type; + } + } + } if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 178 /* CallSignature */: + case 179 /* CallSignature */: error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } } - if (returnTypeNode) { + if (returnTypeNode && returnTypeErrorLocation) { const functionFlags2 = getFunctionFlags(node); if ((functionFlags2 & (4 /* Invalid */ | 1 /* Generator */)) === 1 /* Generator */) { const returnType = getTypeFromTypeNode(returnTypeNode); if (returnType === voidType) { - error(returnTypeNode, Diagnostics.A_generator_cannot_have_a_void_type_annotation); + error(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation); } else { const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType; const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType; const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType; const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */)); - checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeNode); + checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation); } } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) { - checkAsyncFunctionReturnType(node, returnTypeNode); + checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation); } } - if (node.kind !== 180 /* IndexSignature */ && node.kind !== 323 /* JSDocFunctionType */) { + if (node.kind !== 181 /* IndexSignature */ && node.kind !== 324 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -74560,7 +75052,7 @@ function createTypeChecker(host) { const staticNames = /* @__PURE__ */ new Map(); const privateIdentifiers = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 175 /* Constructor */) { + if (member.kind === 176 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -74578,16 +75070,16 @@ function createTypeChecker(host) { const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -74628,6 +75120,9 @@ function createTypeChecker(host) { case "length": case "caller": case "arguments": + if (useDefineForClassFields) { + break; + } case "prototype": const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1; const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node)); @@ -74640,7 +75135,7 @@ function createTypeChecker(host) { function checkObjectTypeForDuplicateDeclarations(node) { const names = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 170 /* PropertySignature */) { + if (member.kind === 171 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -74664,7 +75159,7 @@ function createTypeChecker(host) { } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 263 /* InterfaceDeclaration */) { + if (node.kind === 264 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfDeclaration(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -74699,7 +75194,7 @@ function createTypeChecker(host) { checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } @@ -74716,7 +75211,7 @@ function createTypeChecker(host) { error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 173 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { error(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { @@ -74727,7 +75222,7 @@ function createTypeChecker(host) { function setNodeLinksForPrivateIdentifierScope(node) { if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) { for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) { - getNodeLinks(lexicalScope).flags |= 4194304 /* ContainsClassWithPrivateIdentifiers */; + getNodeLinks(lexicalScope).flags |= 1048576 /* ContainsClassWithPrivateIdentifiers */; } if (isClassExpression(node.parent)) { const enclosingIterationStatement = getEnclosingIterationStatement(node.parent); @@ -74761,7 +75256,7 @@ function createTypeChecker(host) { if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 171 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -74773,7 +75268,7 @@ function createTypeChecker(host) { if (classExtendsNull) { error(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); } - const superCallShouldBeRootLevel = (getEmitScriptTarget(compilerOptions) !== 99 /* ESNext */ || !useDefineForClassFields) && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); + const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); if (superCallShouldBeRootLevel) { if (!superCallIsRootLevelInConstructor(superCall, node.body)) { error(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); @@ -74824,20 +75319,20 @@ function createTypeChecker(host) { checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 176 /* GetAccessor */) { - if (!(node.flags & 16777216 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 256 /* HasImplicitReturn */) { - if (!(node.flags & 512 /* HasExplicitReturn */)) { + if (node.kind === 177 /* GetAccessor */) { + if (!(node.flags & 33554432 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 512 /* HasImplicitReturn */) { + if (!(node.flags & 1024 /* HasExplicitReturn */)) { error(node.name, Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfDeclaration(node); - const getter = getDeclarationOfKind(symbol, 176 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); @@ -74853,7 +75348,7 @@ function createTypeChecker(host) { } } const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node)); - if (node.kind === 176 /* GetAccessor */) { + if (node.kind === 177 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -74914,7 +75409,7 @@ function createTypeChecker(host) { } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 182 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { + if (node.kind === 183 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { const sourceFile = getSourceFileOfNode(node); if (scanTokenAtPosition(sourceFile, node.typeName.end) === 25 /* DotToken */) { grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); @@ -74936,7 +75431,7 @@ function createTypeChecker(host) { } const symbol = getNodeLinks(node).resolvedSymbol; if (symbol) { - if (some(symbol.declarations, (d) => isTypeDeclaration(d) && !!(d.flags & 268435456 /* Deprecated */))) { + if (some(symbol.declarations, (d) => isTypeDeclaration(d) && !!(d.flags & 536870912 /* Deprecated */))) { addDeprecatedSuggestion( getDeprecatedSuggestionNode(node), symbol.declarations, @@ -74976,12 +75471,7 @@ function createTypeChecker(host) { const elementTypes = node.elements; let seenOptionalElement = false; let seenRestElement = false; - const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 201 /* NamedTupleMember */ && hasNamedElement) { - grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); - break; - } const flags = getTupleElementFlags(e); if (flags & 8 /* Variadic */) { const type = getTypeFromTypeNode(e.type); @@ -75023,7 +75513,7 @@ function createTypeChecker(host) { const objectType = type.objectType; const indexType = type.indexType; if (isTypeAssignableTo(indexType, getIndexType(objectType, 0 /* None */))) { - if (accessNode.kind === 211 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } return type; @@ -75084,7 +75574,7 @@ function createTypeChecker(host) { forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 193 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -75094,7 +75584,7 @@ function createTypeChecker(host) { if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 167 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { @@ -75132,22 +75622,23 @@ function createTypeChecker(host) { if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 189 /* OptionalType */) { + if (node.type.kind === 190 /* OptionalType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type); } - if (node.type.kind === 190 /* RestType */) { + if (node.type.kind === 191 /* RestType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type); } checkSourceElement(node.type); getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 16777216 /* Ambient */); + return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { - let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 263 /* InterfaceDeclaration */ && n.parent.kind !== 262 /* ClassDeclaration */ && n.parent.kind !== 230 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { - if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { + let flags = getCombinedModifierFlagsCached(n); + if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) { + const container = getEnclosingContainer(n); + if (container && container.flags & 128 /* ExportContext */ && !(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } flags |= 2 /* Ambient */; @@ -75222,7 +75713,7 @@ function createTypeChecker(host) { (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || // Both are computed property names isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) && isTypeIdenticalTo(checkComputedPropertyName(node.name), checkComputedPropertyName(subsequentName)) || // Both are literal property names that are the same. isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); if (reportError) { const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; error(errorNode2, diagnostic); @@ -75253,15 +75744,15 @@ function createTypeChecker(host) { if (declarations) { for (const current of declarations) { const node = current; - const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 263 /* InterfaceDeclaration */ || node.parent.kind === 186 /* TypeLiteral */) || inAmbientContext; + const inAmbientContext = node.flags & 33554432 /* Ambient */; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 264 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 261 /* FunctionDeclaration */ || node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */ || node.kind === 175 /* Constructor */) { + if (node.kind === 262 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -75314,9 +75805,9 @@ function createTypeChecker(host) { }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 262 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 263 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 262 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 261 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 263 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 262 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; if (diagnostic) { addRelatedInfo( error(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), @@ -75396,45 +75887,45 @@ function createTypeChecker(host) { function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return 2 /* ExportType */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 276 /* ExportAssignment */: - case 225 /* BinaryExpression */: + case 277 /* ExportAssignment */: + case 226 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 270 /* ImportEqualsDeclaration */: - case 273 /* NamespaceImport */: - case 272 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 274 /* NamespaceImport */: + case 273 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfDeclaration(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: - case 261 /* FunctionDeclaration */: - case 275 /* ImportSpecifier */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 262 /* FunctionDeclaration */: + case 276 /* ImportSpecifier */: case 80 /* Identifier */: return 1 /* ExportValue */; - case 172 /* MethodSignature */: - case 170 /* PropertySignature */: + case 173 /* MethodSignature */: + case 171 /* PropertySignature */: return 2 /* ExportType */; default: return Debug.failBadSyntaxKind(d); @@ -75630,7 +76121,7 @@ function createTypeChecker(host) { } return typeAsAwaitable.awaitedTypeOfType = type; } - function checkAsyncFunctionReturnType(node, returnTypeNode) { + function checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation) { const returnType = getTypeFromTypeNode(returnTypeNode); if (languageVersion >= 2 /* ES2015 */) { if (isErrorType(returnType)) { @@ -75641,7 +76132,7 @@ function createTypeChecker(host) { true ); if (globalPromiseType !== emptyGenericType && !isReferenceToType(returnType, globalPromiseType)) { - error(returnTypeNode, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); + reportErrorForInvalidReturnType(Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, returnTypeNode, returnTypeErrorLocation, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); return; } } else { @@ -75651,7 +76142,7 @@ function createTypeChecker(host) { } const promiseConstructorName = getEntityNameFromTypeNode(returnTypeNode); if (promiseConstructorName === void 0) { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, typeToString(returnType)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, typeToString(returnType)); return; } const promiseConstructorSymbol = resolveEntityName( @@ -75666,9 +76157,9 @@ function createTypeChecker(host) { /*reportErrors*/ false )) { - error(returnTypeNode, Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); + error(returnTypeErrorLocation, Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } else { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); } return; } @@ -75677,15 +76168,16 @@ function createTypeChecker(host) { true ); if (globalPromiseConstructorLikeType === emptyObjectType) { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); return; } - if (!checkTypeAssignableTo( - promiseConstructorType, - globalPromiseConstructorLikeType, - returnTypeNode, - Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value - )) { + const headMessage = Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value; + const errorInfo = () => returnTypeNode === returnTypeErrorLocation ? void 0 : chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type + ); + if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeErrorLocation, headMessage, errorInfo)) { return; } const rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); @@ -75707,6 +76199,14 @@ function createTypeChecker(host) { node, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member ); + function reportErrorForInvalidReturnType(message, returnTypeNode2, returnTypeErrorLocation2, typeName) { + if (returnTypeNode2 === returnTypeErrorLocation2) { + error(returnTypeErrorLocation2, message, typeName); + } else { + const diag2 = error(returnTypeErrorLocation2, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); + addRelatedInfo(diag2, createDiagnosticForNode(returnTypeNode2, message, typeName)); + } + } } function checkDecorator(node) { const signature = getResolvedSignature(node); @@ -75721,21 +76221,21 @@ function createTypeChecker(host) { let headMessage; const expectedReturnType = decoratorSignature.resolvedReturnType; switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!legacyDecorators) { headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; } - case 168 /* Parameter */: + case 169 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; default: @@ -75825,15 +76325,15 @@ function createTypeChecker(host) { function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 192 /* IntersectionType */: - case 191 /* UnionType */: + case 193 /* IntersectionType */: + case 192 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; } } @@ -75841,13 +76341,13 @@ function createTypeChecker(host) { function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 195 /* ParenthesizedType */ || typeNode.kind === 201 /* NamedTupleMember */) { + while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) { typeNode = typeNode.type; } if (typeNode.kind === 146 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 200 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -75878,7 +76378,7 @@ function createTypeChecker(host) { } if (legacyDecorators) { checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } } else if (languageVersion < 99 /* ESNext */) { @@ -75904,7 +76404,7 @@ function createTypeChecker(host) { if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -75912,27 +76412,28 @@ function createTypeChecker(host) { } } break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - const otherKind = node.kind === 176 /* GetAccessor */ ? 177 /* SetAccessor */ : 176 /* GetAccessor */; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 168 /* Parameter */: + case 169 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } + markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(containingSignature)); break; } } @@ -76042,7 +76543,7 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -76053,7 +76554,7 @@ function createTypeChecker(host) { checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -76061,7 +76562,7 @@ function createTypeChecker(host) { const localSymbol = node.localSymbol || symbol; const firstDeclaration = (_a = localSymbol.declarations) == null ? void 0 : _a.find( // Get first non javascript function declaration - (declaration) => declaration.kind === node.kind && !(declaration.flags & 262144 /* JavaScriptFile */) + (declaration) => declaration.kind === node.kind && !(declaration.flags & 524288 /* JavaScriptFile */) ); if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(localSymbol); @@ -76070,7 +76571,7 @@ function createTypeChecker(host) { checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 172 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); @@ -76106,42 +76607,42 @@ function createTypeChecker(host) { function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 311 /* SourceFile */: - case 266 /* ModuleDeclaration */: - case 240 /* Block */: - case 268 /* CaseBlock */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 312 /* SourceFile */: + case 267 /* ModuleDeclaration */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 175 /* Constructor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 194 /* InferType */: + case 195 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -76160,28 +76661,28 @@ function createTypeChecker(host) { function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 173 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - if (member.kind === 177 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfDeclaration(member); - if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 16777216 /* Ambient */)) { + if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 175 /* Constructor */: + case 176 /* Constructor */: for (const parameter of member.parameters) { if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } break; - case 180 /* IndexSignature */: - case 239 /* SemicolonClassElement */: - case 174 /* ClassStaticBlockDeclaration */: + case 181 /* IndexSignature */: + case 240 /* SemicolonClassElement */: + case 175 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -76205,7 +76706,7 @@ function createTypeChecker(host) { continue; const name = idText(typeParameter.name); const { parent } = typeParameter; - if (parent.kind !== 194 /* InferType */ && parent.typeParameters.every(isTypeParameterUnused)) { + if (parent.kind !== 195 /* InferType */ && parent.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent)) { const sourceFile = getSourceFileOfNode(parent); const range = isJSDocTemplateTag(parent) ? rangeOfNode(parent) : rangeOfTypeParameters(sourceFile, parent.typeParameters); @@ -76263,7 +76764,11 @@ function createTypeChecker(host) { addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId); } } else if (isVariableDeclaration(declaration)) { - addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); + const blockScopeKind = getCombinedNodeFlagsCached(declaration) & 7 /* BlockScoped */; + const name = getNameOfDeclaration(declaration); + if (blockScopeKind !== 4 /* Using */ && blockScopeKind !== 6 /* AwaitUsing */ || !name || !isIdentifierThatStartsWithUnderscore(name)) { + addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); + } } else { const parameter = local.valueDeclaration && tryGetRootParameterDeclaration(local.valueDeclaration); const name = local.valueDeclaration && getNameOfDeclaration(local.valueDeclaration); @@ -76284,7 +76789,7 @@ function createTypeChecker(host) { }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 273 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 274 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); } else { @@ -76295,7 +76800,7 @@ function createTypeChecker(host) { unusedDestructures.forEach(([bindingPattern, bindingElements]) => { const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */; if (bindingPattern.elements.length === bindingElements.length) { - if (bindingElements.length === 1 && bindingPattern.parent.kind === 259 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 260 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 260 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 261 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); @@ -76308,7 +76813,7 @@ function createTypeChecker(host) { }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 242 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -76337,21 +76842,21 @@ function createTypeChecker(host) { switch (name.kind) { case 80 /* Identifier */: return idText(name); - case 206 /* ArrayBindingPattern */: - case 205 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 272 /* ImportClause */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 273 /* NamespaceImport */; + return node.kind === 273 /* ImportClause */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 274 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 272 /* ImportClause */ ? decl : decl.kind === 273 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 273 /* ImportClause */ ? decl : decl.kind === 274 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 240 /* Block */) { + if (node.kind === 241 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -76366,7 +76871,7 @@ function createTypeChecker(host) { } } function checkCollisionWithArgumentsInGeneratedCode(node) { - if (languageVersion >= 2 /* ES2015 */ || !hasRestParameter(node) || node.flags & 16777216 /* Ambient */ || nodeIsMissing(node.body)) { + if (languageVersion >= 2 /* ES2015 */ || !hasRestParameter(node) || node.flags & 33554432 /* Ambient */ || nodeIsMissing(node.body)) { return; } forEach(node.parameters, (p) => { @@ -76379,10 +76884,10 @@ function createTypeChecker(host) { if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */ || node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */ || node.kind === 302 /* PropertyAssignment */) { + if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 303 /* PropertyAssignment */) { return false; } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return false; } if (isImportClause(node) || isImportEqualsDeclaration(node) || isImportSpecifier(node)) { @@ -76435,7 +76940,7 @@ function createTypeChecker(host) { return; } const parent = getDeclarationContainer(node); - if (parent.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(parent)) { + if (parent.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent)) { errorSkippedOn( "noEmit", name, @@ -76453,7 +76958,7 @@ function createTypeChecker(host) { return; } const parent = getDeclarationContainer(node); - if (parent.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(parent) && parent.flags & 2048 /* HasAsyncFunctions */) { + if (parent.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent) && parent.flags & 4096 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -76470,7 +76975,7 @@ function createTypeChecker(host) { } function checkWeakMapSetCollision(node) { const enclosingBlockScope = getEnclosingBlockScopeContainer(node); - if (getNodeCheckFlags(enclosingBlockScope) & 4194304 /* ContainsClassWithPrivateIdentifiers */) { + if (getNodeCheckFlags(enclosingBlockScope) & 1048576 /* ContainsClassWithPrivateIdentifiers */) { Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier"); errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText); } @@ -76484,18 +76989,18 @@ function createTypeChecker(host) { let hasCollision = false; if (isClassExpression(node)) { for (const member of node.members) { - if (getNodeCheckFlags(member) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (getNodeCheckFlags(member) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; break; } } } else if (isFunctionExpression(node)) { - if (getNodeCheckFlags(node) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (getNodeCheckFlags(node) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; } } else { const container = getEnclosingBlockScopeContainer(node); - if (container && getNodeCheckFlags(container) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (container && getNodeCheckFlags(container) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; } } @@ -76519,7 +77024,7 @@ function createTypeChecker(host) { recordPotentialCollisionWithReflectInGeneratedCode(node, name); if (isClassLike(node)) { checkTypeNameIsReserved(name, Diagnostics.Class_name_cannot_be_0); - if (!(node.flags & 16777216 /* Ambient */)) { + if (!(node.flags & 33554432 /* Ambient */)) { checkClassNameCollisionWithObject(name); } } else if (isEnumDeclaration(node)) { @@ -76527,10 +77032,7 @@ function createTypeChecker(host) { } } function checkVarDeclaredNamesNotShadowed(node) { - if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { - return; - } - if (node.kind === 259 /* VariableDeclaration */ && !node.initializer) { + if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } const symbol = getSymbolOfDeclaration(node); @@ -76549,10 +77051,10 @@ function createTypeChecker(host) { false ); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { - if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 260 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 242 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 240 /* Block */ && isFunctionLike(container.parent) || container.kind === 267 /* ModuleBlock */ || container.kind === 266 /* ModuleDeclaration */ || container.kind === 311 /* SourceFile */); + if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 7 /* BlockScoped */) { + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 261 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 243 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 241 /* Block */ && isFunctionLike(container.parent) || container.kind === 268 /* ModuleBlock */ || container.kind === 267 /* ModuleDeclaration */ || container.kind === 312 /* SourceFile */); if (!namesShareScope) { const name = symbolToString(localDeclarationSymbol); error(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); @@ -76573,7 +77075,7 @@ function createTypeChecker(host) { if (!node.name) { return; } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -76587,7 +77089,7 @@ function createTypeChecker(host) { if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 166 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent = node.parent.parent; @@ -76620,7 +77122,7 @@ function createTypeChecker(host) { } } if (isBindingPattern(node.name)) { - if (node.name.kind === 206 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); @@ -76633,7 +77135,7 @@ function createTypeChecker(host) { if (isInAmbientOrTypeNode(node)) { return; } - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 248 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 249 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -76665,15 +77167,40 @@ function createTypeChecker(host) { const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); if (initializer) { const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a = symbol.exports) == null ? void 0 : _a.size); - if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 248 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 249 /* ForInStatement */) { + const initializerType = checkExpressionCached(initializer); checkTypeAssignableToAndOptionallyElaborate( - checkExpressionCached(initializer), + initializerType, type, node, initializer, /*headMessage*/ void 0 ); + const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */; + if (blockScopeKind === 6 /* AwaitUsing */) { + const globalAsyncDisposableType = getGlobalAsyncDisposableType( + /*reportErrors*/ + true + ); + const globalDisposableType = getGlobalDisposableType( + /*reportErrors*/ + true + ); + if (globalAsyncDisposableType !== emptyObjectType && globalDisposableType !== emptyObjectType) { + const optionalDisposableType = getUnionType([globalAsyncDisposableType, globalDisposableType, nullType, undefinedType]); + checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); + } + } else if (blockScopeKind === 4 /* Using */) { + const globalDisposableType = getGlobalDisposableType( + /*reportErrors*/ + true + ); + if (globalDisposableType !== emptyObjectType) { + const optionalDisposableType = getUnionType([globalDisposableType, nullType, undefinedType]); + checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); + } + } } } if (symbol.declarations && symbol.declarations.length > 1) { @@ -76700,9 +77227,9 @@ function createTypeChecker(host) { error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */) { + if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -76710,7 +77237,7 @@ function createTypeChecker(host) { } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 171 /* PropertyDeclaration */ || nextDeclaration.kind === 170 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; + const message = nextDeclaration.kind === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; const declName = declarationNameToString(nextDeclarationName); const err = error( nextDeclarationName, @@ -76727,7 +77254,7 @@ function createTypeChecker(host) { } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 168 /* Parameter */ && right.kind === 259 /* VariableDeclaration */ || left.kind === 259 /* VariableDeclaration */ && right.kind === 168 /* Parameter */) { + if (left.kind === 169 /* Parameter */ && right.kind === 260 /* VariableDeclaration */ || left.kind === 260 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -76747,10 +77274,17 @@ function createTypeChecker(host) { checkGrammarBindingElement(node); return checkVariableLikeDeclaration(node); } + function checkVariableDeclarationList(node) { + const blockScopeKind = getCombinedNodeFlags(node) & 7 /* BlockScoped */; + if (blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */) { + checkExternalEmitHelpers(node, 33554432 /* AddDisposableResourceAndDisposeResources */); + } + forEach(node.declarations, checkSourceElement); + } function checkVariableStatement(node) { if (!checkGrammarModifiers(node) && !checkGrammarVariableDeclarationList(node.declarationList)) - checkGrammarForDisallowedLetOrConstStatement(node); - forEach(node.declarationList.declarations, checkSourceElement); + checkGrammarForDisallowedBlockScopedVariableStatement(node); + checkVariableDeclarationList(node.declarationList); } function checkExpressionStatement(node) { checkGrammarStatementInAmbientContext(node); @@ -76761,7 +77295,7 @@ function createTypeChecker(host) { const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 241 /* EmptyStatement */) { + if (node.thenStatement.kind === 242 /* EmptyStatement */) { error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -76887,13 +77421,13 @@ function createTypeChecker(host) { } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 260 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 261 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 260 /* VariableDeclarationList */) { - forEach(node.initializer.declarations, checkVariableDeclaration); + if (node.initializer.kind === 261 /* VariableDeclarationList */) { + checkVariableDeclarationList(node.initializer); } else { checkExpression(node.initializer); } @@ -76912,7 +77446,7 @@ function createTypeChecker(host) { const container = getContainingFunctionOrClassStaticBlock(node); if (node.awaitModifier) { if (container && isClassStaticBlockDeclaration(container)) { - grammarErrorOnNode(node.awaitModifier, Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block); + grammarErrorOnNode(node.awaitModifier, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block); } else { const functionFlags = getFunctionFlags(container); if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < 99 /* ESNext */) { @@ -76922,12 +77456,12 @@ function createTypeChecker(host) { } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 260 /* VariableDeclarationList */) { - checkForInOrForOfVariableDeclaration(node); + if (node.initializer.kind === 261 /* VariableDeclarationList */) { + checkVariableDeclarationList(node.initializer); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 208 /* ArrayLiteralExpression */ || varExpr.kind === 209 /* ObjectLiteralExpression */) { + if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -76949,16 +77483,16 @@ function createTypeChecker(host) { function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 260 /* VariableDeclarationList */) { + if (node.initializer.kind === 261 /* VariableDeclarationList */) { const variable = node.initializer.declarations[0]; if (variable && isBindingPattern(variable.name)) { error(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } - checkForInOrForOfVariableDeclaration(node); + checkVariableDeclarationList(node.initializer); } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 208 /* ArrayLiteralExpression */ || varExpr.kind === 209 /* ObjectLiteralExpression */) { + if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); @@ -76978,13 +77512,6 @@ function createTypeChecker(host) { registerForUnusedIdentifiersCheck(node); } } - function checkForInOrForOfVariableDeclaration(iterationStatement) { - const variableDeclarationList = iterationStatement.initializer; - if (variableDeclarationList.declarations.length >= 1) { - const decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); - } - } function checkRightHandSideOfForOf(statement) { const use = statement.awaitModifier ? 15 /* ForAwaitOf */ : 13 /* ForOf */; return checkIteratedTypeOrElementType(use, checkNonNullExpression(statement.expression), undefinedType, statement.expression); @@ -77641,11 +78168,11 @@ function createTypeChecker(host) { const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 177 /* SetAccessor */) { + if (container.kind === 178 /* SetAccessor */) { if (node.expression) { error(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 175 /* Constructor */) { + } else if (container.kind === 176 /* Constructor */) { if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) { error(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } @@ -77662,13 +78189,13 @@ function createTypeChecker(host) { checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 175 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { + } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { error(node, Diagnostics.Not_all_code_paths_return_a_value); } } function checkWithStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.flags & 32768 /* AwaitContext */) { + if (node.flags & 65536 /* AwaitContext */) { grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block); } } @@ -77686,7 +78213,7 @@ function createTypeChecker(host) { let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 296 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 297 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -77694,7 +78221,7 @@ function createTypeChecker(host) { hasDuplicateDefaultClause = true; } } - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); @@ -77726,7 +78253,7 @@ function createTypeChecker(host) { if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 255 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 256 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -77816,8 +78343,8 @@ function createTypeChecker(host) { return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 263 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 225 /* BinaryExpression */ || name && name.kind === 166 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 226 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -77841,7 +78368,7 @@ function createTypeChecker(host) { function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 263 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -77947,7 +78474,7 @@ function createTypeChecker(host) { function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 182 /* TypeReference */) { + if (node.kind === 183 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { @@ -78017,7 +78544,7 @@ function createTypeChecker(host) { node ); const willTransformPrivateElementsOrClassStaticBlocks = languageVersion <= 9 /* ES2022 */; - const willTransformInitializers = !useDefineForClassFields || languageVersion < 9 /* ES2022 */; + const willTransformInitializers = !emitStandardClassFields; if (willTransformStaticElementsOfDecoratedClass || willTransformPrivateElementsOrClassStaticBlocks) { for (const member of node.members) { if (willTransformStaticElementsOfDecoratedClass && classElementOrClassElementParameterIsDecorated( @@ -78098,7 +78625,7 @@ function createTypeChecker(host) { checkTypeParameterListsIdentical(symbol); checkFunctionOrConstructorSymbol(symbol); checkClassForDuplicateDeclarations(node); - const nodeInAmbientContext = !!(node.flags & 16777216 /* Ambient */); + const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); if (!nodeInAmbientContext) { checkClassForStaticPropertyNameConflicts(node); } @@ -78269,7 +78796,7 @@ function createTypeChecker(host) { } function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, memberName, errorNode) { const isJs = isInJSFile(node); - const nodeInAmbientContext = !!(node.flags & 16777216 /* Ambient */); + const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) { const memberEscapedName = escapeLeadingUnderscores(memberName); const thisType = memberIsStatic ? staticType : typeWithThis; @@ -78403,7 +78930,7 @@ function createTypeChecker(host) { return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 262 /* ClassDeclaration */ || d.kind === 263 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a, _b, _c, _d; @@ -78442,7 +78969,7 @@ function createTypeChecker(host) { typeToString(baseType) ); } - if (derivedClassDecl.kind === 230 /* ClassExpression */) { + if (derivedClassDecl.kind === 231 /* ClassExpression */) { addRelatedInfo( inheritedAbstractMemberNotImplementedError, createDiagnosticForNode( @@ -78483,8 +79010,8 @@ function createTypeChecker(host) { const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { - const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 171 /* PropertyDeclaration */ && !d.initializer); - if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) { + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer); + if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { @@ -78571,7 +79098,7 @@ function createTypeChecker(host) { return ok; } function checkPropertyInitialization(node) { - if (!strictNullChecks || !strictPropertyInitialization || node.flags & 16777216 /* Ambient */) { + if (!strictNullChecks || !strictPropertyInitialization || node.flags & 33554432 /* Ambient */) { return; } const constructor = findConstructorDeclaration(node); @@ -78593,7 +79120,7 @@ function createTypeChecker(host) { } } function isPropertyWithoutInitializer(node) { - return node.kind === 171 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -78627,7 +79154,7 @@ function createTypeChecker(host) { checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfDeclaration(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 263 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 264 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -78690,7 +79217,7 @@ function createTypeChecker(host) { if (member.initializer) { return computeConstantValue(member); } - if (member.parent.flags & 16777216 /* Ambient */ && !isEnumConst(member.parent)) { + if (member.parent.flags & 33554432 /* Ambient */ && !isEnumConst(member.parent)) { return void 0; } if (autoValue !== void 0) { @@ -78709,7 +79236,7 @@ function createTypeChecker(host) { } } else if (isConstEnum) { error(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); - } else if (member.parent.flags & 16777216 /* Ambient */) { + } else if (member.parent.flags & 33554432 /* Ambient */) { error(initializer, Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression); } else { checkTypeAssignableTo(checkExpression(initializer), numberType, initializer, Diagnostics.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values); @@ -78718,7 +79245,7 @@ function createTypeChecker(host) { } function evaluate(expr, location) { switch (expr.kind) { - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const value = evaluate(expr.operand, location); if (typeof value === "number") { switch (expr.operator) { @@ -78731,7 +79258,7 @@ function createTypeChecker(host) { } } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const left = evaluate(expr.left, location); const right = evaluate(expr.right, location); if (typeof left === "number" && typeof right === "number") { @@ -78768,18 +79295,30 @@ function createTypeChecker(host) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return expr.text; - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return evaluateTemplateExpression(expr, location); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return evaluate(expr.expression, location); - case 80 /* Identifier */: - if (isInfinityOrNaNString(expr.escapedText)) { - return +expr.escapedText; + case 80 /* Identifier */: { + const identifier = expr; + if (isInfinityOrNaNString(identifier.escapedText) && resolveEntityName( + identifier, + 111551 /* Value */, + /*ignoreErrors*/ + true + ) === getGlobalSymbol( + identifier.escapedText, + 111551 /* Value */, + /*diagnostic*/ + void 0 + )) { + return +identifier.escapedText; } - case 210 /* PropertyAccessExpression */: + } + case 211 /* PropertyAccessExpression */: if (isEntityNameExpression(expr)) { const symbol = resolveEntityName( expr, @@ -78789,18 +79328,18 @@ function createTypeChecker(host) { ); if (symbol) { if (symbol.flags & 8 /* EnumMember */) { - return evaluateEnumMember(expr, symbol, location); + return location ? evaluateEnumMember(expr, symbol, location) : getEnumMemberValue(symbol.valueDeclaration); } - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; - if (declaration && !declaration.type && declaration.initializer && declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location)) { + if (declaration && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { return evaluate(declaration.initializer, declaration); } } } } break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const root = expr.expression; if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { const rootSymbol = resolveEntityName( @@ -78813,7 +79352,7 @@ function createTypeChecker(host) { const name = escapeLeadingUnderscores(expr.argumentExpression.text); const member = rootSymbol.exports.get(name); if (member) { - return evaluateEnumMember(expr, member, location); + return location ? evaluateEnumMember(expr, member, location) : getEnumMemberValue(member.valueDeclaration); } } } @@ -78867,7 +79406,7 @@ function createTypeChecker(host) { } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 265 /* EnumDeclaration */) { + if (declaration.kind !== 266 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -78897,7 +79436,7 @@ function createTypeChecker(host) { const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 262 /* ClassDeclaration */ || declaration.kind === 261 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 262 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 33554432 /* Ambient */)) { return declaration; } } @@ -78926,7 +79465,7 @@ function createTypeChecker(host) { function checkModuleDeclarationDiagnostics() { var _a, _b; const isGlobalAugmentation = isGlobalScopeAugmentation(node); - const inAmbientContext = node.flags & 16777216 /* Ambient */; + const inAmbientContext = node.flags & 33554432 /* Ambient */; if (isGlobalAugmentation && !inAmbientContext) { error(node.name, Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); } @@ -78958,12 +79497,12 @@ function createTypeChecker(host) { error(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - const mergedClass = getDeclarationOfKind(symbol, 262 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 263 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; } } - if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 311 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 95 /* ExportKeyword */); if (exportModifier) { error(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); @@ -78996,21 +79535,21 @@ function createTypeChecker(host) { } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 207 /* BindingElement */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 260 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -79018,12 +79557,12 @@ function createTypeChecker(host) { } break; } - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 261 /* FunctionDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 262 /* FunctionDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -79034,12 +79573,12 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 80 /* Identifier */); return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -79058,9 +79597,9 @@ function createTypeChecker(host) { error(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 267 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 311 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 277 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -79089,8 +79628,8 @@ function createTypeChecker(host) { symbol = getMergedSymbol(symbol.exportSymbol || symbol); if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) { const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node; - Debug.assert(node.kind !== 279 /* NamespaceExport */); - if (node.kind === 280 /* ExportSpecifier */) { + Debug.assert(node.kind !== 280 /* NamespaceExport */); + if (node.kind === 281 /* ExportSpecifier */) { const diag2 = error(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); const alreadyExportedSymbol = (_b = (_a = getSourceFileOfNode(node).symbol) == null ? void 0 : _a.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText); if (alreadyExportedSymbol === target) { @@ -79104,7 +79643,7 @@ function createTypeChecker(host) { } } } else { - Debug.assert(node.kind !== 259 /* VariableDeclaration */); + Debug.assert(node.kind !== 260 /* VariableDeclaration */); const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)); const moduleSpecifier = (importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) ?? "..."; const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName); @@ -79117,36 +79656,36 @@ function createTypeChecker(host) { } return; } - const targetFlags = getAllSymbolFlags(target); + const targetFlags = getSymbolFlags(target); const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (targetFlags & excludedMeanings) { - const message = node.kind === 280 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); } - if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { + if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */)) { const typeOnlyAlias = getTypeOnlyAliasDeclaration(symbol); const isType = !(targetFlags & 111551 /* Value */); if (isType || typeOnlyAlias) { switch (node.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 270 /* ImportEqualsDeclaration */: { + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 271 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports || compilerOptions.verbatimModuleSyntax) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? compilerOptions.verbatimModuleSyntax ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled : compilerOptions.verbatimModuleSyntax ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled; - const name = idText(node.kind === 275 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 276 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( error(node, message, name), isType ? void 0 : typeOnlyAlias, name ); } - if (isType && node.kind === 270 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; } - case 280 /* ExportSpecifier */: { + case 281 /* ExportSpecifier */: { if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const name = idText(node.propertyName || node.name); const diagnostic = isType ? error(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); @@ -79156,7 +79695,7 @@ function createTypeChecker(host) { } } } - if (compilerOptions.verbatimModuleSyntax && node.kind !== 270 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && node.kind !== 271 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } @@ -79199,7 +79738,7 @@ function createTypeChecker(host) { function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 275 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 276 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -79246,7 +79785,7 @@ function createTypeChecker(host) { checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -79272,10 +79811,10 @@ function createTypeChecker(host) { if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 282 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfDeclaration(node)); if (target !== unknownSymbol) { - const targetFlags = getAllSymbolFlags(target); + const targetFlags = getSymbolFlags(target); if (targetFlags & 111551 /* Value */) { const moduleName = getFirstIdentifier(node.moduleReference); if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { @@ -79290,7 +79829,7 @@ function createTypeChecker(host) { grammarErrorOnNode(node, Diagnostics.An_import_alias_cannot_use_import_type); } } else { - if (moduleKind >= 5 /* ES2015 */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 16777216 /* Ambient */)) { + if (moduleKind >= 5 /* ES2015 */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 33554432 /* Ambient */)) { grammarErrorOnNode(node, Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead); } } @@ -79310,9 +79849,9 @@ function createTypeChecker(host) { if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 267 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 267 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 311 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 268 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 33554432 /* Ambient */; + if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { @@ -79337,13 +79876,13 @@ function createTypeChecker(host) { } function checkGrammarExportDeclaration(node) { var _a; - if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 278 /* NamedExports */) { + if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 279 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 311 /* SourceFile */ || node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 266 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 312 /* SourceFile */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 267 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -79415,7 +79954,7 @@ function createTypeChecker(host) { markExportAsReferenced(node); } const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol); - if (!target || getAllSymbolFlags(target) & 111551 /* Value */) { + if (!target || getSymbolFlags(target) & 111551 /* Value */) { checkExpressionCached(node.propertyName || node.name); } } @@ -79430,8 +79969,8 @@ function createTypeChecker(host) { if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 311 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 266 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { @@ -79446,7 +79985,7 @@ function createTypeChecker(host) { if (typeAnnotationNode) { checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression); } - const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */); + const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */); if (node.expression.kind === 80 /* Identifier */) { const id = node.expression; const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName( @@ -79460,16 +79999,16 @@ function createTypeChecker(host) { )); if (sym) { markAliasReferenced(sym, id); - if (getAllSymbolFlags(sym) & 111551 /* Value */) { + if (getSymbolFlags(sym) & 111551 /* Value */) { checkExpressionCached(id); - if (!isIllegalExportDefaultInCJS && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) { + if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) { error( id, node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : Diagnostics.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration, idText(id) ); } - } else if (!isIllegalExportDefaultInCJS && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax) { + } else if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax) { error( id, node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type : Diagnostics.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type, @@ -79493,13 +80032,13 @@ function createTypeChecker(host) { error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } checkExternalModuleExports(container); - if (node.flags & 16777216 /* Ambient */ && !isEntityNameExpression(node.expression)) { + if (node.flags & 33554432 /* Ambient */ && !isEntityNameExpression(node.expression)) { grammarErrorOnNode(node.expression, Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context); } if (node.isExportEquals) { - if (moduleKind >= 5 /* ES2015 */ && (node.flags & 16777216 /* Ambient */ && getSourceFileOfNode(node).impliedNodeFormat === 99 /* ESNext */ || !(node.flags & 16777216 /* Ambient */) && getSourceFileOfNode(node).impliedNodeFormat !== 1 /* CommonJS */)) { + if (moduleKind >= 5 /* ES2015 */ && (node.flags & 33554432 /* Ambient */ && getSourceFileOfNode(node).impliedNodeFormat === 99 /* ESNext */ || !(node.flags & 33554432 /* Ambient */) && getSourceFileOfNode(node).impliedNodeFormat !== 1 /* CommonJS */)) { grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead); - } else if (moduleKind === 4 /* System */ && !(node.flags & 16777216 /* Ambient */)) { + } else if (moduleKind === 4 /* System */ && !(node.flags & 33554432 /* Ambient */)) { grammarErrorOnNode(node, Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system); } } @@ -79572,182 +80111,182 @@ function createTypeChecker(host) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 242 /* FirstStatement */ && kind <= 258 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 243 /* FirstStatement */ && kind <= 259 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return checkTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return checkParameter(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checkPropertySignature(node); - case 184 /* ConstructorType */: - case 183 /* FunctionType */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 185 /* ConstructorType */: + case 184 /* FunctionType */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return checkSignatureDeclaration(node); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return checkMethodDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return checkConstructorDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return checkAccessorDeclaration(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return checkTypeReferenceNode(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return checkTypePredicate(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return checkTypeQuery(node); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return checkTypeLiteral(node); - case 187 /* ArrayType */: + case 188 /* ArrayType */: return checkArrayType(node); - case 188 /* TupleType */: + case 189 /* TupleType */: return checkTupleType(node); - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 195 /* ParenthesizedType */: - case 189 /* OptionalType */: - case 190 /* RestType */: + case 196 /* ParenthesizedType */: + case 190 /* OptionalType */: + case 191 /* RestType */: return checkSourceElement(node.type); - case 196 /* ThisType */: + case 197 /* ThisType */: return checkThisType(node); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return checkTypeOperator(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return checkConditionalType(node); - case 194 /* InferType */: + case 195 /* InferType */: return checkInferType(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return checkImportType(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 330 /* JSDocLink */: - case 331 /* JSDocLinkCode */: - case 332 /* JSDocLinkPlain */: + case 331 /* JSDocLink */: + case 332 /* JSDocLinkCode */: + case 333 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 321 /* JSDocNonNullableType */: - case 320 /* JSDocNullableType */: - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: - case 328 /* JSDocTypeLiteral */: + case 322 /* JSDocNonNullableType */: + case 321 /* JSDocNullableType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: + case 329 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 315 /* JSDocTypeExpression */: + case 316 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 339 /* JSDocPublicTag */: - case 341 /* JSDocProtectedTag */: - case 340 /* JSDocPrivateTag */: + case 340 /* JSDocPublicTag */: + case 342 /* JSDocProtectedTag */: + case 341 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 356 /* JSDocSatisfiesTag */: + case 357 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return checkMappedType(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 240 /* Block */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 268 /* ModuleBlock */: return checkBlock(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return checkVariableStatement(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return checkExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return checkIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return checkDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return checkWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return checkForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return checkForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return checkForOfStatement(node); - case 250 /* ContinueStatement */: - case 251 /* BreakStatement */: + case 251 /* ContinueStatement */: + case 252 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return checkReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return checkWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return checkSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return checkLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return checkThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return checkTryStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return checkBindingElement(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return checkClassDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return checkImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return checkExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return checkExportAssignment(node); - case 241 /* EmptyStatement */: - case 258 /* DebuggerStatement */: + case 242 /* EmptyStatement */: + case 259 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -79846,38 +80385,38 @@ function createTypeChecker(host) { currentNode = node; instantiationCount = 0; switch (node.kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 285 /* JsxOpeningElement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 286 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 283 /* JsxElement */: + case 284 /* JsxElement */: checkJsxElementDeferred(node); break; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: - case 216 /* ParenthesizedExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 217 /* ParenthesizedExpression */: checkAssertionDeferred(node); } currentNode = saveCurrentNode; @@ -79935,7 +80474,7 @@ function createTypeChecker(host) { addLazyDiagnostic(() => { if (!node.isDeclarationFile && (compilerOptions.noUnusedLocals || compilerOptions.noUnusedParameters)) { checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(node), (containingNode, kind, diag2) => { - if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 16777216 /* Ambient */))) { + if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) { diagnostics.add(diag2); } }); @@ -80014,7 +80553,7 @@ function createTypeChecker(host) { return diagnostics.getGlobalDiagnostics(); } function getSymbolsInScope(location, meaning) { - if (location.flags & 33554432 /* InWithStatement */) { + if (location.flags & 67108864 /* InWithStatement */) { return []; } const symbols = createSymbolTable(); @@ -80028,27 +80567,27 @@ function createTypeChecker(host) { copySymbols(location.locals, meaning); } switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalModule(location)) break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */); break; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */); } break; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -80081,7 +80620,7 @@ function createTypeChecker(host) { function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 280 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 279 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) { copySymbol(symbol, meaning2); } }); @@ -80092,16 +80631,16 @@ function createTypeChecker(host) { return name.kind === 80 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 182 /* TypeReference */; + return node.parent.kind === 183 /* TypeReference */; } function isInNameOfExpressionWithTypeArguments(node) { - while (node.parent.kind === 210 /* PropertyAccessExpression */) { + while (node.parent.kind === 211 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 232 /* ExpressionWithTypeArguments */; + return node.parent.kind === 233 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -80127,13 +80666,13 @@ function createTypeChecker(host) { return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 165 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 270 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 271 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 276 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 277 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -80159,7 +80698,7 @@ function createTypeChecker(host) { node = parent; parent = parent.parent; } - if (parent && parent.kind === 204 /* ImportType */ && parent.qualifier === node) { + if (parent && parent.kind === 205 /* ImportType */ && parent.qualifier === node) { return parent; } return void 0; @@ -80181,7 +80720,7 @@ function createTypeChecker(host) { /*contextFlags*/ void 0 ); - const type = contextualType && getThisTypeFromContextualType(contextualType); + const type = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); return type && !isTypeAny(type); } } @@ -80191,7 +80730,7 @@ function createTypeChecker(host) { if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 210 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name) && !isThisPropertyAndThisTyped(name.parent)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -80199,7 +80738,7 @@ function createTypeChecker(host) { } } } - if (name.parent.kind === 276 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 277 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, /*all meanings*/ @@ -80211,7 +80750,7 @@ function createTypeChecker(host) { return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 270 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 271 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals( name, @@ -80232,7 +80771,7 @@ function createTypeChecker(host) { } if (isInNameOfExpressionWithTypeArguments(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 232 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 233 /* ExpressionWithTypeArguments */) { meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -80251,10 +80790,10 @@ function createTypeChecker(host) { return entityNameSymbol; } } - if (name.parent.kind === 347 /* JSDocParameterTag */) { + if (name.parent.kind === 348 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 167 /* TypeParameter */ && name.parent.parent.kind === 351 /* JSDocTemplateTag */) { + if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 352 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -80307,12 +80846,12 @@ function createTypeChecker(host) { return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 210 /* PropertyAccessExpression */ || name.kind === 165 /* QualifiedName */) { + } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 210 /* PropertyAccessExpression */) { + if (name.kind === 211 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -80352,7 +80891,7 @@ function createTypeChecker(host) { return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 182 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName( name, meaning, @@ -80363,7 +80902,7 @@ function createTypeChecker(host) { ); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 181 /* TypePredicate */) { + if (name.parent.kind === 182 /* TypePredicate */) { return resolveEntityName( name, /*meaning*/ @@ -80404,7 +80943,7 @@ function createTypeChecker(host) { } const { parent } = node; const grandParent = parent.parent; - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } if (isDeclarationNameOrImportPropertyName(node)) { @@ -80416,7 +80955,7 @@ function createTypeChecker(host) { if (node.kind === 80 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent.kind === 207 /* BindingElement */ && grandParent.kind === 205 /* ObjectBindingPattern */ && node === parent.propertyName) { + } else if (parent.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { @@ -80435,8 +80974,8 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: case 81 /* PrivateIdentifier */: - case 210 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } @@ -80457,19 +80996,19 @@ function createTypeChecker(host) { if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 196 /* ThisType */: + case 197 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; case 108 /* SuperKeyword */: return checkExpression(node).symbol; case 137 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 175 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) { return constructorDeclaration.parent.symbol; } return void 0; case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 271 /* ImportDeclaration */ || node.parent.kind === 277 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 272 /* ImportDeclaration */ || node.parent.kind === 278 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( node.parent, /*requireStringLiteralLikeArgument*/ false @@ -80487,16 +81026,16 @@ function createTypeChecker(host) { case 39 /* EqualsGreaterThanToken */: case 86 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 204 /* ImportType */: + case 205 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; case 95 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; case 102 /* ImportKeyword */: case 105 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return checkExpression(node).symbol; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) { const symbol = getIntrinsicTagSymbol(node.parent); return symbol === unknownSymbol ? void 0 : symbol; @@ -80515,7 +81054,7 @@ function createTypeChecker(host) { return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 303 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 304 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); } return void 0; @@ -80531,7 +81070,7 @@ function createTypeChecker(host) { if (isSourceFile(node) && !isExternalModule(node)) { return errorType; } - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return errorType; } const classDecl = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); @@ -80595,16 +81134,16 @@ function createTypeChecker(host) { return errorType; } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 209 /* ObjectLiteralExpression */ || expr.kind === 208 /* ArrayLiteralExpression */); - if (expr.parent.kind === 249 /* ForOfStatement */) { + Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */); + if (expr.parent.kind === 250 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 225 /* BinaryExpression */) { + if (expr.parent.kind === 226 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 302 /* PropertyAssignment */) { + if (expr.parent.kind === 303 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -80637,7 +81176,7 @@ function createTypeChecker(host) { case 9 /* NumericLiteral */: case 11 /* StringLiteral */: return getStringLiteralType(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -80707,7 +81246,7 @@ function createTypeChecker(host) { return symbolLinks2.exportsSomeValue; function isValue(s) { s = resolveSymbol(s); - return s && !!(getAllSymbolFlags(s) & 111551 /* Value */); + return s && !!(getSymbolFlags(s) & 111551 /* Value */); } } function isNameOfModuleOrEnumDeclaration(node) { @@ -80732,7 +81271,7 @@ function createTypeChecker(host) { } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 311 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 312 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -80762,7 +81301,7 @@ function createTypeChecker(host) { return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 298 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 299 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -80790,7 +81329,7 @@ function createTypeChecker(host) { /*lookInLabeledStatements*/ false ); - const inLoopBodyBlock = container.kind === 240 /* Block */ && isIterationStatement( + const inLoopBodyBlock = container.kind === 241 /* Block */ && isIterationStatement( container.parent, /*lookInLabeledStatements*/ false @@ -80830,31 +81369,35 @@ function createTypeChecker(host) { function isValueAliasDeclaration(node) { Debug.assert(canCollectSymbolAliasAccessabilityData); switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfDeclaration(node)); - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: const symbol = getSymbolOfDeclaration(node); - return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 277 /* ExportDeclaration */: + return !!symbol && isAliasResolvedToValue( + symbol, + /*excludeTypeOnlyValues*/ + true + ); + case 278 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfDeclaration(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 311 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 312 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node)); return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference); } - function isAliasResolvedToValue(symbol) { + function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) { if (!symbol) { return false; } @@ -80862,7 +81405,12 @@ function createTypeChecker(host) { if (target === unknownSymbol) { return true; } - return !!((getAllSymbolFlags(target) ?? -1) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target)); + return !!(getSymbolFlags( + symbol, + excludeTypeOnlyValues, + /*excludeLocalMeanings*/ + true + ) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target)); } function isConstEnumOrConstEnumOnlyModule(s) { return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; @@ -80876,7 +81424,7 @@ function createTypeChecker(host) { return true; } const target = getSymbolLinks(symbol).aliasTarget; - if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getAllSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { + if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { return true; } } @@ -80938,15 +81486,15 @@ function createTypeChecker(host) { } function canHaveConstantValue(node) { switch (node.kind) { - case 305 /* EnumMember */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 306 /* EnumMember */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 305 /* EnumMember */) { + if (node.kind === 306 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -81146,24 +81694,24 @@ function createTypeChecker(host) { if (symbol) { return filter(getExportSymbolOfValueSymbolIfExported(symbol).declarations, (declaration) => { switch (declaration.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 305 /* EnumMember */: - case 209 /* ObjectLiteralExpression */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 265 /* EnumDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 266 /* ModuleDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 306 /* EnumMember */: + case 210 /* ObjectLiteralExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 266 /* EnumDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 267 /* ModuleDeclaration */: return true; } return false; @@ -81174,7 +81722,7 @@ function createTypeChecker(host) { return void 0; } function isLiteralConstDeclaration(node) { - if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { + if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node)) { return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } return false; @@ -81292,12 +81840,12 @@ function createTypeChecker(host) { getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 177 /* SetAccessor */ ? 176 /* GetAccessor */ : 177 /* SetAccessor */; + const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 177 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 176 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -81318,7 +81866,7 @@ function createTypeChecker(host) { }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 311 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 312 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfDeclaration(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -81353,18 +81901,18 @@ function createTypeChecker(host) { return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 232 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 297 /* HeritageClause */; + return node.parent && node.parent.kind === 233 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 298 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 80 /* Identifier */ && isInTypeQuery(node) || node.kind === 210 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 80 /* Identifier */ && isInTypeQuery(node) || node.kind === 211 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -81407,7 +81955,7 @@ function createTypeChecker(host) { break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 311 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 312 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -81432,7 +81980,7 @@ function createTypeChecker(host) { } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 266 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 267 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker( specifier, specifier, @@ -81442,7 +81990,7 @@ function createTypeChecker(host) { if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 311 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 312 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -81624,11 +82172,11 @@ function createTypeChecker(host) { function checkExternalEmitHelpers(location, helpers) { if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) { const sourceFile = getSourceFileOfNode(location); - if (isEffectiveExternalModule(sourceFile, compilerOptions) && !(location.flags & 16777216 /* Ambient */)) { + if (isEffectiveExternalModule(sourceFile, compilerOptions) && !(location.flags & 33554432 /* Ambient */)) { const helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { const uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (let helper = 1 /* FirstEmitHelper */; helper <= 16777216 /* LastEmitHelper */; helper <<= 1) { + for (let helper = 1 /* FirstEmitHelper */; helper <= 33554432 /* LastEmitHelper */; helper <<= 1) { if (uncheckedHelpers & helper) { for (const name of getHelperNames(helper)) { if (requestedExternalEmitHelperNames.has(name)) @@ -81710,6 +82258,8 @@ function createTypeChecker(host) { return ["__setFunctionName"]; case 16777216 /* PropKey */: return ["__propKey"]; + case 33554432 /* AddDisposableResourceAndDisposeResources */: + return ["__addDisposableResource", "__disposeResources"]; default: return Debug.fail("Unrecognized helper"); } @@ -81728,6 +82278,7 @@ function createTypeChecker(host) { if (isParameter(node) && parameterIsThisKeyword(node)) { return grammarErrorOnFirstToken(node, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters); } + const blockScopeKind = isVariableStatement(node) ? node.declarationList.flags & 7 /* BlockScoped */ : 0 /* None */; let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator; let flags = 0 /* None */; let sawExportBeforeDecorators = false; @@ -81735,12 +82286,12 @@ function createTypeChecker(host) { for (const modifier of node.modifiers) { if (isDecorator(modifier)) { if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - if (node.kind === 173 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { + if (node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); } - } else if (legacyDecorators && (node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */)) { + } else if (legacyDecorators && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */)) { const accessors = getAllAccessorDeclarations(node.parent.members, node); if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -81770,29 +82321,29 @@ function createTypeChecker(host) { firstDecorator ?? (firstDecorator = modifier); } else { if (modifier.kind !== 148 /* ReadonlyKeyword */) { - if (node.kind === 170 /* PropertySignature */ || node.kind === 172 /* MethodSignature */) { + if (node.kind === 171 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 180 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); } } if (modifier.kind !== 103 /* InKeyword */ && modifier.kind !== 147 /* OutKeyword */ && modifier.kind !== 87 /* ConstKeyword */) { - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { case 87 /* ConstKeyword */: - if (node.kind !== 265 /* EnumDeclaration */ && node.kind !== 167 /* TypeParameter */) { + if (node.kind !== 266 /* EnumDeclaration */ && node.kind !== 168 /* TypeParameter */) { return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(87 /* ConstKeyword */)); } const parent = node.parent; - if (node.kind === 167 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent) || isClassLike(parent) || isFunctionTypeNode(parent) || isConstructorTypeNode(parent) || isCallSignatureDeclaration(parent) || isConstructSignatureDeclaration(parent) || isMethodSignature(parent))) { + if (node.kind === 168 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent) || isClassLike(parent) || isFunctionTypeNode(parent) || isConstructorTypeNode(parent) || isCallSignatureDeclaration(parent) || isConstructSignatureDeclaration(parent) || isMethodSignature(parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind)); } break; - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: if (flags & 16384 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); } else if (flags & 2 /* Ambient */) { @@ -81823,7 +82374,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); } else if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); - } else if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { if (modifier.kind === 123 /* PrivateKeyword */) { @@ -81845,9 +82396,9 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); - } else if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); @@ -81864,7 +82415,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); } else if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); - } else if (node.kind !== 171 /* PropertyDeclaration */) { + } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; @@ -81872,7 +82423,7 @@ function createTypeChecker(host) { case 148 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 180 /* IndexSignature */ && node.kind !== 168 /* Parameter */) { + } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); @@ -81880,8 +82431,8 @@ function createTypeChecker(host) { flags |= 64 /* Readonly */; break; case 95 /* ExportKeyword */: - if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 264 /* TypeAliasDeclaration */ && node.kind !== 263 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later - node.kind !== 266 /* ModuleDeclaration */ && node.parent.kind === 311 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later + node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } if (flags & 1 /* Export */) { @@ -81894,15 +82445,23 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "export"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); } flags |= 1 /* Export */; break; case 90 /* DefaultKeyword */: - const container = node.parent.kind === 311 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 266 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); } else if (!(flags & 1 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); } else if (sawExportBeforeDecorators) { @@ -81919,9 +82478,13 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 267 /* ModuleBlock */) { + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "declare"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "declare"); + } else if (node.parent.flags & 33554432 /* Ambient */ && node.parent.kind === 268 /* ModuleBlock */) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); @@ -81935,12 +82498,12 @@ function createTypeChecker(host) { if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 262 /* ClassDeclaration */ && node.kind !== 184 /* ConstructorType */) { - if (node.kind !== 173 /* MethodDeclaration */ && node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 176 /* GetAccessor */ && node.kind !== 177 /* SetAccessor */) { + if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { + if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 262 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { - const message = node.kind === 171 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; + if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; return grammarErrorOnNode(modifier, message); } if (flags & 32 /* Static */) { @@ -81967,9 +82530,9 @@ function createTypeChecker(host) { case 134 /* AsyncKeyword */: if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); - } else if (flags & 2 /* Ambient */ || node.parent.flags & 16777216 /* Ambient */) { + } else if (flags & 2 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -81982,7 +82545,7 @@ function createTypeChecker(host) { case 147 /* OutKeyword */: const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 167 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + if (node.kind !== 168 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); } if (flags & inOutFlag) { @@ -81996,7 +82559,7 @@ function createTypeChecker(host) { } } } - if (node.kind === 175 /* Constructor */) { + if (node.kind === 176 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -82007,11 +82570,11 @@ function createTypeChecker(host) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 271 /* ImportDeclaration */ || node.kind === 270 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -82031,46 +82594,47 @@ function createTypeChecker(host) { } function findFirstIllegalModifier(node) { switch (node.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 266 /* ModuleDeclaration */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 267 /* ModuleDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return void 0; - case 174 /* ClassStaticBlockDeclaration */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 269 /* NamespaceExportDeclaration */: - case 281 /* MissingDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 270 /* NamespaceExportDeclaration */: + case 282 /* MissingDeclaration */: return find(node.modifiers, isModifier); default: - if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return void 0; } switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return findFirstModifierExcept(node, 134 /* AsyncKeyword */); - case 262 /* ClassDeclaration */: - case 184 /* ConstructorType */: + case 263 /* ClassDeclaration */: + case 185 /* ConstructorType */: return findFirstModifierExcept(node, 128 /* AbstractKeyword */); - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 242 /* VariableStatement */: - case 264 /* TypeAliasDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return find(node.modifiers, isModifier); - case 265 /* EnumDeclaration */: + case 243 /* VariableStatement */: + return node.declarationList.flags & 4 /* Using */ ? findFirstModifierExcept(node, 135 /* AwaitKeyword */) : find(node.modifiers, isModifier); + case 266 /* EnumDeclaration */: return findFirstModifierExcept(node, 87 /* ConstKeyword */); default: Debug.assertNever(node); @@ -82086,10 +82650,10 @@ function createTypeChecker(host) { } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -82117,7 +82681,7 @@ function createTypeChecker(host) { if (i !== parameterCount - 1) { return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); } - if (!(parameter.flags & 16777216 /* Ambient */)) { + if (!(parameter.flags & 33554432 /* Ambient */)) { checkGrammarForDisallowedTrailingComma(parameters, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); } if (parameter.questionToken) { @@ -82234,7 +82798,7 @@ function createTypeChecker(host) { return checkGrammarForDisallowedTrailingComma(typeArguments) || checkGrammarForAtLeastOneTypeArgument(node, typeArguments); } function checkGrammarTaggedTemplateChain(node) { - if (node.questionDotToken || node.flags & 32 /* OptionalChain */) { + if (node.questionDotToken || node.flags & 64 /* OptionalChain */) { return grammarErrorOnNode(node.template, Diagnostics.Tagged_template_expressions_are_not_permitted_in_an_optional_chain); } return false; @@ -82302,11 +82866,11 @@ function createTypeChecker(host) { return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 225 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { + if (computedPropertyName.expression.kind === 226 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } return false; @@ -82314,9 +82878,9 @@ function createTypeChecker(host) { function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */ || node.kind === 173 /* MethodDeclaration */ + node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */ ); - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } if (!node.body) { @@ -82333,7 +82897,7 @@ function createTypeChecker(host) { function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = /* @__PURE__ */ new Map(); for (const prop of node.properties) { - if (prop.kind === 304 /* SpreadAssignment */) { + if (prop.kind === 305 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -82343,10 +82907,10 @@ function createTypeChecker(host) { continue; } const name = prop.name; - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 303 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 304 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { grammarErrorOnNode(prop.equalsToken, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern); } if (name.kind === 81 /* PrivateIdentifier */) { @@ -82354,7 +82918,7 @@ function createTypeChecker(host) { } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 173 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -82367,8 +82931,8 @@ function createTypeChecker(host) { } let currentKind; switch (prop.kind) { - case 303 /* ShorthandPropertyAssignment */: - case 302 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 9 /* NumericLiteral */) { @@ -82376,13 +82940,13 @@ function createTypeChecker(host) { } currentKind = 4 /* PropertyAssignment */; break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -82419,7 +82983,7 @@ function createTypeChecker(host) { checkGrammarTypeArguments(node, node.typeArguments); const seen = /* @__PURE__ */ new Map(); for (const attr of node.attributes.properties) { - if (attr.kind === 292 /* JsxSpreadAttribute */) { + if (attr.kind === 293 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -82429,7 +82993,7 @@ function createTypeChecker(host) { } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 293 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 294 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -82451,8 +83015,8 @@ function createTypeChecker(host) { if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 249 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { - if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { + if (forInOrOfStatement.kind === 250 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (!(forInOrOfStatement.flags & 65536 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { if (!hasParseDiagnostics(sourceFile)) { @@ -82491,7 +83055,7 @@ function createTypeChecker(host) { if (!hasParseDiagnostics(sourceFile)) { const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); const func = getContainingFunction(forInOrOfStatement); - if (func && func.kind !== 175 /* Constructor */) { + if (func && func.kind !== 176 /* Constructor */) { Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); @@ -82503,11 +83067,11 @@ function createTypeChecker(host) { return false; } } - if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 32768 /* AwaitContext */) && isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { + if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 65536 /* AwaitContext */) && isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 260 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 261 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -82515,16 +83079,16 @@ function createTypeChecker(host) { return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } const firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); } } @@ -82532,7 +83096,7 @@ function createTypeChecker(host) { return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 186 /* TypeLiteral */ && accessor.parent.kind !== 263 /* InterfaceDeclaration */) { + if (!(accessor.flags & 33554432 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 264 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -82547,7 +83111,7 @@ function createTypeChecker(host) { if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 186 /* TypeLiteral */ || accessor.parent.kind === 263 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -82557,10 +83121,10 @@ function createTypeChecker(host) { if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 176 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 177 /* SetAccessor */) { + if (accessor.kind === 178 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -82578,10 +83142,10 @@ function createTypeChecker(host) { return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 176 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 176 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } @@ -82598,7 +83162,7 @@ function createTypeChecker(host) { } } switch (parent.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: const decl = parent; if (decl.name.kind !== 80 /* Identifier */) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); @@ -82610,12 +83174,12 @@ function createTypeChecker(host) { return grammarErrorOnNode(parent.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(parent) || !hasEffectiveReadonlyModifier(parent)) { return grammarErrorOnNode(parent.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); } break; - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (!hasSyntacticModifier(parent, 64 /* Readonly */)) { return grammarErrorOnNode(parent.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } @@ -82624,7 +83188,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } } else if (node.operator === 148 /* ReadonlyKeyword */) { - if (node.type.kind !== 187 /* ArrayType */ && node.type.kind !== 188 /* TupleType */) { + if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) { return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(155 /* SymbolKeyword */)); } } @@ -82638,8 +83202,8 @@ function createTypeChecker(host) { if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 173 /* MethodDeclaration */) { - if (node.parent.kind === 209 /* ObjectLiteralExpression */) { + if (node.kind === 174 /* MethodDeclaration */) { + if (node.parent.kind === 210 /* ObjectLiteralExpression */) { if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 134 /* AsyncKeyword */)) { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) { @@ -82658,14 +83222,14 @@ function createTypeChecker(host) { if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) { return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.kind === 173 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 174 /* MethodDeclaration */ && !node.body) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } - } else if (node.parent.kind === 263 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.parent.kind === 186 /* TypeLiteral */) { + } else if (node.parent.kind === 187 /* TypeLiteral */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } } @@ -82676,9 +83240,9 @@ function createTypeChecker(host) { return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 250 /* ContinueStatement */ && !isIterationStatement( + const isMisplacedContinueLabel = node.kind === 251 /* ContinueStatement */ && !isIterationStatement( current.statement, /*lookInLabeledStatements*/ true @@ -82689,8 +83253,8 @@ function createTypeChecker(host) { return false; } break; - case 254 /* SwitchStatement */: - if (node.kind === 251 /* BreakStatement */ && !node.label) { + case 255 /* SwitchStatement */: + if (node.kind === 252 /* BreakStatement */ && !node.label) { return false; } break; @@ -82707,10 +83271,10 @@ function createTypeChecker(host) { current = current.parent; } if (node.label) { - const message = node.kind === 251 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - const message = node.kind === 251 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } } @@ -82730,10 +83294,10 @@ function createTypeChecker(host) { } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 223 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 223 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; + return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -82744,7 +83308,7 @@ function createTypeChecker(host) { const initializer = node.initializer; if (initializer) { const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 112 /* TrueKeyword */ || initializer.kind === 97 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); - const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node); + const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { return grammarErrorOnNode(initializer, Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); @@ -82755,27 +83319,41 @@ function createTypeChecker(host) { } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 248 /* ForInStatement */ && node.parent.parent.kind !== 249 /* ForOfStatement */) { - if (node.flags & 16777216 /* Ambient */) { + const nodeFlags = getCombinedNodeFlagsCached(node); + const blockScopeKind = nodeFlags & 7 /* BlockScoped */; + if (isBindingPattern(node.name)) { + switch (blockScopeKind) { + case 6 /* AwaitUsing */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "await using"); + case 4 /* Using */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "using"); + } + } + if (node.parent.parent.kind !== 249 /* ForInStatement */ && node.parent.parent.kind !== 250 /* ForOfStatement */) { + if (nodeFlags & 33554432 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { if (isBindingPattern(node.name) && !isBindingPattern(node.parent)) { return grammarErrorOnNode(node, Diagnostics.A_destructuring_declaration_must_have_an_initializer); } - if (isVarConst(node)) { - return grammarErrorOnNode(node, Diagnostics.const_declarations_must_be_initialized); + switch (blockScopeKind) { + case 6 /* AwaitUsing */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "await using"); + case 4 /* Using */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "using"); + case 2 /* Const */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "const"); } } } - if (node.exclamationToken && (node.parent.parent.kind !== 242 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 243 /* VariableStatement */ || !node.type || node.initializer || nodeFlags & 33554432 /* Ambient */)) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } - if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 16777216 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { + if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { checkESModuleMarker(node.name); } - const checkLetConstNames = isLet(node) || isVarConst(node); - return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name); + return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name); } function checkESModuleMarker(name) { if (name.kind === 80 /* Identifier */) { @@ -82815,29 +83393,39 @@ function createTypeChecker(host) { if (!declarationList.declarations.length) { return grammarErrorAtPos(declarationList, declarations.pos, declarations.end - declarations.pos, Diagnostics.Variable_declaration_list_cannot_be_empty); } + const blockScopeFlags = declarationList.flags & 7 /* BlockScoped */; + if ((blockScopeFlags === 4 /* Using */ || blockScopeFlags === 6 /* AwaitUsing */) && isForInStatement(declarationList.parent)) { + return grammarErrorOnNode( + declarationList, + blockScopeFlags === 4 /* Using */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration + ); + } + if (blockScopeFlags === 6 /* AwaitUsing */) { + return checkAwaitGrammar(declarationList); + } return false; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return false; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return allowLetAndConstDeclarations(parent.parent); } return true; } - function checkGrammarForDisallowedLetOrConstStatement(node) { + function checkGrammarForDisallowedBlockScopedVariableStatement(node) { if (!allowLetAndConstDeclarations(node.parent)) { - if (isLet(node.declarationList)) { - return grammarErrorOnNode(node, Diagnostics.let_declarations_can_only_be_declared_inside_a_block); - } else if (isVarConst(node.declarationList)) { - return grammarErrorOnNode(node, Diagnostics.const_declarations_can_only_be_declared_inside_a_block); + const blockScopeKind = getCombinedNodeFlagsCached(node.declarationList) & 7 /* BlockScoped */; + if (blockScopeKind) { + const keyword = blockScopeKind === 1 /* Let */ ? "let" : blockScopeKind === 2 /* Const */ ? "const" : blockScopeKind === 4 /* Using */ ? "using" : blockScopeKind === 6 /* AwaitUsing */ ? "await using" : Debug.fail("Unknown BlockScope flag"); + return grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword); } } } @@ -82926,7 +83514,7 @@ function createTypeChecker(host) { if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 263 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } @@ -82943,23 +83531,23 @@ function createTypeChecker(host) { return grammarErrorOnNode(node.initializer, Diagnostics.A_type_literal_property_cannot_have_an_initializer); } } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { checkAmbientInitializer(node); } - if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & 16777216 /* Ambient */ || isStatic(node) || hasAbstractModifier(node))) { + if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & 33554432 /* Ambient */ || isStatic(node) || hasAbstractModifier(node))) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 263 /* InterfaceDeclaration */ || node.kind === 264 /* TypeAliasDeclaration */ || node.kind === 271 /* ImportDeclaration */ || node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 277 /* ExportDeclaration */ || node.kind === 276 /* ExportAssignment */ || node.kind === 269 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (const decl of file.statements) { - if (isDeclaration(decl) || decl.kind === 242 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 243 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -82968,15 +83556,15 @@ function createTypeChecker(host) { return false; } function checkGrammarSourceFile(node) { - return !!(node.flags & 16777216 /* Ambient */) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); + return !!(node.flags & 33554432 /* Ambient */) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); } function checkGrammarStatementInAmbientContext(node) { - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { const links = getNodeLinks(node); if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 240 /* Block */ || node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + if (node.parent.kind === 241 /* Block */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -83045,7 +83633,7 @@ function createTypeChecker(host) { if (node.isTypeOnly && node.name && node.namedBindings) { return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); } - if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 274 /* NamedImports */) { + if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -83055,7 +83643,7 @@ function createTypeChecker(host) { if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 275 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + specifier.kind === 276 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement ); } }); @@ -83169,17 +83757,37 @@ function createTypeChecker(host) { const name = getPropertyNameForPropertyNameNode(node); return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0; } + function getCombinedModifierFlagsCached(node) { + if (lastGetCombinedModifierFlagsNode === node) { + return lastGetCombinedModifierFlagsResult; + } + lastGetCombinedModifierFlagsNode = node; + lastGetCombinedModifierFlagsResult = getCombinedModifierFlags(node); + return lastGetCombinedModifierFlagsResult; + } + function getCombinedNodeFlagsCached(node) { + if (lastGetCombinedNodeFlagsNode === node) { + return lastGetCombinedNodeFlagsResult; + } + lastGetCombinedNodeFlagsNode = node; + lastGetCombinedNodeFlagsResult = getCombinedNodeFlags(node); + return lastGetCombinedNodeFlagsResult; + } + function isVarConstLike(node) { + const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */; + return blockScopeKind === 2 /* Const */ || blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */; + } } function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 261 /* FunctionDeclaration */ && declaration.kind !== 173 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 262 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -83232,13 +83840,13 @@ function createBasicNodeBuilderModuleSpecifierResolutionHost(host) { readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0 }; } -var SymbolTrackerImpl = class { +var SymbolTrackerImpl = class _SymbolTrackerImpl { constructor(context, tracker, moduleResolverHost) { this.moduleResolverHost = void 0; this.inner = void 0; this.disableTrackSymbol = false; var _a; - while (tracker instanceof SymbolTrackerImpl) { + while (tracker instanceof _SymbolTrackerImpl) { tracker = tracker.inner; } this.inner = tracker; @@ -83596,21 +84204,21 @@ function visitEachChild(node, visitor, context, nodesVisitor = visitNodes2, toke return fn === void 0 ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor); } var visitEachChildTable = { - [165 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [166 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [167 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83619,7 +84227,7 @@ var visitEachChildTable = { nodeVisitor(node.default, visitor, isTypeNode) ); }, - [168 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83630,14 +84238,14 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [169 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [170 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83646,7 +84254,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertyDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83657,7 +84265,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [172 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83668,7 +84276,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [173 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83681,7 +84289,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83689,7 +84297,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83699,7 +84307,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83708,7 +84316,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [174 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -83716,7 +84324,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [178 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -83724,7 +84332,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [179 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -83732,7 +84340,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -83741,7 +84349,7 @@ var visitEachChildTable = { ); }, // Types - [181 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -83749,14 +84357,14 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [182 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [183 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -83764,7 +84372,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [184 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -83773,56 +84381,56 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [185 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [186 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [187 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [188 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [189 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [190 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [191 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [192 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -83831,13 +84439,13 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [194 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [204 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -83847,14 +84455,14 @@ var visitEachChildTable = { node.isTypeOf ); }, - [301 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [201 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -83863,26 +84471,26 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [195 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [197 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [198 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [199 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -83893,20 +84501,20 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [200 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [202 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [203 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -83914,19 +84522,19 @@ var visitEachChildTable = { ); }, // Binding patterns - [205 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [206 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [207 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -83936,19 +84544,19 @@ var visitEachChildTable = { ); }, // Expression - [208 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [209 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [210 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -83960,7 +84568,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [211 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -83972,7 +84580,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [212 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -83986,7 +84594,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [213 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -83994,7 +84602,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [214 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -84002,20 +84610,20 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [215 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [216 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [217 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -84027,7 +84635,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [218 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -84038,43 +84646,43 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [220 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [220 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [222 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [223 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [224 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [225 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [226 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -84082,7 +84690,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [226 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -84092,27 +84700,27 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [227 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [228 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [229 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [229 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [230 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [230 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -84122,28 +84730,28 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [232 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [233 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [237 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [238 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [234 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [235 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -84152,14 +84760,14 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [235 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [238 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -84167,26 +84775,26 @@ var visitEachChildTable = { ); }, // Element - [240 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [241 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [242 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [243 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [243 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [244 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -84194,21 +84802,21 @@ var visitEachChildTable = { nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [245 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [246 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [247 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -84217,7 +84825,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -84225,7 +84833,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [250 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -84234,52 +84842,52 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [251 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [252 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [253 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [254 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [255 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [256 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [257 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -84287,7 +84895,7 @@ var visitEachChildTable = { nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [259 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [260 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -84296,13 +84904,13 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [260 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [261 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [261 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [262 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -84314,7 +84922,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [262 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [263 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -84324,7 +84932,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [263 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -84334,7 +84942,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [264 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -84343,7 +84951,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [265 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -84351,7 +84959,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isEnumMember) ); }, - [266 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -84359,25 +84967,25 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isModuleBody) ); }, - [267 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [268 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [268 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [269 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [269 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [270 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [270 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -84386,7 +84994,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [271 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -84395,21 +85003,21 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [299 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [300 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [272 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -84417,25 +85025,25 @@ var visitEachChildTable = { nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [273 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [279 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [280 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [274 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [275 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [275 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -84443,14 +85051,14 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [276 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [277 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -84460,13 +85068,13 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [278 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [280 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -84475,14 +85083,14 @@ var visitEachChildTable = { ); }, // Module references - [282 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [283 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -84490,7 +85098,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [284 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -84498,7 +85106,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [285 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -84506,20 +85114,20 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [286 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [294 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxNamespacedName( node, Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [287 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [288 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -84527,52 +85135,52 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [290 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isJsxAttributeName)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [291 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [292 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [292 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [293 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [295 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [296 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [297 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [297 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [298 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -84580,28 +85188,28 @@ var visitEachChildTable = { ); }, // Property assignments - [302 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [303 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [304 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [305 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [305 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -84609,20 +85217,20 @@ var visitEachChildTable = { ); }, // Top-level nodes - [311 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [312 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [359 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [360 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [360 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [361 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -85056,7 +85664,7 @@ function isNamedDefaultReference(e) { function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 311 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 312 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -85086,9 +85694,11 @@ function getImportNeedsImportStarHelper(node) { function getImportNeedsImportDefaultHelper(node) { return !getImportNeedsImportStarHelper(node) && (isDefaultImport(node) || !!node.importClause && isNamedImports(node.importClause.namedBindings) && containsDefaultReference(node.importClause.namedBindings)); } -function collectExternalModuleInfo(context, sourceFile, resolver, compilerOptions) { +function collectExternalModuleInfo(context, sourceFile) { + const resolver = context.getEmitResolver(); + const compilerOptions = context.getCompilerOptions(); const externalImports = []; - const exportSpecifiers = createMultiMap(); + const exportSpecifiers = new IdentifierNameMultiMap(); const exportedBindings = []; const uniqueExports = /* @__PURE__ */ new Map(); let exportedNames; @@ -85099,7 +85709,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -85108,12 +85718,12 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption hasImportDefault = true; } break; - case 270 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 282 /* ExternalModuleReference */) { + case 271 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 283 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -85136,19 +85746,19 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption addExportedNamesForExportDeclaration(node); } break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings); } } break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -85165,7 +85775,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption } } break; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -85194,7 +85804,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption if (!uniqueExports.get(idText(specifier.name))) { const name = specifier.propertyName || specifier.name; if (!node.moduleSpecifier) { - exportSpecifiers.add(idText(name), specifier); + exportSpecifiers.add(name, specifier); } const decl = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); if (decl) { @@ -85234,6 +85844,85 @@ function multiMapSparseArrayAdd(map2, key, value) { } return values; } +var IdentifierNameMap = class _IdentifierNameMap { + constructor() { + this._map = /* @__PURE__ */ new Map(); + } + get size() { + return this._map.size; + } + has(key) { + return this._map.has(_IdentifierNameMap.toKey(key)); + } + get(key) { + return this._map.get(_IdentifierNameMap.toKey(key)); + } + set(key, value) { + this._map.set(_IdentifierNameMap.toKey(key), value); + return this; + } + delete(key) { + var _a; + return ((_a = this._map) == null ? void 0 : _a.delete(_IdentifierNameMap.toKey(key))) ?? false; + } + clear() { + this._map.clear(); + } + values() { + return this._map.values(); + } + static toKey(name) { + if (isGeneratedPrivateIdentifier(name) || isGeneratedIdentifier(name)) { + const autoGenerate = name.emitNode.autoGenerate; + if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) { + const node = getNodeForGeneratedName(name); + const baseName = isMemberName(node) && node !== name ? _IdentifierNameMap.toKey(node) : `(generated@${getNodeId(node)})`; + return formatGeneratedName( + /*privateName*/ + false, + autoGenerate.prefix, + baseName, + autoGenerate.suffix, + _IdentifierNameMap.toKey + ); + } else { + const baseName = `(auto@${autoGenerate.id})`; + return formatGeneratedName( + /*privateName*/ + false, + autoGenerate.prefix, + baseName, + autoGenerate.suffix, + _IdentifierNameMap.toKey + ); + } + } + if (isPrivateIdentifier(name)) { + return idText(name).slice(1); + } + return idText(name); + } +}; +var IdentifierNameMultiMap = class extends IdentifierNameMap { + add(key, value) { + let values = this.get(key); + if (values) { + values.push(value); + } else { + this.set(key, values = [value]); + } + return values; + } + remove(key, value) { + const values = this.get(key); + if (values) { + unorderedRemoveItem(values, value); + if (!values.length) { + this.delete(key); + } + } + } +}; function isSimpleCopiableExpression(expression) { return isStringLiteralLike(expression) || expression.kind === 9 /* NumericLiteral */ || isKeyword(expression.kind) || isIdentifier(expression); } @@ -85284,14 +85973,23 @@ function getSuperCallFromStatement(statement) { const expression = skipParentheses(statement.expression); return isSuperCall(expression) ? expression : void 0; } -function findSuperStatementIndex(statements, indexAfterLastPrologueStatement) { - for (let i = indexAfterLastPrologueStatement; i < statements.length; i += 1) { +function findSuperStatementIndexPathWorker(statements, start, indices) { + for (let i = start; i < statements.length; i += 1) { const statement = statements[i]; if (getSuperCallFromStatement(statement)) { - return i; + indices.unshift(i); + return true; + } else if (isTryStatement(statement) && findSuperStatementIndexPathWorker(statement.tryBlock.statements, 0, indices)) { + indices.unshift(i); + return true; } } - return -1; + return false; +} +function findSuperStatementIndexPath(statements, start) { + const indices = []; + findSuperStatementIndexPathWorker(statements, start, indices); + return indices; } function getProperties(node, requireInitializer, isStatic2) { return filter(node.members, (m) => isInitializedOrStaticProperty(m, requireInitializer, isStatic2)); @@ -85309,7 +86007,7 @@ function isStaticPropertyDeclaration(member) { return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 171 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -85346,15 +86044,15 @@ function getAllDecoratorsOfClass(node) { } function getAllDecoratorsOfClassElement(member, parent, useLegacyDecorators) { switch (member.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (!useLegacyDecorators) { return getAllDecoratorsOfMethod(member); } return getAllDecoratorsOfAccessors(member, parent); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -85883,6 +86581,275 @@ function makeAssignmentElement(name) { return name; } +// src/compiler/transformers/classThis.ts +function createClassThisAssignmentBlock(factory2, classThis, thisExpression = factory2.createThis()) { + const expression = factory2.createAssignment(classThis, thisExpression); + const statement = factory2.createExpressionStatement(expression); + const body = factory2.createBlock( + [statement], + /*multiLine*/ + false + ); + const block = factory2.createClassStaticBlockDeclaration(body); + getOrCreateEmitNode(block).classThis = classThis; + return block; +} +function isClassThisAssignmentBlock(node) { + var _a; + if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { + return false; + } + const statement = node.body.statements[0]; + return isExpressionStatement(statement) && isAssignmentExpression( + statement.expression, + /*excludeCompoundAssignment*/ + true + ) && isIdentifier(statement.expression.left) && ((_a = node.emitNode) == null ? void 0 : _a.classThis) === statement.expression.left && statement.expression.right.kind === 110 /* ThisKeyword */; +} +function classHasClassThisAssignment(node) { + var _a; + return !!((_a = node.emitNode) == null ? void 0 : _a.classThis) && some(node.members, isClassThisAssignmentBlock); +} +function injectClassThisAssignmentIfMissing(factory2, node, classThis, thisExpression) { + if (classHasClassThisAssignment(node)) { + return node; + } + const staticBlock = createClassThisAssignmentBlock(factory2, classThis, thisExpression); + if (node.name) { + setSourceMapRange(staticBlock.body.statements[0], node.name); + } + const members = factory2.createNodeArray([staticBlock, ...node.members]); + setTextRange(members, node.members); + const updatedNode = isClassDeclaration(node) ? factory2.updateClassDeclaration( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ) : factory2.updateClassExpression( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ); + getOrCreateEmitNode(updatedNode).classThis = classThis; + return updatedNode; +} + +// src/compiler/transformers/namedEvaluation.ts +function getAssignedNameOfIdentifier(factory2, name, expression) { + const original = getOriginalNode(skipOuterExpressions(expression)); + if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 1024 /* Default */)) { + return factory2.createStringLiteral("default"); + } + return factory2.createStringLiteralFromNode(name); +} +function getAssignedNameOfPropertyName(context, name, assignedNameText) { + const { factory: factory2 } = context; + if (assignedNameText !== void 0) { + const assignedName2 = factory2.createStringLiteral(assignedNameText); + return { assignedName: assignedName2, name }; + } + if (isPropertyNameLiteral(name) || isPrivateIdentifier(name)) { + const assignedName2 = factory2.createStringLiteralFromNode(name); + return { assignedName: assignedName2, name }; + } + if (isPropertyNameLiteral(name.expression) && !isIdentifier(name.expression)) { + const assignedName2 = factory2.createStringLiteralFromNode(name.expression); + return { assignedName: assignedName2, name }; + } + const assignedName = factory2.getGeneratedNameForNode(name); + context.hoistVariableDeclaration(assignedName); + const key = context.getEmitHelperFactory().createPropKeyHelper(name.expression); + const assignment = factory2.createAssignment(assignedName, key); + const updatedName = factory2.updateComputedPropertyName(name, assignment); + return { assignedName, name: updatedName }; +} +function createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression = context.factory.createThis()) { + const { factory: factory2 } = context; + const expression = context.getEmitHelperFactory().createSetFunctionNameHelper(thisExpression, assignedName); + const statement = factory2.createExpressionStatement(expression); + const body = factory2.createBlock( + [statement], + /*multiLine*/ + false + ); + const block = factory2.createClassStaticBlockDeclaration(body); + getOrCreateEmitNode(block).assignedName = assignedName; + return block; +} +function isClassNamedEvaluationHelperBlock(node) { + var _a; + if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { + return false; + } + const statement = node.body.statements[0]; + return isExpressionStatement(statement) && isCallToHelper(statement.expression, "___setFunctionName") && statement.expression.arguments.length >= 2 && statement.expression.arguments[1] === ((_a = node.emitNode) == null ? void 0 : _a.assignedName); +} +function classHasExplicitlyAssignedName(node) { + var _a; + return !!((_a = node.emitNode) == null ? void 0 : _a.assignedName) && some(node.members, isClassNamedEvaluationHelperBlock); +} +function classHasDeclaredOrExplicitlyAssignedName(node) { + return !!node.name || classHasExplicitlyAssignedName(node); +} +function injectClassNamedEvaluationHelperBlockIfMissing(context, node, assignedName, thisExpression) { + if (classHasExplicitlyAssignedName(node)) { + return node; + } + const { factory: factory2 } = context; + const namedEvaluationBlock = createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression); + if (node.name) { + setSourceMapRange(namedEvaluationBlock.body.statements[0], node.name); + } + const insertionIndex = findIndex(node.members, isClassThisAssignmentBlock) + 1; + const leading = node.members.slice(0, insertionIndex); + const trailing = node.members.slice(insertionIndex); + const members = factory2.createNodeArray([...leading, namedEvaluationBlock, ...trailing]); + setTextRange(members, node.members); + node = isClassDeclaration(node) ? factory2.updateClassDeclaration( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ) : factory2.updateClassExpression( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ); + getOrCreateEmitNode(node).assignedName = assignedName; + return node; +} +function finishTransformNamedEvaluation(context, expression, assignedName, ignoreEmptyStringLiteral) { + if (ignoreEmptyStringLiteral && isStringLiteral(assignedName) && isEmptyStringLiteral(assignedName)) { + return expression; + } + const { factory: factory2 } = context; + const innerExpression = skipOuterExpressions(expression); + const updatedExpression = isClassExpression(innerExpression) ? cast(injectClassNamedEvaluationHelperBlockIfMissing(context, innerExpression, assignedName), isClassExpression) : context.getEmitHelperFactory().createSetFunctionNameHelper(innerExpression, assignedName); + return factory2.restoreOuterExpressions(expression, updatedExpression); +} +function transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updatePropertyAssignment( + node, + name, + initializer + ); +} +function transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.objectAssignmentInitializer); + const objectAssignmentInitializer = finishTransformNamedEvaluation(context, node.objectAssignmentInitializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateShorthandPropertyAssignment( + node, + node.name, + objectAssignmentInitializer + ); +} +function transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateVariableDeclaration( + node, + node.name, + node.exclamationToken, + node.type, + initializer + ); +} +function transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateParameterDeclaration( + node, + node.modifiers, + node.dotDotDotToken, + node.name, + node.questionToken, + node.type, + initializer + ); +} +function transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateBindingElement( + node, + node.dotDotDotToken, + node.propertyName, + node.name, + initializer + ); +} +function transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updatePropertyDeclaration( + node, + node.modifiers, + name, + node.questionToken ?? node.exclamationToken, + node.type, + initializer + ); +} +function transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.left, node.right); + const right = finishTransformNamedEvaluation(context, node.right, assignedName, ignoreEmptyStringLiteral); + return factory2.updateBinaryExpression( + node, + node.left, + node.operatorToken, + right + ); +} +function transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : factory2.createStringLiteral(node.isExportEquals ? "" : "default"); + const expression = finishTransformNamedEvaluation(context, node.expression, assignedName, ignoreEmptyStringLiteral); + return factory2.updateExportAssignment( + node, + node.modifiers, + expression + ); +} +function transformNamedEvaluation(context, node, ignoreEmptyStringLiteral, assignedName) { + switch (node.kind) { + case 303 /* PropertyAssignment */: + return transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedName); + case 304 /* ShorthandPropertyAssignment */: + return transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedName); + case 260 /* VariableDeclaration */: + return transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 169 /* Parameter */: + return transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 208 /* BindingElement */: + return transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedName); + case 172 /* PropertyDeclaration */: + return transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 226 /* BinaryExpression */: + return transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedName); + case 277 /* ExportAssignment */: + return transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedName); + } +} + // src/compiler/transformers/taggedTemplate.ts function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) { const tag = visitNode(node.tag, visitor, isExpression); @@ -85970,8 +86937,8 @@ function transformTypeScript(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -85982,14 +86949,14 @@ function transformTypeScript(context) { let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 312 /* Bundle */) { + if (node.kind === 313 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 314 /* InputFiles */) { + if (prepend.kind === 315 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -86020,22 +86987,22 @@ function transformTypeScript(context) { } function onBeforeVisitNode(node) { switch (node.kind) { - case 311 /* SourceFile */: - case 268 /* CaseBlock */: - case 267 /* ModuleBlock */: - case 240 /* Block */: + case 312 /* SourceFile */: + case 269 /* CaseBlock */: + case 268 /* ModuleBlock */: + case 241 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 262 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -86054,10 +87021,10 @@ function transformTypeScript(context) { } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -86072,13 +87039,13 @@ function transformTypeScript(context) { return node; } switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -86088,7 +87055,7 @@ function transformTypeScript(context) { return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 277 /* ExportDeclaration */ || node.kind === 271 /* ImportDeclaration */ || node.kind === 272 /* ImportClause */ || node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -86100,21 +87067,21 @@ function transformTypeScript(context) { } function classElementVisitorWorker(node, parent) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructor(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessor(node, parent); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessor(node, parent); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node, parent); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return node; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -86125,15 +87092,15 @@ function transformTypeScript(context) { } function objectLiteralElementVisitorWorker(node, parent) { switch (node.kind) { - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return visitor(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessor(node, parent); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessor(node, parent); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node, parent); default: return Debug.failBadSyntaxKind(node); @@ -86167,19 +87134,19 @@ function transformTypeScript(context) { case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: case 128 /* AbstractKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 87 /* ConstKeyword */: case 138 /* DeclareKeyword */: case 148 /* ReadonlyKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: - case 187 /* ArrayType */: - case 188 /* TupleType */: - case 189 /* OptionalType */: - case 190 /* RestType */: - case 186 /* TypeLiteral */: - case 181 /* TypePredicate */: - case 167 /* TypeParameter */: + case 188 /* ArrayType */: + case 189 /* TupleType */: + case 190 /* OptionalType */: + case 191 /* RestType */: + case 187 /* TypeLiteral */: + case 182 /* TypePredicate */: + case 168 /* TypeParameter */: case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 136 /* BooleanKeyword */: @@ -86188,80 +87155,80 @@ function transformTypeScript(context) { case 146 /* NeverKeyword */: case 116 /* VoidKeyword */: case 155 /* SymbolKeyword */: - case 184 /* ConstructorType */: - case 183 /* FunctionType */: - case 185 /* TypeQuery */: - case 182 /* TypeReference */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 193 /* ConditionalType */: - case 195 /* ParenthesizedType */: - case 196 /* ThisType */: - case 197 /* TypeOperator */: - case 198 /* IndexedAccessType */: - case 199 /* MappedType */: - case 200 /* LiteralType */: - case 180 /* IndexSignature */: + case 185 /* ConstructorType */: + case 184 /* FunctionType */: + case 186 /* TypeQuery */: + case 183 /* TypeReference */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 194 /* ConditionalType */: + case 196 /* ParenthesizedType */: + case 197 /* ThisType */: + case 198 /* TypeOperator */: + case 199 /* IndexedAccessType */: + case 200 /* MappedType */: + case 201 /* LiteralType */: + case 181 /* IndexSignature */: return void 0; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return void 0; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return visitHeritageClause(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return visitArrowFunction(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return visitAssertionExpression(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return visitNonNullExpression(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -86371,25 +87338,25 @@ function transformTypeScript(context) { insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); const iife = factory2.createImmediatelyInvokedArrowFunction(statements); setInternalEmitFlags(iife, 1 /* TypeScriptClassWrapper */); - const modifiers2 = facts & 16 /* IsNamedExternalExport */ ? factory2.createModifiersFromModifierFlags(1 /* Export */) : void 0; + const varDecl = factory2.createVariableDeclaration( + factory2.getLocalName( + node, + /*allowComments*/ + false, + /*allowSourceMaps*/ + false + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + iife + ); + setOriginalNode(varDecl, node); const varStatement = factory2.createVariableStatement( - modifiers2, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - false - ), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - iife - ) - ], 1 /* Let */) + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([varDecl], 1 /* Let */) ); setOriginalNode(varStatement, node); setCommentRange(varStatement, node); @@ -86418,10 +87385,10 @@ function transformTypeScript(context) { )) ]; } - if (facts & 16 /* IsNamedExternalExport */ && !promoteToIIFE) { + if (facts & 16 /* IsNamedExternalExport */) { return [ statement, - factory2.createExternalModuleExport(factory2.getLocalName( + factory2.createExternalModuleExport(factory2.getDeclarationName( node, /*allowComments*/ false, @@ -86585,19 +87552,19 @@ function transformTypeScript(context) { } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 171 /* PropertyDeclaration */; + return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 173 /* MethodDeclaration */; + return node.kind === 174 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; } return false; @@ -86646,7 +87613,7 @@ function transformTypeScript(context) { return !nodeIsMissing(node.body); } function visitPropertyDeclaration(node, parent) { - const isAmbient = node.flags & 16777216 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); + const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); if (isAmbient && !(legacyDecorators && hasDecorators(node))) { return void 0; } @@ -86688,6 +87655,35 @@ function transformTypeScript(context) { transformConstructorBody(node.body, node) ); } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } function transformConstructorBody(body, constructor) { const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor)); if (!some(parametersWithPropertyAssignments)) { @@ -86702,25 +87698,22 @@ function transformTypeScript(context) { false, visitor ); - const superStatementIndex = findSuperStatementIndex(body.statements, prologueStatementCount); - if (superStatementIndex >= 0) { - addRange( + const superPath = findSuperStatementIndexPath(body.statements, prologueStatementCount); + const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment); + if (superPath.length) { + transformConstructorBodyWorker( statements, - visitNodes2(body.statements, visitor, isStatement, prologueStatementCount, superStatementIndex + 1 - prologueStatementCount) + body.statements, + prologueStatementCount, + superPath, + /*superPathDepth*/ + 0, + parameterPropertyAssignments ); - } - const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment); - if (superStatementIndex >= 0) { - addRange(statements, parameterPropertyAssignments); } else { - statements = [ - ...statements.slice(0, prologueStatementCount), - ...parameterPropertyAssignments, - ...statements.slice(prologueStatementCount) - ]; + addRange(statements, parameterPropertyAssignments); + addRange(statements, visitNodes2(body.statements, visitor, isStatement, prologueStatementCount)); } - const start = superStatementIndex >= 0 ? superStatementIndex + 1 : prologueStatementCount; - addRange(statements, visitNodes2(body.statements, visitor, isStatement, start)); statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); const block = factory2.createBlock( setTextRange(factory2.createNodeArray(statements), body.statements), @@ -87216,7 +88209,7 @@ function transformTypeScript(context) { /*allowSourceMaps*/ true )); - const varFlags = currentLexicalScope.kind === 311 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; + const varFlags = currentLexicalScope.kind === 312 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; const statement = factory2.createVariableStatement( visitNodes2(node.modifiers, modifierVisitor, isModifier), factory2.createVariableDeclarationList([varDecl], varFlags) @@ -87227,7 +88220,7 @@ function transformTypeScript(context) { setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 265 /* EnumDeclaration */) { + if (node.kind === 266 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -87335,7 +88328,7 @@ function transformTypeScript(context) { let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 267 /* ModuleBlock */) { + if (node.body.kind === 268 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -87366,13 +88359,13 @@ function transformTypeScript(context) { true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 267 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 268 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 266 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -87407,7 +88400,7 @@ function transformTypeScript(context) { ) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 273 /* NamespaceImport */) { + if (node.kind === 274 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.verbatimModuleSyntax || compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -87605,15 +88598,15 @@ function transformTypeScript(context) { if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(266 /* ModuleDeclaration */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(267 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 266 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 267 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 265 /* EnumDeclaration */; + return getOriginalNode(node).kind === 266 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -87658,9 +88651,9 @@ function transformTypeScript(context) { switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -87675,8 +88668,8 @@ function transformTypeScript(context) { /*prefixLocals*/ false ); - if (container && container.kind !== 311 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 266 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 265 /* EnumDeclaration */; + if (container && container.kind !== 312 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 267 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 266 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -87701,7 +88694,7 @@ function transformTypeScript(context) { const constantValue = tryGetConstEnumValue(node); if (constantValue !== void 0) { setConstantValue(node, constantValue); - const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : factory2.createNumericLiteral(constantValue); + const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue); if (!compilerOptions.removeComments) { const originalNode = getOriginalNode(node, isAccessExpression); addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `); @@ -87756,8 +88749,9 @@ function transformClassFields(context) { let pendingStatements; let lexicalEnvironment; const lexicalEnvironmentMap = /* @__PURE__ */ new Map(); + const noSubstitution = /* @__PURE__ */ new Set(); let currentClassContainer; - let currentStaticPropertyDeclarationOrStaticBlock; + let currentClassElement; let shouldSubstituteThisWithClassThis = false; let previousShouldSubstituteThisWithClassThis = false; return chainBundle(context, transformSourceFile); @@ -87789,76 +88783,77 @@ function transformClassFields(context) { switch (node.kind) { case 129 /* AccessorKeyword */: return Debug.fail("Use `modifierVisitor` instead."); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: - return visitClassExpression( - node, - /*referencedName*/ - void 0 - ); - case 174 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: + case 231 /* ClassExpression */: + return visitClassExpression(node); + case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: return Debug.fail("Use `classElementVisitor` instead."); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return visitBindingElement(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); case 81 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ + case 110 /* ThisKeyword */: + return visitThisExpression(node); + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + return setCurrentClassElementAnd( + /*classElement*/ void 0, fallbackVisitor, node ); + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { + return setCurrentClassElementAnd( + node, + fallbackVisitor, + node + ); } default: return fallbackVisitor(node); @@ -87867,56 +88862,32 @@ function transformClassFields(context) { function fallbackVisitor(node) { return visitEachChild(node, visitor, context); } - function namedEvaluationVisitor(node, referencedName) { - switch (node.kind) { - case 359 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 216 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 230 /* ClassExpression */: - return visitClassExpression(node, referencedName); - default: - return visitor(node); - } - } function discardedValueVisitor(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - true, - /*referencedName*/ - void 0 + true ); default: return visitor(node); @@ -87924,9 +88895,9 @@ function transformClassFields(context) { } function heritageClauseVisitor(node) { switch (node.kind) { - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -87934,8 +88905,8 @@ function transformClassFields(context) { } function assignmentTargetVisitor(node) { switch (node.kind) { - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -87943,29 +88914,35 @@ function transformClassFields(context) { } function classElementVisitor(node) { switch (node.kind) { - case 175 /* Constructor */: - return visitConstructorDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ - void 0, + case 176 /* Constructor */: + return setCurrentClassElementAnd( + node, + visitConstructorDeclaration, + node + ); + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + return setCurrentClassElementAnd( + node, visitMethodOrAccessorDeclaration, node ); - case 171 /* PropertyDeclaration */: - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ - void 0, + case 172 /* PropertyDeclaration */: + return setCurrentClassElementAnd( + node, visitPropertyDeclaration, node ); - case 174 /* ClassStaticBlockDeclaration */: - return visitClassStaticBlockDeclaration(node); - case 166 /* ComputedPropertyName */: + case 175 /* ClassStaticBlockDeclaration */: + return setCurrentClassElementAnd( + node, + visitClassStaticBlockDeclaration, + node + ); + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return node; default: return isModifierLike(node) ? modifierVisitor(node) : visitor(node); @@ -87973,7 +88950,7 @@ function transformClassFields(context) { } function propertyNameVisitor(node) { switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); default: return visitor(node); @@ -87981,10 +88958,10 @@ function transformClassFields(context) { } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -88013,9 +88990,7 @@ function transformClassFields(context) { } function visitPropertyAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updatePropertyAssignment(node, name, initializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } @@ -88027,71 +89002,33 @@ function transformClassFields(context) { pendingStatements = savedPendingStatements; return statement; } - function getAssignedNameOfIdentifier(name, initializer) { - const originalClass = getOriginalNode(initializer, isClassLike); - return originalClass && !originalClass.name && hasSyntacticModifier(originalClass, 1024 /* Default */) ? factory2.createStringLiteral("default") : factory2.createStringLiteralFromNode(name); - } function visitVariableDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateVariableDeclaration( - node, - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitParameterDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitBindingElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const propertyName = visitNode(node.propertyName, visitor, isPropertyName); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBindingElement( - node, - /*dotDotDotToken*/ - void 0, - propertyName, - name, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitExportAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = factory2.createStringLiteral(node.isExportEquals ? "" : "default"); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const expression = visitNode(node.expression, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateExportAssignment(node, modifiers, expression); + node = transformNamedEvaluation( + context, + node, + /*ignoreEmptyStringLiteral*/ + true, + node.isExportEquals ? "" : "default" + ); } return visitEachChild(node, visitor, context); } @@ -88156,12 +89093,15 @@ function transformClassFields(context) { } return void 0; } - function setCurrentStaticPropertyDeclarationOrStaticBlockAnd(current, visitor2, arg) { - const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; - currentStaticPropertyDeclarationOrStaticBlock = current; - const result = visitor2(arg); - currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock; - return result; + function setCurrentClassElementAnd(classElement, visitor2, arg) { + if (classElement !== currentClassElement) { + const savedCurrentClassElement = currentClassElement; + currentClassElement = classElement; + const result = visitor2(arg); + currentClassElement = savedCurrentClassElement; + return result; + } + return visitor2(arg); } function getHoistedFunctionName(node) { Debug.assert(isPrivateIdentifier(node.name)); @@ -88179,6 +89119,11 @@ function transformClassFields(context) { } } } + function getClassThis() { + const lex = getClassLexicalEnvironment(); + const classThis = lex.classThis ?? lex.classConstructor ?? (currentClassContainer == null ? void 0 : currentClassContainer.name); + return Debug.checkDefined(classThis); + } function transformAutoAccessor(node) { const commentRange = getCommentRange(node); const sourceMapRange = getSourceMapRange(node); @@ -88205,11 +89150,13 @@ function transformClassFields(context) { setOriginalNode(backingField, node); setEmitFlags(backingField, 3072 /* NoComments */); setSourceMapRange(backingField, sourceMapRange); - const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName); + const receiver = isStatic(node) ? getClassThis() : factory2.createThis(); + const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName, receiver); setOriginalNode(getter, node); setCommentRange(getter, commentRange); setSourceMapRange(getter, sourceMapRange); - const setter = createAccessorPropertySetRedirector(factory2, node, modifiers, setterName); + const setterModifiers = factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers)); + const setter = createAccessorPropertySetRedirector(factory2, node, setterModifiers, setterName, receiver); setOriginalNode(setter, node); setEmitFlags(setter, 3072 /* NoComments */); setSourceMapRange(setter, sourceMapRange); @@ -88248,17 +89195,7 @@ function transformClassFields(context) { ); } if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - return factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - name, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, (child) => namedEvaluationVisitor(child, referencedName), isExpression) - ); + node = transformNamedEvaluation(context, node); } return factory2.updatePropertyDeclaration( node, @@ -88276,9 +89213,7 @@ function transformClassFields(context) { const expr = getPropertyNameExpressionIfNeeded( node.name, /*shouldHoist*/ - !!node.initializer || useDefineForClassFields, - /*captureReferencedName*/ - isNamedEvaluation(node, isAnonymousClassNeedingAssignedName) + !!node.initializer || useDefineForClassFields ); if (expr) { getPendingExpressions().push(...flattenCommaList(expr)); @@ -88323,8 +89258,21 @@ function transformClassFields(context) { } return transformFieldInitializer(node); } + function shouldForceDynamicThis() { + return !!currentClassElement && hasStaticModifier(currentClassElement) && isAccessor(currentClassElement) && isAutoAccessorPropertyDeclaration(getOriginalNode(currentClassElement)); + } + function ensureDynamicThisIfNeeded(node) { + if (shouldForceDynamicThis()) { + const innerExpression = skipOuterExpressions(node); + if (innerExpression.kind === 110 /* ThisKeyword */) { + noSubstitution.add(innerExpression); + } + } + } function createPrivateIdentifierAccess(info, receiver) { - return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression)); + receiver = visitNode(receiver, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); + return createPrivateIdentifierAccessHelper(info, receiver); } function createPrivateIdentifierAccessHelper(info, receiver) { setCommentRange(receiver, moveRangePos(receiver, -1)); @@ -88369,7 +89317,7 @@ function transformClassFields(context) { ); } } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && isIdentifier(node.name) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isIdentifier(node.name) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -88388,7 +89336,7 @@ function transformClassFields(context) { return visitEachChild(node, visitor, context); } function visitElementAccessExpression(node) { - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -88413,6 +89361,7 @@ function transformClassFields(context) { let info; if (info = accessPrivateIdentifier2(operand.name)) { const receiver = visitNode(operand.expression, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); let expression = createPrivateIdentifierAccess(info, readExpression); const temp = isPrefixUnaryExpression(node) || discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); @@ -88431,7 +89380,7 @@ function transformClassFields(context) { } return expression; } - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(operand) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(operand) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { const expression = visitInvalidSuperProperty(operand); @@ -88488,6 +89437,9 @@ function transformClassFields(context) { } function createCopiableReceiverExpr(receiver) { const clone2 = nodeIsSynthesized(receiver) ? receiver : factory2.cloneNode(receiver); + if (receiver.kind === 110 /* ThisKeyword */ && noSubstitution.has(receiver)) { + noSubstitution.add(clone2); + } if (isSimpleInlineableExpression(receiver)) { return { readExpression: clone2, initializeExpression: void 0 }; } @@ -88518,7 +89470,7 @@ function transformClassFields(context) { [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)] ); } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.expression) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { const invocation = factory2.createFunctionCallCall( visitNode(node.expression, visitor, isExpression), lexicalEnvironment.data.classConstructor, @@ -88547,7 +89499,7 @@ function transformClassFields(context) { visitNode(node.template, visitor, isTemplateLiteral) ); } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.tag) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { const invocation = factory2.createFunctionBindCall( visitNode(node.tag, visitor, isExpression), lexicalEnvironment.data.classConstructor, @@ -88570,30 +89522,40 @@ function transformClassFields(context) { lexicalEnvironmentMap.set(getOriginalNode(node), lexicalEnvironment); } if (shouldTransformPrivateElementsOrClassStaticBlocks) { + if (isClassThisAssignmentBlock(node)) { + const result = visitNode(node.body.statements[0].expression, visitor, isExpression); + if (isAssignmentExpression( + result, + /*excludeCompoundAssignment*/ + true + ) && result.left === result.right) { + return void 0; + } + return result; + } + if (isClassNamedEvaluationHelperBlock(node)) { + return visitNode(node.body.statements[0].expression, visitor, isExpression); + } startLexicalEnvironment(); - let statements = setCurrentStaticPropertyDeclarationOrStaticBlockAnd( + let statements = setCurrentClassElementAnd( node, (statements2) => visitNodes2(statements2, visitor, isStatement), node.body.statements ); statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); const iife = factory2.createImmediatelyInvokedArrowFunction(statements); + setOriginalNode(skipParentheses(iife.expression), node); + addEmitFlags(skipParentheses(iife.expression), 4 /* AdviseOnEmitNode */); setOriginalNode(iife, node); setTextRange(iife, node); - addEmitFlags(iife, 4 /* AdviseOnEmitNode */); return iife; } } function isAnonymousClassNeedingAssignedName(node) { if (isClassExpression(node) && !node.name) { const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - const classStaticBlock = find(staticPropertiesOrClassStaticBlocks, isClassStaticBlockDeclaration); - if (classStaticBlock) { - for (const statement of classStaticBlock.body.statements) { - if (isExpressionStatement(statement) && isCallToHelper(statement.expression, "___setFunctionName")) { - return false; - } - } + if (some(staticPropertiesOrClassStaticBlocks, isClassNamedEvaluationHelperBlock)) { + return false; } const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || !!(getInternalEmitFlags(node) && 32 /* TransformPrivateStaticElements */)) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2)); return hasTransformableStatics; @@ -88616,10 +89578,8 @@ function transformClassFields(context) { } if (isAssignmentExpression(node)) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const left2 = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left2, node.operatorToken, right); + node = transformNamedEvaluation(context, node); + Debug.assertNode(node, isAssignmentExpression); } const left = skipOuterExpressions(node.left, 8 /* PartiallyEmittedExpressions */ | 1 /* Parentheses */); if (isPrivateIdentifierPropertyAccessExpression(left)) { @@ -88633,7 +89593,7 @@ function transformClassFields(context) { node ); } - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.left) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.left) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return factory2.updateBinaryExpression( @@ -88698,36 +89658,15 @@ function transformClassFields(context) { const elements = discarded ? visitCommaListElements(node.elements, discardedValueVisitor) : visitCommaListElements(node.elements, visitor, discardedValueVisitor); return factory2.updateCommaListExpression(node, elements); } - function visitParenthesizedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitParenthesizedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updateParenthesizedExpression(node, expression); } - function visitPartiallyEmittedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; - const expression = visitNode(node.expression, visitorFunc, isExpression); - return factory2.updatePartiallyEmittedExpression(node, expression); - } - function visitReferencedPropertyName(node) { - if (isPropertyNameLiteral(node) || isPrivateIdentifier(node)) { - const referencedName2 = factory2.createStringLiteralFromNode(node); - const name2 = visitNode(node, visitor, isPropertyName); - return { referencedName: referencedName2, name: name2 }; - } - if (isPropertyNameLiteral(node.expression) && !isIdentifier(node.expression)) { - const referencedName2 = factory2.createStringLiteralFromNode(node.expression); - const name2 = visitNode(node, visitor, isPropertyName); - return { referencedName: referencedName2, name: name2 }; - } - const referencedName = factory2.createTempVariable(hoistVariableDeclaration); - const key = emitHelpers().createPropKeyHelper(visitNode(node.expression, visitor, isExpression)); - const assignment = factory2.createAssignment(referencedName, key); - const name = factory2.updateComputedPropertyName(node, injectPendingExpressions(assignment)); - return { referencedName, name }; - } function createPrivateIdentifierAssignment(info, receiver, right, operator) { receiver = visitNode(receiver, visitor, isExpression); right = visitNode(right, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); if (isCompoundAssignment(operator)) { const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); receiver = initializeExpression || readExpression; @@ -88774,11 +89713,15 @@ function transformClassFields(context) { return filter(node.members, isNonStaticMethodOrAccessorWithPrivateName); } function getClassFacts(node) { + var _a; let facts = 0 /* None */; const original = getOriginalNode(node); if (isClassDeclaration(original) && classOrConstructorParameterIsDecorated(legacyDecorators, original)) { facts |= 1 /* ClassWasDecorated */; } + if (shouldTransformPrivateElementsOrClassStaticBlocks && (classHasClassThisAssignment(node) || classHasExplicitlyAssignedName(node))) { + facts |= 2 /* NeedsClassConstructorReference */; + } let containsPublicInstanceFields = false; let containsInitializedPublicInstanceFields = false; let containsInstancePrivateElements = false; @@ -88787,6 +89730,8 @@ function transformClassFields(context) { if (isStatic(member)) { if (member.name && (isPrivateIdentifier(member.name) || isAutoAccessorPropertyDeclaration(member)) && shouldTransformPrivateElementsOrClassStaticBlocks) { facts |= 2 /* NeedsClassConstructorReference */; + } else if (isAutoAccessorPropertyDeclaration(member) && shouldTransformAutoAccessors === -1 /* True */ && !node.name && !((_a = node.emitNode) == null ? void 0 : _a.classThis)) { + facts |= 2 /* NeedsClassConstructorReference */; } if (isPropertyDeclaration(member) || isClassStaticBlockDeclaration(member)) { if (shouldTransformThisInStaticInitializers && member.transformFlags & 16384 /* ContainsLexicalThis */) { @@ -88807,6 +89752,9 @@ function transformClassFields(context) { containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member)); } else if (isPrivateIdentifierClassElementDeclaration(member)) { containsInstancePrivateElements = true; + if (resolver.getNodeCheckFlags(member) & 262144 /* ContainsConstructorReference */) { + facts |= 2 /* NeedsClassConstructorReference */; + } } else if (isPropertyDeclaration(member)) { containsPublicInstanceFields = true; containsInitializedPublicInstanceFields || (containsInitializedPublicInstanceFields = !!member.initializer); @@ -88841,7 +89789,8 @@ function transformClassFields(context) { } return visitEachChild(node, visitor, context); } - function visitInNewClassLexicalEnvironment(node, referencedName, visitor2) { + function visitInNewClassLexicalEnvironment(node, visitor2) { + var _a; const savedCurrentClassContainer = currentClassContainer; const savedPendingExpressions = pendingExpressions; const savedLexicalEnvironment = lexicalEnvironment; @@ -88853,6 +89802,15 @@ function transformClassFields(context) { const name = getNameOfDeclaration(node); if (name && isIdentifier(name)) { getPrivateIdentifierEnvironment().data.className = name; + } else if ((_a = node.emitNode) == null ? void 0 : _a.assignedName) { + if (isStringLiteral(node.emitNode.assignedName)) { + if (node.emitNode.assignedName.textSourceNode && isIdentifier(node.emitNode.assignedName.textSourceNode)) { + getPrivateIdentifierEnvironment().data.className = node.emitNode.assignedName.textSourceNode; + } else if (isIdentifierText(node.emitNode.assignedName.text, languageVersion)) { + const prefixName = factory2.createIdentifier(node.emitNode.assignedName.text); + getPrivateIdentifierEnvironment().data.className = prefixName; + } + } } } if (shouldTransformPrivateElementsOrClassStaticBlocks) { @@ -88871,7 +89829,7 @@ function transformClassFields(context) { if (facts & 8 /* NeedsSubstitutionForThisInClassStaticField */) { enableSubstitutionForClassStaticThisOrSuperReference(); } - const result = visitor2(node, facts, referencedName); + const result = visitor2(node, facts); endClassLexicalEnvironment(); Debug.assert(lexicalEnvironment === savedLexicalEnvironment); currentClassContainer = savedCurrentClassContainer; @@ -88879,12 +89837,7 @@ function transformClassFields(context) { return result; } function visitClassDeclaration(node) { - return visitInNewClassLexicalEnvironment( - node, - /*referencedName*/ - void 0, - visitClassDeclarationInNewClassLexicalEnvironment - ); + return visitInNewClassLexicalEnvironment(node, visitClassDeclarationInNewClassLexicalEnvironment); } function visitClassDeclarationInNewClassLexicalEnvironment(node, facts) { var _a, _b; @@ -88902,10 +89855,11 @@ function transformClassFields(context) { getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp); pendingClassReferenceAssignment = factory2.createAssignment(temp, factory2.getInternalName(node)); } - if ((_b = node.emitNode) == null ? void 0 : _b.classThis) { - getClassLexicalEnvironment().classThis = node.emitNode.classThis; - } } + if ((_b = node.emitNode) == null ? void 0 : _b.classThis) { + getClassLexicalEnvironment().classThis = node.emitNode.classThis; + } + const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */; const isExport = hasSyntacticModifier(node, 1 /* Export */); const isDefault = hasSyntacticModifier(node, 1024 /* Default */); let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); @@ -88940,6 +89894,11 @@ function transformClassFields(context) { ) )); } + const alias = getClassLexicalEnvironment().classConstructor; + if (isClassWithConstructorReference && alias) { + enableSubstitutionForClassAliases(); + classAliases[getOriginalNodeId(node)] = alias; + } const classDecl = factory2.updateClassDeclaration( node, modifiers, @@ -88955,24 +89914,27 @@ function transformClassFields(context) { } return statements; } - function visitClassExpression(node, referencedName) { - return visitInNewClassLexicalEnvironment(node, referencedName, visitClassExpressionInNewClassLexicalEnvironment); + function visitClassExpression(node) { + return visitInNewClassLexicalEnvironment(node, visitClassExpressionInNewClassLexicalEnvironment); } - function visitClassExpressionInNewClassLexicalEnvironment(node, facts, referencedName) { - var _a, _b, _c, _d; + function visitClassExpressionInNewClassLexicalEnvironment(node, facts) { + var _a, _b, _c; const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */); const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */; + const classCheckFlags = resolver.getNodeCheckFlags(node); + const isClassWithConstructorReference = classCheckFlags & 262144 /* ContainsConstructorReference */; let temp; function createClassTempVar() { var _a2; if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a2 = node.emitNode) == null ? void 0 : _a2.classThis)) { return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis; } - const classCheckFlags = resolver.getNodeCheckFlags(node); - const isClassWithConstructorReference2 = classCheckFlags & 1048576 /* ClassWithConstructorReference */; const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */; - const temp2 = factory2.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference2); + const temp2 = factory2.createTempVariable( + requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, + /*reservedInNestedScopes*/ + true + ); getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp2); return temp2; } @@ -88985,7 +89947,7 @@ function transformClassFields(context) { const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause); const { members, prologue } = transformClassMembers(node); - let classExpression = factory2.updateClassExpression( + const classExpression = factory2.updateClassExpression( node, modifiers, node.name, @@ -88999,41 +89961,18 @@ function transformClassFields(context) { expressions.push(prologue); } const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2)); - if (hasTransformableStatics || some(pendingExpressions) || referencedName) { + if (hasTransformableStatics || some(pendingExpressions)) { if (isDecoratedClassDeclaration) { Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); if (some(pendingExpressions)) { addRange(pendingStatements, map(pendingExpressions, factory2.createExpressionStatement)); } - if (referencedName) { - if (shouldTransformPrivateElementsOrClassStaticBlocks) { - const setNameExpression = emitHelpers().createSetFunctionNameHelper(temp ?? ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node), referencedName); - pendingStatements.push(factory2.createExpressionStatement(setNameExpression)); - } else { - const setNameExpression = emitHelpers().createSetFunctionNameHelper(factory2.createThis(), referencedName); - classExpression = factory2.updateClassExpression( - classExpression, - classExpression.modifiers, - classExpression.name, - classExpression.typeParameters, - classExpression.heritageClauses, - [ - factory2.createClassStaticBlockDeclaration( - factory2.createBlock([ - factory2.createExpressionStatement(setNameExpression) - ]) - ), - ...classExpression.members - ] - ); - } - } if (some(staticPropertiesOrClassStaticBlocks)) { - addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_c = node.emitNode) == null ? void 0 : _c.classThis) ?? factory2.getInternalName(node)); + addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node)); } if (temp) { expressions.push(factory2.createAssignment(temp, classExpression)); - } else if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_d = node.emitNode) == null ? void 0 : _d.classThis)) { + } else if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_c = node.emitNode) == null ? void 0 : _c.classThis)) { expressions.push(factory2.createAssignment(node.emitNode.classThis, classExpression)); } else { expressions.push(classExpression); @@ -89048,9 +89987,6 @@ function transformClassFields(context) { } expressions.push(factory2.createAssignment(temp, classExpression)); addRange(expressions, pendingExpressions); - if (referencedName) { - expressions.push(emitHelpers().createSetFunctionNameHelper(temp, referencedName)); - } addRange(expressions, generateInitializedPropertyExpressionsOrClassStaticBlock(staticPropertiesOrClassStaticBlocks, temp)); expressions.push(factory2.cloneNode(temp)); } @@ -89069,6 +90005,13 @@ function transformClassFields(context) { } return void 0; } + function visitThisExpression(node) { + if (shouldTransformThisInStaticInitializers && currentClassElement && isClassStaticBlockDeclaration(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + const { classThis, classConstructor } = lexicalEnvironment.data; + return classThis ?? classConstructor ?? node; + } + return node; + } function transformClassMembers(node) { const shouldTransformPrivateStaticElementsInClass = !!(getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */); if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformPrivateStaticElementsInFile) { @@ -89148,9 +90091,14 @@ function transformClassFields(context) { } if (syntheticConstructor || syntheticStaticBlock) { let membersArray; + const classThisAssignmentBlock = find(members, isClassThisAssignmentBlock); + const classNamedEvaluationHelperBlock = find(members, isClassNamedEvaluationHelperBlock); + membersArray = append(membersArray, classThisAssignmentBlock); + membersArray = append(membersArray, classNamedEvaluationHelperBlock); membersArray = append(membersArray, syntheticConstructor); membersArray = append(membersArray, syntheticStaticBlock); - membersArray = addRange(membersArray, members); + const remainingMembers = classThisAssignmentBlock || classNamedEvaluationHelperBlock ? filter(members, (member) => member !== classThisAssignmentBlock && member !== classNamedEvaluationHelperBlock) : members; + membersArray = addRange(membersArray, remainingMembers); members = setTextRange( factory2.createNodeArray(membersArray), /*location*/ @@ -89211,8 +90159,46 @@ function transformClassFields(context) { ) ); } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements, constructor) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + statementOffset = superStatementIndex + 1; + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements, + constructor + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + while (statementOffset < statementsIn.length) { + const statement = statementsIn[statementOffset]; + if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { + statementOffset++; + } else { + break; + } + } + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset)); + } function transformConstructorBody(node, constructor, isDerivedClass) { - var _a; const instanceProperties = getProperties( node, /*requireInitializer*/ @@ -89236,68 +90222,65 @@ function transformClassFields(context) { } resumeLexicalEnvironment(); const needsSyntheticConstructor = !constructor && isDerivedClass; - let indexOfFirstStatementAfterSuperAndPrologue = 0; - let prologueStatementCount = 0; - let superStatementIndex = -1; + let statementOffset = 0; let statements = []; - if ((_a = constructor == null ? void 0 : constructor.body) == null ? void 0 : _a.statements) { - prologueStatementCount = factory2.copyPrologue( + const initializerStatements = []; + const receiver = factory2.createThis(); + addInstanceMethodStatements(initializerStatements, privateMethodsAndAccessors, receiver); + if (constructor) { + const parameterProperties = filter(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); + const nonParameterProperties = filter(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); + addPropertyOrClassStaticBlockStatements(initializerStatements, parameterProperties, receiver); + addPropertyOrClassStaticBlockStatements(initializerStatements, nonParameterProperties, receiver); + } else { + addPropertyOrClassStaticBlockStatements(initializerStatements, properties, receiver); + } + if (constructor == null ? void 0 : constructor.body) { + statementOffset = factory2.copyPrologue( constructor.body.statements, statements, /*ensureUseStrict*/ false, visitor ); - superStatementIndex = findSuperStatementIndex(constructor.body.statements, prologueStatementCount); - if (superStatementIndex >= 0) { - indexOfFirstStatementAfterSuperAndPrologue = superStatementIndex + 1; - statements = [ - ...statements.slice(0, prologueStatementCount), - ...visitNodes2(constructor.body.statements, visitor, isStatement, prologueStatementCount, indexOfFirstStatementAfterSuperAndPrologue - prologueStatementCount), - ...statements.slice(prologueStatementCount) - ]; - } else if (prologueStatementCount >= 0) { - indexOfFirstStatementAfterSuperAndPrologue = prologueStatementCount; - } - } - if (needsSyntheticConstructor) { - statements.push( - factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createSuper(), - /*typeArguments*/ - void 0, - [factory2.createSpreadElement(factory2.createIdentifier("arguments"))] - ) - ) - ); - } - let parameterPropertyDeclarationCount = 0; - if (constructor == null ? void 0 : constructor.body) { - for (let i = indexOfFirstStatementAfterSuperAndPrologue; i < constructor.body.statements.length; i++) { - const statement = constructor.body.statements[i]; - if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { - parameterPropertyDeclarationCount++; - } else { - break; + const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, statementOffset); + if (superStatementIndices.length) { + transformConstructorBodyWorker( + statements, + constructor.body.statements, + statementOffset, + superStatementIndices, + /*superPathDepth*/ + 0, + initializerStatements, + constructor + ); + } else { + while (statementOffset < constructor.body.statements.length) { + const statement = constructor.body.statements[statementOffset]; + if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { + statementOffset++; + } else { + break; + } } + addRange(statements, initializerStatements); + addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, statementOffset)); } - if (parameterPropertyDeclarationCount > 0) { - indexOfFirstStatementAfterSuperAndPrologue += parameterPropertyDeclarationCount; - } - } - const receiver = factory2.createThis(); - addInstanceMethodStatements(statements, privateMethodsAndAccessors, receiver); - if (constructor) { - const parameterProperties = filter(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - const nonParameterProperties = filter(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - addPropertyOrClassStaticBlockStatements(statements, parameterProperties, receiver); - addPropertyOrClassStaticBlockStatements(statements, nonParameterProperties, receiver); } else { - addPropertyOrClassStaticBlockStatements(statements, properties, receiver); - } - if (constructor) { - addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, indexOfFirstStatementAfterSuperAndPrologue)); + if (needsSyntheticConstructor) { + statements.push( + factory2.createExpressionStatement( + factory2.createCallExpression( + factory2.createSuper(), + /*typeArguments*/ + void 0, + [factory2.createSpreadElement(factory2.createIdentifier("arguments"))] + ) + ) + ); + } + addRange(statements, initializerStatements); } statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); if (statements.length === 0 && !constructor) { @@ -89330,7 +90313,7 @@ function transformClassFields(context) { } } function transformPropertyOrClassStaticBlock(property, receiver) { - const expression = isClassStaticBlockDeclaration(property) ? transformClassStaticBlockDeclaration(property) : transformProperty(property, receiver); + const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : transformProperty(property, receiver); if (!expression) { return void 0; } @@ -89355,7 +90338,12 @@ function transformClassFields(context) { function generateInitializedPropertyExpressionsOrClassStaticBlock(propertiesOrClassStaticBlocks, receiver) { const expressions = []; for (const property of propertiesOrClassStaticBlocks) { - const expression = isClassStaticBlockDeclaration(property) ? transformClassStaticBlockDeclaration(property) : transformProperty(property, receiver); + const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : setCurrentClassElementAnd( + property, + () => transformProperty(property, receiver), + /*arg*/ + void 0 + ); if (!expression) { continue; } @@ -89370,7 +90358,7 @@ function transformClassFields(context) { } function transformProperty(property, receiver) { var _a; - const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; + const savedCurrentClassElement = currentClassElement; const transformed = transformPropertyWorker(property, receiver); if (transformed && hasStaticModifier(property) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.facts)) { setOriginalNode(transformed, property); @@ -89378,26 +90366,18 @@ function transformClassFields(context) { setSourceMapRange(transformed, getSourceMapRange(property.name)); lexicalEnvironmentMap.set(getOriginalNode(property), lexicalEnvironment); } - currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock; + currentClassElement = savedCurrentClassElement; return transformed; } function transformPropertyWorker(property, receiver) { const emitAssignment = !useDefineForClassFields; - let referencedName; if (isNamedEvaluation(property, isAnonymousClassNeedingAssignedName)) { - if (isPropertyNameLiteral(property.name) || isPrivateIdentifier(property.name)) { - referencedName = factory2.createStringLiteralFromNode(property.name); - } else if (isPropertyNameLiteral(property.name.expression) && !isIdentifier(property.name.expression)) { - referencedName = factory2.createStringLiteralFromNode(property.name.expression); - } else { - referencedName = factory2.getGeneratedNameForNode(property.name); - } + property = transformNamedEvaluation(context, property); } const propertyName = hasAccessorModifier(property) ? factory2.getGeneratedPrivateNameForNode(property.name) : isComputedPropertyName(property.name) && !isSimpleInlineableExpression(property.name.expression) ? factory2.updateComputedPropertyName(property.name, factory2.getGeneratedNameForNode(property.name)) : property.name; if (hasStaticModifier(property)) { - currentStaticPropertyDeclarationOrStaticBlock = property; + currentClassElement = property; } - const initializerVisitor = referencedName ? (child) => namedEvaluationVisitor(child, referencedName) : visitor; if (isPrivateIdentifier(propertyName) && shouldTransformClassElementToWeakMap(property)) { const privateIdentifierInfo = accessPrivateIdentifier2(propertyName); if (privateIdentifierInfo) { @@ -89406,14 +90386,14 @@ function transformClassFields(context) { return createPrivateInstanceFieldInitializer( factory2, receiver, - visitNode(property.initializer, initializerVisitor, isExpression), + visitNode(property.initializer, visitor, isExpression), privateIdentifierInfo.brandCheckIdentifier ); } else { return createPrivateStaticFieldInitializer( factory2, privateIdentifierInfo.variableName, - visitNode(property.initializer, initializerVisitor, isExpression) + visitNode(property.initializer, visitor, isExpression) ); } } else { @@ -89430,7 +90410,7 @@ function transformClassFields(context) { if (hasSyntacticModifier(propertyOriginalNode, 256 /* Abstract */)) { return void 0; } - let initializer = visitNode(property.initializer, initializerVisitor, isExpression); + let initializer = visitNode(property.initializer, visitor, isExpression); if (isParameterPropertyDeclaration(propertyOriginalNode, propertyOriginalNode.parent) && isIdentifier(propertyName)) { const localName = factory2.cloneNode(propertyName); if (initializer) { @@ -89475,14 +90455,14 @@ function transformClassFields(context) { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(261 /* FunctionDeclaration */); - context.enableEmitNotification(217 /* FunctionExpression */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(171 /* PropertyDeclaration */); - context.enableEmitNotification(166 /* ComputedPropertyName */); + context.enableEmitNotification(262 /* FunctionDeclaration */); + context.enableEmitNotification(218 /* FunctionExpression */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(172 /* PropertyDeclaration */); + context.enableEmitNotification(167 /* ComputedPropertyName */); } } function addInstanceMethodStatements(statements, methods, receiver) { @@ -89508,10 +90488,10 @@ function transformClassFields(context) { visitNode(node.argumentExpression, visitor, isExpression) ); } - function getPropertyNameExpressionIfNeeded(name, shouldHoist, captureReferencedName) { + function getPropertyNameExpressionIfNeeded(name, shouldHoist) { if (isComputedPropertyName(name)) { const cacheAssignment = findComputedPropertyNameCacheAssignment(name); - let expression = visitNode(name.expression, visitor, isExpression); + const expression = visitNode(name.expression, visitor, isExpression); const innerExpression = skipPartiallyEmittedExpressions(expression); const inlinable = isSimpleInlineableExpression(innerExpression); const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left); @@ -89522,9 +90502,6 @@ function transformClassFields(context) { } else { hoistVariableDeclaration(generatedName); } - if (captureReferencedName) { - expression = emitHelpers().createPropKeyHelper(expression); - } return factory2.createAssignment(generatedName, expression); } return inlinable || isIdentifier(innerExpression) ? void 0 : expression; @@ -89720,7 +90697,7 @@ function transformClassFields(context) { } if (isPrivateIdentifierPropertyAccessExpression(node)) { return wrapPrivateIdentifierForDestructuringTarget(node); - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -89747,10 +90724,7 @@ function transformClassFields(context) { } function visitAssignmentElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const left = visitDestructuringAssignmentTarget(node.left); - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); + node = transformNamedEvaluation(context, node); } if (isAssignmentExpression( node, @@ -89797,9 +90771,7 @@ function transformClassFields(context) { } function visitShorthandAssignmentProperty(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.objectAssignmentInitializer); - const objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateShorthandPropertyAssignment(node, node.name, objectAssignmentInitializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } @@ -89849,16 +90821,16 @@ function transformClassFields(context) { return; } switch (node.kind) { - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) { break; } - case 261 /* FunctionDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: { + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { const savedLexicalEnvironment = lexicalEnvironment; const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; lexicalEnvironment = void 0; @@ -89870,7 +90842,7 @@ function transformClassFields(context) { lexicalEnvironment = savedLexicalEnvironment; return; } - case 166 /* ComputedPropertyName */: { + case 167 /* ComputedPropertyName */: { const savedLexicalEnvironment = lexicalEnvironment; const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; @@ -89900,11 +90872,8 @@ function transformClassFields(context) { return node; } function substituteThisExpression(node) { - if (enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */ && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */ && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) && !noSubstitution.has(node)) { const { facts, classConstructor, classThis } = lexicalEnvironment.data; - if (facts & 1 /* ClassWasDecorated */ && legacyDecorators) { - return factory2.createParenthesizedExpression(factory2.createVoidZero()); - } const substituteThis = shouldSubstituteThisWithClassThis ? classThis ?? classConstructor : classConstructor; if (substituteThis) { return setTextRange( @@ -89915,6 +90884,9 @@ function transformClassFields(context) { node ); } + if (facts & 1 /* ClassWasDecorated */ && legacyDecorators) { + return factory2.createParenthesizedExpression(factory2.createVoidZero()); + } } return node; } @@ -89923,7 +90895,7 @@ function transformClassFields(context) { } function trySubstituteClassAlias(node) { if (enabledSubstitutions & 1 /* ClassAliases */) { - if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) { + if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) { const declaration = resolver.getReferencedValueDeclaration(node); if (declaration) { const classAlias = classAliases[declaration.id]; @@ -89969,6 +90941,12 @@ function isReservedPrivateName(node) { function isPrivateIdentifierInExpression(node) { return isPrivateIdentifier(node.left) && node.operatorToken.kind === 103 /* InKeyword */; } +function isStaticPropertyDeclaration2(node) { + return isPropertyDeclaration(node) && hasStaticModifier(node); +} +function isStaticPropertyDeclarationOrClassStaticBlock(node) { + return isClassStaticBlockDeclaration(node) || isStaticPropertyDeclaration2(node); +} // src/compiler/transformers/typeSerializer.ts function createRuntimeTypeSerializer(context) { @@ -90004,15 +90982,15 @@ function createRuntimeTypeSerializer(context) { } function serializeTypeOfNode(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: return serializeTypeNode(node.type); - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 173 /* MethodDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 174 /* MethodDeclaration */: return factory2.createIdentifier("Function"); default: return factory2.createVoidZero(); @@ -90039,7 +91017,7 @@ function createRuntimeTypeSerializer(context) { return factory2.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 176 /* GetAccessor */) { + if (container && node.kind === 177 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -90065,72 +91043,72 @@ function createRuntimeTypeSerializer(context) { case 157 /* UndefinedKeyword */: case 146 /* NeverKeyword */: return factory2.createVoidZero(); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return factory2.createIdentifier("Function"); - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return factory2.createIdentifier("Array"); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean"); case 136 /* BooleanKeyword */: return factory2.createIdentifier("Boolean"); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: case 154 /* StringKeyword */: return factory2.createIdentifier("String"); case 151 /* ObjectKeyword */: return factory2.createIdentifier("Object"); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); case 150 /* NumberKeyword */: return factory2.createIdentifier("Number"); - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); case 155 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return serializeTypeReferenceNode(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ true ); - case 191 /* UnionType */: + case 192 /* UnionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ false ); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return serializeUnionOrIntersectionConstituents( [node.trueType, node.falseType], /*isIntersection*/ false ); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: if (node.operator === 148 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 185 /* TypeQuery */: - case 198 /* IndexedAccessType */: - case 199 /* MappedType */: - case 186 /* TypeLiteral */: + case 186 /* TypeQuery */: + case 199 /* IndexedAccessType */: + case 200 /* MappedType */: + case 187 /* TypeLiteral */: case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: - case 196 /* ThisType */: - case 204 /* ImportType */: + case 197 /* ThisType */: + case 205 /* ImportType */: break; - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: - case 323 /* JSDocFunctionType */: - case 324 /* JSDocVariadicType */: - case 325 /* JSDocNamepathType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: + case 324 /* JSDocFunctionType */: + case 325 /* JSDocVariadicType */: + case 326 /* JSDocNamepathType */: break; - case 320 /* JSDocNullableType */: - case 321 /* JSDocNonNullableType */: - case 322 /* JSDocOptionalType */: + case 321 /* JSDocNullableType */: + case 322 /* JSDocNonNullableType */: + case 323 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -90142,7 +91120,7 @@ function createRuntimeTypeSerializer(context) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return factory2.createIdentifier("String"); - case 223 /* PrefixUnaryExpression */: { + case 224 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 9 /* NumericLiteral */: @@ -90301,7 +91279,7 @@ function createRuntimeTypeSerializer(context) { name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -90351,23 +91329,23 @@ function transformLegacyDecorators(context) { return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructorDeclaration(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -90507,39 +91485,36 @@ function transformLegacyDecorators(context) { ); setOriginalNode(classExpression, node); setTextRange(classExpression, location); + const varInitializer = classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression; const varDecl = factory2.createVariableDeclaration( declName, /*exclamationToken*/ void 0, /*type*/ void 0, - classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression + varInitializer ); setOriginalNode(varDecl, node); - let varModifiers; - if (isExport && !isDefault) { - varModifiers = factory2.createModifiersFromModifierFlags(1 /* Export */); - } - const statement = factory2.createVariableStatement( - varModifiers, - factory2.createVariableDeclarationList([ - varDecl - ], 1 /* Let */) + const varDeclList = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); + const varStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + varDeclList ); - setOriginalNode(statement, node); - setTextRange(statement, location); - setCommentRange(statement, node); - const statements = [statement]; + setOriginalNode(varStatement, node); + setTextRange(varStatement, location); + setCommentRange(varStatement, node); + const statements = [varStatement]; addRange(statements, decorationStatements); addConstructorDecorationStatement(statements, node); - if (isExport && isDefault) { - statements.push(factory2.createExportAssignment( - /*modifiers*/ - void 0, - /*isExportEquals*/ - false, - declName - )); + if (isExport) { + if (isDefault) { + const exportStatement = factory2.createExportDefault(declName); + statements.push(exportStatement); + } else { + const exportStatement = factory2.createExternalModuleExport(factory2.getDeclarationName(node)); + statements.push(exportStatement); + } } return statements; } @@ -90606,7 +91581,7 @@ function transformLegacyDecorators(context) { ), node); } function visitPropertyDeclaration(node) { - if (node.flags & 16777216 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { + if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { return void 0; } return finishClassElement(factory2.updatePropertyDeclaration( @@ -90774,7 +91749,7 @@ function transformLegacyDecorators(context) { } } function getClassAliasIfNeeded(node) { - if (resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */) { + if (resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */) { enableSubstitutionForClassAliases(); const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default"); classAliases[getOriginalNodeId(node)] = classAlias; @@ -90807,7 +91782,7 @@ function transformLegacyDecorators(context) { } function trySubstituteClassAlias(node) { if (classAliases) { - if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) { + if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) { const declaration = resolver.getReferencedValueDeclaration(node); if (declaration) { const classAlias = classAliases[declaration.id]; @@ -90833,8 +91808,7 @@ function transformESDecorators(context) { endLexicalEnvironment, hoistVariableDeclaration } = context; - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); + const languageVersion = getEmitScriptTarget(context.getCompilerOptions()); let top; let classInfo; let classThis; @@ -90946,86 +91920,78 @@ function transformESDecorators(context) { return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return Debug.fail("Use `modifierVisitor` instead."); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: - return visitClassExpression( - node, - /*referencedName*/ - void 0 - ); - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: + case 231 /* ClassExpression */: + return visitClassExpression(node); + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return Debug.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return visitBindingElement(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); case 110 /* ThisKeyword */: return visitThisExpression(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ false ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: { + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: { enterOther(); const result = visitEachChild(node, fallbackVisitor, context); exitOther(); @@ -91037,7 +92003,7 @@ function transformESDecorators(context) { } function fallbackVisitor(node) { switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; default: return visitor(node); @@ -91045,7 +92011,7 @@ function transformESDecorators(context) { } function modifierVisitor(node) { switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; default: return node; @@ -91053,72 +92019,48 @@ function transformESDecorators(context) { } function classElementVisitor(node) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructorDeclaration(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); default: return visitor(node); } } - function namedEvaluationVisitor(node, referencedName) { - switch (node.kind) { - case 359 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 216 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 230 /* ClassExpression */: - return visitClassExpression(node, referencedName); - default: - return visitor(node); - } - } function discardedValueVisitor(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - true, - /*referencedName*/ - void 0 + true ); default: return visitor(node); @@ -91156,6 +92098,7 @@ function transformESDecorators(context) { ); } function createClassInfo(node) { + const metadataReference = factory2.createUniqueName("_metadata", 16 /* Optimistic */ | 32 /* FileLevel */); let instanceExtraInitializersName; let staticExtraInitializersName; let hasStaticInitializers = false; @@ -91169,13 +92112,15 @@ function transformESDecorators(context) { node )) { if (hasStaticModifier(member)) { - staticExtraInitializersName ?? (staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */)); + staticExtraInitializersName ?? (staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); } else { - instanceExtraInitializersName ?? (instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */)); + instanceExtraInitializersName ?? (instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); } } if (isClassStaticBlockDeclaration(member)) { - hasStaticInitializers = true; + if (!isClassNamedEvaluationHelperBlock(member)) { + hasStaticInitializers = true; + } } else if (isPropertyDeclaration(member)) { if (hasStaticModifier(member)) { hasStaticInitializers || (hasStaticInitializers = !!member.initializer || hasDecorators(member)); @@ -91192,6 +92137,7 @@ function transformESDecorators(context) { } return { class: node, + metadataReference, instanceExtraInitializersName, staticExtraInitializersName, hasStaticInitializers, @@ -91199,19 +92145,15 @@ function transformESDecorators(context) { hasStaticPrivateClassElements }; } - function containsLexicalSuperInStaticInitializer(node) { - for (const member of node.members) { - if (isClassStaticBlockDeclaration(member) || isPropertyDeclaration(member) && hasStaticModifier(member)) { - if (member.transformFlags & 134217728 /* ContainsLexicalSuper */) { - return true; - } - } - } - return false; - } - function transformClassLike(node, className) { - var _a; + function transformClassLike(node) { startLexicalEnvironment(); + if (!classHasDeclaredOrExplicitlyAssignedName(node) && classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + node + )) { + node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, factory2.createStringLiteral("")); + } const classReference = factory2.getLocalName( node, /*allowComments*/ @@ -91230,10 +92172,11 @@ function transformESDecorators(context) { let shouldTransformPrivateStaticElementsInClass = false; const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(node)); if (classDecorators) { - classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */); - classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */); - classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */); - classInfo2.classThis = factory2.createUniqueName("_classThis", 16 /* Optimistic */); + classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */); + const needsUniqueClassThis = some(node.members, (member) => (isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)); + classInfo2.classThis = factory2.createUniqueName("_classThis", needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */); classDefinitionStatements.push( createLet(classInfo2.classDecoratorsName, factory2.createArrayLiteralExpression(classDecorators)), createLet(classInfo2.classDescriptorName), @@ -91245,34 +92188,26 @@ function transformESDecorators(context) { shouldTransformPrivateStaticElementsInFile = true; } } - if (classDecorators && containsLexicalSuperInStaticInitializer(node)) { - const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); - const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); - const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); - if (extendsExpression) { - classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */); - const unwrapped = skipOuterExpressions(extendsExpression); - const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; - classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression)); - const updatedExtendsElement = factory2.updateExpressionWithTypeArguments( - extendsElement, - classInfo2.classSuper, - /*typeArguments*/ - void 0 - ); - const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]); - heritageClauses = factory2.createNodeArray([updatedExtendsClause]); - } - } else { - heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); + const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); + const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); + const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); + if (extendsExpression) { + classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */ | 32 /* FileLevel */); + const unwrapped = skipOuterExpressions(extendsExpression); + const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; + classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression)); + const updatedExtendsElement = factory2.updateExpressionWithTypeArguments( + extendsElement, + classInfo2.classSuper, + /*typeArguments*/ + void 0 + ); + const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]); + heritageClauses = factory2.createNodeArray([updatedExtendsClause]); } const renamedClassThis = classInfo2.classThis ?? factory2.createThis(); - const needsSetNameHelper = !((_a = getOriginalNode(node, isClassLike)) == null ? void 0 : _a.name) && (classDecorators || !isStringLiteral(className) || !isEmptyStringLiteral(className)); - if (needsSetNameHelper) { - const setNameExpr = emitHelpers().createSetFunctionNameHelper(factory2.createThis(), className); - leadingBlockStatements = append(leadingBlockStatements, factory2.createExpressionStatement(setNameExpr)); - } enterClass(classInfo2); + leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo2.metadataReference, classInfo2.classSuper)); let members = visitNodes2(node.members, classElementVisitor, isClassElement); if (pendingExpressions) { let outerThis; @@ -91370,15 +92305,15 @@ function transformESDecorators(context) { leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.nonStaticFieldDecorationStatements); if (classInfo2.classDescriptorName && classInfo2.classDecoratorsName && classInfo2.classExtraInitializersName && classInfo2.classThis) { leadingBlockStatements ?? (leadingBlockStatements = []); - const valueProperty = factory2.createPropertyAssignment("value", factory2.createThis()); + const valueProperty = factory2.createPropertyAssignment("value", renamedClassThis); const classDescriptor = factory2.createObjectLiteralExpression([valueProperty]); const classDescriptorAssignment = factory2.createAssignment(classInfo2.classDescriptorName, classDescriptor); - const classNameReference = factory2.createPropertyAccessExpression(factory2.createThis(), "name"); + const classNameReference = factory2.createPropertyAccessExpression(renamedClassThis, "name"); const esDecorateHelper2 = emitHelpers().createESDecorateHelper( factory2.createNull(), classDescriptorAssignment, classInfo2.classDecoratorsName, - { kind: "class", name: classNameReference }, + { kind: "class", name: classNameReference, metadata: classInfo2.metadataReference }, factory2.createNull(), classInfo2.classExtraInitializersName ); @@ -91390,6 +92325,7 @@ function transformESDecorators(context) { const classReferenceAssignment = factory2.createAssignment(classReference, classThisAssignment); leadingBlockStatements.push(factory2.createExpressionStatement(classReferenceAssignment)); } + leadingBlockStatements.push(createSymbolMetadata(renamedClassThis, classInfo2.metadataReference)); if (classInfo2.staticExtraInitializersName) { const runStaticInitializersHelper = emitHelpers().createRunInitializersHelper(renamedClassThis, classInfo2.staticExtraInitializersName); const runStaticInitializersStatement = factory2.createExpressionStatement(runStaticInitializersHelper); @@ -91406,32 +92342,35 @@ function transformESDecorators(context) { addRange(leadingBlockStatements, trailingBlockStatements); trailingBlockStatements = void 0; } - let newMembers = members; - if (leadingBlockStatements) { - const leadingStaticBlockBody = factory2.createBlock( - leadingBlockStatements, - /*multiLine*/ - true - ); - const leadingStaticBlock = factory2.createClassStaticBlockDeclaration(leadingStaticBlockBody); - if (shouldTransformPrivateStaticElementsInClass) { - setInternalEmitFlags(leadingStaticBlock, 32 /* TransformPrivateStaticElements */); - } - newMembers = [leadingStaticBlock, ...newMembers]; - } - if (syntheticConstructor) { - newMembers = [...newMembers, syntheticConstructor]; - } - if (trailingBlockStatements) { - const trailingStaticBlockBody = factory2.createBlock( - trailingBlockStatements, - /*multiLine*/ - true - ); - const trailingStaticBlock = factory2.createClassStaticBlockDeclaration(trailingStaticBlockBody); - newMembers = [...newMembers, trailingStaticBlock]; + const leadingStaticBlock = leadingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock( + leadingBlockStatements, + /*multiLine*/ + true + )); + if (leadingStaticBlock && shouldTransformPrivateStaticElementsInClass) { + setInternalEmitFlags(leadingStaticBlock, 32 /* TransformPrivateStaticElements */); } - if (newMembers !== members) { + const trailingStaticBlock = trailingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock( + trailingBlockStatements, + /*multiLine*/ + true + )); + if (leadingStaticBlock || syntheticConstructor || trailingStaticBlock) { + const newMembers = []; + const existingNamedEvaluationHelperBlockIndex = members.findIndex(isClassNamedEvaluationHelperBlock); + if (leadingStaticBlock) { + addRange(newMembers, members, 0, existingNamedEvaluationHelperBlockIndex + 1); + newMembers.push(leadingStaticBlock); + addRange(newMembers, members, existingNamedEvaluationHelperBlockIndex + 1); + } else { + addRange(newMembers, members); + } + if (syntheticConstructor) { + newMembers.push(syntheticConstructor); + } + if (trailingStaticBlock) { + newMembers.push(trailingStaticBlock); + } members = setTextRange(factory2.createNodeArray(newMembers), members); } const lexicalEnvironment = endLexicalEnvironment(); @@ -91447,6 +92386,9 @@ function transformESDecorators(context) { heritageClauses, members ); + if (classInfo2.classThis) { + classExpression = injectClassThisAssignmentIfMissing(factory2, classExpression, classInfo2.classThis); + } const classReferenceDeclaration = factory2.createVariableDeclaration( classReference, /*exclamationToken*/ @@ -91486,7 +92428,6 @@ function transformESDecorators(context) { } } setOriginalNode(classExpression, node); - getOrCreateEmitNode(classExpression).classThis = classInfo2.classThis; return factory2.createImmediatelyInvokedArrowFunction(factory2.mergeLexicalEnvironment(classDefinitionStatements, lexicalEnvironment)); } function isDecoratedClassLike(node) { @@ -91502,26 +92443,51 @@ function transformESDecorators(context) { } function visitClassDeclaration(node) { if (isDecoratedClassLike(node)) { - if (hasSyntacticModifier(node, 1 /* Export */) && hasSyntacticModifier(node, 1024 /* Default */)) { - const originalClass = getOriginalNode(node, isClassLike) ?? node; - const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); - const iife = transformClassLike(node, className); - const statement = factory2.createExportDefault(iife); - setOriginalNode(statement, node); - setCommentRange(statement, getCommentRange(node)); - setSourceMapRange(statement, moveRangePastDecorators(node)); - return statement; + const statements = []; + const originalClass = getOriginalNode(node, isClassLike) ?? node; + const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); + const isExport = hasSyntacticModifier(node, 1 /* Export */); + const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + if (!node.name) { + node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className); + } + if (isExport && isDefault) { + const iife = transformClassLike(node); + if (node.name) { + const varDecl = factory2.createVariableDeclaration( + factory2.getLocalName(node), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + iife + ); + setOriginalNode(varDecl, node); + const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); + const varStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + varDecls + ); + statements.push(varStatement); + const exportStatement = factory2.createExportDefault(factory2.getDeclarationName(node)); + setOriginalNode(exportStatement, node); + setCommentRange(exportStatement, getCommentRange(node)); + setSourceMapRange(exportStatement, moveRangePastDecorators(node)); + statements.push(exportStatement); + } else { + const exportStatement = factory2.createExportDefault(iife); + setOriginalNode(exportStatement, node); + setCommentRange(exportStatement, getCommentRange(node)); + setSourceMapRange(exportStatement, moveRangePastDecorators(node)); + statements.push(exportStatement); + } } else { Debug.assertIsDefined(node.name, "A class declaration that is not a default export must have a name."); - const iife = transformClassLike(node, factory2.createStringLiteralFromNode(node.name)); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const declName = languageVersion <= 2 /* ES2015 */ ? factory2.getInternalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ) : factory2.getLocalName( + const iife = transformClassLike(node); + const modifierVisitorNoExport = isExport ? (node2) => isExportModifier(node2) ? void 0 : modifierVisitor(node2) : modifierVisitor; + const modifiers = visitNodes2(node.modifiers, modifierVisitorNoExport, isModifier); + const declName = factory2.getLocalName( node, /*allowComments*/ false, @@ -91538,11 +92504,17 @@ function transformESDecorators(context) { ); setOriginalNode(varDecl, node); const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); - const statement = factory2.createVariableStatement(modifiers, varDecls); - setOriginalNode(statement, node); - setCommentRange(statement, getCommentRange(node)); - return statement; + const varStatement = factory2.createVariableStatement(modifiers, varDecls); + setOriginalNode(varStatement, node); + setCommentRange(varStatement, getCommentRange(node)); + statements.push(varStatement); + if (isExport) { + const exportStatement = factory2.createExternalModuleExport(declName); + setOriginalNode(exportStatement, node); + statements.push(exportStatement); + } } + return singleOrMany(statements); } else { const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); @@ -91563,10 +92535,9 @@ function transformESDecorators(context) { ); } } - function visitClassExpression(node, referencedName) { + function visitClassExpression(node) { if (isDecoratedClassLike(node)) { - const className = node.name ? factory2.createStringLiteralFromNode(node.name) : referencedName ?? factory2.createStringLiteral(""); - const iife = transformClassLike(node, className); + const iife = transformClassLike(node); setOriginalNode(iife, node); return iife; } else { @@ -91603,6 +92574,35 @@ function transformESDecorators(context) { return statements; } } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } function visitConstructorDeclaration(node) { enterClassElement(node); const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); @@ -91619,11 +92619,9 @@ function transformESDecorators(context) { false, visitor ); - const superStatementIndex = findSuperStatementIndex(node.body.statements, nonPrologueStart); - if (superStatementIndex >= 0) { - addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, nonPrologueStart, superStatementIndex + 1 - nonPrologueStart)); - addRange(statements, initializerStatements); - addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, superStatementIndex + 1)); + const superStatementIndices = findSuperStatementIndexPath(node.body.statements, nonPrologueStart); + if (superStatementIndices.length > 0) { + transformConstructorBodyWorker(statements, node.body.statements, nonPrologueStart, superStatementIndices, 0, initializerStatements); } else { addRange(statements, initializerStatements); addRange(statements, visitNodes2(node.body.statements, visitor, isStatement)); @@ -91648,7 +92646,7 @@ function transformESDecorators(context) { } return updated; } - function partialTransformClassElement(member, useNamedEvaluation, classInfo2, createDescriptor) { + function partialTransformClassElement(member, classInfo2, createDescriptor) { let referencedName; let name; let initializersName; @@ -91657,11 +92655,7 @@ function transformESDecorators(context) { if (!classInfo2) { const modifiers2 = visitNodes2(member.modifiers, modifierVisitor, isModifier); enterName(); - if (useNamedEvaluation) { - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - } else { - name = visitPropertyName(member.name); - } + name = visitPropertyName(member.name); exitName(); return { modifiers: modifiers2, referencedName, name, initializersName, descriptorName, thisArg }; } @@ -91710,9 +92704,10 @@ function transformESDecorators(context) { get: isPropertyDeclaration(member) || isGetAccessorDeclaration(member) || isMethodDeclaration(member), // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ... set: isPropertyDeclaration(member) || isSetAccessorDeclaration(member) - } + }, + metadata: classInfo2.metadataReference }; - const extraInitializers = isStatic(member) ? classInfo2.staticExtraInitializersName ?? (classInfo2.staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */)) : classInfo2.instanceExtraInitializersName ?? (classInfo2.instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */)); + const extraInitializers = isStatic(member) ? classInfo2.staticExtraInitializersName ?? (classInfo2.staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)) : classInfo2.instanceExtraInitializersName ?? (classInfo2.instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); if (isMethodOrAccessor(member)) { let descriptor; if (isPrivateIdentifierClassElementDeclaration(member) && createDescriptor) { @@ -91754,11 +92749,7 @@ function transformESDecorators(context) { } if (name === void 0) { enterName(); - if (useNamedEvaluation) { - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - } else { - name = visitPropertyName(member.name); - } + name = visitPropertyName(member.name); exitName(); } if (!some(modifiers) && (isMethodDeclaration(member) || isPropertyDeclaration(member))) { @@ -91768,13 +92759,7 @@ function transformESDecorators(context) { } function visitMethodDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createMethodDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createMethodDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createMethodDescriptorForwarder(modifiers, name, descriptorName), node); @@ -91800,13 +92785,7 @@ function transformESDecorators(context) { } function visitGetAccessorDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createGetAccessorDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createGetAccessorDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createGetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); @@ -91827,13 +92806,7 @@ function transformESDecorators(context) { } function visitSetAccessorDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createSetAccessorDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createSetAccessorDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createSetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); @@ -91846,19 +92819,31 @@ function transformESDecorators(context) { } function visitClassStaticBlockDeclaration(node) { enterClassElement(node); - if (classInfo) - classInfo.hasStaticInitializers = true; - const result = visitEachChild(node, visitor, context); + let result; + if (isClassNamedEvaluationHelperBlock(node)) { + result = visitEachChild(node, visitor, context); + } else if (isClassThisAssignmentBlock(node)) { + const savedClassThis = classThis; + classThis = void 0; + result = visitEachChild(node, visitor, context); + classThis = savedClassThis; + } else { + if (classInfo) + classInfo.hasStaticInitializers = true; + result = visitEachChild(node, visitor, context); + } exitClassElement(); return result; } function visitPropertyDeclaration(node) { + if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); + } enterClassElement(node); Debug.assert(!isAmbientPropertyDeclaration(node), "Not yet implemented."); - const useNamedEvaluation = isNamedEvaluation(node, isAnonymousClassNeedingAssignedName); - const { modifiers, name, referencedName, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, useNamedEvaluation, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : void 0); + const { modifiers, name, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : void 0); startLexicalEnvironment(); - let initializer = referencedName ? visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression) : visitNode(node.initializer, visitor, isExpression); + let initializer = visitNode(node.initializer, visitor, isExpression); if (initializersName) { initializer = emitHelpers().createRunInitializersHelper( thisArg ?? factory2.createThis(), @@ -91988,38 +92973,21 @@ function transformESDecorators(context) { return visitEachChild(node, visitor, context); } function visitParameterDeclaration(node) { - let updated; if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - updated = factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - initializer - ); - } else { - updated = factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - node.dotDotDotToken, - visitNode(node.name, visitor, isBindingName), - /*questionToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } + const updated = factory2.updateParameterDeclaration( + node, + /*modifiers*/ + void 0, + node.dotDotDotToken, + visitNode(node.name, visitor, isBindingName), + /*questionToken*/ + void 0, + /*type*/ + void 0, + visitNode(node.initializer, visitor, isExpression) + ); if (updated !== node) { setCommentRange(updated, node); setTextRange(updated, moveRangePastModifiers(node)); @@ -92031,6 +92999,14 @@ function transformESDecorators(context) { function isAnonymousClassNeedingAssignedName(node) { return isClassExpression(node) && !node.name && isDecoratedClassLike(node); } + function canIgnoreEmptyStringLiteralInAssignedName(node) { + const innerExpression = skipOuterExpressions(node); + return isClassExpression(innerExpression) && !innerExpression.name && !classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + innerExpression + ); + } function visitForStatement(node) { return factory2.updateForStatement( node, @@ -92051,10 +93027,8 @@ function transformESDecorators(context) { } if (isAssignmentExpression(node)) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const left = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); + return visitEachChild(node, visitor, context); } if (isSuperProperty(node.left) && classThis && classSuper) { let setterName = isElementAccessExpression(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0; @@ -92174,43 +93148,19 @@ function transformESDecorators(context) { } function visitPropertyAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updatePropertyAssignment(node, name, initializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } function visitVariableDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateVariableDeclaration( - node, - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } function visitBindingElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const propertyName = visitNode(node.propertyName, visitor, isPropertyName); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBindingElement( - node, - /*dotDotDotToken*/ - void 0, - propertyName, - name, - initializer - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } @@ -92247,14 +93197,11 @@ function transformESDecorators(context) { /*excludeCompoundAssignment*/ true )) { - const assignmentTarget = visitDestructuringAssignmentTarget(node.left); - let initializer; if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - initializer = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - } else { - initializer = visitNode(node.right, visitor, isExpression); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); } + const assignmentTarget = visitDestructuringAssignmentTarget(node.left); + const initializer = visitNode(node.right, visitor, isExpression); return factory2.updateBinaryExpression(node, assignmentTarget, node.operatorToken, initializer); } else { return visitDestructuringAssignmentTarget(node); @@ -92293,10 +93240,7 @@ function transformESDecorators(context) { } function visitShorthandAssignmentProperty(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.objectAssignmentInitializer); - const name = visitNode(node.name, visitor, isIdentifier); - const objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.objectAssignmentInitializer)); } return visitEachChild(node, visitor, context); } @@ -92328,20 +93272,17 @@ function transformESDecorators(context) { } function visitExportAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const referencedName = factory2.createStringLiteral(node.isExportEquals ? "" : "default"); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const expression = visitNode(node.expression, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updateExportAssignment(node, modifiers, expression); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.expression)); } return visitEachChild(node, visitor, context); } - function visitParenthesizedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitParenthesizedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updateParenthesizedExpression(node, expression); } - function visitPartiallyEmittedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitPartiallyEmittedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updatePartiallyEmittedExpression(node, expression); } @@ -92369,6 +93310,17 @@ function transformESDecorators(context) { function transformDecorator(decorator) { const expression = visitNode(decorator.expression, visitor, isExpression); setEmitFlags(expression, 3072 /* NoComments */); + const innerExpression = skipOuterExpressions(expression); + if (isAccessExpression(innerExpression)) { + const { target, thisArg } = factory2.createCallBinding( + expression, + hoistVariableDeclaration, + languageVersion, + /*cacheIdentifiers*/ + true + ); + return factory2.restoreOuterExpressions(expression, factory2.createFunctionBindCall(target, thisArg, [])); + } return expression; } function createDescriptorMethod(original, name, modifiers, asteriskToken, kind, parameters, body) { @@ -92554,9 +93506,59 @@ function transformESDecorators(context) { ]) ); } - function getAssignedNameOfIdentifier(name, initializer) { - const originalClass = getOriginalNode(initializer, isClassLike); - return originalClass && !originalClass.name && hasSyntacticModifier(originalClass, 1024 /* Default */) ? factory2.createStringLiteral("default") : factory2.createStringLiteralFromNode(name); + function createMetadata(name, classSuper2) { + const varDecl = factory2.createVariableDeclaration( + name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + factory2.createConditionalExpression( + factory2.createLogicalAnd( + factory2.createTypeCheck(factory2.createIdentifier("Symbol"), "function"), + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata") + ), + factory2.createToken(58 /* QuestionToken */), + factory2.createCallExpression( + factory2.createPropertyAccessExpression(factory2.createIdentifier("Object"), "create"), + /*typeArguments*/ + void 0, + [classSuper2 ? createSymbolMetadataReference(classSuper2) : factory2.createNull()] + ), + factory2.createToken(59 /* ColonToken */), + factory2.createVoidZero() + ) + ); + return factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([varDecl], 2 /* Const */) + ); + } + function createSymbolMetadata(target, value) { + const defineProperty = factory2.createObjectDefinePropertyCall( + target, + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata"), + factory2.createPropertyDescriptor( + { configurable: true, writable: true, enumerable: true, value }, + /*singleLine*/ + true + ) + ); + return setEmitFlags( + factory2.createIfStatement(value, factory2.createExpressionStatement(defineProperty)), + 1 /* SingleLine */ + ); + } + function createSymbolMetadataReference(classSuper2) { + return factory2.createBinaryExpression( + factory2.createElementAccessExpression( + classSuper2, + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata") + ), + 61 /* QuestionQuestionToken */, + factory2.createNull() + ); } } @@ -92634,34 +93636,34 @@ function transformES2017(context) { switch (node.kind) { case 134 /* AsyncKeyword */: return void 0; - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return visitAwaitExpression(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 175 /* Constructor */: + case 176 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -92670,27 +93672,27 @@ function transformES2017(context) { function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 240 /* Block */: - case 254 /* SwitchStatement */: - case 268 /* CaseBlock */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 257 /* TryStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 244 /* IfStatement */: - case 253 /* WithStatement */: - case 255 /* LabeledStatement */: + case 241 /* Block */: + case 255 /* SwitchStatement */: + case 269 /* CaseBlock */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 258 /* TryStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 245 /* IfStatement */: + case 254 /* WithStatement */: + case 256 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -92883,7 +93885,7 @@ function transformES2017(context) { } } function isVariableDeclarationListWithCollidingName(node) { - return !!node && isVariableDeclarationList(node) && !(node.flags & 3 /* BlockScoped */) && node.declarations.some(collidesWithParameterName); + return !!node && isVariableDeclarationList(node) && !(node.flags & 7 /* BlockScoped */) && node.declarations.some(collidesWithParameterName); } function visitVariableDeclarationListWithCollidingNames(node, hasReceiver) { hoistVariableDeclarationList(node); @@ -92967,7 +93969,7 @@ function transformES2017(context) { const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 218 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 219 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = /* @__PURE__ */ new Set(); @@ -93066,15 +94068,15 @@ function transformES2017(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); - context.enableEmitNotification(262 /* ClassDeclaration */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(242 /* VariableStatement */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableEmitNotification(263 /* ClassDeclaration */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(243 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -93105,11 +94107,11 @@ function transformES2017(context) { } function substituteExpression(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -93153,7 +94155,7 @@ function transformES2017(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 262 /* ClassDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -93393,119 +94395,119 @@ function transformES2018(context) { return node; } switch (node.kind) { - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return visitAwaitExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 248 /* ForInStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 249 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return visitVoidExpression(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -93590,7 +94592,7 @@ function transformES2018(context) { function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 249 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 250 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -93601,7 +94603,7 @@ function transformES2018(context) { let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 304 /* SpreadAssignment */) { + if (e.kind === 305 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -93609,7 +94611,7 @@ function transformES2018(context) { const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 302 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -93620,7 +94622,7 @@ function transformES2018(context) { function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 209 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -94389,15 +95391,15 @@ function transformES2018(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); - context.enableEmitNotification(262 /* ClassDeclaration */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(242 /* VariableStatement */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableEmitNotification(263 /* ClassDeclaration */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(243 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -94428,11 +95430,11 @@ function transformES2018(context) { } function substituteExpression(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -94476,7 +95478,7 @@ function transformES2018(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 262 /* ClassDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -94521,7 +95523,7 @@ function transformES2019(context) { return node; } switch (node.kind) { - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -94560,7 +95562,7 @@ function transformES2020(context) { return node; } switch (node.kind) { - case 212 /* CallExpression */: { + case 213 /* CallExpression */: { const updated = visitNonOptionalCallExpression( node, /*captureThisArg*/ @@ -94569,8 +95571,8 @@ function transformES2020(context) { Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression( node, @@ -94583,12 +95585,12 @@ function transformES2020(context) { return updated; } return visitEachChild(node, visitor, context); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (node.operatorToken.kind === 61 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -94626,7 +95628,7 @@ function transformES2020(context) { thisArg = expression; } } - expression = node.kind === 210 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -94662,12 +95664,12 @@ function transformES2020(context) { } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -94693,8 +95695,8 @@ function transformES2020(context) { for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -94703,9 +95705,9 @@ function transformES2020(context) { thisArg = rightExpression; } } - rightExpression = segment.kind === 210 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -94876,22 +95878,636 @@ function transformES2021(context) { // src/compiler/transformers/esnext.ts function transformESNext(context) { + const { + factory: factory2, + getEmitHelperFactory: emitHelpers, + hoistVariableDeclaration, + startLexicalEnvironment, + endLexicalEnvironment + } = context; + let exportBindings; + let exportVars; + let defaultExportBinding; + let exportEqualsBinding; return chainBundle(context, transformSourceFile); function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } - return visitEachChild(node, visitor, context); + const visited = visitNode(node, visitor, isSourceFile); + addEmitHelpers(visited, context.readEmitHelpers()); + exportVars = void 0; + exportBindings = void 0; + defaultExportBinding = void 0; + return visited; } function visitor(node) { if ((node.transformFlags & 4 /* ContainsESNext */) === 0) { return node; } switch (node.kind) { + case 312 /* SourceFile */: + return visitSourceFile(node); + case 241 /* Block */: + return visitBlock(node); + case 248 /* ForStatement */: + return visitForStatement(node); + case 250 /* ForOfStatement */: + return visitForOfStatement(node); + case 255 /* SwitchStatement */: + return visitSwitchStatement(node); default: return visitEachChild(node, visitor, context); } } + function visitSourceFile(node) { + const usingKind = getUsingKindOfStatements(node.statements); + if (usingKind) { + startLexicalEnvironment(); + exportBindings = new IdentifierNameMap(); + exportVars = []; + const prologueCount = countPrologueStatements(node.statements); + const topLevelStatements = []; + addRange(topLevelStatements, visitArray(node.statements, visitor, isStatement, 0, prologueCount)); + let pos = prologueCount; + while (pos < node.statements.length) { + const statement = node.statements[pos]; + if (getUsingKind(statement) !== 0 /* None */) { + if (pos > prologueCount) { + addRange(topLevelStatements, visitNodes2(node.statements, visitor, isStatement, prologueCount, pos - prologueCount)); + } + break; + } + pos++; + } + Debug.assert(pos < node.statements.length, "Should have encountered at least one 'using' statement."); + const envBinding = createEnvBinding(); + const bodyStatements = transformUsingDeclarations(node.statements, pos, node.statements.length, envBinding, topLevelStatements); + if (exportBindings.size) { + append(topLevelStatements, factory2.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory2.createNamedExports(arrayFrom(exportBindings.values())) + )); + } + addRange(topLevelStatements, endLexicalEnvironment()); + if (exportVars.length) { + topLevelStatements.push(factory2.createVariableStatement( + factory2.createModifiersFromModifierFlags(1 /* Export */), + factory2.createVariableDeclarationList( + exportVars, + 1 /* Let */ + ) + )); + } + addRange(topLevelStatements, createDownlevelUsingStatements(bodyStatements, envBinding, usingKind === 2 /* Async */)); + if (exportEqualsBinding) { + topLevelStatements.push(factory2.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + true, + exportEqualsBinding + )); + } + return factory2.updateSourceFile(node, topLevelStatements); + } + return visitEachChild(node, visitor, context); + } + function visitBlock(node) { + const usingKind = getUsingKindOfStatements(node.statements); + if (usingKind) { + const prologueCount = countPrologueStatements(node.statements); + const envBinding = createEnvBinding(); + return factory2.updateBlock( + node, + [ + ...visitArray(node.statements, visitor, isStatement, 0, prologueCount), + ...createDownlevelUsingStatements( + transformUsingDeclarations( + node.statements, + prologueCount, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ), + envBinding, + usingKind === 2 /* Async */ + ) + ] + ); + } + return visitEachChild(node, visitor, context); + } + function visitForStatement(node) { + if (node.initializer && isUsingVariableDeclarationList(node.initializer)) { + return visitNode( + factory2.createBlock([ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + node.initializer + ), + factory2.updateForStatement( + node, + /*initializer*/ + void 0, + node.condition, + node.incrementor, + node.statement + ) + ]), + visitor, + isStatement + ); + } + return visitEachChild(node, visitor, context); + } + function visitForOfStatement(node) { + if (isUsingVariableDeclarationList(node.initializer)) { + const forInitializer = node.initializer; + Debug.assertNode(forInitializer, isUsingVariableDeclarationList); + Debug.assert(forInitializer.declarations.length === 1, "ForInitializer may only have one declaration"); + const forDecl = forInitializer.declarations[0]; + Debug.assert(!forDecl.initializer, "ForInitializer may not have an initializer"); + const isAwaitUsing = getUsingKindOfVariableDeclarationList(forInitializer) === 2 /* Async */; + const temp = factory2.getGeneratedNameForNode(forDecl.name); + const usingVar = factory2.updateVariableDeclaration( + forDecl, + forDecl.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + temp + ); + const usingVarList = factory2.createVariableDeclarationList([usingVar], isAwaitUsing ? 6 /* AwaitUsing */ : 4 /* Using */); + const usingVarStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + usingVarList + ); + return visitNode( + factory2.updateForOfStatement( + node, + node.awaitModifier, + factory2.createVariableDeclarationList([ + factory2.createVariableDeclaration(temp) + ], 2 /* Const */), + node.expression, + isBlock(node.statement) ? factory2.updateBlock(node.statement, [ + usingVarStatement, + ...node.statement.statements + ]) : factory2.createBlock( + [ + usingVarStatement, + node.statement + ], + /*multiLine*/ + true + ) + ), + visitor, + isStatement + ); + } + return visitEachChild(node, visitor, context); + } + function visitCaseOrDefaultClause(node, envBinding) { + if (getUsingKindOfStatements(node.statements) !== 0 /* None */) { + if (isCaseClause(node)) { + return factory2.updateCaseClause( + node, + visitNode(node.expression, visitor, isExpression), + transformUsingDeclarations( + node.statements, + /*start*/ + 0, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ) + ); + } else { + return factory2.updateDefaultClause( + node, + transformUsingDeclarations( + node.statements, + /*start*/ + 0, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ) + ); + } + } + return visitEachChild(node, visitor, context); + } + function visitSwitchStatement(node) { + const usingKind = getUsingKindOfCaseOrDefaultClauses(node.caseBlock.clauses); + if (usingKind) { + const envBinding = createEnvBinding(); + return createDownlevelUsingStatements( + [ + factory2.updateSwitchStatement( + node, + visitNode(node.expression, visitor, isExpression), + factory2.updateCaseBlock( + node.caseBlock, + node.caseBlock.clauses.map((clause) => visitCaseOrDefaultClause(clause, envBinding)) + ) + ) + ], + envBinding, + usingKind === 2 /* Async */ + ); + } + return visitEachChild(node, visitor, context); + } + function transformUsingDeclarations(statementsIn, start, end, envBinding, topLevelStatements) { + const statements = []; + for (let i = start; i < end; i++) { + const statement = statementsIn[i]; + const usingKind = getUsingKind(statement); + if (usingKind) { + Debug.assertNode(statement, isVariableStatement); + const declarations = []; + for (let declaration of statement.declarationList.declarations) { + if (!isIdentifier(declaration.name)) { + declarations.length = 0; + break; + } + if (isNamedEvaluation(declaration)) { + declaration = transformNamedEvaluation(context, declaration); + } + const initializer = visitNode(declaration.initializer, visitor, isExpression) ?? factory2.createVoidZero(); + declarations.push(factory2.updateVariableDeclaration( + declaration, + declaration.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + emitHelpers().createAddDisposableResourceHelper( + envBinding, + initializer, + usingKind === 2 /* Async */ + ) + )); + } + if (declarations.length) { + const varList = factory2.createVariableDeclarationList(declarations, 2 /* Const */); + setOriginalNode(varList, statement.declarationList); + setTextRange(varList, statement.declarationList); + hoistOrAppendNode(factory2.updateVariableStatement( + statement, + /*modifiers*/ + void 0, + varList + )); + continue; + } + } + const result = visitor(statement); + if (isArray(result)) { + result.forEach(hoistOrAppendNode); + } else if (result) { + hoistOrAppendNode(result); + } + } + return statements; + function hoistOrAppendNode(node) { + Debug.assertNode(node, isStatement); + append(statements, hoist(node)); + } + function hoist(node) { + if (!topLevelStatements) + return node; + switch (node.kind) { + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 262 /* FunctionDeclaration */: + return hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements); + case 277 /* ExportAssignment */: + return hoistExportAssignment(node); + case 263 /* ClassDeclaration */: + return hoistClassDeclaration(node); + case 243 /* VariableStatement */: + return hoistVariableStatement(node); + } + return node; + } + } + function hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements) { + topLevelStatements.push(node); + return void 0; + } + function hoistExportAssignment(node) { + return node.isExportEquals ? hoistExportEquals(node) : hoistExportDefault(node); + } + function hoistExportDefault(node) { + if (defaultExportBinding) { + return node; + } + defaultExportBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistBindingIdentifier( + defaultExportBinding, + /*isExport*/ + true, + "default", + node + ); + let expression = node.expression; + let innerExpression = skipOuterExpressions(expression); + if (isNamedEvaluation(innerExpression)) { + innerExpression = transformNamedEvaluation( + context, + innerExpression, + /*ignoreEmptyStringLiteral*/ + false, + "default" + ); + expression = factory2.restoreOuterExpressions(expression, innerExpression); + } + const assignment = factory2.createAssignment(defaultExportBinding, expression); + return factory2.createExpressionStatement(assignment); + } + function hoistExportEquals(node) { + if (exportEqualsBinding) { + return node; + } + exportEqualsBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistVariableDeclaration(exportEqualsBinding); + const assignment = factory2.createAssignment(exportEqualsBinding, node.expression); + return factory2.createExpressionStatement(assignment); + } + function hoistClassDeclaration(node) { + if (!node.name && defaultExportBinding) { + return node; + } + const isExported = hasSyntacticModifier(node, 1 /* Export */); + const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + let expression = factory2.converters.convertToClassExpression(node); + if (node.name) { + hoistBindingIdentifier( + factory2.getLocalName(node), + isExported && !isDefault, + /*exportAlias*/ + void 0, + node + ); + expression = factory2.createAssignment(factory2.getDeclarationName(node), expression); + if (isNamedEvaluation(expression)) { + expression = transformNamedEvaluation( + context, + expression, + /*ignoreEmptyStringLiteral*/ + false + ); + } + setOriginalNode(expression, node); + setSourceMapRange(expression, node); + setCommentRange(expression, node); + } + if (isDefault && !defaultExportBinding) { + defaultExportBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistBindingIdentifier( + defaultExportBinding, + /*isExport*/ + true, + "default", + node + ); + expression = factory2.createAssignment(defaultExportBinding, expression); + if (isNamedEvaluation(expression)) { + expression = transformNamedEvaluation( + context, + expression, + /*ignoreEmptyStringLiteral*/ + false, + "default" + ); + } + setOriginalNode(expression, node); + } + return factory2.createExpressionStatement(expression); + } + function hoistVariableStatement(node) { + let expressions; + const isExported = hasSyntacticModifier(node, 1 /* Export */); + for (const variable of node.declarationList.declarations) { + hoistBindingElement(variable, isExported, variable); + if (variable.initializer) { + expressions = append(expressions, hoistInitializedVariable(variable)); + } + } + if (expressions) { + const statement = factory2.createExpressionStatement(factory2.inlineExpressions(expressions)); + setOriginalNode(statement, node); + setCommentRange(statement, node); + setSourceMapRange(statement, node); + return statement; + } + return void 0; + } + function hoistInitializedVariable(node) { + Debug.assertIsDefined(node.initializer); + let target; + if (isIdentifier(node.name)) { + target = factory2.cloneNode(node.name); + setEmitFlags(target, getEmitFlags(target) & ~(32768 /* LocalName */ | 16384 /* ExportName */ | 65536 /* InternalName */)); + } else { + target = factory2.converters.convertToAssignmentPattern(node.name); + } + const assignment = factory2.createAssignment(target, node.initializer); + setOriginalNode(assignment, node); + setCommentRange(assignment, node); + setSourceMapRange(assignment, node); + return assignment; + } + function hoistBindingElement(node, isExportedDeclaration, original) { + if (isBindingPattern(node.name)) { + for (const element of node.name.elements) { + if (!isOmittedExpression(element)) { + hoistBindingElement(element, isExportedDeclaration, original); + } + } + } else { + hoistBindingIdentifier( + node.name, + isExportedDeclaration, + /*exportAlias*/ + void 0, + original + ); + } + } + function hoistBindingIdentifier(node, isExport, exportAlias, original) { + const name = isGeneratedIdentifier(node) ? node : factory2.cloneNode(node); + if (isExport) { + if (exportAlias === void 0 && !isLocalName(name)) { + const varDecl = factory2.createVariableDeclaration(name); + if (original) { + setOriginalNode(varDecl, original); + } + exportVars.push(varDecl); + return; + } + const localName = exportAlias !== void 0 ? name : void 0; + const exportName = exportAlias !== void 0 ? exportAlias : name; + const specifier = factory2.createExportSpecifier( + /*isTypeOnly*/ + false, + localName, + exportName + ); + if (original) { + setOriginalNode(specifier, original); + } + exportBindings.set(name, specifier); + } + hoistVariableDeclaration(name); + } + function createEnvBinding() { + return factory2.createUniqueName("env"); + } + function createDownlevelUsingStatements(bodyStatements, envBinding, async) { + const statements = []; + const envObject = factory2.createObjectLiteralExpression([ + factory2.createPropertyAssignment("stack", factory2.createArrayLiteralExpression()), + factory2.createPropertyAssignment("error", factory2.createVoidZero()), + factory2.createPropertyAssignment("hasError", factory2.createFalse()) + ]); + const envVar = factory2.createVariableDeclaration( + envBinding, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + envObject + ); + const envVarList = factory2.createVariableDeclarationList([envVar], 2 /* Const */); + const envVarStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + envVarList + ); + statements.push(envVarStatement); + const tryBlock = factory2.createBlock( + bodyStatements, + /*multiLine*/ + true + ); + const bodyCatchBinding = factory2.createUniqueName("e"); + const catchClause = factory2.createCatchClause( + bodyCatchBinding, + factory2.createBlock( + [ + factory2.createExpressionStatement( + factory2.createAssignment( + factory2.createPropertyAccessExpression(envBinding, "error"), + bodyCatchBinding + ) + ), + factory2.createExpressionStatement( + factory2.createAssignment( + factory2.createPropertyAccessExpression(envBinding, "hasError"), + factory2.createTrue() + ) + ) + ], + /*multiLine*/ + true + ) + ); + let finallyBlock; + if (async) { + const result = factory2.createUniqueName("result"); + finallyBlock = factory2.createBlock( + [ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([ + factory2.createVariableDeclaration( + result, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + emitHelpers().createDisposeResourcesHelper(envBinding) + ) + ], 2 /* Const */) + ), + factory2.createIfStatement(result, factory2.createExpressionStatement(factory2.createAwaitExpression(result))) + ], + /*multiLine*/ + true + ); + } else { + finallyBlock = factory2.createBlock( + [ + factory2.createExpressionStatement( + emitHelpers().createDisposeResourcesHelper(envBinding) + ) + ], + /*multiLine*/ + true + ); + } + const tryStatement = factory2.createTryStatement(tryBlock, catchClause, finallyBlock); + statements.push(tryStatement); + return statements; + } +} +function countPrologueStatements(statements) { + for (let i = 0; i < statements.length; i++) { + if (!isPrologueDirective(statements[i]) && !isCustomPrologue(statements[i])) { + return i; + } + } + return 0; +} +function isUsingVariableDeclarationList(node) { + return isVariableDeclarationList(node) && getUsingKindOfVariableDeclarationList(node) !== 0 /* None */; +} +function getUsingKindOfVariableDeclarationList(node) { + return (node.flags & 7 /* BlockScoped */) === 6 /* AwaitUsing */ ? 2 /* Async */ : (node.flags & 7 /* BlockScoped */) === 4 /* Using */ ? 1 /* Sync */ : 0 /* None */; +} +function getUsingKindOfVariableStatement(node) { + return getUsingKindOfVariableDeclarationList(node.declarationList); +} +function getUsingKind(statement) { + return isVariableStatement(statement) ? getUsingKindOfVariableStatement(statement) : 0 /* None */; +} +function getUsingKindOfStatements(statements) { + let result = 0 /* None */; + for (const statement of statements) { + const usingKind = getUsingKind(statement); + if (usingKind === 2 /* Async */) + return 2 /* Async */; + if (usingKind > result) + result = usingKind; + } + return result; +} +function getUsingKindOfCaseOrDefaultClauses(clauses) { + let result = 0 /* None */; + for (const clause of clauses) { + const usingKind = getUsingKindOfStatements(clause.statements); + if (usingKind === 2 /* Async */) + return 2 /* Async */; + if (usingKind > result) + result = usingKind; + } + return result; } // src/compiler/transformers/jsx.ts @@ -95045,25 +96661,25 @@ function transformJsx(context) { } function visitorWorker(node) { switch (node.kind) { - case 283 /* JsxElement */: + case 284 /* JsxElement */: return visitJsxElement( node, /*isChild*/ false ); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ false ); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ false ); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -95073,21 +96689,21 @@ function transformJsx(context) { switch (node.kind) { case 12 /* JsxText */: return visitJsxText(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return visitJsxExpression(node); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return visitJsxElement( node, /*isChild*/ true ); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ true ); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ @@ -95295,10 +96911,10 @@ function transformJsx(context) { for (const prop of attr.expression.properties) { if (isSpreadAssignment(prop)) { finishObjectLiteralIfNeeded(); - expressions.push(prop.expression); + expressions.push(Debug.checkDefined(visitNode(prop.expression, visitor, isExpression))); continue; } - properties.push(prop); + properties.push(Debug.checkDefined(visitNode(prop, visitor))); } continue; } @@ -95337,7 +96953,7 @@ function transformJsx(context) { const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 293 /* JsxExpression */) { + if (node.kind === 294 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -95411,7 +97027,7 @@ function transformJsx(context) { return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 283 /* JsxElement */) { + if (node.kind === 284 /* JsxElement */) { return getTagName(node.openingElement); } else { const tagName = node.tagName; @@ -95711,7 +97327,7 @@ function transformES2016(context) { return node; } switch (node.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -95839,7 +97455,7 @@ function transformES2015(context) { hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 252 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -95906,85 +97522,85 @@ function transformES2015(context) { switch (node.kind) { case 126 /* StaticKeyword */: return void 0; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return visitArrowFunction(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); case 80 /* Identifier */: return visitIdentifier(node); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock( node, /*isFunctionBody*/ false ); - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return visitDoOrWhileStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 15 /* NoSubstitutionTemplateLiteral */: case 16 /* TemplateHead */: @@ -95995,13 +97611,13 @@ function transformES2015(context) { return visitStringLiteral(node); case 9 /* NumericLiteral */: return visitNumericLiteral(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return visitTemplateExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return visitSpreadElement(node); case 108 /* SuperKeyword */: return visitSuperKeyword( @@ -96010,18 +97626,18 @@ function transformES2015(context) { ); case 110 /* ThisKeyword */: return visitThisKeyword(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return visitMetaProperty(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return visitAccessorDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -96119,7 +97735,7 @@ function transformES2015(context) { return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments")); } } - if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) { + if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { return setOriginalNode(setTextRange( factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), node @@ -96129,13 +97745,13 @@ function transformES2015(context) { } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 251 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 252 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump; if (!canUseBreakOrContinue) { let labelMarker; const label = node.label; if (!label) { - if (node.kind === 251 /* BreakStatement */) { + if (node.kind === 252 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -96143,7 +97759,7 @@ function transformES2015(context) { labelMarker = "continue"; } } else { - if (node.kind === 251 /* BreakStatement */) { + if (node.kind === 252 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump( convertedLoopState, @@ -96349,6 +97965,104 @@ function transformES2015(context) { setEmitFlags(block, 3072 /* NoComments */); return block; } + function transformConstructorBodyWorker(prologueOut, statementsOut, statementsIn, statementOffset, superPath, superPathDepth, constructor, isDerivedClass, hasSynthesizedSuper, isFirstStatement) { + let mayReplaceThis = false; + const superStatementIndex = superPathDepth < superPath.length ? superPath[superPathDepth] : -1; + const leadingStatementsEnd = superStatementIndex >= 0 ? superStatementIndex : statementsIn.length; + if (isFirstStatement && superStatementIndex >= 0) { + let firstMaterialIndex = statementOffset; + while (isFirstStatement && firstMaterialIndex < superStatementIndex) { + const statement = constructor.body.statements[firstMaterialIndex]; + if (!isUninitializedVariableStatement(statement) && !isUsingDeclarationStateVariableStatement(statement)) + break; + firstMaterialIndex++; + } + isFirstStatement = superStatementIndex === firstMaterialIndex; + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, leadingStatementsEnd - statementOffset)); + const superStatement = superStatementIndex >= 0 ? statementsIn[superStatementIndex] : void 0; + if (superStatement && isTryStatement(superStatement)) { + const tryBlockStatements = []; + mayReplaceThis = transformConstructorBodyWorker( + prologueOut, + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + constructor, + isDerivedClass, + hasSynthesizedSuper, + isFirstStatement + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + const superCall = superStatement && getSuperCallFromStatement(superStatement); + let superCallExpression; + if (hasSynthesizedSuper) { + superCallExpression = createDefaultSuperCallOrThis(); + hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + } else if (superCall) { + superCallExpression = visitSuperCallInBody(superCall); + hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + } + if (isDerivedClass || superCallExpression) { + if (superCallExpression && superStatementIndex === statementsIn.length - 1 && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { + const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); + const returnStatement = factory2.createReturnStatement(superCallExpression); + setCommentRange(returnStatement, getCommentRange(superCall2)); + setEmitFlags(superCall2, 3072 /* NoComments */); + statementsOut.push(returnStatement); + return false; + } else { + if (isFirstStatement) { + insertCaptureThisForNode(statementsOut, constructor, superCallExpression || createActualThis()); + } else { + insertCaptureThisForNode(prologueOut, constructor, createActualThis()); + if (superCallExpression) { + addSuperThisCaptureThisForNode(statementsOut, superCallExpression); + } + } + mayReplaceThis = true; + } + } else { + insertCaptureThisForNodeIfNeeded(prologueOut, constructor); + } + } + if (superStatementIndex >= 0) { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } + return mayReplaceThis; + } + function isUninitializedVariableStatement(node) { + return isVariableStatement(node) && every(node.declarationList.declarations, (decl) => isIdentifier(decl.name) && !decl.initializer); + } + function isUsingDeclarationStateVariableStatement(node) { + if (!isVariableStatement(node) || node.declarationList.declarations.length !== 1) + return false; + const varDecl = node.declarationList.declarations[0]; + if (!isIdentifier(varDecl.name) || !varDecl.initializer) + return false; + const initializer = varDecl.initializer; + if (!isObjectLiteralExpression(initializer) || initializer.properties.length !== 3) + return false; + const [stackProp, errorProp, hasErrorProp] = initializer.properties; + if (!isPropertyAssignment(stackProp) || !isIdentifier(stackProp.name) || idText(stackProp.name) !== "stack" || !isArrayLiteralExpression(stackProp.initializer)) + return false; + if (!isPropertyAssignment(errorProp) || !isIdentifier(errorProp.name) || idText(errorProp.name) !== "error" || !isVoidExpression(errorProp.initializer) || !isNumericLiteral(errorProp.initializer.expression)) + return false; + if (!isPropertyAssignment(hasErrorProp) || !isIdentifier(hasErrorProp.name) || idText(hasErrorProp.name) !== "hasError" || hasErrorProp.initializer.kind !== 97 /* FalseKeyword */) + return false; + return true; + } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */; if (!constructor) @@ -96356,82 +98070,43 @@ function transformES2015(context) { const prologue = []; const statements = []; resumeLexicalEnvironment(); - const existingPrologue = takeWhile(constructor.body.statements, isPrologueDirective); - const { superCall, superStatementIndex } = findSuperCallAndStatementIndex(constructor.body.statements, existingPrologue); - const postSuperStatementsStart = superStatementIndex === -1 ? existingPrologue.length : superStatementIndex + 1; - let statementOffset = postSuperStatementsStart; - if (!hasSynthesizedSuper) - statementOffset = factory2.copyStandardPrologue( - constructor.body.statements, - prologue, - statementOffset, - /*ensureUseStrict*/ - false - ); - if (!hasSynthesizedSuper) - statementOffset = factory2.copyCustomPrologue( - constructor.body.statements, - statements, - statementOffset, - visitor, - /*filter*/ - void 0 - ); - let superCallExpression; - if (hasSynthesizedSuper) { - superCallExpression = createDefaultSuperCallOrThis(); - } else if (superCall) { - superCallExpression = visitSuperCallInBody(superCall); - } - if (superCallExpression) { + const standardPrologueEnd = factory2.copyStandardPrologue( + constructor.body.statements, + prologue, + /*statementOffset*/ + 0 + ); + const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, standardPrologueEnd); + if (hasSynthesizedSuper || superStatementIndices.length > 0) { hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; } - addDefaultValueAssignmentsIfNeeded2(prologue, constructor); - addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); - addRange(statements, visitNodes2( - constructor.body.statements, - visitor, - isStatement, - /*start*/ - statementOffset - )); - factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded( + const mayReplaceThis = transformConstructorBodyWorker( prologue, + statements, + constructor.body.statements, + standardPrologueEnd, + superStatementIndices, + /*superPathDepth*/ + 0, constructor, - /*copyOnWrite*/ - false + isDerivedClass, + hasSynthesizedSuper, + /*isFirstStatement*/ + true + // NOTE: this will be recalculated inside of transformConstructorBodyWorker ); - if (isDerivedClass || superCallExpression) { - if (superCallExpression && postSuperStatementsStart === constructor.body.statements.length && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { - const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); - const returnStatement = factory2.createReturnStatement(superCallExpression); - setCommentRange(returnStatement, getCommentRange(superCall2)); - setEmitFlags(superCall2, 3072 /* NoComments */); - statements.push(returnStatement); - } else { - if (superStatementIndex <= existingPrologue.length) { - insertCaptureThisForNode(statements, constructor, superCallExpression || createActualThis()); - } else { - insertCaptureThisForNode(prologue, constructor, createActualThis()); - if (superCallExpression) { - insertSuperThisCaptureThisForNode(statements, superCallExpression); - } - } - if (!isSufficientlyCoveredByReturnStatements(constructor.body)) { - statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); - } - } - } else { - insertCaptureThisForNodeIfNeeded(prologue, constructor); + addDefaultValueAssignmentsIfNeeded2(prologue, constructor); + addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); + insertCaptureNewTargetIfNeeded(prologue, constructor); + factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); + if (mayReplaceThis && !isSufficientlyCoveredByReturnStatements(constructor.body)) { + statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); } const body = factory2.createBlock( setTextRange( factory2.createNodeArray( [ - ...existingPrologue, ...prologue, - ...superStatementIndex <= existingPrologue.length ? emptyArray : visitNodes2(constructor.body.statements, visitor, isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length), ...statements ] ), @@ -96444,29 +98119,15 @@ function transformES2015(context) { setTextRange(body, constructor.body); return body; } - function findSuperCallAndStatementIndex(originalBodyStatements, existingPrologue) { - for (let i = existingPrologue.length; i < originalBodyStatements.length; i += 1) { - const superCall = getSuperCallFromStatement(originalBodyStatements[i]); - if (superCall) { - return { - superCall, - superStatementIndex: i - }; - } - } - return { - superStatementIndex: -1 - }; - } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 252 /* ReturnStatement */) { + if (statement.kind === 253 /* ReturnStatement */) { return true; - } else if (statement.kind === 244 /* IfStatement */) { + } else if (statement.kind === 245 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 240 /* Block */) { + } else if (statement.kind === 241 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -96740,13 +98401,13 @@ function transformES2015(context) { return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 218 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } return false; } - function insertSuperThisCaptureThisForNode(statements, superExpression) { + function addSuperThisCaptureThisForNode(statements, superExpression) { enableSubstitutionsForCapturedThis(); const assignSuperExpression = factory2.createExpressionStatement( factory2.createBinaryExpression( @@ -96755,7 +98416,7 @@ function transformES2015(context) { superExpression ) ); - insertStatementAfterCustomPrologue(statements, assignSuperExpression); + statements.push(assignSuperExpression); setCommentRange(assignSuperExpression, getOriginalNode(superExpression).parent); } function insertCaptureThisForNode(statements, node, initializer) { @@ -96778,25 +98439,25 @@ function transformES2015(context) { setSourceMapRange(captureThisStatement, node); insertStatementAfterCustomPrologue(statements, captureThisStatement); } - function insertCaptureNewTargetIfNeeded(statements, node, copyOnWrite) { + function insertCaptureNewTargetIfNeeded(statements, node) { if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return statements; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 175 /* Constructor */: + case 176 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), "constructor" ); break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), @@ -96835,9 +98496,6 @@ function transformES2015(context) { ]) ); setEmitFlags(captureNewTargetStatement, 3072 /* NoComments */ | 2097152 /* CustomPrologue */); - if (copyOnWrite) { - statements = statements.slice(); - } insertStatementAfterCustomPrologue(statements, captureNewTargetStatement); } return statements; @@ -96845,21 +98503,21 @@ function transformES2015(context) { function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 175 /* Constructor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -97066,7 +98724,7 @@ function transformES2015(context) { const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody(node); - if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -97127,7 +98785,7 @@ function transformES2015(context) { multiLine = true; } } else { - Debug.assert(node.kind === 218 /* ArrowFunction */); + Debug.assert(node.kind === 219 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -97146,12 +98804,7 @@ function transformES2015(context) { closeBraceLocation = body; } factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded( - prologue, - node, - /*copyOnWrite*/ - false - ); + insertCaptureNewTargetIfNeeded(prologue, node); insertCaptureThisForNodeIfNeeded(prologue, node); if (some(prologue)) { multiLine = true; @@ -97229,7 +98882,7 @@ function transformES2015(context) { function visitVariableStatement(node) { const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); let updated; - if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { + if (convertedLoopState && (node.declarationList.flags & 7 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { let assignments; for (const decl of node.declarationList.declarations) { hoistVariableDeclarationDeclaredInConvertedLoop(convertedLoopState, decl); @@ -97261,8 +98914,8 @@ function transformES2015(context) { return updated; } function visitVariableDeclarationList(node) { - if (node.flags & 3 /* BlockScoped */ || node.transformFlags & 524288 /* ContainsBindingPattern */) { - if (node.flags & 3 /* BlockScoped */) { + if (node.flags & 7 /* BlockScoped */ || node.transformFlags & 524288 /* ContainsBindingPattern */) { + if (node.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration); @@ -97353,14 +99006,14 @@ function transformES2015(context) { } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -97416,7 +99069,7 @@ function transformES2015(context) { const statements = []; const initializer = node.initializer; if (isVariableDeclarationList(initializer)) { - if (node.initializer.flags & 3 /* BlockScoped */) { + if (node.initializer.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } const firstOriginalDeclaration = firstOrUndefined(initializer.declarations); @@ -97710,7 +99363,7 @@ function transformES2015(context) { let numInitialProperties = -1, hasComputed = false; for (let i = 0; i < properties.length; i++) { const property = properties[i]; - if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 166 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -97832,15 +99485,15 @@ function transformES2015(context) { } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -97892,18 +99545,18 @@ function transformES2015(context) { function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 260 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 261 /* VariableDeclarationList */) { loopInitializer = initializer; } break; } const loopParameters = []; const loopOutParameters = []; - if (loopInitializer && getCombinedNodeFlags(loopInitializer) & 3 /* BlockScoped */) { + if (loopInitializer && getCombinedNodeFlags(loopInitializer) & 7 /* BlockScoped */) { const hasCapturedBindingsInForHead = shouldConvertInitializerOfForStatement(node) || shouldConvertConditionOfForStatement(node) || shouldConvertIncrementorOfForStatement(node); for (const decl of loopInitializer.declarations) { processLoopVariableDeclaration(node, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForHead); @@ -98311,10 +99964,10 @@ function transformES2015(context) { name )); const checkFlags = resolver.getNodeCheckFlags(decl); - if (checkFlags & 262144 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) { + if (checkFlags & 65536 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) { const outParamName = factory2.createUniqueName("out_" + idText(name)); let flags = 0 /* None */; - if (checkFlags & 262144 /* NeedsLoopOutParameter */) { + if (checkFlags & 65536 /* NeedsLoopOutParameter */) { flags |= 1 /* Body */; } if (isForStatement(container)) { @@ -98335,20 +99988,20 @@ function transformES2015(context) { for (let i = start; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -98474,7 +100127,7 @@ function transformES2015(context) { let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody(node); - if (node.kind === 176 /* GetAccessor */) { + if (node.kind === 177 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -98838,13 +100491,13 @@ function transformES2015(context) { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(218 /* ArrowFunction */); - context.enableEmitNotification(217 /* FunctionExpression */); - context.enableEmitNotification(261 /* FunctionDeclaration */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(219 /* ArrowFunction */); + context.enableEmitNotification(218 /* FunctionExpression */); + context.enableEmitNotification(262 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -98868,10 +100521,10 @@ function transformES2015(context) { } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 260 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -98928,11 +100581,11 @@ function transformES2015(context) { return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 243 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 244 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 212 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; @@ -98940,7 +100593,7 @@ function transformES2015(context) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 229 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 230 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -98957,24 +100610,24 @@ function transformES5(context) { if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(285 /* JsxOpeningElement */); - context.enableEmitNotification(286 /* JsxClosingElement */); - context.enableEmitNotification(284 /* JsxSelfClosingElement */); + context.enableEmitNotification(286 /* JsxOpeningElement */); + context.enableEmitNotification(287 /* JsxClosingElement */); + context.enableEmitNotification(285 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(302 /* PropertyAssignment */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(303 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: + case 285 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -99100,13 +100753,13 @@ function transformGenerators(context) { } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -99114,24 +100767,24 @@ function transformGenerators(context) { } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return visitAccessorDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return visitBreakStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return visitContinueStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -99145,23 +100798,23 @@ function transformGenerators(context) { } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return visitConditionalExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -99169,9 +100822,9 @@ function transformGenerators(context) { } function visitGenerator(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -99356,14 +101009,14 @@ function transformGenerators(context) { if (containsYield(right)) { let target; switch (left.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), left.name ); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), @@ -99696,35 +101349,35 @@ function transformGenerators(context) { } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 240 /* Block */: + case 241 /* Block */: return transformAndEmitBlock(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return transformAndEmitIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return transformAndEmitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return transformAndEmitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return transformAndEmitWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -100076,7 +101729,7 @@ function transformGenerators(context) { for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 296 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 297 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -100086,7 +101739,7 @@ function transformGenerators(context) { let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -101053,12 +102706,12 @@ function transformModule(context) { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(214 /* TaggedTemplateExpression */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(215 /* TaggedTemplateExpression */); context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(225 /* BinaryExpression */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(226 /* BinaryExpression */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(312 /* SourceFile */); const moduleInfoMap = []; let currentSourceFile; let currentModuleInfo; @@ -101070,7 +102723,7 @@ function transformModule(context) { return node; } currentSourceFile = node; - currentModuleInfo = collectExternalModuleInfo(context, node, resolver, compilerOptions); + currentModuleInfo = collectExternalModuleInfo(context, node); moduleInfoMap[getOriginalNodeId(node)] = currentModuleInfo; const transformModule2 = getTransformModuleDelegate(moduleKind); const updated = transformModule2(node); @@ -101470,63 +103123,59 @@ function transformModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: - return visitImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: - return visitExportDeclaration(node); - case 276 /* ExportAssignment */: - return visitExportAssignment(node); - case 261 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: - return visitClassDeclaration(node); + case 272 /* ImportDeclaration */: + return visitTopLevelImportDeclaration(node); + case 271 /* ImportEqualsDeclaration */: + return visitTopLevelImportEqualsDeclaration(node); + case 278 /* ExportDeclaration */: + return visitTopLevelExportDeclaration(node); + case 277 /* ExportAssignment */: + return visitTopLevelExportAssignment(node); default: return topLevelNestedVisitor(node); } } function topLevelNestedVisitor(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return visitWithStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return visitIfStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return visitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return visitDefaultClause(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return visitTryStatement(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock(node); default: return visitor(node); @@ -101537,30 +103186,30 @@ function transformModule(context) { return node; } switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -101583,24 +103232,24 @@ function transformModule(context) { if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -101628,7 +103277,7 @@ function transformModule(context) { return visitEachChild(node, visitor, context); } function visitForStatement(node, isTopLevel) { - if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -101669,7 +103318,7 @@ function transformModule(context) { ); } function visitForInStatement(node) { - if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -101697,7 +103346,7 @@ function transformModule(context) { ); } function visitForOfStatement(node) { - if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -102077,7 +103726,7 @@ function transformModule(context) { } return innerExpr; } - function visitImportDeclaration(node) { + function visitTopLevelImportDeclaration(node) { let statements; const namespaceDeclaration = getNamespaceDeclarationNode(node); if (moduleKind !== 2 /* AMD */) { @@ -102186,7 +103835,7 @@ function transformModule(context) { args ); } - function visitImportEqualsDeclaration(node) { + function visitTopLevelImportEqualsDeclaration(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); let statements; if (moduleKind !== 2 /* AMD */) { @@ -102254,7 +103903,7 @@ function transformModule(context) { statements = appendExportsOfImportEqualsDeclaration(statements, node); return singleOrMany(statements); } - function visitExportDeclaration(node) { + function visitTopLevelExportDeclaration(node) { if (!node.moduleSpecifier) { return void 0; } @@ -102356,7 +104005,7 @@ function transformModule(context) { ); } } - function visitExportAssignment(node) { + function visitTopLevelExportAssignment(node) { if (node.isExportEquals) { return void 0; } @@ -102560,19 +104209,21 @@ function transformModule(context) { if (!importClause) { return statements; } + const seen = new IdentifierNameMap(); if (importClause.name) { - statements = appendExportsOfDeclaration(statements, importClause); + statements = appendExportsOfDeclaration(statements, seen, importClause); } const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: - statements = appendExportsOfDeclaration(statements, namedBindings); + case 274 /* NamespaceImport */: + statements = appendExportsOfDeclaration(statements, seen, namedBindings); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration( statements, + seen, importBinding, /*liveBinding*/ true @@ -102587,7 +104238,7 @@ function transformModule(context) { if (currentModuleInfo.exportEquals) { return statements; } - return appendExportsOfDeclaration(statements, decl); + return appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); } function appendExportsOfVariableStatement(statements, node) { return appendExportsOfVariableDeclarationList( @@ -102617,7 +104268,7 @@ function transformModule(context) { } } } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer || isForInOrOfInitializer)) { - statements = appendExportsOfDeclaration(statements, decl); + statements = appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); } return statements; } @@ -102625,10 +104276,12 @@ function transformModule(context) { if (currentModuleInfo.exportEquals) { return statements; } + const seen = new IdentifierNameMap(); if (hasSyntacticModifier(decl, 1 /* Export */)) { const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); statements = appendExportStatement( statements, + seen, exportName, factory2.getLocalName(decl), /*location*/ @@ -102636,17 +104289,18 @@ function transformModule(context) { ); } if (decl.name) { - statements = appendExportsOfDeclaration(statements, decl); + statements = appendExportsOfDeclaration(statements, seen, decl); } return statements; } - function appendExportsOfDeclaration(statements, decl, liveBinding) { + function appendExportsOfDeclaration(statements, seen, decl, liveBinding) { const name = factory2.getDeclarationName(decl); - const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(idText(name)); + const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { statements = appendExportStatement( statements, + seen, exportSpecifier.name, name, /*location*/ @@ -102659,8 +104313,11 @@ function transformModule(context) { } return statements; } - function appendExportStatement(statements, exportName, expression, location, allowComments, liveBinding) { - statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); + function appendExportStatement(statements, seen, exportName, expression, location, allowComments, liveBinding) { + if (!seen.has(exportName)) { + seen.set(exportName, true); + statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); + } return statements; } function createUnderscoreUnderscoreESModule() { @@ -102755,7 +104412,7 @@ function transformModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -102793,11 +104450,11 @@ function transformModule(context) { switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -102850,7 +104507,7 @@ function transformModule(context) { return node; } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 311 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 312 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -102887,7 +104544,7 @@ function transformModule(context) { return node; } function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && !isGeneratedIdentifier(node.left) && !isLocalName(node.left)) { + if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { let expression = node; @@ -102926,6 +104583,15 @@ function transformModule(context) { return arrayFrom(bindingsSet); } } + } else if (isFileLevelReservedGeneratedIdentifier(name)) { + const exportSpecifiers = currentModuleInfo == null ? void 0 : currentModuleInfo.exportSpecifiers.get(name); + if (exportSpecifiers) { + const exportedNames = []; + for (const exportSpecifier of exportSpecifiers) { + exportedNames.push(exportSpecifier.name); + } + return exportedNames; + } } } } @@ -102952,10 +104618,10 @@ function transformSystemModule(context) { context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableSubstitution(225 /* BinaryExpression */); - context.enableSubstitution(235 /* MetaProperty */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableSubstitution(226 /* BinaryExpression */); + context.enableSubstitution(236 /* MetaProperty */); + context.enableEmitNotification(312 /* SourceFile */); const moduleInfoMap = []; const exportFunctionsMap = []; const noSubstitutionMap = []; @@ -102975,7 +104641,7 @@ function transformSystemModule(context) { const id = getOriginalNodeId(node); currentSourceFile = node; enclosingBlockScopedContainer = node; - moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node, resolver, compilerOptions); + moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node); exportFunction = factory2.createUniqueName("exports"); exportFunctionsMap[id] = exportFunction; contextObject = contextObjectMap[id] = factory2.createUniqueName("context"); @@ -103142,7 +104808,7 @@ function transformSystemModule(context) { if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 277 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 278 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -103290,11 +104956,11 @@ function transformSystemModule(context) { for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -103317,7 +104983,7 @@ function transformSystemModule(context) { ); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -103412,13 +105078,13 @@ function transformSystemModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return visitExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -103515,18 +105181,43 @@ function transformSystemModule(context) { if (!shouldHoistVariableDeclarationList(node.declarationList)) { return visitNode(node, visitor, isStatement); } - let expressions; - const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); - for (const variable of node.declarationList.declarations) { - if (variable.initializer) { - expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); - } else { - hoistBindingElement(variable); - } - } let statements; - if (expressions) { - statements = append(statements, setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node)); + if (isVarUsing(node.declarationList) || isVarAwaitUsing(node.declarationList)) { + const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifierLike); + const declarations = []; + for (const variable of node.declarationList.declarations) { + declarations.push(factory2.updateVariableDeclaration( + variable, + factory2.getGeneratedNameForNode(variable.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + transformInitializedVariable( + variable, + /*isExportedDeclaration*/ + false + ) + )); + } + const declarationList = factory2.updateVariableDeclarationList( + node.declarationList, + declarations + ); + statements = append(statements, factory2.updateVariableStatement(node, modifiers, declarationList)); + } else { + let expressions; + const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); + for (const variable of node.declarationList.declarations) { + if (variable.initializer) { + expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); + } else { + hoistBindingElement(variable); + } + } + if (expressions) { + statements = append(statements, setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node)); + } } statements = appendExportsOfVariableStatement( statements, @@ -103548,7 +105239,7 @@ function transformSystemModule(context) { } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 311 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 312 /* SourceFile */ || (getOriginalNode(node).flags & 7 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -103598,10 +105289,10 @@ function transformSystemModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -103667,7 +105358,7 @@ function transformSystemModule(context) { return statements; } const name = factory2.getDeclarationName(decl); - const exportSpecifiers = moduleInfo.exportSpecifiers.get(idText(name)); + const exportSpecifiers = moduleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { if (exportSpecifier.name.escapedText !== excludeName) { @@ -103701,45 +105392,45 @@ function transformSystemModule(context) { } function topLevelNestedVisitor(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return visitWithStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return visitIfStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return visitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return visitDefaultClause(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return visitTryStatement(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock(node); default: return visitor(node); @@ -103893,30 +105584,30 @@ function transformSystemModule(context) { return node; } switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -103989,7 +105680,7 @@ function transformSystemModule(context) { return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 311 /* SourceFile */; + return container !== void 0 && container.kind === 312 /* SourceFile */; } else { return false; } @@ -104033,7 +105724,7 @@ function transformSystemModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -104067,7 +105758,7 @@ function transformSystemModule(context) { } function substituteUnspecified(node) { switch (node.kind) { - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -104111,9 +105802,9 @@ function transformSystemModule(context) { switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return substituteBinaryExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -104154,7 +105845,7 @@ function transformSystemModule(context) { return node; } function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && !isGeneratedIdentifier(node.left) && !isLocalName(node.left)) { + if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { let expression = node; @@ -104181,10 +105872,19 @@ function transformSystemModule(context) { /*prefixLocals*/ false ); - if (exportContainer && exportContainer.kind === 311 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 312 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); + } else if (isGeneratedIdentifier(name) && isFileLevelReservedGeneratedIdentifier(name)) { + const exportSpecifiers = moduleInfo == null ? void 0 : moduleInfo.exportSpecifiers.get(name); + if (exportSpecifiers) { + const exportedNames2 = []; + for (const exportSpecifier of exportSpecifiers) { + exportedNames2.push(exportSpecifier.name); + } + return exportedNames2; + } } return exportedNames; } @@ -104231,7 +105931,7 @@ function transformECMAScriptModule(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(311 /* SourceFile */); + context.enableEmitNotification(312 /* SourceFile */); context.enableSubstitution(80 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -104279,11 +105979,11 @@ function transformECMAScriptModule(context) { } function visitor(node) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -104488,8 +106188,8 @@ function transformNodeModule(context) { const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(311 /* SourceFile */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(312 /* SourceFile */); + context.enableEmitNotification(312 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -104532,7 +106232,7 @@ function transformNodeModule(context) { return result; } function transformSourceFileOrBundle(node) { - return node.kind === 311 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 312 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -104562,7 +106262,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -104579,7 +106279,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; @@ -104610,12 +106310,12 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`); } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 210 /* PropertyAccessExpression */ || node.kind === 211 /* ElementAccessExpression */ || node.kind === 225 /* BinaryExpression */ || node.kind === 170 /* PropertySignature */ || node.kind === 168 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */ || node.kind === 168 /* Parameter */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -104632,7 +106332,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 177 /* SetAccessor */) { + if (node.kind === 178 /* SetAccessor */) { if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1; } else { @@ -104654,26 +106354,26 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 178 /* CallSignature */: + case 179 /* CallSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -104694,29 +106394,29 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 179 /* ConstructSignature */: - case 184 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 185 /* ConstructorType */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 178 /* CallSignature */: + case 179 /* CallSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node.parent)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 261 /* FunctionDeclaration */: - case 183 /* FunctionType */: + case 262 /* FunctionDeclaration */: + case 184 /* FunctionType */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1; default: return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`); @@ -104725,40 +106425,40 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 199 /* MappedType */: + case 200 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 178 /* CallSignature */: + case 179 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node.parent)) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 183 /* FunctionType */: - case 261 /* FunctionDeclaration */: + case 184 /* FunctionType */: + case 262 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 194 /* InferType */: + case 195 /* InferType */: diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; break; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -104820,7 +106520,7 @@ function hasInternalAnnotation(range, currentSourceFile) { } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 168 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -105052,10 +106752,10 @@ function transformDeclarations(context) { return result; } function transformRoot(node) { - if (node.kind === 311 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 312 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 312 /* Bundle */) { + if (node.kind === 313 /* Bundle */) { isBundledEmit = true; refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); @@ -105122,7 +106822,7 @@ function transformDeclarations(context) { ); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 314 /* InputFiles */) { + if (prepend.kind === 315 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -105290,14 +106990,14 @@ function transformDeclarations(context) { if (name.kind === 80 /* Identifier */) { return name; } else { - if (name.kind === 206 /* ArrayBindingPattern */) { + if (name.kind === 207 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 231 /* OmittedExpression */) { + if (elem.kind === 232 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { @@ -105361,14 +107061,14 @@ function transformDeclarations(context) { if (shouldPrintWithInitializer(node)) { return; } - const shouldUseResolverType = node.kind === 168 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 169 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } if (!getParseTreeNode(node)) { return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */); } - if (node.kind === 177 /* SetAccessor */) { + if (node.kind === 178 /* SetAccessor */) { return factory2.createKeywordTypeNode(133 /* AnyKeyword */); } errorNameNode = node.name; @@ -105377,10 +107077,10 @@ function transformDeclarations(context) { oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 168 /* Parameter */ || node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */) { + if (node.kind === 169 /* Parameter */ || node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */) { if (isPropertySignature(node) || !node.initializer) return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); @@ -105397,21 +107097,21 @@ function transformDeclarations(context) { function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: return !resolver.isDeclarationVisible(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: return false; - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -105499,7 +107199,7 @@ function transformDeclarations(context) { function rewriteModuleSpecifier(parent, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 266 /* ModuleDeclaration */ && parent.kind !== 204 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 267 /* ModuleDeclaration */ && parent.kind !== 205 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent); @@ -105518,7 +107218,7 @@ function transformDeclarations(context) { function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 283 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -105555,7 +107255,7 @@ function transformDeclarations(context) { void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 @@ -105658,7 +107358,7 @@ function transformDeclarations(context) { const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 186 /* TypeLiteral */ || input.kind === 199 /* MappedType */) && input.parent.kind !== 264 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -105686,26 +107386,26 @@ function transformDeclarations(context) { } if (isProcessedComponent(input)) { switch (input.kind) { - case 232 /* ExpressionWithTypeArguments */: { + case 233 /* ExpressionWithTypeArguments */: { if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) { checkEntityNameVisibility(input.expression, enclosingDeclaration); } const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); } - case 182 /* TypeReference */: { + case 183 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 175 /* Constructor */: { + case 176 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( /*modifiers*/ ensureModifiers(input), @@ -105715,7 +107415,7 @@ function transformDeclarations(context) { ); return cleanup(ctor); } - case 173 /* MethodDeclaration */: { + case 174 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105736,7 +107436,7 @@ function transformDeclarations(context) { ); return cleanup(sig); } - case 176 /* GetAccessor */: { + case 177 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105754,7 +107454,7 @@ function transformDeclarations(context) { void 0 )); } - case 177 /* SetAccessor */: { + case 178 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105770,7 +107470,7 @@ function transformDeclarations(context) { void 0 )); } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105785,7 +107485,7 @@ function transformDeclarations(context) { ensureType(input, input.type), ensureNoInitializer(input) )); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105799,7 +107499,7 @@ function transformDeclarations(context) { input.questionToken, ensureType(input, input.type) )); - case 172 /* MethodSignature */: { + case 173 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -105816,7 +107516,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 178 /* CallSignature */: { + case 179 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -105824,7 +107524,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 180 /* IndexSignature */: { + case 181 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), @@ -105832,7 +107532,7 @@ function transformDeclarations(context) { visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(133 /* AnyKeyword */) )); } - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -105847,7 +107547,7 @@ function transformDeclarations(context) { ensureNoInitializer(input) )); } - case 167 /* TypeParameter */: { + case 168 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration( input, @@ -105861,7 +107561,7 @@ function transformDeclarations(context) { } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 193 /* ConditionalType */: { + case 194 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); const oldEnclosingDecl = enclosingDeclaration; @@ -105875,13 +107575,13 @@ function transformDeclarations(context) { Debug.assert(falseType); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 183 /* FunctionType */: { + case 184 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 184 /* ConstructorType */: { + case 185 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 204 /* ImportType */: { + case 205 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -105921,7 +107621,7 @@ function transformDeclarations(context) { } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 173 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -105930,7 +107630,7 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 277 /* ExportDeclaration */: { + case 278 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -105944,7 +107644,7 @@ function transformDeclarations(context) { getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -105985,6 +107685,21 @@ function transformDeclarations(context) { const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (258047 /* All */ ^ 1 /* Export */)); return factory2.updateModifiers(statement, modifiers); } + function updateModuleDeclarationAndKeyword(node, modifiers, name, body) { + const updated = factory2.updateModuleDeclaration(node, modifiers, name, body); + if (isAmbientModule(updated) || updated.flags & 32 /* Namespace */) { + return updated; + } + const fixed = factory2.createModuleDeclaration( + updated.modifiers, + updated.name, + updated.body, + updated.flags | 32 /* Namespace */ + ); + setOriginalNode(fixed, updated); + setTextRange(fixed, updated); + return fixed; + } function transformTopLevelDeclaration(input) { if (lateMarkedStatements) { while (orderedRemoveItem(lateMarkedStatements, input)) @@ -105993,10 +107708,10 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 270 /* ImportEqualsDeclaration */: { + case 271 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 271 /* ImportDeclaration */: { + case 272 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -106016,7 +107731,7 @@ function transformDeclarations(context) { } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 264 /* TypeAliasDeclaration */: { + case 265 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -106028,7 +107743,7 @@ function transformDeclarations(context) { needsDeclare = previousNeedsDeclare; return clean2; } - case 263 /* InterfaceDeclaration */: { + case 264 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -106038,7 +107753,7 @@ function transformDeclarations(context) { visitNodes2(input.members, visitDeclarationSubtree, isTypeElement) )); } - case 261 /* FunctionDeclaration */: { + case 262 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -106058,7 +107773,7 @@ function transformDeclarations(context) { void 0, clean2.name || factory2.createIdentifier("_default"), factory2.createModuleBlock([]), - 16 /* Namespace */ + 32 /* Namespace */ ); setParent(fakespace, enclosingDeclaration); fakespace.locals = createSymbolTable(props); @@ -106108,7 +107823,7 @@ function transformDeclarations(context) { })) )); } - const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 16 /* Namespace */); + const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 32 /* Namespace */); if (!hasEffectiveModifier(clean2, 1024 /* Default */)) { return [clean2, namespaceDecl]; } @@ -106147,17 +107862,17 @@ function transformDeclarations(context) { return clean2; } } - case 266 /* ModuleDeclaration */: { + case 267 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 267 /* ModuleBlock */) { + if (inner && inner.kind === 268 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; needsScopeFixMarker = false; const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement); let lateStatements = transformAndReplaceLatePaintedStatements(statements); - if (input.flags & 16777216 /* Ambient */) { + if (input.flags & 33554432 /* Ambient */) { needsScopeFixMarker = false; } if (!isGlobalScopeAugmentation(input) && !hasScopeMarker2(lateStatements) && !resultHasScopeMarker) { @@ -106172,7 +107887,7 @@ function transformDeclarations(context) { needsScopeFixMarker = oldNeedsScopeFix; resultHasScopeMarker = oldHasScopeFix; const mods = ensureModifiers(input); - return cleanup(factory2.updateModuleDeclaration( + return cleanup(updateModuleDeclarationAndKeyword( input, mods, isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, @@ -106186,7 +107901,7 @@ function transformDeclarations(context) { const id = getOriginalNodeId(inner); const body = lateStatementReplacementMap.get(id); lateStatementReplacementMap.delete(id); - return cleanup(factory2.updateModuleDeclaration( + return cleanup(updateModuleDeclarationAndKeyword( input, mods, input.name, @@ -106194,7 +107909,7 @@ function transformDeclarations(context) { )); } } - case 262 /* ClassDeclaration */: { + case 263 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -106310,10 +108025,10 @@ function transformDeclarations(context) { )); } } - case 242 /* VariableStatement */: { + case 243 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 265 /* EnumDeclaration */: { + case 266 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -106330,7 +108045,7 @@ function transformDeclarations(context) { if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 266 /* ModuleDeclaration */) { + if (input.kind === 267 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -106347,13 +108062,23 @@ function transformDeclarations(context) { const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration); if (!length(nodes)) return; - return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes)); + const modifiers = factory2.createNodeArray(ensureModifiers(input)); + let declList; + if (isVarUsing(input.declarationList) || isVarAwaitUsing(input.declarationList)) { + declList = factory2.createVariableDeclarationList(nodes, 2 /* Const */); + setOriginalNode(declList, input.declarationList); + setTextRange(declList, input.declarationList); + setCommentRange(declList, input.declarationList); + } else { + declList = factory2.updateVariableDeclarationList(input.declarationList, nodes); + } + return factory2.updateVariableStatement(input, modifiers, declList); } function recreateBindingPattern(d) { return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 231 /* OmittedExpression */) { + if (e.kind === 232 /* OmittedExpression */) { return; } if (e.name) { @@ -106413,7 +108138,7 @@ function transformDeclarations(context) { function ensureModifierFlags(node) { let mask = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; - const parentIsFile = node.parent.kind === 311 /* SourceFile */; + const parentIsFile = node.parent.kind === 312 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask ^= 2 /* Ambient */; additions = 0 /* None */; @@ -106439,7 +108164,7 @@ function transformDeclarations(context) { } } function isAlwaysType(node) { - if (node.kind === 263 /* InterfaceDeclaration */) { + if (node.kind === 264 /* InterfaceDeclaration */) { return true; } return false; @@ -106459,57 +108184,57 @@ function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public * } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 176 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 177 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 168 /* Parameter */: - case 259 /* VariableDeclaration */: + case 169 /* Parameter */: + case 260 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 242 /* VariableStatement */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 243 /* VariableStatement */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 179 /* ConstructSignature */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 180 /* IndexSignature */: - case 259 /* VariableDeclaration */: - case 167 /* TypeParameter */: - case 232 /* ExpressionWithTypeArguments */: - case 182 /* TypeReference */: - case 193 /* ConditionalType */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 204 /* ImportType */: + case 180 /* ConstructSignature */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 181 /* IndexSignature */: + case 260 /* VariableDeclaration */: + case 168 /* TypeParameter */: + case 233 /* ExpressionWithTypeArguments */: + case 183 /* TypeReference */: + case 194 /* ConditionalType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 205 /* ImportType */: return true; } return false; @@ -106550,16 +108275,17 @@ function getScriptTransformers(compilerOptions, customTransformers, emitOnly) { transformers.push(transformTypeScript); if (compilerOptions.experimentalDecorators) { transformers.push(transformLegacyDecorators); - } else if (languageVersion < 99 /* ESNext */ || !useDefineForClassFields) { - transformers.push(transformESDecorators); } - transformers.push(transformClassFields); if (getJSXTransformEnabled(compilerOptions)) { transformers.push(transformJsx); } if (languageVersion < 99 /* ESNext */) { transformers.push(transformESNext); } + if (!compilerOptions.experimentalDecorators && (languageVersion < 99 /* ESNext */ || !useDefineForClassFields)) { + transformers.push(transformESDecorators); + } + transformers.push(transformClassFields); if (languageVersion < 8 /* ES2021 */) { transformers.push(transformES2021); } @@ -106618,7 +108344,7 @@ function noEmitNotification(hint, node, callback) { } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a, _b; - const enabledSyntaxKindFeatures = new Array(362 /* Count */); + const enabledSyntaxKindFeatures = new Array(363 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -106697,7 +108423,7 @@ function transformNodes(resolver, host, factory2, options, nodes, transformers, state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 311 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 312 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); (_b = tracing) == null ? void 0 : _b.pop(); } @@ -107017,7 +108743,7 @@ function getOutputPathsForBundle(options, forceDtsPaths) { } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 312 /* Bundle */) { + if (sourceFile.kind === 313 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -107398,8 +109124,8 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform, printer, mapOptions) { const sourceFileOrBundle = transform.transformed[0]; - const bundle = sourceFileOrBundle.kind === 312 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 311 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 313 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 312 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -107461,7 +109187,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 311 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 312 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -107829,11 +109555,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { break; } switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return printFile(node); - case 312 /* Bundle */: + case 313 /* Bundle */: return printBundle(node); - case 313 /* UnparsedSource */: + case 314 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -108212,301 +109938,301 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 81 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return emitQualifiedName(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return emitTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return emitParameter(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return emitDecorator(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return emitPropertySignature(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 172 /* MethodSignature */: + case 173 /* MethodSignature */: return emitMethodSignature(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return emitConstructor(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return emitAccessorDeclaration(node); - case 178 /* CallSignature */: + case 179 /* CallSignature */: return emitCallSignature(node); - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return emitConstructSignature(node); - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return emitIndexSignature(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return emitTypePredicate(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return emitTypeReference(node); - case 183 /* FunctionType */: + case 184 /* FunctionType */: return emitFunctionType(node); - case 184 /* ConstructorType */: + case 185 /* ConstructorType */: return emitConstructorType(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return emitTypeQuery(node); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return emitTypeLiteral(node); - case 187 /* ArrayType */: + case 188 /* ArrayType */: return emitArrayType(node); - case 188 /* TupleType */: + case 189 /* TupleType */: return emitTupleType(node); - case 189 /* OptionalType */: + case 190 /* OptionalType */: return emitOptionalType(node); - case 191 /* UnionType */: + case 192 /* UnionType */: return emitUnionType(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return emitIntersectionType(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return emitConditionalType(node); - case 194 /* InferType */: + case 195 /* InferType */: return emitInferType(node); - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return emitParenthesizedType(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 196 /* ThisType */: + case 197 /* ThisType */: return emitThisType(); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return emitTypeOperator(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return emitMappedType(node); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return emitLiteralType(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return emitTemplateType(node); - case 203 /* TemplateLiteralTypeSpan */: + case 204 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return emitImportTypeNode(node); - case 205 /* ObjectBindingPattern */: + case 206 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return emitBindingElement(node); - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return emitTemplateSpan(node); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 240 /* Block */: + case 241 /* Block */: return emitBlock(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return emitVariableStatement(node); - case 241 /* EmptyStatement */: + case 242 /* EmptyStatement */: return emitEmptyStatement( /*isEmbeddedStatement*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return emitExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return emitIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return emitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return emitWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return emitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return emitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return emitForOfStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return emitContinueStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return emitBreakStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return emitReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return emitWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return emitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return emitLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return emitThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return emitTryStatement(node); - case 258 /* DebuggerStatement */: + case 259 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return emitClassDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return emitModuleBlock(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return emitCaseBlock(node); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return emitImportDeclaration(node); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return emitImportClause(node); - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return emitNamespaceImport(node); - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return emitNamespaceExport(node); - case 274 /* NamedImports */: + case 275 /* NamedImports */: return emitNamedImports(node); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return emitImportSpecifier(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return emitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return emitExportDeclaration(node); - case 278 /* NamedExports */: + case 279 /* NamedExports */: return emitNamedExports(node); - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return emitExportSpecifier(node); - case 299 /* AssertClause */: + case 300 /* AssertClause */: return emitAssertClause(node); - case 300 /* AssertEntry */: + case 301 /* AssertEntry */: return emitAssertEntry(node); - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return; - case 282 /* ExternalModuleReference */: + case 283 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 12 /* JsxText */: return emitJsxText(node); - case 285 /* JsxOpeningElement */: - case 288 /* JsxOpeningFragment */: + case 286 /* JsxOpeningElement */: + case 289 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 286 /* JsxClosingElement */: - case 289 /* JsxClosingFragment */: + case 287 /* JsxClosingElement */: + case 290 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return emitJsxAttribute(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return emitJsxAttributes(node); - case 292 /* JsxSpreadAttribute */: + case 293 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return emitJsxExpression(node); - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return emitJsxNamespacedName(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return emitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return emitDefaultClause(node); - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return emitHeritageClause(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return emitCatchClause(node); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 305 /* EnumMember */: + case 306 /* EnumMember */: return emitEnumMember(node); - case 306 /* UnparsedPrologue */: + case 307 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 313 /* UnparsedSource */: - case 307 /* UnparsedPrepend */: + case 314 /* UnparsedSource */: + case 308 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 308 /* UnparsedText */: - case 309 /* UnparsedInternalText */: + case 309 /* UnparsedText */: + case 310 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 310 /* UnparsedSyntheticReference */: + case 311 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 311 /* SourceFile */: + case 312 /* SourceFile */: return emitSourceFile(node); - case 312 /* Bundle */: + case 313 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 314 /* InputFiles */: + case 315 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 315 /* JSDocTypeExpression */: + case 316 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 316 /* JSDocNameReference */: + case 317 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 318 /* JSDocAllType */: + case 319 /* JSDocAllType */: return writePunctuation("*"); - case 319 /* JSDocUnknownType */: + case 320 /* JSDocUnknownType */: return writePunctuation("?"); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 321 /* JSDocNonNullableType */: + case 322 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 190 /* RestType */: - case 324 /* JSDocVariadicType */: + case 191 /* RestType */: + case 325 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 325 /* JSDocNamepathType */: + case 326 /* JSDocNamepathType */: return; - case 326 /* JSDoc */: + case 327 /* JSDoc */: return emitJSDoc(node); - case 328 /* JSDocTypeLiteral */: + case 329 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 329 /* JSDocSignature */: + case 330 /* JSDocSignature */: return emitJSDocSignature(node); - case 333 /* JSDocTag */: - case 338 /* JSDocClassTag */: - case 343 /* JSDocOverrideTag */: + case 334 /* JSDocTag */: + case 339 /* JSDocClassTag */: + case 344 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 334 /* JSDocAugmentsTag */: - case 335 /* JSDocImplementsTag */: + case 335 /* JSDocAugmentsTag */: + case 336 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 336 /* JSDocAuthorTag */: - case 337 /* JSDocDeprecatedTag */: + case 337 /* JSDocAuthorTag */: + case 338 /* JSDocDeprecatedTag */: return; - case 339 /* JSDocPublicTag */: - case 340 /* JSDocPrivateTag */: - case 341 /* JSDocProtectedTag */: - case 342 /* JSDocReadonlyTag */: + case 340 /* JSDocPublicTag */: + case 341 /* JSDocPrivateTag */: + case 342 /* JSDocProtectedTag */: + case 343 /* JSDocReadonlyTag */: return; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return emitJSDocOverloadTag(node); - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 346 /* JSDocEnumTag */: - case 348 /* JSDocReturnTag */: - case 349 /* JSDocThisTag */: - case 350 /* JSDocTypeTag */: - case 355 /* JSDocThrowsTag */: - case 356 /* JSDocSatisfiesTag */: + case 347 /* JSDocEnumTag */: + case 349 /* JSDocReturnTag */: + case 350 /* JSDocThisTag */: + case 351 /* JSDocTypeTag */: + case 356 /* JSDocThrowsTag */: + case 357 /* JSDocSatisfiesTag */: return emitJSDocSimpleTypedTag(node); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 353 /* JSDocSeeTag */: + case 354 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 358 /* NotEmittedStatement */: + case 359 /* NotEmittedStatement */: return; } if (isExpression(node)) { @@ -108539,83 +110265,83 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 81 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return emitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return emitNewExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return emitFunctionExpression(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return emitArrowFunction(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return emitDeleteExpression(node); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return emitVoidExpression(node); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return emitAwaitExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return emitBinaryExpression(node); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return emitConditionalExpression(node); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return emitTemplateExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return emitYieldExpression(node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return emitSpreadElement(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return emitClassExpression(node); - case 231 /* OmittedExpression */: + case 232 /* OmittedExpression */: return; - case 233 /* AsExpression */: + case 234 /* AsExpression */: return emitAsExpression(node); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return emitNonNullExpression(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return emitMetaProperty(node); - case 236 /* SyntheticExpression */: + case 237 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return; - case 283 /* JsxElement */: + case 284 /* JsxElement */: return emitJsxElement(node); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return emitJsxFragment(node); - case 357 /* SyntaxList */: + case 358 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 358 /* NotEmittedStatement */: + case 359 /* NotEmittedStatement */: return; - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return emitCommaList(node); - case 361 /* SyntheticReferenceExpression */: + case 362 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -108661,7 +110387,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 312 /* Bundle */ ? node : void 0; + const bundle = node.kind === 313 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -108736,7 +110462,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 308 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 309 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -108772,7 +110498,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 241 /* EmptyStatement */, + node.kind === 242 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -108844,7 +110570,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 323 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 324 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -108920,7 +110646,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { /*allowDecorators*/ true ); - const token = node.kind === 176 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; + const token = node.kind === 177 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; emitTokenWithComment(token, pos, writeKeyword, node); writeSpace(); emit(node.name); @@ -109274,7 +111000,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */)); } else if (isAccessExpression(expression)) { const constantValue = getConstantValue(expression); - return typeof constantValue === "number" && isFinite(constantValue) && Math.floor(constantValue) === constantValue; + return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue; } } function emitElementAccessExpression(node) { @@ -109385,7 +111111,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 223 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); + return operand.kind === 224 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary); @@ -109644,7 +111370,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); emitTokenWithComment(93 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 244 /* IfStatement */) { + if (node.elseStatement.kind === 245 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -109711,7 +111437,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(164 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -109719,7 +111445,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 260 /* VariableDeclarationList */) { + if (node.kind === 261 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -109755,7 +111481,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 293 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */; emitTrailingCommentsOfPosition( pos, /*prefixSpace*/ @@ -109867,7 +111593,14 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitInitializer(node.initializer, ((_a = node.type) == null ? void 0 : _a.end) ?? ((_c = (_b = node.name.emitNode) == null ? void 0 : _b.typeNode) == null ? void 0 : _c.end) ?? node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma); } function emitVariableDeclarationList(node) { - writeKeyword(isLet(node) ? "let" : isVarConst(node) ? "const" : "var"); + if (isVarAwaitUsing(node)) { + writeKeyword("await"); + writeSpace(); + writeKeyword("using"); + } else { + const head = isLet(node) ? "let" : isVarConst(node) ? "const" : isVarUsing(node) ? "using" : "var"; + writeKeyword(head); + } writeSpace(); emitList(node, node.declarations, 528 /* VariableDeclarationList */); } @@ -110076,8 +111809,8 @@ function createPrinter(printerOptions = {}, handlers = {}) { /*allowDecorators*/ false ); - if (~node.flags & 1024 /* GlobalAugmentation */) { - writeKeyword(node.flags & 16 /* Namespace */ ? "namespace" : "module"); + if (~node.flags & 2048 /* GlobalAugmentation */) { + writeKeyword(node.flags & 32 /* Namespace */ ? "namespace" : "module"); writeSpace(); } emit(node.name); @@ -110153,7 +111886,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.importClause) { emit(node.importClause); writeSpace(); - emitTokenWithComment(160 /* FromKeyword */, node.importClause.end, writeKeyword, node); + emitTokenWithComment(161 /* FromKeyword */, node.importClause.end, writeKeyword, node); writeSpace(); } emitExpression(node.moduleSpecifier); @@ -110220,7 +111953,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.moduleSpecifier) { writeSpace(); const fromPos = node.exportClause ? node.exportClause.end : nextPos; - emitTokenWithComment(160 /* FromKeyword */, fromPos, writeKeyword, node); + emitTokenWithComment(161 /* FromKeyword */, fromPos, writeKeyword, node); writeSpace(); emitExpression(node.moduleSpecifier); } @@ -110475,7 +112208,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 350 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 351 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -110519,7 +112252,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 315 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 316 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -110537,7 +112270,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 328 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 329 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -111420,7 +113153,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 216 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -111507,84 +113240,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 240 /* Block */: + case 241 /* Block */: forEach(node.statements, generateNames); break; - case 255 /* LabeledStatement */: - case 253 /* WithStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 256 /* LabeledStatement */: + case 254 /* WithStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: generateNames(node.statement); break; - case 244 /* IfStatement */: + case 245 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 298 /* CatchClause */: + case 299 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: generateNames(node.declarationList); break; - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: generateNames(node.importClause); break; - case 272 /* ImportClause */: + case 273 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: forEach(node.elements, generateNames); break; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -111593,12 +113326,12 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -111856,16 +113589,16 @@ function createPrinter(printerOptions = {}, handlers = {}) { prefix, suffix ); - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: { + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: { Debug.assert(!prefix && !suffix && !privateName); const name = node.name; if (name && !isGeneratedIdentifier(name)) { @@ -111880,17 +113613,17 @@ function createPrinter(printerOptions = {}, handlers = {}) { } return generateNameForExportDefault(); } - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return makeTempVariableName( 0 /* Auto */, /*reservedInNestedScopes*/ @@ -111984,7 +113717,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitLeadingComments( pos, /*isEmittedNode*/ - node.kind !== 358 /* NotEmittedStatement */ + node.kind !== 359 /* NotEmittedStatement */ ); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) { @@ -111992,7 +113725,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 260 /* VariableDeclarationList */) { + if (node.kind === 261 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -112008,7 +113741,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 358 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 359 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -112280,7 +114013,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 128 /* NoNestedSourceMaps */) { @@ -112295,7 +114028,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (emitFlags & 128 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -112404,14 +114137,14 @@ function getEmitListItem(emit, parenthesizerRule) { } // src/compiler/watchUtilities.ts -function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames) { +function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) { if (!host.getDirectories || !host.readDirectory) { return void 0; } const cachedReadDirectoryResult = /* @__PURE__ */ new Map(); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); return { - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, fileExists, readFile: (path, encoding) => host.readFile(path, encoding), directoryExists: host.directoryExists && directoryExists, @@ -112533,7 +114266,7 @@ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensi const rootResult = tryReadDirectory(rootDir, rootDirPath); let rootSymLinkResult; if (rootResult !== void 0) { - return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath); + return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath); } return host.readDirectory(rootDir, extensions, excludes, includes, depth); function getFileSystemEntries(dir) { @@ -112717,7 +114450,7 @@ function isIgnoredFileFromWildCardWatching({ program, extraFileExtensions, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 }) { @@ -112733,7 +114466,7 @@ function isIgnoredFileFromWildCardWatching({ writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`); return true; } - if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) { + if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) { writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`); return true; } @@ -112790,7 +114523,7 @@ function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo) { function createExcludeHandlingAddWatch(key) { return (file, cb, flags, options, detailInfo1, detailInfo2) => { var _a; - return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call( + return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call( /*thisArgs*/ void 0, file, @@ -112802,7 +114535,7 @@ function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo) { ) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2); }; } - function useCaseSensitiveFileNames() { + function useCaseSensitiveFileNames2() { return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames(); } function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) { @@ -113588,7 +115321,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([ Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code, Diagnostics.Duplicate_label_0.code, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, - Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block.code, + Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code, @@ -113618,14 +115351,17 @@ var plainJSErrors = /* @__PURE__ */ new Set([ Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind.code, Diagnostics._0_modifier_cannot_be_used_here.code, Diagnostics._0_modifier_must_precede_1_modifier.code, - Diagnostics.const_declarations_can_only_be_declared_inside_a_block.code, - Diagnostics.const_declarations_must_be_initialized.code, + Diagnostics._0_declarations_can_only_be_declared_inside_a_block.code, + Diagnostics._0_declarations_must_be_initialized.code, Diagnostics.extends_clause_already_seen.code, - Diagnostics.let_declarations_can_only_be_declared_inside_a_block.code, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code, Diagnostics.Class_constructor_may_not_be_a_generator.code, Diagnostics.Class_constructor_may_not_be_an_accessor.code, - Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code + Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class.code, + // Type errors + Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code ]); function shouldProgramCreateNewSourceFiles(program, newOptions) { if (!program) @@ -114374,13 +116110,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config sourceFileOptions, /*onError*/ void 0, - shouldCreateNewSourceFile || sourceFileOptions.impliedNodeFormat !== oldSourceFile.impliedNodeFormat + shouldCreateNewSourceFile ) : host.getSourceFile( oldSourceFile.fileName, sourceFileOptions, /*onError*/ void 0, - shouldCreateNewSourceFile || sourceFileOptions.impliedNodeFormat !== oldSourceFile.impliedNodeFormat + shouldCreateNewSourceFile ); if (!newSourceFile) { return 0 /* Not */; @@ -114431,7 +116167,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config structureIsReused = 1 /* SafeModules */; } else if (!arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) { structureIsReused = 1 /* SafeModules */; - } else if ((oldSourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */) !== (newSourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */)) { + } else if ((oldSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */) !== (newSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */)) { structureIsReused = 1 /* SafeModules */; } else if (!arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) { structureIsReused = 1 /* SafeModules */; @@ -114822,89 +116558,97 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return diagnostics; function walk(node, parent) { switch (parent.kind) { - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: if (parent.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 259 /* VariableDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 260 /* VariableDeclaration */: if (parent.type === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); return "skip"; } } switch (node.kind) { - case 272 /* ImportClause */: + case 273 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? "import...type" : "export...type")); return "skip"; } break; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: const heritageClause = node; if (heritageClause.token === 119 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: const interfaceKeyword = tokenToString(120 /* InterfaceKeyword */); Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); return "skip"; - case 266 /* ModuleDeclaration */: - const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */); + case 267 /* ModuleDeclaration */: + const moduleKeyword = node.flags & 32 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */); Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); return "skip"; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 265 /* EnumDeclaration */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + if (!node.body) { + diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Signature_declarations_can_only_be_used_in_TypeScript_files)); + return "skip"; + } + return; + case 266 /* EnumDeclaration */: const enumKeyword = Debug.checkDefined(tokenToString(94 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); return "skip"; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 233 /* AsExpression */: + case 234 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: Debug.fail(); } } @@ -114939,26 +116683,26 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } } switch (parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: if (nodes === parent.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (nodes === parent.modifiers) { - checkModifiers(parent.modifiers, parent.kind === 242 /* VariableStatement */); + checkModifiers(parent.modifiers, parent.kind === 243 /* VariableStatement */); return "skip"; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (nodes === parent.modifiers) { for (const modifier of nodes) { if (isModifier(modifier) && modifier.kind !== 126 /* StaticKeyword */ && modifier.kind !== 129 /* AccessorKeyword */) { @@ -114968,18 +116712,18 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return "skip"; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (nodes === parent.modifiers && some(nodes, isModifier)) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: - case 214 /* TaggedTemplateExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 215 /* TaggedTemplateExpression */: if (nodes === parent.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -115000,7 +116744,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config case 148 /* ReadonlyKeyword */: case 138 /* DeclareKeyword */: case 128 /* AbstractKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); @@ -115098,8 +116842,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */); setParent(externalHelpersModuleReference, importDecl); setParent(importDecl, file); - externalHelpersModuleReference.flags &= ~8 /* Synthesized */; - importDecl.flags &= ~8 /* Synthesized */; + externalHelpersModuleReference.flags &= ~16 /* Synthesized */; + importDecl.flags &= ~16 /* Synthesized */; return externalHelpersModuleReference; } function collectExternalModuleReferences(file) { @@ -115128,7 +116872,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config ); } const shouldProcessRequires = isJavaScriptFile && shouldResolveJsRequire(options); - if (file.flags & 2097152 /* PossiblyContainsDynamicImport */ || shouldProcessRequires) { + if (file.flags & 4194304 /* PossiblyContainsDynamicImport */ || shouldProcessRequires) { collectDynamicImportOrRequireCalls(file); } file.imports = imports || emptyArray; @@ -115336,7 +117080,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 }; } function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) { - var _a2, _b2; + var _a2; const path = toPath3(fileName); if (useSourceOfProjectReferenceRedirect) { let source = getSourceOfProjectReferenceRedirect(path); @@ -115415,7 +117159,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config Diagnostics.Cannot_read_file_0_Colon_1, [fileName, hostErrorMessage] ), - shouldCreateNewSourceFile || ((_a2 = oldProgram == null ? void 0 : oldProgram.getSourceFileByPath(toPath3(fileName))) == null ? void 0 : _a2.impliedNodeFormat) !== sourceFileOptions.impliedNodeFormat + shouldCreateNewSourceFile ); if (packageId) { const packageIdKey = packageIdToString(packageId); @@ -115440,7 +117184,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config file.path = path; file.resolvedPath = toPath3(fileName); file.originalFileName = originalFileName; - file.packageJsonLocations = ((_b2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _b2.length) ? sourceFileOptions.packageJsonLocations : void 0; + file.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0; file.packageJsonScope = sourceFileOptions.packageJsonScope; addFileIncludeReason(file, reason); if (host.useCaseSensitiveFileNames()) { @@ -115750,7 +117494,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config currentNodeModulesDepth++; } const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth; - const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index]) || !(file.imports[index].flags & 8388608 /* JSDoc */)); + const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index]) || !(file.imports[index].flags & 16777216 /* JSDoc */)); if (elideImport) { modulesWithElidedImports.set(file.path, true); } else if (shouldAddFile) { @@ -116109,6 +117853,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind)) { createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later, "bundler"); } + if (ModuleKind[moduleKind] && (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) && !(3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) { + const moduleKindName = ModuleKind[moduleKind]; + createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleKindName, moduleKindName); + } else if (ModuleResolutionKind[moduleResolution] && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */) && !(100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */)) { + const moduleResolutionName = ModuleResolutionKind[moduleResolution]; + createOptionValueDiagnostic("module", Diagnostics.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, moduleResolutionName, moduleResolutionName); + } if (!options.noEmit && !options.suppressOutputPathCheck) { const emitHost = getEmitHost(); const emitFilesSeen = /* @__PURE__ */ new Set(); @@ -116799,6 +118550,9 @@ function parseConfigHostFromCompilerHostLike(host, directoryStructureHost = host return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: (f) => directoryStructureHost.readFile(f), + directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists), + getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories), + realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(), getCurrentDirectory: () => host.getCurrentDirectory(), onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined, @@ -119803,12 +121557,12 @@ function getMatchedIncludeSpec(program, fileName) { return true; const isJsonFile = fileExtensionIs(fileName, ".json" /* Json */); const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory())); - const useCaseSensitiveFileNames = program.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames(); return find((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => { if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */)) return false; const pattern = getPatternFromSpec(includeSpec, basePath, "files"); - return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames).test(fileName); + return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName); }); } function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) { @@ -120037,7 +121791,7 @@ function createWatchFactory(host, options) { return result; } function createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) { - const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames(); const compilerHost = { getSourceFile: createGetSourceFile( (fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding), @@ -120053,8 +121807,8 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt (path) => host.directoryExists(path) ), getCurrentDirectory: memoize(() => host.getCurrentDirectory()), - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, - getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames), + useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, + getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2), getNewLine: () => getNewLineCharacter(getCompilerOptions()), fileExists: (f) => host.fileExists(f), readFile: (f) => host.readFile(f), @@ -120269,7 +122023,7 @@ function createWatchProgram(host) { const sourceFilesCache = /* @__PURE__ */ new Map(); let missingFilePathsRequestedForRelease; let hasChangedCompilerOptions = false; - const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames(); const currentDirectory = host.getCurrentDirectory(); const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host; let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host; @@ -120277,7 +122031,7 @@ function createWatchProgram(host) { let configFileParsingDiagnostics; let canConfigFileJsonReportNoInputFiles = false; let hasChangedConfigFileParsingErrors = false; - const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames); + const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2); const directoryStructureHost = cachedDirectoryStructureHost || host; const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost); let newLine = updateNewLine(); @@ -120295,8 +122049,8 @@ function createWatchProgram(host) { Debug.assert(compilerOptions); Debug.assert(rootFileNames); const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); - writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); + writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`); let configFileWatcher; if (configFileName) { configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile); @@ -120405,7 +122159,6 @@ function createWatchProgram(host) { if (hasChangedCompilerOptions) { newLine = updateNewLine(); if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) { - debugger; resolutionCache.onChangesAffectModuleResolution(); } } @@ -120510,7 +122263,8 @@ function createWatchProgram(host) { if (isFileMissingOnHost(hostSourceFile)) { return void 0; } - if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile)) { + const impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : void 0; + if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile) || hostSourceFile.sourceFile.impliedNodeFormat !== impliedNodeFormat) { const sourceFile = getNewSourceFile(fileName, languageVersionOrOptions, onError); if (hostSourceFile) { if (sourceFile) { @@ -120801,7 +122555,7 @@ function createWatchProgram(host) { options: compilerOptions, program: getCurrentBuilderProgram() || rootFileNames, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 })) @@ -120891,7 +122645,7 @@ function createWatchProgram(host) { options: config.parsedCommandLine.options, program: config.parsedCommandLine.fileNames, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 })) diff --git a/node_modules/typescript/lib/tsserver.js b/node_modules/typescript/lib/tsserver.js index 2329a12e68..382e1e2937 100644 --- a/node_modules/typescript/lib/tsserver.js +++ b/node_modules/typescript/lib/tsserver.js @@ -59,6 +59,7 @@ __export(server_exports, { CompletionTriggerKind: () => CompletionTriggerKind, Completions: () => ts_Completions_exports, ConfigFileProgramReloadLevel: () => ConfigFileProgramReloadLevel, + ContainerFlags: () => ContainerFlags, ContextFlags: () => ContextFlags, CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, @@ -88,6 +89,8 @@ __export(server_exports, { GetLiteralTextFlags: () => GetLiteralTextFlags, GoToDefinition: () => ts_GoToDefinition_exports, HighlightSpanKind: () => HighlightSpanKind, + IdentifierNameMap: () => IdentifierNameMap, + IdentifierNameMultiMap: () => IdentifierNameMultiMap, ImportKind: () => ImportKind, ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, IndentStyle: () => IndentStyle, @@ -192,6 +195,7 @@ __export(server_exports, { WatchLogLevel: () => WatchLogLevel, WatchType: () => WatchType, accessPrivateIdentifier: () => accessPrivateIdentifier, + addDisposableResourceHelper: () => addDisposableResourceHelper, addEmitFlags: () => addEmitFlags, addEmitHelper: () => addEmitHelper, addEmitHelpers: () => addEmitHelpers, @@ -271,6 +275,9 @@ __export(server_exports, { changesAffectingProgramStructure: () => changesAffectingProgramStructure, childIsDecorated: () => childIsDecorated, classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, + classHasClassThisAssignment: () => classHasClassThisAssignment, + classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, + classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, classPrivateFieldInHelper: () => classPrivateFieldInHelper, @@ -368,6 +375,8 @@ __export(server_exports, { createCacheWithRedirects: () => createCacheWithRedirects, createCacheableExportInfoMap: () => createCacheableExportInfoMap, createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, + createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, + createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, createClassifier: () => createClassifier, createCommentDirectivesMap: () => createCommentDirectivesMap, createCompilerDiagnostic: () => createCompilerDiagnostic, @@ -500,6 +509,7 @@ __export(server_exports, { displayPart: () => displayPart, displayPartsToString: () => displayPartsToString, disposeEmitNodes: () => disposeEmitNodes, + disposeResourcesHelper: () => disposeResourcesHelper, documentSpansEqual: () => documentSpansEqual, dumpTracingLegend: () => dumpTracingLegend, elementAt: () => elementAt, @@ -577,7 +587,7 @@ __export(server_exports, { findPackageJsons: () => findPackageJsons, findPrecedingMatchingToken: () => findPrecedingMatchingToken, findPrecedingToken: () => findPrecedingToken, - findSuperStatementIndex: () => findSuperStatementIndex, + findSuperStatementIndexPath: () => findSuperStatementIndexPath, findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition, findUseStrictPrologue: () => findUseStrictPrologue, first: () => first, @@ -652,6 +662,7 @@ __export(server_exports, { getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, getAssignedName: () => getAssignedName, + getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, getAssignmentTargetKind: () => getAssignmentTargetKind, @@ -679,8 +690,10 @@ __export(server_exports, { getConditions: () => getConditions, getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, getConstantValue: () => getConstantValue, + getContainerFlags: () => getContainerFlags, getContainerNode: () => getContainerNode, getContainingClass: () => getContainingClass, + getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators, getContainingClassStaticBlock: () => getContainingClassStaticBlock, getContainingFunction: () => getContainingFunction, getContainingFunctionDeclaration: () => getContainingFunctionDeclaration, @@ -738,7 +751,9 @@ __export(server_exports, { getEmitModuleKind: () => getEmitModuleKind, getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, getEmitScriptTarget: () => getEmitScriptTarget, + getEmitStandardClassFields: () => getEmitStandardClassFields, getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer, + getEnclosingContainer: () => getEnclosingContainer, getEncodedSemanticClassifications: () => getEncodedSemanticClassifications, getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications, getEndLinePosition: () => getEndLinePosition, @@ -956,6 +971,7 @@ __export(server_exports, { getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression, getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode, getPropertyNameForUniqueESSymbol: () => getPropertyNameForUniqueESSymbol, + getPropertyNameFromType: () => getPropertyNameFromType, getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement, getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement, getPropertySymbolsFromContextualType: () => getPropertySymbolsFromContextualType, @@ -1136,6 +1152,8 @@ __export(server_exports, { indexOfNode: () => indexOfNode, indicesOf: () => indicesOf, inferredTypesContainingFile: () => inferredTypesContainingFile, + injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing, + injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing, insertImports: () => insertImports, insertLeadingStatement: () => insertLeadingStatement, insertSorted: () => insertSorted, @@ -1238,8 +1256,10 @@ __export(server_exports, { isClassExpression: () => isClassExpression, isClassLike: () => isClassLike, isClassMemberModifier: () => isClassMemberModifier, + isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, isClassOrTypeElement: () => isClassOrTypeElement, isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration, + isClassThisAssignmentBlock: () => isClassThisAssignmentBlock, isCollapsedRange: () => isCollapsedRange, isColonToken: () => isColonToken, isCommaExpression: () => isCommaExpression, @@ -1285,6 +1305,7 @@ __export(server_exports, { isDiagnosticWithLocation: () => isDiagnosticWithLocation, isDiskPathRoot: () => isDiskPathRoot, isDoStatement: () => isDoStatement, + isDocumentRegistryEntry: () => isDocumentRegistryEntry, isDotDotDotToken: () => isDotDotDotToken, isDottedName: () => isDottedName, isDynamicName: () => isDynamicName, @@ -1335,6 +1356,7 @@ __export(server_exports, { isExternalModuleReference: () => isExternalModuleReference, isExternalModuleSymbol: () => isExternalModuleSymbol, isExternalOrCommonJsModule: () => isExternalOrCommonJsModule, + isFileLevelReservedGeneratedIdentifier: () => isFileLevelReservedGeneratedIdentifier, isFileLevelUniqueName: () => isFileLevelUniqueName, isFileProbablyExternalModule: () => isFileProbablyExternalModule, isFirstDeclarationOfSymbolParameter: () => isFirstDeclarationOfSymbolParameter, @@ -1405,6 +1427,7 @@ __export(server_exports, { isInString: () => isInString, isInTemplateString: () => isInTemplateString, isInTopLevelContext: () => isInTopLevelContext, + isInTypeQuery: () => isInTypeQuery, isIncrementalCompilation: () => isIncrementalCompilation, isIndexSignatureDeclaration: () => isIndexSignatureDeclaration, isIndexedAccessTypeNode: () => isIndexedAccessTypeNode, @@ -1782,6 +1805,7 @@ __export(server_exports, { isTypeQueryNode: () => isTypeQueryNode, isTypeReferenceNode: () => isTypeReferenceNode, isTypeReferenceType: () => isTypeReferenceType, + isTypeUsableAsPropertyName: () => isTypeUsableAsPropertyName, isUMDExportSymbol: () => isUMDExportSymbol, isUnaryExpression: () => isUnaryExpression, isUnaryExpressionWithWrite: () => isUnaryExpressionWithWrite, @@ -1796,7 +1820,9 @@ __export(server_exports, { isValidESSymbolDeclaration: () => isValidESSymbolDeclaration, isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite, isValueSignatureDeclaration: () => isValueSignatureDeclaration, + isVarAwaitUsing: () => isVarAwaitUsing, isVarConst: () => isVarConst, + isVarUsing: () => isVarUsing, isVariableDeclaration: () => isVariableDeclaration, isVariableDeclarationInVariableStatement: () => isVariableDeclarationInVariableStatement, isVariableDeclarationInitializedToBareOrAccessedRequire: () => isVariableDeclarationInitializedToBareOrAccessedRequire, @@ -2208,6 +2234,7 @@ __export(server_exports, { transformJsx: () => transformJsx, transformLegacyDecorators: () => transformLegacyDecorators, transformModule: () => transformModule, + transformNamedEvaluation: () => transformNamedEvaluation, transformNodeModule: () => transformNodeModule, transformNodes: () => transformNodes, transformSystemModule: () => transformSystemModule, @@ -2303,8 +2330,8 @@ __export(server_exports, { module.exports = __toCommonJS(server_exports); // src/compiler/corePublic.ts -var versionMajorMinor = "5.1"; -var version = "5.1.6"; +var versionMajorMinor = "5.2"; +var version = "5.2.2"; var Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -3473,7 +3500,7 @@ function identity(x) { function toLowerCase(x) { return x.toLowerCase(); } -var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; +var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; function toFileNameLowerCase(x) { return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x; } @@ -3816,8 +3843,8 @@ function unorderedRemoveFirstItemWhere(array, predicate) { } return false; } -function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; +function createGetCanonicalFileName(useCaseSensitiveFileNames2) { + return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase; } function patternText({ prefix, suffix }) { return `${prefix}*${suffix}`; @@ -4005,10 +4032,10 @@ var Debug; } Debug2.log = log; ((_log) => { - function error(s) { + function error2(s) { logMessage(1 /* Error */, s); } - _log.error = error; + _log.error = error2; function warn(s) { logMessage(2 /* Warning */, s); } @@ -4208,7 +4235,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return func.name; } else { const text = Function.prototype.toString.call(func); - const match = /^function\s+([\w\$]+)\s*\(/.exec(text); + const match = /^function\s+([\w$]+)\s*\(/.exec(text); return match ? match[1] : ""; } } @@ -4282,6 +4309,15 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, ); } Debug2.formatSnippetKind = formatSnippetKind; + function formatScriptKind(kind) { + return formatEnum( + kind, + ScriptKind, + /*isFlags*/ + false + ); + } + Debug2.formatScriptKind = formatScriptKind; function formatNodeFlags(flags) { return formatEnum( flags, @@ -4982,13 +5018,13 @@ ${lanes.join("\n")} })(Debug || (Debug = {})); // src/compiler/semver.ts -var versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; +var versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; var prereleaseRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i; var prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i; var buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i; var buildPartRegExp = /^[a-z0-9-]+$/i; var numericIdentifierRegExp = /^(0|[1-9]\d*)$/; -var _Version = class { +var _Version = class _Version { constructor(major, minor = 0, patch = 0, prerelease = "", build2 = "") { if (typeof major === "string") { const result = Debug.checkDefined(tryParseComponents(major), "Invalid version"); @@ -5052,8 +5088,8 @@ var _Version = class { return result; } }; +_Version.zero = new _Version(0, 0, 0, ["0"]); var Version = _Version; -Version.zero = new _Version(0, 0, 0, ["0"]); function tryParseComponents(text) { const match = versionRegExp.exec(text); if (!match) @@ -5100,14 +5136,14 @@ function comparePrereleaseIdentifiers(left, right) { } return compareValues(left.length, right.length); } -var VersionRange = class { +var VersionRange = class _VersionRange { constructor(spec) { this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray; } static tryParse(text) { const sets = parseRange(text); if (sets) { - const range = new VersionRange(""); + const range = new _VersionRange(""); range._alternatives = sets; return range; } @@ -5895,210 +5931,211 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["UndefinedKeyword"] = 157] = "UndefinedKeyword"; SyntaxKind5[SyntaxKind5["UniqueKeyword"] = 158] = "UniqueKeyword"; SyntaxKind5[SyntaxKind5["UnknownKeyword"] = 159] = "UnknownKeyword"; - SyntaxKind5[SyntaxKind5["FromKeyword"] = 160] = "FromKeyword"; - SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 161] = "GlobalKeyword"; - SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 162] = "BigIntKeyword"; - SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 163] = "OverrideKeyword"; - SyntaxKind5[SyntaxKind5["OfKeyword"] = 164] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 165] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 166] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 167] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 168] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 169] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 170] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 171] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 172] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 173] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 174] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 175] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 176] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 177] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 178] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 179] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 180] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 181] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 182] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 183] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 184] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 185] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 186] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 187] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 188] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 189] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 190] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 191] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 192] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 193] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 194] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 195] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 196] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 197] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 198] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 199] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 200] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 201] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 202] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 203] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 204] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 205] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 206] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 207] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 208] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 209] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 210] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 211] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 212] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 213] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 214] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 215] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 216] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 217] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 218] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 219] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 220] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 221] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 222] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 223] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 224] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 225] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 226] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 227] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 228] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 229] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 230] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 231] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 232] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 233] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 234] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 235] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 236] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 237] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 238] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 239] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 240] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 241] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 242] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 243] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 244] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 245] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 246] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 247] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 248] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 249] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 250] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 251] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 252] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 253] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 254] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 255] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 256] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 257] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 258] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 259] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 260] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 261] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 262] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 263] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 264] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 265] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 266] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 267] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 268] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 269] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 270] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 271] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 272] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 273] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 274] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 275] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 276] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 277] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 278] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 279] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 280] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 281] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 282] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 283] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 284] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 285] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 286] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 287] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 288] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 289] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 290] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 291] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 292] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 293] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["JsxNamespacedName"] = 294] = "JsxNamespacedName"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 295] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 296] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 297] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 298] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 299] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 300] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 301] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 302] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 303] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 304] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 305] = "EnumMember"; - SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 306] = "UnparsedPrologue"; - SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 307] = "UnparsedPrepend"; - SyntaxKind5[SyntaxKind5["UnparsedText"] = 308] = "UnparsedText"; - SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 309] = "UnparsedInternalText"; - SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 310] = "UnparsedSyntheticReference"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 311] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 312] = "Bundle"; - SyntaxKind5[SyntaxKind5["UnparsedSource"] = 313] = "UnparsedSource"; - SyntaxKind5[SyntaxKind5["InputFiles"] = 314] = "InputFiles"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 315] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 316] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 317] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 318] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 319] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 320] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 321] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 322] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 323] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 324] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 325] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 326] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 326 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 327] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 328] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 329] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 330] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 331] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 332] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 333] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 334] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 335] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 336] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 337] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 338] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 339] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 340] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 341] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 342] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 343] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 344] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 345] = "JSDocOverloadTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 346] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 347] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 348] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 349] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 350] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 351] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 352] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 353] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 354] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 355] = "JSDocThrowsTag"; - SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 356] = "JSDocSatisfiesTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 357] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 358] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 360] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 362] = "Count"; + SyntaxKind5[SyntaxKind5["UsingKeyword"] = 160] = "UsingKeyword"; + SyntaxKind5[SyntaxKind5["FromKeyword"] = 161] = "FromKeyword"; + SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 162] = "GlobalKeyword"; + SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 163] = "BigIntKeyword"; + SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 164] = "OverrideKeyword"; + SyntaxKind5[SyntaxKind5["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind5[SyntaxKind5["QualifiedName"] = 166] = "QualifiedName"; + SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 167] = "ComputedPropertyName"; + SyntaxKind5[SyntaxKind5["TypeParameter"] = 168] = "TypeParameter"; + SyntaxKind5[SyntaxKind5["Parameter"] = 169] = "Parameter"; + SyntaxKind5[SyntaxKind5["Decorator"] = 170] = "Decorator"; + SyntaxKind5[SyntaxKind5["PropertySignature"] = 171] = "PropertySignature"; + SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 172] = "PropertyDeclaration"; + SyntaxKind5[SyntaxKind5["MethodSignature"] = 173] = "MethodSignature"; + SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 174] = "MethodDeclaration"; + SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; + SyntaxKind5[SyntaxKind5["Constructor"] = 176] = "Constructor"; + SyntaxKind5[SyntaxKind5["GetAccessor"] = 177] = "GetAccessor"; + SyntaxKind5[SyntaxKind5["SetAccessor"] = 178] = "SetAccessor"; + SyntaxKind5[SyntaxKind5["CallSignature"] = 179] = "CallSignature"; + SyntaxKind5[SyntaxKind5["ConstructSignature"] = 180] = "ConstructSignature"; + SyntaxKind5[SyntaxKind5["IndexSignature"] = 181] = "IndexSignature"; + SyntaxKind5[SyntaxKind5["TypePredicate"] = 182] = "TypePredicate"; + SyntaxKind5[SyntaxKind5["TypeReference"] = 183] = "TypeReference"; + SyntaxKind5[SyntaxKind5["FunctionType"] = 184] = "FunctionType"; + SyntaxKind5[SyntaxKind5["ConstructorType"] = 185] = "ConstructorType"; + SyntaxKind5[SyntaxKind5["TypeQuery"] = 186] = "TypeQuery"; + SyntaxKind5[SyntaxKind5["TypeLiteral"] = 187] = "TypeLiteral"; + SyntaxKind5[SyntaxKind5["ArrayType"] = 188] = "ArrayType"; + SyntaxKind5[SyntaxKind5["TupleType"] = 189] = "TupleType"; + SyntaxKind5[SyntaxKind5["OptionalType"] = 190] = "OptionalType"; + SyntaxKind5[SyntaxKind5["RestType"] = 191] = "RestType"; + SyntaxKind5[SyntaxKind5["UnionType"] = 192] = "UnionType"; + SyntaxKind5[SyntaxKind5["IntersectionType"] = 193] = "IntersectionType"; + SyntaxKind5[SyntaxKind5["ConditionalType"] = 194] = "ConditionalType"; + SyntaxKind5[SyntaxKind5["InferType"] = 195] = "InferType"; + SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 196] = "ParenthesizedType"; + SyntaxKind5[SyntaxKind5["ThisType"] = 197] = "ThisType"; + SyntaxKind5[SyntaxKind5["TypeOperator"] = 198] = "TypeOperator"; + SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 199] = "IndexedAccessType"; + SyntaxKind5[SyntaxKind5["MappedType"] = 200] = "MappedType"; + SyntaxKind5[SyntaxKind5["LiteralType"] = 201] = "LiteralType"; + SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 202] = "NamedTupleMember"; + SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 203] = "TemplateLiteralType"; + SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; + SyntaxKind5[SyntaxKind5["ImportType"] = 205] = "ImportType"; + SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; + SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; + SyntaxKind5[SyntaxKind5["BindingElement"] = 208] = "BindingElement"; + SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; + SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; + SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; + SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 212] = "ElementAccessExpression"; + SyntaxKind5[SyntaxKind5["CallExpression"] = 213] = "CallExpression"; + SyntaxKind5[SyntaxKind5["NewExpression"] = 214] = "NewExpression"; + SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; + SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; + SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; + SyntaxKind5[SyntaxKind5["FunctionExpression"] = 218] = "FunctionExpression"; + SyntaxKind5[SyntaxKind5["ArrowFunction"] = 219] = "ArrowFunction"; + SyntaxKind5[SyntaxKind5["DeleteExpression"] = 220] = "DeleteExpression"; + SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 221] = "TypeOfExpression"; + SyntaxKind5[SyntaxKind5["VoidExpression"] = 222] = "VoidExpression"; + SyntaxKind5[SyntaxKind5["AwaitExpression"] = 223] = "AwaitExpression"; + SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 224] = "PrefixUnaryExpression"; + SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 225] = "PostfixUnaryExpression"; + SyntaxKind5[SyntaxKind5["BinaryExpression"] = 226] = "BinaryExpression"; + SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 227] = "ConditionalExpression"; + SyntaxKind5[SyntaxKind5["TemplateExpression"] = 228] = "TemplateExpression"; + SyntaxKind5[SyntaxKind5["YieldExpression"] = 229] = "YieldExpression"; + SyntaxKind5[SyntaxKind5["SpreadElement"] = 230] = "SpreadElement"; + SyntaxKind5[SyntaxKind5["ClassExpression"] = 231] = "ClassExpression"; + SyntaxKind5[SyntaxKind5["OmittedExpression"] = 232] = "OmittedExpression"; + SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 233] = "ExpressionWithTypeArguments"; + SyntaxKind5[SyntaxKind5["AsExpression"] = 234] = "AsExpression"; + SyntaxKind5[SyntaxKind5["NonNullExpression"] = 235] = "NonNullExpression"; + SyntaxKind5[SyntaxKind5["MetaProperty"] = 236] = "MetaProperty"; + SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 237] = "SyntheticExpression"; + SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 238] = "SatisfiesExpression"; + SyntaxKind5[SyntaxKind5["TemplateSpan"] = 239] = "TemplateSpan"; + SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 240] = "SemicolonClassElement"; + SyntaxKind5[SyntaxKind5["Block"] = 241] = "Block"; + SyntaxKind5[SyntaxKind5["EmptyStatement"] = 242] = "EmptyStatement"; + SyntaxKind5[SyntaxKind5["VariableStatement"] = 243] = "VariableStatement"; + SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 244] = "ExpressionStatement"; + SyntaxKind5[SyntaxKind5["IfStatement"] = 245] = "IfStatement"; + SyntaxKind5[SyntaxKind5["DoStatement"] = 246] = "DoStatement"; + SyntaxKind5[SyntaxKind5["WhileStatement"] = 247] = "WhileStatement"; + SyntaxKind5[SyntaxKind5["ForStatement"] = 248] = "ForStatement"; + SyntaxKind5[SyntaxKind5["ForInStatement"] = 249] = "ForInStatement"; + SyntaxKind5[SyntaxKind5["ForOfStatement"] = 250] = "ForOfStatement"; + SyntaxKind5[SyntaxKind5["ContinueStatement"] = 251] = "ContinueStatement"; + SyntaxKind5[SyntaxKind5["BreakStatement"] = 252] = "BreakStatement"; + SyntaxKind5[SyntaxKind5["ReturnStatement"] = 253] = "ReturnStatement"; + SyntaxKind5[SyntaxKind5["WithStatement"] = 254] = "WithStatement"; + SyntaxKind5[SyntaxKind5["SwitchStatement"] = 255] = "SwitchStatement"; + SyntaxKind5[SyntaxKind5["LabeledStatement"] = 256] = "LabeledStatement"; + SyntaxKind5[SyntaxKind5["ThrowStatement"] = 257] = "ThrowStatement"; + SyntaxKind5[SyntaxKind5["TryStatement"] = 258] = "TryStatement"; + SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 259] = "DebuggerStatement"; + SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 260] = "VariableDeclaration"; + SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 261] = "VariableDeclarationList"; + SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 262] = "FunctionDeclaration"; + SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 263] = "ClassDeclaration"; + SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 264] = "InterfaceDeclaration"; + SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 265] = "TypeAliasDeclaration"; + SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 266] = "EnumDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 267] = "ModuleDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleBlock"] = 268] = "ModuleBlock"; + SyntaxKind5[SyntaxKind5["CaseBlock"] = 269] = "CaseBlock"; + SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 270] = "NamespaceExportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 271] = "ImportEqualsDeclaration"; + SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 272] = "ImportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportClause"] = 273] = "ImportClause"; + SyntaxKind5[SyntaxKind5["NamespaceImport"] = 274] = "NamespaceImport"; + SyntaxKind5[SyntaxKind5["NamedImports"] = 275] = "NamedImports"; + SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 276] = "ImportSpecifier"; + SyntaxKind5[SyntaxKind5["ExportAssignment"] = 277] = "ExportAssignment"; + SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 278] = "ExportDeclaration"; + SyntaxKind5[SyntaxKind5["NamedExports"] = 279] = "NamedExports"; + SyntaxKind5[SyntaxKind5["NamespaceExport"] = 280] = "NamespaceExport"; + SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 281] = "ExportSpecifier"; + SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 282] = "MissingDeclaration"; + SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 283] = "ExternalModuleReference"; + SyntaxKind5[SyntaxKind5["JsxElement"] = 284] = "JsxElement"; + SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 285] = "JsxSelfClosingElement"; + SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 286] = "JsxOpeningElement"; + SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 287] = "JsxClosingElement"; + SyntaxKind5[SyntaxKind5["JsxFragment"] = 288] = "JsxFragment"; + SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 289] = "JsxOpeningFragment"; + SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 290] = "JsxClosingFragment"; + SyntaxKind5[SyntaxKind5["JsxAttribute"] = 291] = "JsxAttribute"; + SyntaxKind5[SyntaxKind5["JsxAttributes"] = 292] = "JsxAttributes"; + SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 293] = "JsxSpreadAttribute"; + SyntaxKind5[SyntaxKind5["JsxExpression"] = 294] = "JsxExpression"; + SyntaxKind5[SyntaxKind5["JsxNamespacedName"] = 295] = "JsxNamespacedName"; + SyntaxKind5[SyntaxKind5["CaseClause"] = 296] = "CaseClause"; + SyntaxKind5[SyntaxKind5["DefaultClause"] = 297] = "DefaultClause"; + SyntaxKind5[SyntaxKind5["HeritageClause"] = 298] = "HeritageClause"; + SyntaxKind5[SyntaxKind5["CatchClause"] = 299] = "CatchClause"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 300] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 301] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; + SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 303] = "PropertyAssignment"; + SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; + SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 305] = "SpreadAssignment"; + SyntaxKind5[SyntaxKind5["EnumMember"] = 306] = "EnumMember"; + SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 307] = "UnparsedPrologue"; + SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 308] = "UnparsedPrepend"; + SyntaxKind5[SyntaxKind5["UnparsedText"] = 309] = "UnparsedText"; + SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 310] = "UnparsedInternalText"; + SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 311] = "UnparsedSyntheticReference"; + SyntaxKind5[SyntaxKind5["SourceFile"] = 312] = "SourceFile"; + SyntaxKind5[SyntaxKind5["Bundle"] = 313] = "Bundle"; + SyntaxKind5[SyntaxKind5["UnparsedSource"] = 314] = "UnparsedSource"; + SyntaxKind5[SyntaxKind5["InputFiles"] = 315] = "InputFiles"; + SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 316] = "JSDocTypeExpression"; + SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 317] = "JSDocNameReference"; + SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 318] = "JSDocMemberName"; + SyntaxKind5[SyntaxKind5["JSDocAllType"] = 319] = "JSDocAllType"; + SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 320] = "JSDocUnknownType"; + SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 321] = "JSDocNullableType"; + SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 322] = "JSDocNonNullableType"; + SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 323] = "JSDocOptionalType"; + SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 324] = "JSDocFunctionType"; + SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 325] = "JSDocVariadicType"; + SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 326] = "JSDocNamepathType"; + SyntaxKind5[SyntaxKind5["JSDoc"] = 327] = "JSDoc"; + SyntaxKind5[SyntaxKind5["JSDocComment"] = 327 /* JSDoc */] = "JSDocComment"; + SyntaxKind5[SyntaxKind5["JSDocText"] = 328] = "JSDocText"; + SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 329] = "JSDocTypeLiteral"; + SyntaxKind5[SyntaxKind5["JSDocSignature"] = 330] = "JSDocSignature"; + SyntaxKind5[SyntaxKind5["JSDocLink"] = 331] = "JSDocLink"; + SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 332] = "JSDocLinkCode"; + SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 333] = "JSDocLinkPlain"; + SyntaxKind5[SyntaxKind5["JSDocTag"] = 334] = "JSDocTag"; + SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 335] = "JSDocAugmentsTag"; + SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 336] = "JSDocImplementsTag"; + SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 337] = "JSDocAuthorTag"; + SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 338] = "JSDocDeprecatedTag"; + SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 339] = "JSDocClassTag"; + SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 340] = "JSDocPublicTag"; + SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 341] = "JSDocPrivateTag"; + SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 342] = "JSDocProtectedTag"; + SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 343] = "JSDocReadonlyTag"; + SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 344] = "JSDocOverrideTag"; + SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 345] = "JSDocCallbackTag"; + SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 346] = "JSDocOverloadTag"; + SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 347] = "JSDocEnumTag"; + SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 348] = "JSDocParameterTag"; + SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 349] = "JSDocReturnTag"; + SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 350] = "JSDocThisTag"; + SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 351] = "JSDocTypeTag"; + SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 352] = "JSDocTemplateTag"; + SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 353] = "JSDocTypedefTag"; + SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 354] = "JSDocSeeTag"; + SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 355] = "JSDocPropertyTag"; + SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 356] = "JSDocThrowsTag"; + SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 357] = "JSDocSatisfiesTag"; + SyntaxKind5[SyntaxKind5["SyntaxList"] = 358] = "SyntaxList"; + SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 359] = "NotEmittedStatement"; + SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 360] = "PartiallyEmittedExpression"; + SyntaxKind5[SyntaxKind5["CommaListExpression"] = 361] = "CommaListExpression"; + SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 362] = "SyntheticReferenceExpression"; + SyntaxKind5[SyntaxKind5["Count"] = 363] = "Count"; SyntaxKind5[SyntaxKind5["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment"; SyntaxKind5[SyntaxKind5["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -6106,15 +6143,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 83 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind5[SyntaxKind5["LastReservedWord"] = 118 /* WithKeyword */] = "LastReservedWord"; SyntaxKind5[SyntaxKind5["FirstKeyword"] = 83 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 164 /* OfKeyword */] = "LastKeyword"; + SyntaxKind5[SyntaxKind5["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 119 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 127 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 181 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 204 /* ImportType */] = "LastTypeNode"; + SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind5[SyntaxKind5["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 19 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind5[SyntaxKind5["LastPunctuation"] = 79 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 164 /* LastKeyword */] = "LastToken"; + SyntaxKind5[SyntaxKind5["LastToken"] = 165 /* LastKeyword */] = "LastToken"; SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 9 /* NumericLiteral */] = "FirstLiteralToken"; @@ -6123,56 +6160,59 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 18 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 30 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 79 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 242 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 258 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 165 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 315 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 356 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 333 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 356 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; + SyntaxKind5[SyntaxKind5["FirstStatement"] = 243 /* VariableStatement */] = "FirstStatement"; + SyntaxKind5[SyntaxKind5["LastStatement"] = 259 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind5[SyntaxKind5["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 316 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 334 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 128 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 164 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind5; })(SyntaxKind || {}); var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { NodeFlags3[NodeFlags3["None"] = 0] = "None"; NodeFlags3[NodeFlags3["Let"] = 1] = "Let"; NodeFlags3[NodeFlags3["Const"] = 2] = "Const"; - NodeFlags3[NodeFlags3["NestedNamespace"] = 4] = "NestedNamespace"; - NodeFlags3[NodeFlags3["Synthesized"] = 8] = "Synthesized"; - NodeFlags3[NodeFlags3["Namespace"] = 16] = "Namespace"; - NodeFlags3[NodeFlags3["OptionalChain"] = 32] = "OptionalChain"; - NodeFlags3[NodeFlags3["ExportContext"] = 64] = "ExportContext"; - NodeFlags3[NodeFlags3["ContainsThis"] = 128] = "ContainsThis"; - NodeFlags3[NodeFlags3["HasImplicitReturn"] = 256] = "HasImplicitReturn"; - NodeFlags3[NodeFlags3["HasExplicitReturn"] = 512] = "HasExplicitReturn"; - NodeFlags3[NodeFlags3["GlobalAugmentation"] = 1024] = "GlobalAugmentation"; - NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 2048] = "HasAsyncFunctions"; - NodeFlags3[NodeFlags3["DisallowInContext"] = 4096] = "DisallowInContext"; - NodeFlags3[NodeFlags3["YieldContext"] = 8192] = "YieldContext"; - NodeFlags3[NodeFlags3["DecoratorContext"] = 16384] = "DecoratorContext"; - NodeFlags3[NodeFlags3["AwaitContext"] = 32768] = "AwaitContext"; - NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 65536] = "DisallowConditionalTypesContext"; - NodeFlags3[NodeFlags3["ThisNodeHasError"] = 131072] = "ThisNodeHasError"; - NodeFlags3[NodeFlags3["JavaScriptFile"] = 262144] = "JavaScriptFile"; - NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 524288] = "ThisNodeOrAnySubNodesHasError"; - NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 1048576] = "HasAggregatedChildData"; - NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 2097152] = "PossiblyContainsDynamicImport"; - NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 4194304] = "PossiblyContainsImportMeta"; - NodeFlags3[NodeFlags3["JSDoc"] = 8388608] = "JSDoc"; - NodeFlags3[NodeFlags3["Ambient"] = 16777216] = "Ambient"; - NodeFlags3[NodeFlags3["InWithStatement"] = 33554432] = "InWithStatement"; - NodeFlags3[NodeFlags3["JsonFile"] = 67108864] = "JsonFile"; - NodeFlags3[NodeFlags3["TypeCached"] = 134217728] = "TypeCached"; - NodeFlags3[NodeFlags3["Deprecated"] = 268435456] = "Deprecated"; - NodeFlags3[NodeFlags3["BlockScoped"] = 3] = "BlockScoped"; - NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags"; - NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 2816] = "ReachabilityAndEmitFlags"; - NodeFlags3[NodeFlags3["ContextFlags"] = 50720768] = "ContextFlags"; - NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 40960] = "TypeExcludesFlags"; - NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 6291456] = "PermanentlySetIncrementalFlags"; - NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 128 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; - NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 2048 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; + NodeFlags3[NodeFlags3["Using"] = 4] = "Using"; + NodeFlags3[NodeFlags3["AwaitUsing"] = 6] = "AwaitUsing"; + NodeFlags3[NodeFlags3["NestedNamespace"] = 8] = "NestedNamespace"; + NodeFlags3[NodeFlags3["Synthesized"] = 16] = "Synthesized"; + NodeFlags3[NodeFlags3["Namespace"] = 32] = "Namespace"; + NodeFlags3[NodeFlags3["OptionalChain"] = 64] = "OptionalChain"; + NodeFlags3[NodeFlags3["ExportContext"] = 128] = "ExportContext"; + NodeFlags3[NodeFlags3["ContainsThis"] = 256] = "ContainsThis"; + NodeFlags3[NodeFlags3["HasImplicitReturn"] = 512] = "HasImplicitReturn"; + NodeFlags3[NodeFlags3["HasExplicitReturn"] = 1024] = "HasExplicitReturn"; + NodeFlags3[NodeFlags3["GlobalAugmentation"] = 2048] = "GlobalAugmentation"; + NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 4096] = "HasAsyncFunctions"; + NodeFlags3[NodeFlags3["DisallowInContext"] = 8192] = "DisallowInContext"; + NodeFlags3[NodeFlags3["YieldContext"] = 16384] = "YieldContext"; + NodeFlags3[NodeFlags3["DecoratorContext"] = 32768] = "DecoratorContext"; + NodeFlags3[NodeFlags3["AwaitContext"] = 65536] = "AwaitContext"; + NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 131072] = "DisallowConditionalTypesContext"; + NodeFlags3[NodeFlags3["ThisNodeHasError"] = 262144] = "ThisNodeHasError"; + NodeFlags3[NodeFlags3["JavaScriptFile"] = 524288] = "JavaScriptFile"; + NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 1048576] = "ThisNodeOrAnySubNodesHasError"; + NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 2097152] = "HasAggregatedChildData"; + NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 4194304] = "PossiblyContainsDynamicImport"; + NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 8388608] = "PossiblyContainsImportMeta"; + NodeFlags3[NodeFlags3["JSDoc"] = 16777216] = "JSDoc"; + NodeFlags3[NodeFlags3["Ambient"] = 33554432] = "Ambient"; + NodeFlags3[NodeFlags3["InWithStatement"] = 67108864] = "InWithStatement"; + NodeFlags3[NodeFlags3["JsonFile"] = 134217728] = "JsonFile"; + NodeFlags3[NodeFlags3["TypeCached"] = 268435456] = "TypeCached"; + NodeFlags3[NodeFlags3["Deprecated"] = 536870912] = "Deprecated"; + NodeFlags3[NodeFlags3["BlockScoped"] = 7] = "BlockScoped"; + NodeFlags3[NodeFlags3["Constant"] = 6] = "Constant"; + NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 1536] = "ReachabilityCheckFlags"; + NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 5632] = "ReachabilityAndEmitFlags"; + NodeFlags3[NodeFlags3["ContextFlags"] = 101441536] = "ContextFlags"; + NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 81920] = "TypeExcludesFlags"; + NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 12582912] = "PermanentlySetIncrementalFlags"; + NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 256 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; + NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 4096 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; return NodeFlags3; })(NodeFlags || {}); var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { @@ -6585,15 +6625,13 @@ var NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags2) => { NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding"; NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding"; NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop"; - NodeCheckFlags2[NodeCheckFlags2["ClassWithBodyScopedClassBinding"] = 65536] = "ClassWithBodyScopedClassBinding"; - NodeCheckFlags2[NodeCheckFlags2["BodyScopedClassBinding"] = 131072] = "BodyScopedClassBinding"; - NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 262144] = "NeedsLoopOutParameter"; - NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 524288] = "AssignmentsMarked"; - NodeCheckFlags2[NodeCheckFlags2["ClassWithConstructorReference"] = 1048576] = "ClassWithConstructorReference"; - NodeCheckFlags2[NodeCheckFlags2["ConstructorReferenceInClass"] = 2097152] = "ConstructorReferenceInClass"; - NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 4194304] = "ContainsClassWithPrivateIdentifiers"; - NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 8388608] = "ContainsSuperPropertyInStaticInitializer"; - NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 16777216] = "InCheckIdentifier"; + NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 65536] = "NeedsLoopOutParameter"; + NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 131072] = "AssignmentsMarked"; + NodeCheckFlags2[NodeCheckFlags2["ContainsConstructorReference"] = 262144] = "ContainsConstructorReference"; + NodeCheckFlags2[NodeCheckFlags2["ConstructorReference"] = 536870912] = "ConstructorReference"; + NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 1048576] = "ContainsClassWithPrivateIdentifiers"; + NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 2097152] = "ContainsSuperPropertyInStaticInitializer"; + NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 4194304] = "InCheckIdentifier"; return NodeCheckFlags2; })(NodeCheckFlags || {}); var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => { @@ -6774,7 +6812,8 @@ var SignatureFlags = /* @__PURE__ */ ((SignatureFlags5) => { SignatureFlags5[SignatureFlags5["IsOuterCallChain"] = 16] = "IsOuterCallChain"; SignatureFlags5[SignatureFlags5["IsUntypedSignatureInJSFile"] = 32] = "IsUntypedSignatureInJSFile"; SignatureFlags5[SignatureFlags5["IsNonInferrable"] = 64] = "IsNonInferrable"; - SignatureFlags5[SignatureFlags5["PropagatingFlags"] = 39] = "PropagatingFlags"; + SignatureFlags5[SignatureFlags5["IsSignatureCandidateForOverloadFailure"] = 128] = "IsSignatureCandidateForOverloadFailure"; + SignatureFlags5[SignatureFlags5["PropagatingFlags"] = 167] = "PropagatingFlags"; SignatureFlags5[SignatureFlags5["CallChainFlags"] = 24] = "CallChainFlags"; return SignatureFlags5; })(SignatureFlags || {}); @@ -6920,16 +6959,16 @@ var NewLineKind = /* @__PURE__ */ ((NewLineKind3) => { NewLineKind3[NewLineKind3["LineFeed"] = 1] = "LineFeed"; return NewLineKind3; })(NewLineKind || {}); -var ScriptKind = /* @__PURE__ */ ((ScriptKind6) => { - ScriptKind6[ScriptKind6["Unknown"] = 0] = "Unknown"; - ScriptKind6[ScriptKind6["JS"] = 1] = "JS"; - ScriptKind6[ScriptKind6["JSX"] = 2] = "JSX"; - ScriptKind6[ScriptKind6["TS"] = 3] = "TS"; - ScriptKind6[ScriptKind6["TSX"] = 4] = "TSX"; - ScriptKind6[ScriptKind6["External"] = 5] = "External"; - ScriptKind6[ScriptKind6["JSON"] = 6] = "JSON"; - ScriptKind6[ScriptKind6["Deferred"] = 7] = "Deferred"; - return ScriptKind6; +var ScriptKind = /* @__PURE__ */ ((ScriptKind7) => { + ScriptKind7[ScriptKind7["Unknown"] = 0] = "Unknown"; + ScriptKind7[ScriptKind7["JS"] = 1] = "JS"; + ScriptKind7[ScriptKind7["JSX"] = 2] = "JSX"; + ScriptKind7[ScriptKind7["TS"] = 3] = "TS"; + ScriptKind7[ScriptKind7["TSX"] = 4] = "TSX"; + ScriptKind7[ScriptKind7["External"] = 5] = "External"; + ScriptKind7[ScriptKind7["JSON"] = 6] = "JSON"; + ScriptKind7[ScriptKind7["Deferred"] = 7] = "Deferred"; + return ScriptKind7; })(ScriptKind || {}); var ScriptTarget = /* @__PURE__ */ ((ScriptTarget11) => { ScriptTarget11[ScriptTarget11["ES3"] = 0] = "ES3"; @@ -7244,8 +7283,9 @@ var ExternalEmitHelpers = /* @__PURE__ */ ((ExternalEmitHelpers2) => { ExternalEmitHelpers2[ExternalEmitHelpers2["CreateBinding"] = 4194304] = "CreateBinding"; ExternalEmitHelpers2[ExternalEmitHelpers2["SetFunctionName"] = 8388608] = "SetFunctionName"; ExternalEmitHelpers2[ExternalEmitHelpers2["PropKey"] = 16777216] = "PropKey"; + ExternalEmitHelpers2[ExternalEmitHelpers2["AddDisposableResourceAndDisposeResources"] = 33554432] = "AddDisposableResourceAndDisposeResources"; ExternalEmitHelpers2[ExternalEmitHelpers2["FirstEmitHelper"] = 1 /* Extends */] = "FirstEmitHelper"; - ExternalEmitHelpers2[ExternalEmitHelpers2["LastEmitHelper"] = 16777216 /* PropKey */] = "LastEmitHelper"; + ExternalEmitHelpers2[ExternalEmitHelpers2["LastEmitHelper"] = 33554432 /* AddDisposableResourceAndDisposeResources */] = "LastEmitHelper"; ExternalEmitHelpers2[ExternalEmitHelpers2["ForOfIncludes"] = 256 /* Values */] = "ForOfIncludes"; ExternalEmitHelpers2[ExternalEmitHelpers2["ForAwaitOfIncludes"] = 16384 /* AsyncValues */] = "ForAwaitOfIncludes"; ExternalEmitHelpers2[ExternalEmitHelpers2["AsyncGeneratorIncludes"] = 6144] = "AsyncGeneratorIncludes"; @@ -7640,10 +7680,10 @@ function createDynamicPriorityPollingWatchFile(host) { pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval)); } } -function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) { +function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) { const fileWatcherCallbacks = createMultiMap(); const dirWatchers = /* @__PURE__ */ new Map(); - const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2); return nonPollingWatchFile; function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) { const filePath = toCanonicalName(fileName); @@ -7719,8 +7759,8 @@ function createFixedChunkSizePollingWatchFile(host) { pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue"); } } -function createSingleWatcherPerName(cache, useCaseSensitiveFileNames, name, callback, createWatcher) { - const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); +function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) { + const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const path = toCanonicalFileName(name); const existing = cache.get(path); if (existing) { @@ -7772,7 +7812,7 @@ function setSysLog(logger) { } function createDirectoryWatcherSupportingRecursive({ watchDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, getAccessibleSortedChildDirectories, fileSystemEntryExists, @@ -7784,8 +7824,8 @@ function createDirectoryWatcherSupportingRecursive({ const callbackCache = createMultiMap(); const cacheToUpdateChildWatches = /* @__PURE__ */ new Map(); let timerToUpdateChildWatches; - const filePathComparer = getStringComparer(!useCaseSensitiveFileNames); - const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames); + const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2); + const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2); return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options); function createDirectoryWatcher(dirName, options, callback) { const dirPath = toCanonicalFilePath(dirName); @@ -7952,12 +7992,12 @@ function createDirectoryWatcherSupportingRecursive({ } } function isIgnoredPath(path, options) { - return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames, getCurrentDirectory); + return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory); } function isInPath(path, searchPath) { if (stringContains(path, searchPath)) return true; - if (useCaseSensitiveFileNames) + if (useCaseSensitiveFileNames2) return false; return stringContains(toCanonicalFilePath(path), searchPath); } @@ -7980,14 +8020,14 @@ function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModi } }; } -function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames, getCurrentDirectory) { - return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames, getCurrentDirectory())); +function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) { + return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames2, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2, getCurrentDirectory())); } -function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory) { +function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) { return (eventName, relativeFileName) => { if (eventName === "rename") { const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName)); - if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames, getCurrentDirectory)) { + if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) { callback(fileName); } } @@ -8000,7 +8040,7 @@ function createSystemWatchFunctions({ clearTimeout: clearTimeout2, fsWatchWorker, fileSystemEntryExists, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories, @@ -8072,7 +8112,7 @@ function createSystemWatchFunctions({ ); case 5 /* UseFsEventsOnParentDirectory */: if (!nonPollingWatchFile) { - nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames); + nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2); } return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options)); default: @@ -8121,7 +8161,7 @@ function createSystemWatchFunctions({ return fsWatch( directoryName, 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), + createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), recursive, 500 /* Medium */, getFallbackOptions(options) @@ -8129,7 +8169,7 @@ function createSystemWatchFunctions({ } if (!hostRecursiveDirectoryWatcher) { hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({ - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fileSystemEntryExists, getAccessibleSortedChildDirectories, @@ -8175,7 +8215,7 @@ function createSystemWatchFunctions({ return fsWatch( directoryName, 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), + createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), recursive, 500 /* Medium */, getFallbackOptions(watchDirectoryOptions) @@ -8203,7 +8243,7 @@ function createSystemWatchFunctions({ function pollingWatchFile(fileName, callback, pollingInterval, options) { return createSingleWatcherPerName( pollingWatches, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, fileName, callback, (cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options) @@ -8212,7 +8252,7 @@ function createSystemWatchFunctions({ function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) { return createSingleWatcherPerName( recursive ? fsWatchesRecursive : fsWatches, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, fileOrDirectory, callback, (cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions) @@ -8340,7 +8380,7 @@ var sys = (() => { const Buffer2 = require("buffer").Buffer; const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin"; const platform = _os.platform(); - const useCaseSensitiveFileNames = isFileSystemCaseSensitive(); + const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive(); const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync; const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename; const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin"; @@ -8351,7 +8391,7 @@ var sys = (() => { setTimeout, clearTimeout, fsWatchWorker, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fileSystemEntryExists, // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows @@ -8368,7 +8408,7 @@ var sys = (() => { const nodeSystem = { args: process.argv.slice(2), newLine: _os.EOL, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, write(s) { process.stdout.write(s); }, @@ -8433,7 +8473,7 @@ var sys = (() => { disableCPUProfiler, cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"), realpath, - debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)), + debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay, tryEnableSourceMapsForHost() { try { require("source-map-support").install(); @@ -8459,8 +8499,8 @@ var sys = (() => { try { const modulePath = resolveJSModule(moduleName, baseDir, nodeSystem); return { module: require(modulePath), modulePath, error: void 0 }; - } catch (error) { - return { module: void 0, modulePath: void 0, error }; + } catch (error2) { + return { module: void 0, modulePath: void 0, error: error2 }; } } }; @@ -8497,12 +8537,12 @@ var sys = (() => { for (const node of profile.nodes) { if (node.callFrame.url) { const url = normalizeSlashes(node.callFrame.url); - if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames)) { + if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) { node.callFrame.url = getRelativePathToDirectoryOrUrl( fileUrlRoot, url, fileUrlRoot, - createGetCanonicalFileName(useCaseSensitiveFileNames), + createGetCanonicalFileName(useCaseSensitiveFileNames2), /*isAbsolutePathAnUrl*/ true ); @@ -8682,7 +8722,7 @@ var sys = (() => { } } function readDirectory(path, extensions, excludes, includes, depth) { - return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); + return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); } function fileSystemEntryExists(path, entryKind) { const originalStackTraceLimit = Error.stackTraceLimit; @@ -9247,6 +9287,7 @@ var Diagnostics = { Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, 1 /* Error */, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, 1 /* Error */, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: diag(1065, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065", "The return type of an async function or method must be the global Promise type."), In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, 1 /* Error */, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, 1 /* Error */, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, 1 /* Error */, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), @@ -9276,6 +9317,7 @@ var Diagnostics = { A_return_statement_can_only_be_used_within_a_function_body: diag(1108, 1 /* Error */, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), Expression_expected: diag(1109, 1 /* Error */, "Expression_expected_1109", "Expression expected."), Type_expected: diag(1110, 1 /* Error */, "Type_expected_1110", "Type expected."), + Private_field_0_must_be_declared_in_an_enclosing_class: diag(1111, 1 /* Error */, "Private_field_0_must_be_declared_in_an_enclosing_class_1111", "Private field '{0}' must be declared in an enclosing class."), A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, 1 /* Error */, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), Duplicate_label_0: diag(1114, 1 /* Error */, "Duplicate_label_0_1114", "Duplicate label '{0}'."), A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, 1 /* Error */, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), @@ -9310,9 +9352,8 @@ var Diagnostics = { Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, 1 /* Error */, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, 1 /* Error */, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, 1 /* Error */, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), - const_declarations_must_be_initialized: diag(1155, 1 /* Error */, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."), - const_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."), - let_declarations_can_only_be_declared_inside_a_block: diag(1157, 1 /* Error */, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."), + _0_declarations_must_be_initialized: diag(1155, 1 /* Error */, "_0_declarations_must_be_initialized_1155", "'{0}' declarations must be initialized."), + _0_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "_0_declarations_can_only_be_declared_inside_a_block_1156", "'{0}' declarations can only be declared inside a block."), Unterminated_template_literal: diag(1160, 1 /* Error */, "Unterminated_template_literal_1160", "Unterminated template literal."), Unterminated_regular_expression_literal: diag(1161, 1 /* Error */, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), An_object_member_cannot_be_declared_optional: diag(1162, 1 /* Error */, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), @@ -9494,8 +9535,6 @@ var Diagnostics = { Class_constructor_may_not_be_a_generator: diag(1368, 1 /* Error */, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), Did_you_mean_0: diag(1369, 3 /* Message */, "Did_you_mean_0_1369", "Did you mean '{0}'?"), This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, 1 /* Error */, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."), - Convert_to_type_only_import: diag(1373, 3 /* 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, 3 /* 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, 1 /* 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."), _0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."), _0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."), @@ -9599,6 +9638,11 @@ var Diagnostics = { Escape_sequence_0_is_not_allowed: diag(1488, 1 /* Error */, "Escape_sequence_0_is_not_allowed_1488", "Escape sequence '{0}' is not allowed."), Decimals_with_leading_zeros_are_not_allowed: diag(1489, 1 /* Error */, "Decimals_with_leading_zeros_are_not_allowed_1489", "Decimals with leading zeros are not allowed."), File_appears_to_be_binary: diag(1490, 1 /* Error */, "File_appears_to_be_binary_1490", "File appears to be binary."), + _0_modifier_cannot_appear_on_a_using_declaration: diag(1491, 1 /* Error */, "_0_modifier_cannot_appear_on_a_using_declaration_1491", "'{0}' modifier cannot appear on a 'using' declaration."), + _0_declarations_may_not_have_binding_patterns: diag(1492, 1 /* Error */, "_0_declarations_may_not_have_binding_patterns_1492", "'{0}' declarations may not have binding patterns."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), + The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), + _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* 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, 1 /* 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( @@ -9693,7 +9737,6 @@ var Diagnostics = { This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, 1 /* Error */, "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}'."), Type_0_does_not_satisfy_the_constraint_1: diag(2344, 1 /* Error */, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, 1 /* Error */, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), - Call_target_does_not_contain_any_signatures: diag(2346, 1 /* Error */, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), Untyped_function_calls_may_not_accept_type_arguments: diag(2347, 1 /* Error */, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, 1 /* Error */, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), This_expression_is_not_callable: diag(2349, 1 /* Error */, "This_expression_is_not_callable_2349", "This expression is not callable."), @@ -10145,6 +10188,11 @@ var Diagnostics = { A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: diag(2846, 1 /* Error */, "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"), The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression: diag(2848, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848", "The right-hand side of an 'instanceof' expression must not be an instantiation expression."), Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1: diag(2849, 1 /* Error */, "Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849", "Target signature provides too few arguments. Expected {0} or more, but got {1}."), + The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined: diag(2850, 1 /* Error */, "The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850", "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: diag(2851, 1 /* Error */, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), + await_using_statements_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(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* 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, 1 /* 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, 1 /* 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}'."), @@ -10298,7 +10346,6 @@ var Diagnostics = { Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: diag(5081, 1 /* Error */, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: diag(5082, 1 /* Error */, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), Cannot_read_file_0: diag(5083, 1 /* Error */, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), - Tuple_members_must_all_have_names_or_all_not_have_names: diag(5084, 1 /* Error */, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."), A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, 1 /* Error */, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, 1 /* Error */, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, 1 /* Error */, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), @@ -10321,6 +10368,8 @@ var Diagnostics = { Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), + Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."), + Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -10701,6 +10750,8 @@ var Diagnostics = { Resolved_under_condition_0: diag(6414, 3 /* Message */, "Resolved_under_condition_0_6414", "Resolved under condition '{0}'."), Failed_to_resolve_under_condition_0: diag(6415, 3 /* Message */, "Failed_to_resolve_under_condition_0_6415", "Failed to resolve under condition '{0}'."), Exiting_conditional_exports: diag(6416, 3 /* Message */, "Exiting_conditional_exports_6416", "Exiting conditional exports."), + Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: diag(6417, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", "Searching all ancestor node_modules directories for preferred extensions: {0}."), + Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: diag(6418, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", "Searching all ancestor node_modules directories for fallback extensions: {0}."), The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* Message */, "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_this_index_signature: diag(6501, 3 /* Message */, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, 3 /* Message */, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), @@ -10939,6 +10990,7 @@ var Diagnostics = { Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, 1 /* Error */, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, 1 /* Error */, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, 1 /* Error */, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), + Signature_declarations_can_only_be_used_in_TypeScript_files: diag(8017, 1 /* Error */, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."), Report_errors_in_js_files: diag(8019, 3 /* Message */, "Report_errors_in_js_files_8019", "Report errors in .js files."), JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, 1 /* Error */, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, 1 /* Error */, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), @@ -11213,6 +11265,14 @@ var Diagnostics = { Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."), Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"), Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"), + Use_import_type: diag(95180, 3 /* Message */, "Use_import_type_95180", "Use 'import type'"), + Use_type_0: diag(95181, 3 /* Message */, "Use_type_0_95181", "Use 'type {0}'"), + Fix_all_with_type_only_imports: diag(95182, 3 /* Message */, "Fix_all_with_type_only_imports_95182", "Fix all with type-only imports"), + Cannot_move_statements_to_the_selected_file: diag(95183, 3 /* Message */, "Cannot_move_statements_to_the_selected_file_95183", "Cannot move statements to the selected file"), + Inline_variable: diag(95184, 3 /* Message */, "Inline_variable_95184", "Inline variable"), + Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."), + Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."), + Add_missing_comma_for_object_member_completion_0: diag(95187, 3 /* Message */, "Add_missing_comma_for_object_member_completion_0_95187", "Add missing comma for object member completion '{0}'."), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* 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, 1 /* 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, 1 /* 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?"), @@ -11239,8 +11299,8 @@ var Diagnostics = { Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, 3 /* Message */, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, 1 /* Error */, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, 1 /* Error */, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), - Await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."), - For_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."), + await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "await_expression_cannot_be_used_inside_a_class_static_block_18037", "'await' expression cannot be used inside a class static block."), + for_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "for_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'for await' loops cannot be used inside a class static block."), Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, 1 /* Error */, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, 1 /* Error */, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, 1 /* Error */, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), @@ -11254,7 +11314,8 @@ var Diagnostics = { The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."), Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"), - Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type.") + Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."), + await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block.") }; // src/compiler/scanner.ts @@ -11271,7 +11332,7 @@ var textToKeywordObj = { as: 130 /* AsKeyword */, asserts: 131 /* AssertsKeyword */, assert: 132 /* AssertKeyword */, - bigint: 162 /* BigIntKeyword */, + bigint: 163 /* BigIntKeyword */, boolean: 136 /* BooleanKeyword */, break: 83 /* BreakKeyword */, case: 84 /* CaseKeyword */, @@ -11292,7 +11353,7 @@ var textToKeywordObj = { false: 97 /* FalseKeyword */, finally: 98 /* FinallyKeyword */, for: 99 /* ForKeyword */, - from: 160 /* FromKeyword */, + from: 161 /* FromKeyword */, function: 100 /* FunctionKeyword */, get: 139 /* GetKeyword */, if: 101 /* IfKeyword */, @@ -11317,11 +11378,11 @@ var textToKeywordObj = { private: 123 /* PrivateKeyword */, protected: 124 /* ProtectedKeyword */, public: 125 /* PublicKeyword */, - override: 163 /* OverrideKeyword */, + override: 164 /* OverrideKeyword */, out: 147 /* OutKeyword */, readonly: 148 /* ReadonlyKeyword */, require: 149 /* RequireKeyword */, - global: 161 /* GlobalKeyword */, + global: 162 /* GlobalKeyword */, return: 107 /* ReturnKeyword */, satisfies: 152 /* SatisfiesKeyword */, set: 153 /* SetKeyword */, @@ -11339,6 +11400,7 @@ var textToKeywordObj = { undefined: 157 /* UndefinedKeyword */, unique: 158 /* UniqueKeyword */, unknown: 159 /* UnknownKeyword */, + using: 160 /* UsingKeyword */, var: 115 /* VarKeyword */, void: 116 /* VoidKeyword */, while: 117 /* WhileKeyword */, @@ -11346,7 +11408,7 @@ var textToKeywordObj = { yield: 127 /* YieldKeyword */, async: 134 /* AsyncKeyword */, await: 135 /* AwaitKeyword */, - of: 164 /* OfKeyword */ + of: 165 /* OfKeyword */ }; var textToKeyword = new Map(Object.entries(textToKeywordObj)); var textToToken = new Map(Object.entries({ @@ -11688,9 +11750,9 @@ function isConflictMarkerTrivia(text, pos) { } return false; } -function scanConflictMarkerTrivia(text, pos, error) { - if (error) { - error(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength); +function scanConflictMarkerTrivia(text, pos, error2) { + if (error2) { + error2(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength); } const ch = text.charCodeAt(pos); const len = text.length; @@ -11987,7 +12049,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan }); } return scanner2; - function error(message, errPos = pos, length3, arg0) { + function error2(message, errPos = pos, length3, arg0) { if (onError) { const oldPos = pos; pos = errPos; @@ -12011,9 +12073,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } else { tokenFlags |= 16384 /* ContainsInvalidSeparator */; if (isPreviousTokenSeparator) { - error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); + error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); } } pos++; @@ -12030,7 +12092,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } if (text.charCodeAt(pos - 1) === 95 /* _ */) { tokenFlags |= 16384 /* ContainsInvalidSeparator */; - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); } return result + text.substring(start3, pos); } @@ -12041,7 +12103,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan pos++; if (text.charCodeAt(pos) === 95 /* _ */) { tokenFlags |= 512 /* ContainsSeparator */ | 16384 /* ContainsInvalidSeparator */; - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); pos--; mainFragment = scanNumberFragment(); } else if (!scanDigits()) { @@ -12056,8 +12118,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan const literal = (withMinus ? "-" : "") + "0o" + (+tokenValue).toString(8); if (withMinus) start3--; - error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start3, pos - start3, literal); - return { type: 9 /* NumericLiteral */, value: tokenValue }; + error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start3, pos - start3, literal); + return 9 /* NumericLiteral */; } } else { mainFragment = scanNumberFragment(); @@ -12077,7 +12139,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan const preNumericPart = pos; const finalFragment = scanNumberFragment(); if (!finalFragment) { - error(Diagnostics.Digit_expected); + error2(Diagnostics.Digit_expected); } else { scientificFragment = text.substring(end2, preNumericPart) + finalFragment; end2 = pos; @@ -12096,21 +12158,19 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan result = text.substring(start3, end2); } if (tokenFlags & 8192 /* ContainsLeadingZero */) { - error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start3, end2 - start3); - return { type: 9 /* NumericLiteral */, value: "" + +result }; + error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start3, end2 - start3); + tokenValue = "" + +result; + return 9 /* NumericLiteral */; } if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) { checkForIdentifierStartAfterNumericLiteral(start3, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */)); - return { - type: 9 /* NumericLiteral */, - value: "" + +result - // if value is not an integer, it can be safely coerced to a number - }; + tokenValue = "" + +result; + return 9 /* NumericLiteral */; } else { tokenValue = result; const type = checkBigIntSuffix(); checkForIdentifierStartAfterNumericLiteral(start3); - return { type, value: tokenValue }; + return type; } } function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) { @@ -12121,12 +12181,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan const { length: length3 } = scanIdentifierParts(); if (length3 === 1 && text[identifierStart] === "n") { if (isScientific) { - error(Diagnostics.A_bigint_literal_cannot_use_exponential_notation, numericStart, identifierStart - numericStart + 1); + error2(Diagnostics.A_bigint_literal_cannot_use_exponential_notation, numericStart, identifierStart - numericStart + 1); } else { - error(Diagnostics.A_bigint_literal_must_be_an_integer, numericStart, identifierStart - numericStart + 1); + error2(Diagnostics.A_bigint_literal_must_be_an_integer, numericStart, identifierStart - numericStart + 1); } } else { - error(Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, identifierStart, length3); + error2(Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, identifierStart, length3); pos = identifierStart; } } @@ -12173,9 +12233,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan allowSeparator = false; isPreviousTokenSeparator = true; } else if (isPreviousTokenSeparator) { - error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); + error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); } pos++; continue; @@ -12194,7 +12254,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan valueChars = []; } if (text.charCodeAt(pos - 1) === 95 /* _ */) { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); } return String.fromCharCode(...valueChars); } @@ -12207,7 +12267,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (pos >= end) { result += text.substring(start3, pos); tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_string_literal); + error2(Diagnostics.Unterminated_string_literal); break; } const ch = text.charCodeAt(pos); @@ -12228,7 +12288,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (isLineBreak(ch) && !jsxAttributeString) { result += text.substring(start3, pos); tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_string_literal); + error2(Diagnostics.Unterminated_string_literal); break; } pos++; @@ -12245,7 +12305,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (pos >= end) { contents += text.substring(start3, pos); tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_template_literal); + error2(Diagnostics.Unterminated_template_literal); resultingToken = startedWithBacktick ? 15 /* NoSubstitutionTemplateLiteral */ : 18 /* TemplateTail */; break; } @@ -12288,7 +12348,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan const start3 = pos; pos++; if (pos >= end) { - error(Diagnostics.Unexpected_end_of_text); + error2(Diagnostics.Unexpected_end_of_text); return ""; } const ch = text.charCodeAt(pos); @@ -12314,7 +12374,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { const code = parseInt(text.substring(start3 + 1, pos), 8); - error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start3, pos - start3, "\\x" + padLeft(code.toString(16), 2, "0")); + error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start3, pos - start3, "\\x" + padLeft(code.toString(16), 2, "0")); return String.fromCharCode(code); } return text.substring(start3, pos); @@ -12322,7 +12382,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan case 57 /* _9 */: tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Escape_sequence_0_is_not_allowed, start3, pos - start3, text.substring(start3, pos)); + error2(Diagnostics.Escape_sequence_0_is_not_allowed, start3, pos - start3, text.substring(start3, pos)); return String.fromCharCode(ch); } return text.substring(start3, pos); @@ -12354,28 +12414,28 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (escapedValue < 0) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); } return text.substring(start3, pos); } if (!isCodePoint(escapedValue)) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); + error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); } return text.substring(start3, pos); } if (pos >= end) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Unexpected_end_of_text); + error2(Diagnostics.Unexpected_end_of_text); } return text.substring(start3, pos); } if (text.charCodeAt(pos) !== 125 /* closeBrace */) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Unterminated_Unicode_escape_sequence); + error2(Diagnostics.Unterminated_Unicode_escape_sequence); } return text.substring(start3, pos); } @@ -12387,7 +12447,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); } return text.substring(start3, pos); } @@ -12399,7 +12459,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); } return text.substring(start3, pos); } @@ -12427,19 +12487,19 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; let isInvalidExtendedEscape = false; if (escapedValue < 0) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); isInvalidExtendedEscape = true; } else if (escapedValue > 1114111) { - error(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); + error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); isInvalidExtendedEscape = true; } if (pos >= end) { - error(Diagnostics.Unexpected_end_of_text); + error2(Diagnostics.Unexpected_end_of_text); isInvalidExtendedEscape = true; } else if (text.charCodeAt(pos) === 125 /* closeBrace */) { pos++; } else { - error(Diagnostics.Unterminated_Unicode_escape_sequence); + error2(Diagnostics.Unterminated_Unicode_escape_sequence); isInvalidExtendedEscape = true; } if (isInvalidExtendedEscape) { @@ -12533,9 +12593,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan separatorAllowed = false; isPreviousTokenSeparator = true; } else if (isPreviousTokenSeparator) { - error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); + error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); } pos++; continue; @@ -12549,7 +12609,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan isPreviousTokenSeparator = false; } if (text.charCodeAt(pos - 1) === 95 /* _ */) { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); } return value; } @@ -12579,7 +12639,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan const ch = codePointAt(text, pos); if (pos === 0) { if (ch === 65533 /* replacementCharacter */) { - error(Diagnostics.File_appears_to_be_binary); + error2(Diagnostics.File_appears_to_be_binary); pos = end; return token = 8 /* NonTextFileMarkerTrivia */; } @@ -12719,7 +12779,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return token = 41 /* MinusToken */; case 46 /* dot */: if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = scanNumber().value; + scanNumber(); return token = 9 /* NumericLiteral */; } if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { @@ -12770,7 +12830,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart); if (!commentClosed) { - error(Diagnostics.Asterisk_Slash_expected); + error2(Diagnostics.Asterisk_Slash_expected); } if (skipTrivia2) { continue; @@ -12795,7 +12855,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan true ); if (!tokenValue) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); tokenValue = "0"; } tokenValue = "0x" + tokenValue; @@ -12808,7 +12868,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan 2 ); if (!tokenValue) { - error(Diagnostics.Binary_digit_expected); + error2(Diagnostics.Binary_digit_expected); tokenValue = "0"; } tokenValue = "0b" + tokenValue; @@ -12821,7 +12881,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan 8 ); if (!tokenValue) { - error(Diagnostics.Octal_digit_expected); + error2(Diagnostics.Octal_digit_expected); tokenValue = "0"; } tokenValue = "0o" + tokenValue; @@ -12837,8 +12897,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan case 55 /* _7 */: case 56 /* _8 */: case 57 /* _9 */: - ({ type: token, value: tokenValue } = scanNumber()); - return token; + return token = scanNumber(); case 58 /* colon */: pos++; return token = 59 /* ColonToken */; @@ -12847,7 +12906,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return token = 27 /* SemicolonToken */; case 60 /* lessThan */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -12870,7 +12929,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return token = 30 /* LessThanToken */; case 61 /* equals */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -12890,7 +12949,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return token = 64 /* EqualsToken */; case 62 /* greaterThan */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -12928,7 +12987,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return token = 19 /* OpenBraceToken */; case 124 /* bar */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -12970,12 +13029,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); return token = getIdentifierToken(); } - error(Diagnostics.Invalid_character); + error2(Diagnostics.Invalid_character); pos++; return token = 0 /* Unknown */; case 35 /* hash */: if (pos !== 0 && text[pos + 1] === "!") { - error(Diagnostics.can_only_be_used_at_the_start_of_a_file); + error2(Diagnostics.can_only_be_used_at_the_start_of_a_file); pos++; return token = 0 /* Unknown */; } @@ -13003,7 +13062,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan scanIdentifier(charAfterHash, languageVersion); } else { tokenValue = "#"; - error(Diagnostics.Invalid_character, pos++, charSize(ch)); + error2(Diagnostics.Invalid_character, pos++, charSize(ch)); } return token = 81 /* PrivateIdentifier */; default: @@ -13019,7 +13078,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan continue; } const size = charSize(ch); - error(Diagnostics.Invalid_character, pos, size); + error2(Diagnostics.Invalid_character, pos, size); pos += size; return token = 0 /* Unknown */; } @@ -13085,13 +13144,13 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan while (true) { if (p >= end) { tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_regular_expression_literal); + error2(Diagnostics.Unterminated_regular_expression_literal); break; } const ch = text.charCodeAt(p); if (isLineBreak(ch)) { tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_regular_expression_literal); + error2(Diagnostics.Unterminated_regular_expression_literal); break; } if (inEscape) { @@ -13203,16 +13262,16 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } if (char === 60 /* lessThan */) { if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); return token = 7 /* ConflictMarkerTrivia */; } break; } if (char === 62 /* greaterThan */) { - error(Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); + error2(Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); } if (char === 125 /* closeBrace */) { - error(Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); + error2(Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); } if (isLineBreak(char) && firstNonWhitespace === 0) { firstNonWhitespace = -1; @@ -13613,16 +13672,16 @@ function collapseTextChangeRangesAcrossMultipleVersions(changes) { ); } function getTypeParameterOwner(d) { - if (d && d.kind === 167 /* TypeParameter */) { + if (d && d.kind === 168 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 263 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 264 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent2) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 175 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -13648,14 +13707,14 @@ function getCombinedFlags(node, getFlags) { node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 259 /* VariableDeclaration */) { + if (node.kind === 260 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 260 /* VariableDeclarationList */) { + if (node && node.kind === 261 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 242 /* VariableStatement */) { + if (node && node.kind === 243 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -13667,12 +13726,15 @@ function getCombinedNodeFlagsAlwaysIncludeJSDoc(node) { return getCombinedFlags(node, getEffectiveModifierFlagsAlwaysIncludeJSDoc); } function getCombinedNodeFlags(node) { - return getCombinedFlags(node, (n) => n.flags); + return getCombinedFlags(node, getNodeFlags); +} +function getNodeFlags(node) { + return node.flags; } var supportedLocaleDirectories = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]; function validateLocaleAndSetLanguage(locale, sys2, errors) { const lowerCaseLocale = locale.toLowerCase(); - const matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(lowerCaseLocale); + const matchResult = /^([a-z]+)([_-]([a-z]+))?$/.exec(lowerCaseLocale); if (!matchResult) { if (errors) { errors.push(createCompilerDiagnostic(Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp")); @@ -13745,7 +13807,7 @@ function findAncestor(node, callback) { return void 0; } function isParseTreeNode(node) { - return (node.flags & 8 /* Synthesized */) === 0; + return (node.flags & 16 /* Synthesized */) === 0; } function getParseTreeNode(node, nodeTest) { if (node === void 0 || isParseTreeNode(node)) { @@ -13788,30 +13850,30 @@ function nameForNamelessJSDocTypedef(declaration) { return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 225 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { + if (expr.kind === 226 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return expr.name; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 216 /* ParenthesizedExpression */: { + case 217 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 255 /* LabeledStatement */: { + case 256 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -13842,16 +13904,16 @@ function getNonAssignedNameOfDeclaration(declaration) { switch (declaration.kind) { case 80 /* Identifier */: return declaration; - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: { + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 165 /* QualifiedName */) { + if (name.kind === 166 /* QualifiedName */) { return name.right; } break; } - case 212 /* CallExpression */: - case 225 /* BinaryExpression */: { + case 213 /* CallExpression */: + case 226 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -13867,15 +13929,15 @@ function getNonAssignedNameOfDeclaration(declaration) { return void 0; } } - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 346 /* JSDocEnumTag */: + case 347 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -14122,10 +14184,10 @@ function getAllJSDocTagsOfKind(node, kind) { return getJSDocTags(node).filter((doc) => doc.kind === kind); } function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 327 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 328 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 330 /* JSDocLink */ ? "link" : link.kind === 331 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 331 /* JSDocLink */ ? "link" : link.kind === 332 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -14141,7 +14203,7 @@ function getEffectiveTypeParameterDeclarations(node) { return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 326 /* JSDoc */); + Debug.assert(node.parent.kind === 327 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -14169,20 +14231,20 @@ function isMemberName(node) { return node.kind === 80 /* Identifier */ || node.kind === 81 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 177 /* SetAccessor */ || node.kind === 176 /* GetAccessor */; + return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */; } function isPropertyAccessChain(node) { - return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isPropertyAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isElementAccessChain(node) { - return isElementAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isElementAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isCallChain(node) { - return isCallExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isCallExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */ || kind === 212 /* CallExpression */ || kind === 234 /* NonNullExpression */); + return !!(node.flags & 64 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 235 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -14194,7 +14256,7 @@ function isOutermostOptionalChain(node) { return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; + return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -14203,37 +14265,37 @@ function skipPartiallyEmittedExpressions(node) { return skipOuterExpressions(node, 8 /* PartiallyEmittedExpressions */); } function isNonNullChain(node) { - return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isNonNullExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 251 /* BreakStatement */ || node.kind === 250 /* ContinueStatement */; + return node.kind === 252 /* BreakStatement */ || node.kind === 251 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 279 /* NamespaceExport */ || node.kind === 278 /* NamedExports */; + return node.kind === 280 /* NamespaceExport */ || node.kind === 279 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 308 /* UnparsedText */: - case 309 /* UnparsedInternalText */: + case 309 /* UnparsedText */: + case 310 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 306 /* UnparsedPrologue */ || node.kind === 310 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 307 /* UnparsedPrologue */ || node.kind === 311 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 354 /* JSDocPropertyTag */ || node.kind === 347 /* JSDocParameterTag */; + return node.kind === 355 /* JSDocPropertyTag */ || node.kind === 348 /* JSDocParameterTag */; } function isNode(node) { return isNodeKind(node.kind); } function isNodeKind(kind) { - return kind >= 165 /* FirstNode */; + return kind >= 166 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 164 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -14249,11 +14311,11 @@ function isLiteralExpression(node) { } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: case 14 /* RegularExpressionLiteral */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: return true; } return false; @@ -14273,23 +14335,23 @@ function isImportOrExportSpecifier(node) { } function isTypeOnlyImportDeclaration(node) { switch (node.kind) { - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.isTypeOnly; - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: return node.isTypeOnly; } return false; } function isTypeOnlyExportDeclaration(node) { switch (node.kind) { - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause; - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return node.parent.isTypeOnly; } return false; @@ -14311,6 +14373,10 @@ function isGeneratedPrivateIdentifier(node) { var _a; return isPrivateIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0; } +function isFileLevelReservedGeneratedIdentifier(node) { + const flags = node.emitNode.autoGenerate.flags; + return !!(flags & 32 /* FileLevel */) && !!(flags & 16 /* Optimistic */) && !!(flags & 8 /* ReservedInNestedScopes */); +} function isPrivateIdentifierClassElementDeclaration(node) { return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name); } @@ -14333,7 +14399,7 @@ function isModifierKind(token) { case 148 /* ReadonlyKeyword */: case 126 /* StaticKeyword */: case 147 /* OutKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return true; } return false; @@ -14342,22 +14408,22 @@ function isParameterPropertyModifier(kind) { return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 163 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; + return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; } function isModifier(node) { return isModifierKind(node.kind); } function isEntityName(node) { const kind = node.kind; - return kind === 165 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 166 /* ComputedPropertyName */; + return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 205 /* ObjectBindingPattern */ || kind === 206 /* ArrayBindingPattern */; + return kind === 80 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -14373,13 +14439,13 @@ function isBooleanLiteral(node) { } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: return false; @@ -14387,14 +14453,14 @@ function isFunctionLikeDeclarationKind(kind) { } function isFunctionLikeKind(kind) { switch (kind) { - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 183 /* FunctionType */: - case 323 /* JSDocFunctionType */: - case 184 /* ConstructorType */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 184 /* FunctionType */: + case 324 /* JSDocFunctionType */: + case 185 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -14405,22 +14471,22 @@ function isFunctionOrModuleBlock(node) { } function isClassElement(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 180 /* IndexSignature */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 239 /* SemicolonClassElement */; + return kind === 176 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 240 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */); + return node && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */); } function isAccessor(node) { - return node && (node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */); + return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -14428,10 +14494,10 @@ function isMethodOrAccessor(node) { } function isNamedClassElement(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: return true; default: return false; @@ -14442,22 +14508,22 @@ function isModifierLike(node) { } function isTypeElement(node) { const kind = node.kind; - return kind === 179 /* ConstructSignature */ || kind === 178 /* CallSignature */ || kind === 170 /* PropertySignature */ || kind === 172 /* MethodSignature */ || kind === 180 /* IndexSignature */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 304 /* SpreadAssignment */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 305 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return true; } return false; @@ -14465,23 +14531,23 @@ function isFunctionOrConstructorTypeNode(node) { function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 206 /* ArrayBindingPattern */ || kind === 205 /* ObjectBindingPattern */; + return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 208 /* ArrayLiteralExpression */ || kind === 209 /* ObjectLiteralExpression */; + return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 207 /* BindingElement */ || kind === 231 /* OmittedExpression */; + return kind === 208 /* BindingElement */ || kind === 232 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: return true; } return false; @@ -14494,40 +14560,40 @@ function isBindingOrAssignmentPattern(node) { } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 205 /* ObjectBindingPattern */: - case 209 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 210 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return true; } return false; } function isArrayBindingOrAssignmentElement(node) { switch (node.kind) { - case 207 /* BindingElement */: - case 231 /* OmittedExpression */: - case 229 /* SpreadElement */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: + case 208 /* BindingElement */: + case 232 /* OmittedExpression */: + case 230 /* SpreadElement */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return true; } return isAssignmentExpression( @@ -14538,50 +14604,50 @@ function isArrayBindingOrAssignmentElement(node) { } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 210 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */ || kind === 204 /* ImportType */; + return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 205 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 210 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */; + return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; } function isCallLikeExpression(node) { switch (node.kind) { - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 169 /* Decorator */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 170 /* Decorator */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 212 /* CallExpression */ || node.kind === 213 /* NewExpression */; + return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 227 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; + return kind === 228 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 213 /* NewExpression */: - case 212 /* CallExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: - case 214 /* TaggedTemplateExpression */: - case 208 /* ArrayLiteralExpression */: - case 216 /* ParenthesizedExpression */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 214 /* NewExpression */: + case 213 /* CallExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: + case 215 /* TaggedTemplateExpression */: + case 209 /* ArrayLiteralExpression */: + case 217 /* ParenthesizedExpression */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: case 80 /* Identifier */: case 81 /* PrivateIdentifier */: case 14 /* RegularExpressionLiteral */: @@ -14589,17 +14655,17 @@ function isLeftHandSideExpressionKind(kind) { case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 110 /* ThisKeyword */: case 112 /* TrueKeyword */: case 108 /* SuperKeyword */: - case 234 /* NonNullExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 235 /* MetaProperty */: + case 235 /* NonNullExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 236 /* MetaProperty */: case 102 /* ImportKeyword */: - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return true; default: return false; @@ -14610,13 +14676,13 @@ function isUnaryExpression(node) { } function isUnaryExpressionKind(kind) { switch (kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: - case 219 /* DeleteExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 222 /* AwaitExpression */: - case 215 /* TypeAssertionExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 220 /* DeleteExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 223 /* AwaitExpression */: + case 216 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -14624,9 +14690,9 @@ function isUnaryExpressionKind(kind) { } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return true; - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; default: return false; @@ -14637,7 +14703,7 @@ function isLiteralTypeLiteral(node) { case 106 /* NullKeyword */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -14648,16 +14714,16 @@ function isExpression(node) { } function isExpressionKind(kind) { switch (kind) { - case 226 /* ConditionalExpression */: - case 228 /* YieldExpression */: - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 229 /* SpreadElement */: - case 233 /* AsExpression */: - case 231 /* OmittedExpression */: - case 360 /* CommaListExpression */: - case 359 /* PartiallyEmittedExpression */: - case 237 /* SatisfiesExpression */: + case 227 /* ConditionalExpression */: + case 229 /* YieldExpression */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 230 /* SpreadElement */: + case 234 /* AsExpression */: + case 232 /* OmittedExpression */: + case 361 /* CommaListExpression */: + case 360 /* PartiallyEmittedExpression */: + case 238 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -14665,20 +14731,20 @@ function isExpressionKind(kind) { } function isAssertionExpression(node) { const kind = node.kind; - return kind === 215 /* TypeAssertionExpression */ || kind === 233 /* AsExpression */; + return kind === 216 /* TypeAssertionExpression */ || kind === 234 /* AsExpression */; } function isNotEmittedOrPartiallyEmittedNode(node) { return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return true; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -14696,7 +14762,7 @@ function isExternalModuleIndicator(result) { return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); } function isForInOrOfStatement(node) { - return node.kind === 248 /* ForInStatement */ || node.kind === 249 /* ForOfStatement */; + return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -14709,89 +14775,89 @@ function isForInitializer(node) { } function isModuleBody(node) { const kind = node.kind; - return kind === 267 /* ModuleBlock */ || kind === 266 /* ModuleDeclaration */ || kind === 80 /* Identifier */; + return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */ || kind === 80 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 267 /* ModuleBlock */ || kind === 266 /* ModuleDeclaration */; + return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 266 /* ModuleDeclaration */; + return kind === 80 /* Identifier */ || kind === 267 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 274 /* NamedImports */ || kind === 273 /* NamespaceImport */; + return kind === 275 /* NamedImports */ || kind === 274 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */ || node.kind === 265 /* EnumDeclaration */; + return node.kind === 267 /* ModuleDeclaration */ || node.kind === 266 /* EnumDeclaration */; } function canHaveSymbol(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 207 /* BindingElement */: - case 212 /* CallExpression */: - case 178 /* CallSignature */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 174 /* ClassStaticBlockDeclaration */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 211 /* ElementAccessExpression */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: - case 280 /* ExportSpecifier */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 208 /* BindingElement */: + case 213 /* CallExpression */: + case 179 /* CallSignature */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 175 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 212 /* ElementAccessExpression */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: + case 281 /* ExportSpecifier */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: case 80 /* Identifier */: - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: - case 323 /* JSDocFunctionType */: - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: - case 329 /* JSDocSignature */: - case 352 /* JSDocTypedefTag */: - case 328 /* JSDocTypeLiteral */: - case 290 /* JsxAttribute */: - case 291 /* JsxAttributes */: - case 292 /* JsxSpreadAttribute */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 201 /* NamedTupleMember */: - case 279 /* NamespaceExport */: - case 269 /* NamespaceExportDeclaration */: - case 273 /* NamespaceImport */: - case 213 /* NewExpression */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: + case 324 /* JSDocFunctionType */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 330 /* JSDocSignature */: + case 353 /* JSDocTypedefTag */: + case 329 /* JSDocTypeLiteral */: + case 291 /* JsxAttribute */: + case 292 /* JsxAttributes */: + case 293 /* JsxSpreadAttribute */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 202 /* NamedTupleMember */: + case 280 /* NamespaceExport */: + case 270 /* NamespaceExportDeclaration */: + case 274 /* NamespaceImport */: + case 214 /* NewExpression */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: - case 209 /* ObjectLiteralExpression */: - case 168 /* Parameter */: - case 210 /* PropertyAccessExpression */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 311 /* SourceFile */: - case 304 /* SpreadAssignment */: + case 210 /* ObjectLiteralExpression */: + case 169 /* Parameter */: + case 211 /* PropertyAccessExpression */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 312 /* SourceFile */: + case 305 /* SpreadAssignment */: case 11 /* StringLiteral */: - case 264 /* TypeAliasDeclaration */: - case 186 /* TypeLiteral */: - case 167 /* TypeParameter */: - case 259 /* VariableDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 187 /* TypeLiteral */: + case 168 /* TypeParameter */: + case 260 /* VariableDeclaration */: return true; default: return false; @@ -14799,53 +14865,53 @@ function canHaveSymbol(node) { } function canHaveLocals(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 240 /* Block */: - case 178 /* CallSignature */: - case 268 /* CaseBlock */: - case 298 /* CatchClause */: - case 174 /* ClassStaticBlockDeclaration */: - case 193 /* ConditionalType */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: - case 180 /* IndexSignature */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 352 /* JSDocTypedefTag */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 177 /* SetAccessor */: - case 311 /* SourceFile */: - case 264 /* TypeAliasDeclaration */: + case 219 /* ArrowFunction */: + case 241 /* Block */: + case 179 /* CallSignature */: + case 269 /* CaseBlock */: + case 299 /* CatchClause */: + case 175 /* ClassStaticBlockDeclaration */: + case 194 /* ConditionalType */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: + case 181 /* IndexSignature */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 353 /* JSDocTypedefTag */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 178 /* SetAccessor */: + case 312 /* SourceFile */: + case 265 /* TypeAliasDeclaration */: return true; default: return false; } } function isDeclarationKind(kind) { - return kind === 218 /* ArrowFunction */ || kind === 207 /* BindingElement */ || kind === 262 /* ClassDeclaration */ || kind === 230 /* ClassExpression */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 175 /* Constructor */ || kind === 265 /* EnumDeclaration */ || kind === 305 /* EnumMember */ || kind === 280 /* ExportSpecifier */ || kind === 261 /* FunctionDeclaration */ || kind === 217 /* FunctionExpression */ || kind === 176 /* GetAccessor */ || kind === 272 /* ImportClause */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 275 /* ImportSpecifier */ || kind === 263 /* InterfaceDeclaration */ || kind === 290 /* JsxAttribute */ || kind === 173 /* MethodDeclaration */ || kind === 172 /* MethodSignature */ || kind === 266 /* ModuleDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 273 /* NamespaceImport */ || kind === 279 /* NamespaceExport */ || kind === 168 /* Parameter */ || kind === 302 /* PropertyAssignment */ || kind === 171 /* PropertyDeclaration */ || kind === 170 /* PropertySignature */ || kind === 177 /* SetAccessor */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 264 /* TypeAliasDeclaration */ || kind === 167 /* TypeParameter */ || kind === 259 /* VariableDeclaration */ || kind === 352 /* JSDocTypedefTag */ || kind === 344 /* JSDocCallbackTag */ || kind === 354 /* JSDocPropertyTag */; + return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 176 /* Constructor */ || kind === 266 /* EnumDeclaration */ || kind === 306 /* EnumMember */ || kind === 281 /* ExportSpecifier */ || kind === 262 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 273 /* ImportClause */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 276 /* ImportSpecifier */ || kind === 264 /* InterfaceDeclaration */ || kind === 291 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 267 /* ModuleDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 274 /* NamespaceImport */ || kind === 280 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 303 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 265 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 260 /* VariableDeclaration */ || kind === 353 /* JSDocTypedefTag */ || kind === 345 /* JSDocCallbackTag */ || kind === 355 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 261 /* FunctionDeclaration */ || kind === 281 /* MissingDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 269 /* NamespaceExportDeclaration */; + return kind === 262 /* FunctionDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 270 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 251 /* BreakStatement */ || kind === 250 /* ContinueStatement */ || kind === 258 /* DebuggerStatement */ || kind === 245 /* DoStatement */ || kind === 243 /* ExpressionStatement */ || kind === 241 /* EmptyStatement */ || kind === 248 /* ForInStatement */ || kind === 249 /* ForOfStatement */ || kind === 247 /* ForStatement */ || kind === 244 /* IfStatement */ || kind === 255 /* LabeledStatement */ || kind === 252 /* ReturnStatement */ || kind === 254 /* SwitchStatement */ || kind === 256 /* ThrowStatement */ || kind === 257 /* TryStatement */ || kind === 242 /* VariableStatement */ || kind === 246 /* WhileStatement */ || kind === 253 /* WithStatement */ || kind === 358 /* NotEmittedStatement */; + return kind === 252 /* BreakStatement */ || kind === 251 /* ContinueStatement */ || kind === 259 /* DebuggerStatement */ || kind === 246 /* DoStatement */ || kind === 244 /* ExpressionStatement */ || kind === 242 /* EmptyStatement */ || kind === 249 /* ForInStatement */ || kind === 250 /* ForOfStatement */ || kind === 248 /* ForStatement */ || kind === 245 /* IfStatement */ || kind === 256 /* LabeledStatement */ || kind === 253 /* ReturnStatement */ || kind === 255 /* SwitchStatement */ || kind === 257 /* ThrowStatement */ || kind === 258 /* TryStatement */ || kind === 243 /* VariableStatement */ || kind === 247 /* WhileStatement */ || kind === 254 /* WithStatement */ || kind === 359 /* NotEmittedStatement */; } function isDeclaration(node) { - if (node.kind === 167 /* TypeParameter */) { - return node.parent && node.parent.kind !== 351 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 168 /* TypeParameter */) { + return node.parent && node.parent.kind !== 352 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -14860,10 +14926,10 @@ function isStatement(node) { return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 240 /* Block */) + if (node.kind !== 241 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 257 /* TryStatement */ || node.parent.kind === 298 /* CatchClause */) { + if (node.parent.kind === 258 /* TryStatement */ || node.parent.kind === 299 /* CatchClause */) { return false; } } @@ -14871,50 +14937,50 @@ function isBlockStatement(node) { } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 240 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 241 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 282 /* ExternalModuleReference */ || kind === 165 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 283 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 210 /* PropertyAccessExpression */ || kind === 294 /* JsxNamespacedName */; + return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 211 /* PropertyAccessExpression */ || kind === 295 /* JsxNamespacedName */; } function isJsxChild(node) { const kind = node.kind; - return kind === 283 /* JsxElement */ || kind === 293 /* JsxExpression */ || kind === 284 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 287 /* JsxFragment */; + return kind === 284 /* JsxElement */ || kind === 294 /* JsxExpression */ || kind === 285 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 288 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 290 /* JsxAttribute */ || kind === 292 /* JsxSpreadAttribute */; + return kind === 291 /* JsxAttribute */ || kind === 293 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 11 /* StringLiteral */ || kind === 293 /* JsxExpression */; + return kind === 11 /* StringLiteral */ || kind === 294 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 285 /* JsxOpeningElement */ || kind === 284 /* JsxSelfClosingElement */; + return kind === 286 /* JsxOpeningElement */ || kind === 285 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 295 /* CaseClause */ || kind === 296 /* DefaultClause */; + return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 315 /* FirstJSDocNode */ && node.kind <= 356 /* LastJSDocNode */; + return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 357 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 326 /* JSDoc */ || node.kind === 325 /* JSDocNamepathType */ || node.kind === 327 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 327 /* JSDoc */ || node.kind === 326 /* JSDocNamepathType */ || node.kind === 328 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 333 /* FirstJSDocTagNode */ && node.kind <= 356 /* LastJSDocTagNode */; + return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <= 357 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 177 /* SetAccessor */; + return node.kind === 178 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 176 /* GetAccessor */; + return node.kind === 177 /* GetAccessor */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) @@ -14930,22 +14996,22 @@ function hasInitializer(node) { } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: - case 305 /* EnumMember */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: + case 306 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 290 /* JsxAttribute */ || node.kind === 292 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 291 /* JsxAttribute */ || node.kind === 293 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 182 /* TypeReference */ || node.kind === 232 /* ExpressionWithTypeArguments */; + return node.kind === 183 /* TypeReference */ || node.kind === 233 /* ExpressionWithTypeArguments */; } var MAX_SMI_X86 = 1073741823; function guessIndentation(lines) { @@ -14973,7 +15039,7 @@ function isStringLiteralLike(node) { return node.kind === 11 /* StringLiteral */ || node.kind === 15 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 330 /* JSDocLink */ || node.kind === 331 /* JSDocLinkCode */ || node.kind === 332 /* JSDocLinkPlain */; + return node.kind === 331 /* JSDocLink */ || node.kind === 332 /* JSDocLinkCode */ || node.kind === 333 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -14981,7 +15047,7 @@ function hasRestParameter(s) { } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 324 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 325 /* JSDocVariadicType */; } // src/compiler/utilities.ts @@ -15198,19 +15264,19 @@ function hasChangesInResolutions(names, newSourceFile, newResolutions, oldResolu } function containsParseError(node) { aggregateChildData(node); - return (node.flags & 524288 /* ThisNodeOrAnySubNodesHasError */) !== 0; + return (node.flags & 1048576 /* ThisNodeOrAnySubNodesHasError */) !== 0; } function aggregateChildData(node) { - if (!(node.flags & 1048576 /* HasAggregatedChildData */)) { - const thisNodeOrAnySubNodesHasError = (node.flags & 131072 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); + if (!(node.flags & 2097152 /* HasAggregatedChildData */)) { + const thisNodeOrAnySubNodesHasError = (node.flags & 262144 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); if (thisNodeOrAnySubNodesHasError) { - node.flags |= 524288 /* ThisNodeOrAnySubNodesHasError */; + node.flags |= 1048576 /* ThisNodeOrAnySubNodesHasError */; } - node.flags |= 1048576 /* HasAggregatedChildData */; + node.flags |= 2097152 /* HasAggregatedChildData */; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 311 /* SourceFile */) { + while (node && node.kind !== 312 /* SourceFile */) { node = node.parent; } return node; @@ -15223,11 +15289,11 @@ function isPlainJsFile(file, checkJs) { } function isStatementWithLocals(node) { switch (node.kind) { - case 240 /* Block */: - case 268 /* CaseBlock */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return true; } return false; @@ -15386,7 +15452,7 @@ function getTokenPosOfNode(node, sourceFile, includeJsDoc) { if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 357 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 358 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return skipTrivia( @@ -15909,11 +15975,11 @@ function makeIdentifierFromModuleName(moduleName) { return getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); } function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 3 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclarationOrBindingElement(declaration); + return (getCombinedNodeFlags(declaration) & 7 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclarationOrBindingElement(declaration); } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 259 /* VariableDeclaration */ && node.parent.kind === 298 /* CatchClause */; + return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 11 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -15931,22 +15997,22 @@ function isShorthandAmbientModuleSymbol(moduleSymbol) { return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 266 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 267 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 311 /* SourceFile */ || node.kind === 266 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 312 /* SourceFile */ || node.kind === 267 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { - return !!(module2.flags & 1024 /* GlobalAugmentation */); + return !!(module2.flags & 2048 /* GlobalAugmentation */); } function isExternalModuleAugmentation(node) { return isAmbientModule(node) && isModuleAugmentationExternal(node); } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return isExternalModule(node.parent); - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -15989,28 +16055,28 @@ function isEffectiveStrictModeSourceFile(node, compilerOptions) { return false; } function isAmbientPropertyDeclaration(node) { - return !!(node.flags & 16777216 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); + return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); } function isBlockScope(node, parentNode) { switch (node.kind) { - case 311 /* SourceFile */: - case 268 /* CaseBlock */: - case 298 /* CatchClause */: - case 266 /* ModuleDeclaration */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 171 /* PropertyDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: + case 312 /* SourceFile */: + case 269 /* CaseBlock */: + case 299 /* CatchClause */: + case 267 /* ModuleDeclaration */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 172 /* PropertyDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return true; - case 240 /* Block */: + case 241 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; @@ -16018,9 +16084,9 @@ function isBlockScope(node, parentNode) { function isDeclarationWithTypeParameters(node) { Debug.type(node); switch (node.kind) { - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: - case 329 /* JSDocSignature */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 330 /* JSDocSignature */: return true; default: assertType(node); @@ -16030,25 +16096,25 @@ function isDeclarationWithTypeParameters(node) { function isDeclarationWithTypeParameterChildren(node) { Debug.type(node); switch (node.kind) { - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 323 /* JSDocFunctionType */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 351 /* JSDocTemplateTag */: - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 324 /* JSDocFunctionType */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 352 /* JSDocTemplateTag */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: assertType(node); @@ -16057,8 +16123,8 @@ function isDeclarationWithTypeParameterChildren(node) { } function isAnyImportSyntax(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: return true; default: return false; @@ -16069,15 +16135,15 @@ function isAnyImportOrBareOrAccessedRequire(node) { } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 242 /* VariableStatement */: - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 243 /* VariableStatement */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: return true; default: return false; @@ -16089,6 +16155,9 @@ function hasPossibleExternalModuleReference(node) { function isAnyImportOrReExport(node) { return isAnyImportSyntax(node) || isExportDeclaration(node); } +function getEnclosingContainer(node) { + return findAncestor(node.parent, (n) => !!(getContainerFlags(n) & 1 /* IsContainer */)); +} function getEnclosingBlockScopeContainer(node) { return findAncestor(node.parent, (current) => isBlockScope(current, current.parent)); } @@ -16106,7 +16175,7 @@ function getNameFromIndexInfo(info) { return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 166 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a; @@ -16118,11 +16187,11 @@ function tryGetTextOfPropertyName(name) { case 9 /* NumericLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -16138,17 +16207,17 @@ function entityNameToString(name) { case 81 /* PrivateIdentifier */: case 80 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 317 /* JSDocMemberName */: + case 318 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return entityNameToString(name.namespace) + ":" + entityNameToString(name.name); default: return Debug.assertNever(name); @@ -16254,7 +16323,7 @@ function scanTokenAtPosition(sourceFile, pos) { } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 240 /* Block */) { + if (node.body && node.body.kind === 241 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -16266,7 +16335,7 @@ function getErrorSpanForArrowFunction(sourceFile, node) { function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 311 /* SourceFile */: { + case 312 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -16278,43 +16347,43 @@ function getErrorSpanForNode(sourceFile, node) { } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 264 /* TypeAliasDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 273 /* NamespaceImport */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 265 /* TypeAliasDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 274 /* NamespaceImport */: errorNode = node.name; break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: { + case 296 /* CaseClause */: + case 297 /* DefaultClause */: { const start2 = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start2, end); } - case 252 /* ReturnStatement */: - case 228 /* YieldExpression */: { + case 253 /* ReturnStatement */: + case 229 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 237 /* SatisfiesExpression */: { + case 238 /* SatisfiesExpression */: { const pos2 = skipTrivia(sourceFile.text, node.expression.end); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 356 /* JSDocSatisfiesTag */: { + case 357 /* JSDocSatisfiesTag */: { const pos2 = skipTrivia(sourceFile.text, node.tagName.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } @@ -16346,17 +16415,23 @@ function isEnumConst(node) { function isDeclarationReadonly(declaration) { return !!(getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); } +function isVarAwaitUsing(node) { + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 6 /* AwaitUsing */; +} +function isVarUsing(node) { + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 4 /* Using */; +} function isVarConst(node) { - return !!(getCombinedNodeFlags(node) & 2 /* Const */); + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 2 /* Const */; } function isLet(node) { - return !!(getCombinedNodeFlags(node) & 1 /* Let */); + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 1 /* Let */; } function isSuperCall(n) { - return n.kind === 212 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; + return n.kind === 213 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 212 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */; + return n.kind === 213 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */; } function isImportMeta(n) { return isMetaProperty(n) && n.keywordToken === 102 /* ImportKeyword */ && n.name.escapedText === "meta"; @@ -16365,7 +16440,7 @@ function isLiteralImportTypeNode(n) { return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 243 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; + return node.kind === 244 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -16383,7 +16458,7 @@ function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 168 /* Parameter */ || node.kind === 167 /* TypeParameter */ || node.kind === 217 /* FunctionExpression */ || node.kind === 218 /* ArrowFunction */ || node.kind === 216 /* ParenthesizedExpression */ || node.kind === 259 /* VariableDeclaration */ || node.kind === 280 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 260 /* VariableDeclaration */ || node.kind === 281 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } var fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; @@ -16393,14 +16468,14 @@ var fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; var defaultLibReferenceRegEx = /^(\/\/\/\s*/; function isPartOfTypeNode(node) { - if (181 /* FirstTypeNode */ <= node.kind && node.kind <= 204 /* LastTypeNode */) { + if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) { return true; } switch (node.kind) { case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 154 /* StringKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: @@ -16410,64 +16485,64 @@ function isPartOfTypeNode(node) { case 146 /* NeverKeyword */: return true; case 116 /* VoidKeyword */: - return node.parent.kind !== 221 /* VoidExpression */; - case 232 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 222 /* VoidExpression */; + case 233 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 167 /* TypeParameter */: - return node.parent.kind === 199 /* MappedType */ || node.parent.kind === 194 /* InferType */; + case 168 /* TypeParameter */: + return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */; case 80 /* Identifier */: - if (node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 80 /* Identifier */ || node.kind === 165 /* QualifiedName */ || node.kind === 210 /* PropertyAccessExpression */, + node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 165 /* QualifiedName */: - case 210 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: case 110 /* ThisKeyword */: { const { parent: parent2 } = node; - if (parent2.kind === 185 /* TypeQuery */) { + if (parent2.kind === 186 /* TypeQuery */) { return false; } - if (parent2.kind === 204 /* ImportType */) { + if (parent2.kind === 205 /* ImportType */) { return !parent2.isTypeOf; } - if (181 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 204 /* LastTypeNode */) { + if (182 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 205 /* LastTypeNode */) { return true; } switch (parent2.kind) { - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isHeritageClause(parent2.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent2); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return node === parent2.constraint; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return node === parent2.constraint; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 168 /* Parameter */: - case 259 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 169 /* Parameter */: + case 260 /* VariableDeclaration */: return node === parent2.type; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return node === parent2.type; - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return node === parent2.type; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return node === parent2.type; - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: return contains(parent2.typeArguments, node); } } @@ -16487,23 +16562,23 @@ function forEachReturnStatement(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitor(node); - case 268 /* CaseBlock */: - case 240 /* Block */: - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 253 /* WithStatement */: - case 254 /* SwitchStatement */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 255 /* LabeledStatement */: - case 257 /* TryStatement */: - case 298 /* CatchClause */: + case 269 /* CaseBlock */: + case 241 /* Block */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 254 /* WithStatement */: + case 255 /* SwitchStatement */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 256 /* LabeledStatement */: + case 258 /* TryStatement */: + case 299 /* CatchClause */: return forEachChild(node, traverse); } } @@ -16512,21 +16587,21 @@ function forEachYieldExpression(body, visitor) { return traverse(body); function traverse(node) { switch (node.kind) { - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 265 /* EnumDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -16537,9 +16612,9 @@ function forEachYieldExpression(body, visitor) { } } function getRestParameterElementType(node) { - if (node && node.kind === 187 /* ArrayType */) { + if (node && node.kind === 188 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 182 /* TypeReference */) { + } else if (node && node.kind === 183 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -16547,26 +16622,26 @@ function getRestParameterElementType(node) { } function getMembersOfDeclaration(node) { switch (node.kind) { - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 186 /* TypeLiteral */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 187 /* TypeLiteral */: return node.members; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 207 /* BindingElement */: - case 305 /* EnumMember */: - case 168 /* Parameter */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 303 /* ShorthandPropertyAssignment */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 306 /* EnumMember */: + case 169 /* Parameter */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 304 /* ShorthandPropertyAssignment */: + case 260 /* VariableDeclaration */: return true; } } @@ -16576,7 +16651,7 @@ function isVariableLikeOrAccessor(node) { return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 260 /* VariableDeclarationList */ && node.parent.parent.kind === 242 /* VariableStatement */; + return node.parent.kind === 261 /* VariableDeclarationList */ && node.parent.parent.kind === 243 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -16593,13 +16668,13 @@ function isValidESSymbolDeclaration(node) { } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return true; } return false; @@ -16609,20 +16684,20 @@ function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) { if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 255 /* LabeledStatement */) { + if (node.statement.kind !== 256 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 240 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 241 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 173 /* MethodDeclaration */ && node.parent.kind === 209 /* ObjectLiteralExpression */; + return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 173 /* MethodDeclaration */ || node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */) && (node.parent.kind === 209 /* ObjectLiteralExpression */ || node.parent.kind === 230 /* ClassExpression */); + return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 231 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -16677,64 +16752,68 @@ function getContainingClassStaticBlock(node) { function getContainingFunctionOrClassStaticBlock(node) { return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration); } +function getContainingClassExcludingClassDecorators(node) { + const decorator = findAncestor(node.parent, (n) => isClassLike(n) ? "quit" : isDecorator(n)); + return decorator && isClassLike(decorator.parent) ? getContainingClass(decorator.parent) : getContainingClass(decorator ?? node); +} function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) { - Debug.assert(node.kind !== 311 /* SourceFile */); + Debug.assert(node.kind !== 312 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) { return node; } node = node.parent.parent; break; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 266 /* ModuleDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 265 /* EnumDeclaration */: - case 311 /* SourceFile */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 267 /* ModuleDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 266 /* EnumDeclaration */: + case 312 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 171 /* PropertyDeclaration */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 172 /* PropertyDeclaration */: return true; - case 240 /* Block */: + case 241 /* Block */: switch (node.parent.kind) { - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -16766,9 +16845,9 @@ function getNewTargetContainer(node) { ); if (container) { switch (container.kind) { - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return container; } } @@ -16781,26 +16860,26 @@ function getSuperContainer(node, stopOnFunctions) { return void 0; } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: node = node.parent; break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: return node; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -16810,14 +16889,14 @@ function getSuperContainer(node, stopOnFunctions) { } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 217 /* FunctionExpression */ || func.kind === 218 /* ArrowFunction */) { + if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) { let prev = func; let parent2 = func.parent; - while (parent2.kind === 216 /* ParenthesizedExpression */) { + while (parent2.kind === 217 /* ParenthesizedExpression */) { prev = parent2; parent2 = parent2.parent; } - if (parent2.kind === 212 /* CallExpression */ && parent2.expression === prev) { + if (parent2.kind === 213 /* CallExpression */ && parent2.expression === prev) { return parent2; } } @@ -16827,11 +16906,11 @@ function isSuperOrSuperProperty(node) { } function isSuperProperty(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a; @@ -16842,22 +16921,22 @@ function isThisInitializedObjectBindingExpression(node) { } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 80 /* Identifier */: - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return node.tag; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -16868,20 +16947,20 @@ function nodeCanBeDecorated(useLegacyDecorators, node, parent2, grandparent) { return false; } switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return true; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return !useLegacyDecorators; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2)); - case 168 /* Parameter */: + case 169 /* Parameter */: if (!useLegacyDecorators) return false; - return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 175 /* Constructor */ || parent2.kind === 173 /* MethodDeclaration */ || parent2.kind === 177 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 262 /* ClassDeclaration */; + return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 176 /* Constructor */ || parent2.kind === 174 /* MethodDeclaration */ || parent2.kind === 178 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 263 /* ClassDeclaration */; } return false; } @@ -16893,13 +16972,13 @@ function nodeOrChildIsDecorated(useLegacyDecorators, node, parent2, grandparent) } function childIsDecorated(useLegacyDecorators, node, parent2) { switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent2)); default: return false; @@ -16950,7 +17029,7 @@ function isEmptyStringLiteral(node) { } function isJSXTagName(node) { const { parent: parent2 } = node; - if (parent2.kind === 285 /* JsxOpeningElement */ || parent2.kind === 284 /* JsxSelfClosingElement */ || parent2.kind === 286 /* JsxClosingElement */) { + if (parent2.kind === 286 /* JsxOpeningElement */ || parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 287 /* JsxClosingElement */) { return parent2.tagName === node; } return false; @@ -16962,54 +17041,54 @@ function isExpressionNode(node) { case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: case 14 /* RegularExpressionLiteral */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 233 /* AsExpression */: - case 215 /* TypeAssertionExpression */: - case 237 /* SatisfiesExpression */: - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 220 /* TypeOfExpression */: - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: - case 225 /* BinaryExpression */: - case 226 /* ConditionalExpression */: - case 229 /* SpreadElement */: - case 227 /* TemplateExpression */: - case 231 /* OmittedExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: - case 228 /* YieldExpression */: - case 222 /* AwaitExpression */: - case 235 /* MetaProperty */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 234 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 238 /* SatisfiesExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 221 /* TypeOfExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 226 /* BinaryExpression */: + case 227 /* ConditionalExpression */: + case 230 /* SpreadElement */: + case 228 /* TemplateExpression */: + case 232 /* OmittedExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: + case 229 /* YieldExpression */: + case 223 /* AwaitExpression */: + case 236 /* MetaProperty */: return true; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); - case 165 /* QualifiedName */: - while (node.parent.kind === 165 /* QualifiedName */) { + case 166 /* QualifiedName */: + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 317 /* JSDocMemberName */: + return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 318 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); case 81 /* PrivateIdentifier */: return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 103 /* InKeyword */; case 80 /* Identifier */: - if (node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 9 /* NumericLiteral */: @@ -17025,64 +17104,64 @@ function isExpressionNode(node) { function isInExpressionContext(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 305 /* EnumMember */: - case 302 /* PropertyAssignment */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 306 /* EnumMember */: + case 303 /* PropertyAssignment */: + case 208 /* BindingElement */: return parent2.initializer === node; - case 243 /* ExpressionStatement */: - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 252 /* ReturnStatement */: - case 253 /* WithStatement */: - case 254 /* SwitchStatement */: - case 295 /* CaseClause */: - case 256 /* ThrowStatement */: + case 244 /* ExpressionStatement */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 253 /* ReturnStatement */: + case 254 /* WithStatement */: + case 255 /* SwitchStatement */: + case 296 /* CaseClause */: + case 257 /* ThrowStatement */: return parent2.expression === node; - case 247 /* ForStatement */: + case 248 /* ForStatement */: const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 260 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 260 /* VariableDeclarationList */ || forInStatement.expression === node; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInStatement.expression === node; + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return node === parent2.expression; - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return node === parent2.expression; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return node === parent2.expression; - case 169 /* Decorator */: - case 293 /* JsxExpression */: - case 292 /* JsxSpreadAttribute */: - case 304 /* SpreadAssignment */: + case 170 /* Decorator */: + case 294 /* JsxExpression */: + case 293 /* JsxSpreadAttribute */: + case 305 /* SpreadAssignment */: return true; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return parent2.expression === node && !isPartOfTypeNode(parent2); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return parent2.objectAssignmentInitializer === node; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return node === parent2.expression; default: return isExpressionNode(parent2); } } function isPartOfTypeQuery(node) { - while (node.kind === 165 /* QualifiedName */ || node.kind === 80 /* Identifier */) { + while (node.kind === 166 /* QualifiedName */ || node.kind === 80 /* Identifier */) { node = node.parent; } - return node.kind === 185 /* TypeQuery */; + return node.kind === 186 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 282 /* ExternalModuleReference */; + return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -17092,7 +17171,7 @@ function getExternalModuleRequireArgument(node) { return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 282 /* ExternalModuleReference */; + return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 283 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -17101,22 +17180,22 @@ function isSourceFileNotJS(file) { return !isInJSFile(file); } function isInJSFile(node) { - return !!node && !!(node.flags & 262144 /* JavaScriptFile */); + return !!node && !!(node.flags & 524288 /* JavaScriptFile */); } function isInJsonFile(node) { - return !!node && !!(node.flags & 67108864 /* JsonFile */); + return !!node && !!(node.flags & 134217728 /* JsonFile */); } function isSourceFileNotJson(file) { return !isJsonSourceFile(file); } function isInJSDoc(node) { - return !!node && !!(node.flags & 8388608 /* JSDoc */); + return !!node && !!(node.flags & 16777216 /* JSDoc */); } function isJSDocIndexSignature(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 154 /* StringKeyword */ || node.typeArguments[0].kind === 150 /* NumberKeyword */); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 212 /* CallExpression */) { + if (callExpression.kind !== 213 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -17193,9 +17272,9 @@ function getAssignedExpandoInitializer(node) { function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 217 /* FunctionExpression */ || e.kind === 218 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 217 /* FunctionExpression */ || initializer.kind === 230 /* ClassExpression */ || initializer.kind === 218 /* ArrowFunction */) { + if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 231 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -17386,11 +17465,11 @@ function isPrototypePropertyAssignment(node) { return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 243 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 244 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; - if (!valueDeclaration || !(node.flags & 16777216 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 16777216 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) { + if (!valueDeclaration || !(node.flags & 33554432 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 33554432 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) { symbol.valueDeclaration = node; } } @@ -17399,29 +17478,29 @@ function isFunctionSymbol(symbol) { return false; } const decl = symbol.valueDeclaration; - return decl.kind === 261 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 262 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a, _b; switch (node.kind) { - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: return (_a = findAncestor(node.initializer, (node2) => isRequireCall( node2, /*requireStringLiteralLikeArgument*/ true ))) == null ? void 0 : _a.arguments[0]; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); - case 272 /* ImportClause */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 280 /* NamespaceExport */: return tryCast(node.parent.moduleSpecifier, isStringLiteralLike); - case 273 /* NamespaceImport */: - case 280 /* ExportSpecifier */: + case 274 /* NamespaceImport */: + case 281 /* ExportSpecifier */: return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); default: Debug.assertNever(node); @@ -17432,18 +17511,18 @@ function importFromModuleSpecifier(node) { } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: return node.parent; - case 282 /* ExternalModuleReference */: + case 283 /* ExternalModuleReference */: return node.parent.parent; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return isImportCall(node.parent) || isRequireCall( node.parent, /*requireStringLiteralLikeArgument*/ false ) ? node.parent : void 0; - case 200 /* LiteralType */: + case 201 /* LiteralType */: Debug.assert(isStringLiteral(node)); return tryCast(node.parent.parent, isImportTypeNode); default: @@ -17452,16 +17531,16 @@ function tryGetImportFromModuleSpecifier(node) { } function getExternalModuleName(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: return node.moduleSpecifier; - case 270 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 282 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 204 /* ImportType */: + case 271 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 283 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 205 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return node.arguments[0]; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return node.name.kind === 11 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -17469,18 +17548,18 @@ function getExternalModuleName(node) { } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return node; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 271 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 272 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -17497,13 +17576,13 @@ function forEachImportClauseDeclaration(node, action) { function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 168 /* Parameter */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 303 /* ShorthandPropertyAssignment */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 169 /* Parameter */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 304 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -17515,7 +17594,7 @@ function isJSDocConstructSignature(node) { return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 352 /* JSDocTypedefTag */ || node.kind === 344 /* JSDocCallbackTag */ || node.kind === 346 /* JSDocEnumTag */; + return node.kind === 353 /* JSDocTypedefTag */ || node.kind === 345 /* JSDocCallbackTag */ || node.kind === 347 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -17528,12 +17607,12 @@ function getSourceOfDefaultedAssignment(node) { } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return node.initializer; } } @@ -17541,26 +17620,26 @@ function getSingleVariableOfVariableStatement(node) { return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 266 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 267 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveFlowNode(node) { - if (node.kind >= 242 /* FirstStatement */ && node.kind <= 258 /* LastStatement */) { + if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */) { return true; } switch (node.kind) { case 80 /* Identifier */: case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 165 /* QualifiedName */: - case 235 /* MetaProperty */: - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: - case 207 /* BindingElement */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 166 /* QualifiedName */: + case 236 /* MetaProperty */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 208 /* BindingElement */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -17568,72 +17647,72 @@ function canHaveFlowNode(node) { } function canHaveJSDoc(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 240 /* Block */: - case 251 /* BreakStatement */: - case 178 /* CallSignature */: - case 295 /* CaseClause */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 174 /* ClassStaticBlockDeclaration */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 250 /* ContinueStatement */: - case 258 /* DebuggerStatement */: - case 245 /* DoStatement */: - case 211 /* ElementAccessExpression */: - case 241 /* EmptyStatement */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 241 /* Block */: + case 252 /* BreakStatement */: + case 179 /* CallSignature */: + case 296 /* CaseClause */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 175 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 251 /* ContinueStatement */: + case 259 /* DebuggerStatement */: + case 246 /* DoStatement */: + case 212 /* ElementAccessExpression */: + case 242 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: - case 280 /* ExportSpecifier */: - case 243 /* ExpressionStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: + case 281 /* ExportSpecifier */: + case 244 /* ExpressionStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: case 80 /* Identifier */: - case 244 /* IfStatement */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 255 /* LabeledStatement */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 201 /* NamedTupleMember */: - case 269 /* NamespaceExportDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 168 /* Parameter */: - case 216 /* ParenthesizedExpression */: - case 210 /* PropertyAccessExpression */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 252 /* ReturnStatement */: - case 239 /* SemicolonClassElement */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: - case 254 /* SwitchStatement */: - case 256 /* ThrowStatement */: - case 257 /* TryStatement */: - case 264 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: - case 259 /* VariableDeclaration */: - case 242 /* VariableStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: + case 245 /* IfStatement */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 256 /* LabeledStatement */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 202 /* NamedTupleMember */: + case 270 /* NamespaceExportDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 169 /* Parameter */: + case 217 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 253 /* ReturnStatement */: + case 240 /* SemicolonClassElement */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: + case 255 /* SwitchStatement */: + case 257 /* ThrowStatement */: + case 258 /* TryStatement */: + case 265 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 260 /* VariableDeclaration */: + case 243 /* VariableStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: return true; default: return false; @@ -17649,11 +17728,11 @@ function getJSDocCommentsAndTags(hostNode, noCache) { if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -17673,7 +17752,7 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 302 /* PropertyAssignment */ || parent2.kind === 276 /* ExportAssignment */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 243 /* ExpressionStatement */ && node.kind === 210 /* PropertyAccessExpression */ || parent2.kind === 252 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { + if (parent2.kind === 303 /* PropertyAssignment */ || parent2.kind === 277 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { return parent2; } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */)) { return parent2.parent; @@ -17749,32 +17828,32 @@ function getAssignmentTargetKind(node) { let parent2 = node.parent; while (true) { switch (parent2.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const binaryOperator = parent2.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: const unaryOperator = parent2.operator; return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 216 /* ParenthesizedExpression */: - case 208 /* ArrayLiteralExpression */: - case 229 /* SpreadElement */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 209 /* ArrayLiteralExpression */: + case 230 /* SpreadElement */: + case 235 /* NonNullExpression */: node = parent2; break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: node = parent2.parent; break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { return 0 /* None */; } node = parent2.parent; break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (parent2.name === node) { return 0 /* None */; } @@ -17791,22 +17870,22 @@ function isAssignmentTarget(node) { } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 240 /* Block */: - case 242 /* VariableStatement */: - case 253 /* WithStatement */: - case 244 /* IfStatement */: - case 254 /* SwitchStatement */: - case 268 /* CaseBlock */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 255 /* LabeledStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 257 /* TryStatement */: - case 298 /* CatchClause */: + case 241 /* Block */: + case 243 /* VariableStatement */: + case 254 /* WithStatement */: + case 245 /* IfStatement */: + case 255 /* SwitchStatement */: + case 269 /* CaseBlock */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 256 /* LabeledStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 258 /* TryStatement */: + case 299 /* CatchClause */: return true; } return false; @@ -17821,14 +17900,14 @@ function walkUp(node, kind) { return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 195 /* ParenthesizedType */); + return walkUp(node, 196 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 216 /* ParenthesizedExpression */); + return walkUp(node, 217 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 195 /* ParenthesizedType */) { + while (node && node.kind === 196 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -17844,11 +17923,11 @@ function skipParentheses(node, excludeJSDocTypeAssertions) { return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 210 /* PropertyAccessExpression */ && node.kind !== 211 /* ElementAccessExpression */) { + if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 219 /* DeleteExpression */; + return node && node.kind === 220 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -17886,55 +17965,55 @@ function getDeclarationFromName(name) { } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent2 = node.parent; switch (parent2.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 305 /* EnumMember */: - case 302 /* PropertyAssignment */: - case 210 /* PropertyAccessExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 306 /* EnumMember */: + case 303 /* PropertyAssignment */: + case 211 /* PropertyAccessExpression */: return parent2.name === node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return parent2.right === node; - case 207 /* BindingElement */: - case 275 /* ImportSpecifier */: + case 208 /* BindingElement */: + case 276 /* ImportSpecifier */: return parent2.propertyName === node; - case 280 /* ExportSpecifier */: - case 290 /* JsxAttribute */: - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: + case 281 /* ExportSpecifier */: + case 291 /* JsxAttribute */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: return true; } return false; } function isAliasSymbolDeclaration(node) { - if (node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 269 /* NamespaceExportDeclaration */ || node.kind === 272 /* ImportClause */ && !!node.name || node.kind === 273 /* NamespaceImport */ || node.kind === 279 /* NamespaceExport */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 280 /* ExportSpecifier */ || node.kind === 276 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { + if (node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { return true; } return isInJSFile(node) && (isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isPropertyAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableExpression(node.parent.right)); } function getAliasDeclarationFromName(node) { switch (node.parent.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 273 /* NamespaceImport */: - case 280 /* ExportSpecifier */: - case 276 /* ExportAssignment */: - case 270 /* ImportEqualsDeclaration */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 274 /* NamespaceImport */: + case 281 /* ExportSpecifier */: + case 277 /* ExportAssignment */: + case 271 /* ImportEqualsDeclaration */: + case 280 /* NamespaceExport */: return node.parent; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 165 /* QualifiedName */); + } while (node.parent.kind === 166 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -17949,7 +18028,7 @@ function getExportAssignmentExpression(node) { return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 303 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 302 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 304 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 303 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -18000,7 +18079,7 @@ function getAncestor(node, kind) { return void 0; } function isKeyword(token) { - return 83 /* FirstKeyword */ <= token && token <= 164 /* LastKeyword */; + return 83 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; } function isPunctuation(token) { return 19 /* FirstPunctuation */ <= token && token <= 79 /* LastPunctuation */; @@ -18009,7 +18088,7 @@ function isKeywordOrPunctuation(token) { return isKeyword(token) || isPunctuation(token); } function isContextualKeyword(token) { - return 128 /* FirstContextualKeyword */ <= token && token <= 164 /* LastContextualKeyword */; + return 128 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); @@ -18046,13 +18125,13 @@ function getFunctionFlags(node) { } let flags = 0 /* Normal */; switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -18065,10 +18144,10 @@ function getFunctionFlags(node) { } function isAsyncFunction(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -18084,7 +18163,7 @@ function hasDynamicName(declaration) { return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 166 /* ComputedPropertyName */ || name.kind === 211 /* ElementAccessExpression */)) { + if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -18098,7 +18177,7 @@ function getPropertyNameForPropertyNameNode(name) { case 11 /* StringLiteral */: case 9 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -18109,7 +18188,7 @@ function getPropertyNameForPropertyNameNode(name) { return nameExpression.operand.text; } return void 0; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -18153,13 +18232,17 @@ function isProtoSetter(node) { function isAnonymousFunctionDefinition(node, cb) { node = skipOuterExpressions(node); switch (node.kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 231 /* ClassExpression */: + if (classHasDeclaredOrExplicitlyAssignedName(node)) { + return false; + } + break; + case 218 /* FunctionExpression */: if (node.name) { return false; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: break; default: return false; @@ -18168,19 +18251,19 @@ function isAnonymousFunctionDefinition(node, cb) { } function isNamedEvaluationSource(node) { switch (node.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return !isProtoSetter(node.name); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return !!node.objectAssignmentInitializer; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return isIdentifier(node.name) && !!node.initializer; - case 168 /* Parameter */: + case 169 /* Parameter */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return !!node.initializer; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 77 /* AmpersandAmpersandEqualsToken */: @@ -18189,7 +18272,7 @@ function isNamedEvaluationSource(node) { return isIdentifier(node.left); } break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return true; } return false; @@ -18198,18 +18281,18 @@ function isNamedEvaluation(node, cb) { if (!isNamedEvaluationSource(node)) return false; switch (node.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb); - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isAnonymousFunctionDefinition(node.right, cb); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return isAnonymousFunctionDefinition(node.expression, cb); } } @@ -18218,17 +18301,17 @@ function isPushOrUnshiftIdentifier(node) { } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 168 /* Parameter */; + return root.kind === 169 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 207 /* BindingElement */) { + while (node.kind === 208 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 217 /* FunctionExpression */ || kind === 261 /* FunctionDeclaration */ || kind === 218 /* ArrowFunction */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 266 /* ModuleDeclaration */ || kind === 311 /* SourceFile */; + return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 262 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 267 /* ModuleDeclaration */ || kind === 312 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); @@ -18243,22 +18326,22 @@ var Associativity = /* @__PURE__ */ ((Associativity2) => { })(Associativity || {}); function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 213 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 213 /* NewExpression */: + case 214 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 223 /* PrefixUnaryExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 222 /* AwaitExpression */: - case 226 /* ConditionalExpression */: - case 228 /* YieldExpression */: + case 224 /* PrefixUnaryExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 223 /* AwaitExpression */: + case 227 /* ConditionalExpression */: + case 229 /* YieldExpression */: return 1 /* Right */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (operator) { case 43 /* AsteriskAsteriskToken */: case 64 /* EqualsToken */: @@ -18284,13 +18367,13 @@ function getOperatorAssociativity(kind, operator, hasArguments) { } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 213 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 225 /* BinaryExpression */) { + if (expression.kind === 226 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 223 /* PrefixUnaryExpression */ || expression.kind === 224 /* PostfixUnaryExpression */) { + } else if (expression.kind === 224 /* PrefixUnaryExpression */ || expression.kind === 225 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -18326,15 +18409,15 @@ var OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => { })(OperatorPrecedence || {}); function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return 0 /* Comma */; - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return 1 /* Spread */; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return 2 /* Yield */; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return 4 /* Conditional */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (operatorKind) { case 28 /* CommaToken */: return 0 /* Comma */; @@ -18358,27 +18441,27 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { default: return getBinaryOperatorPrecedence(operatorKind); } - case 215 /* TypeAssertionExpression */: - case 234 /* NonNullExpression */: - case 223 /* PrefixUnaryExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 222 /* AwaitExpression */: + case 216 /* TypeAssertionExpression */: + case 235 /* NonNullExpression */: + case 224 /* PrefixUnaryExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 223 /* AwaitExpression */: return 16 /* Unary */; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return 17 /* Update */; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return 18 /* LeftHandSide */; - case 213 /* NewExpression */: + case 214 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 214 /* TaggedTemplateExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 235 /* MetaProperty */: + case 215 /* TaggedTemplateExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 236 /* MetaProperty */: return 19 /* Member */; - case 233 /* AsExpression */: - case 237 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 238 /* SatisfiesExpression */: return 11 /* Relational */; case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: @@ -18390,19 +18473,19 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 230 /* ClassExpression */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 231 /* ClassExpression */: case 14 /* RegularExpressionLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: - case 216 /* ParenthesizedExpression */: - case 231 /* OmittedExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: + case 228 /* TemplateExpression */: + case 217 /* ParenthesizedExpression */: + case 232 /* OmittedExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -18455,7 +18538,7 @@ function getBinaryOperatorPrecedence(kind) { function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return !!i.expression; case 12 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -18532,9 +18615,9 @@ function escapeTemplateSubstitution(str) { function hasInvalidEscape(template) { return template && !!(isNoSubstitutionTemplateLiteral(template) ? template.templateFlags : template.head.templateFlags || some(template.templateSpans, (span) => !!span.literal.templateFlags)); } -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 = /\r\n|[\\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; +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 = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; var escapedCharsMap = new Map(Object.entries({ " ": "\\t", "\v": "\\v", @@ -18579,8 +18662,8 @@ function escapeNonAsciiString(s, quoteChar) { s = escapeString(s, quoteChar); return nonAsciiCharacters.test(s) ? s.replace(nonAsciiCharacters, (c) => encodeUtf16EscapeSequence(c.charCodeAt(0))) : s; } -var jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g; -var jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g; +var jsxDoubleQuoteEscapedCharsRegExp = /["\u0000-\u001f\u2028\u2029\u0085]/g; +var jsxSingleQuoteEscapedCharsRegExp = /['\u0000-\u001f\u2028\u2029\u0085]/g; var jsxEscapedCharsMap = new Map(Object.entries({ '"': """, "'": "'" @@ -18956,6 +19039,12 @@ function parameterIsThisKeyword(parameter) { function isThisIdentifier(node) { return !!node && node.kind === 80 /* Identifier */ && identifierIsThisKeyword(node); } +function isInTypeQuery(node) { + return !!findAncestor( + node, + (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit" + ); +} function isThisInTypeQuery(node) { if (!isThisIdentifier(node)) { return false; @@ -18963,7 +19052,7 @@ function isThisInTypeQuery(node) { while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */; + return node.parent.kind === 186 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.escapedText === "this"; @@ -18975,9 +19064,9 @@ function getAllAccessorDeclarations(declarations, accessor) { let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 176 /* GetAccessor */) { + if (accessor.kind === 177 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 177 /* SetAccessor */) { + } else if (accessor.kind === 178 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -18993,10 +19082,10 @@ function getAllAccessorDeclarations(declarations, accessor) { } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 176 /* GetAccessor */ && !getAccessor) { + if (member.kind === 177 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 177 /* SetAccessor */ && !setAccessor) { + if (member.kind === 178 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -19028,7 +19117,7 @@ function getJSDocTypeParameterDeclarations(node) { return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 326 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 327 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -19218,7 +19307,7 @@ function getSelectedSyntacticModifierFlags(node, flags) { return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 164 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -19277,7 +19366,7 @@ function getEffectiveModifierFlagsNoCache(node) { } function getSyntacticModifierFlagsNoCache(node) { let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */; - if (node.flags & 4 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { flags |= 1 /* Export */; } return flags; @@ -19317,13 +19406,13 @@ function modifierToFlag(token) { return 512 /* Async */; case 148 /* ReadonlyKeyword */: return 64 /* Readonly */; - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return 16384 /* Override */; case 103 /* InKeyword */: return 32768 /* In */; case 147 /* OutKeyword */: return 65536 /* Out */; - case 169 /* Decorator */: + case 170 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -19380,7 +19469,7 @@ function isDestructuringAssignment(node) { true )) { const kind = node.left.kind; - return kind === 209 /* ObjectLiteralExpression */ || kind === 208 /* ArrayLiteralExpression */; + return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; } return false; } @@ -19394,12 +19483,12 @@ function getFirstIdentifier(node) { switch (node.kind) { case 80 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 80 /* Identifier */); return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 80 /* Identifier */); @@ -19407,7 +19496,7 @@ function getFirstIdentifier(node) { } } function isDottedName(node) { - return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 235 /* MetaProperty */ || node.kind === 210 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 216 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 236 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -19434,7 +19523,7 @@ function isPrototypeAccess(node) { return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; @@ -19443,10 +19532,10 @@ function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } function isEmptyObjectLiteral(expression) { - return expression.kind === 209 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 208 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -19715,8 +19804,8 @@ function isDeclarationNameOfEnumOrNamespace(node) { const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 265 /* EnumDeclaration */: - case 266 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -19769,24 +19858,24 @@ function isWriteAccess(node) { function accessKind(node) { const { parent: parent2 } = node; switch (parent2 == null ? void 0 : parent2.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return accessKind(parent2); - case 224 /* PostfixUnaryExpression */: - case 223 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const { operator } = parent2; return operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const { left, operatorToken } = parent2; return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 64 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 302 /* PropertyAssignment */: { + case 303 /* PropertyAssignment */: { const parentAccess = accessKind(parent2.parent); return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return accessKind(parent2); default: return 0 /* Read */; @@ -19899,16 +19988,16 @@ function isObjectTypeDeclaration(node) { return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 181 /* FirstTypeNode */ && kind <= 204 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 232 /* ExpressionWithTypeArguments */ || kind === 318 /* JSDocAllType */ || kind === 319 /* JSDocUnknownType */ || kind === 320 /* JSDocNullableType */ || kind === 321 /* JSDocNonNullableType */ || kind === 322 /* JSDocOptionalType */ || kind === 323 /* JSDocFunctionType */ || kind === 324 /* JSDocVariadicType */; + return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 163 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 233 /* ExpressionWithTypeArguments */ || kind === 319 /* JSDocAllType */ || kind === 320 /* JSDocUnknownType */ || kind === 321 /* JSDocNullableType */ || kind === 322 /* JSDocNonNullableType */ || kind === 323 /* JSDocOptionalType */ || kind === 324 /* JSDocFunctionType */ || kind === 325 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 210 /* PropertyAccessExpression */ || node.kind === 211 /* ElementAccessExpression */; + return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 210 /* PropertyAccessExpression */) { + if (node.kind === 211 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 211 /* ElementAccessExpression */); + Debug.assert(node.kind === 212 /* ElementAccessExpression */); return node.argumentExpression; } function isBundleFileTextLike(section) { @@ -19921,7 +20010,7 @@ function isBundleFileTextLike(section) { } } function isNamedImportsOrExports(node) { - return node.kind === 274 /* NamedImports */ || node.kind === 278 /* NamedExports */; + return node.kind === 275 /* NamedImports */ || node.kind === 279 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -19934,12 +20023,12 @@ function forEachNameInAccessChainWalkingLeft(name, action) { return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 210 /* PropertyAccessExpression */) { + if (access.kind === 211 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 211 /* ElementAccessExpression */) { + } else if (access.kind === 212 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -19961,28 +20050,28 @@ function forEachNameInAccessChainWalkingLeft(name, action) { function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: node = node.operand; continue; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: node = node.left; continue; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: node = node.condition; continue; - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: node = node.tag; continue; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 233 /* AsExpression */: - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: - case 234 /* NonNullExpression */: - case 359 /* PartiallyEmittedExpression */: - case 237 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 235 /* NonNullExpression */: + case 360 /* PartiallyEmittedExpression */: + case 238 /* SatisfiesExpression */: node = node.expression; continue; } @@ -20453,6 +20542,9 @@ function getAllowJSCompilerOption(compilerOptions) { function getUseDefineForClassFields(compilerOptions) { return compilerOptions.useDefineForClassFields === void 0 ? getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ : compilerOptions.useDefineForClassFields; } +function getEmitStandardClassFields(compilerOptions) { + return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */; +} function compilerOptionsAffectSemanticDiagnostics(newOptions, oldOptions) { return optionsHaveChanges(oldOptions, newOptions, semanticDiagnosticsOptionDeclarations); } @@ -20557,7 +20649,7 @@ function tryRemoveDirectoryPrefix(path, dirPath, getCanonicalFileName) { const withoutPrefix = tryRemovePrefix(path, dirPath, getCanonicalFileName); return withoutPrefix === void 0 ? void 0 : stripLeadingDirectorySeparator(withoutPrefix); } -var reservedCharacterPattern = /[^\w\s\/]/g; +var reservedCharacterPattern = /[^\w\s/]/g; function regExpEscape(text) { return text.replace(reservedCharacterPattern, escapeRegExpCharacter); } @@ -20676,7 +20768,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm function replaceWildcardCharacter(match, singleAsteriskRegexFragment) { return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match; } -function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { +function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) { path = normalizePath(path); currentDirectory = normalizePath(currentDirectory); const absolutePath = combinePaths(currentDirectory, path); @@ -20685,22 +20777,22 @@ function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNa includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"), excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"), - basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames) + basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2) }; } -function getRegexFromPattern(pattern, useCaseSensitiveFileNames) { - return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i"); +function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) { + return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i"); } -function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) { +function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) { path = normalizePath(path); currentDirectory = normalizePath(currentDirectory); - const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory); - const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames)); - const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames); - const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames); + const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory); + const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2)); + const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2); + const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2); const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]]; const visited = /* @__PURE__ */ new Map(); - const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames); + const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2); for (const basePath of patterns.basePaths) { visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); } @@ -20742,7 +20834,7 @@ function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNa } } } -function getBasePaths(path, includes, useCaseSensitiveFileNames) { +function getBasePaths(path, includes, useCaseSensitiveFileNames2) { const basePaths = [path]; if (includes) { const includeBasePaths = []; @@ -20750,9 +20842,9 @@ function getBasePaths(path, includes, useCaseSensitiveFileNames) { const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include)); includeBasePaths.push(getIncludeBasePath(absolute)); } - includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames)); + includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2)); for (const includeBasePath of includeBasePaths) { - if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames))) { + if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) { basePaths.push(includeBasePath); } } @@ -21134,39 +21226,39 @@ function isValidBigIntString(s, roundTripOnly) { return success && result === 10 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); } function isValidTypeOnlyAliasUseSite(useSite) { - return !!(useSite.flags & 16777216 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); + return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); } function isShorthandPropertyNameUseSite(useSite) { return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 80 /* Identifier */ || node.kind === 210 /* PropertyAccessExpression */) { + while (node.kind === 80 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 263 /* InterfaceDeclaration */ || containerKind === 186 /* TypeLiteral */; + return containerKind === 264 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 80 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent2) => { switch (parent2.kind) { - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return true; - case 210 /* PropertyAccessExpression */: - case 232 /* ExpressionWithTypeArguments */: + case 211 /* PropertyAccessExpression */: + case 233 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 263 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 264 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -21278,20 +21370,20 @@ function getContainingNodeArray(node) { if (!node.parent) return void 0; switch (node.kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: const { parent: parent3 } = node; - return parent3.kind === 194 /* InferType */ ? void 0 : parent3.typeParameters; - case 168 /* Parameter */: + return parent3.kind === 195 /* InferType */ ? void 0 : parent3.typeParameters; + case 169 /* Parameter */: return node.parent.parameters; - case 203 /* TemplateLiteralTypeSpan */: + case 204 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return node.parent.templateSpans; - case 169 /* Decorator */: { + case 170 /* Decorator */: { const { parent: parent4 } = node; return canHaveDecorators(parent4) ? parent4.modifiers : void 0; } - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return node.parent.heritageClauses; } const { parent: parent2 } = node; @@ -21299,43 +21391,43 @@ function getContainingNodeArray(node) { return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent2.kind) { - case 186 /* TypeLiteral */: - case 263 /* InterfaceDeclaration */: + case 187 /* TypeLiteral */: + case 264 /* InterfaceDeclaration */: return isTypeElement(node) ? parent2.members : void 0; - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return parent2.types; - case 188 /* TupleType */: - case 208 /* ArrayLiteralExpression */: - case 360 /* CommaListExpression */: - case 274 /* NamedImports */: - case 278 /* NamedExports */: + case 189 /* TupleType */: + case 209 /* ArrayLiteralExpression */: + case 361 /* CommaListExpression */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: return parent2.elements; - case 209 /* ObjectLiteralExpression */: - case 291 /* JsxAttributes */: + case 210 /* ObjectLiteralExpression */: + case 292 /* JsxAttributes */: return parent2.properties; - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 283 /* JsxElement */: - case 287 /* JsxFragment */: + case 284 /* JsxElement */: + case 288 /* JsxFragment */: return isJsxChild(node) ? parent2.children : void 0; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent2.typeArguments : void 0; - case 240 /* Block */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 268 /* ModuleBlock */: return parent2.statements; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return parent2.clauses; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return isClassElement(node) ? parent2.members : void 0; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return isEnumMember(node) ? parent2.members : void 0; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return parent2.statements; } } @@ -21344,7 +21436,7 @@ function hasContextSensitiveParameters(node) { if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 218 /* ArrowFunction */) { + if (node.kind !== 219 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -21357,14 +21449,14 @@ function isInfinityOrNaNString(name) { return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 259 /* VariableDeclaration */ && node.parent.kind === 298 /* CatchClause */; + return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 217 /* FunctionExpression */ || node.kind === 218 /* ArrowFunction */; + return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */; } function escapeSnippetText(text) { return text.replace(/\$/gm, () => "\\$"); @@ -21427,23 +21519,23 @@ function getNodeModulePathParts(fullPath) { } function getParameterTypeNode(parameter) { var _a; - return parameter.kind === 347 /* JSDocParameterTag */ ? (_a = parameter.typeExpression) == null ? void 0 : _a.type : parameter.type; + return parameter.kind === 348 /* JSDocParameterTag */ ? (_a = parameter.typeExpression) == null ? void 0 : _a.type : parameter.type; } function isTypeDeclaration(node) { switch (node.kind) { - case 167 /* TypeParameter */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 168 /* TypeParameter */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return true; - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.isTypeOnly; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -21457,7 +21549,7 @@ function isOptionalJSDocPropertyLikeTag(node) { return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 322 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 323 /* JSDocOptionalType */; } function canUsePropertyAccess(name, languageVersion) { if (name.length === 0) { @@ -21472,17 +21564,17 @@ function hasTabstop(node) { } function isJSDocOptionalParameter(node) { return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType - (node.type && node.type.kind === 322 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 322 /* JSDocOptionalType */)); + (node.type && node.type.kind === 323 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 323 /* JSDocOptionalType */)); } function isOptionalDeclaration(declaration) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !!declaration.questionToken; - case 168 /* Parameter */: + case 169 /* Parameter */: return !!declaration.questionToken || isJSDocOptionalParameter(declaration); - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: return isOptionalJSDocPropertyLikeTag(declaration); default: return false; @@ -21490,7 +21582,7 @@ function isOptionalDeclaration(declaration) { } function isNonNullAccess(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && isNonNullExpression(node.expression); + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && isNonNullExpression(node.expression); } function isJSDocSatisfiesExpression(node) { return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); @@ -21510,7 +21602,7 @@ function getTextOfJsxAttributeName(node) { } function isJsxAttributeName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 294 /* JsxNamespacedName */; + return kind === 80 /* Identifier */ || kind === 295 /* JsxNamespacedName */; } function getEscapedTextOfJsxNamespacedName(node) { return `${node.namespace.escapedText}:${idText(node.name)}`; @@ -21521,6 +21613,18 @@ function getTextOfJsxNamespacedName(node) { function intrinsicTagNameToString(node) { return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node); } +function isTypeUsableAsPropertyName(type) { + return !!(type.flags & 8576 /* StringOrNumberLiteralOrUnique */); +} +function getPropertyNameFromType(type) { + if (type.flags & 8192 /* UniqueESSymbol */) { + return type.escapedName; + } + if (type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { + return escapeLeadingUnderscores("" + type.value); + } + return Debug.fail(); +} // src/compiler/factory/baseNodeFactory.ts function createBaseNodeFactory() { @@ -21643,16 +21747,16 @@ function createParenthesizerRules(factory2) { return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(225 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(225 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(226 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 218 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 228 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 229 /* YieldExpression */) { return false; } return true; @@ -21686,7 +21790,7 @@ function createParenthesizerRules(factory2) { if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { + if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -21699,7 +21803,7 @@ function createParenthesizerRules(factory2) { } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 216 /* ParenthesizedExpression */) { + if (skipped.kind === 217 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -21725,7 +21829,7 @@ function createParenthesizerRules(factory2) { return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(226 /* ConditionalExpression */, 58 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(227 /* ConditionalExpression */, 58 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -21746,8 +21850,8 @@ function createParenthesizerRules(factory2) { /*stopAtCallExpressions*/ false ).kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: needsParens = true; } } @@ -21760,16 +21864,16 @@ function createParenthesizerRules(factory2) { true ); switch (leftmostExpr.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 213 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -21787,7 +21891,7 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(225 /* BinaryExpression */, 28 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, 28 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -21795,7 +21899,7 @@ function createParenthesizerRules(factory2) { if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 217 /* FunctionExpression */ || kind === 218 /* ArrowFunction */) { + if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -21810,7 +21914,7 @@ function createParenthesizerRules(factory2) { /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 209 /* ObjectLiteralExpression */ || leftmostExpressionKind === 217 /* FunctionExpression */) { + if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -21820,31 +21924,31 @@ function createParenthesizerRules(factory2) { body, /*stopAtCallExpressions*/ false - ).kind === 209 /* ObjectLiteralExpression */)) { + ).kind === 210 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 193 /* ConditionalType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 194 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -21854,8 +21958,8 @@ function createParenthesizerRules(factory2) { } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -21865,23 +21969,23 @@ function createParenthesizerRules(factory2) { } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 194 /* InferType */: - case 197 /* TypeOperator */: - case 185 /* TypeQuery */: + case 195 /* InferType */: + case 198 /* TypeOperator */: + case 186 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -21966,6 +22070,7 @@ function createNodeConverters(factory2) { return { convertToFunctionBlock, convertToFunctionExpression, + convertToClassExpression, convertToArrayAssignmentElement, convertToObjectAssignmentElement, convertToAssignmentPattern, @@ -21983,10 +22088,11 @@ function createNodeConverters(factory2) { return body; } function convertToFunctionExpression(node) { + var _a; if (!node.body) return Debug.fail(`Cannot convert a FunctionDeclaration without a body`); const updated = factory2.createFunctionExpression( - getModifiers(node), + (_a = getModifiers(node)) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), node.asteriskToken, node.name, node.typeParameters, @@ -22005,6 +22111,26 @@ function createNodeConverters(factory2) { } return updated; } + function convertToClassExpression(node) { + var _a; + const updated = factory2.createClassExpression( + (_a = node.modifiers) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), + node.name, + node.typeParameters, + node.heritageClauses, + node.members + ); + setOriginalNode(updated, node); + setTextRange(updated, node); + if (getStartsOnNewLine(node)) { + setStartsOnNewLine( + updated, + /*newLine*/ + true + ); + } + return updated; + } function convertToArrayAssignmentElement(element) { if (isBindingElement(element)) { if (element.dotDotDotToken) { @@ -22039,11 +22165,11 @@ function createNodeConverters(factory2) { } function convertToAssignmentPattern(node) { switch (node.kind) { - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 205 /* ObjectBindingPattern */: - case 209 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 210 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -22081,6 +22207,7 @@ function createNodeConverters(factory2) { var nullNodeConverters = { convertToFunctionBlock: notImplemented, convertToFunctionExpression: notImplemented, + convertToClassExpression: notImplemented, convertToArrayAssignmentElement: notImplemented, convertToObjectAssignmentElement: notImplemented, convertToAssignmentPattern: notImplemented, @@ -22401,40 +22528,40 @@ function createNodeFactory(flags, baseFactory2) { updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(318 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(319 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(319 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(320 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(322 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(322 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(320 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(320 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(322 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(323 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(322 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(323 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(324 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(325 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(324 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(325 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(326 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(326 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -22474,82 +22601,82 @@ function createNodeFactory(flags, baseFactory2) { updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(348 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(349 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(349 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(350 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(339 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(339 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(340 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(340 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(341 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(341 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(342 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(342 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(343 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(343 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(344 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(344 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(355 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(356 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(355 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(356 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(357 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(357 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -22724,6 +22851,7 @@ function createNodeFactory(flags, baseFactory2) { createExportDefault, createExternalModuleExport, createTypeCheck, + createIsNotTypeCheck, createMethodCall, createGlobalMethodCall, createFunctionBindCall, @@ -22755,7 +22883,8 @@ function createNodeFactory(flags, baseFactory2) { ensureUseStrict, liftToBlock, mergeLexicalEnvironment, - updateModifiers + updateModifiers, + updateModifierLike }; forEach(nodeFactoryPatchers, (fn) => fn(factory2)); return factory2; @@ -22913,11 +23042,11 @@ function createNodeFactory(flags, baseFactory2) { } const node = createBaseIdentifier(escapeLeadingUnderscores(text)); if (hasExtendedUnicodeEscape) - node.flags |= 128 /* IdentifierHasExtendedUnicodeEscape */; + node.flags |= 256 /* IdentifierHasExtendedUnicodeEscape */; if (node.escapedText === "await") { node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */; } - if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) { + if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { node.transformFlags |= 1024 /* ContainsES2015 */; } return node; @@ -23012,7 +23141,7 @@ function createNodeFactory(flags, baseFactory2) { return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 164 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* LastToken */, "Invalid token"); Debug.assert(token <= 15 /* FirstTemplateToken */ || token >= 18 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 9 /* FirstLiteralToken */ || token >= 15 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 80 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); @@ -23022,6 +23151,9 @@ function createNodeFactory(flags, baseFactory2) { case 134 /* AsyncKeyword */: transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; break; + case 160 /* UsingKeyword */: + transformFlags = 4 /* ContainsESNext */; + break; case 125 /* PublicKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: @@ -23031,12 +23163,12 @@ function createNodeFactory(flags, baseFactory2) { case 87 /* ConstKeyword */: case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 146 /* NeverKeyword */: case 151 /* ObjectKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 154 /* StringKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: @@ -23104,7 +23236,7 @@ function createNodeFactory(flags, baseFactory2) { if (flags2 & 32 /* Static */) result.push(createModifier(126 /* StaticKeyword */)); if (flags2 & 16384 /* Override */) - result.push(createModifier(163 /* OverrideKeyword */)); + result.push(createModifier(164 /* OverrideKeyword */)); if (flags2 & 64 /* Readonly */) result.push(createModifier(148 /* ReadonlyKeyword */)); if (flags2 & 128 /* Accessor */) @@ -23118,7 +23250,7 @@ function createNodeFactory(flags, baseFactory2) { return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(165 /* QualifiedName */); + const node = createBaseNode(166 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -23129,7 +23261,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(166 /* ComputedPropertyName */); + const node = createBaseNode(167 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -23138,7 +23270,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(167 /* TypeParameter */); + const node = createBaseDeclaration(168 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -23152,7 +23284,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.default !== defaultType ? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node) : node; } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { - const node = createBaseDeclaration(168 /* Parameter */); + const node = createBaseDeclaration(169 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -23171,7 +23303,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(169 /* Decorator */); + const node = createBaseNode(170 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -23184,7 +23316,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(170 /* PropertySignature */); + const node = createBaseDeclaration(171 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -23204,14 +23336,14 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(171 /* PropertyDeclaration */); + const node = createBaseDeclaration(172 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.type = type; node.initializer = asInitializer(initializer); - const isAmbient = node.flags & 16777216 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; + const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; node.jsDoc = void 0; return node; @@ -23220,7 +23352,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(172 /* MethodSignature */); + const node = createBaseDeclaration(173 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -23238,7 +23370,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(173 /* MethodDeclaration */); + const node = createBaseDeclaration(174 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -23275,7 +23407,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(174 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(175 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -23296,7 +23428,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(175 /* Constructor */); + const node = createBaseDeclaration(176 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; @@ -23322,7 +23454,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(176 /* GetAccessor */); + const node = createBaseDeclaration(177 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -23353,7 +23485,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(177 /* SetAccessor */); + const node = createBaseDeclaration(178 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -23385,7 +23517,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(178 /* CallSignature */); + const node = createBaseDeclaration(179 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -23400,7 +23532,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(179 /* ConstructSignature */); + const node = createBaseDeclaration(180 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -23415,7 +23547,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(180 /* IndexSignature */); + const node = createBaseDeclaration(181 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -23430,7 +23562,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(203 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -23443,7 +23575,7 @@ function createNodeFactory(flags, baseFactory2) { return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(181 /* TypePredicate */); + const node = createBaseNode(182 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -23454,7 +23586,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(182 /* TypeReference */); + const node = createBaseNode(183 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -23464,7 +23596,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(183 /* FunctionType */); + const node = createBaseDeclaration(184 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -23489,7 +23621,7 @@ function createNodeFactory(flags, baseFactory2) { return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(184 /* ConstructorType */); + const node = createBaseDeclaration(185 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -23520,7 +23652,7 @@ function createNodeFactory(flags, baseFactory2) { return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(185 /* TypeQuery */); + const node = createBaseNode(186 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -23530,7 +23662,7 @@ function createNodeFactory(flags, baseFactory2) { return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(186 /* TypeLiteral */); + const node = createBaseDeclaration(187 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23539,7 +23671,7 @@ function createNodeFactory(flags, baseFactory2) { return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(187 /* ArrayType */); + const node = createBaseNode(188 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23548,7 +23680,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(188 /* TupleType */); + const node = createBaseNode(189 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23557,7 +23689,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(201 /* NamedTupleMember */); + const node = createBaseDeclaration(202 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -23570,7 +23702,7 @@ function createNodeFactory(flags, baseFactory2) { return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(189 /* OptionalType */); + const node = createBaseNode(190 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23579,7 +23711,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(190 /* RestType */); + const node = createBaseNode(191 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23597,19 +23729,19 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(191 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(192 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(193 /* ConditionalType */); + const node = createBaseNode(194 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -23623,7 +23755,7 @@ function createNodeFactory(flags, baseFactory2) { return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(194 /* InferType */); + const node = createBaseNode(195 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23632,7 +23764,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(202 /* TemplateLiteralType */); + const node = createBaseNode(203 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -23642,7 +23774,7 @@ function createNodeFactory(flags, baseFactory2) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(204 /* ImportType */); + const node = createBaseNode(205 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -23655,7 +23787,7 @@ function createNodeFactory(flags, baseFactory2) { return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(195 /* ParenthesizedType */); + const node = createBaseNode(196 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23664,12 +23796,12 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(196 /* ThisType */); + const node = createBaseNode(197 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(197 /* TypeOperator */); + const node = createBaseNode(198 /* TypeOperator */); node.operator = operator; node.type = operator === 148 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -23679,7 +23811,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(198 /* IndexedAccessType */); + const node = createBaseNode(199 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -23689,7 +23821,7 @@ function createNodeFactory(flags, baseFactory2) { return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(199 /* MappedType */); + const node = createBaseDeclaration(200 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -23705,7 +23837,7 @@ function createNodeFactory(flags, baseFactory2) { return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(200 /* LiteralType */); + const node = createBaseNode(201 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -23714,7 +23846,7 @@ function createNodeFactory(flags, baseFactory2) { return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(205 /* ObjectBindingPattern */); + const node = createBaseNode(206 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -23726,7 +23858,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(206 /* ArrayBindingPattern */); + const node = createBaseNode(207 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -23735,7 +23867,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(207 /* BindingElement */); + const node = createBaseDeclaration(208 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -23748,7 +23880,7 @@ function createNodeFactory(flags, baseFactory2) { return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(208 /* ArrayLiteralExpression */); + const node = createBaseNode(209 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -23760,7 +23892,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(209 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(210 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -23771,7 +23903,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(210 /* PropertyAccessExpression */); + const node = createBaseDeclaration(211 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -23812,16 +23944,16 @@ function createNodeFactory(flags, baseFactory2) { questionDotToken, asName(name) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updatePropertyAccessChain(node, expression, questionDotToken, name) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(211 /* ElementAccessExpression */); + const node = createBaseDeclaration(212 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -23862,16 +23994,16 @@ function createNodeFactory(flags, baseFactory2) { questionDotToken, asExpression(index) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(212 /* CallExpression */); + const node = createBaseDeclaration(213 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -23919,16 +24051,16 @@ function createNodeFactory(flags, baseFactory2) { asNodeArray(typeArguments), parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updateCallChain(node, expression, questionDotToken, typeArguments, argumentsArray) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(213 /* NewExpression */); + const node = createBaseDeclaration(214 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -23942,7 +24074,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(214 /* TaggedTemplateExpression */); + const node = createBaseNode(215 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -23963,7 +24095,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(215 /* TypeAssertionExpression */); + const node = createBaseNode(216 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -23973,7 +24105,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(216 /* ParenthesizedExpression */); + const node = createBaseNode(217 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -23983,7 +24115,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(217 /* FunctionExpression */); + const node = createBaseDeclaration(218 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -24008,7 +24140,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(218 /* ArrowFunction */); + const node = createBaseDeclaration(219 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -24030,7 +24162,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(219 /* DeleteExpression */); + const node = createBaseNode(220 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -24039,7 +24171,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(220 /* TypeOfExpression */); + const node = createBaseNode(221 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -24048,7 +24180,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(221 /* VoidExpression */); + const node = createBaseNode(222 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -24057,7 +24189,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(222 /* AwaitExpression */); + const node = createBaseNode(223 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -24066,7 +24198,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(223 /* PrefixUnaryExpression */); + const node = createBaseNode(224 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -24079,7 +24211,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(224 /* PostfixUnaryExpression */); + const node = createBaseNode(225 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -24092,7 +24224,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(225 /* BinaryExpression */); + const node = createBaseDeclaration(226 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -24125,7 +24257,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(226 /* ConditionalExpression */); + const node = createBaseNode(227 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken ?? createToken(58 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -24138,7 +24270,7 @@ function createNodeFactory(flags, baseFactory2) { return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(227 /* TemplateExpression */); + const node = createBaseNode(228 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -24213,7 +24345,7 @@ function createNodeFactory(flags, baseFactory2) { } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(228 /* YieldExpression */); + const node = createBaseNode(229 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -24223,7 +24355,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(229 /* SpreadElement */); + const node = createBaseNode(230 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -24232,7 +24364,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(230 /* ClassExpression */); + const node = createBaseDeclaration(231 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -24246,10 +24378,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(231 /* OmittedExpression */); + return createBaseNode(232 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(232 /* ExpressionWithTypeArguments */); + const node = createBaseNode(233 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -24263,7 +24395,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(233 /* AsExpression */); + const node = createBaseNode(234 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -24273,7 +24405,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(234 /* NonNullExpression */); + const node = createBaseNode(235 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -24289,7 +24421,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(237 /* SatisfiesExpression */); + const node = createBaseNode(238 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -24299,8 +24431,8 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(234 /* NonNullExpression */); - node.flags |= 32 /* OptionalChain */; + const node = createBaseNode(235 /* NonNullExpression */); + node.flags |= 64 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -24310,11 +24442,11 @@ function createNodeFactory(flags, baseFactory2) { return node; } function updateNonNullChain(node, expression) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(235 /* MetaProperty */); + const node = createBaseNode(236 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -24335,7 +24467,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(238 /* TemplateSpan */); + const node = createBaseNode(239 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -24345,12 +24477,12 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(239 /* SemicolonClassElement */); + const node = createBaseNode(240 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(240 /* Block */); + const node = createBaseNode(241 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -24363,7 +24495,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(242 /* VariableStatement */); + const node = createBaseNode(243 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -24378,12 +24510,12 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(241 /* EmptyStatement */); + const node = createBaseNode(242 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(243 /* ExpressionStatement */); + const node = createBaseNode(244 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -24394,7 +24526,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(244 /* IfStatement */); + const node = createBaseNode(245 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -24407,7 +24539,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(245 /* DoStatement */); + const node = createBaseNode(246 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -24419,7 +24551,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(246 /* WhileStatement */); + const node = createBaseNode(247 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -24431,7 +24563,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(247 /* ForStatement */); + const node = createBaseNode(248 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -24447,7 +24579,7 @@ function createNodeFactory(flags, baseFactory2) { return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(248 /* ForInStatement */); + const node = createBaseNode(249 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -24462,7 +24594,7 @@ function createNodeFactory(flags, baseFactory2) { return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(249 /* ForOfStatement */); + const node = createBaseNode(250 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -24480,7 +24612,7 @@ function createNodeFactory(flags, baseFactory2) { return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(250 /* ContinueStatement */); + const node = createBaseNode(251 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -24491,7 +24623,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(251 /* BreakStatement */); + const node = createBaseNode(252 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -24502,7 +24634,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(252 /* ReturnStatement */); + const node = createBaseNode(253 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -24513,7 +24645,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(253 /* WithStatement */); + const node = createBaseNode(254 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -24525,7 +24657,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(254 /* SwitchStatement */); + const node = createBaseNode(255 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -24538,7 +24670,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(255 /* LabeledStatement */); + const node = createBaseNode(256 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -24550,7 +24682,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(256 /* ThrowStatement */); + const node = createBaseNode(257 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -24561,7 +24693,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(257 /* TryStatement */); + const node = createBaseNode(258 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -24574,13 +24706,13 @@ function createNodeFactory(flags, baseFactory2) { return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(258 /* DebuggerStatement */); + const node = createBaseNode(259 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { - const node = createBaseDeclaration(259 /* VariableDeclaration */); + const node = createBaseDeclaration(260 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -24593,20 +24725,23 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(260 /* VariableDeclarationList */); - node.flags |= flags2 & 3 /* BlockScoped */; + const node = createBaseNode(261 /* VariableDeclarationList */); + node.flags |= flags2 & 7 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - if (flags2 & 3 /* BlockScoped */) { + if (flags2 & 7 /* BlockScoped */) { node.transformFlags |= 1024 /* ContainsES2015 */ | 262144 /* ContainsBlockScopedBinding */; } + if (flags2 & 4 /* Using */) { + node.transformFlags |= 4 /* ContainsESNext */; + } return node; } function updateVariableDeclarationList(node, declarations) { return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(261 /* FunctionDeclaration */); + const node = createBaseDeclaration(262 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -24642,7 +24777,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(262 /* ClassDeclaration */); + const node = createBaseDeclaration(263 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -24663,7 +24798,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(263 /* InterfaceDeclaration */); + const node = createBaseDeclaration(264 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -24677,7 +24812,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(264 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(265 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -24692,7 +24827,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(265 /* EnumDeclaration */); + const node = createBaseDeclaration(266 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -24705,9 +24840,9 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(266 /* ModuleDeclaration */); + const node = createBaseDeclaration(267 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); - node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); + node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); node.name = name; node.body = body; if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { @@ -24725,7 +24860,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(267 /* ModuleBlock */); + const node = createBaseNode(268 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -24735,7 +24870,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(268 /* CaseBlock */); + const node = createBaseNode(269 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -24746,7 +24881,7 @@ function createNodeFactory(flags, baseFactory2) { return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(269 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(270 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -24763,7 +24898,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(270 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(271 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -24780,7 +24915,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(271 /* ImportDeclaration */); + const node = createBaseNode(272 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -24794,7 +24929,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(272 /* ImportClause */); + const node = createBaseDeclaration(273 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -24809,7 +24944,7 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(299 /* AssertClause */); + const node = createBaseNode(300 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -24819,7 +24954,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(300 /* AssertEntry */); + const node = createBaseNode(301 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -24829,7 +24964,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(301 /* ImportTypeAssertionContainer */); + const node = createBaseNode(302 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -24838,7 +24973,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(273 /* NamespaceImport */); + const node = createBaseDeclaration(274 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24848,7 +24983,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(279 /* NamespaceExport */); + const node = createBaseDeclaration(280 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 32 /* ContainsES2020 */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24858,7 +24993,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(274 /* NamedImports */); + const node = createBaseNode(275 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24868,7 +25003,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(275 /* ImportSpecifier */); + const node = createBaseDeclaration(276 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -24880,7 +25015,7 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment2(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(276 /* ExportAssignment */); + const node = createBaseDeclaration(277 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -24898,7 +25033,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(277 /* ExportDeclaration */); + const node = createBaseDeclaration(278 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -24921,7 +25056,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(278 /* NamedExports */); + const node = createBaseNode(279 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24931,7 +25066,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(280 /* ExportSpecifier */); + const node = createBaseNode(281 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -24944,12 +25079,12 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(281 /* MissingDeclaration */); + const node = createBaseDeclaration(282 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(282 /* ExternalModuleReference */); + const node = createBaseNode(283 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -24981,7 +25116,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(323 /* JSDocFunctionType */); + const node = createBaseDeclaration(324 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -24995,7 +25130,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(328 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(329 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -25004,7 +25139,7 @@ function createNodeFactory(flags, baseFactory2) { return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(315 /* JSDocTypeExpression */); + const node = createBaseNode(316 /* JSDocTypeExpression */); node.type = type; return node; } @@ -25012,7 +25147,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(329 /* JSDocSignature */); + const node = createBaseDeclaration(330 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -25041,7 +25176,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(351 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); + const node = createBaseJSDocTag(352 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -25050,7 +25185,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(352 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(353 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -25062,7 +25197,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(347 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(348 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -25073,7 +25208,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(354 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(355 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -25084,7 +25219,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(344 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(345 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -25096,7 +25231,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(345 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); + const node = createBaseJSDocTag(346 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -25104,7 +25239,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(334 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); + const node = createBaseJSDocTag(335 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); node.class = className; return node; } @@ -25112,12 +25247,12 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(335 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); + const node = createBaseJSDocTag(336 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(353 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); + const node = createBaseJSDocTag(354 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); node.name = name; return node; } @@ -25125,7 +25260,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(316 /* JSDocNameReference */); + const node = createBaseNode(317 /* JSDocNameReference */); node.name = name; return node; } @@ -25133,7 +25268,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(317 /* JSDocMemberName */); + const node = createBaseNode(318 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -25143,7 +25278,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(330 /* JSDocLink */); + const node = createBaseNode(331 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -25152,7 +25287,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(331 /* JSDocLinkCode */); + const node = createBaseNode(332 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -25161,7 +25296,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(332 /* JSDocLinkPlain */); + const node = createBaseNode(333 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -25188,14 +25323,14 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(333 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(334 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(346 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(346 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(347 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(347 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -25205,7 +25340,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(327 /* JSDocText */); + const node = createBaseNode(328 /* JSDocText */); node.text = text; return node; } @@ -25213,7 +25348,7 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(326 /* JSDoc */); + const node = createBaseNode(327 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -25222,7 +25357,7 @@ function createNodeFactory(flags, baseFactory2) { return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(283 /* JsxElement */); + const node = createBaseNode(284 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -25233,7 +25368,7 @@ function createNodeFactory(flags, baseFactory2) { return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(284 /* JsxSelfClosingElement */); + const node = createBaseNode(285 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -25247,7 +25382,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(285 /* JsxOpeningElement */); + const node = createBaseNode(286 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -25261,7 +25396,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(286 /* JsxClosingElement */); + const node = createBaseNode(287 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -25270,7 +25405,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(287 /* JsxFragment */); + const node = createBaseNode(288 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -25291,17 +25426,17 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(288 /* JsxOpeningFragment */); + const node = createBaseNode(289 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(289 /* JsxClosingFragment */); + const node = createBaseNode(290 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(290 /* JsxAttribute */); + const node = createBaseDeclaration(291 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -25311,7 +25446,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(291 /* JsxAttributes */); + const node = createBaseDeclaration(292 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -25320,7 +25455,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(292 /* JsxSpreadAttribute */); + const node = createBaseNode(293 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -25329,7 +25464,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(293 /* JsxExpression */); + const node = createBaseNode(294 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -25339,7 +25474,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createJsxNamespacedName(namespace, name) { - const node = createBaseNode(294 /* JsxNamespacedName */); + const node = createBaseNode(295 /* JsxNamespacedName */); node.namespace = namespace; node.name = name; node.transformFlags |= propagateChildFlags(node.namespace) | propagateChildFlags(node.name) | 2 /* ContainsJsx */; @@ -25349,7 +25484,7 @@ function createNodeFactory(flags, baseFactory2) { return node.namespace !== namespace || node.name !== name ? update(createJsxNamespacedName(namespace, name), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(295 /* CaseClause */); + const node = createBaseNode(296 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -25360,7 +25495,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(296 /* DefaultClause */); + const node = createBaseNode(297 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -25369,7 +25504,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(297 /* HeritageClause */); + const node = createBaseNode(298 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -25389,7 +25524,7 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(298 /* CatchClause */); + const node = createBaseNode(299 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -25401,7 +25536,7 @@ function createNodeFactory(flags, baseFactory2) { return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(302 /* PropertyAssignment */); + const node = createBaseDeclaration(303 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -25423,7 +25558,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(303 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(304 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -25447,7 +25582,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(304 /* SpreadAssignment */); + const node = createBaseDeclaration(305 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -25457,7 +25592,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(305 /* EnumMember */); + const node = createBaseDeclaration(306 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -25468,7 +25603,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(311 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -25538,7 +25673,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneRedirectedSourceFile(source) { const node = createRedirectedSourceFile(source.redirectInfo); - node.flags |= source.flags & ~8 /* Synthesized */; + node.flags |= source.flags & ~16 /* Synthesized */; node.fileName = source.fileName; node.path = source.path; node.resolvedPath = source.resolvedPath; @@ -25549,8 +25684,8 @@ function createNodeFactory(flags, baseFactory2) { return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(311 /* SourceFile */); - node.flags |= source.flags & ~8 /* Synthesized */; + const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); + node.flags |= source.flags & ~16 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { continue; @@ -25583,7 +25718,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(312 /* Bundle */); + const node = createBaseNode(313 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; @@ -25596,7 +25731,7 @@ function createNodeFactory(flags, baseFactory2) { return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(313 /* UnparsedSource */); + const node = createBaseNode(314 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -25613,48 +25748,48 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(306 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(307 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(307 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(308 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 309 /* UnparsedInternalText */ : 308 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 310 /* UnparsedInternalText */ : 309 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(310 /* UnparsedSyntheticReference */); + const node = createBaseNode(311 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(314 /* InputFiles */); + const node = createBaseNode(315 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(236 /* SyntheticExpression */); + const node = createBaseNode(237 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList3(children) { - const node = createBaseNode(357 /* SyntaxList */); + const node = createBaseNode(358 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(358 /* NotEmittedStatement */); + const node = createBaseNode(359 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(359 /* PartiallyEmittedExpression */); + const node = createBaseNode(360 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -25676,7 +25811,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createCommaListExpression(elements) { - const node = createBaseNode(360 /* CommaListExpression */); + const node = createBaseNode(361 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -25685,7 +25820,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(361 /* SyntheticReferenceExpression */); + const node = createBaseNode(362 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -25696,7 +25831,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneGeneratedIdentifier(node) { const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); @@ -25704,7 +25839,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneIdentifier(node) { const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.jsDoc = node.jsDoc; clone2.flowNode = node.flowNode; clone2.symbol = node.symbol; @@ -25717,7 +25852,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneGeneratedPrivateIdentifier(node) { const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); @@ -25725,7 +25860,7 @@ function createNodeFactory(flags, baseFactory2) { } function clonePrivateIdentifier(node) { const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); return clone2; @@ -25750,7 +25885,7 @@ function createNodeFactory(flags, baseFactory2) { return clonePrivateIdentifier(node); } const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); for (const key in node) { @@ -25843,7 +25978,10 @@ function createNodeFactory(flags, baseFactory2) { ); } function createTypeCheck(value, tag) { - return tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + return tag === "null" ? factory2.createStrictEquality(value, createNull()) : tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + } + function createIsNotTypeCheck(value, tag) { + return tag === "null" ? factory2.createStrictInequality(value, createNull()) : tag === "undefined" ? factory2.createStrictInequality(value, createVoidZero()) : factory2.createStrictInequality(createTypeOfExpression(value), createStringLiteral(tag)); } function createMethodCall(object, methodName, argumentsList) { if (isCallChain(object)) { @@ -25918,17 +26056,17 @@ function createNodeFactory(flags, baseFactory2) { } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 233 /* AsExpression */: + case 234 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -25968,13 +26106,13 @@ function createNodeFactory(flags, baseFactory2) { case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: return false; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -26237,6 +26375,9 @@ function createNodeFactory(flags, baseFactory2) { } return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); } + function updateModifierLike(node, modifierArray) { + return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); + } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; } @@ -26285,43 +26426,43 @@ function updateWithOriginal(updated, original) { } function getDefaultTagNameForKind(kind) { switch (kind) { - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return "type"; - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: return "returns"; - case 349 /* JSDocThisTag */: + case 350 /* JSDocThisTag */: return "this"; - case 346 /* JSDocEnumTag */: + case 347 /* JSDocEnumTag */: return "enum"; - case 336 /* JSDocAuthorTag */: + case 337 /* JSDocAuthorTag */: return "author"; - case 338 /* JSDocClassTag */: + case 339 /* JSDocClassTag */: return "class"; - case 339 /* JSDocPublicTag */: + case 340 /* JSDocPublicTag */: return "public"; - case 340 /* JSDocPrivateTag */: + case 341 /* JSDocPrivateTag */: return "private"; - case 341 /* JSDocProtectedTag */: + case 342 /* JSDocProtectedTag */: return "protected"; - case 342 /* JSDocReadonlyTag */: + case 343 /* JSDocReadonlyTag */: return "readonly"; - case 343 /* JSDocOverrideTag */: + case 344 /* JSDocOverrideTag */: return "override"; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return "template"; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return "typedef"; - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return "param"; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return "prop"; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: return "callback"; - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return "overload"; - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return "augments"; - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -26405,70 +26546,70 @@ function aggregateChildrenFlags(children) { children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 181 /* FirstTypeNode */ && kind <= 204 /* LastTypeNode */) { + if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 208 /* ArrayLiteralExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 209 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 168 /* Parameter */: + case 169 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 175 /* Constructor */: + case 176 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 146 /* NeverKeyword */: case 154 /* StringKeyword */: case 151 /* ObjectKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: case 116 /* VoidKeyword */: - case 167 /* TypeParameter */: - case 170 /* PropertySignature */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 171 /* PropertySignature */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 298 /* CatchClause */: + case 299 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 215 /* TypeAssertionExpression */: - case 237 /* SatisfiesExpression */: - case 233 /* AsExpression */: - case 359 /* PartiallyEmittedExpression */: - case 216 /* ParenthesizedExpression */: + case 216 /* TypeAssertionExpression */: + case 238 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 360 /* PartiallyEmittedExpression */: + case 217 /* ParenthesizedExpression */: case 108 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -26476,7 +26617,7 @@ function getTransformFlagsSubtreeExclusions(kind) { } var baseFactory = createBaseNodeFactory(); function makeSynthetic(node) { - node.flags |= 8 /* Synthesized */; + node.flags |= 16 /* Synthesized */; return node; } var syntheticFactory = { @@ -26734,11 +26875,13 @@ function createSourceMapSource(fileName, text, skipTrivia2) { return new (SourceMapSource2 || (SourceMapSource2 = objectAllocator.getSourceMapSourceConstructor()))(fileName, text, skipTrivia2); } function setOriginalNode(node, original) { - node.original = original; - if (original) { - const emitNode = original.emitNode; - if (emitNode) - node.emitNode = mergeEmitNode(emitNode, node.emitNode); + if (node.original !== original) { + node.original = original; + if (original) { + const emitNode = original.emitNode; + if (emitNode) + node.emitNode = mergeEmitNode(emitNode, node.emitNode); + } } return node; } @@ -26754,35 +26897,53 @@ function mergeEmitNode(sourceEmitNode, destEmitNode) { constantValue, helpers, startsOnNewLine, - snippetElement + snippetElement, + classThis, + assignedName } = sourceEmitNode; if (!destEmitNode) destEmitNode = {}; - if (leadingComments) - destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); - if (trailingComments) - destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); - if (flags) + if (flags) { destEmitNode.flags = flags; - if (internalFlags) + } + if (internalFlags) { destEmitNode.internalFlags = internalFlags & ~8 /* Immutable */; - if (commentRange) + } + if (leadingComments) { + destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); + } + if (trailingComments) { + destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); + } + if (commentRange) { destEmitNode.commentRange = commentRange; - if (sourceMapRange) + } + if (sourceMapRange) { destEmitNode.sourceMapRange = sourceMapRange; - if (tokenSourceMapRanges) + } + if (tokenSourceMapRanges) { destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges); - if (constantValue !== void 0) + } + if (constantValue !== void 0) { destEmitNode.constantValue = constantValue; + } if (helpers) { for (const helper of helpers) { destEmitNode.helpers = appendIfUnique(destEmitNode.helpers, helper); } } - if (startsOnNewLine !== void 0) + if (startsOnNewLine !== void 0) { destEmitNode.startsOnNewLine = startsOnNewLine; - if (snippetElement !== void 0) + } + if (snippetElement !== void 0) { destEmitNode.snippetElement = snippetElement; + } + if (classThis) { + destEmitNode.classThis = classThis; + } + if (assignedName) { + destEmitNode.assignedName = assignedName; + } return destEmitNode; } function mergeTokenSourceMapRanges(sourceRanges, destRanges) { @@ -26798,7 +26959,7 @@ function mergeTokenSourceMapRanges(sourceRanges, destRanges) { function getOrCreateEmitNode(node) { if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node))) ?? Debug.fail("Could not determine parsed source file."); @@ -27060,7 +27221,10 @@ function createEmitHelperFactory(context) { // Class Fields Helpers createClassPrivateFieldGetHelper, createClassPrivateFieldSetHelper, - createClassPrivateFieldInHelper + createClassPrivateFieldInHelper, + // 'using' helpers + createAddDisposableResourceHelper, + createDisposeResourcesHelper }; function getUnscopedHelperName(name) { return setEmitFlags(factory2.createIdentifier(name), 8192 /* HelperName */ | 4 /* AdviseOnEmitNode */); @@ -27115,10 +27279,12 @@ function createEmitHelperFactory(context) { ); } function createESDecorateClassContextObject(contextIn) { - return factory2.createObjectLiteralExpression([ + const properties = [ factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral("class")), - factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name) - ]); + factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name), + factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata) + ]; + return factory2.createObjectLiteralExpression(properties); } function createESDecorateClassElementAccessGetMethod(elementName) { const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name); @@ -27222,13 +27388,15 @@ function createEmitHelperFactory(context) { return factory2.createObjectLiteralExpression(properties); } function createESDecorateClassElementContextObject(contextIn) { - return factory2.createObjectLiteralExpression([ + const properties = [ factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral(contextIn.kind)), factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name.computed ? contextIn.name.name : factory2.createStringLiteralFromNode(contextIn.name.name)), factory2.createPropertyAssignment(factory2.createIdentifier("static"), contextIn.static ? factory2.createTrue() : factory2.createFalse()), factory2.createPropertyAssignment(factory2.createIdentifier("private"), contextIn.private ? factory2.createTrue() : factory2.createFalse()), - factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)) - ]); + factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)), + factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata) + ]; + return factory2.createObjectLiteralExpression(properties); } function createESDecorateContextObject(contextIn) { return contextIn.kind === "class" ? createESDecorateClassContextObject(contextIn) : createESDecorateClassElementContextObject(contextIn); @@ -27539,6 +27707,24 @@ function createEmitHelperFactory(context) { [state, receiver] ); } + function createAddDisposableResourceHelper(envBinding, value, async) { + context.requestEmitHelper(addDisposableResourceHelper); + return factory2.createCallExpression( + getUnscopedHelperName("__addDisposableResource"), + /*typeArguments*/ + void 0, + [envBinding, value, async ? factory2.createTrue() : factory2.createFalse()] + ); + } + function createDisposeResourcesHelper(envBinding) { + context.requestEmitHelper(disposeResourcesHelper); + return factory2.createCallExpression( + getUnscopedHelperName("__disposeResources"), + /*typeArguments*/ + void 0, + [envBinding] + ); + } } function compareEmitHelpers(x, y) { if (x === y) @@ -27983,6 +28169,63 @@ var classPrivateFieldInHelper = { return typeof state === "function" ? receiver === state : state.has(receiver); };` }; +var addDisposableResourceHelper = { + name: "typescript:addDisposableResource", + importName: "__addDisposableResource", + scoped: false, + text: ` + var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + };` +}; +var disposeResourcesHelper = { + name: "typescript:disposeResources", + importName: "__disposeResources", + scoped: false, + text: ` + var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + });` +}; var allUnscopedEmitHelpers; function getAllUnscopedEmitHelpers() { return allUnscopedEmitHelpers || (allUnscopedEmitHelpers = arrayToMap([ @@ -28013,7 +28256,9 @@ function getAllUnscopedEmitHelpers() { classPrivateFieldSetHelper, classPrivateFieldInHelper, createBindingHelper, - setModuleDefaultHelper + setModuleDefaultHelper, + addDisposableResourceHelper, + disposeResourcesHelper ], (helper) => helper.name)); } var asyncSuperHelper = { @@ -28124,7 +28369,7 @@ function isAbstractModifier(node) { return node.kind === 128 /* AbstractKeyword */; } function isOverrideModifier(node) { - return node.kind === 163 /* OverrideKeyword */; + return node.kind === 164 /* OverrideKeyword */; } function isAccessorModifier(node) { return node.kind === 129 /* AccessorKeyword */; @@ -28139,577 +28384,577 @@ function isCaseKeyword(node) { return node.kind === 84 /* CaseKeyword */; } function isQualifiedName(node) { - return node.kind === 165 /* QualifiedName */; + return node.kind === 166 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 166 /* ComputedPropertyName */; + return node.kind === 167 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 167 /* TypeParameter */; + return node.kind === 168 /* TypeParameter */; } function isParameter(node) { - return node.kind === 168 /* Parameter */; + return node.kind === 169 /* Parameter */; } function isDecorator(node) { - return node.kind === 169 /* Decorator */; + return node.kind === 170 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 170 /* PropertySignature */; + return node.kind === 171 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 171 /* PropertyDeclaration */; + return node.kind === 172 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 172 /* MethodSignature */; + return node.kind === 173 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 173 /* MethodDeclaration */; + return node.kind === 174 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 174 /* ClassStaticBlockDeclaration */; + return node.kind === 175 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 175 /* Constructor */; + return node.kind === 176 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 176 /* GetAccessor */; + return node.kind === 177 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 177 /* SetAccessor */; + return node.kind === 178 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 178 /* CallSignature */; + return node.kind === 179 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 179 /* ConstructSignature */; + return node.kind === 180 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 180 /* IndexSignature */; + return node.kind === 181 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 181 /* TypePredicate */; + return node.kind === 182 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 182 /* TypeReference */; + return node.kind === 183 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 183 /* FunctionType */; + return node.kind === 184 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 184 /* ConstructorType */; + return node.kind === 185 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 185 /* TypeQuery */; + return node.kind === 186 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 186 /* TypeLiteral */; + return node.kind === 187 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 187 /* ArrayType */; + return node.kind === 188 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 188 /* TupleType */; + return node.kind === 189 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 201 /* NamedTupleMember */; + return node.kind === 202 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 189 /* OptionalType */; + return node.kind === 190 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 190 /* RestType */; + return node.kind === 191 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 191 /* UnionType */; + return node.kind === 192 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 192 /* IntersectionType */; + return node.kind === 193 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 193 /* ConditionalType */; + return node.kind === 194 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 194 /* InferType */; + return node.kind === 195 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 195 /* ParenthesizedType */; + return node.kind === 196 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 196 /* ThisType */; + return node.kind === 197 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 197 /* TypeOperator */; + return node.kind === 198 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 198 /* IndexedAccessType */; + return node.kind === 199 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 199 /* MappedType */; + return node.kind === 200 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 200 /* LiteralType */; + return node.kind === 201 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 204 /* ImportType */; + return node.kind === 205 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 203 /* TemplateLiteralTypeSpan */; + return node.kind === 204 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 202 /* TemplateLiteralType */; + return node.kind === 203 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 205 /* ObjectBindingPattern */; + return node.kind === 206 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 206 /* ArrayBindingPattern */; + return node.kind === 207 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 207 /* BindingElement */; + return node.kind === 208 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 208 /* ArrayLiteralExpression */; + return node.kind === 209 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 209 /* ObjectLiteralExpression */; + return node.kind === 210 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 210 /* PropertyAccessExpression */; + return node.kind === 211 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 211 /* ElementAccessExpression */; + return node.kind === 212 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 212 /* CallExpression */; + return node.kind === 213 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 213 /* NewExpression */; + return node.kind === 214 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 214 /* TaggedTemplateExpression */; + return node.kind === 215 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 215 /* TypeAssertionExpression */; + return node.kind === 216 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 216 /* ParenthesizedExpression */; + return node.kind === 217 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 217 /* FunctionExpression */; + return node.kind === 218 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 218 /* ArrowFunction */; + return node.kind === 219 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 219 /* DeleteExpression */; + return node.kind === 220 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 220 /* TypeOfExpression */; + return node.kind === 221 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 221 /* VoidExpression */; + return node.kind === 222 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 222 /* AwaitExpression */; + return node.kind === 223 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 223 /* PrefixUnaryExpression */; + return node.kind === 224 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 224 /* PostfixUnaryExpression */; + return node.kind === 225 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 225 /* BinaryExpression */; + return node.kind === 226 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 226 /* ConditionalExpression */; + return node.kind === 227 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 227 /* TemplateExpression */; + return node.kind === 228 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 228 /* YieldExpression */; + return node.kind === 229 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 229 /* SpreadElement */; + return node.kind === 230 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 230 /* ClassExpression */; + return node.kind === 231 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 231 /* OmittedExpression */; + return node.kind === 232 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 232 /* ExpressionWithTypeArguments */; + return node.kind === 233 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 233 /* AsExpression */; + return node.kind === 234 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 237 /* SatisfiesExpression */; + return node.kind === 238 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 234 /* NonNullExpression */; + return node.kind === 235 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 235 /* MetaProperty */; + return node.kind === 236 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 236 /* SyntheticExpression */; + return node.kind === 237 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 359 /* PartiallyEmittedExpression */; + return node.kind === 360 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 360 /* CommaListExpression */; + return node.kind === 361 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 238 /* TemplateSpan */; + return node.kind === 239 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 239 /* SemicolonClassElement */; + return node.kind === 240 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 240 /* Block */; + return node.kind === 241 /* Block */; } function isVariableStatement(node) { - return node.kind === 242 /* VariableStatement */; + return node.kind === 243 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 241 /* EmptyStatement */; + return node.kind === 242 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 243 /* ExpressionStatement */; + return node.kind === 244 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 244 /* IfStatement */; + return node.kind === 245 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 245 /* DoStatement */; + return node.kind === 246 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 246 /* WhileStatement */; + return node.kind === 247 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 247 /* ForStatement */; + return node.kind === 248 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 248 /* ForInStatement */; + return node.kind === 249 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 249 /* ForOfStatement */; + return node.kind === 250 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 250 /* ContinueStatement */; + return node.kind === 251 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 251 /* BreakStatement */; + return node.kind === 252 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 252 /* ReturnStatement */; + return node.kind === 253 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 253 /* WithStatement */; + return node.kind === 254 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 254 /* SwitchStatement */; + return node.kind === 255 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 255 /* LabeledStatement */; + return node.kind === 256 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 256 /* ThrowStatement */; + return node.kind === 257 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 257 /* TryStatement */; + return node.kind === 258 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 258 /* DebuggerStatement */; + return node.kind === 259 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 259 /* VariableDeclaration */; + return node.kind === 260 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 260 /* VariableDeclarationList */; + return node.kind === 261 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 261 /* FunctionDeclaration */; + return node.kind === 262 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 262 /* ClassDeclaration */; + return node.kind === 263 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 263 /* InterfaceDeclaration */; + return node.kind === 264 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 264 /* TypeAliasDeclaration */; + return node.kind === 265 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 265 /* EnumDeclaration */; + return node.kind === 266 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */; + return node.kind === 267 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 267 /* ModuleBlock */; + return node.kind === 268 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 268 /* CaseBlock */; + return node.kind === 269 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 269 /* NamespaceExportDeclaration */; + return node.kind === 270 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */; + return node.kind === 271 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 271 /* ImportDeclaration */; + return node.kind === 272 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 272 /* ImportClause */; + return node.kind === 273 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 301 /* ImportTypeAssertionContainer */; + return node.kind === 302 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 299 /* AssertClause */; + return node.kind === 300 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 300 /* AssertEntry */; + return node.kind === 301 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 273 /* NamespaceImport */; + return node.kind === 274 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 279 /* NamespaceExport */; + return node.kind === 280 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 274 /* NamedImports */; + return node.kind === 275 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 275 /* ImportSpecifier */; + return node.kind === 276 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 276 /* ExportAssignment */; + return node.kind === 277 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 277 /* ExportDeclaration */; + return node.kind === 278 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 278 /* NamedExports */; + return node.kind === 279 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 280 /* ExportSpecifier */; + return node.kind === 281 /* ExportSpecifier */; } function isMissingDeclaration(node) { - return node.kind === 281 /* MissingDeclaration */; + return node.kind === 282 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 358 /* NotEmittedStatement */; + return node.kind === 359 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 361 /* SyntheticReferenceExpression */; + return node.kind === 362 /* SyntheticReferenceExpression */; } function isExternalModuleReference(node) { - return node.kind === 282 /* ExternalModuleReference */; + return node.kind === 283 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 283 /* JsxElement */; + return node.kind === 284 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 284 /* JsxSelfClosingElement */; + return node.kind === 285 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 285 /* JsxOpeningElement */; + return node.kind === 286 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 286 /* JsxClosingElement */; + return node.kind === 287 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 287 /* JsxFragment */; + return node.kind === 288 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 288 /* JsxOpeningFragment */; + return node.kind === 289 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 289 /* JsxClosingFragment */; + return node.kind === 290 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 290 /* JsxAttribute */; + return node.kind === 291 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 291 /* JsxAttributes */; + return node.kind === 292 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 292 /* JsxSpreadAttribute */; + return node.kind === 293 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 293 /* JsxExpression */; + return node.kind === 294 /* JsxExpression */; } function isJsxNamespacedName(node) { - return node.kind === 294 /* JsxNamespacedName */; + return node.kind === 295 /* JsxNamespacedName */; } function isCaseClause(node) { - return node.kind === 295 /* CaseClause */; + return node.kind === 296 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 296 /* DefaultClause */; + return node.kind === 297 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 297 /* HeritageClause */; + return node.kind === 298 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 298 /* CatchClause */; + return node.kind === 299 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 302 /* PropertyAssignment */; + return node.kind === 303 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 303 /* ShorthandPropertyAssignment */; + return node.kind === 304 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 304 /* SpreadAssignment */; + return node.kind === 305 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 305 /* EnumMember */; + return node.kind === 306 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 307 /* UnparsedPrepend */; + return node.kind === 308 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 311 /* SourceFile */; + return node.kind === 312 /* SourceFile */; } function isBundle(node) { - return node.kind === 312 /* Bundle */; + return node.kind === 313 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 313 /* UnparsedSource */; + return node.kind === 314 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 315 /* JSDocTypeExpression */; + return node.kind === 316 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 316 /* JSDocNameReference */; + return node.kind === 317 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 317 /* JSDocMemberName */; + return node.kind === 318 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 330 /* JSDocLink */; + return node.kind === 331 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 331 /* JSDocLinkCode */; + return node.kind === 332 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 332 /* JSDocLinkPlain */; + return node.kind === 333 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 318 /* JSDocAllType */; + return node.kind === 319 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 319 /* JSDocUnknownType */; + return node.kind === 320 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 320 /* JSDocNullableType */; + return node.kind === 321 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 321 /* JSDocNonNullableType */; + return node.kind === 322 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 322 /* JSDocOptionalType */; + return node.kind === 323 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 323 /* JSDocFunctionType */; + return node.kind === 324 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 324 /* JSDocVariadicType */; + return node.kind === 325 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 325 /* JSDocNamepathType */; + return node.kind === 326 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 326 /* JSDoc */; + return node.kind === 327 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 328 /* JSDocTypeLiteral */; + return node.kind === 329 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 329 /* JSDocSignature */; + return node.kind === 330 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 334 /* JSDocAugmentsTag */; + return node.kind === 335 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 336 /* JSDocAuthorTag */; + return node.kind === 337 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 338 /* JSDocClassTag */; + return node.kind === 339 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 344 /* JSDocCallbackTag */; + return node.kind === 345 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 339 /* JSDocPublicTag */; + return node.kind === 340 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 340 /* JSDocPrivateTag */; + return node.kind === 341 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 341 /* JSDocProtectedTag */; + return node.kind === 342 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 342 /* JSDocReadonlyTag */; + return node.kind === 343 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 343 /* JSDocOverrideTag */; + return node.kind === 344 /* JSDocOverrideTag */; } function isJSDocOverloadTag(node) { - return node.kind === 345 /* JSDocOverloadTag */; + return node.kind === 346 /* JSDocOverloadTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 337 /* JSDocDeprecatedTag */; + return node.kind === 338 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 353 /* JSDocSeeTag */; + return node.kind === 354 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 346 /* JSDocEnumTag */; + return node.kind === 347 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 347 /* JSDocParameterTag */; + return node.kind === 348 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 348 /* JSDocReturnTag */; + return node.kind === 349 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 349 /* JSDocThisTag */; + return node.kind === 350 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 350 /* JSDocTypeTag */; + return node.kind === 351 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 351 /* JSDocTemplateTag */; + return node.kind === 352 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 352 /* JSDocTypedefTag */; + return node.kind === 353 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 333 /* JSDocTag */; + return node.kind === 334 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 354 /* JSDocPropertyTag */; + return node.kind === 355 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 335 /* JSDocImplementsTag */; + return node.kind === 336 /* JSDocImplementsTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 356 /* JSDocSatisfiesTag */; + return node.kind === 357 /* JSDocSatisfiesTag */; } function isJSDocThrowsTag(node) { - return node.kind === 355 /* JSDocThrowsTag */; + return node.kind === 356 /* JSDocThrowsTag */; } function isSyntaxList(n) { - return n.kind === 357 /* SyntaxList */; + return n.kind === 358 /* SyntaxList */; } // src/compiler/factory/utilities.ts @@ -29017,14 +29262,14 @@ function createExpressionForObjectLiteralElementLike(factory2, node, property, r Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -29077,7 +29322,7 @@ function startsWithUseStrict(statements) { return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaExpression(node) { - return node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; + return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -29092,19 +29337,19 @@ function getJSDocTypeAssertionType(node) { } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 237 /* SatisfiesExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 238 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -29241,10 +29486,10 @@ function getLocalNameForExternalImport(factory2, node, sourceFile) { const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 271 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 272 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 277 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 278 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -29307,11 +29552,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -29330,11 +29575,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 168 /* Parameter */: - case 207 /* BindingElement */: + case 169 /* Parameter */: + case 208 /* BindingElement */: return bindingElement.dotDotDotToken; - case 229 /* SpreadElement */: - case 304 /* SpreadAssignment */: + case 230 /* SpreadElement */: + case 305 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -29346,7 +29591,7 @@ function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 207 /* BindingElement */: + case 208 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -29355,7 +29600,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -29364,7 +29609,7 @@ function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -29381,11 +29626,11 @@ function isStringOrNumericLiteral(node) { } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return name.elements; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return name.properties; } } @@ -29402,19 +29647,19 @@ function getJSDocTypeAliasName(fullName) { } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 177 /* SetAccessor */; + return kind === 176 /* Constructor */ || kind === 178 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 261 /* FunctionDeclaration */ || kind === 175 /* Constructor */ || kind === 180 /* IndexSignature */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 281 /* MissingDeclaration */ || kind === 242 /* VariableStatement */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 276 /* ExportAssignment */; + return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 243 /* VariableStatement */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 174 /* ClassStaticBlockDeclaration */ || kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 281 /* MissingDeclaration */ || kind === 269 /* NamespaceExportDeclaration */; + return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 282 /* MissingDeclaration */ || kind === 270 /* NamespaceExportDeclaration */; } function isQuestionOrExclamationToken(node) { return isQuestionToken(node) || isExclamationToken(node); @@ -29692,7 +29937,7 @@ function createAccessorPropertyBackingField(factory2, node, modifiers, initializ initializer ); } -function createAccessorPropertyGetRedirector(factory2, node, modifiers, name) { +function createAccessorPropertyGetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) { return factory2.createGetAccessorDeclaration( modifiers, name, @@ -29702,7 +29947,7 @@ function createAccessorPropertyGetRedirector(factory2, node, modifiers, name) { factory2.createBlock([ factory2.createReturnStatement( factory2.createPropertyAccessExpression( - factory2.createThis(), + receiver, factory2.getGeneratedPrivateNameForNode( node.name, /*prefix*/ @@ -29714,7 +29959,7 @@ function createAccessorPropertyGetRedirector(factory2, node, modifiers, name) { ]) ); } -function createAccessorPropertySetRedirector(factory2, node, modifiers, name) { +function createAccessorPropertySetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) { return factory2.createSetAccessorDeclaration( modifiers, name, @@ -29729,7 +29974,7 @@ function createAccessorPropertySetRedirector(factory2, node, modifiers, name) { factory2.createExpressionStatement( factory2.createAssignment( factory2.createPropertyAccessExpression( - factory2.createThis(), + receiver, factory2.getGeneratedPrivateNameForNode( node.name, /*prefix*/ @@ -29813,11 +30058,11 @@ function setTextRange(range, location) { } function canHaveModifiers(node) { const kind = node.kind; - return kind === 167 /* TypeParameter */ || kind === 168 /* Parameter */ || kind === 170 /* PropertySignature */ || kind === 171 /* PropertyDeclaration */ || kind === 172 /* MethodSignature */ || kind === 173 /* MethodDeclaration */ || kind === 175 /* Constructor */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 180 /* IndexSignature */ || kind === 184 /* ConstructorType */ || kind === 217 /* FunctionExpression */ || kind === 218 /* ArrowFunction */ || kind === 230 /* ClassExpression */ || kind === 242 /* VariableStatement */ || kind === 261 /* FunctionDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 277 /* ExportDeclaration */; + return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 231 /* ClassExpression */ || kind === 243 /* VariableStatement */ || kind === 262 /* FunctionDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 278 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 168 /* Parameter */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 230 /* ClassExpression */ || kind === 262 /* ClassDeclaration */; + return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 231 /* ClassExpression */ || kind === 263 /* ClassDeclaration */; } // src/compiler/parser.ts @@ -29860,7 +30105,7 @@ function isAnExternalModuleIndicatorNode(node) { return canHaveModifiers(node) && hasModifierOfKind(node, 95 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { - return sourceFile.flags & 4194304 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; + return sourceFile.flags & 8388608 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; } function walkTreeForImportMeta(node) { return isImportMeta2(node) ? node : forEachChild(node, walkTreeForImportMeta); @@ -29872,428 +30117,428 @@ function isImportMeta2(node) { return isMetaProperty(node) && node.keywordToken === 102 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [165 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [167 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [168 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [303 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [304 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [304 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [305 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [168 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [169 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [171 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [172 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [170 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [171 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [302 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [303 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [259 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [260 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [207 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [180 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [184 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [183 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [178 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [179 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [173 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [172 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [175 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [176 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [177 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [261 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [262 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [217 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [218 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [174 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [182 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [181 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [185 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [186 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [187 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [188 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [191 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [192 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [193 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [194 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [204 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [301 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [195 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [197 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [199 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [200 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [201 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [205 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [206 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [208 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [209 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [210 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [211 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [212 /* CallExpression */]: forEachChildInCallOrNewExpression, - [213 /* NewExpression */]: forEachChildInCallOrNewExpression, - [214 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [213 /* CallExpression */]: forEachChildInCallOrNewExpression, + [214 /* NewExpression */]: forEachChildInCallOrNewExpression, + [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [215 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [216 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [219 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [220 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [220 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [221 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [222 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [223 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [224 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [228 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [229 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [222 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [223 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [224 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [225 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [225 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [226 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [233 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [234 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [234 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [235 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [237 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [238 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [235 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [236 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [226 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [227 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [229 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [230 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [240 /* Block */]: forEachChildInBlock, - [267 /* ModuleBlock */]: forEachChildInBlock, - [311 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [241 /* Block */]: forEachChildInBlock, + [268 /* ModuleBlock */]: forEachChildInBlock, + [312 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [242 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [243 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [260 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [261 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [243 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [244 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [244 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [245 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [245 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [246 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [246 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [247 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [247 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [248 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [248 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [249 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [249 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [250 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [250 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [251 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [252 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [251 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [252 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [253 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [253 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [254 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [254 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [255 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [268 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [269 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [295 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [296 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [296 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [297 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [255 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [256 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [256 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [257 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [257 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [258 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [298 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [299 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [169 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [262 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [230 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [263 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [263 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [231 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [264 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [264 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [265 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [265 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [266 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [305 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [306 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [266 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [267 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [270 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [271 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [271 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [272 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [299 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [300 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [269 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [273 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [274 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [279 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [280 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [274 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [278 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [277 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [275 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [280 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [276 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [277 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [227 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [228 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [238 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [239 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [202 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [203 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [166 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [297 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [298 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [232 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [233 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [282 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [283 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [281 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [360 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [361 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [283 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [287 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [288 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [284 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [285 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [291 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [285 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [286 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [292 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [290 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [291 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [292 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [293 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [293 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [294 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [286 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [287 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [294 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { + [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.namespace) || visitNode2(cbNode, node.name); }, - [189 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [190 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [315 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [320 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [322 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [316 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [322 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [323 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [325 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [324 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [326 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [327 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [353 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [354 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [316 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [317 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [317 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [318 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [347 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [354 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [336 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [348 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [355 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [337 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [335 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [336 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [334 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [335 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [351 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [352 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [352 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 315 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [353 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 316 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [344 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [345 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [348 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [350 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [349 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [356 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [355 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [345 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [329 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [349 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [351 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [350 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [347 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [357 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [356 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [346 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [330 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [330 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [331 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [332 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [328 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [331 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [332 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [333 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [329 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [333 /* JSDocTag */]: forEachChildInJSDocTag, - [338 /* JSDocClassTag */]: forEachChildInJSDocTag, - [339 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [340 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [341 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [342 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [337 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [343 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [359 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [334 /* JSDocTag */]: forEachChildInJSDocTag, + [339 /* JSDocClassTag */]: forEachChildInJSDocTag, + [340 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [341 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [342 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [343 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [338 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [344 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [360 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -30348,7 +30593,7 @@ function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 164 /* LastToken */) { + if (node === void 0 || node.kind <= 165 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -30383,7 +30628,7 @@ function forEachChildRecursively(rootNode, cbNode, cbNodes) { continue; return res; } - if (current.kind >= 165 /* FirstNode */) { + if (current.kind >= 166 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -30464,7 +30709,7 @@ function isExternalModule(file) { } function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks = false) { const newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks); - newSourceFile.flags |= sourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */; + newSourceFile.flags |= sourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */; return newSourceFile; } function parseIsolatedJSDocComment(content, start2, length2) { @@ -30484,7 +30729,7 @@ var Parser; /*skipTrivia*/ true ); - var disallowInAndDecoratorContext = 4096 /* DisallowInContext */ | 16384 /* DecoratorContext */; + var disallowInAndDecoratorContext = 8192 /* DisallowInContext */ | 32768 /* DecoratorContext */; var NodeConstructor2; var TokenConstructor2; var IdentifierConstructor2; @@ -30729,10 +30974,10 @@ var Parser; switch (scriptKind) { case 1 /* JS */: case 2 /* JSX */: - contextFlags = 262144 /* JavaScriptFile */; + contextFlags = 524288 /* JavaScriptFile */; break; case 6 /* JSON */: - contextFlags = 262144 /* JavaScriptFile */ | 67108864 /* JsonFile */; + contextFlags = 524288 /* JavaScriptFile */ | 134217728 /* JsonFile */; break; default: contextFlags = 0 /* None */; @@ -30764,13 +31009,14 @@ var Parser; function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) { const isDeclarationFile = isDeclarationFileName(fileName); if (isDeclarationFile) { - contextFlags |= 16777216 /* Ambient */; + contextFlags |= 33554432 /* Ambient */; } sourceFlags = contextFlags; nextToken(); const statements = parseList(0 /* SourceElements */, parseStatement); Debug.assert(token() === 1 /* EndOfFileToken */); - const endOfFileToken = addJSDocComment(parseTokenNode()); + const endHasJSDoc = hasPrecedingJSDocComment(); + const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc); const sourceFile = createSourceFile2(fileName, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator2); processCommentPragmas(sourceFile, sourceText); processPragmasIntoFields(sourceFile, reportPragmaDiagnostic); @@ -30790,18 +31036,18 @@ var Parser; parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic)); } } - function withJSDoc(node, hasJSDoc) { - return hasJSDoc ? addJSDocComment(node) : node; - } let hasDeprecatedTag = false; - function addJSDocComment(node) { + function withJSDoc(node, hasJSDoc) { + if (!hasJSDoc) { + return node; + } Debug.assert(!node.jsDoc); const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), (comment) => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos)); if (jsDoc.length) node.jsDoc = jsDoc; if (hasDeprecatedTag) { hasDeprecatedTag = false; - node.flags |= 268435456 /* Deprecated */; + node.flags |= 536870912 /* Deprecated */; } return node; } @@ -30826,7 +31072,7 @@ var Parser; } speculationHelper(() => { const savedContextFlags = contextFlags; - contextFlags |= 32768 /* AwaitContext */; + contextFlags |= 65536 /* AwaitContext */; scanner2.resetTokenState(nextStatement.pos); nextToken(); while (token() !== 1 /* EndOfFileToken */) { @@ -30861,7 +31107,7 @@ var Parser; syntaxCursor = savedSyntaxCursor; return factory2.updateSourceFile(sourceFile, setTextRange(factoryCreateNodeArray(statements), sourceFile.statements)); function containsPossibleTopLevelAwait(node) { - return !(node.flags & 32768 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); + return !(node.flags & 65536 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); } function findNextStatementWithAwait(statements2, start3) { for (let i = start3; i < statements2.length; i++) { @@ -30925,16 +31171,16 @@ var Parser; } } function setDisallowInContext(val) { - setContextFlag(val, 4096 /* DisallowInContext */); + setContextFlag(val, 8192 /* DisallowInContext */); } function setYieldContext(val) { - setContextFlag(val, 8192 /* YieldContext */); + setContextFlag(val, 16384 /* YieldContext */); } function setDecoratorContext(val) { - setContextFlag(val, 16384 /* DecoratorContext */); + setContextFlag(val, 32768 /* DecoratorContext */); } function setAwaitContext(val) { - setContextFlag(val, 32768 /* AwaitContext */); + setContextFlag(val, 65536 /* AwaitContext */); } function doOutsideOfContext(context, func) { const contextFlagsToClear = context & contextFlags; @@ -30973,52 +31219,52 @@ var Parser; return func(); } function allowInAnd(func) { - return doOutsideOfContext(4096 /* DisallowInContext */, func); + return doOutsideOfContext(8192 /* DisallowInContext */, func); } function disallowInAnd(func) { - return doInsideOfContext(4096 /* DisallowInContext */, func); + return doInsideOfContext(8192 /* DisallowInContext */, func); } function allowConditionalTypesAnd(func) { - return doOutsideOfContext(65536 /* DisallowConditionalTypesContext */, func); + return doOutsideOfContext(131072 /* DisallowConditionalTypesContext */, func); } function disallowConditionalTypesAnd(func) { - return doInsideOfContext(65536 /* DisallowConditionalTypesContext */, func); + return doInsideOfContext(131072 /* DisallowConditionalTypesContext */, func); } function doInYieldContext(func) { - return doInsideOfContext(8192 /* YieldContext */, func); + return doInsideOfContext(16384 /* YieldContext */, func); } function doInDecoratorContext(func) { - return doInsideOfContext(16384 /* DecoratorContext */, func); + return doInsideOfContext(32768 /* DecoratorContext */, func); } function doInAwaitContext(func) { - return doInsideOfContext(32768 /* AwaitContext */, func); + return doInsideOfContext(65536 /* AwaitContext */, func); } function doOutsideOfAwaitContext(func) { - return doOutsideOfContext(32768 /* AwaitContext */, func); + return doOutsideOfContext(65536 /* AwaitContext */, func); } function doInYieldAndAwaitContext(func) { - return doInsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + return doInsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); } function doOutsideOfYieldAndAwaitContext(func) { - return doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + return doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); } function inContext(flags) { return (contextFlags & flags) !== 0; } function inYieldContext() { - return inContext(8192 /* YieldContext */); + return inContext(16384 /* YieldContext */); } function inDisallowInContext() { - return inContext(4096 /* DisallowInContext */); + return inContext(8192 /* DisallowInContext */); } function inDisallowConditionalTypesContext() { - return inContext(65536 /* DisallowConditionalTypesContext */); + return inContext(131072 /* DisallowConditionalTypesContext */); } function inDecoratorContext() { - return inContext(16384 /* DecoratorContext */); + return inContext(32768 /* DecoratorContext */); } function inAwaitContext() { - return inContext(32768 /* AwaitContext */); + return inContext(65536 /* AwaitContext */); } function parseErrorAtCurrentToken(message, ...args) { return parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), message, ...args); @@ -31342,7 +31588,7 @@ var Parser; } if (parseErrorBeforeNextFinishedNode) { parseErrorBeforeNextFinishedNode = false; - node.flags |= 131072 /* ThisNodeHasError */; + node.flags |= 262144 /* ThisNodeHasError */; } return node; } @@ -31371,7 +31617,7 @@ var Parser; "", /*isSingleQuote*/ void 0 - ) : kind === 281 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 282 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -31588,6 +31834,9 @@ var Parser; case 22 /* HeritageClauses */: return isHeritageClause2(); case 23 /* ImportOrExportSpecifiers */: + if (token() === 161 /* FromKeyword */ && lookAhead(nextTokenIsStringLiteral)) { + return false; + } return tokenIsIdentifierOrKeyword(token()); case 13 /* JsxAttributes */: return tokenIsIdentifierOrKeyword(token()) || token() === 19 /* OpenBraceToken */; @@ -31744,7 +31993,7 @@ var Parser; if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { return void 0; } - const nodeContextFlags = node.flags & 50720768 /* ContextFlags */; + const nodeContextFlags = node.flags & 101441536 /* ContextFlags */; if (nodeContextFlags !== contextFlags) { return void 0; } @@ -31802,14 +32051,14 @@ var Parser; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 175 /* Constructor */: - case 180 /* IndexSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 239 /* SemicolonClassElement */: + case 176 /* Constructor */: + case 181 /* IndexSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 240 /* SemicolonClassElement */: return true; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 80 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -31820,8 +32069,8 @@ var Parser; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return true; } } @@ -31830,65 +32079,65 @@ var Parser; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 242 /* VariableStatement */: - case 240 /* Block */: - case 244 /* IfStatement */: - case 243 /* ExpressionStatement */: - case 256 /* ThrowStatement */: - case 252 /* ReturnStatement */: - case 254 /* SwitchStatement */: - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 241 /* EmptyStatement */: - case 257 /* TryStatement */: - case 255 /* LabeledStatement */: - case 245 /* DoStatement */: - case 258 /* DebuggerStatement */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 262 /* FunctionDeclaration */: + case 243 /* VariableStatement */: + case 241 /* Block */: + case 245 /* IfStatement */: + case 244 /* ExpressionStatement */: + case 257 /* ThrowStatement */: + case 253 /* ReturnStatement */: + case 255 /* SwitchStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 242 /* EmptyStatement */: + case 258 /* TryStatement */: + case 256 /* LabeledStatement */: + case 246 /* DoStatement */: + case 259 /* DebuggerStatement */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 305 /* EnumMember */; + return node.kind === 306 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 170 /* PropertySignature */: - case 178 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 171 /* PropertySignature */: + case 179 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 259 /* VariableDeclaration */) { + if (node.kind !== 260 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 168 /* Parameter */) { + if (node.kind !== 169 /* Parameter */) { return false; } const parameter = node; @@ -31946,6 +32195,9 @@ var Parser; case 22 /* HeritageClauses */: return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_expected); case 23 /* ImportOrExportSpecifiers */: + if (token() === 161 /* FromKeyword */) { + return parseErrorAtCurrentToken(Diagnostics._0_expected, "}"); + } return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case 13 /* JsxAttributes */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); @@ -32225,14 +32477,14 @@ var Parser; } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return nodeIsMissing(node.typeName); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: { + case 184 /* FunctionType */: + case 185 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -32524,7 +32776,7 @@ var Parser; function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 179 /* ConstructSignature */) { + if (kind === 180 /* ConstructSignature */) { parseExpected(105 /* NewKeyword */); } const typeParameters = parseTypeParameters(); @@ -32535,7 +32787,7 @@ var Parser; true ); parseTypeMemberSemicolon(); - const node = kind === 178 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -32620,10 +32872,10 @@ var Parser; } function parseTypeMember() { if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { - return parseSignatureMember(178 /* CallSignature */); + return parseSignatureMember(179 /* CallSignature */); } if (token() === 105 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(179 /* ConstructSignature */); + return parseSignatureMember(180 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -32632,10 +32884,10 @@ var Parser; false ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -32844,7 +33096,7 @@ var Parser; return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos); } function parseImportType() { - sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); const isTypeOf = parseOptional(114 /* TypeOfKeyword */); parseExpected(102 /* ImportKeyword */); @@ -32869,7 +33121,7 @@ var Parser; case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 155 /* SymbolKeyword */: case 136 /* BooleanKeyword */: case 157 /* UndefinedKeyword */: @@ -32935,7 +33187,7 @@ var Parser; case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 148 /* ReadonlyKeyword */: case 155 /* SymbolKeyword */: @@ -33181,8 +33433,8 @@ var Parser; return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); } function parseType() { - if (contextFlags & 40960 /* TypeExcludesFlags */) { - return doOutsideOfContext(40960 /* TypeExcludesFlags */, parseType); + if (contextFlags & 81920 /* TypeExcludesFlags */) { + return doOutsideOfContext(81920 /* TypeExcludesFlags */, parseType); } if (isStartOfFunctionTypeOrConstructorType()) { return parseFunctionOrConstructorType(); @@ -33303,12 +33555,14 @@ var Parser; return arrowExpression; } const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); if (expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) { return parseSimpleArrowFunctionExpression( pos, expr, allowReturnTypeInArrowFunction, + hasJSDoc, /*asyncModifier*/ void 0 ); @@ -33354,7 +33608,7 @@ var Parser; ), pos); } } - function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, asyncModifier) { + function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier) { Debug.assert(token() === 39 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); const parameter = factory2.createParameterDeclaration( /*modifiers*/ @@ -33387,7 +33641,7 @@ var Parser; equalsGreaterThanToken, body ); - return addJSDocComment(finishNode(node, pos)); + return withJSDoc(finishNode(node, pos), hasJSDoc); } function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { const triState = isParenthesizedArrowFunctionExpression(); @@ -33515,9 +33769,10 @@ var Parser; if (token() === 134 /* AsyncKeyword */) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const asyncModifier = parseModifiersForArrowFunction(); const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); - return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, asyncModifier); + return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier); } } return void 0; @@ -33571,7 +33826,7 @@ var Parser; return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 195 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -33634,7 +33889,7 @@ var Parser; return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 103 /* InKeyword */ || t === 164 /* OfKeyword */; + return t === 103 /* InKeyword */ || t === 165 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -33716,7 +33971,7 @@ var Parser; if (token() === 43 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 215 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { Debug.assert(isKeywordOrPunctuation(unaryOperator)); @@ -33803,13 +34058,13 @@ var Parser; let expression; if (token() === 102 /* ImportKeyword */) { if (lookAhead(nextTokenIsOpenParenOrLessThan)) { - sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; expression = parseTokenNode(); } else if (lookAhead(nextTokenIsDot)) { nextToken(); nextToken(); expression = finishNode(factory2.createMetaProperty(102 /* ImportKeyword */, parseIdentifierName()), pos); - sourceFlags |= 4194304 /* PossiblyContainsImportMeta */; + sourceFlags |= 8388608 /* PossiblyContainsImportMeta */; } else { expression = parseMemberExpressionOrHigher(); } @@ -33856,11 +34111,11 @@ var Parser; const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 285 /* JsxOpeningElement */) { + if (opening.kind === 286 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 283 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -33884,10 +34139,10 @@ var Parser; } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 288 /* JsxOpeningFragment */) { + } else if (opening.kind === 289 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 284 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 285 /* JsxSelfClosingElement */); result = opening; } if (!mustBeUnary && inExpressionContext && token() === 30 /* LessThanToken */) { @@ -33960,7 +34215,7 @@ var Parser; if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 283 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -33979,7 +34234,7 @@ var Parser; return finishNode(factory2.createJsxOpeningFragment(), pos); } const tagName = parseJsxElementName(); - const typeArguments = (contextFlags & 262144 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; + const typeArguments = (contextFlags & 524288 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; const attributes = parseJsxAttributes(); let node; if (token() === 32 /* GreaterThanToken */) { @@ -34157,17 +34412,17 @@ var Parser; return token() === 29 /* QuestionDotToken */ && lookAhead(nextTokenIsIdentifierOrKeywordOrOpenBracketOrTemplate); } function tryReparseOptionalChain(node) { - if (node.flags & 32 /* OptionalChain */) { + if (node.flags & 64 /* OptionalChain */) { return true; } if (isNonNullExpression(node)) { let expr = node.expression; - while (isNonNullExpression(expr) && !(expr.flags & 32 /* OptionalChain */)) { + while (isNonNullExpression(expr) && !(expr.flags & 64 /* OptionalChain */)) { expr = expr.expression; } - if (expr.flags & 32 /* OptionalChain */) { + if (expr.flags & 64 /* OptionalChain */) { while (isNonNullExpression(node)) { - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node = node.expression; } return true; @@ -34233,7 +34488,7 @@ var Parser; continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 232 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -34272,8 +34527,8 @@ var Parser; true ) ); - if (questionDotToken || tag.flags & 32 /* OptionalChain */) { - tagExpression.flags |= 32 /* OptionalChain */; + if (questionDotToken || tag.flags & 64 /* OptionalChain */) { + tagExpression.flags |= 64 /* OptionalChain */; } tagExpression.questionDotToken = questionDotToken; return finishNode(tagExpression, pos); @@ -34296,7 +34551,7 @@ var Parser; } } if (typeArguments || token() === 21 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -34325,7 +34580,7 @@ var Parser; return result; } function parseTypeArgumentsInExpression() { - if ((contextFlags & 262144 /* JavaScriptFile */) !== 0) { + if ((contextFlags & 524288 /* JavaScriptFile */) !== 0) { return void 0; } if (reScanLessThanToken() !== 30 /* LessThanToken */) { @@ -34457,10 +34712,10 @@ var Parser; true ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -34554,7 +34809,7 @@ var Parser; false ); let typeArguments; - if (expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (expression.kind === 233 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -34664,7 +34919,7 @@ var Parser; parseExpected(21 /* OpenParenToken */); let initializer; if (token() !== 27 /* SemicolonToken */) { - if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */) { + if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -34674,7 +34929,7 @@ var Parser; } } let node; - if (awaitToken ? parseExpected(164 /* OfKeyword */) : parseOptional(164 /* OfKeyword */)) { + if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ true @@ -34698,10 +34953,10 @@ var Parser; function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 251 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); + parseExpected(kind === 252 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 251 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 252 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -34720,7 +34975,7 @@ var Parser; const openParenParsed = parseExpected(21 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition); - const statement = doInsideOfContext(33554432 /* InWithStatement */, parseStatement); + const statement = doInsideOfContext(67108864 /* InWithStatement */, parseStatement); return withJSDoc(finishNode(factory2.createWithStatement(expression, statement), pos), hasJSDoc); } function parseCaseClause() { @@ -34860,6 +35115,10 @@ var Parser; case 86 /* ClassKeyword */: case 94 /* EnumKeyword */: return true; + case 160 /* UsingKeyword */: + return isUsingDeclaration(); + case 135 /* AwaitKeyword */: + return isAwaitUsingDeclaration(); case 120 /* InterfaceKeyword */: case 156 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); @@ -34874,12 +35133,16 @@ var Parser; case 124 /* ProtectedKeyword */: case 125 /* PublicKeyword */: case 148 /* ReadonlyKeyword */: + const previousToken = token(); nextToken(); if (scanner2.hasPrecedingLineBreak()) { return false; } + if (previousToken === 138 /* DeclareKeyword */ && token() === 156 /* TypeKeyword */) { + return true; + } continue; - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: nextToken(); return token() === 19 /* OpenBraceToken */ || token() === 80 /* Identifier */ || token() === 95 /* ExportKeyword */; case 102 /* ImportKeyword */: @@ -34912,6 +35175,7 @@ var Parser; case 19 /* OpenBraceToken */: case 115 /* VarKeyword */: case 121 /* LetKeyword */: + case 160 /* UsingKeyword */: case 100 /* FunctionKeyword */: case 86 /* ClassKeyword */: case 94 /* EnumKeyword */: @@ -34941,7 +35205,7 @@ var Parser; case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: case 156 /* TypeKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: return true; case 129 /* AccessorKeyword */: case 125 /* PublicKeyword */: @@ -34961,6 +35225,36 @@ var Parser; function isLetDeclaration() { return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuring); } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf() { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine( + /*disallowOf*/ + true + ); + } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf) { + nextToken(); + if (disallowOf && token() === 165 /* OfKeyword */) + return false; + return (isBindingIdentifier() || token() === 19 /* OpenBraceToken */) && !scanner2.hasPrecedingLineBreak(); + } + function isUsingDeclaration() { + return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); + } + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { + return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine( + /*disallowOf*/ + true + ); + } + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) { + if (nextToken() === 160 /* UsingKeyword */) { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); + } + return false; + } + function isAwaitUsingDeclaration() { + return lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine); + } function parseStatement() { switch (token()) { case 27 /* SemicolonToken */: @@ -34987,6 +35281,26 @@ var Parser; ); } break; + case 135 /* AwaitKeyword */: + if (isAwaitUsingDeclaration()) { + return parseVariableStatement( + getNodePos(), + hasPrecedingJSDocComment(), + /*modifiers*/ + void 0 + ); + } + break; + case 160 /* UsingKeyword */: + if (isUsingDeclaration()) { + return parseVariableStatement( + getNodePos(), + hasPrecedingJSDocComment(), + /*modifiers*/ + void 0 + ); + } + break; case 100 /* FunctionKeyword */: return parseFunctionDeclaration( getNodePos(), @@ -35010,9 +35324,9 @@ var Parser; case 99 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 88 /* ContinueKeyword */: - return parseBreakOrContinueStatement(250 /* ContinueStatement */); + return parseBreakOrContinueStatement(251 /* ContinueStatement */); case 83 /* BreakKeyword */: - return parseBreakOrContinueStatement(251 /* BreakStatement */); + return parseBreakOrContinueStatement(252 /* BreakStatement */); case 107 /* ReturnKeyword */: return parseReturnStatement(); case 118 /* WithKeyword */: @@ -35046,7 +35360,7 @@ var Parser; case 129 /* AccessorKeyword */: case 126 /* StaticKeyword */: case 148 /* ReadonlyKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -35071,15 +35385,15 @@ var Parser; return node; } for (const m of modifiers) { - m.flags |= 16777216 /* Ambient */; + m.flags |= 33554432 /* Ambient */; } - return doInsideOfContext(16777216 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); + return doInsideOfContext(33554432 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); } else { return parseDeclarationWorker(pos, hasJSDoc, modifiers); } } function tryReuseAmbientDeclaration(pos) { - return doInsideOfContext(16777216 /* Ambient */, () => { + return doInsideOfContext(33554432 /* Ambient */, () => { const node = currentNode(parsingContext, pos); if (node) { return consumeNode(node); @@ -35091,6 +35405,8 @@ var Parser; case 115 /* VarKeyword */: case 121 /* LetKeyword */: case 87 /* ConstKeyword */: + case 160 /* UsingKeyword */: + case 135 /* AwaitKeyword */: return parseVariableStatement(pos, hasJSDoc, modifiersIn); case 100 /* FunctionKeyword */: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); @@ -35102,7 +35418,7 @@ var Parser; return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); case 94 /* EnumKeyword */: return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); @@ -35122,7 +35438,7 @@ var Parser; default: if (modifiersIn) { const missing = createMissingNode( - 281 /* MissingDeclaration */, + 282 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -35134,6 +35450,9 @@ var Parser; return void 0; } } + function nextTokenIsStringLiteral() { + return nextToken() === 11 /* StringLiteral */; + } function nextTokenIsIdentifierOrStringLiteralOnSameLine() { nextToken(); return !scanner2.hasPrecedingLineBreak() && (isIdentifier2() || token() === 11 /* StringLiteral */); @@ -35186,14 +35505,14 @@ var Parser; function parseObjectBindingPattern() { const pos = getNodePos(); parseExpected(19 /* OpenBraceToken */); - const elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); + const elements = allowInAnd(() => parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement)); parseExpected(20 /* CloseBraceToken */); return finishNode(factory2.createObjectBindingPattern(elements), pos); } function parseArrayBindingPattern() { const pos = getNodePos(); parseExpected(23 /* OpenBracketToken */); - const elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); + const elements = allowInAnd(() => parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement)); parseExpected(24 /* CloseBracketToken */); return finishNode(factory2.createArrayBindingPattern(elements), pos); } @@ -35240,12 +35559,20 @@ var Parser; case 87 /* ConstKeyword */: flags |= 2 /* Const */; break; + case 160 /* UsingKeyword */: + flags |= 4 /* Using */; + break; + case 135 /* AwaitKeyword */: + Debug.assert(isAwaitUsingDeclaration()); + flags |= 6 /* AwaitUsing */; + nextToken(); + break; default: Debug.fail(); } nextToken(); let declarations; - if (token() === 164 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -35351,7 +35678,7 @@ var Parser; function parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken) { const exclamationToken = !questionToken && !scanner2.hasPrecedingLineBreak() ? parseOptionalToken(54 /* ExclamationToken */) : void 0; const type = parseTypeAnnotation(); - const initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer); + const initializer = doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */ | 8192 /* DisallowInContext */, parseInitializer); parseSemicolonAfterPropertyName(name, type, initializer); const node = factory2.createPropertyDeclaration( modifiers, @@ -35391,7 +35718,7 @@ var Parser; false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 176 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -35557,10 +35884,10 @@ var Parser; return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); } if (token() === 137 /* ConstructorKeyword */ || token() === 11 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); @@ -35575,9 +35902,9 @@ var Parser; const isAmbient = some(modifiers, isDeclareModifier); if (isAmbient) { for (const m of modifiers) { - m.flags |= 16777216 /* Ambient */; + m.flags |= 33554432 /* Ambient */; } - return doInsideOfContext(16777216 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); + return doInsideOfContext(33554432 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); } else { return parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers); } @@ -35608,10 +35935,10 @@ var Parser; true ); if (token() === 86 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 230 /* ClassExpression */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 231 /* ClassExpression */); } const missing = createMissingNode( - 281 /* MissingDeclaration */, + 282 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -35626,11 +35953,11 @@ var Parser; hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 230 /* ClassExpression */ + 231 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 262 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 263 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); @@ -35651,7 +35978,7 @@ var Parser; members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 262 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 263 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { @@ -35677,7 +36004,7 @@ var Parser; function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (expression.kind === 233 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -35703,6 +36030,9 @@ var Parser; } function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { parseExpected(156 /* TypeKeyword */); + if (scanner2.hasPrecedingLineBreak()) { + parseErrorAtCurrentToken(Diagnostics.Line_break_not_permitted_here); + } const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(64 /* EqualsToken */); @@ -35743,7 +36073,7 @@ var Parser; return finishNode(factory2.createModuleBlock(statements), pos); } function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) { - const namespaceFlag = flags & 16 /* Namespace */; + const namespaceFlag = flags & 32 /* Namespace */; const name = parseIdentifier(); const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration( getNodePos(), @@ -35751,7 +36081,7 @@ var Parser; false, /*modifiers*/ void 0, - 4 /* NestedNamespace */ | namespaceFlag + 8 /* NestedNamespace */ | namespaceFlag ) : parseModuleBlock(); const node = factory2.createModuleDeclaration(modifiers, name, body, flags); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -35759,9 +36089,9 @@ var Parser; function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; let name; - if (token() === 161 /* GlobalKeyword */) { + if (token() === 162 /* GlobalKeyword */) { name = parseIdentifier(); - flags |= 1024 /* GlobalAugmentation */; + flags |= 2048 /* GlobalAugmentation */; } else { name = parseLiteralNode(); name.text = internIdentifier(name.text); @@ -35777,10 +36107,10 @@ var Parser; } function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; - if (token() === 161 /* GlobalKeyword */) { + if (token() === 162 /* GlobalKeyword */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); } else if (parseOptional(145 /* NamespaceKeyword */)) { - flags |= 16 /* Namespace */; + flags |= 32 /* Namespace */; } else { parseExpected(144 /* ModuleKeyword */); if (token() === 11 /* StringLiteral */) { @@ -35818,7 +36148,7 @@ var Parser; identifier = parseIdentifier(); } let isTypeOnly = false; - if (token() !== 160 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { + if (token() !== 161 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { isTypeOnly = true; identifier = isIdentifier2() ? parseIdentifier() : void 0; } @@ -35830,7 +36160,7 @@ var Parser; token() === 42 /* AsteriskToken */ || // import * token() === 19 /* OpenBraceToken */) { importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(160 /* FromKeyword */); + parseExpected(161 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); let assertClause; @@ -35895,7 +36225,7 @@ var Parser; return token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */; } function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 28 /* CommaToken */ || token() === 160 /* FromKeyword */; + return token() === 28 /* CommaToken */ || token() === 161 /* FromKeyword */; } function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { parseExpected(64 /* EqualsToken */); @@ -35908,7 +36238,7 @@ var Parser; function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(28 /* CommaToken */)) { - namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(274 /* NamedImports */); + namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(275 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -35944,15 +36274,15 @@ var Parser; } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 274 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); + const node = kind === 275 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(280 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(281 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(275 /* ImportSpecifier */); + return parseImportOrExportSpecifier(276 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -35996,10 +36326,10 @@ var Parser; parseExpected(130 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 275 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 276 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 275 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 276 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -36026,12 +36356,12 @@ var Parser; if (parseOptional(130 /* AsKeyword */)) { exportClause = parseNamespaceExport(namespaceExportPos); } - parseExpected(160 /* FromKeyword */); + parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(278 /* NamedExports */); - if (token() === 160 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { - parseExpected(160 /* FromKeyword */); + exportClause = parseNamedImportsOrExports(279 /* NamedExports */); + if (token() === 161 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { + parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } } @@ -36136,7 +36466,7 @@ var Parser; function parseJSDocTypeExpression(mayOmitBraces) { const pos = getNodePos(); const hasBrace = (mayOmitBraces ? parseOptional : parseExpected)(19 /* OpenBraceToken */); - const type = doInsideOfContext(8388608 /* JSDoc */, parseJSDocType); + const type = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); if (!mayOmitBraces || hasBrace) { parseExpectedJSDoc(20 /* CloseBraceToken */); } @@ -36175,7 +36505,7 @@ var Parser; void 0, 1 /* JS */ ); - const jsDoc = doInsideOfContext(8388608 /* JSDoc */, () => parseJSDocCommentWorker(start2, length2)); + const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start2, length2)); const sourceFile = { languageVariant: 0 /* Standard */, text: content }; const diagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); clearState(); @@ -36186,9 +36516,9 @@ var Parser; const saveToken = currentToken; const saveParseDiagnosticsLength = parseDiagnostics.length; const saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; - const comment = doInsideOfContext(8388608 /* JSDoc */, () => parseJSDocCommentWorker(start2, length2)); + const comment = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start2, length2)); setParent(comment, parent2); - if (contextFlags & 262144 /* JavaScriptFile */) { + if (contextFlags & 524288 /* JavaScriptFile */) { if (!jsDocDiagnostics) { jsDocDiagnostics = []; } @@ -36669,7 +36999,7 @@ var Parser; switch (node.kind) { case 151 /* ObjectKeyword */: return true; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -36685,7 +37015,7 @@ var Parser; typeExpression = tryParseTypeExpression(); } const comment = parseTrailingTagComments(start3, getNodePos(), indent3, indentText); - const nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent3); + const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent3); if (nestedTypeLiteral) { typeExpression = nestedTypeLiteral; isNameFirst = true; @@ -36699,14 +37029,14 @@ var Parser; let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) { - if (child.kind === 347 /* JSDocParameterTag */ || child.kind === 354 /* JSDocPropertyTag */) { + if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) { children = append(children, child); - } else if (child.kind === 351 /* JSDocTemplateTag */) { + } else if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 187 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -36841,11 +37171,11 @@ var Parser; let jsDocPropertyTags; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent3))) { - if (child.kind === 351 /* JSDocTemplateTag */) { + if (child.kind === 352 /* JSDocTemplateTag */) { break; } hasChildren = true; - if (child.kind === 350 /* JSDocTypeTag */) { + if (child.kind === 351 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -36860,7 +37190,7 @@ var Parser; } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 187 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start3); end2 = typeExpression.end; @@ -36889,12 +37219,12 @@ var Parser; void 0, typeNameOrNamespaceName, body, - nested ? 4 /* NestedNamespace */ : void 0 + nested ? 8 /* NestedNamespace */ : void 0 ); return finishNode(jsDocNamespaceNode, start3); } if (nested) { - typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */; + typeNameOrNamespaceName.flags |= 4096 /* IdentifierIsInJSDocNamespace */; } return typeNameOrNamespaceName; } @@ -36903,7 +37233,7 @@ var Parser; let child; let parameters; while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent3))) { - if (child.kind === 351 /* JSDocTemplateTag */) { + if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); break; } @@ -36916,7 +37246,7 @@ var Parser; const returnTag = tryParse(() => { if (parseOptionalJsdoc(60 /* AtToken */)) { const tag = parseTag(indent3); - if (tag && tag.kind === 348 /* JSDocReturnTag */) { + if (tag && tag.kind === 349 /* JSDocReturnTag */) { return tag; } } @@ -36971,7 +37301,7 @@ var Parser; case 60 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent3); - if (child && (child.kind === 347 /* JSDocParameterTag */ || child.kind === 354 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -37036,7 +37366,7 @@ var Parser; if (isBracketed) { skipWhitespace(); parseExpected(64 /* EqualsToken */); - defaultType = doInsideOfContext(8388608 /* JSDoc */, parseJSDocType); + defaultType = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); parseExpected(24 /* CloseBracketToken */); } if (nodeIsMissing(name)) { @@ -37604,7 +37934,7 @@ function getNamedArgRegEx(name) { return result; } var tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/im; -var singleLinePragmaRegEx = /^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im; +var singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im; function extractPragmas(pragmas, range, text) { const tripleSlash = range.kind === 2 /* SingleLineCommentTrivia */ && tripleSlashXMLCommentStartRegEx.exec(text); if (tripleSlash) { @@ -37696,7 +38026,7 @@ function tagNamesAreEquivalent(lhs, rhs) { if (lhs.kind === 110 /* ThisKeyword */) { return true; } - if (lhs.kind === 294 /* JsxNamespacedName */) { + if (lhs.kind === 295 /* JsxNamespacedName */) { return lhs.namespace.escapedText === rhs.namespace.escapedText && lhs.name.escapedText === rhs.name.escapedText; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -37749,6 +38079,7 @@ var libEntries = [ ["es2015.symbol", "lib.es2015.symbol.d.ts"], ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], ["es2016.array.include", "lib.es2016.array.include.d.ts"], + ["es2017.date", "lib.es2017.date.d.ts"], ["es2017.object", "lib.es2017.object.d.ts"], ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], ["es2017.string", "lib.es2017.string.d.ts"], @@ -37784,14 +38115,18 @@ var libEntries = [ ["es2022.string", "lib.es2022.string.d.ts"], ["es2022.regexp", "lib.es2022.regexp.d.ts"], ["es2023.array", "lib.es2023.array.d.ts"], + ["es2023.collection", "lib.es2023.collection.d.ts"], ["esnext.array", "lib.es2023.array.d.ts"], + ["esnext.collection", "lib.es2023.collection.d.ts"], ["esnext.symbol", "lib.es2019.symbol.d.ts"], ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], ["esnext.intl", "lib.esnext.intl.d.ts"], + ["esnext.disposable", "lib.esnext.disposable.d.ts"], ["esnext.bigint", "lib.es2020.bigint.d.ts"], ["esnext.string", "lib.es2022.string.d.ts"], ["esnext.promise", "lib.es2021.promise.d.ts"], ["esnext.weakref", "lib.es2021.weakref.d.ts"], + ["esnext.decorators", "lib.esnext.decorators.d.ts"], ["decorators", "lib.decorators.d.ts"], ["decorators.legacy", "lib.decorators.legacy.d.ts"] ]; @@ -38199,6 +38534,7 @@ var commandOptionsWithoutBuild = [ { name: "checkJs", type: "boolean", + affectsModuleResolution: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, @@ -38425,7 +38761,7 @@ var commandOptionsWithoutBuild = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any, - defaultValueDescription: false + defaultValueDescription: Diagnostics.false_unless_strict_is_set }, { name: "alwaysStrict", @@ -39615,7 +39951,7 @@ function getTsconfigRootOptionsMap() { function convertConfigFileToObject(sourceFile, errors, jsonConversionNotifier) { var _a; const rootExpression = (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression; - if (rootExpression && rootExpression.kind !== 209 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -39667,7 +40003,7 @@ function convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConv var _a; const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 302 /* PropertyAssignment */) { + if (element.kind !== 303 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -39712,15 +40048,15 @@ function convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConv return valueExpression.text; case 9 /* NumericLiteral */: return Number(valueExpression.text); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: if (valueExpression.operator !== 41 /* MinusToken */ || valueExpression.operand.kind !== 9 /* NumericLiteral */) { break; } return -Number(valueExpression.operand.text); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: const objectLiteralExpression = valueExpression; return convertObjectLiteralExpressionToJson(objectLiteralExpression, option); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return convertArrayLiteralExpressionToJson( valueExpression.elements, option && option.element @@ -40104,8 +40440,8 @@ function parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, exis const fileName = configFileName || "tsconfig.json"; const diagnosticMessage = Diagnostics.The_files_list_in_config_file_0_is_empty; const nodeValue = forEachTsConfigPropArray(sourceFile, "files", (property) => property.initializer); - const error = createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnosticMessage, fileName); - errors.push(error); + const error2 = createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnosticMessage, fileName); + errors.push(error2); } else { createCompilerDiagnosticOnlyIfJson(Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json"); } @@ -40212,8 +40548,8 @@ function parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, exis } } } -function isErrorNoInputFiles(error) { - return error.code === Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code; +function isErrorNoInputFiles(error2) { + return error2.code === Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code; } function getErrorForNoInputFiles({ includeSpecs, excludeSpecs }, configFileName) { return createCompilerDiagnostic( @@ -40234,7 +40570,7 @@ function updateErrorForNoInputFiles(fileNames, configFileName, configFileSpecs, if (shouldReportNoInputFiles(fileNames, canJsonReportNoInutFiles)) { configParseDiagnostics.push(getErrorForNoInputFiles(configFileSpecs, configFileName)); } else { - filterMutate(configParseDiagnostics, (error) => !isErrorNoInputFiles(error)); + filterMutate(configParseDiagnostics, (error2) => !isErrorNoInputFiles(error2)); } return existingErrors !== configParseDiagnostics.length; } @@ -40644,19 +40980,19 @@ function getFileNamesFromConfigSpecs(configFileSpecs, basePath, options, host, e const wildcardFiles = arrayFrom(wildcardFileMap.values()); return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values())); } -function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames, currentDirectory) { +function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) { const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec; if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs)) return false; basePath = normalizePath(basePath); - const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames); + const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2); if (validatedFilesSpec) { for (const fileName of validatedFilesSpec) { if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck) return false; } } - return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath); + return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath); } function invalidDotDotAfterRecursiveWildcard(s) { const wildcardIndex = startsWith(s, "**/") ? 0 : s.indexOf("/**/"); @@ -40666,17 +41002,17 @@ function invalidDotDotAfterRecursiveWildcard(s) { const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../"); return lastDotIndex > wildcardIndex; } -function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) { +function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) { return matchesExcludeWorker( pathToCheck, filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)), - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, currentDirectory ); } -function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) { +function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) { const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude"); - const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames); + const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2); if (!excludeRegex) return false; if (excludeRegex.test(pathToCheck)) @@ -40706,9 +41042,9 @@ function specToDiagnostic(spec, disallowTrailingRecursion) { return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec]; } } -function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames) { +function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames2) { const rawExcludeRegex = getRegularExpressionForWildcard(exclude, path, "exclude"); - const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i"); + const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? "" : "i"); const wildcardDirectories = {}; if (include !== void 0) { const recursiveKeys = []; @@ -40717,7 +41053,7 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu if (excludeRegex && excludeRegex.test(spec)) { continue; } - const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames); + const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2); if (match) { const { key, flags } = match; const existingFlags = wildcardDirectories[key]; @@ -40732,7 +41068,7 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu for (const key in wildcardDirectories) { if (hasProperty(wildcardDirectories, key)) { for (const recursiveKey of recursiveKeys) { - if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) { + if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames2)) { delete wildcardDirectories[key]; } } @@ -40741,20 +41077,20 @@ function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExclu } return wildcardDirectories; } -function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames) { +function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) { const match = wildcardDirectoryPattern.exec(spec); if (match) { const questionWildcardIndex = spec.indexOf("?"); const starWildcardIndex = spec.indexOf("*"); const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator); return { - key: useCaseSensitiveFileNames ? match[0] : toFileNameLowerCase(match[0]), + key: useCaseSensitiveFileNames2 ? match[0] : toFileNameLowerCase(match[0]), flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */ }; } if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) { return { - key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : toFileNameLowerCase(spec)), + key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames2 ? spec : toFileNameLowerCase(spec)), flags: 1 /* Recursive */ }; } @@ -40900,6 +41236,18 @@ function formatExtensions(extensions) { result.push("JSON"); return result.join(", "); } +function extensionsToExtensionsArray(extensions) { + const result = []; + if (extensions & 1 /* TypeScript */) + result.push(...supportedTSImplementationExtensions); + if (extensions & 2 /* JavaScript */) + result.push(...supportedJSExtensionsFlat); + if (extensions & 4 /* Declaration */) + result.push(...supportedDeclarationExtensions); + if (extensions & 8 /* Json */) + result.push(".json" /* Json */); + return result; +} function resolvedTypeScriptOnly(resolved) { if (!resolved) { return void 0; @@ -41074,8 +41422,8 @@ function getDefaultTypeRoots(currentDirectory) { } var nodeModulesAtTypes = combinePaths("node_modules", "@types"); function arePathsEqual(path1, path2, host) { - const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; - return comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0 /* EqualTo */; + const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; + return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */; } function getOriginalAndResolvedFileName(fileName, host, traceEnabled) { const resolvedFileName = realPath(fileName, host, traceEnabled); @@ -41378,7 +41726,7 @@ function compilerOptionValueToString(value) { return str + "}"; } function getKeyForCompilerOptions(options, affectingOptionDeclarations) { - return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + (options.pathsBasePath ? `|${options.pathsBasePath}` : void 0); + return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + `|${options.pathsBasePath}`; } function createCacheWithRedirects(ownOptions) { const redirectsMap = /* @__PURE__ */ new Map(); @@ -42352,7 +42700,7 @@ function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache arrayIsEqualTo ); for (const conditions of conditionSets) { - const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions }; + const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions, host }; const exportResolutions = loadEntrypointsFromExportMap( packageJsonInfo, packageJsonInfo.contents.packageJsonContent.exports, @@ -42384,23 +42732,42 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) { return entrypoints; function loadEntrypointsFromTargetExports(target) { var _a, _b; - if (typeof target === "string" && startsWith(target, "./") && target.indexOf("*") === -1) { - const partsAfterFirst = getPathComponents(target).slice(2); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { - return false; - } - const resolvedTarget = combinePaths(scope.packageDirectory, target); - const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); - const result = loadFileNameFromPackageJsonField( - extensions, - finalPath, - /*onlyRecordFailures*/ - false, - state - ); - if (result) { - entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path); - return true; + if (typeof target === "string" && startsWith(target, "./")) { + if (target.indexOf("*") >= 0 && state.host.readDirectory) { + if (target.indexOf("*") !== target.lastIndexOf("*")) { + return false; + } + state.host.readDirectory( + scope.packageDirectory, + extensionsToExtensionsArray(extensions), + /*excludes*/ + void 0, + [changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))] + ).forEach((entry) => { + entrypoints = appendIfUnique(entrypoints, { + path: entry, + ext: getAnyExtensionFromPath(entry), + resolvedUsingTsExtension: void 0 + }); + }); + } else { + const partsAfterFirst = getPathComponents(target).slice(2); + if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { + return false; + } + const resolvedTarget = combinePaths(scope.packageDirectory, target); + const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); + const result = loadFileNameFromPackageJsonField( + extensions, + finalPath, + /*onlyRecordFailures*/ + false, + state + ); + if (result) { + entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path); + return true; + } } } else if (Array.isArray(target)) { for (const t of target) { @@ -42609,6 +42976,9 @@ function loadModuleFromSelfNameReference(extensions, moduleName, directory, stat } const trailingParts = parts.slice(nameParts.length); const subpath = !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`; + if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) { + return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference); + } const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference); @@ -42956,13 +43326,10 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec function combineDirectoryPath(root, dir) { return ensureTrailingDirectorySeparator(combinePaths(root, dir)); } - function useCaseSensitiveFileNames() { - return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); - } function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { var _a, _b, _c, _d; - if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames()) : true)) { - const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames }); + if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { + const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses = []; if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName)); @@ -42991,7 +43358,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec for (const commonSourceDirGuess of commonSourceDirGuesses) { const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess); for (const candidateDir of candidateDirectories) { - if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) { + if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) { const pathFragment = finalPath.slice(candidateDir.length + 1); const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment); const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */]; @@ -43001,7 +43368,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec for (const possibleExt of inputExts) { if (!extensionIsOk(extensions, possibleExt)) continue; - const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames()); + const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state)); if (state.host.fileExists(possibleInputWithInputExtension)) { return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField( extensions, @@ -43075,11 +43442,13 @@ function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); if (priorityExtensions) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, formatExtensions(priorityExtensions)); const result = lookup(priorityExtensions); if (result) return result; } if (secondaryExtensions && !typesScopeOnly) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0, formatExtensions(secondaryExtensions)); return lookup(secondaryExtensions); } function lookup(extensions2) { @@ -43416,6 +43785,9 @@ function traceIfEnabled(state, diagnostic, ...args) { trace(state.host, diagnostic, ...args); } } +function useCaseSensitiveFileNames(state) { + return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); +} // src/compiler/binder.ts var ModuleInstanceState = /* @__PURE__ */ ((ModuleInstanceState2) => { @@ -43447,23 +43819,23 @@ function getModuleInstanceStateCached(node, visited = /* @__PURE__ */ new Map()) } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 278 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 279 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -43477,7 +43849,7 @@ function getModuleInstanceStateWorker(node, visited) { return state; } break; - case 267 /* ModuleBlock */: { + case 268 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -43496,10 +43868,10 @@ function getModuleInstanceStateWorker(node, visited) { }); return state; } - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 80 /* Identifier */: - if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { return 0 /* NonInstantiated */; } } @@ -43529,6 +43901,9 @@ function getModuleInstanceStateForAliasTarget(specifier, visited) { if (found === 1 /* Instantiated */) { return found; } + if (statement.kind === 271 /* ImportEqualsDeclaration */) { + found = 1 /* Instantiated */; + } } } if (found !== void 0) { @@ -43539,6 +43914,18 @@ function getModuleInstanceStateForAliasTarget(specifier, visited) { } return 1 /* Instantiated */; } +var ContainerFlags = /* @__PURE__ */ ((ContainerFlags2) => { + ContainerFlags2[ContainerFlags2["None"] = 0] = "None"; + ContainerFlags2[ContainerFlags2["IsContainer"] = 1] = "IsContainer"; + ContainerFlags2[ContainerFlags2["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; + ContainerFlags2[ContainerFlags2["IsControlFlowContainer"] = 4] = "IsControlFlowContainer"; + ContainerFlags2[ContainerFlags2["IsFunctionLike"] = 8] = "IsFunctionLike"; + ContainerFlags2[ContainerFlags2["IsFunctionExpression"] = 16] = "IsFunctionExpression"; + ContainerFlags2[ContainerFlags2["HasLocals"] = 32] = "HasLocals"; + ContainerFlags2[ContainerFlags2["IsInterface"] = 64] = "IsInterface"; + ContainerFlags2[ContainerFlags2["IsObjectLiteralOrClassExpressionMethodOrAccessor"] = 128] = "IsObjectLiteralOrClassExpressionMethodOrAccessor"; + return ContainerFlags2; +})(ContainerFlags || {}); function initFlowNode(node) { Debug.attachFlowNodeDebugInfo(node); return node; @@ -43663,7 +44050,7 @@ function createBinder() { } } function getDeclarationName(node) { - if (node.kind === 276 /* ExportAssignment */) { + if (node.kind === 277 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -43672,7 +44059,7 @@ function createBinder() { const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -43697,31 +44084,31 @@ function createBinder() { return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return "__constructor" /* Constructor */; - case 183 /* FunctionType */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: + case 184 /* FunctionType */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: return "__call" /* Call */; - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: return "__new" /* New */; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return "__index" /* Index */; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return "export=" /* ExportEquals */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); break; - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 168 /* Parameter */: - Debug.assert(node.parent.kind === 323 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 169 /* Parameter */: + Debug.assert(node.parent.kind === 324 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); const functionType = node.parent; const index = functionType.parameters.indexOf(node); return "arg" + index; @@ -43768,7 +44155,7 @@ function createBinder() { messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 276 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 277 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -43807,7 +44194,7 @@ function createBinder() { function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 280 /* ExportSpecifier */ || node.kind === 270 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { Debug.assertNode(container, canHaveLocals); @@ -43823,7 +44210,7 @@ function createBinder() { } else { if (isJSDocTypeAlias(node)) Debug.assert(isInJSFile(node)); - if (!isAmbientModule(node) && (hasExportModifier || container.flags & 64 /* ExportContext */)) { + if (!isAmbientModule(node) && (hasExportModifier || container.flags & 128 /* ExportContext */)) { if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } @@ -43874,7 +44261,7 @@ function createBinder() { const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 218 /* ArrowFunction */) { + if (node.kind !== 219 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -43896,35 +44283,35 @@ function createBinder() { const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 174 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 175 /* Constructor */ || isInJSFile(node) && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; activeLabelList = void 0; hasExplicitReturn = false; bindChildren(node); - node.flags &= ~2816 /* ReachabilityAndEmitFlags */; + node.flags &= ~5632 /* ReachabilityAndEmitFlags */; if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && nodeIsPresent(node.body)) { - node.flags |= 256 /* HasImplicitReturn */; + node.flags |= 512 /* HasImplicitReturn */; if (hasExplicitReturn) - node.flags |= 512 /* HasExplicitReturn */; + node.flags |= 1024 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 175 /* Constructor */ || node.kind === 174 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */)) { + if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -43941,7 +44328,7 @@ function createBinder() { seenThisKeyword = false; bindChildren(node); Debug.assertNotNode(node, isIdentifier); - node.flags = seenThisKeyword ? node.flags | 128 /* ContainsThis */ : node.flags & ~128 /* ContainsThis */; + node.flags = seenThisKeyword ? node.flags | 256 /* ContainsThis */ : node.flags & ~256 /* ContainsThis */; } else { bindChildren(node); } @@ -43950,8 +44337,8 @@ function createBinder() { blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 261 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 261 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 262 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 262 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -43971,59 +44358,59 @@ function createBinder() { inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 242 /* FirstStatement */ && node.kind <= 258 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: bindWhileStatement(node); break; - case 245 /* DoStatement */: + case 246 /* DoStatement */: bindDoStatement(node); break; - case 247 /* ForStatement */: + case 248 /* ForStatement */: bindForStatement(node); break; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 244 /* IfStatement */: + case 245 /* IfStatement */: bindIfStatement(node); break; - case 252 /* ReturnStatement */: - case 256 /* ThrowStatement */: + case 253 /* ReturnStatement */: + case 257 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: bindTryStatement(node); break; - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: bindSwitchStatement(node); break; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: bindCaseBlock(node); break; - case 295 /* CaseClause */: + case 296 /* CaseClause */: bindCaseClause(node); break; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: bindLabeledStatement(node); break; - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -44031,49 +44418,49 @@ function createBinder() { } bindBinaryExpressionFlow(node); break; - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: bindCallExpressionFlow(node); break; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 311 /* SourceFile */: { + case 312 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 240 /* Block */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 268 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: bindBindingElementFlow(node); break; - case 168 /* Parameter */: + case 169 /* Parameter */: bindParameterFlow(node); break; - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: - case 302 /* PropertyAssignment */: - case 229 /* SpreadElement */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: + case 303 /* PropertyAssignment */: + case 230 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -44087,19 +44474,19 @@ function createBinder() { case 80 /* Identifier */: case 81 /* PrivateIdentifier */: case 110 /* ThisKeyword */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return hasNarrowableArgument(expr); - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return expr.operator === 54 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -44118,7 +44505,7 @@ function createBinder() { } } } - if (expr.expression.kind === 210 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -44149,9 +44536,9 @@ function createBinder() { } function isNarrowableOperand(expr) { switch (expr.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 64 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -44224,21 +44611,21 @@ function createBinder() { function isStatementCondition(node) { const parent3 = node.parent; switch (parent3.kind) { - case 244 /* IfStatement */: - case 246 /* WhileStatement */: - case 245 /* DoStatement */: + case 245 /* IfStatement */: + case 247 /* WhileStatement */: + case 246 /* DoStatement */: return parent3.expression === node; - case 247 /* ForStatement */: - case 226 /* ConditionalExpression */: + case 248 /* ForStatement */: + case 227 /* ConditionalExpression */: return parent3.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 216 /* ParenthesizedExpression */) { + if (node.kind === 217 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 223 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { + } else if (node.kind === 224 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { node = node.operand; } else { return isLogicalOrCoalescingBinaryExpression(node); @@ -44281,7 +44668,7 @@ function createBinder() { } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 255 /* LabeledStatement */) { + while (label && node.parent.kind === 256 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -44332,12 +44719,12 @@ function createBinder() { bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 249 /* ForOfStatement */) { + if (node.kind === 250 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 260 /* VariableDeclarationList */) { + if (node.initializer.kind !== 261 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -44359,7 +44746,7 @@ function createBinder() { } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 252 /* ReturnStatement */) { + if (node.kind === 253 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -44376,7 +44763,7 @@ function createBinder() { return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 251 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 252 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -44446,7 +44833,7 @@ function createBinder() { preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 296 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 297 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -44489,7 +44876,7 @@ function createBinder() { maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { const call = node; if (call.expression.kind !== 108 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); @@ -44515,7 +44902,7 @@ function createBinder() { currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { + if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -44524,21 +44911,21 @@ function createBinder() { function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 208 /* ArrayLiteralExpression */) { + } else if (node.kind === 209 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 229 /* SpreadElement */) { + if (e.kind === 230 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 209 /* ObjectLiteralExpression */) { + } else if (node.kind === 210 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 302 /* PropertyAssignment */) { + if (p.kind === 303 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 303 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 304 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 304 /* SpreadAssignment */) { + } else if (p.kind === 305 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -44669,7 +45056,7 @@ function createBinder() { const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 64 /* EqualsToken */ && node.left.kind === 211 /* ElementAccessExpression */) { + if (operator === 64 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -44697,7 +45084,7 @@ function createBinder() { } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 210 /* PropertyAccessExpression */) { + if (node.expression.kind === 211 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -44762,7 +45149,7 @@ function createBinder() { } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 346 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 347 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive( node.fullName, @@ -44777,7 +45164,7 @@ function createBinder() { function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 173 /* MethodDeclaration */) { + if (host && host.kind !== 174 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -44790,15 +45177,15 @@ function createBinder() { } function bindOptionalChainRest(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -44845,7 +45232,7 @@ function createBinder() { bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 217 /* FunctionExpression */ || expr.kind === 218 /* ArrowFunction */) { + if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -44856,7 +45243,7 @@ function createBinder() { } } } - if (node.expression.kind === 210 /* PropertyAccessExpression */) { + if (node.expression.kind === 211 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -44871,39 +45258,39 @@ function createBinder() { } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 311 /* SourceFile */: + case 312 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 209 /* ObjectLiteralExpression */: - case 263 /* InterfaceDeclaration */: - case 291 /* JsxAttributes */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 210 /* ObjectLiteralExpression */: + case 264 /* InterfaceDeclaration */: + case 292 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 329 /* JSDocSignature */: - case 180 /* IndexSignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 323 /* JSDocFunctionType */: - case 174 /* ClassStaticBlockDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 199 /* MappedType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 330 /* JSDocSignature */: + case 181 /* IndexSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 324 /* JSDocFunctionType */: + case 175 /* ClassStaticBlockDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 200 /* MappedType */: if (container.locals) Debug.assertNode(container, canHaveLocals); return declareSymbol( @@ -44934,10 +45321,10 @@ function createBinder() { return !!body && body.statements.some((s) => isExportDeclaration(s) || isExportAssignment(s)); } function setExportContextFlag(node) { - if (node.flags & 16777216 /* Ambient */ && !hasExportDeclarations(node)) { - node.flags |= 64 /* ExportContext */; + if (node.flags & 33554432 /* Ambient */ && !hasExportDeclarations(node)) { + node.flags |= 128 /* ExportContext */; } else { - node.flags &= ~64 /* ExportContext */; + node.flags &= ~128 /* ExportContext */; } } function bindModuleDeclaration(node) { @@ -45005,10 +45392,10 @@ function createBinder() { } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -45040,7 +45427,7 @@ function createBinder() { const saveCurrentFlow = currentFlow; for (const typeAlias of delayedTypeAliases) { const host = typeAlias.parent.parent; - container = findAncestor(host.parent, (n) => !!(getContainerFlags(n) & 1 /* IsContainer */)) || file; + container = getEnclosingContainer(host) || file; blockScopeContainer = getEnclosingBlockScopeContainer(host) || file; currentFlow = initFlowNode({ flags: 2 /* Start */ }); parent2 = typeAlias; @@ -45098,7 +45485,7 @@ function createBinder() { currentFlow = saveCurrentFlow; } function checkContextualIdentifier(node) { - if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) { + if (!file.parseDiagnostics.length && !(node.flags & 33554432 /* Ambient */) && !(node.flags & 16777216 /* JSDoc */) && !isIdentifierName(node)) { const originalKeywordKind = identifierToKeywordKind(node); if (originalKeywordKind === void 0) { return; @@ -45116,14 +45503,14 @@ function createBinder() { Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, declarationNameToString(node) )); - } else if (node.flags & 32768 /* AwaitContext */) { + } else if (node.flags & 65536 /* AwaitContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node) )); } - } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { + } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 16384 /* YieldContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, @@ -45211,7 +45598,7 @@ function createBinder() { } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 311 /* SourceFile */ && blockScopeContainer.kind !== 266 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 312 /* SourceFile */ && blockScopeContainer.kind !== 267 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -45273,7 +45660,7 @@ function createBinder() { node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 164 /* LastToken */) { + if (node.kind > 165 /* LastToken */) { const saveParent = parent2; parent2 = node; const containerFlags = getContainerFlags(node); @@ -45330,7 +45717,7 @@ function createBinder() { function bindWorker(node) { switch (node.kind) { case 80 /* Identifier */: - if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { let parentNode = node.parent; while (parentNode && !isJSDocTypeAlias(parentNode)) { parentNode = parentNode.parent; @@ -45339,23 +45726,23 @@ function createBinder() { break; } case 110 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 303 /* ShorthandPropertyAssignment */)) { + if (currentFlow && (isExpression(node) || parent2.kind === 304 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: case 108 /* SuperKeyword */: node.flowNode = currentFlow; break; case 81 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -45374,7 +45761,7 @@ function createBinder() { ); } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -45409,81 +45796,81 @@ function createBinder() { Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return checkStrictModeCatchClause(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return checkStrictModeWithStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 196 /* ThisType */: + case 197 /* ThisType */: seenThisKeyword = true; return; - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return bindTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return bindParameter(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return bindPropertyWorker(node); - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 305 /* EnumMember */: + case 306 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return declareSymbolAndAddToSymbolTable( node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */ ); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 183 /* FunctionType */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 185 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 199 /* MappedType */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 200 /* MappedType */: return bindAnonymousTypeWorker(node); - case 338 /* JSDocClassTag */: + case 339 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return bindFunctionExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -45501,60 +45888,60 @@ function createBinder() { bindCallExpression(node); } break; - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return bindJsxAttributes(node); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 270 /* ImportEqualsDeclaration */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 271 /* ImportEqualsDeclaration */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return bindImportClause(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return bindExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return bindExportAssignment(node); - case 311 /* SourceFile */: + case 312 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 240 /* Block */: + case 241 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 347 /* JSDocParameterTag */: - if (node.parent.kind === 329 /* JSDocSignature */) { + case 348 /* JSDocParameterTag */: + if (node.parent.kind === 330 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 328 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 329 /* JSDocTypeLiteral */) { break; } - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 322 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 323 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return bind(node.typeExpression); } } @@ -45706,8 +46093,8 @@ function createBinder() { false ); switch (thisContainer.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 64 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -45725,12 +46112,12 @@ function createBinder() { addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -45747,7 +46134,7 @@ function createBinder() { ); } break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -45756,7 +46143,7 @@ function createBinder() { declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */); } break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: break; default: Debug.failBadSyntaxKind(thisContainer); @@ -45784,7 +46171,7 @@ function createBinder() { function bindSpecialPropertyDeclaration(node) { if (node.expression.kind === 110 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 311 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 312 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -45833,7 +46220,7 @@ function createBinder() { } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 311 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 312 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces( namespaceSymbol, node.arguments[0], @@ -45947,7 +46334,7 @@ function createBinder() { declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 311 /* SourceFile */ : propertyAccess.parent.parent.kind === 311 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 312 /* SourceFile */ : propertyAccess.parent.parent.kind === 312 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -46009,7 +46396,7 @@ function createBinder() { } } function bindClassLikeDeclaration(node) { - if (node.kind === 262 /* ClassDeclaration */) { + if (node.kind === 263 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -46038,7 +46425,7 @@ function createBinder() { checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 259 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -46051,10 +46438,10 @@ function createBinder() { } } function bindParameter(node) { - if (node.kind === 347 /* JSDocParameterTag */ && container.kind !== 329 /* JSDocSignature */) { + if (node.kind === 348 /* JSDocParameterTag */ && container.kind !== 330 /* JSDocSignature */) { return; } - if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { + if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) { checkStrictModeEvalOrArguments(node, node.name); } if (isBindingPattern(node.name)) { @@ -46068,9 +46455,9 @@ function createBinder() { } } function bindFunctionDeclaration(node) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */)) { + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) { if (isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + emitFlags |= 4096 /* HasAsyncFunctions */; } } checkStrictModeFunctionName(node); @@ -46082,9 +46469,9 @@ function createBinder() { } } function bindFunctionExpression(node) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */)) { + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) { if (isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + emitFlags |= 4096 /* HasAsyncFunctions */; } } if (currentFlow) { @@ -46095,8 +46482,8 @@ function createBinder() { return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); } function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */) && isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */) && isAsyncFunction(node)) { + emitFlags |= 4096 /* HasAsyncFunctions */; } if (currentFlow && isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { node.flowNode = currentFlow; @@ -46124,7 +46511,7 @@ function createBinder() { } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 194 /* InferType */) { + } else if (node.parent.kind === 195 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { Debug.assertNode(container2, canHaveLocals); @@ -46155,14 +46542,14 @@ function createBinder() { if (currentFlow === unreachableFlow) { const reportError = ( // report error on all statements except empty ones - isStatementButNotDeclaration(node) && node.kind !== 241 /* EmptyStatement */ || // report error on class declarations - node.kind === 262 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - node.kind === 266 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) + isStatementButNotDeclaration(node) && node.kind !== 242 /* EmptyStatement */ || // report error on class declarations + node.kind === 263 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + node.kind === 267 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) ); if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { - const isError = unreachableCodeIsError(options) && !(node.flags & 16777216 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 3 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer)); + const isError = unreachableCodeIsError(options) && !(node.flags & 33554432 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 7 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer)); eachUnreachableRange(node, (start2, end) => errorOrSuggestionOnRange(isError, start2, end, Diagnostics.Unreachable_code_detected)); } } @@ -46181,16 +46568,16 @@ function eachUnreachableRange(node, cb) { } function isExecutableStatement(s) { return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && !isEnumDeclaration(s) && // `var x;` may declare a variable used above - !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & (1 /* Let */ | 2 /* Const */)) && s.declarationList.declarations.some((d) => !d.initializer)); + !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & 7 /* BlockScoped */) && s.declarationList.declarations.some((d) => !d.initializer)); } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -46225,54 +46612,54 @@ function isExportsOrModuleExportsOrAlias(sourceFile, node) { } function getContainerFlags(node) { switch (node.kind) { - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 291 /* JsxAttributes */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 292 /* JsxAttributes */: return 1 /* IsContainer */; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 199 /* MappedType */: - case 180 /* IndexSignature */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 200 /* MappedType */: + case 181 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: - case 323 /* JSDocFunctionType */: - case 183 /* FunctionType */: - case 179 /* ConstructSignature */: - case 184 /* ConstructorType */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: + case 324 /* JSDocFunctionType */: + case 184 /* FunctionType */: + case 180 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 175 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 298 /* CatchClause */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 268 /* CaseBlock */: + case 299 /* CatchClause */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 269 /* CaseBlock */: return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - case 240 /* Block */: + case 241 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; } return 0 /* None */; @@ -46433,7 +46820,7 @@ function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignatu symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 185 /* TypeQuery */) { + if (d.type && d.type.kind === 186 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -46857,7 +47244,7 @@ function tryGetModuleNameFromAmbientModule(moduleSymbol, checker) { if (originalExportSymbol === d.symbol) return topNamespace.parent.parent; function getTopNamespace(namespaceDeclaration) { - while (namespaceDeclaration.flags & 4 /* NestedNamespace */) { + while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { namespaceDeclaration = namespaceDeclaration.parent; } return namespaceDeclaration; @@ -46887,7 +47274,9 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, hos for (const { ending, value } of candidates) { if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) { const matchedStar = value.substring(prefix.length, value.length - suffix.length); - return pathIsRelative(matchedStar) ? void 0 : key.replace("*", matchedStar); + if (!pathIsRelative(matchedStar)) { + return key.replace("*", matchedStar); + } } } } else if (some(candidates, (c) => c.ending !== 0 /* Minimal */ && pattern === c.value) || some(candidates, (c) => c.ending === 0 /* Minimal */ && pattern === c.value && validateEnding(c))) { @@ -46959,7 +47348,7 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, for (const key of getOwnKeys(exports)) { if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = exports[key]; - const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions); + const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode); if (result) { return result; } @@ -47302,6 +47691,7 @@ var CheckMode = /* @__PURE__ */ ((CheckMode3) => { CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; CheckMode3[CheckMode3["IsForStringLiteralArgumentCompletions"] = 32] = "IsForStringLiteralArgumentCompletions"; CheckMode3[CheckMode3["RestBindingElement"] = 64] = "RestBindingElement"; + CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly"; return CheckMode3; })(CheckMode || {}); var SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => { @@ -47372,6 +47762,7 @@ function createTypeChecker(host) { var moduleKind = getEmitModuleKind(compilerOptions); var legacyDecorators = !!compilerOptions.experimentalDecorators; var useDefineForClassFields = getUseDefineForClassFields(compilerOptions); + var emitStandardClassFields = getEmitStandardClassFields(compilerOptions); var allowSyntheticDefaultImports = getAllowSyntheticDefaultImports(compilerOptions); var strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks"); var strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes"); @@ -47399,6 +47790,10 @@ function createTypeChecker(host) { var isolatedModulesLikeFlagName = compilerOptions.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"; var canCollectSymbolAliasAccessabilityData = !compilerOptions.verbatimModuleSyntax || !!compilerOptions.importsNotUsedAsValues; var apparentArgumentCount; + var lastGetCombinedNodeFlagsNode; + var lastGetCombinedNodeFlagsResult = 0 /* None */; + var lastGetCombinedModifierFlagsNode; + var lastGetCombinedModifierFlagsResult = 0 /* None */; const checker = { getNodeCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.nodeCount, 0), getIdentifierCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.identifierCount, 0), @@ -47458,7 +47853,7 @@ function createTypeChecker(host) { return node ? getTypeFromTypeNode(node) : errorType; }, getParameterType: getTypeAtPosition, - getParameterIdentifierNameAtPosition, + getParameterIdentifierInfoAtPosition, getPromisedTypeOfPromise, getAwaitedType: (type) => getAwaitedType(type), getReturnTypeOfSignature, @@ -47576,13 +47971,24 @@ function createTypeChecker(host) { getTypeOfPropertyOfContextualType, getFullyQualifiedName, getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */), - getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray) => runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - 32 /* IsForStringLiteralArgumentCompletions */ - )), + getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) => { + if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) { + return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( + call, + candidatesOutArray, + /*argumentCount*/ + void 0, + checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ + )); + } + return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( + call, + candidatesOutArray, + /*argumentCount*/ + void 0, + checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ + )); + }, getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)), getExpandedParameters, hasEffectiveRestParameter, @@ -47756,7 +48162,7 @@ function createTypeChecker(host) { Debug.assert(!!(getNodeLinks(file).flags & 1 /* TypeChecked */)); diagnostics2 = addRange(diagnostics2, suggestionDiagnostics.getDiagnostics(file.fileName)); checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(file), (containingNode, kind, diag2) => { - if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 16777216 /* Ambient */))) { + if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) { (diagnostics2 || (diagnostics2 = [])).push({ ...diag2, category: 2 /* Suggestion */ }); } }); @@ -47782,14 +48188,19 @@ function createTypeChecker(host) { typeHasCallOrConstructSignatures }; function runWithoutResolvedSignatureCaching(node, fn) { - const containingCall = findAncestor(node, isCallLikeExpression); - const containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; - if (containingCall) { - getNodeLinks(containingCall).resolvedSignature = void 0; + const cachedSignatures = []; + while (node) { + if (isCallLikeExpression(node)) { + const nodeLinks2 = getNodeLinks(node); + const resolvedSignature = nodeLinks2.resolvedSignature; + cachedSignatures.push([nodeLinks2, resolvedSignature]); + nodeLinks2.resolvedSignature = void 0; + } + node = node.parent; } const result = fn(); - if (containingCall) { - getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + for (const [nodeLinks2, resolvedSignature] of cachedSignatures) { + nodeLinks2.resolvedSignature = resolvedSignature; } return result; } @@ -48095,7 +48506,7 @@ function createTypeChecker(host) { }; var amalgamatedDuplicates; var reverseMappedCache = /* @__PURE__ */ new Map(); - var inInferTypeForHomomorphicMappedType = false; + var homomorphicMappedTypeInferenceStack = []; var ambientModulesCache; var patternAmbientModules; var patternAmbientModuleAugmentations; @@ -48136,6 +48547,8 @@ function createTypeChecker(host) { var deferredGlobalImportMetaType; var deferredGlobalImportMetaExpressionType; var deferredGlobalImportCallOptionsType; + var deferredGlobalDisposableType; + var deferredGlobalAsyncDisposableType; var deferredGlobalExtractSymbol; var deferredGlobalOmitSymbol; var deferredGlobalAwaitedSymbol; @@ -48307,14 +48720,14 @@ function createTypeChecker(host) { } } function errorSkippedOn(key, location, message, ...args) { - const diagnostic = error(location, message, ...args); + const diagnostic = error2(location, message, ...args); diagnostic.skippedOn = key; return diagnostic; } function createError(location, message, ...args) { return location ? createDiagnosticForNode(location, message, ...args) : createCompilerDiagnostic(message, ...args); } - function error(location, message, ...args) { + function error2(location, message, ...args) { const diagnostic = createError(location, message, ...args); diagnostics.add(diagnostic); return diagnostic; @@ -48338,7 +48751,7 @@ function createTypeChecker(host) { addErrorOrSuggestion(isError, "message" in message ? createDiagnosticForNode(location, message, ...args) : createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(location), location, message)); } function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, ...args) { - const diagnostic = error(location, message, ...args); + const diagnostic = error2(location, message, ...args); if (maybeMissingAwait) { const related = createDiagnosticForNode(location, Diagnostics.Did_you_forget_to_use_await); addRelatedInfo(diagnostic, related); @@ -48364,7 +48777,7 @@ function createTypeChecker(host) { return !!symbol.valueDeclaration && isDeprecatedDeclaration2(symbol.valueDeclaration) || length(symbol.declarations) && every(symbol.declarations, isDeprecatedDeclaration2); } function isDeprecatedDeclaration2(declaration) { - return !!(getCombinedNodeFlags(declaration) & 268435456 /* Deprecated */); + return !!(getCombinedNodeFlagsCached(declaration) & 536870912 /* Deprecated */); } function addDeprecatedSuggestion(location, declarations, deprecatedEntity) { const diagnostic = createDiagnosticForNode(location, Diagnostics._0_is_deprecated, deprecatedEntity); @@ -48484,7 +48897,7 @@ function createTypeChecker(host) { } } else if (target.flags & 1024 /* NamespaceModule */) { if (target !== globalThisSymbol) { - error( + error2( source.declarations && getNameOfDeclaration(source.declarations[0]), Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target) @@ -48578,7 +48991,7 @@ function createTypeChecker(host) { if (isGlobalScopeAugmentation(moduleAugmentation)) { mergeSymbolTable(globals, moduleAugmentation.symbol.exports); } else { - const moduleNotFoundError = !(moduleName.parent.parent.flags & 16777216 /* Ambient */) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : void 0; + const moduleNotFoundError = !(moduleName.parent.parent.flags & 33554432 /* Ambient */) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : void 0; let mainModule = resolveExternalModuleNameWorker( moduleName, moduleName, @@ -48614,7 +49027,7 @@ function createTypeChecker(host) { mergeSymbol(mainModule, moduleAugmentation.symbol); } } else { - error(moduleName, Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, moduleName.text); + error2(moduleName, Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, moduleName.text); } } } @@ -48642,7 +49055,7 @@ function createTypeChecker(host) { return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 311 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 312 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function getSymbol2(symbols, name, meaning) { if (meaning) { @@ -48653,7 +49066,7 @@ function createTypeChecker(host) { return symbol; } if (symbol.flags & 2097152 /* Alias */) { - const targetFlags = getAllSymbolFlags(symbol); + const targetFlags = getSymbolFlags(symbol); if (targetFlags & meaning) { return symbol; } @@ -48676,7 +49089,7 @@ function createTypeChecker(host) { const useFile = getSourceFileOfNode(usage); const declContainer = getEnclosingBlockScopeContainer(declaration); if (declarationFile !== useFile) { - if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !outFile(compilerOptions) || isInTypeQuery(usage) || declaration.flags & 16777216 /* Ambient */) { + if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !outFile(compilerOptions) || isInTypeQuery(usage) || declaration.flags & 33554432 /* Ambient */) { return true; } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { @@ -48686,13 +49099,13 @@ function createTypeChecker(host) { return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 207 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 207 /* BindingElement */); + if (declaration.kind === 208 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 259 /* VariableDeclaration */), usage); - } else if (declaration.kind === 259 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 260 /* VariableDeclaration */), usage); + } else if (declaration.kind === 260 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -48704,21 +49117,21 @@ function createTypeChecker(host) { false ); } else if (isParameterPropertyDeclaration(declaration, declaration.parent)) { - return !(getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration)); + return !(emitStandardClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration)); } return true; } - if (usage.parent.kind === 280 /* ExportSpecifier */ || usage.parent.kind === 276 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 281 /* ExportSpecifier */ || usage.parent.kind === 277 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 276 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) { return true; } - if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { + if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { return true; } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { - if (getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ && useDefineForClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { + if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { return !isPropertyImmediatelyReferencedWithinDeclaration( declaration, usage, @@ -48732,9 +49145,9 @@ function createTypeChecker(host) { return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 242 /* VariableStatement */: - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: + case 243 /* VariableStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -48759,7 +49172,7 @@ function createTypeChecker(host) { const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 173 /* MethodDeclaration */) { + if (declaration2.kind === 174 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -48773,7 +49186,7 @@ function createTypeChecker(host) { } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 171 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -48792,15 +49205,15 @@ function createTypeChecker(host) { return "quit"; } switch (node.kind) { - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 240 /* Block */: + case 241 /* Block */: switch (node.parent.kind) { - case 176 /* GetAccessor */: - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: return true; default: return false; @@ -48830,19 +49243,19 @@ function createTypeChecker(host) { } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 175 /* Constructor */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: return false; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 302 /* PropertyAssignment */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 303 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasStaticModifier(node)) { - return target < 99 /* ESNext */ || !useDefineForClassFields; + return !emitStandardClassFields; } return requiresScopeChangeWorker(node.name); default: @@ -48881,7 +49294,7 @@ function createTypeChecker(host) { if (name === "const" && isConstAssertion(location)) { return void 0; } - if (isModuleDeclaration(location) && lastLocation && location.name === lastLocation) { + if (isModuleOrEnumDeclaration(location) && lastLocation && location.name === lastLocation) { lastLocation = location; location = location.parent; } @@ -48889,17 +49302,17 @@ function createTypeChecker(host) { if (result = lookup(location.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 326 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 168 /* Parameter */ || lastLocation.kind === 347 /* JSDocParameterTag */ || lastLocation.kind === 348 /* JSDocReturnTag */ || lastLocation.kind === 167 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 327 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 348 /* JSDocParameterTag */ || lastLocation.kind === 349 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 168 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 169 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 193 /* ConditionalType */) { + } else if (location.kind === 194 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -48911,13 +49324,13 @@ function createTypeChecker(host) { } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const moduleExports = ((_a = getSymbolOfDeclaration(location)) == null ? void 0 : _a.exports) || emptySymbols; - if (location.kind === 311 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 312 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 33554432 /* Ambient */ && !isGlobalScopeAugmentation(location)) { if (result = moduleExports.get("default" /* Default */)) { const localSymbol = getLocalSymbolForExportDefault(result); if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { @@ -48926,7 +49339,7 @@ function createTypeChecker(host) { result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 280 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 279 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 281 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 280 /* NamespaceExport */))) { break; } } @@ -48938,10 +49351,10 @@ function createTypeChecker(host) { } } break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { - if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 16777216 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { - error( + if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 33554432 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { + error2( errorLocation, Diagnostics.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead, unescapeLeadingUnderscores(name), @@ -48952,7 +49365,7 @@ function createTypeChecker(host) { break loop; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -48963,9 +49376,9 @@ function createTypeChecker(host) { } } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -48973,7 +49386,7 @@ function createTypeChecker(host) { } if (lastLocation && isStatic(lastLocation)) { if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.Static_members_cannot_reference_class_type_parameters); + error2(errorLocation, Diagnostics.Static_members_cannot_reference_class_type_parameters); } return void 0; } @@ -48987,43 +49400,43 @@ function createTypeChecker(host) { } } break; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: if (lastLocation === location.expression && location.parent.token === 96 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) { if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters); + error2(errorLocation, Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters); } return void 0; } } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 263 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 264 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); + error2(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); } return void 0; } } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -49036,37 +49449,37 @@ function createTypeChecker(host) { } } break; - case 169 /* Decorator */: - if (location.parent && location.parent.kind === 168 /* Parameter */) { + case 170 /* Decorator */: + if (location.parent && location.parent.kind === 169 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 262 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 263 /* ClassDeclaration */)) { location = location.parent; } break; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 194 /* InferType */: + case 195 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -49075,7 +49488,7 @@ function createTypeChecker(host) { } } break; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: if (lastLocation && lastLocation === location.propertyName && location.parent.parent.moduleSpecifier) { location = location.parent.parent.parent; } @@ -49113,8 +49526,8 @@ function createTypeChecker(host) { } } function checkAndReportErrorForInvalidInitializer() { - if (propertyWithInvalidInitializer && !(useDefineForClassFields && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */)) { - error( + if (propertyWithInvalidInitializer && !emitStandardClassFields) { + error2( errorLocation, errorLocation && propertyWithInvalidInitializer.type && textRangeContainsPositionInclusive(propertyWithInvalidInitializer.type, errorLocation.pos) ? Diagnostics.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor : Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, declarationNameToString(propertyWithInvalidInitializer.name), @@ -49127,14 +49540,14 @@ function createTypeChecker(host) { if (!result) { if (nameNotFoundMessage) { addLazyDiagnostic(() => { - if (!errorLocation || errorLocation.parent.kind !== 330 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 + if (!errorLocation || errorLocation.parent.kind !== 331 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 !checkAndReportErrorForInvalidInitializer() && !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingNamespaceAsTypeOrValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { let suggestion; let suggestedLib; if (nameArg) { suggestedLib = getSuggestedLibForNonExistentName(nameArg); if (suggestedLib) { - error(errorLocation, nameNotFoundMessage, diagnosticName(nameArg), suggestedLib); + error2(errorLocation, nameNotFoundMessage, diagnosticName(nameArg), suggestedLib); } } if (!suggestedLib && getSpellingSuggestions && suggestionCount < maximumSuggestionCount) { @@ -49163,7 +49576,7 @@ function createTypeChecker(host) { } } if (!suggestion && !suggestedLib && nameArg) { - error(errorLocation, nameNotFoundMessage, diagnosticName(nameArg)); + error2(errorLocation, nameNotFoundMessage, diagnosticName(nameArg)); } suggestionCount++; } @@ -49181,7 +49594,7 @@ function createTypeChecker(host) { checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } - if (result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(originalLocation.flags & 8388608 /* JSDoc */)) { + if (result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(originalLocation.flags & 16777216 /* JSDoc */)) { const merged = getMergedSymbol(result); if (length(merged.declarations) && every(merged.declarations, (d) => isNamespaceExportDeclaration(d) || isSourceFile(d) && !!d.symbol.globalExports)) { errorOrSuggestion(!compilerOptions.allowUmdGlobalAccess, errorLocation, Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, unescapeLeadingUnderscores(name)); @@ -49191,18 +49604,18 @@ function createTypeChecker(host) { const candidate = getMergedSymbol(getLateBoundSymbol(result)); const root = getRootDeclaration(associatedDeclarationForContainingInitializerOrBindingName); if (candidate === getSymbolOfDeclaration(associatedDeclarationForContainingInitializerOrBindingName)) { - error(errorLocation, Diagnostics.Parameter_0_cannot_reference_itself, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name)); + error2(errorLocation, Diagnostics.Parameter_0_cannot_reference_itself, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name)); } else if (candidate.valueDeclaration && candidate.valueDeclaration.pos > associatedDeclarationForContainingInitializerOrBindingName.pos && root.parent.locals && lookup(root.parent.locals, candidate.escapedName, meaning) === candidate) { - error(errorLocation, Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), declarationNameToString(errorLocation)); + error2(errorLocation, Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), declarationNameToString(errorLocation)); } } if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */); if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 279 /* NamespaceExport */ ? 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 message = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? 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 unescapedName = unescapeLeadingUnderscores(name); addTypeOnlyDeclarationRelatedInfo( - error(errorLocation, message, unescapedName), + error2(errorLocation, message, unescapedName), typeOnlyDeclaration, unescapedName ); @@ -49219,14 +49632,14 @@ function createTypeChecker(host) { diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 279 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 218 /* ArrowFunction */ && location.kind !== 217 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 171 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 219 /* ArrowFunction */ && location.kind !== 218 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 172 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -49238,12 +49651,12 @@ function createTypeChecker(host) { } function isSelfReferenceLocation(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 266 /* ModuleDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 267 /* ModuleDeclaration */: return true; default: return false; @@ -49255,7 +49668,7 @@ function createTypeChecker(host) { function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 167 /* TypeParameter */) { + if (decl.kind === 168 /* TypeParameter */) { const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent2 === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -49285,13 +49698,13 @@ function createTypeChecker(host) { } const constructorType = getTypeOfSymbol(classSymbol); if (getPropertyOfType(constructorType, name)) { - error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, diagnosticName(nameArg), symbolToString(classSymbol)); + error2(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, diagnosticName(nameArg), symbolToString(classSymbol)); return true; } if (location === container && !isStatic(location)) { const instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType; if (getPropertyOfType(instanceType, name)) { - error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, diagnosticName(nameArg)); + error2(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, diagnosticName(nameArg)); return true; } } @@ -49308,7 +49721,7 @@ function createTypeChecker(host) { /*ignoreErrors*/ true )) { - error(errorLocation, Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements, getTextOfNode(expression)); + error2(errorLocation, Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements, getTextOfNode(expression)); return true; } return false; @@ -49316,9 +49729,9 @@ function createTypeChecker(host) { function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -49347,7 +49760,7 @@ function createTypeChecker(host) { const propName = parent2.right.escapedText; const propType = getPropertyOfType(getDeclaredTypeOfSymbol(symbol), propName); if (propType) { - error( + error2( parent2, Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, unescapeLeadingUnderscores(name), @@ -49356,7 +49769,7 @@ function createTypeChecker(host) { return true; } } - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name)); return true; } } @@ -49376,7 +49789,7 @@ function createTypeChecker(host) { false )); if (symbol && !(symbol.flags & 1920 /* Namespace */)) { - error(errorLocation, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, unescapeLeadingUnderscores(name)); return true; } } @@ -49386,8 +49799,8 @@ function createTypeChecker(host) { return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 280 /* ExportSpecifier */) { - error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 281 /* ExportSpecifier */) { + error2(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } return false; @@ -49396,9 +49809,9 @@ function createTypeChecker(host) { if (meaning & 111551 /* Value */) { if (isPrimitiveTypeName(name)) { if (isExtendedByInterface(errorLocation)) { - error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name)); } else { - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name)); } return true; } @@ -49413,15 +49826,15 @@ function createTypeChecker(host) { /*isUse*/ false )); - const allFlags = symbol && getAllSymbolFlags(symbol); + const allFlags = symbol && getSymbolFlags(symbol); if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) { const rawName = unescapeLeadingUnderscores(name); if (isES2015OrLaterConstructorName(name)) { - error(errorLocation, Diagnostics._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, rawName); + error2(errorLocation, Diagnostics._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, rawName); } else if (maybeMappedType(errorLocation, symbol)) { - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === "K" ? "P" : "K"); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === "K" ? "P" : "K"); } else { - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName); } return true; } @@ -49477,7 +49890,7 @@ function createTypeChecker(host) { false )); if (symbol) { - error( + error2( errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_value, unescapeLeadingUnderscores(name) @@ -49497,7 +49910,7 @@ function createTypeChecker(host) { false )); if (symbol) { - error(errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_type, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_type, unescapeLeadingUnderscores(name)); return true; } } @@ -49510,19 +49923,19 @@ function createTypeChecker(host) { return; } const declaration = (_a = result.declarations) == null ? void 0 : _a.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 265 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 266 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); - if (!(declaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { + if (!(declaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { let diagnosticMessage; const declarationName = declarationNameToString(getNameOfDeclaration(declaration)); if (result.flags & 2 /* BlockScopedVariable */) { - diagnosticMessage = error(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationName); + diagnosticMessage = error2(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationName); } else if (result.flags & 32 /* Class */) { - diagnosticMessage = error(errorLocation, Diagnostics.Class_0_used_before_its_declaration, declarationName); + diagnosticMessage = error2(errorLocation, Diagnostics.Class_0_used_before_its_declaration, declarationName); } else if (result.flags & 256 /* RegularEnum */) { - diagnosticMessage = error(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); + diagnosticMessage = error2(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { addRelatedInfo( @@ -49537,13 +49950,13 @@ function createTypeChecker(host) { } function getAnyImportSyntax(node) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return node; - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.parent; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.parent; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -49553,7 +49966,7 @@ function createTypeChecker(host) { return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); } function isAliasSymbolDeclaration2(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 269 /* NamespaceExportDeclaration */ || node.kind === 272 /* ImportClause */ && !!node.name || node.kind === 273 /* NamespaceImport */ || node.kind === 279 /* NamespaceExport */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 280 /* ExportSpecifier */ || node.kind === 276 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 303 /* ShorthandPropertyAssignment */ || node.kind === 302 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 259 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 207 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 304 /* ShorthandPropertyAssignment */ || node.kind === 303 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 260 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -49564,7 +49977,7 @@ function createTypeChecker(host) { const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; } - if (isVariableDeclaration(node) || node.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 283 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -49593,11 +50006,11 @@ function createTypeChecker(host) { false ) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node)); - const isExport = typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */; + const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */; 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 = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; - const name = typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); - addRelatedInfo(error(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); + const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + addRelatedInfo(error2(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); } } function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) { @@ -49702,7 +50115,7 @@ function createTypeChecker(host) { const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; const exportEqualsSymbol = moduleSymbol.exports.get("export=" /* ExportEquals */); const exportAssignment = exportEqualsSymbol.valueDeclaration; - const err = error(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName); + const err = error2(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName); if (exportAssignment) { addRelatedInfo(err, createDiagnosticForNode( exportAssignment, @@ -49738,15 +50151,15 @@ function createTypeChecker(host) { } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.parent.moduleSpecifier; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -49755,14 +50168,14 @@ function createTypeChecker(host) { function reportNonDefaultExport(moduleSymbol, node) { var _a, _b, _c; if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has(node.symbol.escapedName)) { - error( + error2( node.name, Diagnostics.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead, symbolToString(moduleSymbol), symbolToString(node.symbol) ); } else { - const diagnostic = error(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); + const diagnostic = error2(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); const exportStar = (_b = moduleSymbol.exports) == null ? void 0 : _b.get("__export" /* ExportStar */); if (exportStar) { const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find((decl) => { @@ -49913,7 +50326,7 @@ function createTypeChecker(host) { const suggestion = getSuggestedSymbolForNonexistentModule(name, targetSymbol); if (suggestion !== void 0) { const suggestionName = symbolToString(suggestion); - const diagnostic = error(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); + const diagnostic = error2(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); if (suggestion.valueDeclaration) { addRelatedInfo( diagnostic, @@ -49922,7 +50335,7 @@ function createTypeChecker(host) { } } else { if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has("default" /* Default */)) { - error( + error2( name, Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, @@ -49940,10 +50353,10 @@ function createTypeChecker(host) { if (localSymbol) { const exportedEqualsSymbol = exports == null ? void 0 : exports.get("export=" /* ExportEquals */); if (exportedEqualsSymbol) { - getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) : error(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) : error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); } else { const exportedSymbol = exports ? find(symbolsToArray(exports), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0; - const diagnostic = exportedSymbol ? error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); + const diagnostic = exportedSymbol ? error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); if (localSymbol.declarations) { addRelatedInfo( diagnostic, @@ -49952,20 +50365,20 @@ function createTypeChecker(host) { } } } else { - error(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); } } function reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) { if (moduleKind >= 5 /* ES2015 */) { const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error(name, message, declarationName); + error2(name, message, declarationName); } else { if (isInJSFile(node)) { const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error(name, message, declarationName); + error2(name, message, declarationName); } else { const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import : Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error(name, message, declarationName, declarationName, moduleName); + error2(name, message, declarationName, declarationName, moduleName); } } } @@ -50079,26 +50492,26 @@ function createTypeChecker(host) { } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: - case 259 /* VariableDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 260 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 275 /* ImportSpecifier */: - case 207 /* BindingElement */: + case 276 /* ImportSpecifier */: + case 208 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 276 /* ExportAssignment */: - case 225 /* BinaryExpression */: + case 277 /* ExportAssignment */: + case 226 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return resolveEntityName( node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -50106,10 +50519,10 @@ function createTypeChecker(host) { true, dontRecursivelyResolve ); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -50135,7 +50548,7 @@ function createTypeChecker(host) { if (links.aliasTarget === resolvingSymbol) { links.aliasTarget = target || unknownSymbol; } else { - error(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); + error2(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); } } else if (links.aliasTarget === resolvingSymbol) { links.aliasTarget = unknownSymbol; @@ -50149,11 +50562,23 @@ function createTypeChecker(host) { } return void 0; } - function getAllSymbolFlags(symbol) { - let flags = symbol.flags; + function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) { + const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol); + const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration); + const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName( + typeOnlyDeclaration.moduleSpecifier, + typeOnlyDeclaration.moduleSpecifier, + /*ignoreErrors*/ + true + ) : resolveAlias(typeOnlyDeclaration.symbol)); + const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0; + let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags; let seenSymbols; while (symbol.flags & 2097152 /* Alias */) { - const target = resolveAlias(symbol); + const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol)); + if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) { + break; + } if (target === unknownSymbol) { return 67108863 /* All */; } @@ -50210,8 +50635,8 @@ function createTypeChecker(host) { return links.typeOnlyDeclaration || void 0; } if (links.typeOnlyDeclaration) { - const resolved = links.typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); - return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; + const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); + return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; } return void 0; } @@ -50222,7 +50647,11 @@ function createTypeChecker(host) { const symbol = getSymbolOfDeclaration(node); const target = resolveAlias(symbol); if (target) { - const markAlias = target === unknownSymbol || getAllSymbolFlags(target) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); + const markAlias = target === unknownSymbol || getSymbolFlags( + symbol, + /*excludeTypeOnlyMeanings*/ + true + ) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -50237,7 +50666,7 @@ function createTypeChecker(host) { if (!node) return Debug.fail(); if (isInternalModuleImportEqualsDeclaration(node)) { - if (getAllSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) { + if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) { checkExpressionCached(node.moduleReference); } } @@ -50253,7 +50682,7 @@ function createTypeChecker(host) { if (entityName.kind === 80 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 165 /* QualifiedName */) { + if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) { return resolveEntityName( entityName, 1920 /* Namespace */, @@ -50262,7 +50691,7 @@ function createTypeChecker(host) { dontResolveAlias ); } else { - Debug.assert(entityName.parent.kind === 270 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 271 /* ImportEqualsDeclaration */); return resolveEntityName( entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -50335,9 +50764,9 @@ function createTypeChecker(host) { if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 165 /* QualifiedName */ || name.kind === 210 /* PropertyAccessExpression */) { - const left = name.kind === 165 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 165 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 166 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) { + const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName( left, namespaceMeaning, @@ -50371,13 +50800,13 @@ function createTypeChecker(host) { const declarationName = declarationNameToString(right); const suggestionForNonexistentModule = getSuggestedSymbolForNonexistentModule(right, namespace); if (suggestionForNonexistentModule) { - error(right, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule)); + error2(right, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule)); return void 0; } const containingQualifiedName = isQualifiedName(name) && getContainingQualifiedNameNode(name); const canSuggestTypeof = globalObjectType && meaning & 788968 /* Type */ && containingQualifiedName && !isTypeOfExpression(containingQualifiedName.parent) && tryGetQualifiedNameAsValue(containingQualifiedName); if (canSuggestTypeof) { - error( + error2( containingQualifiedName, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, entityNameToString(containingQualifiedName) @@ -50387,7 +50816,7 @@ function createTypeChecker(host) { if (meaning & 1920 /* Namespace */ && isQualifiedName(name.parent)) { const exportedTypeSymbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(namespace), right.escapedText, 788968 /* Type */)); if (exportedTypeSymbol) { - error( + error2( name.parent.right, Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, symbolToString(exportedTypeSymbol), @@ -50396,7 +50825,7 @@ function createTypeChecker(host) { return void 0; } } - error(right, Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName); + error2(right, Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName); } return void 0; } @@ -50404,7 +50833,7 @@ function createTypeChecker(host) { Debug.assertNever(name, "Unknown entity name kind."); } Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 276 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 277 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly( getAliasDeclarationFromName(name), symbol, @@ -50434,7 +50863,7 @@ function createTypeChecker(host) { } } function getAssignmentDeclarationLocation(node) { - const typeAlias = findAncestor(node, (node2) => !(isJSDocNode(node2) || node2.flags & 8388608 /* JSDoc */) ? "quit" : isJSDocTypeAlias(node2)); + const typeAlias = findAncestor(node, (node2) => !(isJSDocNode(node2) || node2.flags & 16777216 /* JSDoc */) ? "quit" : isJSDocTypeAlias(node2)); if (typeAlias) { return; } @@ -50497,11 +50926,11 @@ function createTypeChecker(host) { return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0; } function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i; + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; if (startsWith(moduleReference, "@types/")) { const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1; const withoutAtTypePrefix = removePrefix(moduleReference, "@types/"); - error(errorNode, diag2, withoutAtTypePrefix, moduleReference); + error2(errorNode, diag2, withoutAtTypePrefix, moduleReference); } const ambientModule = tryFindAmbientModule( moduleReference, @@ -50520,20 +50949,23 @@ function createTypeChecker(host) { const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (resolutionDiagnostic) { - error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); + error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) { const importOrExport = ((_g = findAncestor(location, isImportDeclaration)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); if (importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) { - error( + error2( errorNode, Diagnostics.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead, getSuggestedImportSource(Debug.checkDefined(tryExtractTSExtension(moduleReference))) ); } } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); - error(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); + const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { + const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); + error2(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); + } } if (sourceFile.symbol) { if (resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) { @@ -50550,10 +50982,10 @@ function createTypeChecker(host) { if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) { const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration); const overrideClauseHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); - const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_h = overrideClauseHost.assertions) == null ? void 0 : _h.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; + const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_i = overrideClauseHost.assertions) == null ? void 0 : _i.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) { if (findAncestor(location, isImportEqualsDeclaration)) { - error(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); + error2(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); } else { let diagnosticDetails; const ext = tryGetExtensionFromPath2(currentSourceFile.fileName); @@ -50605,7 +51037,7 @@ function createTypeChecker(host) { return getMergedSymbol(sourceFile.symbol); } if (moduleNotFoundError) { - error(errorNode, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); + error2(errorNode, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); } return void 0; } @@ -50622,7 +51054,7 @@ function createTypeChecker(host) { if (resolvedModule && !resolutionExtensionIsTSOrJson(resolvedModule.extension) && resolutionDiagnostic === void 0 || resolutionDiagnostic === Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type) { if (isForAugmentation) { const diag2 = Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented; - error(errorNode, diag2, moduleReference, resolvedModule.resolvedFileName); + error2(errorNode, diag2, moduleReference, resolvedModule.resolvedFileName); } else { errorOnImplicitAnyModule( /*isError*/ @@ -50640,31 +51072,31 @@ function createTypeChecker(host) { if (resolvedModule) { const redirect = host.getProjectReferenceRedirect(resolvedModule.resolvedFileName); if (redirect) { - error(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName); + error2(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName); return void 0; } } if (resolutionDiagnostic) { - error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); + error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } else { const isExtensionlessRelativePathImport = pathIsRelative(moduleReference) && !hasExtension(moduleReference); const resolutionIsNode16OrNext = moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */; if (!getResolveJsonModule(compilerOptions) && fileExtensionIs(moduleReference, ".json" /* Json */) && moduleResolutionKind !== 1 /* Classic */ && hasJsonModuleEmitEnabled(compilerOptions)) { - error(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference); + error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference); } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) { const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path)); - const suggestedExt = (_i = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _i[1]; + const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1]; if (suggestedExt) { - error( + error2( errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt ); } else { - error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); + error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); } } else { - error(errorNode, moduleNotFoundError, moduleReference); + error2(errorNode, moduleNotFoundError, moduleReference); } } } @@ -50728,9 +51160,9 @@ function createTypeChecker(host) { var _a; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 311 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 312 /* SourceFile */)) { const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; - error(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); + error2(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); return symbol; } const referenceParent = referencingLocation.parent; @@ -51085,12 +51517,12 @@ function createTypeChecker(host) { return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol); } function symbolIsValue(symbol, includeTypeOnlyMembers) { - return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getAllSymbolFlags(symbol) & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol))); + return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */); } function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 175 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -51114,7 +51546,7 @@ function createTypeChecker(host) { function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) { const type = createType(kind); type.intrinsicName = intrinsicName; - type.objectFlags = objectFlags; + type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */; return type; } function createObjectType(objectFlags, symbol) { @@ -51208,11 +51640,11 @@ function createTypeChecker(host) { } } switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const sym = getSymbolOfDeclaration(location); if (result = callback( (sym == null ? void 0 : sym.exports) || emptySymbols, @@ -51225,9 +51657,9 @@ function createTypeChecker(host) { return result; } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: let table; (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -51305,7 +51737,7 @@ function createTypeChecker(host) { return [symbol]; } const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => { - if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 280 /* ExportSpecifier */))) { + if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -51350,9 +51782,9 @@ function createTypeChecker(host) { if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 280 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; - const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; + const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { qualify = true; return true; @@ -51365,10 +51797,10 @@ function createTypeChecker(host) { if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: continue; default: return false; @@ -51504,10 +51936,10 @@ function createTypeChecker(host) { return node && getSymbolOfDeclaration(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -51555,9 +51987,9 @@ function createTypeChecker(host) { } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 185 /* TypeQuery */ || entityName.parent.kind === 232 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 166 /* ComputedPropertyName */) { + if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 165 /* QualifiedName */ || entityName.kind === 210 /* PropertyAccessExpression */ || entityName.parent.kind === 270 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -51623,7 +52055,7 @@ function createTypeChecker(host) { return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 311 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 312 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode( 4 /* Unspecified */, @@ -51640,9 +52072,9 @@ function createTypeChecker(host) { function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 184 /* ConstructorType */ : 183 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 179 /* ConstructSignature */ : 178 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -51744,7 +52176,7 @@ function createTypeChecker(host) { return symbolToExpression(symbol, context, meaning); } function withContext(enclosingDeclaration, flags, tracker, cb) { - Debug.assert(enclosingDeclaration === void 0 || (enclosingDeclaration.flags & 8 /* Synthesized */) === 0); + Debug.assert(enclosingDeclaration === void 0 || (enclosingDeclaration.flags & 16 /* Synthesized */) === 0); const moduleResolverHost = (tracker == null ? void 0 : tracker.trackSymbol) ? tracker.moduleResolverHost : flags & 134217728 /* DoNotIncludeSymbolChain */ ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : void 0; const context = { enclosingDeclaration, @@ -51816,7 +52248,7 @@ function createTypeChecker(host) { } if (type.flags & 64 /* BigInt */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(162 /* BigIntKeyword */); + return factory.createKeywordTypeNode(163 /* BigIntKeyword */); } if (type.flags & 16 /* Boolean */ && !type.aliasSymbol) { context.approximateLength += 7; @@ -52089,11 +52521,13 @@ function createTypeChecker(host) { return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2); } function createMappedTypeNodeFromType(type2) { + var _a2; Debug.assert(!!(type2.flags & 524288 /* Object */)); const readonlyToken = type2.declaration.readonlyToken ? factory.createToken(type2.declaration.readonlyToken.kind) : void 0; const questionToken = type2.declaration.questionToken ? factory.createToken(type2.declaration.questionToken.kind) : void 0; let appropriateConstraintTypeNode; let newTypeVariable; + const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type2) && !(getModifiersTypeFromMappedType(type2).flags & 2 /* Unknown */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && !(getConstraintTypeFromMappedType(type2).flags & 262144 /* TypeParameter */ && ((_a2 = getConstraintOfTypeParameter(getConstraintTypeFromMappedType(type2))) == null ? void 0 : _a2.flags) & 4194304 /* Index */); if (isMappedTypeWithKeyofConstraintDeclaration(type2)) { if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) { const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); @@ -52101,6 +52535,11 @@ function createTypeChecker(host) { newTypeVariable = factory.createTypeReferenceNode(name); } appropriateConstraintTypeNode = factory.createTypeOperatorNode(143 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); + } else if (needsModifierPreservingWrapper) { + const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); + const name = typeParameterToName(newParam, context); + newTypeVariable = factory.createTypeReferenceNode(name); + appropriateConstraintTypeNode = newTypeVariable; } else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context); } @@ -52131,6 +52570,18 @@ function createTypeChecker(host) { result, factory.createKeywordTypeNode(146 /* NeverKeyword */) ); + } else if (needsModifierPreservingWrapper) { + return factory.createConditionalTypeNode( + typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context), + factory.createInferTypeNode(factory.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + factory.cloneNode(newTypeVariable.typeName), + factory.createTypeOperatorNode(143 /* KeyOfKeyword */, typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)) + )), + result, + factory.createKeywordTypeNode(146 /* NeverKeyword */) + ); } return result; } @@ -52182,7 +52633,7 @@ function createTypeChecker(host) { const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method some(symbol.declarations, (declaration) => isStatic(declaration)); const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol - forEach(symbol.declarations, (declaration) => declaration.parent.kind === 311 /* SourceFile */ || declaration.parent.kind === 267 /* ModuleBlock */)); + forEach(symbol.declarations, (declaration) => declaration.parent.kind === 312 /* SourceFile */ || declaration.parent.kind === 268 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && // it is type of the symbol uses itself recursively (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); @@ -52265,12 +52716,12 @@ function createTypeChecker(host) { } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 183 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context); return signatureNode; } } @@ -52310,19 +52761,18 @@ function createTypeChecker(host) { const arity = getTypeReferenceArity(type2); const tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, arity), context); if (tupleConstituentNodes) { - if (type2.target.labeledElementDeclarations) { - for (let i = 0; i < tupleConstituentNodes.length; i++) { - const flags = type2.target.elementFlags[i]; + const { labeledElementDeclarations } = type2.target; + for (let i = 0; i < tupleConstituentNodes.length; i++) { + const flags = type2.target.elementFlags[i]; + const labeledElementDeclaration = labeledElementDeclarations == null ? void 0 : labeledElementDeclarations[i]; + if (labeledElementDeclaration) { tupleConstituentNodes[i] = factory.createNamedTupleMember( flags & 12 /* Variable */ ? factory.createToken(26 /* DotDotDotToken */) : void 0, - factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(type2.target.labeledElementDeclarations[i]))), + factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(labeledElementDeclaration))), flags & 2 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i] ); - } - } else { - for (let i = 0; i < Math.min(arity, tupleConstituentNodes.length); i++) { - const flags = type2.target.elementFlags[i]; + } else { tupleConstituentNodes[i] = flags & 12 /* Variable */ ? factory.createRestTypeNode(flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]) : flags & 2 /* Optional */ ? factory.createOptionalTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]; } } @@ -52456,12 +52906,12 @@ function createTypeChecker(host) { } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 178 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -52545,39 +52995,41 @@ function createTypeChecker(host) { if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); for (const signature of signatures) { - const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 172 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } + if (signatures.length || !optionalToken) { + return; + } + } + let propertyTypeNode; + if (shouldUsePlaceholderForProperty(propertySymbol, context)) { + propertyTypeNode = createElidedInformationPlaceholder(context); } else { - let propertyTypeNode; - if (shouldUsePlaceholderForProperty(propertySymbol, context)) { - propertyTypeNode = createElidedInformationPlaceholder(context); - } else { - if (propertyIsReverseMapped) { - context.reverseMappedStack || (context.reverseMappedStack = []); - context.reverseMappedStack.push(propertySymbol); - } - propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */); - if (propertyIsReverseMapped) { - context.reverseMappedStack.pop(); - } + if (propertyIsReverseMapped) { + context.reverseMappedStack || (context.reverseMappedStack = []); + context.reverseMappedStack.push(propertySymbol); } - const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0; - if (modifiers) { - context.approximateLength += 9; + propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */); + if (propertyIsReverseMapped) { + context.reverseMappedStack.pop(); } - const propertySignature = factory.createPropertySignature( - modifiers, - propertyName, - optionalToken, - propertyTypeNode - ); - typeElements.push(preserveCommentsOn(propertySignature)); } + const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0; + if (modifiers) { + context.approximateLength += 9; + } + const propertySignature = factory.createPropertySignature( + modifiers, + propertyName, + optionalToken, + propertyTypeNode + ); + typeElements.push(preserveCommentsOn(propertySignature)); function preserveCommentsOn(node) { var _a2; - if (some(propertySymbol.declarations, (d) => d.kind === 354 /* JSDocPropertyTag */)) { - const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 354 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) { + const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */); const commentText = getTextOfJSDocComment(d.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -52683,6 +53135,7 @@ function createTypeChecker(host) { ); } function signatureToSignatureDeclarationHelper(signature, kind, context, options) { + var _a; const suppressAny = context.flags & 256 /* SuppressAnyReturnType */; if (suppressAny) context.flags &= ~256 /* SuppressAnyReturnType */; @@ -52732,7 +53185,7 @@ function createTypeChecker(host) { } } } - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 175 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); + const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context); if (thisParameter) { parameters.unshift(thisParameter); @@ -52753,11 +53206,11 @@ function createTypeChecker(host) { } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 184 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 178 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 179 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 172 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodDeclaration */ ? factory.createMethodDeclaration( + const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -52769,25 +53222,25 @@ function createTypeChecker(host) { returnTypeNode, /*body*/ void 0 - ) : kind === 175 /* Constructor */ ? factory.createConstructorDeclaration( + ) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration( modifiers, parameters, /*body*/ void 0 - ) : kind === 176 /* GetAccessor */ ? factory.createGetAccessorDeclaration( + ) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration( modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), parameters, returnTypeNode, /*body*/ void 0 - ) : kind === 177 /* SetAccessor */ ? factory.createSetAccessorDeclaration( + ) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration( modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), parameters, /*body*/ void 0 - ) : kind === 180 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 323 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 183 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 184 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 261 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( + ) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 324 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 262 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -52797,7 +53250,7 @@ function createTypeChecker(host) { returnTypeNode, /*body*/ void 0 - ) : kind === 217 /* FunctionExpression */ ? factory.createFunctionExpression( + ) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression( modifiers, /*asteriskToken*/ void 0, @@ -52806,7 +53259,7 @@ function createTypeChecker(host) { parameters, returnTypeNode, factory.createBlock([]) - ) : kind === 218 /* ArrowFunction */ ? factory.createArrowFunction( + ) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction( modifiers, typeParameters, parameters, @@ -52818,6 +53271,20 @@ function createTypeChecker(host) { if (typeArguments) { node.typeArguments = factory.createNodeArray(typeArguments); } + if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) { + const comment = getTextOfNode( + signature.declaration.parent.parent, + /*includeTrivia*/ + true + ).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n"); + addSyntheticLeadingComment( + node, + 3 /* MultiLineCommentTrivia */, + comment, + /*hasTrailingNewLine*/ + true + ); + } cleanup == null ? void 0 : cleanup(); return node; } @@ -52856,9 +53323,9 @@ function createTypeChecker(host) { return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 168 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 347 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -52868,7 +53335,7 @@ function createTypeChecker(host) { const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(26 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 165 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -53048,11 +53515,11 @@ function createTypeChecker(host) { return top; } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { - let file = getDeclarationOfKind(symbol, 311 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 312 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 311 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 312 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -53532,7 +53999,7 @@ function createTypeChecker(host) { } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 325 /* JSDocNamepathType */) { + if (isJSDocAllType(node) || node.kind === 326 /* JSDocNamepathType */) { return factory.createKeywordTypeNode(133 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { @@ -53696,13 +54163,13 @@ function createTypeChecker(host) { function symbolTableToDeclarationStatements(symbolTable, context, bundled) { const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, - 173 /* MethodDeclaration */, + 174 /* MethodDeclaration */, /*useAccessors*/ true ); const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol( (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), - 172 /* MethodSignature */, + 173 /* MethodSignature */, /*useAccessors*/ false ); @@ -53971,7 +54438,7 @@ function createTypeChecker(host) { if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags); } else { - const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstVariable(symbol) ? 2 /* Const */ : 1 /* Let */; + const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol); let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d)); if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) { @@ -54117,7 +54584,7 @@ function createTypeChecker(host) { if (additionalModifierFlags & 1 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { newModifierFlags |= 1 /* Export */; } - if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 16777216 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { + if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { newModifierFlags |= 2 /* Ambient */; } if (additionalModifierFlags & 1024 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { @@ -54161,8 +54628,8 @@ function createTypeChecker(host) { const baseTypes = getBaseTypes(interfaceType); const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0; const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType)); - const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 178 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 179 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 179 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(96 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( @@ -54179,7 +54646,7 @@ function createTypeChecker(host) { return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */)); } function isTypeOnlyNamespace(symbol) { - return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */)); + return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */)); } function serializeModule(symbol, symbolName2, modifierFlags) { const members = getNamespaceMembersForSerialization(symbol); @@ -54227,7 +54694,7 @@ function createTypeChecker(host) { void 0, factory.createIdentifier(localName), nsBody, - 16 /* Namespace */ + 32 /* Namespace */ ), 0 /* None */); } } @@ -54244,7 +54711,7 @@ function createTypeChecker(host) { function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 261 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 262 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); addResult(setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags); } if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) { @@ -54284,7 +54751,7 @@ function createTypeChecker(host) { void 0, factory.createIdentifier(localName), factory.createModuleBlock([]), - 16 /* Namespace */ + 32 /* Namespace */ ); setParent(fakespace, enclosingDeclaration); fakespace.locals = createSymbolTable(props); @@ -54428,7 +54895,7 @@ function createTypeChecker(host) { [], /*body*/ void 0 - )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 175 /* Constructor */); + )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -54480,8 +54947,8 @@ function createTypeChecker(host) { const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 207 /* BindingElement */: - if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 259 /* VariableDeclaration */) { + case 208 /* BindingElement */: + if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -54507,15 +54974,15 @@ function createTypeChecker(host) { } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); break; - case 303 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 225 /* BinaryExpression */) { + case 304 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 226 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -54538,7 +55005,7 @@ function createTypeChecker(host) { ), modifierFlags); break; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) { serializeMaybeAliasAssignment(symbol); break; @@ -54559,10 +55026,10 @@ function createTypeChecker(host) { ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 272 /* ImportClause */: { + case 273 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -54580,7 +55047,7 @@ function createTypeChecker(host) { ), 0 /* None */); break; } - case 273 /* NamespaceImport */: { + case 274 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -54598,7 +55065,7 @@ function createTypeChecker(host) { ), 0 /* None */); break; } - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: addResult(factory.createExportDeclaration( /*modifiers*/ void 0, @@ -54608,7 +55075,7 @@ function createTypeChecker(host) { factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 275 /* ImportSpecifier */: { + case 276 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -54633,7 +55100,7 @@ function createTypeChecker(host) { ), 0 /* None */); break; } - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -54641,12 +55108,12 @@ function createTypeChecker(host) { specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 225 /* BinaryExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 226 /* BinaryExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -54753,7 +55220,7 @@ function createTypeChecker(host) { void 0, serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled) ) - ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 266 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) + ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) ); addResult( statement, @@ -55126,10 +55593,10 @@ function createTypeChecker(host) { return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 267 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 268 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 311 /* SourceFile */ || isAmbientModule(location); + return location.kind === 312 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -55177,17 +55644,17 @@ function createTypeChecker(host) { if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 259 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 260 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 230 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 231 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -55204,66 +55671,66 @@ function createTypeChecker(host) { return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: - case 346 /* JSDocEnumTag */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 347 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 261 /* FunctionDeclaration */: - case 265 /* EnumDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 262 /* FunctionDeclaration */: + case 266 /* EnumDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 270 /* ImportEqualsDeclaration */ && parent2.kind !== 311 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlagsCached(node) & 1 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent2.kind !== 312 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 175 /* Constructor */: - case 179 /* ConstructSignature */: - case 178 /* CallSignature */: - case 180 /* IndexSignature */: - case 168 /* Parameter */: - case 267 /* ModuleBlock */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 186 /* TypeLiteral */: - case 182 /* TypeReference */: - case 187 /* ArrayType */: - case 188 /* TupleType */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: + case 176 /* Constructor */: + case 180 /* ConstructSignature */: + case 179 /* CallSignature */: + case 181 /* IndexSignature */: + case 169 /* Parameter */: + case 268 /* ModuleBlock */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 187 /* TypeLiteral */: + case 183 /* TypeReference */: + case 188 /* ArrayType */: + case 189 /* TupleType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: return false; - case 167 /* TypeParameter */: - case 311 /* SourceFile */: - case 269 /* NamespaceExportDeclaration */: + case 168 /* TypeParameter */: + case 312 /* SourceFile */: + case 270 /* NamespaceExportDeclaration */: return true; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return false; default: return false; @@ -55272,7 +55739,7 @@ function createTypeChecker(host) { } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 276 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 277 /* ExportAssignment */) { exportSymbol = resolveName( node, node.escapedText, @@ -55283,7 +55750,7 @@ function createTypeChecker(host) { /*isUse*/ false ); - } else if (node.parent.kind === 280 /* ExportSpecifier */) { + } else if (node.parent.kind === 281 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -55387,12 +55854,12 @@ function createTypeChecker(host) { function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 259 /* VariableDeclaration */: - case 260 /* VariableDeclarationList */: - case 275 /* ImportSpecifier */: - case 274 /* NamedImports */: - case 273 /* NamespaceImport */: - case 272 /* ImportClause */: + case 260 /* VariableDeclaration */: + case 261 /* VariableDeclarationList */: + case 276 /* ImportSpecifier */: + case 275 /* NamedImports */: + case 274 /* NamespaceImport */: + case 273 /* ImportClause */: return false; default: return true; @@ -55411,6 +55878,17 @@ function createTypeChecker(host) { var _a; return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType; } + function getTypeOfPropertyOrIndexSignatureOfType(type, name) { + var _a; + let propType; + return getTypeOfPropertyOfType(type, name) || (propType = (_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) && addOptionality( + propType, + /*isProperty*/ + true, + /*isOptional*/ + true + ); + } function isTypeAny(type) { return type && (type.flags & 1 /* Any */) !== 0; } @@ -55510,23 +55988,23 @@ function createTypeChecker(host) { function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return ancestor.initializer; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent2 = node.parent; - if (node.kind === 207 /* BindingElement */ && parent2.kind === 205 /* ObjectBindingPattern */) { + if (node.kind === 208 /* BindingElement */ && parent2.kind === 206 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 302 /* PropertyAssignment */ || node.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent2.elements.indexOf(node); @@ -55545,17 +56023,17 @@ function createTypeChecker(host) { return parentType; } const pattern = declaration.parent; - if (strictNullChecks && declaration.flags & 16777216 /* Ambient */ && isParameterDeclaration(declaration)) { + if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isParameterDeclaration(declaration)) { parentType = getNonNullableType(parentType); } else if (strictNullChecks && pattern.parent.initializer && !(getTypeFacts(getTypeOfInitializer(pattern.parent.initializer)) & 65536 /* EQUndefined */)) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 205 /* ObjectBindingPattern */) { + if (pattern.kind === 206 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { - error(declaration, Diagnostics.Rest_types_may_only_be_created_from_object_types); + error2(declaration, Diagnostics.Rest_types_may_only_be_created_from_object_types); return errorType; } const literalMembers = []; @@ -55615,13 +56093,13 @@ function createTypeChecker(host) { /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 208 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, isProperty = false, isOptional = true) { return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type; } function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) { - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression( declaration.parent.parent.expression, /*checkMode*/ @@ -55629,7 +56107,7 @@ function createTypeChecker(host) { ))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -55648,8 +56126,8 @@ function createTypeChecker(host) { if (declaredType) { return addOptionality(declaredType, isProperty, isOptional); } - if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlags(declaration) & 1 /* Export */) && !(declaration.flags & 16777216 /* Ambient */)) { - if (!(getCombinedNodeFlags(declaration) & 2 /* Const */) && (!declaration.initializer || isNullOrUndefined3(declaration.initializer))) { + if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 1 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { + if (!(getCombinedNodeFlagsCached(declaration) & 6 /* Constant */) && (!declaration.initializer || isNullOrUndefined3(declaration.initializer))) { return autoType; } if (declaration.initializer && isEmptyArrayLiteral2(declaration.initializer)) { @@ -55658,8 +56136,8 @@ function createTypeChecker(host) { } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 177 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 176 /* GetAccessor */); + if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 177 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -55733,7 +56211,7 @@ function createTypeChecker(host) { const links = getSymbolLinks(symbol); if (links.isConstructorDeclaredProperty === void 0) { links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 211 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( /*declaredType*/ void 0, declaration, @@ -55761,7 +56239,7 @@ function createTypeChecker(host) { /*includeClassComputedPropertyName*/ false ); - if (container && (container.kind === 175 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -55788,7 +56266,7 @@ function createTypeChecker(host) { reference.flowNode = staticBlock.returnFlowNode; const flowType = getFlowTypeOfProperty(reference, symbol); if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) { - error(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); + error2(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); } if (everyType(flowType, isNullableType)) { continue; @@ -55804,7 +56282,7 @@ function createTypeChecker(host) { reference.flowNode = constructor.returnFlowNode; const flowType = getFlowTypeOfProperty(reference, symbol); if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) { - error(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); + error2(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); } return everyType(flowType, isNullableType) ? void 0 : convertAutoToAny(flowType); } @@ -55876,7 +56354,7 @@ function createTypeChecker(host) { false, definedInMethod && !definedInConstructor )); - if (symbol.valueDeclaration && filterType(widened, (t) => !!(t.flags & ~98304 /* Nullable */)) === neverType) { + if (symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && filterType(widened, (t) => !!(t.flags & ~98304 /* Nullable */)) === neverType) { reportImplicitAny(symbol.valueDeclaration, anyType); return anyType; } @@ -55979,11 +56457,11 @@ function createTypeChecker(host) { const unescapedName = unescapeLeadingUnderscores(s.escapedName); const exportedMemberName = ((_a = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a.name) || exportedMember.valueDeclaration; addRelatedInfo( - error(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName), + error2(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName), createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here, unescapedName) ); addRelatedInfo( - error(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName), + error2(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName), createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here, unescapedName) ); } @@ -56041,7 +56519,7 @@ function createTypeChecker(host) { /*includeClassComputedPropertyName*/ false ); - return thisContainer.kind === 175 /* Constructor */ || thisContainer.kind === 261 /* FunctionDeclaration */ || thisContainer.kind === 217 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 262 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -56115,7 +56593,7 @@ function createTypeChecker(host) { function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 207 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -56131,7 +56609,7 @@ function createTypeChecker(host) { return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 205 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration( @@ -56172,7 +56650,7 @@ function createTypeChecker(host) { } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 168 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -56246,7 +56724,7 @@ function createTypeChecker(host) { return reportCircularityError(symbol); } let type; - if (declaration.kind === 276 /* ExportAssignment */) { + if (declaration.kind === 277 /* ExportAssignment */) { type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) { type = getWidenedTypeForAssignmentDeclaration(symbol); @@ -56287,13 +56765,13 @@ function createTypeChecker(host) { function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -56318,9 +56796,9 @@ function createTypeChecker(host) { if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 176 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration( accessor, /*reportErrors*/ @@ -56338,13 +56816,13 @@ function createTypeChecker(host) { } if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(getter)) { - error(getter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(getter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } else if (getAnnotatedAccessorTypeNode(setter)) { - error(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } else if (getAnnotatedAccessorTypeNode(accessor)) { - error(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } else if (getter && noImplicitAny) { - error(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); + error2(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } type = anyType; } @@ -56358,11 +56836,11 @@ function createTypeChecker(host) { if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { - error(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } writeType = anyType; } @@ -56398,7 +56876,7 @@ function createTypeChecker(host) { const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 225 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 225 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 226 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 226 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -56440,7 +56918,7 @@ function createTypeChecker(host) { true ); const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0); - links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getAllSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; + links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; } return links.type; } @@ -56455,15 +56933,15 @@ function createTypeChecker(host) { function reportCircularityError(symbol) { const declaration = symbol.valueDeclaration; if (getEffectiveTypeAnnotationNode(declaration)) { - error( + error2( symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol) ); return errorType; } - if (noImplicitAny && (declaration.kind !== 168 /* Parameter */ || declaration.initializer)) { - error( + if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { + error2( symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol) @@ -56576,43 +57054,43 @@ function createTypeChecker(host) { return void 0; } switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 323 /* JSDocFunctionType */: - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 264 /* TypeAliasDeclaration */: - case 351 /* JSDocTemplateTag */: - case 352 /* JSDocTypedefTag */: - case 346 /* JSDocEnumTag */: - case 344 /* JSDocCallbackTag */: - case 199 /* MappedType */: - case 193 /* ConditionalType */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 324 /* JSDocFunctionType */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 265 /* TypeAliasDeclaration */: + case 352 /* JSDocTemplateTag */: + case 353 /* JSDocTypedefTag */: + case 347 /* JSDocEnumTag */: + case 345 /* JSDocCallbackTag */: + case 200 /* MappedType */: + case 194 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 199 /* MappedType */) { + if (node.kind === 200 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))); - } else if (node.kind === 193 /* ConditionalType */) { + } else if (node.kind === 194 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */ || node.kind === 263 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; + const thisType = includeThisTypes && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || node.kind === 264 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 326 /* JSDoc */: { + case 327 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -56622,14 +57100,14 @@ function createTypeChecker(host) { function getOuterTypeParametersOfClassOrInterface(symbol) { var _a; const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a = symbol.declarations) == null ? void 0 : _a.find((decl) => { - if (decl.kind === 263 /* InterfaceDeclaration */) { + if (decl.kind === 264 /* InterfaceDeclaration */) { return true; } - if (decl.kind !== 259 /* VariableDeclaration */) { + if (decl.kind !== 260 /* VariableDeclaration */) { return false; } const initializer = decl.initializer; - return !!initializer && (initializer.kind === 217 /* FunctionExpression */ || initializer.kind === 218 /* ArrowFunction */); + return !!initializer && (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 219 /* ArrowFunction */); }); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); @@ -56640,7 +57118,7 @@ function createTypeChecker(host) { } let result; for (const node of symbol.declarations) { - if (node.kind === 263 /* InterfaceDeclaration */ || node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -56708,11 +57186,11 @@ function createTypeChecker(host) { resolveStructuredTypeMembers(baseConstructorType); } if (!popTypeResolution()) { - error(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol)); + error2(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol)); return type.resolvedBaseConstructorType = errorType; } if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) { - const err = error(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType)); + const err = error2(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType)); if (baseConstructorType.flags & 262144 /* TypeParameter */) { const constraint = getConstraintFromTypeParameter(baseConstructorType); let ctorReturn = unknownType; @@ -56754,7 +57232,7 @@ function createTypeChecker(host) { return resolvedImplementsTypes; } function reportCircularBaseType(node, type) { - error(node, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( + error2(node, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( type, /*enclosingDeclaration*/ void 0, @@ -56778,7 +57256,7 @@ function createTypeChecker(host) { } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 262 /* ClassDeclaration */ || declaration.kind === 263 /* InterfaceDeclaration */) { + if (declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 264 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -56808,7 +57286,7 @@ function createTypeChecker(host) { } else { const constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments, baseTypeNode); if (!constructors.length) { - error(baseTypeNode.expression, Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); + error2(baseTypeNode.expression, Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); return type.resolvedBaseTypes = emptyArray; } baseType = getReturnTypeOfSignature(constructors[0]); @@ -56828,7 +57306,7 @@ function createTypeChecker(host) { return type.resolvedBaseTypes = emptyArray; } if (type === reducedBaseType || hasBaseType(reducedBaseType, type)) { - error( + error2( type.symbol.valueDeclaration, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( @@ -56867,7 +57345,7 @@ function createTypeChecker(host) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 263 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 264 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -56882,7 +57360,7 @@ function createTypeChecker(host) { reportCircularBaseType(declaration, type); } } else { - error(node, Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members); + error2(node, Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members); } } } @@ -56895,8 +57373,8 @@ function createTypeChecker(host) { return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 263 /* InterfaceDeclaration */) { - if (declaration.flags & 128 /* ContainsThis */) { + if (declaration.kind === 264 /* InterfaceDeclaration */) { + if (declaration.flags & 256 /* ContainsThis */) { return false; } const baseTypeNodes = getInterfaceBaseTypeNodes(declaration); @@ -56967,10 +57445,10 @@ function createTypeChecker(host) { } } else { type = errorType; - if (declaration.kind === 346 /* JSDocEnumTag */) { - error(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + if (declaration.kind === 347 /* JSDocEnumTag */) { + error2(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } else { - error(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + error2(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } } links.declaredType = type; @@ -56986,7 +57464,7 @@ function createTypeChecker(host) { const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 265 /* EnumDeclaration */) { + if (declaration.kind === 266 /* EnumDeclaration */) { for (const member of declaration.members) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); @@ -57071,18 +57549,18 @@ function createTypeChecker(host) { case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: case 151 /* ObjectKeyword */: case 116 /* VoidKeyword */: case 157 /* UndefinedKeyword */: case 146 /* NeverKeyword */: - case 200 /* LiteralType */: + case 201 /* LiteralType */: return true; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return isThislessType(node.elementType); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -57098,21 +57576,21 @@ function createTypeChecker(host) { function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 175 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); } function isThisless(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { const declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -57155,9 +57633,6 @@ function createTypeChecker(host) { } return type; } - function isTypeUsableAsPropertyName(type) { - return !!(type.flags & 8576 /* StringOrNumberLiteralOrUnique */); - } function isLateBindableName(node) { if (!isComputedPropertyName(node) && !isElementAccessExpression(node)) { return false; @@ -57178,15 +57653,6 @@ function createTypeChecker(host) { function isNonBindableDynamicName(node) { return isDynamicName(node) && !isLateBindableName(node); } - function getPropertyNameFromType(type) { - if (type.flags & 8192 /* UniqueESSymbol */) { - return type.escapedName; - } - if (type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { - return escapeLeadingUnderscores("" + type.value); - } - return Debug.fail(); - } function addDeclarationToLateBoundSymbol(symbol, member, symbolFlags) { Debug.assert(!!(getCheckFlags(symbol) & 4096 /* Late */), "Expected a late-bound symbol."); symbol.flags |= symbolFlags; @@ -57219,8 +57685,8 @@ function createTypeChecker(host) { if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) { const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations; const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName); - forEach(declarations, (declaration) => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name)); - error(declName || decl, Diagnostics.Duplicate_property_0, name); + forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name)); + error2(declName || decl, Diagnostics.Duplicate_property_0, name); lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */); } lateSymbol.links.nameType = type; @@ -57236,6 +57702,7 @@ function createTypeChecker(host) { return links.resolvedSymbol; } function getResolvedMembersOrExportsOfSymbol(symbol, resolutionKind) { + var _a, _b, _c; const links = getSymbolLinks(symbol); if (!links[resolutionKind]) { const isStatic2 = resolutionKind === "resolvedExports" /* resolvedExports */; @@ -57254,7 +57721,7 @@ function createTypeChecker(host) { } } } - const assignments = symbol.assignmentDeclarationMembers; + const assignments = (((_a = symbol.valueDeclaration) == null ? void 0 : _a.kind) === 219 /* ArrowFunction */ || ((_b = symbol.valueDeclaration) == null ? void 0 : _b.kind) === 218 /* FunctionExpression */) && ((_c = getSymbolOfNode(symbol.valueDeclaration.parent)) == null ? void 0 : _c.assignmentDeclarationMembers) || symbol.assignmentDeclarationMembers; if (assignments) { const decls = arrayFrom(assignments.values()); for (const member of decls) { @@ -57383,7 +57850,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, sig.minArgumentCount, - sig.flags & 39 /* PropagatingFlags */ + sig.flags & 167 /* PropagatingFlags */ ); result.target = sig.target; result.mapper = sig.mapper; @@ -57421,17 +57888,18 @@ function createTypeChecker(host) { function getExpandedParameters(sig, skipUnionExpanding) { if (signatureHasRestParameter(sig)) { const restIndex = sig.parameters.length - 1; + const restName = sig.parameters[restIndex].escapedName; const restType = getTypeOfSymbol(sig.parameters[restIndex]); if (isTupleType(restType)) { - return [expandSignatureParametersWithTupleMembers(restType, restIndex)]; + return [expandSignatureParametersWithTupleMembers(restType, restIndex, restName)]; } else if (!skipUnionExpanding && restType.flags & 1048576 /* Union */ && every(restType.types, isTupleType)) { - return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex)); + return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex, restName)); } } return [sig.parameters]; - function expandSignatureParametersWithTupleMembers(restType, restIndex) { - const elementTypes = getElementTypes(restType); - const associatedNames = getUniqAssociatedNamesFromTupleType(restType); + function expandSignatureParametersWithTupleMembers(restType, restIndex, restName) { + const elementTypes = getTypeArguments(restType); + const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restName); const restParams = map(elementTypes, (t, i) => { const name = associatedNames && associatedNames[i] ? associatedNames[i] : getParameterNameAtPosition(sig, restIndex + i, restType); const flags = restType.target.elementFlags[i]; @@ -57442,10 +57910,10 @@ function createTypeChecker(host) { }); return concatenate(sig.parameters.slice(0, restIndex), restParams); } - function getUniqAssociatedNamesFromTupleType(type) { + function getUniqAssociatedNamesFromTupleType(type, restName) { const associatedNamesMap = /* @__PURE__ */ new Map(); - return map(type.target.labeledElementDeclarations, (labeledElement) => { - const name = getTupleElementLabel(labeledElement); + return map(type.target.labeledElementDeclarations, (labeledElement, i) => { + const name = getTupleElementLabel(labeledElement, i, restName); const prevCounter = associatedNamesMap.get(name); if (prevCounter === void 0) { associatedNamesMap.set(name, 1); @@ -57683,7 +58151,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, minArgCount, - (left.flags | right.flags) & 39 /* PropagatingFlags */ + (left.flags | right.flags) & 167 /* PropagatingFlags */ ); result.compositeKind = 1048576 /* Union */; result.compositeSignatures = concatenate(left.compositeKind !== 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); @@ -57831,20 +58299,17 @@ function createTypeChecker(host) { setStructuredTypeMembers(type, members2, callSignatures, constructSignatures, indexInfos2); return; } - let members = emptySymbols; + let members = getExportsOfSymbol(symbol); let indexInfos; - if (symbol.exports) { - members = getExportsOfSymbol(symbol); - if (symbol === globalThisSymbol) { - const varsOnly = /* @__PURE__ */ new Map(); - members.forEach((p) => { - var _a; - if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) { - varsOnly.set(p.escapedName, p); - } - }); - members = varsOnly; - } + if (symbol === globalThisSymbol) { + const varsOnly = /* @__PURE__ */ new Map(); + members.forEach((p) => { + var _a; + if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) { + varsOnly.set(p.escapedName, p); + } + }); + members = varsOnly; } let baseConstructorIndexInfo; setStructuredTypeMembers(type, members, emptyArray, emptyArray, emptyArray); @@ -57893,7 +58358,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, sig.minArgumentCount, - sig.flags & 39 /* PropagatingFlags */ + sig.flags & 167 /* PropagatingFlags */ ) : void 0 )); } @@ -58060,7 +58525,7 @@ function createTypeChecker(host) { true ) : symbol.links.checkFlags & 524288 /* StripOptional */ ? removeMissingOrUndefinedType(propType) : propType; if (!popTypeResolution()) { - error(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType)); + error2(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType)); type = errorType; } symbol.links.type = type; @@ -58089,7 +58554,7 @@ function createTypeChecker(host) { } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 197 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; + return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -58244,9 +58709,9 @@ function createTypeChecker(host) { function getConstraintOfTypeParameter(typeParameter) { return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0; } - function isConstTypeVariable(type) { + function isConstTypeVariable(type, depth = 0) { var _a; - return !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, isConstTypeVariable) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type)) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0)); + return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); } function getConstraintOfIndexedAccess(type) { return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0; @@ -58386,7 +58851,7 @@ function createTypeChecker(host) { if (t.flags & 262144 /* TypeParameter */) { const errorNode = getConstraintDeclaration(t); if (errorNode) { - const diagnostic = error(errorNode, Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(t)); + const diagnostic = error2(errorNode, Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(t)); if (currentNode && !isNodeDescendantOf(errorNode, currentNode) && !isNodeDescendantOf(currentNode, errorNode)) { addRelatedInfo(diagnostic, createDiagnosticForNode(currentNode, Diagnostics.Circularity_originates_in_type_at_this_location)); } @@ -58803,7 +59268,35 @@ function createTypeChecker(host) { return emptyArray; } function getSignaturesOfType(type, kind) { - return getSignaturesOfStructuredType(getReducedApparentType(type), kind); + const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind); + if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) { + if (type.arrayFallbackSignatures) { + return type.arrayFallbackSignatures; + } + let memberName; + if (everyType(type, (t) => { + var _a; + return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName); + })) { + const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper)); + const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent))); + return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind); + } + type.arrayFallbackSignatures = result; + } + return result; + } + function isArrayOrTupleSymbol(symbol) { + if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) { + return false; + } + return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); + } + function isReadonlyArraySymbol(symbol) { + if (!symbol || !globalReadonlyArrayType.symbol) { + return false; + } + return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); } function findIndexInfo(indexInfos, keyType) { return find(indexInfos, (info) => info.keyType === keyType); @@ -58982,7 +59475,7 @@ function createTypeChecker(host) { } else { parameters.push(paramSymbol); } - if (type && type.kind === 200 /* LiteralType */) { + if (type && type.kind === 201 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -58990,8 +59483,8 @@ function createTypeChecker(host) { minArgumentCount = parameters.length; } } - if ((declaration.kind === 176 /* GetAccessor */ || declaration.kind === 177 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 176 /* GetAccessor */ ? 177 /* SetAccessor */ : 176 /* GetAccessor */; + if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { + const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); @@ -59082,15 +59575,15 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - return node.name.kind === 166 /* ComputedPropertyName */ && traverse(node.name); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name); + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return traverse(node.expression); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -59177,7 +59670,7 @@ function createTypeChecker(host) { function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 196 /* ThisType */ ? createTypePredicate( + return parameterName.kind === 197 /* ThisType */ ? createTypePredicate( node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, /*parameterName*/ void 0, @@ -59209,14 +59702,14 @@ function createTypeChecker(host) { if (signature.declaration) { const typeNode = getEffectiveReturnTypeNode(signature.declaration); if (typeNode) { - error(typeNode, Diagnostics.Return_type_annotation_circularly_references_itself); + error2(typeNode, Diagnostics.Return_type_annotation_circularly_references_itself); } else if (noImplicitAny) { const declaration = signature.declaration; const name = getNameOfDeclaration(declaration); if (name) { - error(name, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, declarationNameToString(name)); + error2(name, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, declarationNameToString(name)); } else { - error(declaration, Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); + error2(declaration, Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); } } } @@ -59227,7 +59720,7 @@ function createTypeChecker(host) { return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 175 /* Constructor */) { + if (declaration.kind === 176 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } const typeNode = getEffectiveReturnTypeNode(declaration); @@ -59243,12 +59736,12 @@ function createTypeChecker(host) { if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 176 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 177 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 178 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -59257,7 +59750,7 @@ function createTypeChecker(host) { return getReturnTypeOfTypeTag(declaration); } function isResolvingReturnTypeOfSignature(signature) { - return !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0; + return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0; } function getRestTypeOfSignature(signature) { return tryGetRestTypeOfSignature(signature) || anyType; @@ -59351,7 +59844,7 @@ function createTypeChecker(host) { var _a; if (!signature.isolatedSignatureType) { const kind = (_a = signature.declaration) == null ? void 0 : _a.kind; - const isConstructor = kind === void 0 || kind === 175 /* Constructor */ || kind === 179 /* ConstructSignature */ || kind === 184 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -59410,9 +59903,9 @@ function createTypeChecker(host) { let inferences; if ((_a = typeParameter.symbol) == null ? void 0 : _a.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 194 /* InferType */) { + if (declaration.parent.kind === 195 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 182 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference); if (typeParameters) { @@ -59430,13 +59923,13 @@ function createTypeChecker(host) { } } } - } else if (grandParent.kind === 168 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 190 /* RestType */ || grandParent.kind === 201 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 203 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 167 /* TypeParameter */ && grandParent.parent.kind === 199 /* MappedType */) { + } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 199 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 193 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 199 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -59461,7 +59954,7 @@ function createTypeChecker(host) { } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 199 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -59470,7 +59963,7 @@ function createTypeChecker(host) { return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 167 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -59555,12 +60048,12 @@ function createTypeChecker(host) { return ((_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 182 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 187 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray; - error( + error2( type.node || currentNode, type.target.symbol ? Diagnostics.Type_arguments_for_0_circularly_reference_themselves : Diagnostics.Tuple_type_arguments_circularly_reference_themselves, type.target.symbol && symbolToString(type.target.symbol) @@ -59589,12 +60082,12 @@ function createTypeChecker(host) { void 0, 2 /* WriteArrayAsGenericType */ ); - error(node, diag2, typeStr, minTypeArgumentCount, typeParameters.length); + error2(node, diag2, typeStr, minTypeArgumentCount, typeParameters.length); if (!isJs) { return errorType; } } - if (node.kind === 182 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference( type, node, @@ -59645,7 +60138,7 @@ function createTypeChecker(host) { const numTypeArguments = length(node.typeArguments); const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters); if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) { - error( + error2( node, minTypeArgumentCount === typeParameters.length ? Diagnostics.Generic_type_0_requires_1_type_argument_s : Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, symbolToString(symbol), @@ -59685,9 +60178,9 @@ function createTypeChecker(host) { } function getTypeReferenceName(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -59699,10 +60192,10 @@ function createTypeChecker(host) { return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 165 /* QualifiedName */ ? name.right : name.kind === 210 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 165 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 210 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -59754,7 +60247,7 @@ function createTypeChecker(host) { const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 204 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -59782,7 +60275,7 @@ function createTypeChecker(host) { return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 188 /* TupleType */ && node.elements.length === 1; + return node.kind === 189 /* TupleType */ && node.elements.length === 1; } function getImpliedConstraint(type, checkNode, extendsNode) { return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0; @@ -59790,17 +60283,17 @@ function createTypeChecker(host) { function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 326 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 327 /* JSDoc */) { const parent2 = node.parent; - if (parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 169 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 193 /* ConditionalType */ && node === parent2.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 194 /* ConditionalType */ && node === parent2.trueType) { const constraint = getImpliedConstraint(type, parent2.checkType, parent2.extendsType); if (constraint) { constraints = append(constraints, constraint); } - } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 199 /* MappedType */ && node === parent2.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && node === parent2.type) { const mappedType = getTypeFromTypeNode(parent2); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -59817,11 +60310,11 @@ function createTypeChecker(host) { return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 182 /* TypeReference */ || node.kind === 204 /* ImportType */); + return !!(node.flags & 16777216 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { - error(node, Diagnostics.Type_0_is_not_generic, symbol ? symbolToString(symbol) : node.typeName ? declarationNameToString(node.typeName) : anon); + error2(node, Diagnostics.Type_0_is_not_generic, symbol ? symbolToString(symbol) : node.typeName ? declarationNameToString(node.typeName) : anon); return false; } return true; @@ -59940,9 +60433,9 @@ function createTypeChecker(host) { if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: return declaration; } } @@ -59953,11 +60446,11 @@ function createTypeChecker(host) { } const type = getDeclaredTypeOfSymbol(symbol); if (!(type.flags & 524288 /* Object */)) { - error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbolName(symbol)); + error2(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbolName(symbol)); return arity ? emptyGenericType : emptyObjectType; } if (length(type.typeParameters) !== arity) { - error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); + error2(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); return arity ? emptyGenericType : emptyObjectType; } return type; @@ -59974,7 +60467,7 @@ function createTypeChecker(host) { getDeclaredTypeOfSymbol(symbol); if (length(getSymbolLinks(symbol).typeParameters) !== arity) { const decl = symbol.declarations && find(symbol.declarations, isTypeAliasDeclaration); - error(decl, Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); + error2(decl, Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); return void 0; } } @@ -60170,6 +60663,22 @@ function createTypeChecker(host) { reportErrors2 )) || emptyGenericType; } + function getGlobalDisposableType(reportErrors2) { + return deferredGlobalDisposableType || (deferredGlobalDisposableType = getGlobalType( + "Disposable", + /*arity*/ + 0, + reportErrors2 + )) || emptyObjectType; + } + function getGlobalAsyncDisposableType(reportErrors2) { + return deferredGlobalAsyncDisposableType || (deferredGlobalAsyncDisposableType = getGlobalType( + "AsyncDisposable", + /*arity*/ + 0, + reportErrors2 + )) || emptyObjectType; + } function getGlobalTypeOrUndefined(name, arity = 0) { const symbol = getGlobalSymbol( name, @@ -60315,11 +60824,11 @@ function createTypeChecker(host) { } function getTupleElementFlags(node) { switch (node.kind) { - case 189 /* OptionalType */: + case 190 /* OptionalType */: return 2 /* Optional */; - case 190 /* RestType */: + case 191 /* RestType */: return getRestTypeElementFlags(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -60335,60 +60844,57 @@ function createTypeChecker(host) { return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 201 /* NamedTupleMember */); - return getTupleTargetType( - elementFlags, - readonly, - /*associatedNames*/ - missingName ? void 0 : node.elements - ); + return getTupleTargetType(elementFlags, readonly, map(node.elements, memberIfLabeledElementDeclaration)); + } + function memberIfLabeledElementDeclaration(member) { + return isNamedTupleMember(member) || isParameter(member) ? member : void 0; } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 187 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 188 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent2 = node.parent; switch (parent2.kind) { - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: - case 182 /* TypeReference */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 198 /* IndexedAccessType */: - case 193 /* ConditionalType */: - case 197 /* TypeOperator */: - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: + case 183 /* TypeReference */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 199 /* IndexedAccessType */: + case 194 /* ConditionalType */: + case 198 /* TypeOperator */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return isResolvedByTypeAlias(parent2); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return true; - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 195 /* ParenthesizedType */: - case 189 /* OptionalType */: - case 201 /* NamedTupleMember */: - case 322 /* JSDocOptionalType */: - case 320 /* JSDocNullableType */: - case 321 /* JSDocNonNullableType */: - case 315 /* JSDocTypeExpression */: + case 196 /* ParenthesizedType */: + case 190 /* OptionalType */: + case 202 /* NamedTupleMember */: + case 323 /* JSDocOptionalType */: + case 321 /* JSDocNullableType */: + case 322 /* JSDocNonNullableType */: + case 316 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 190 /* RestType */: - return node.type.kind !== 187 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 191 /* RestType */: + return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 192 /* UnionType */: + case 193 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -60399,15 +60905,15 @@ function createTypeChecker(host) { const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 188 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 188 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( + } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( target, node, /*mapper*/ void 0 ); } else { - const elementTypes = node.kind === 187 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } @@ -60416,7 +60922,7 @@ function createTypeChecker(host) { function isReadonlyTypeOperator(node) { return isTypeOperatorNode(node) && node.operator === 148 /* ReadonlyKeyword */; } - function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations) { + function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations = []) { const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, (_) => 1 /* Required */), readonly, namedMemberDeclarations); return tupleTarget === emptyGenericType ? emptyObjectType : elementTypes.length ? createNormalizedTypeReference(tupleTarget, elementTypes) : tupleTarget; } @@ -60424,7 +60930,8 @@ function createTypeChecker(host) { if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) { return readonly ? globalReadonlyArrayType : globalArrayType; } - const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (namedMemberDeclarations && namedMemberDeclarations.length ? "," + map(namedMemberDeclarations, getNodeId).join(",") : ""); + const memberIds = mapDefined(namedMemberDeclarations, (node) => node ? getNodeId(node) : void 0); + const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : ""); let type = tupleTypes.get(key); if (!type) { tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations)); @@ -60506,7 +61013,7 @@ function createTypeChecker(host) { } const expandedTypes = []; const expandedFlags = []; - let expandedDeclarations = []; + const expandedDeclarations = []; let lastRequiredIndex = -1; let firstRestIndex = -1; let lastOptionalOrRestIndex = -1; @@ -60519,7 +61026,7 @@ function createTypeChecker(host) { } else if (isTupleType(type)) { const elements = getElementTypes(type); if (elements.length + expandedTypes.length >= 1e4) { - error(currentNode, isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent); + error2(currentNode, isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent); return errorType; } forEach(elements, (t, n) => { @@ -60544,7 +61051,7 @@ function createTypeChecker(host) { )); expandedTypes.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedFlags.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); - expandedDeclarations == null ? void 0 : expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); + expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); } const tupleTarget = getTupleTargetType(expandedFlags, target.readonly, expandedDeclarations); return tupleTarget === emptyGenericType ? emptyObjectType : expandedFlags.length ? createTypeReference(tupleTarget, expandedTypes) : tupleTarget; @@ -60564,11 +61071,7 @@ function createTypeChecker(host) { true ) : type); expandedFlags.push(flags); - if (expandedDeclarations && declaration) { - expandedDeclarations.push(declaration); - } else { - expandedDeclarations = void 0; - } + expandedDeclarations.push(declaration); } } function sliceTupleType(type, index, endSkipCount = 0) { @@ -60595,6 +61098,9 @@ function createTypeChecker(host) { function getEndElementCount(type, flags) { return type.elementFlags.length - findLastIndex(type.elementFlags, (f) => !(f & flags)) - 1; } + function getTotalFixedElementCount(type) { + return type.fixedLength + getEndElementCount(type, 3 /* Fixed */); + } function getElementTypes(type) { const typeArguments = getTypeArguments(type); const arity = getTypeReferenceArity(type); @@ -60684,7 +61190,7 @@ function createTypeChecker(host) { const estimatedCount = count / (len - i) * len; if (estimatedCount > 1e6) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "removeSubtypes_DepthLimit", { typeIds: types.map((t) => t.id) }); - error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); + error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); return void 0; } } @@ -61093,7 +61599,7 @@ function createTypeChecker(host) { const size = getCrossProductUnionSize(types); if (size >= 1e5) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkCrossProductUnion_DepthLimit", { typeIds: types.map((t) => t.id), size }); - error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); + error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); return false; } return true; @@ -61445,12 +61951,12 @@ function createTypeChecker(host) { if (isCallLikeExpression(parent2)) { return isCallOrNewExpression(parent2) && isIdentifier(node) && hasMatchingArgument(parent2, node); } - return every(symbol.declarations, (d) => !isFunctionLike(d) || !!(getCombinedNodeFlags(d) & 268435456 /* Deprecated */)); + return every(symbol.declarations, (d) => !isFunctionLike(d) || isDeprecatedDeclaration2(d)); } return true; } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { - const accessExpression = accessNode && accessNode.kind === 211 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -61465,7 +61971,7 @@ function createTypeChecker(host) { if (accessExpression) { markPropertyAsReferenced(prop, accessExpression, isSelfTypeAccess(accessExpression.expression, objectType.symbol)); if (isAssignmentToReadonlyEntity(accessExpression, prop, getAssignmentTargetKind(accessExpression))) { - error(accessExpression.argumentExpression, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(prop)); + error2(accessExpression.argumentExpression, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(prop)); return void 0; } if (accessFlags & 8 /* CacheSymbol */) { @@ -61484,10 +61990,10 @@ function createTypeChecker(host) { const indexNode = getIndexNodeForAccessExpression(accessNode); if (isTupleType(objectType)) { if (index < 0) { - error(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); + error2(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); return undefinedType; } - error( + error2( indexNode, Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), @@ -61495,15 +62001,12 @@ function createTypeChecker(host) { unescapeLeadingUnderscores(propName) ); } else { - error(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); + error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); } } if (index >= 0) { errorIfWritingToReadonlyIndex(getIndexInfoOfType(objectType, numberType)); - return mapType(objectType, (t) => { - const restType = getRestTypeOfTupleType(t) || undefinedType; - return accessFlags & 1 /* IncludeUndefined */ ? getUnionType([restType, missingType]) : restType; - }); + return getTupleElementTypeOutOfStartCount(objectType, index, accessFlags & 1 /* IncludeUndefined */ ? missingType : void 0); } } } @@ -61515,13 +62018,13 @@ function createTypeChecker(host) { if (indexInfo) { if (accessFlags & 2 /* NoIndexSignatures */ && indexInfo.keyType !== numberType) { if (accessExpression) { - error(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); + error2(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); } return void 0; } if (accessNode && indexInfo.keyType === stringType && !isTypeAssignableToKind(indexType, 4 /* String */ | 8 /* Number */)) { const indexNode = getIndexNodeForAccessExpression(accessNode); - error(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); + error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); return accessFlags & 1 /* IncludeUndefined */ ? getUnionType([indexInfo.type, missingType]) : indexInfo.type; } errorIfWritingToReadonlyIndex(indexInfo); @@ -61549,23 +62052,23 @@ function createTypeChecker(host) { } } if (objectType.symbol === globalThisSymbol && propName !== void 0 && globalThisSymbol.exports.has(propName) && globalThisSymbol.exports.get(propName).flags & 418 /* BlockScoped */) { - error(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); + error2(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); } else if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !(accessFlags & 128 /* SuppressNoImplicitAnyError */)) { if (propName !== void 0 && typeHasStaticProperty(propName, objectType)) { const typeName = typeToString(objectType); - error(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "[" + getTextOfNode(accessExpression.argumentExpression) + "]"); + error2(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "[" + getTextOfNode(accessExpression.argumentExpression) + "]"); } else if (getIndexTypeOfType(objectType, numberType)) { - error(accessExpression.argumentExpression, Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number); + error2(accessExpression.argumentExpression, Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number); } else { let suggestion; if (propName !== void 0 && (suggestion = getSuggestionForNonexistentProperty(propName, objectType))) { if (suggestion !== void 0) { - error(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(objectType), suggestion); + error2(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(objectType), suggestion); } } else { const suggestion2 = getSuggestionForNonexistentIndexSignature(objectType, accessExpression, indexType); if (suggestion2 !== void 0) { - error(accessExpression, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, typeToString(objectType), suggestion2); + error2(accessExpression, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, typeToString(objectType), suggestion2); } else { let errorInfo; if (indexType.flags & 1024 /* EnumLiteral */) { @@ -61630,11 +62133,11 @@ function createTypeChecker(host) { if (accessNode) { const indexNode = getIndexNodeForAccessExpression(accessNode); if (indexType.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { - error(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType)); + error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType)); } else if (indexType.flags & (4 /* String */ | 8 /* Number */)) { - error(indexNode, Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType)); + error2(indexNode, Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType)); } else { - error(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); + error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); } } if (isTypeAny(indexType)) { @@ -61643,12 +62146,12 @@ function createTypeChecker(host) { return void 0; function errorIfWritingToReadonlyIndex(indexInfo) { if (indexInfo && indexInfo.isReadonly && accessExpression && (isAssignmentTarget(accessExpression) || isDeleteTarget(accessExpression))) { - error(accessExpression, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); + error2(accessExpression, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 211 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 198 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 166 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { if (type.flags & 2097152 /* Intersection */) { @@ -61788,7 +62291,7 @@ function createTypeChecker(host) { } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 198 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)) || isGenericReducibleType(objectType))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target)) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target))) || isGenericReducibleType(objectType))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -61868,7 +62371,7 @@ function createTypeChecker(host) { let tailCount = 0; while (true) { if (tailCount === 1e3) { - error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); + error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper); @@ -61893,9 +62396,9 @@ function createTypeChecker(host) { ); if (freshMapper) { const freshCombinedMapper = combineTypeMappers(mapper, freshMapper); - for (const p of freshParams) { - if (root.inferTypeParameters.indexOf(p) === -1) { - p.mapper = freshCombinedMapper; + for (let i = 0; i < freshParams.length; i++) { + if (freshParams[i] !== root.inferTypeParameters[i]) { + freshParams[i].mapper = freshCombinedMapper; } } } @@ -62046,11 +62549,11 @@ function createTypeChecker(host) { const links = getNodeLinks(node); if (!links.resolvedType) { if (!isLiteralImportTypeNode(node)) { - error(node.argument, Diagnostics.String_literal_expected); + error2(node.argument, Diagnostics.String_literal_expected); links.resolvedSymbol = unknownSymbol; return links.resolvedType = errorType; } - const targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 8388608 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */; + const targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 16777216 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */; const innerModuleSymbol = resolveExternalModuleName(node, node.argument.literal); if (!innerModuleSymbol) { links.resolvedSymbol = unknownSymbol; @@ -62080,7 +62583,7 @@ function createTypeChecker(host) { const symbolFromModule = node.isTypeOf ? void 0 : getSymbol2(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning); const next = symbolFromModule ?? symbolFromVariable; if (!next) { - error(current, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), declarationNameToString(current)); + error2(current, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), declarationNameToString(current)); return links.resolvedType = errorType; } getNodeLinks(current).resolvedSymbol = next; @@ -62093,7 +62596,7 @@ function createTypeChecker(host) { links.resolvedType = resolveImportSymbolType(node, links, moduleSymbol, targetMeaning); } else { const errorMessage = targetMeaning === 111551 /* Value */ ? Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0; - error(node, errorMessage, node.argument.literal.text); + error2(node, errorMessage, node.argument.literal.text); links.resolvedSymbol = unknownSymbol; links.resolvedType = errorType; } @@ -62356,7 +62859,7 @@ function createTypeChecker(host) { false ); const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 263 /* InterfaceDeclaration */)) { + if (parent2 && (isClassLike(parent2) || parent2.kind === 264 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent2)).thisType; } @@ -62364,14 +62867,14 @@ function createTypeChecker(host) { if (parent2 && isObjectLiteralExpression(parent2) && isBinaryExpression(parent2.parent) && getAssignmentDeclarationKind(parent2.parent) === 6 /* Prototype */) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent2.parent.left).parent).thisType; } - const host2 = node.flags & 8388608 /* JSDoc */ ? getHostSignatureFromJSDoc(node) : void 0; + const host2 = node.flags & 16777216 /* JSDoc */ ? getHostSignatureFromJSDoc(node) : void 0; if (host2 && isFunctionExpression(host2) && isBinaryExpression(host2.parent) && getAssignmentDeclarationKind(host2.parent) === 3 /* PrototypeProperty */) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(host2.parent.left).parent).thisType; } if (isJSConstructor(container) && isNodeDescendantOf(node, container.body)) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(container)).thisType; } - error(node, Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface); + error2(node, Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface); return errorType; } function getTypeFromThisTypeNode(node) { @@ -62386,17 +62889,17 @@ function createTypeChecker(host) { } function getArrayElementTypeNode(node) { switch (node.kind) { - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 188 /* TupleType */: + case 189 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 190 /* RestType */ || node.kind === 201 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return node.elementType; } return void 0; @@ -62416,8 +62919,8 @@ function createTypeChecker(host) { function getTypeFromTypeNodeWorker(node) { switch (node.kind) { case 133 /* AnyKeyword */: - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: return anyType; case 159 /* UnknownKeyword */: return unknownType; @@ -62425,7 +62928,7 @@ function createTypeChecker(host) { return stringType; case 150 /* NumberKeyword */: return numberType; - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: return bigintType; case 136 /* BooleanKeyword */: return booleanType; @@ -62440,69 +62943,69 @@ function createTypeChecker(host) { case 146 /* NeverKeyword */: return neverType; case 151 /* ObjectKeyword */: - return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; + return node.flags & 524288 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; case 141 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 196 /* ThisType */: + case 197 /* ThisType */: case 110 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return getTypeFromTypeReference(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 189 /* OptionalType */: + case 190 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 191 /* UnionType */: + case 192 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 195 /* ParenthesizedType */: - case 321 /* JSDocNonNullableType */: - case 315 /* JSDocTypeExpression */: + case 196 /* ParenthesizedType */: + case 322 /* JSDocNonNullableType */: + case 316 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 190 /* RestType */: + case 191 /* RestType */: return getTypeFromRestTypeNode(node); - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 194 /* InferType */: + case 195 /* InferType */: return getTypeFromInferTypeNode(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return getTypeFromImportTypeNode(node); case 80 /* Identifier */: - case 165 /* QualifiedName */: - case 210 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -62638,7 +63141,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, signature.minArgumentCount, - signature.flags & 39 /* PropagatingFlags */ + signature.flags & 167 /* PropagatingFlags */ ); result.target = signature; result.mapper = mapper; @@ -62700,26 +63203,31 @@ function createTypeChecker(host) { if (!result) { const newMapper = createTypeMapper(typeParameters, typeArguments); result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); - if (result.flags & 138117121 /* ObjectFlagsType */ && !(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { + target.instantiations.set(id, result); + const resultObjectFlags = getObjectFlags(result); + if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables); - if (!(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { - result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0); + if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) { + if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) { + result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0); + } else { + result.objectFlags |= !resultCouldContainTypeVariables ? 524288 /* CouldContainTypeVariablesComputed */ : 0; + } } } - target.instantiations.set(id, result); } return result; } return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 182 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 204 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); } function isTypeParameterPossiblyReferenced(tp, node) { if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { const container = tp.symbol.declarations[0].parent; for (let n = node; n !== container; n = n.parent) { - if (!n || n.kind === 240 /* Block */ || n.kind === 193 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 241 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -62728,17 +63236,17 @@ function createTypeChecker(host) { return true; function containsReference(node2) { switch (node2.kind) { - case 196 /* ThisType */: + case 197 /* ThisType */: return !!tp.isThisType; case 80 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); if (!isThisIdentifier(firstIdentifier)) { const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; - const tpScope = tpDeclaration.kind === 167 /* TypeParameter */ ? tpDeclaration.parent : ( + const tpScope = tpDeclaration.kind === 168 /* TypeParameter */ ? tpDeclaration.parent : ( // Type parameter is a regular type parameter, e.g. foo tp.isThisType ? tpDeclaration : ( // Type parameter is the this type, and its declaration is the class declaration. @@ -62750,8 +63258,8 @@ function createTypeChecker(host) { } } return true; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -62801,6 +63309,9 @@ function createTypeChecker(host) { const elementFlags = tupleType.target.elementFlags; const elementTypes = map(getElementTypes(tupleType), (t, i) => { const singleton = elementFlags[i] & 8 /* Variadic */ ? t : elementFlags[i] & 4 /* Rest */ ? createArrayType(t) : createTupleType([t], [elementFlags[i]]); + if (singleton === typeVariable) { + return mappedType; + } return instantiateMappedType(mappedType, prependTypeMapping(typeVariable, singleton, mapper)); }); const newReadonly = getModifiedReadonlyState(tupleType.target.readonly, getMappedTypeModifiers(mappedType)); @@ -62888,7 +63399,7 @@ function createTypeChecker(host) { } if (instantiationDepth === 100 || instantiationCount >= 5e6) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "instantiateType_DepthLimit", { typeId: type.id, instantiationDepth, instantiationCount }); - error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); + error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } totalInstantiationCount++; @@ -63004,32 +63515,32 @@ function createTypeChecker(host) { return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 290 /* JsxAttribute */: { + case 291 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 293 /* JsxExpression */: { + case 294 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -63043,7 +63554,7 @@ function createTypeChecker(host) { if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) { return false; } - if (node.body.kind !== 240 /* Block */) { + if (node.body.kind !== 241 /* Block */) { return isContextSensitive(node.body); } return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression)); @@ -63138,23 +63649,27 @@ function createTypeChecker(host) { return true; } switch (node.kind) { - case 293 /* JsxExpression */: - case 216 /* ParenthesizedExpression */: + case 234 /* AsExpression */: + if (!isConstAssertion(node)) { + break; + } + case 294 /* JsxExpression */: + case 217 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 28 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -63454,16 +63969,16 @@ function createTypeChecker(host) { } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return { errorNode: child, innerExpression: child.expression, nameType }; case 12 /* JsxText */: if (child.containsOnlyTriviaWhiteSpaces) { break; } return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() }; - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -63504,7 +64019,7 @@ function createTypeChecker(host) { result = elaborateIterableOrArrayLikeTargetElementwise(children, realSource, arrayLikeTargetParts, relation, containingMessageChain, errorOutputContainer) || result; } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) { result = true; - const diag2 = error( + const diag2 = error2( containingElement.openingElement.tagName, Diagnostics.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided, childrenPropName, @@ -63532,7 +64047,7 @@ function createTypeChecker(host) { } } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) { result = true; - const diag2 = error( + const diag2 = error2( containingElement.openingElement.tagName, Diagnostics.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided, childrenPropName, @@ -63613,13 +64128,13 @@ function createTypeChecker(host) { continue; } switch (prop.kind) { - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: - case 173 /* MethodDeclaration */: - case 303 /* ShorthandPropertyAssignment */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: + case 174 /* MethodDeclaration */: + case 304 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; break; default: @@ -63694,7 +64209,7 @@ function createTypeChecker(host) { void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 173 /* MethodDeclaration */ && kind !== 172 /* MethodSignature */ && kind !== 175 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -64013,6 +64528,7 @@ function createTypeChecker(host) { let errorInfo; let relatedInfo; let maybeKeys; + let maybeKeysSet; let sourceStack; let targetStack; let maybeCount = 0; @@ -64037,7 +64553,7 @@ function createTypeChecker(host) { } if (overflow) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth }); - const diag2 = error(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); + const diag2 = error2(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); if (errorOutputContainer) { (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); } @@ -64882,9 +65398,13 @@ function createTypeChecker(host) { } if (!maybeKeys) { maybeKeys = []; + maybeKeysSet = /* @__PURE__ */ new Set(); sourceStack = []; targetStack = []; } else { + if (maybeKeysSet.has(id)) { + return 3 /* Maybe */; + } const broadestEquivalentId = id.startsWith("*") ? getRelationKey( source2, target2, @@ -64893,10 +65413,8 @@ function createTypeChecker(host) { /*ignoreConstraints*/ true ) : void 0; - for (let i = 0; i < maybeCount; i++) { - if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) { - return 3 /* Maybe */; - } + if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) { + return 3 /* Maybe */; } if (sourceDepth === 100 || targetDepth === 100) { overflow = true; @@ -64905,6 +65423,7 @@ function createTypeChecker(host) { } const maybeStart = maybeCount; maybeKeys[maybeCount] = id; + maybeKeysSet.add(id); maybeCount++; const saveExpandingFlags = expandingFlags; if (recursionFlags & 1 /* Source */) { @@ -64957,17 +65476,34 @@ function createTypeChecker(host) { if (result2) { if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) { if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) { - for (let i = maybeStart; i < maybeCount; i++) { - relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); - } + resetMaybeStack( + /*markAllAsSucceeded*/ + true + ); + } else { + resetMaybeStack( + /*markAllAsSucceeded*/ + false + ); } - maybeCount = maybeStart; } } else { relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags); - maybeCount = maybeStart; + resetMaybeStack( + /*markAllAsSucceeded*/ + false + ); } return result2; + function resetMaybeStack(markAllAsSucceeded) { + for (let i = maybeStart; i < maybeCount; i++) { + maybeKeysSet.delete(maybeKeys[i]); + if (markAllAsSucceeded) { + relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); + } + } + maybeCount = maybeStart; + } } function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) { const saveErrorInfo = captureErrorCalculationState(); @@ -65379,26 +65915,6 @@ function createTypeChecker(host) { )) { return result2; } - if (sourceFlags & 8388608 /* IndexedAccess */) { - const indexType = source2.indexType; - if (indexType.flags & 4194304 /* Index */) { - const unresolvedIndexConstraint = getBaseConstraintOfType(indexType.type); - const indexConstraint = unresolvedIndexConstraint && unresolvedIndexConstraint !== noConstraintType ? getIndexType(unresolvedIndexConstraint) : keyofConstraintType; - const constraint2 = getIndexedAccessType(source2.objectType, indexConstraint); - if (result2 = isRelatedTo( - constraint2, - target2, - 1 /* Source */, - /*reportErrors*/ - false, - /*headMessage*/ - void 0, - intersectionState - )) { - return result2; - } - } - } if (isMappedTypeGenericIndexedAccess(source2)) { const indexConstraint = getConstraintOfType(source2.indexType); if (indexConstraint) { @@ -66084,7 +66600,7 @@ function createTypeChecker(host) { const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 175 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 175 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString( signature, /*enclosingDeclaration*/ @@ -66370,7 +66886,7 @@ function createTypeChecker(host) { let matched = false; for (let i = 0; i < types.length; i++) { if (include[i]) { - const targetType = getTypeOfPropertyOfType(types[i], propertyName); + const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName); if (targetType && related(getDiscriminatingType(), targetType)) { matched = true; } else { @@ -66384,7 +66900,7 @@ function createTypeChecker(host) { } } } - const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])) : target; + const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i]), 0 /* None */) : target; return filtered.flags & 131072 /* Never */ ? target : filtered; } function isWeakType(type) { @@ -66588,7 +67104,7 @@ function createTypeChecker(host) { } function getRecursionIdentity(type) { if (type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { - if (getObjectFlags(type) && 4 /* Reference */ && type.node) { + if (getObjectFlags(type) & 4 /* Reference */ && type.node) { return type.node; } if (type.symbol && !(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) { @@ -66769,7 +67285,7 @@ function createTypeChecker(host) { const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 210 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) { return void 0; } } @@ -66795,7 +67311,8 @@ function createTypeChecker(host) { return !!elementType && isEmptyLiteralType(elementType); } function isTupleLikeType(type) { - return isTupleType(type) || !!getPropertyOfType(type, "0"); + let lengthType; + return isTupleType(type) || !!getPropertyOfType(type, "0") || isArrayLikeType(type) && !!(lengthType = getTypeOfPropertyOfType(type, "length")) && everyType(lengthType, (t) => !!(t.flags & 256 /* NumberLiteral */)); } function isArrayOrTupleLikeType(type) { return isArrayLikeType(type) || isTupleLikeType(type); @@ -66806,17 +67323,7 @@ function createTypeChecker(host) { return propType; } if (everyType(type, isTupleType)) { - return mapType(type, (t) => { - const tupleType = t; - const restType = getRestTypeOfTupleType(tupleType); - if (!restType) { - return undefinedType; - } - if (compilerOptions.noUncheckedIndexedAccess && index >= tupleType.target.fixedLength + getEndElementCount(tupleType.target, 3 /* Fixed */)) { - return getUnionType([restType, undefinedType]); - } - return restType; - }); + return getTupleElementTypeOutOfStartCount(type, index, compilerOptions.noUncheckedIndexedAccess ? undefinedType : void 0); } return void 0; } @@ -66884,6 +67391,19 @@ function createTypeChecker(host) { function getRestTypeOfTupleType(type) { return getElementTypeOfSliceOfTupleType(type, type.target.fixedLength); } + function getTupleElementTypeOutOfStartCount(type, index, undefinedOrMissingType2) { + return mapType(type, (t) => { + const tupleType = t; + const restType = getRestTypeOfTupleType(tupleType); + if (!restType) { + return undefinedType; + } + if (undefinedOrMissingType2 && index >= getTotalFixedElementCount(tupleType.target)) { + return getUnionType([restType, undefinedOrMissingType2]); + } + return restType; + }); + } function getRestArrayTypeOfTupleType(type) { const restType = getRestTypeOfTupleType(type); return restType && createArrayType(restType); @@ -67152,7 +67672,7 @@ function createTypeChecker(host) { const t = getTypeOfSymbol(p); if (getObjectFlags(t) & 65536 /* ContainsWideningType */) { if (!reportWideningErrorsInType(t)) { - error(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); + error2(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); } errorReported = true; } @@ -67168,12 +67688,12 @@ function createTypeChecker(host) { } let diagnostic; switch (declaration.kind) { - case 225 /* BinaryExpression */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 226 /* BinaryExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 168 /* Parameter */: + case 169 /* Parameter */: const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); @@ -67195,40 +67715,40 @@ function createTypeChecker(host) { } diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 323 /* JSDocFunctionType */: - error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); + case 324 /* JSDocFunctionType */: + error2(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 329 /* JSDocSignature */: + case 330 /* JSDocSignature */: if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) { - error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); + error2(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); } return; - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (noImplicitAny && !declaration.name) { if (wideningKind === 3 /* GeneratorYield */) { - error(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); + error2(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); } else { - error(declaration, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); + error2(declaration, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); } return; } diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; - case 199 /* MappedType */: + case 200 /* MappedType */: if (noImplicitAny) { - error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); + error2(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } return; default: @@ -67323,7 +67843,7 @@ function createTypeChecker(host) { function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 173 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); + const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -67375,8 +67895,8 @@ function createTypeChecker(host) { } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 264 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 311 /* SourceFile */ ? true : n.kind === 266 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 265 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 312 /* SourceFile */ ? true : n.kind === 267 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -67418,17 +67938,18 @@ function createTypeChecker(host) { ); } function inferTypeForHomomorphicMappedType(source, target, constraint) { - if (inInferTypeForHomomorphicMappedType) { - return void 0; + const cacheKey = source.id + "," + target.id + "," + constraint.id; + if (reverseMappedCache.has(cacheKey)) { + return reverseMappedCache.get(cacheKey); } - const key = source.id + "," + target.id + "," + constraint.id; - if (reverseMappedCache.has(key)) { - return reverseMappedCache.get(key); + const recursionKey = source.id + "," + (target.target || target).id; + if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) { + return void 0; } - inInferTypeForHomomorphicMappedType = true; + homomorphicMappedTypeInferenceStack.push(recursionKey); const type = createReverseMappedType(source, target, constraint); - inInferTypeForHomomorphicMappedType = false; - reverseMappedCache.set(key, type); + homomorphicMappedTypeInferenceStack.pop(); + reverseMappedCache.set(cacheKey, type); return type; } function isPartiallyInferableType(type) { @@ -68201,7 +68722,7 @@ function createTypeChecker(host) { if (!(source.flags & 64 /* IsNonInferrable */)) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 173 /* MethodDeclaration */ || kind === 172 /* MethodSignature */ || kind === 175 /* Constructor */; + bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; } @@ -68301,7 +68822,7 @@ function createTypeChecker(host) { const constraint = getConstraintOfTypeParameter(inference.typeParameter); if (constraint) { const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper); - if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { + if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; } } @@ -68359,7 +68880,7 @@ function createTypeChecker(host) { return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer; } else { return Diagnostics.Cannot_find_name_0; @@ -68382,14 +68903,8 @@ function createTypeChecker(host) { } return links.resolvedSymbol; } - function isInTypeQuery(node) { - return !!findAncestor( - node, - (n) => n.kind === 185 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 165 /* QualifiedName */ ? false : "quit" - ); - } function isInAmbientOrTypeNode(node) { - return !!(node.flags & 16777216 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n))); + return !!(node.flags & 33554432 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n))); } function getFlowCacheKey(node, declaredType, initialType, flowContainer) { switch (node.kind) { @@ -68400,41 +68915,41 @@ function createTypeChecker(host) { } case 110 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 235 /* MetaProperty */: - return target.kind === 235 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 236 /* MetaProperty */: + return target.kind === 236 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 80 /* Identifier */: case 81 /* PrivateIdentifier */: return isThisInTypeQuery(source) ? target.kind === 110 /* ThisKeyword */ : target.kind === 80 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); @@ -68442,17 +68957,17 @@ function createTypeChecker(host) { return target.kind === 110 /* ThisKeyword */; case 108 /* SuperKeyword */: return target.kind === 108 /* SuperKeyword */; - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const sourcePropertyName = getAccessedPropertyName(source); const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0; return sourcePropertyName !== void 0 && targetPropertyName !== void 0 && targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -68486,7 +69001,7 @@ function createTypeChecker(host) { /*ignoreErrors*/ true ); - if (!symbol || !(isConstVariable(symbol) || symbol.flags & 8 /* EnumMember */)) + if (!symbol || !(isConstantVariable(symbol) || symbol.flags & 8 /* EnumMember */)) return void 0; const declaration = symbol.valueDeclaration; if (declaration === void 0) @@ -68605,7 +69120,7 @@ function createTypeChecker(host) { } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 302 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 303 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -68620,7 +69135,7 @@ function createTypeChecker(host) { } } } - if (expression.expression.kind === 210 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -68792,11 +69307,11 @@ function createTypeChecker(host) { ) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 208 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 302 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 303 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 225 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 249 /* ForOfStatement */ && parent2.parent.initializer === parent2; + return parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 250 /* ForOfStatement */ && parent2.parent.initializer === parent2; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -68813,21 +69328,21 @@ function createTypeChecker(host) { function getAssignedType(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return stringType; - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return checkRightHandSideOfForOf(parent2) || errorType; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent2); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return undefinedType; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent2); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent2); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent2); } return errorType; @@ -68835,7 +69350,7 @@ function createTypeChecker(host) { function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 205 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); return getTypeWithDefault(type, node.initializer); } function getTypeOfInitializer(node) { @@ -68846,25 +69361,25 @@ function createTypeChecker(host) { if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 248 /* ForInStatement */) { + if (node.parent.parent.kind === 249 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 249 /* ForOfStatement */) { + if (node.parent.parent.kind === 250 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 259 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 260 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 259 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 207 /* BindingElement */ && node.parent.kind === 225 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 260 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 226 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 76 /* BarBarEqualsToken */: @@ -68879,10 +69394,10 @@ function createTypeChecker(host) { } function getReferenceRoot(node) { const { parent: parent2 } = node; - return parent2.kind === 216 /* ParenthesizedExpression */ || parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */ && parent2.left === node || parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 28 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; + return parent2.kind === 217 /* ParenthesizedExpression */ || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */ && parent2.left === node || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 28 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -68898,12 +69413,12 @@ function createTypeChecker(host) { return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 295 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 295 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 296 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -69061,8 +69576,8 @@ function createTypeChecker(host) { function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 212 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 211 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 225 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 64 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); + const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 213 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isElementAssignment = parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 64 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); return isLengthPushOrUnshift || isElementAssignment; } function isDeclarationWithExplicitTypeAnnotation(node) { @@ -69085,7 +69600,7 @@ function createTypeChecker(host) { if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName( statement.expression, @@ -69110,7 +69625,7 @@ function createTypeChecker(host) { } } function getTypeOfDottedName(node, diagnostic) { - if (!(node.flags & 33554432 /* InWithStatement */)) { + if (!(node.flags & 67108864 /* InWithStatement */)) { switch (node.kind) { case 80 /* Identifier */: const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node)); @@ -69119,7 +69634,7 @@ function createTypeChecker(host) { return getExplicitThisType(node); case 108 /* SuperKeyword */: return checkSuperExpression(node); - case 210 /* PropertyAccessExpression */: { + case 211 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -69136,7 +69651,7 @@ function createTypeChecker(host) { } return void 0; } - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -69146,7 +69661,7 @@ function createTypeChecker(host) { let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 243 /* ExpressionStatement */) { + if (node.parent.kind === 244 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ @@ -69200,7 +69715,7 @@ function createTypeChecker(host) { /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 97 /* FalseKeyword */ || node.kind === 225 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + return node.kind === 97 /* FalseKeyword */ || node.kind === 226 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { @@ -69319,14 +69834,16 @@ function createTypeChecker(host) { } function isConstantReference(node) { switch (node.kind) { + case 110 /* ThisKeyword */: + return true; case 80 /* Identifier */: if (!isThisInTypeQuery(node)) { const symbol = getResolvedSymbol(node); - return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); + return isConstantVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } break; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -69346,7 +69863,7 @@ function createTypeChecker(host) { const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode)); sharedFlowCount = sharedFlowStart; const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType); - if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 234 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 235 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -69415,7 +69932,7 @@ function createTypeChecker(host) { target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 210 /* PropertyAccessExpression */ && reference.kind !== 211 /* ElementAccessExpression */ && reference.kind !== 110 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && !(reference.kind === 110 /* ThisKeyword */ && container.kind !== 219 /* ArrowFunction */)) { flow = container.flowNode; continue; } @@ -69434,7 +69951,7 @@ function createTypeChecker(host) { } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -69462,15 +69979,15 @@ function createTypeChecker(host) { if (!isReachableFlowNode(flow)) { return unreachableNeverType; } - if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { + if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConstLike(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 217 /* FunctionExpression */ || init.kind === 218 /* ArrowFunction */)) { + if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 248 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 249 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -69484,7 +70001,7 @@ function createTypeChecker(host) { if (node.kind === 97 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 225 /* BinaryExpression */) { + if (node.kind === 226 /* BinaryExpression */) { if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -69524,13 +70041,13 @@ function createTypeChecker(host) { function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 212 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { const flowType = getTypeAtFlowNode(flow.antecedent); const type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { let evolvedType2 = type; - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -69567,7 +70084,7 @@ function createTypeChecker(host) { let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 220 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -69579,7 +70096,7 @@ function createTypeChecker(host) { flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 220 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 221 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -69724,7 +70241,7 @@ function createTypeChecker(host) { } } else if (isIdentifier(expr)) { const symbol = getResolvedSymbol(expr); - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; if (isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isAccessExpression(declaration.initializer) && isMatchingReference(reference, declaration.initializer.expression)) { return declaration.initializer; @@ -69842,10 +70359,10 @@ function createTypeChecker(host) { const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 220 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 220 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -69883,12 +70400,15 @@ function createTypeChecker(host) { return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue); } const target = getReferenceCandidate(expr.right); - const leftType = getTypeOfExpression(expr.left); - if (leftType.flags & 8576 /* StringOrNumberLiteralOrUnique */) { - if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) { + if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target)) { + const leftType = getTypeOfExpression(expr.left); + if (isTypeUsableAsPropertyName(leftType) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) { return getTypeWithFacts(type, assumeTrue ? 524288 /* NEUndefined */ : 65536 /* EQUndefined */); } - if (isMatchingReference(reference, target)) { + } + if (isMatchingReference(reference, target)) { + const leftType = getTypeOfExpression(expr.left); + if (isTypeUsableAsPropertyName(leftType)) { return narrowTypeByInKeyword(type, leftType, assumeTrue); } } @@ -70104,7 +70624,7 @@ function createTypeChecker(host) { if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -70268,7 +70788,7 @@ function createTypeChecker(host) { case 80 /* Identifier */: if (!isMatchingReference(reference, expr) && inlineLevel < 5) { const symbol = getResolvedSymbol(expr); - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isConstantReference(reference)) { inlineLevel++; @@ -70280,17 +70800,17 @@ function createTypeChecker(host) { } case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: if (expr.operator === 54 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -70316,7 +70836,7 @@ function createTypeChecker(host) { location = location.parent; } if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) { - const type = getTypeOfExpression(location); + const type = removeOptionalTypeMarker(getTypeOfExpression(location)); if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) { return type; } @@ -70328,7 +70848,7 @@ function createTypeChecker(host) { return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 267 /* ModuleBlock */ || node2.kind === 311 /* SourceFile */ || node2.kind === 171 /* PropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -70336,8 +70856,8 @@ function createTypeChecker(host) { } const parent2 = getRootDeclaration(symbol.valueDeclaration).parent; const links = getNodeLinks(parent2); - if (!(links.flags & 524288 /* AssignmentsMarked */)) { - links.flags |= 524288 /* AssignmentsMarked */; + if (!(links.flags & 131072 /* AssignmentsMarked */)) { + links.flags |= 131072 /* AssignmentsMarked */; if (!hasParentWithAssignmentsMarked(parent2)) { markNodeAssignments(parent2); } @@ -70345,7 +70865,7 @@ function createTypeChecker(host) { return symbol.isAssigned || false; } function hasParentWithAssignmentsMarked(node) { - return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 524288 /* AssignmentsMarked */)); + return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */)); } function markNodeAssignments(node) { if (node.kind === 80 /* Identifier */) { @@ -70359,8 +70879,8 @@ function createTypeChecker(host) { forEachChild(node, markNodeAssignments); } } - function isConstVariable(symbol) { - return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */) !== 0; + function isConstantVariable(symbol) { + return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */) !== 0; } function parameterInitializerContainsUndefined(declaration) { const links = getNodeLinks(declaration); @@ -70379,12 +70899,12 @@ function createTypeChecker(host) { return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 168 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { const parent2 = node.parent; - return parent2.kind === 210 /* PropertyAccessExpression */ || parent2.kind === 165 /* QualifiedName */ || parent2.kind === 212 /* CallExpression */ && parent2.expression === node || parent2.kind === 211 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); + return parent2.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 166 /* QualifiedName */ || parent2.kind === 213 /* CallExpression */ && parent2.expression === node || parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); } function isGenericTypeWithUnionConstraint(type) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */)); @@ -70427,9 +70947,13 @@ function createTypeChecker(host) { symbol, /*excludes*/ 111551 /* Value */ - ) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */)) { + ) && !isInTypeQuery(location)) { const target = resolveAlias(symbol); - if (getAllSymbolFlags(target) & (111551 /* Value */ | 1048576 /* ExportValue */)) { + if (getSymbolFlags( + symbol, + /*excludeTypeOnlyMeanings*/ + true + ) & (111551 /* Value */ | 1048576 /* ExportValue */)) { if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) { markAliasSymbolAsReferenced(symbol); } else { @@ -70445,14 +70969,14 @@ function createTypeChecker(host) { if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent2 = declaration.parent.parent; - if (parent2.kind === 259 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || parent2.kind === 169 /* Parameter */) { const links = getNodeLinks(parent2); - if (!(links.flags & 16777216 /* InCheckIdentifier */)) { - links.flags |= 16777216 /* InCheckIdentifier */; + if (!(links.flags & 4194304 /* InCheckIdentifier */)) { + links.flags |= 4194304 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); - links.flags &= ~16777216 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 168 /* Parameter */ && isSymbolAssigned(symbol))) { + links.flags &= ~4194304 /* InCheckIdentifier */; + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference( pattern, @@ -70504,15 +71028,15 @@ function createTypeChecker(host) { } if (symbol === argumentsSymbol) { if (isInPropertyInitializerOrClassStaticBlock(node)) { - error(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers); + error2(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers); return errorType; } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 218 /* ArrowFunction */) { - error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); + if (container.kind === 219 /* ArrowFunction */) { + error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (hasSyntacticModifier(container, 512 /* Async */)) { - error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); + error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); } } getNodeLinks(container).flags |= 512 /* CaptureArguments */; @@ -70528,17 +71052,7 @@ function createTypeChecker(host) { } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 262 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { - let container = getContainingClass(node); - while (container !== void 0) { - if (container === declaration && container.name !== node) { - getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; - getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */; - break; - } - container = getContainingClass(container); - } - } else if (declaration.kind === 230 /* ClassExpression */) { + if (isClassLike(declaration) && declaration.name !== node) { let container = getThisContainer( node, /*includeArrowFunctions*/ @@ -70546,14 +71060,7 @@ function createTypeChecker(host) { /*includeClassComputedPropertyName*/ false ); - while (container.kind !== 311 /* SourceFile */) { - if (container.parent === declaration) { - if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { - getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; - getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */; - } - break; - } + while (container.kind !== 312 /* SourceFile */ && container.parent !== declaration) { container = getThisContainer( container, /*includeArrowFunctions*/ @@ -70562,6 +71069,11 @@ function createTypeChecker(host) { false ); } + if (container.kind !== 312 /* SourceFile */) { + getNodeLinks(declaration).flags |= 262144 /* ContainsConstructorReference */; + getNodeLinks(container).flags |= 262144 /* ContainsConstructorReference */; + getNodeLinks(node).flags |= 536870912 /* ConstructorReference */; + } } } checkNestedBlockScopedBinding(node, symbol); @@ -70570,14 +71082,14 @@ function createTypeChecker(host) { if (assignmentKind) { if (!(localOrExportSymbol.flags & 3 /* Variable */) && !(isInJSFile(node) && localOrExportSymbol.flags & 512 /* ValueModule */)) { const assignmentError = localOrExportSymbol.flags & 384 /* Enum */ ? Diagnostics.Cannot_assign_to_0_because_it_is_an_enum : localOrExportSymbol.flags & 32 /* Class */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_class : localOrExportSymbol.flags & 1536 /* Module */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_namespace : localOrExportSymbol.flags & 16 /* Function */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_function : localOrExportSymbol.flags & 2097152 /* Alias */ ? Diagnostics.Cannot_assign_to_0_because_it_is_an_import : Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable; - error(node, assignmentError, symbolToString(symbol)); + error2(node, assignmentError, symbolToString(symbol)); return errorType; } if (isReadonlySymbol(localOrExportSymbol)) { if (localOrExportSymbol.flags & 3 /* Variable */) { - error(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_constant, symbolToString(symbol)); + error2(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_constant, symbolToString(symbol)); } else { - error(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(symbol)); + error2(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(symbol)); } return errorType; } @@ -70596,30 +71108,30 @@ function createTypeChecker(host) { return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 168 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 169 /* Parameter */; const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); const isModuleExports = symbol.flags & 134217728 /* ModuleExports */; const typeIsAutomatic = type === autoType || type === autoArrayType; - const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 234 /* NonNullExpression */; - while (flowContainer !== declarationContainer && (flowContainer.kind === 217 /* FunctionExpression */ || flowContainer.kind === 218 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 235 /* NonNullExpression */; + while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } - const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 280 /* ExportSpecifier */) || node.parent.kind === 234 /* NonNullExpression */ || declaration.kind === 259 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; + const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */; const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type); const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer); if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) { if (flowType === autoType || flowType === autoArrayType) { if (noImplicitAny) { - error(getNameOfDeclaration(declaration), Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType)); - error(node, Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); + error2(getNameOfDeclaration(declaration), Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType)); + error2(node, Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); } return convertAutoToAny(flowType); } } else if (!assumeInitialized && !containsUndefinedType(type) && containsUndefinedType(flowType)) { - error(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + error2(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); return type; } return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; @@ -70661,7 +71173,7 @@ function createTypeChecker(host) { )); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 298 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 299 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -70671,7 +71183,7 @@ function createTypeChecker(host) { if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 260 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -70690,9 +71202,9 @@ function createTypeChecker(host) { } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 260 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { - getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */; + getNodeLinks(symbol.valueDeclaration).flags |= 65536 /* NeedsLoopOutParameter */; } } getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */; @@ -70707,13 +71219,13 @@ function createTypeChecker(host) { } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 216 /* ParenthesizedExpression */) { + while (current.parent.kind === 217 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 223 /* PrefixUnaryExpression */ || current.parent.kind === 224 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 224 /* PrefixUnaryExpression */ || current.parent.kind === 225 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; } @@ -70724,7 +71236,7 @@ function createTypeChecker(host) { } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 171 /* PropertyDeclaration */ || container.kind === 175 /* Constructor */) { + if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -70749,13 +71261,13 @@ function createTypeChecker(host) { /*noCacheCheck*/ false )) { - error(node, diagnosticMessage); + error2(node, diagnosticMessage); } } } function checkThisInStaticClassFieldInitializerInDecoratedClass(thisExpression, container) { if (isPropertyDeclaration(container) && hasStaticModifier(container) && legacyDecorators && container.initializer && textRangeContainsPositionInclusive(container.initializer, thisExpression.pos) && hasDecorators(container.parent)) { - error(thisExpression, Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class); + error2(thisExpression, Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class); } } function checkThisExpression(node) { @@ -70769,11 +71281,11 @@ function createTypeChecker(host) { ); let capturedByArrowFunction = false; let thisInComputedPropertyName = false; - if (container.kind === 175 /* Constructor */) { + if (container.kind === 176 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } while (true) { - if (container.kind === 218 /* ArrowFunction */) { + if (container.kind === 219 /* ArrowFunction */) { container = getThisContainer( container, /*includeArrowFunctions*/ @@ -70782,7 +71294,7 @@ function createTypeChecker(host) { ); capturedByArrowFunction = true; } - if (container.kind === 166 /* ComputedPropertyName */) { + if (container.kind === 167 /* ComputedPropertyName */) { container = getThisContainer( container, !capturedByArrowFunction, @@ -70796,18 +71308,18 @@ function createTypeChecker(host) { } checkThisInStaticClassFieldInitializerInDecoratedClass(node, container); if (thisInComputedPropertyName) { - error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); + error2(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); } else { switch (container.kind) { - case 266 /* ModuleDeclaration */: - error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); + case 267 /* ModuleDeclaration */: + error2(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 265 /* EnumDeclaration */: - error(node, Diagnostics.this_cannot_be_referenced_in_current_location); + case 266 /* EnumDeclaration */: + error2(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 175 /* Constructor */: + case 176 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { - error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); + error2(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; } @@ -70824,9 +71336,9 @@ function createTypeChecker(host) { if (noImplicitThis) { const globalThisType2 = getTypeOfSymbol(globalThisSymbol); if (type === globalThisType2 && capturedByArrowFunction) { - error(node, Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this); + error2(node, Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this); } else if (!type) { - const diag2 = error(node, Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation); + const diag2 = error2(node, Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation); if (!isSourceFile(container)) { const outsideThis = tryGetThisTypeAt(container); if (outsideThis && outsideThis !== globalThisType2) { @@ -70899,36 +71411,33 @@ function createTypeChecker(host) { } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 217 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 173 /* MethodDeclaration */ && container.parent.kind === 209 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 217 /* FunctionExpression */ && container.parent.kind === 302 /* PropertyAssignment */ && container.parent.parent.kind === 209 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 303 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 217 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { + } else if (container.kind === 218 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.parent.arguments[0].expression; } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.arguments[0].expression; } } function getTypeForThisExpressionFromJSDoc(node) { - const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 323 /* JSDocFunctionType */) { - const jsDocFunctionType = jsdocType; - if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].name && jsDocFunctionType.parameters[0].name.escapedText === "this" /* This */) { - return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); - } - } const thisTag = getJSDocThisTag(node); if (thisTag && thisTag.typeExpression) { return getTypeFromTypeNode(thisTag.typeExpression); } + const signature = getSignatureOfTypeTag(node); + if (signature) { + return getThisTypeOfSignature(signature); + } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 168 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 212 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer( node, /*stopOnFunctions*/ @@ -70938,7 +71447,7 @@ function createTypeChecker(host) { let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 218 /* ArrowFunction */) { + while (container && container.kind === 219 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer( @@ -70953,19 +71462,19 @@ function createTypeChecker(host) { } let nodeCheckFlag = 0; if (!container || !isLegalUsageOfSuperExpression(container)) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 166 /* ComputedPropertyName */); - if (current && current.kind === 166 /* ComputedPropertyName */) { - error(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 167 /* ComputedPropertyName */); + if (current && current.kind === 167 /* ComputedPropertyName */) { + error2(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression2) { - error(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 209 /* ObjectLiteralExpression */)) { - error(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); + error2(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 210 /* ObjectLiteralExpression */)) { + error2(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { - error(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); + error2(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); } return errorType; } - if (!isCallExpression2 && immediateContainer.kind === 175 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 176 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if (isStatic(container) || isCallExpression2) { @@ -70973,7 +71482,7 @@ function createTypeChecker(host) { if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) { forEachEnclosingBlockScopeContainer(node.parent, (current) => { if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) { - getNodeLinks(current).flags |= 8388608 /* ContainsSuperPropertyInStaticInitializer */; + getNodeLinks(current).flags |= 2097152 /* ContainsSuperPropertyInStaticInitializer */; } }); } @@ -70981,7 +71490,7 @@ function createTypeChecker(host) { nodeCheckFlag = 16 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 173 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -70991,9 +71500,9 @@ function createTypeChecker(host) { if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 209 /* ObjectLiteralExpression */) { + if (container.parent.kind === 210 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { - error(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); + error2(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return errorType; } else { return anyType; @@ -71001,7 +71510,7 @@ function createTypeChecker(host) { } const classLikeDeclaration = container.parent; if (!getClassExtendsHeritageElement(classLikeDeclaration)) { - error(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class); + error2(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class); return errorType; } const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration)); @@ -71009,20 +71518,20 @@ function createTypeChecker(host) { if (!baseClassType) { return errorType; } - if (container.kind === 175 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { - error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); + if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + error2(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType); function isLegalUsageOfSuperExpression(container2) { if (isCallExpression2) { - return container2.kind === 175 /* Constructor */; + return container2.kind === 176 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 209 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 173 /* MethodDeclaration */ || container2.kind === 172 /* MethodSignature */ || container2.kind === 176 /* GetAccessor */ || container2.kind === 177 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 174 /* ClassStaticBlockDeclaration */; + return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 173 /* MethodDeclaration */ || container2.kind === 172 /* MethodSignature */ || container2.kind === 176 /* GetAccessor */ || container2.kind === 177 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 170 /* PropertySignature */ || container2.kind === 175 /* Constructor */; + return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 176 /* Constructor */; } } } @@ -71030,7 +71539,7 @@ function createTypeChecker(host) { } } function getContainingObjectLiteral(func) { - return (func.kind === 173 /* MethodDeclaration */ || func.kind === 176 /* GetAccessor */ || func.kind === 177 /* SetAccessor */) && func.parent.kind === 209 /* ObjectLiteralExpression */ ? func.parent : func.kind === 217 /* FunctionExpression */ && func.parent.kind === 302 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 303 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -71040,8 +71549,27 @@ function createTypeChecker(host) { return t.flags & 2097152 /* Intersection */ ? forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t); }); } + function getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType) { + let literal = containingLiteral; + let type = contextualType; + while (type) { + const thisType = getThisTypeFromContextualType(type); + if (thisType) { + return thisType; + } + if (literal.parent.kind !== 303 /* PropertyAssignment */) { + break; + } + literal = literal.parent.parent; + type = getApparentTypeOfContextualType( + literal, + /*contextFlags*/ + void 0 + ); + } + } function getContextualThisParameterType(func) { - if (func.kind === 218 /* ArrowFunction */) { + if (func.kind === 219 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -71062,27 +71590,14 @@ function createTypeChecker(host) { /*contextFlags*/ void 0 ); - let literal = containingLiteral; - let type = contextualType; - while (type) { - const thisType = getThisTypeFromContextualType(type); - if (thisType) { - return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); - } - if (literal.parent.kind !== 302 /* PropertyAssignment */) { - break; - } - literal = literal.parent.parent; - type = getApparentTypeOfContextualType( - literal, - /*contextFlags*/ - void 0 - ); + const thisType = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); + if (thisType) { + return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */) { + if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -71137,11 +71652,11 @@ function createTypeChecker(host) { return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 168 /* Parameter */: + case 169 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -71150,10 +71665,10 @@ function createTypeChecker(host) { function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 207 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent2.name.kind === 206 /* ArrayBindingPattern */) { + if (parent2.name.kind === 207 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -71303,7 +71818,7 @@ function createTypeChecker(host) { return signature ? getOrCreateTypeFromSignature(signature) : void 0; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 214 /* TaggedTemplateExpression */) { + if (template.parent.kind === 215 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -71521,7 +72036,7 @@ function createTypeChecker(host) { } function getContextualTypeForObjectLiteralMethod(node, contextFlags) { Debug.assert(isObjectLiteralMethod(node)); - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } return getContextualTypeForObjectLiteralElement(node, contextFlags); @@ -71657,16 +72172,17 @@ function createTypeChecker(host) { case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: + case 228 /* TemplateExpression */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 80 /* Identifier */: case 157 /* UndefinedKeyword */: return true; - case 210 /* PropertyAccessExpression */: - case 216 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 217 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -71676,7 +72192,7 @@ function createTypeChecker(host) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 302 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 303 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -71696,7 +72212,7 @@ function createTypeChecker(host) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 290 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 291 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -71761,7 +72277,7 @@ function createTypeChecker(host) { } function getContextualType2(node, contextFlags) { var _a; - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } const index = findContextualNode( @@ -71774,47 +72290,47 @@ function createTypeChecker(host) { } const { parent: parent2 } = node; switch (parent2.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 208 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 218 /* ArrowFunction */: - case 252 /* ReturnStatement */: + case 219 /* ArrowFunction */: + case 253 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return getContextualTypeForYieldOperand(parent2, contextFlags); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: return getContextualTypeForArgument(parent2, node); - case 169 /* Decorator */: + case 170 /* Decorator */: return getContextualTypeForDecorator(parent2); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return isConstTypeReference(parent2.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(parent2.type); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return getContextualType2(parent2.parent, contextFlags); - case 208 /* ArrayLiteralExpression */: { + case 209 /* ArrayLiteralExpression */: { const arrayLiteral = parent2; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); const elementIndex = indexOfNode(arrayLiteral.elements, node); const spreadIndices = (_a = getNodeLinks(arrayLiteral)).spreadIndices ?? (_a.spreadIndices = getSpreadIndices(arrayLiteral.elements)); return getContextualTypeForElementExpression(type, elementIndex, arrayLiteral.elements.length, spreadIndices.first, spreadIndices.last); } - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 238 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 227 /* TemplateExpression */); + case 239 /* TemplateSpan */: + Debug.assert(parent2.parent.kind === 228 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 216 /* ParenthesizedExpression */: { + case 217 /* ParenthesizedExpression */: { if (isInJSFile(parent2)) { if (isJSDocSatisfiesExpression(parent2)) { return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2)); @@ -71826,19 +72342,19 @@ function createTypeChecker(host) { } return getContextualType2(parent2, contextFlags); } - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return getContextualType2(parent2, contextFlags); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return getTypeFromTypeNode(parent2.type); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent2); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return getContextualTypeForJsxExpression(parent2, contextFlags); - case 290 /* JsxAttribute */: - case 292 /* JsxSpreadAttribute */: + case 291 /* JsxAttribute */: + case 293 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent2, contextFlags); } return void 0; @@ -71965,7 +72481,7 @@ function createTypeChecker(host) { let attributesType = forcedLookupLocation === void 0 ? getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType) : forcedLookupLocation === "" ? getReturnTypeOfSignature(sig) : getJsxPropsTypeForSignatureFromMember(sig, forcedLookupLocation); if (!attributesType) { if (!!forcedLookupLocation && !!length(context.attributes.properties)) { - error(context, Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, unescapeLeadingUnderscores(forcedLookupLocation)); + error2(context, Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, unescapeLeadingUnderscores(forcedLookupLocation)); } return unknownType; } @@ -72067,7 +72583,7 @@ function createTypeChecker(host) { /*resolvedTypePredicate*/ void 0, minArgCount, - (left.flags | right.flags) & 39 /* PropagatingFlags */ + (left.flags | right.flags) & 167 /* PropagatingFlags */ ); result.compositeKind = 2097152 /* Intersection */; result.compositeSignatures = concatenate(left.compositeKind === 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); @@ -72098,7 +72614,7 @@ function createTypeChecker(host) { return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -72149,7 +72665,11 @@ function createTypeChecker(host) { return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 207 /* BindingElement */ && !!node.initializer || node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; + return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; + } + function isSpreadIntoCallOrNew(node) { + const parent2 = walkUpParenthesizedExpressions(node.parent); + return isSpreadElement(parent2) && isCallOrNewExpression(parent2.parent); } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -72158,18 +72678,17 @@ function createTypeChecker(host) { const elementFlags = []; pushCachedContextualType(node); const inDestructuringPattern = isAssignmentTarget(node); - const isSpreadIntoCallOrNew = isSpreadElement(node.parent) && isCallOrNewExpression(node.parent.parent); - const inConstContext = isSpreadIntoCallOrNew || isConstContext(node); + const inConstContext = isConstContext(node); const contextualType = getApparentTypeOfContextualType( node, /*contextFlags*/ void 0 ); - const inTupleContext = isSpreadIntoCallOrNew || !!contextualType && someType(contextualType, isTupleLikeType); + const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, isTupleLikeType); let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 229 /* SpreadElement */) { + if (e.kind === 230 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -72193,7 +72712,7 @@ function createTypeChecker(host) { elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 231 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 232 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(undefinedOrMissingType); elementFlags.push(2 /* Optional */); @@ -72240,7 +72759,7 @@ function createTypeChecker(host) { } function isNumericName(name) { switch (name.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return isNumericComputedName(name); case 80 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -72257,7 +72776,7 @@ function createTypeChecker(host) { function checkComputedPropertyName(node) { const links = getNodeLinks(node.expression); if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 176 /* GetAccessor */ && node.parent.kind !== 177 /* SetAccessor */) { + if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -72271,7 +72790,7 @@ function createTypeChecker(host) { } } if (links.resolvedType.flags & 98304 /* Nullable */ || !isTypeAssignableToKind(links.resolvedType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */) && !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) { - error(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); + error2(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); } } return links.resolvedType; @@ -72326,7 +72845,7 @@ function createTypeChecker(host) { /*contextFlags*/ void 0 ); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 205 /* ObjectBindingPattern */ || contextualType.pattern.kind === 209 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -72345,13 +72864,13 @@ function createTypeChecker(host) { let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfDeclaration(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 166 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 302 /* PropertyAssignment */ || memberDecl.kind === 303 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 302 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( + const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 303 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. // we don't want to say "could not find 'a'". - memberDecl.kind === 303 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) + memberDecl.kind === 304 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) ); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); @@ -72369,7 +72888,7 @@ function createTypeChecker(host) { prop.links.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 302 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 303 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 303 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -72378,7 +72897,7 @@ function createTypeChecker(host) { if (impliedProp) { prop.flags |= impliedProp.flags & 16777216 /* Optional */; } else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, stringType)) { - error( + error2( memberDecl.name, Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), @@ -72395,13 +72914,13 @@ function createTypeChecker(host) { prop.links.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 302 /* PropertyAssignment */ || memberDecl.kind === 173 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 302 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 303 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } - } else if (memberDecl.kind === 304 /* SpreadAssignment */) { + } else if (memberDecl.kind === 305 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -72425,12 +72944,12 @@ function createTypeChecker(host) { } spread = getSpreadType(spread, mergedType, node.symbol, objectFlags, inConstContext); } else { - error(memberDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types); + error2(memberDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types); spread = errorType; } continue; } else { - Debug.assert(memberDecl.kind === 176 /* GetAccessor */ || memberDecl.kind === 177 /* SetAccessor */); + Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -72455,17 +72974,17 @@ function createTypeChecker(host) { if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 259 /* VariableDeclaration */ || n.kind === 225 /* BinaryExpression */ || n.kind === 168 /* Parameter */ + (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 304 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 304 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 305 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { - error( + error2( prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value ); @@ -72540,7 +73059,7 @@ function createTypeChecker(host) { checkJsxOpeningLikeElementOrOpeningFragment(node.openingFragment); const nodeSourceFile = getSourceFileOfNode(node); if (getJSXTransformEnabled(compilerOptions) && (compilerOptions.jsxFactory || nodeSourceFile.pragmas.has("jsx")) && !compilerOptions.jsxFragmentFactory && !nodeSourceFile.pragmas.has("jsxfrag")) { - error(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments); + error2(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments); } checkJsxChildren(node); return getJsxElementTypeAt(node) || anyType; @@ -72596,7 +73115,7 @@ function createTypeChecker(host) { addIntraExpressionInferenceSite(inferenceContext, inferenceNode, exprType); } } else { - Debug.assert(attributeDecl.kind === 292 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 293 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType( spread, @@ -72625,7 +73144,7 @@ function createTypeChecker(host) { checkSpreadPropOverrides(exprType, allAttributesTable, attributeDecl); } } else { - error(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types); + error2(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types); typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType; } } @@ -72642,12 +73161,12 @@ function createTypeChecker(host) { ); } } - const parent2 = openingLikeElement.parent.kind === 283 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { if (explicitlySpecifyChildrenAttribute) { - error(attributes, Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, unescapeLeadingUnderscores(jsxChildrenPropertyName)); + error2(attributes, Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, unescapeLeadingUnderscores(jsxChildrenPropertyName)); } const contextualType2 = getApparentTypeOfContextualType( openingLikeElement.attributes, @@ -72701,7 +73220,7 @@ function createTypeChecker(host) { if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 293 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 294 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -72714,7 +73233,7 @@ function createTypeChecker(host) { if (!(right.flags & 16777216 /* Optional */)) { const left = props.get(right.escapedName); if (left) { - const diagnostic = error(left.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(left.escapedName)); + const diagnostic = error2(left.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(left.escapedName)); addRelatedInfo(diagnostic, createDiagnosticForNode(spread, Diagnostics.This_spread_always_overwrites_this_property)); } } @@ -72746,11 +73265,11 @@ function createTypeChecker(host) { links.jsxFlags |= 2 /* IntrinsicIndexedElement */; return links.resolvedSymbol = intrinsicElementsType.symbol; } - error(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements); + error2(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements); return links.resolvedSymbol = unknownSymbol; } else { if (noImplicitAny) { - error(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, unescapeLeadingUnderscores(JsxNames.IntrinsicElements)); + error2(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, unescapeLeadingUnderscores(JsxNames.IntrinsicElements)); } return links.resolvedSymbol = unknownSymbol; } @@ -72833,7 +73352,7 @@ function createTypeChecker(host) { } else if (propertiesOfJsxElementAttribPropInterface.length === 1) { return propertiesOfJsxElementAttribPropInterface[0].escapedName; } else if (propertiesOfJsxElementAttribPropInterface.length > 1 && jsxElementAttribPropInterfaceSym.declarations) { - error(jsxElementAttribPropInterfaceSym.declarations[0], Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, unescapeLeadingUnderscores(nameOfAttribPropContainer)); + error2(jsxElementAttribPropInterfaceSym.declarations[0], Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, unescapeLeadingUnderscores(nameOfAttribPropContainer)); } } return void 0; @@ -72856,7 +73375,7 @@ function createTypeChecker(host) { } else if (elementType.flags & 128 /* StringLiteral */) { const intrinsicType = getIntrinsicAttributesTypeFromStringLiteralType(elementType, caller); if (!intrinsicType) { - error(caller, Diagnostics.Property_0_does_not_exist_on_type_1, elementType.value, "JSX." + JsxNames.IntrinsicElements); + error2(caller, Diagnostics.Property_0_does_not_exist_on_type_1, elementType.value, "JSX." + JsxNames.IntrinsicElements); return emptyArray; } else { const fakeSignature = createSignatureForJSXIntrinsic(caller, intrinsicType); @@ -72982,11 +73501,11 @@ function createTypeChecker(host) { } function checkJsxPreconditions(errorNode) { if ((compilerOptions.jsx || 0 /* None */) === 0 /* None */) { - error(errorNode, Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided); + error2(errorNode, Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided); } if (getJsxElementTypeAt(errorNode) === void 0) { if (noImplicitAny) { - error(errorNode, Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist); + error2(errorNode, Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist); } } } @@ -73078,7 +73597,7 @@ function createTypeChecker(host) { if (node.expression) { const type = checkExpression(node.expression, checkMode); if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) { - error(node, Diagnostics.JSX_spread_child_must_be_an_array_type); + error2(node, Diagnostics.JSX_spread_child_must_be_an_array_type); } return type; } else { @@ -73086,7 +73605,7 @@ function createTypeChecker(host) { } } function getDeclarationNodeFlagsFromSymbol(s) { - return s.valueDeclaration ? getCombinedNodeFlags(s.valueDeclaration) : 0; + return s.valueDeclaration ? getCombinedNodeFlagsCached(s.valueDeclaration) : 0; } function isPrototypeProperty(symbol) { if (symbol.flags & 8192 /* Method */ || getCheckFlags(symbol) & 4 /* SyntheticMethod */) { @@ -73098,7 +73617,7 @@ function createTypeChecker(host) { } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 165 /* QualifiedName */ ? node.right : node.kind === 204 /* ImportType */ ? node : node.kind === 207 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -73107,14 +73626,14 @@ function createTypeChecker(host) { if (languageVersion < 2 /* ES2015 */) { if (symbolHasNonMethodDeclaration(prop)) { if (errorNode) { - error(errorNode, Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); + error2(errorNode, Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); } return false; } } if (flags & 256 /* Abstract */) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), @@ -73128,7 +73647,7 @@ function createTypeChecker(host) { const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), @@ -73145,7 +73664,7 @@ function createTypeChecker(host) { const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (!isNodeWithinClass(location, declaringClassDeclaration)) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), @@ -73168,7 +73687,7 @@ function createTypeChecker(host) { enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing); if (flags & 32 /* Static */ || !enclosingClass) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), @@ -73186,7 +73705,7 @@ function createTypeChecker(host) { } if (!containingType || !hasBaseType(containingType, enclosingClass)) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, symbolToString(prop), @@ -73234,28 +73753,28 @@ function createTypeChecker(host) { function reportObjectPossiblyNullOrUndefinedError(node, facts) { const nodeText2 = isEntityNameExpression(node) ? entityNameToString(node) : void 0; if (node.kind === 106 /* NullKeyword */) { - error(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); + error2(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); return; } if (nodeText2 !== void 0 && nodeText2.length < 100) { if (isIdentifier(node) && nodeText2 === "undefined") { - error(node, Diagnostics.The_value_0_cannot_be_used_here, "undefined"); + error2(node, Diagnostics.The_value_0_cannot_be_used_here, "undefined"); return; } - error( + error2( node, facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics._0_is_possibly_null_or_undefined : Diagnostics._0_is_possibly_undefined : Diagnostics._0_is_possibly_null, nodeText2 ); } else { - error( + error2( node, facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics.Object_is_possibly_null_or_undefined : Diagnostics.Object_is_possibly_undefined : Diagnostics.Object_is_possibly_null ); } } function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) { - error( + error2( node, facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : Diagnostics.Cannot_invoke_an_object_which_is_possibly_null ); @@ -73265,11 +73784,11 @@ function createTypeChecker(host) { if (isEntityNameExpression(node)) { const nodeText2 = entityNameToString(node); if (nodeText2.length < 100) { - error(node, Diagnostics._0_is_of_type_unknown, nodeText2); + error2(node, Diagnostics._0_is_of_type_unknown, nodeText2); return errorType; } } - error(node, Diagnostics.Object_is_of_type_unknown); + error2(node, Diagnostics.Object_is_of_type_unknown); return errorType; } const facts = getTypeFacts(type); @@ -73289,20 +73808,20 @@ function createTypeChecker(host) { if (isEntityNameExpression(node)) { const nodeText2 = entityNameToString(node); if (isIdentifier(node) && nodeText2 === "undefined") { - error(node, Diagnostics.The_value_0_cannot_be_used_here, nodeText2); + error2(node, Diagnostics.The_value_0_cannot_be_used_here, nodeText2); return nonNullType; } if (nodeText2.length < 100) { - error(node, Diagnostics._0_is_possibly_undefined, nodeText2); + error2(node, Diagnostics._0_is_possibly_undefined, nodeText2); return nonNullType; } } - error(node, Diagnostics.Object_is_possibly_undefined); + error2(node, Diagnostics.Object_is_possibly_undefined); } return nonNullType; } function checkPropertyAccessExpression(node, checkMode, writeOnly) { - return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); + return node.flags & 64 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); } function checkPropertyAccessChain(node, checkMode) { const leftType = checkExpression(node.expression); @@ -73314,13 +73833,13 @@ function createTypeChecker(host) { return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 216 /* ParenthesizedExpression */) { + while (node.parent.kind === 217 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; } function lookupSymbolForPrivateIdentifierDeclaration(propName, location) { - for (let containingClass = getContainingClass(location); !!containingClass; containingClass = getContainingClass(containingClass)) { + for (let containingClass = getContainingClassExcludingClassDecorators(location); !!containingClass; containingClass = getContainingClass(containingClass)) { const { symbol } = containingClass; const name = getSymbolNameForPrivateIdentifier(symbol, propName); const prop = symbol.members && symbol.members.get(name) || symbol.exports && symbol.exports.get(name); @@ -73392,7 +73911,7 @@ function createTypeChecker(host) { const lexicalClass = getContainingClass(lexicalValueDecl); Debug.assert(!!lexicalClass); if (findAncestor(lexicalClass, (n) => typeClass === n)) { - const diagnostic = error( + const diagnostic = error2( right, Diagnostics.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling, diagName, @@ -73414,7 +73933,7 @@ function createTypeChecker(host) { return true; } } - error( + error2( right, Diagnostics.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier, diagName, @@ -73456,18 +73975,24 @@ function createTypeChecker(host) { if (lexicallyScopedSymbol) { return isErrorType(apparentType) ? errorType : apparentType; } - if (!getContainingClass(right)) { + if (getContainingClassExcludingClassDecorators(right) === void 0) { grammarErrorOnNode(right, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); return anyType; } } - prop = lexicallyScopedSymbol ? getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol) : void 0; - if (!prop && checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { - return errorType; + prop = lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol); + if (prop === void 0) { + if (checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { + return errorType; + } + const containingClass = getContainingClassExcludingClassDecorators(right); + if (containingClass && isPlainJsFile(getSourceFileOfNode(containingClass), compilerOptions.checkJs)) { + grammarErrorOnNode(right, Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class, idText(right)); + } } else { - const isSetonlyAccessor = prop && prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); + const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); if (isSetonlyAccessor && assignmentKind !== 1 /* Definite */) { - error(node, Diagnostics.Private_accessor_was_defined_without_a_getter); + error2(node, Diagnostics.Private_accessor_was_defined_without_a_getter); } } } else { @@ -73483,10 +74008,10 @@ function createTypeChecker(host) { /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ - node.kind === 165 /* QualifiedName */ + node.kind === 166 /* QualifiedName */ ); } - if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 305 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 306 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -73504,9 +74029,9 @@ function createTypeChecker(host) { } if (leftType.symbol === globalThisSymbol) { if (globalThisSymbol.exports.has(right.escapedText) && globalThisSymbol.exports.get(right.escapedText).flags & 418 /* BlockScoped */) { - error(right, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(right.escapedText), typeToString(leftType)); + error2(right, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(right.escapedText), typeToString(leftType)); } else if (noImplicitAny) { - error(right, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature, typeToString(leftType)); + error2(right, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature, typeToString(leftType)); } return anyType; } @@ -73516,13 +74041,13 @@ function createTypeChecker(host) { return errorType; } if (indexInfo.isReadonly && (isAssignmentTarget(node) || isDeleteTarget(node))) { - error(node, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(apparentType)); + error2(node, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(apparentType)); } propType = compilerOptions.noUncheckedIndexedAccess && !isAssignmentTarget(node) ? getUnionType([indexInfo.type, missingType]) : indexInfo.type; if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression(node)) { - error(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText)); + error2(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText)); } - if (indexInfo.declaration && getCombinedNodeFlags(indexInfo.declaration) & 268435456 /* Deprecated */) { + if (indexInfo.declaration && isDeprecatedDeclaration2(indexInfo.declaration)) { addDeprecatedSuggestion(right, [indexInfo.declaration], right.escapedText); } } else { @@ -73535,7 +74060,7 @@ function createTypeChecker(host) { getNodeLinks(node).resolvedSymbol = prop; checkPropertyAccessibility(node, left.kind === 108 /* SuperKeyword */, isWriteAccess(node), apparentType, prop); if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) { - error(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); + error2(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); return errorType; } propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writeOnly || isWriteOnlyAccess(node) ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); @@ -73570,7 +74095,7 @@ function createTypeChecker(host) { if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 175 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 33554432 /* Ambient */)) { assumeUninitialized = true; } } @@ -73580,7 +74105,7 @@ function createTypeChecker(host) { } const flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType); if (assumeUninitialized && !containsUndefinedType(propType) && containsUndefinedType(flowType)) { - error(errorNode, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop)); + error2(errorNode, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop)); return propType; } return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; @@ -73592,10 +74117,10 @@ function createTypeChecker(host) { } let diagnosticMessage; const declarationName = idText(right); - if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlags(valueDeclaration) & 32 /* Static */) && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { - diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); - } else if (valueDeclaration.kind === 262 /* ClassDeclaration */ && node.parent.kind !== 182 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { - diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); + if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { + diagnosticMessage = error2(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); + } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + diagnosticMessage = error2(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { addRelatedInfo( @@ -73607,25 +74132,25 @@ function createTypeChecker(host) { function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return true; - case 302 /* PropertyAssignment */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 304 /* SpreadAssignment */: - case 166 /* ComputedPropertyName */: - case 238 /* TemplateSpan */: - case 293 /* JsxExpression */: - case 290 /* JsxAttribute */: - case 291 /* JsxAttributes */: - case 292 /* JsxSpreadAttribute */: - case 285 /* JsxOpeningElement */: - case 232 /* ExpressionWithTypeArguments */: - case 297 /* HeritageClause */: + case 303 /* PropertyAssignment */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 305 /* SpreadAssignment */: + case 167 /* ComputedPropertyName */: + case 239 /* TemplateSpan */: + case 294 /* JsxExpression */: + case 291 /* JsxAttribute */: + case 292 /* JsxAttributes */: + case 293 /* JsxSpreadAttribute */: + case 286 /* JsxOpeningElement */: + case 233 /* ExpressionWithTypeArguments */: + case 298 /* HeritageClause */: return false; - case 218 /* ArrowFunction */: - case 243 /* ExpressionStatement */: + case 219 /* ArrowFunction */: + case 244 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -73870,9 +74395,9 @@ function createTypeChecker(host) { } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return isValidPropertyAccessWithType(node, node.expression.kind === 108 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -73880,7 +74405,7 @@ function createTypeChecker(host) { propertyName, getWidenedType(checkExpression(node.left)) ); - case 204 /* ImportType */: + case 205 /* ImportType */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -73893,7 +74418,7 @@ function createTypeChecker(host) { function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 210 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, + node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, /*isWrite*/ false, type, @@ -73926,7 +74451,7 @@ function createTypeChecker(host) { } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 260 /* VariableDeclarationList */) { + if (initializer.kind === 261 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfDeclaration(variable); @@ -73947,7 +74472,7 @@ function createTypeChecker(host) { let child = expr; let node = expr.parent; while (node) { - if (node.kind === 248 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 249 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -73958,7 +74483,7 @@ function createTypeChecker(host) { return false; } function checkIndexedAccess(node, checkMode) { - return node.flags & 32 /* OptionalChain */ ? checkElementAccessChain(node, checkMode) : checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode); + return node.flags & 64 /* OptionalChain */ ? checkElementAccessChain(node, checkMode) : checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode); } function checkElementAccessChain(node, checkMode) { const exprType = checkExpression(node.expression); @@ -73973,7 +74498,7 @@ function createTypeChecker(host) { return objectType; } if (isConstEnumObjectType(objectType) && !isStringLiteralLike(indexExpression)) { - error(indexExpression, Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); + error2(indexExpression, Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); return errorType; } const effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType; @@ -73988,11 +74513,11 @@ function createTypeChecker(host) { if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 169 /* Decorator */) { + } else if (node.kind !== 170 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -74037,7 +74562,7 @@ function createTypeChecker(host) { } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 229 /* SpreadElement */ || arg.kind === 236 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 230 /* SpreadElement */ || arg.kind === 237 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -74053,9 +74578,9 @@ function createTypeChecker(host) { let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 227 /* TemplateExpression */) { + if (node.template.kind === 228 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -74063,7 +74588,7 @@ function createTypeChecker(host) { Debug.assert(templateLiteral.kind === 15 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 169 /* Decorator */) { + } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -74074,7 +74599,7 @@ function createTypeChecker(host) { effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 213 /* NewExpression */); + Debug.assert(node.kind === 214 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -74170,7 +74695,7 @@ function createTypeChecker(host) { if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 169 /* Decorator */) { + if (node.kind !== 170 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -74207,7 +74732,7 @@ function createTypeChecker(host) { } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 231 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 232 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -74235,11 +74760,11 @@ function createTypeChecker(host) { if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 236 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); + const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); if (isArrayLikeType(spreadType)) { return getMutableArrayOrTupleType(spreadType); } - return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 229 /* SpreadElement */ ? arg.expression : arg), inConstContext); + return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext); } } const types = []; @@ -74248,12 +74773,12 @@ function createTypeChecker(host) { for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 236 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 229 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { @@ -74263,7 +74788,7 @@ function createTypeChecker(host) { types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 236 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -74323,8 +74848,9 @@ function createTypeChecker(host) { void 0, checkMode ); + const checkAttributesType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(attributesType) : attributesType; return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate( - attributesType, + checkAttributesType, paramType, relation, reportErrors2 ? node.tagName : void 0, @@ -74440,7 +74966,7 @@ function createTypeChecker(host) { const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 231 /* OmittedExpression */) { + if (arg.kind !== 232 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType( arg, @@ -74498,7 +75024,7 @@ function createTypeChecker(host) { } } function getThisArgumentOfCall(node) { - const expression = node.kind === 212 /* CallExpression */ ? node.expression : node.kind === 214 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -74513,17 +75039,17 @@ function createTypeChecker(host) { return result; } function getEffectiveCallArguments(node) { - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 227 /* TemplateExpression */) { + if (template.kind === 228 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 169 /* Decorator */) { + if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -74535,7 +75061,7 @@ function createTypeChecker(host) { const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 229 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 230 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getElementTypes(spreadType), (t, i2) => { var _a; @@ -74574,16 +75100,16 @@ function createTypeChecker(host) { } function getLegacyDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return 1; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 168 /* Parameter */: + case 169 /* Parameter */: return 3; default: return Debug.fail(); @@ -74679,7 +75205,7 @@ function createTypeChecker(host) { if (isVoidPromiseError && isInJSFile(node)) { return getDiagnosticForCallNode(node, Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments); } - const error2 = isDecorator(node) ? hasRestParameter2 ? Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 : Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 : hasRestParameter2 ? Diagnostics.Expected_at_least_0_arguments_but_got_1 : isVoidPromiseError ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : Diagnostics.Expected_0_arguments_but_got_1; + const error3 = isDecorator(node) ? hasRestParameter2 ? Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 : Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 : hasRestParameter2 ? Diagnostics.Expected_at_least_0_arguments_but_got_1 : isVoidPromiseError ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : Diagnostics.Expected_0_arguments_but_got_1; if (min2 < args.length && args.length < max) { if (headMessage) { let chain = chainDiagnosticMessages( @@ -74700,14 +75226,14 @@ function createTypeChecker(host) { let chain = chainDiagnosticMessages( /*details*/ void 0, - error2, + error3, parameterRange, args.length ); chain = chainDiagnosticMessages(chain, headMessage); diagnostic = getDiagnosticForCallNode(node, chain); } else { - diagnostic = getDiagnosticForCallNode(node, error2, parameterRange, args.length); + diagnostic = getDiagnosticForCallNode(node, error3, parameterRange, args.length); } const parameter = (_a = closestSignature == null ? void 0 : closestSignature.declaration) == null ? void 0 : _a.parameters[closestSignature.thisParameter ? args.length + 1 : args.length]; if (parameter) { @@ -74728,14 +75254,14 @@ function createTypeChecker(host) { let chain = chainDiagnosticMessages( /*details*/ void 0, - error2, + error3, parameterRange, args.length ); chain = chainDiagnosticMessages(chain, headMessage); return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), errorSpan, chain); } - return createDiagnosticForNodeArray(getSourceFileOfNode(node), errorSpan, error2, parameterRange, args.length); + return createDiagnosticForNodeArray(getSourceFileOfNode(node), errorSpan, error3, parameterRange, args.length); } } function getTypeArgumentArityError(node, signatures, typeArguments, headMessage) { @@ -74797,8 +75323,8 @@ function createTypeChecker(host) { return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) { - const isTaggedTemplate = node.kind === 214 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 169 /* Decorator */; + const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; @@ -74810,21 +75336,15 @@ function createTypeChecker(host) { } const candidates = candidatesOutArray || []; reorderCandidates(signatures, candidates, callChainFlags); - if (!candidates.length) { - if (reportErrors2) { - diagnostics.add(getDiagnosticForCallNode(node, Diagnostics.Call_target_does_not_contain_any_signatures)); - } - return resolveErrorCall(node); - } + Debug.assert(candidates.length, "Revert #54442 and add a testcase with whatever triggered this"); const args = getEffectiveCallArguments(node); const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters; let argCheckMode = !isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? 4 /* SkipContextSensitive */ : 0 /* Normal */; - argCheckMode |= checkMode & 32 /* IsForStringLiteralArgumentCompletions */; let candidatesForArgumentError; let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 212 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -75043,7 +75563,7 @@ function createTypeChecker(host) { continue; } if (argCheckMode) { - argCheckMode = checkMode & 32 /* IsForStringLiteralArgumentCompletions */; + argCheckMode = 0 /* Normal */; if (inferenceContext) { const typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext); checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext.inferredTypeParameters); @@ -75092,7 +75612,7 @@ function createTypeChecker(host) { parameters.push(createCombinedSymbolFromTypes(symbols, mapDefined(candidates, (candidate) => tryGetTypeAtPosition(candidate, i)))); } const restParameterSymbols = mapDefined(candidates, (c) => signatureHasRestParameter(c) ? last(c.parameters) : void 0); - let flags = 0 /* None */; + let flags = 128 /* IsSignatureCandidateForOverloadFailure */; if (restParameterSymbols.length !== 0) { const type = createArrayType(getUnionType(mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); @@ -75217,13 +75737,13 @@ function createTypeChecker(host) { const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length; if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) { if (!isErrorType(funcType) && node.typeArguments) { - error(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); + error2(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); } return resolveUntypedCall(node); } if (!callSignatures.length) { if (numConstructSignatures) { - error(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); + error2(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); } else { let relatedInformation; if (node.arguments.length === 1) { @@ -75246,7 +75766,7 @@ function createTypeChecker(host) { return resolvingSignature; } if (callSignatures.some((sig) => isInJSFile(sig.declaration) && !!getJSDocClassTag(sig.declaration))) { - error(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); + error2(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); return resolveErrorCall(node); } return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags); @@ -75261,7 +75781,7 @@ function createTypeChecker(host) { if (node.arguments && languageVersion < 1 /* ES5 */) { const spreadIndex = getSpreadArgumentIndex(node.arguments); if (spreadIndex >= 0) { - error(node.arguments[spreadIndex], Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher); + error2(node.arguments[spreadIndex], Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher); } } let expressionType = checkNonNullExpression(node.expression); @@ -75274,7 +75794,7 @@ function createTypeChecker(host) { } if (isTypeAny(expressionType)) { if (node.typeArguments) { - error(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); + error2(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); } return resolveUntypedCall(node); } @@ -75284,12 +75804,12 @@ function createTypeChecker(host) { return resolveErrorCall(node); } if (someSignature(constructSignatures, (signature) => !!(signature.flags & 4 /* Abstract */))) { - error(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); + error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } const valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol); if (valueDecl && hasSyntacticModifier(valueDecl, 256 /* Abstract */)) { - error(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); + error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0 /* None */); @@ -75299,10 +75819,10 @@ function createTypeChecker(host) { const signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); if (!noImplicitAny) { if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) { - error(node, Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); + error2(node, Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); } if (getThisTypeOfSignature(signature) === voidType) { - error(node, Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void); + error2(node, Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void); } } return signature; @@ -75352,7 +75872,7 @@ function createTypeChecker(host) { } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 175 /* Constructor */) { + if (!modifiers || declaration.kind !== 176 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -75366,10 +75886,10 @@ function createTypeChecker(host) { } } if (modifiers & 8 /* Private */) { - error(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); + error2(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } if (modifiers & 16 /* Protected */) { - error(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); + error2(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } return false; } @@ -75499,16 +76019,16 @@ function createTypeChecker(host) { } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 168 /* Parameter */: + case 169 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; default: return Debug.fail(); @@ -75531,7 +76051,7 @@ function createTypeChecker(host) { /*includeTrivia*/ false ); - error(node, Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, nodeStr); + error2(node, Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, nodeStr); return resolveErrorCall(node); } const headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); @@ -75621,7 +76141,7 @@ function createTypeChecker(host) { return resolveUntypedCall(node); } if (signatures.length === 0) { - error(node.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node.tagName)); + error2(node.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node.tagName)); return resolveErrorCall(node); } return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); @@ -75631,16 +76151,16 @@ function createTypeChecker(host) { } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 169 /* Decorator */: + case 170 /* Decorator */: return resolveDecorator(node, candidatesOutArray, checkMode); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); @@ -75716,7 +76236,7 @@ function createTypeChecker(host) { let name; let decl; if (isVariableDeclaration(node.parent) && node.parent.initializer === node) { - if (!isInJSFile(node) && !(isVarConst(node.parent) && isFunctionLikeDeclaration(node))) { + if (!isInJSFile(node) && !(isVarConstLike(node.parent) && isFunctionLikeDeclaration(node))) { return void 0; } name = node.parent.name; @@ -75753,7 +76273,7 @@ function createTypeChecker(host) { return false; } let parent2 = node.parent; - while (parent2 && parent2.kind === 210 /* PropertyAccessExpression */) { + while (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { parent2 = parent2.parent; } if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 64 /* EqualsToken */) { @@ -75777,11 +76297,11 @@ function createTypeChecker(host) { if (node.expression.kind === 108 /* SuperKeyword */) { return voidType; } - if (node.kind === 213 /* NewExpression */) { + if (node.kind === 214 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 175 /* Constructor */ && declaration.kind !== 179 /* ConstructSignature */ && declaration.kind !== 184 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 175 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 176 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { - error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); + error2(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } return anyType; } @@ -75793,11 +76313,11 @@ function createTypeChecker(host) { if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 212 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 243 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 244 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { if (!isDottedName(node.expression)) { - error(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); + error2(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); } else if (!getEffectsSignature(node)) { - const diagnostic = error(node.expression, Diagnostics.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation); + const diagnostic = error2(node.expression, Diagnostics.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation); getTypeOfDottedName(node.expression, diagnostic); } } @@ -75816,7 +76336,9 @@ function createTypeChecker(host) { return returnType; } function checkDeprecatedSignature(signature, node) { - if (signature.declaration && signature.declaration.flags & 268435456 /* Deprecated */) { + if (signature.flags & 128 /* IsSignatureCandidateForOverloadFailure */) + return; + if (signature.declaration && signature.declaration.flags & 536870912 /* Deprecated */) { const suggestionNode = getDeprecatedSuggestionNode(node); const name = tryGetPropertyAccessOrIdentifierToString(getInvokedExpression(node)); addDeprecatedSuggestionWithSignature(suggestionNode, signature.declaration, name, signatureToString(signature)); @@ -75825,20 +76347,20 @@ function createTypeChecker(host) { function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 212 /* CallExpression */: - case 169 /* Decorator */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 170 /* Decorator */: + case 214 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return node.argumentExpression; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.name; - case 182 /* TypeReference */: + case 183 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -75886,7 +76408,7 @@ function createTypeChecker(host) { checkExpressionCached(node.arguments[i]); } if (specifierType.flags & 32768 /* Undefined */ || specifierType.flags & 65536 /* Null */ || !isTypeAssignableTo(specifierType, stringType)) { - error(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); + error2(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); } if (optionsType) { const importCallOptionsType = getGlobalImportCallOptionsType( @@ -75998,10 +76520,10 @@ function createTypeChecker(host) { if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 261 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 259 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 262 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 260 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); - return !!decl && !!(decl.flags & 16777216 /* Ambient */); + return !!decl && !!(decl.flags & 33554432 /* Ambient */); } return false; } @@ -76016,7 +76538,7 @@ function createTypeChecker(host) { return getReturnTypeOfSignature(signature); } function checkAssertion(node, checkMode) { - if (node.kind === 215 /* TypeAssertionExpression */) { + if (node.kind === 216 /* TypeAssertionExpression */) { const file = getSourceFileOfNode(node); if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) { grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); @@ -76032,18 +76554,18 @@ function createTypeChecker(host) { case 10 /* BigIntLiteral */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 227 /* TemplateExpression */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 228 /* TemplateExpression */: return true; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const op = node.operator; const arg = node.operand; return op === 41 /* MinusToken */ && (arg.kind === 9 /* NumericLiteral */ || arg.kind === 10 /* BigIntLiteral */) || op === 40 /* PlusToken */ && arg.kind === 9 /* NumericLiteral */; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = skipParentheses(node.expression); const symbol = isEntityNameExpression(expr) ? resolveEntityName( expr, @@ -76060,7 +76582,7 @@ function createTypeChecker(host) { const exprType = checkExpression(expression, checkMode); if (isConstTypeReference(type)) { if (!isValidConstAssertionArgument(expression)) { - error(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals); + error2(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals); } return getRegularTypeOfLiteralType(exprType); } @@ -76074,12 +76596,12 @@ function createTypeChecker(host) { let type; let expression; switch (node.kind) { - case 233 /* AsExpression */: - case 215 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 216 /* TypeAssertionExpression */: type = node.type; expression = node.expression; break; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: type = getJSDocTypeAssertionType(node); expression = node.expression; break; @@ -76113,18 +76635,18 @@ function createTypeChecker(host) { return propagateOptionalTypeMarker(getNonNullableType(nonOptionalType), node, nonOptionalType !== leftType); } function checkNonNullAssertion(node) { - return node.flags & 32 /* OptionalChain */ ? checkNonNullChain(node) : getNonNullableType(checkExpression(node.expression)); + return node.flags & 64 /* OptionalChain */ ? checkNonNullChain(node) : getNonNullableType(checkExpression(node.expression)); } function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); forEach(node.typeArguments, checkSourceElement); - if (node.kind === 232 /* ExpressionWithTypeArguments */) { + if (node.kind === 233 /* ExpressionWithTypeArguments */) { const parent2 = walkUpParenthesizedExpressions(node.parent); - if (parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent2.right)) { - error(node, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); + if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent2.right)) { + error2(node, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); } } - const exprType = node.kind === 232 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 233 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); return getInstantiationExpressionType(exprType, node); } function getInstantiationExpressionType(exprType, node) { @@ -76208,7 +76730,7 @@ function createTypeChecker(host) { if (isErrorType(targetType)) { return targetType; } - const errorNode = findAncestor(target.parent, (n) => n.kind === 237 /* SatisfiesExpression */ || n.kind === 356 /* JSDocSatisfiesTag */); + const errorNode = findAncestor(target.parent, (n) => n.kind === 238 /* SatisfiesExpression */ || n.kind === 357 /* JSDocSatisfiesTag */); checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1); return exprType; } @@ -76236,9 +76758,9 @@ function createTypeChecker(host) { function checkNewTargetMetaProperty(node) { const container = getNewTargetContainer(node); if (!container) { - error(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); + error2(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return errorType; - } else if (container.kind === 175 /* Constructor */) { + } else if (container.kind === 176 /* Constructor */) { const symbol = getSymbolOfDeclaration(container.parent); return getTypeOfSymbol(symbol); } else { @@ -76249,13 +76771,13 @@ function createTypeChecker(host) { function checkImportMetaProperty(node) { if (moduleKind === 100 /* Node16 */ || moduleKind === 199 /* NodeNext */) { if (getSourceFileOfNode(node).impliedNodeFormat !== 99 /* ESNext */) { - error(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output); + error2(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output); } } else if (moduleKind < 6 /* ES2020 */ && moduleKind !== 4 /* System */) { - error(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); + error2(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); } const file = getSourceFileOfNode(node); - Debug.assert(!!(file.flags & 4194304 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); + Debug.assert(!!(file.flags & 8388608 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType; } function getTypeOfParameter(symbol) { @@ -76268,7 +76790,10 @@ function createTypeChecker(host) { } return type; } - function getTupleElementLabel(d) { + function getTupleElementLabel(d, index, restParameterName = "arg") { + if (!d) { + return `${restParameterName}_${index}`; + } Debug.assert(isIdentifier(d.name)); return d.name.escapedText; } @@ -76282,22 +76807,28 @@ function createTypeChecker(host) { if (isTupleType(restType)) { const associatedNames = restType.target.labeledElementDeclarations; const index = pos - paramCount; - return associatedNames && getTupleElementLabel(associatedNames[index]) || restParameter.escapedName + "_" + index; + return getTupleElementLabel(associatedNames == null ? void 0 : associatedNames[index], index, restParameter.escapedName); } return restParameter.escapedName; } - function getParameterIdentifierNameAtPosition(signature, pos) { + function getParameterIdentifierInfoAtPosition(signature, pos) { var _a; - if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 323 /* JSDocFunctionType */) { + if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 324 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { const param = signature.parameters[pos]; - return isParameterDeclarationWithIdentifierName(param) ? [param.escapedName, false] : void 0; + const paramIdent = getParameterDeclarationIdentifier(param); + return paramIdent ? { + parameter: paramIdent, + parameterName: param.escapedName, + isRestParameter: false + } : void 0; } const restParameter = signature.parameters[paramCount] || unknownSymbol; - if (!isParameterDeclarationWithIdentifierName(restParameter)) { + const restIdent = getParameterDeclarationIdentifier(restParameter); + if (!restIdent) { return void 0; } const restType = getTypeOfSymbol(restParameter); @@ -76306,21 +76837,22 @@ function createTypeChecker(host) { const index = pos - paramCount; const associatedName = associatedNames == null ? void 0 : associatedNames[index]; const isRestTupleElement = !!(associatedName == null ? void 0 : associatedName.dotDotDotToken); - return associatedName ? [ - getTupleElementLabel(associatedName), - isRestTupleElement - ] : void 0; + if (associatedName) { + Debug.assert(isIdentifier(associatedName.name)); + return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement }; + } + return void 0; } if (pos === paramCount) { - return [restParameter.escapedName, true]; + return { parameter: restIdent, parameterName: restParameter.escapedName, isRestParameter: true }; } return void 0; } - function isParameterDeclarationWithIdentifierName(symbol) { - return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); + function getParameterDeclarationIdentifier(symbol) { + return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name) && symbol.valueDeclaration.name; } function isValidDeclarationForTupleLabel(d) { - return d.kind === 201 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -76656,17 +77188,17 @@ function createTypeChecker(host) { if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const contextType = createClassDecoratorContextType(targetType); links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType); break; } - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -76678,7 +77210,7 @@ function createTypeChecker(host) { links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); break; } - case 171 /* PropertyDeclaration */: { + case 172 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -76700,8 +77232,8 @@ function createTypeChecker(host) { if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const targetParam = createParameter("target", targetType); @@ -76715,7 +77247,7 @@ function createTypeChecker(host) { ); break; } - case 168 /* Parameter */: { + case 169 /* Parameter */: { const node = parent2; if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { break; @@ -76741,10 +77273,10 @@ function createTypeChecker(host) { ); break; } - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: { + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -76809,13 +77341,13 @@ function createTypeChecker(host) { function createPromiseReturnType(func, promisedType) { const promiseType = createPromiseType(promisedType); if (promiseType === unknownType) { - error(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); + error2(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); return errorType; } else if (!getGlobalPromiseConstructorSymbol( /*reportErrors*/ true )) { - error(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); + error2(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } return promiseType; } @@ -76839,7 +77371,7 @@ function createTypeChecker(host) { let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 240 /* Block */) { + if (func.body.kind !== 241 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType( @@ -77022,7 +77554,7 @@ function createTypeChecker(host) { return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 220 /* TypeOfExpression */) { + if (node.expression.kind === 221 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -77055,7 +77587,7 @@ function createTypeChecker(host) { forEachReturnStatement(func.body, (returnStatement) => { const expr = returnStatement.expression; if (expr) { - if (expr.kind === 212 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { + if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { hasReturnOfTypeNever = true; return; } @@ -77087,11 +77619,11 @@ function createTypeChecker(host) { } function mayReturnNever(func) { switch (func.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; - case 173 /* MethodDeclaration */: - return func.parent.kind === 209 /* ObjectLiteralExpression */; + case 174 /* MethodDeclaration */: + return func.parent.kind === 210 /* ObjectLiteralExpression */; default: return false; } @@ -77105,17 +77637,17 @@ function createTypeChecker(host) { if (type && (maybeTypeOfKind(type, 16384 /* Void */) || type.flags & (1 /* Any */ | 32768 /* Undefined */))) { return; } - if (func.kind === 172 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 240 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 241 /* Block */ || !functionHasImplicitReturn(func)) { return; } - const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; + const hasExplicitReturn = func.flags & 1024 /* HasExplicitReturn */; const errorNode = getEffectiveReturnTypeNode(func) || func; if (type && type.flags & 131072 /* Never */) { - error(errorNode, Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point); + error2(errorNode, Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point); } else if (type && !hasExplicitReturn) { - error(errorNode, Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value); + error2(errorNode, Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value); } else if (type && strictNullChecks && !isTypeAssignableTo(undefinedType, type)) { - error(errorNode, Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); + error2(errorNode, Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); } else if (compilerOptions.noImplicitReturns) { if (!type) { if (!hasExplicitReturn) { @@ -77126,12 +77658,12 @@ function createTypeChecker(host) { return; } } - error(errorNode, Diagnostics.Not_all_code_paths_return_a_value); + error2(errorNode, Diagnostics.Not_all_code_paths_return_a_value); } } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -77167,7 +77699,7 @@ function createTypeChecker(host) { return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 217 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -77216,7 +77748,7 @@ function createTypeChecker(host) { } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -77224,7 +77756,7 @@ function createTypeChecker(host) { if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 240 /* Block */) { + if (node.body.kind === 241 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -77286,7 +77818,7 @@ function createTypeChecker(host) { return !setProp; } function isReadonlySymbol(symbol) { - return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); + return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); } function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) { var _a, _b; @@ -77296,7 +77828,7 @@ function createTypeChecker(host) { if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 110 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 175 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -77317,7 +77849,7 @@ function createTypeChecker(host) { const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 273 /* NamespaceImport */; + return !!declaration && declaration.kind === 274 /* NamespaceImport */; } } } @@ -77326,11 +77858,11 @@ function createTypeChecker(host) { function checkReferenceExpression(expr, invalidReferenceMessage, invalidOptionalChainMessage) { const node = skipOuterExpressions(expr, 6 /* Assertions */ | 1 /* Parentheses */); if (node.kind !== 80 /* Identifier */ && !isAccessExpression(node)) { - error(expr, invalidReferenceMessage); + error2(expr, invalidReferenceMessage); return false; } - if (node.flags & 32 /* OptionalChain */) { - error(expr, invalidOptionalChainMessage); + if (node.flags & 64 /* OptionalChain */) { + error2(expr, invalidOptionalChainMessage); return false; } return true; @@ -77339,17 +77871,17 @@ function createTypeChecker(host) { checkExpression(node.expression); const expr = skipParentheses(node.expression); if (!isAccessExpression(expr)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); return booleanType; } if (isPropertyAccessExpression(expr) && isPrivateIdentifier(expr.name)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_private_identifier); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_private_identifier); } const links = getNodeLinks(expr); const symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol); if (symbol) { if (isReadonlySymbol(symbol)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property); } checkDeleteExpressionMustBeOptional(expr, symbol); } @@ -77358,7 +77890,7 @@ function createTypeChecker(host) { function checkDeleteExpressionMustBeOptional(expr, symbol) { const type = getTypeOfSymbol(symbol); if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : getTypeFacts(type) & 16777216 /* IsUndefined */)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional); } } function checkTypeOfExpression(node) { @@ -77369,24 +77901,24 @@ function createTypeChecker(host) { checkExpression(node.expression); return undefinedWideningType; } - function checkAwaitExpressionGrammar(node) { + function checkAwaitGrammar(node) { + let hasError = false; const container = getContainingFunctionOrClassStaticBlock(node); if (container && isClassStaticBlockDeclaration(container)) { - error(node, Diagnostics.Await_expression_cannot_be_used_inside_a_class_static_block); - } else if (!(node.flags & 32768 /* AwaitContext */)) { + const message = isAwaitExpression(node) ? Diagnostics.await_expression_cannot_be_used_inside_a_class_static_block : Diagnostics.await_using_statements_cannot_be_used_inside_a_class_static_block; + error2(node, message); + hasError = true; + } else if (!(node.flags & 65536 /* AwaitContext */)) { if (isInTopLevelContext(node)) { const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { let span; if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - const diagnostic = createFileDiagnostic( - sourceFile, - span.start, - span.length, - Diagnostics.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 - ); + const message = isAwaitExpression(node) ? Diagnostics.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 : Diagnostics.await_using_statements_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; + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); diagnostics.add(diagnostic); + hasError = true; } switch (moduleKind) { case 100 /* Node16 */: @@ -77396,6 +77928,7 @@ function createTypeChecker(host) { diagnostics.add( createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) ); + hasError = true; break; } case 7 /* ES2022 */: @@ -77406,14 +77939,9 @@ function createTypeChecker(host) { } default: span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - diagnostics.add( - createFileDiagnostic( - sourceFile, - span.start, - span.length, - Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher - ) - ); + const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher : Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher; + diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message)); + hasError = true; break; } } @@ -77421,21 +77949,25 @@ function createTypeChecker(host) { const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); - const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); - if (container && container.kind !== 175 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + const message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules; + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); + if (container && container.kind !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } diagnostics.add(diagnostic); + hasError = true; } } } - if (isInParameterInitializerBeforeContainingFunction(node)) { - error(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer); + if (isAwaitExpression(node) && isInParameterInitializerBeforeContainingFunction(node)) { + error2(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer); + hasError = true; } + return hasError; } function checkAwaitExpression(node) { - addLazyDiagnostic(() => checkAwaitExpressionGrammar(node)); + addLazyDiagnostic(() => checkAwaitGrammar(node)); const operandType = checkExpression(node.expression); const awaitedType = checkAwaitedType( operandType, @@ -77481,11 +78013,11 @@ function createTypeChecker(host) { case 55 /* TildeToken */: checkNonNullType(operandType, node.operand); if (maybeTypeOfKindConsideringBaseConstraint(operandType, 12288 /* ESSymbolLike */)) { - error(node.operand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(node.operator)); + error2(node.operand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(node.operator)); } if (node.operator === 40 /* PlusToken */) { if (maybeTypeOfKindConsideringBaseConstraint(operandType, 2112 /* BigIntLike */)) { - error(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType))); + error2(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType))); } return numberType; } @@ -77581,10 +78113,10 @@ function createTypeChecker(host) { return silentNeverType; } if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { - error(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); + error2(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { - error(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); + error2(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); } return booleanType; } @@ -77613,7 +78145,7 @@ function createTypeChecker(host) { } if (checkTypeAssignableTo(checkNonNullType(rightType, right), nonPrimitiveType, right)) { if (hasEmptyObjectIntersection(rightType)) { - error(right, Diagnostics.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, typeToString(rightType)); + error2(right, Diagnostics.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, typeToString(rightType)); } } return booleanType; @@ -77631,7 +78163,7 @@ function createTypeChecker(host) { function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 302 /* PropertyAssignment */ || property.kind === 303 /* ShorthandPropertyAssignment */) { + if (property.kind === 303 /* PropertyAssignment */ || property.kind === 304 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -77652,10 +78184,10 @@ function createTypeChecker(host) { } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 303 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 304 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 304 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 305 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { - error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); + error2(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { if (languageVersion < 99 /* ESNext */) { checkExternalEmitHelpers(property, 4 /* Rest */); @@ -77673,7 +78205,7 @@ function createTypeChecker(host) { return checkDestructuringAssignment(property.expression, type); } } else { - error(property, Diagnostics.Property_assignment_expected); + error2(property, Diagnostics.Property_assignment_expected); } } function checkArrayLiteralAssignment(node, sourceType, checkMode) { @@ -77685,7 +78217,7 @@ function createTypeChecker(host) { let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 229 /* SpreadElement */) { + if (node.elements[i].kind === 230 /* SpreadElement */) { type = inBoundsType = inBoundsType ?? (checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType); } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -77695,8 +78227,8 @@ function createTypeChecker(host) { function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 231 /* OmittedExpression */) { - if (element.kind !== 229 /* SpreadElement */) { + if (element.kind !== 232 /* OmittedExpression */) { + if (element.kind !== 230 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -77708,11 +78240,11 @@ function createTypeChecker(host) { return checkDestructuringAssignment(element, elementType, checkMode); } if (elementIndex < elements.length - 1) { - error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); + error2(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 225 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { - error(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); + if (restExpression.kind === 226 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { + error2(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); } else { checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); const type = everyType(sourceType, isTupleType) ? mapType(sourceType, (t) => sliceTupleType(t, elementIndex)) : createArrayType(elementType); @@ -77724,7 +78256,7 @@ function createTypeChecker(host) { } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 303 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -77736,26 +78268,26 @@ function createTypeChecker(host) { } else { target = exprOrAssignment; } - if (target.kind === 225 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { + if (target.kind === 226 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 209 /* ObjectLiteralExpression */) { + if (target.kind === 210 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 208 /* ArrayLiteralExpression */) { + if (target.kind === 209 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { const targetType = checkExpression(target, checkMode); - const error2 = target.parent.kind === 304 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; - const optionalError = target.parent.kind === 304 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; - if (checkReferenceExpression(target, error2, optionalError)) { + const error3 = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; + const optionalError = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + if (checkReferenceExpression(target, error3, optionalError)) { checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target); } if (isPrivateIdentifierPropertyAccessExpression(target)) { @@ -77769,8 +78301,8 @@ function createTypeChecker(host) { case 80 /* Identifier */: case 11 /* StringLiteral */: case 14 /* RegularExpressionLiteral */: - case 214 /* TaggedTemplateExpression */: - case 227 /* TemplateExpression */: + case 215 /* TaggedTemplateExpression */: + case 228 /* TemplateExpression */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: @@ -77778,25 +78310,25 @@ function createTypeChecker(host) { case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 157 /* UndefinedKeyword */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 220 /* TypeOfExpression */: - case 234 /* NonNullExpression */: - case 284 /* JsxSelfClosingElement */: - case 283 /* JsxElement */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 221 /* TypeOfExpression */: + case 235 /* NonNullExpression */: + case 285 /* JsxSelfClosingElement */: + case 284 /* JsxElement */: return true; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: switch (node.operator) { case 54 /* ExclamationToken */: case 40 /* PlusToken */: @@ -77805,9 +78337,9 @@ function createTypeChecker(host) { return true; } return false; - case 221 /* VoidExpression */: - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 222 /* VoidExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: default: return false; } @@ -77851,7 +78383,7 @@ function createTypeChecker(host) { } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (node.left.kind === 209 /* ObjectLiteralExpression */ || node.left.kind === 208 /* ArrayLiteralExpression */)) { + if (operator === 64 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) { state.skip = true; setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 110 /* ThisKeyword */)); return state; @@ -77876,7 +78408,7 @@ function createTypeChecker(host) { const operator = operatorToken.kind; if (isLogicalOrCoalescingBinaryOperator(operator)) { let parent2 = node.parent; - while (parent2.kind === 216 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { + while (parent2.kind === 217 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { parent2 = parent2.parent; } if (operator === 56 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) { @@ -77900,7 +78432,7 @@ function createTypeChecker(host) { Debug.assertIsDefined(leftType); const rightType = getLastResult(state); Debug.assertIsDefined(rightType); - result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node); + result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, state.checkMode, node); } state.skip = false; setLeftType( @@ -77952,7 +78484,7 @@ function createTypeChecker(host) { } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (left.kind === 209 /* ObjectLiteralExpression */ || left.kind === 208 /* ArrayLiteralExpression */)) { + if (operator === 64 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 110 /* ThisKeyword */); } let leftType; @@ -77962,9 +78494,9 @@ function createTypeChecker(host) { leftType = checkExpression(left, checkMode); } const rightType = checkExpression(right, checkMode); - return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode); } - function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode) { + function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode) { const operator = operatorToken.kind; switch (operator) { case 42 /* AsteriskToken */: @@ -77996,7 +78528,7 @@ function createTypeChecker(host) { rightType = checkNonNullType(rightType, right); let suggestedOperator; if (leftType.flags & 528 /* BooleanLike */ && rightType.flags & 528 /* BooleanLike */ && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== void 0) { - error(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator)); + error2(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator)); return numberType; } else { const leftOk = checkArithmeticOperandType( @@ -78026,7 +78558,7 @@ function createTypeChecker(host) { case 43 /* AsteriskAsteriskToken */: case 68 /* AsteriskAsteriskEqualsToken */: if (languageVersion < 3 /* ES2016 */) { - error(errorNode, Diagnostics.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later); + error2(errorNode, Diagnostics.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later); } } resultType2 = bigintType; @@ -78121,12 +78653,15 @@ function createTypeChecker(host) { case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - if (isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) { - const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; - error(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); + if (!(checkMode && checkMode & 128 /* TypeOnly */)) { + if ((isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && // only report for === and !== in JS, not == or != + (!isInJSFile(left) || (operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */))) { + const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; + error2(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); + } + checkNaNEquality(errorNode, operator, left, right); + reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); } - checkNaNEquality(errorNode, operator, left, right); - reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); return booleanType; case 104 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); @@ -78179,7 +78714,7 @@ function createTypeChecker(host) { return textSpanContainsPosition(diag2, start2); }); if (!isInDiag2657) - error(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); + error2(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); } return rightType; default: @@ -78213,13 +78748,13 @@ function createTypeChecker(host) { } } function isIndirectCall(node) { - return node.parent.kind === 216 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 214 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + return node.parent.kind === 217 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 215 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval"); } function checkForDisallowedESSymbolOperand(operator2) { const offendingSymbolOperand = maybeTypeOfKindConsideringBaseConstraint(leftType, 12288 /* ESSymbolLike */) ? left : maybeTypeOfKindConsideringBaseConstraint(rightType, 12288 /* ESSymbolLike */) ? right : void 0; if (offendingSymbolOperand) { - error(offendingSymbolOperand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(operator2)); + error2(offendingSymbolOperand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(operator2)); return false; } return true; @@ -78245,7 +78780,7 @@ function createTypeChecker(host) { } function checkAssignmentOperatorWorker() { let assigneeType = leftType; - if (isCompoundAssignment(operatorToken.kind) && left.kind === 210 /* PropertyAccessExpression */) { + if (isCompoundAssignment(operatorToken.kind) && left.kind === 211 /* PropertyAccessExpression */) { assigneeType = checkPropertyAccessExpression( left, /*checkMode*/ @@ -78340,7 +78875,7 @@ function createTypeChecker(host) { const isLeftNaN = isGlobalNaN(skipParentheses(left2)); const isRightNaN = isGlobalNaN(skipParentheses(right2)); if (isLeftNaN || isRightNaN) { - const err = error( + const err = error2( errorNode2, Diagnostics.This_condition_will_always_return_0, tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */) @@ -78421,23 +78956,23 @@ function createTypeChecker(host) { void 0 ); if (!contextualType || isTypeAny(contextualType)) { - error(node, Diagnostics.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation); + error2(node, Diagnostics.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation); } } }); } return type; function checkYieldExpressionGrammar() { - if (!(node.flags & 8192 /* YieldContext */)) { + if (!(node.flags & 16384 /* YieldContext */)) { grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { - error(node, Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer); + error2(node, Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer); } } } function checkConditionalExpression(node, checkMode) { - const type = checkTruthinessExpression(node.condition); + const type = checkTruthinessExpression(node.condition, checkMode); checkTestingKnownTruthyCallableOrAwaitableType(node.condition, type, node.whenTrue); const type1 = checkExpression(node.whenTrue, checkMode); const type2 = checkExpression(node.whenFalse, checkMode); @@ -78453,16 +78988,20 @@ function createTypeChecker(host) { for (const span of node.templateSpans) { const type = checkExpression(span.expression); if (maybeTypeOfKindConsideringBaseConstraint(type, 12288 /* ESSymbolLike */)) { - error(span.expression, Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String); + error2(span.expression, Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String); } texts.push(span.literal.text); types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType); } - return isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType2( + if (isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType2( node, /*contextFlags*/ void 0 - ) || unknownType, isTemplateLiteralContextualType) ? getTemplateLiteralType(texts, types) : stringType; + ) || unknownType, isTemplateLiteralContextualType)) { + return getTemplateLiteralType(texts, types); + } + const evaluated = node.parent.kind !== 215 /* TaggedTemplateExpression */ && evaluateTemplateExpression(node); + return evaluated ? getFreshTypeOfLiteralType(getStringLiteralType(evaluated)) : stringType; } function isTemplateLiteralContextualType(type) { return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */)); @@ -78518,7 +79057,7 @@ function createTypeChecker(host) { /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 215 /* TypeAssertionExpression */ || node.kind === 233 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 234 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); @@ -78535,7 +79074,7 @@ function createTypeChecker(host) { void 0, checkMode || 0 /* Normal */ ) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 206 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; } function padTupleType(type, pattern) { const patternElements = pattern.elements; @@ -78543,7 +79082,7 @@ function createTypeChecker(host) { const elementFlags = type.target.elementFlags.slice(); for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) { const e = patternElements[i]; - if (i < patternElements.length - 1 || !(e.kind === 207 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 208 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement( e, /*includePatternInType*/ @@ -78560,7 +79099,7 @@ function createTypeChecker(host) { return createTupleType(elementTypes, elementFlags, type.target.readonly); } function widenTypeInferredFromInitializer(declaration, type) { - const widened = getCombinedNodeFlags(declaration) & 2 /* Const */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); + const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); if (isInJSFile(declaration)) { if (isEmptyLiteralType(widened)) { reportImplicitAny(declaration, anyType); @@ -78604,14 +79143,14 @@ function createTypeChecker(host) { )); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -78767,18 +79306,18 @@ function createTypeChecker(host) { if (quickType) { return quickType; } - if (node.flags & 134217728 /* TypeCached */ && flowTypeCache) { + if (node.flags & 268435456 /* TypeCached */ && flowTypeCache) { const cachedType = flowTypeCache[getNodeId(node)]; if (cachedType) { return cachedType; } } const startInvocationCount = flowInvocationCount; - const type = checkExpression(node); + const type = checkExpression(node, 128 /* TypeOnly */); if (flowInvocationCount !== startInvocationCount) { const cache = flowTypeCache || (flowTypeCache = []); cache[getNodeId(node)] = type; - setNodeFlags(node, node.flags | 134217728 /* TypeCached */); + setNodeFlags(node, node.flags | 268435456 /* TypeCached */); } return type; } @@ -78843,15 +79382,15 @@ function createTypeChecker(host) { return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 211 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 165 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 185 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 280 /* ExportSpecifier */; + const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 281 /* ExportSpecifier */; if (!ok) { - error(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); + error2(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } if (getIsolatedModules(compilerOptions)) { Debug.assert(!!(type.symbol.flags & 128 /* ConstEnum */)); const constEnumDeclaration = type.symbol.valueDeclaration; - if (constEnumDeclaration.flags & 16777216 /* Ambient */) { - error(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); + if (constEnumDeclaration.flags & 33554432 /* Ambient */ && !isValidTypeOnlyAliasUseSite(node)) { + error2(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); } } } @@ -78870,9 +79409,9 @@ function createTypeChecker(host) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -78889,7 +79428,7 @@ function createTypeChecker(host) { return nullWideningType; case 15 /* NoSubstitutionTemplateLiteral */: case 11 /* StringLiteral */: - return hasSkipDirectInferenceFlag(node) ? anyType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -78903,81 +79442,81 @@ function createTypeChecker(host) { return trueType; case 97 /* FalseKeyword */: return falseType; - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return checkTemplateExpression(node); case 14 /* RegularExpressionLiteral */: return globalRegExpType; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (node.expression.kind === 102 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 213 /* NewExpression */: + case 214 /* NewExpression */: return checkCallExpression(node, checkMode); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return checkClassExpression(node); - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return checkAssertion(node, checkMode); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return checkNonNullAssertion(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return checkMetaProperty(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return checkDeleteExpression(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return checkVoidExpression(node); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return checkAwaitExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 231 /* OmittedExpression */: + case 232 /* OmittedExpression */: return undefinedWideningType; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return checkYieldExpression(node); - case 236 /* SyntheticExpression */: + case 237 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return checkJsxElement(node, checkMode); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return checkJsxFragment(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -78992,7 +79531,7 @@ function createTypeChecker(host) { const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node)); getBaseConstraintOfType(typeParameter); if (!hasNonCircularTypeParameterDefault(typeParameter)) { - error(node.default, Diagnostics.Type_parameter_0_has_a_circular_default, typeToString(typeParameter)); + error2(node.default, Diagnostics.Type_parameter_0_has_a_circular_default, typeToString(typeParameter)); } const constraintType = getConstraintOfTypeParameter(typeParameter); const defaultType = getDefaultFromTypeParameter(typeParameter); @@ -79010,7 +79549,7 @@ function createTypeChecker(host) { if (modifiers) { const symbol = getSymbolOfDeclaration(node.parent); if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) { - error(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); + error2(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); } else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) { (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) }); const source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck); @@ -79029,38 +79568,38 @@ function createTypeChecker(host) { checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 175 /* Constructor */ && nodeIsPresent(func.body))) { - error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); + if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { + error2(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 175 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { - error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); + if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + error2(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } if (!node.initializer && isOptionalDeclaration(node) && isBindingPattern(node.name) && func.body) { - error(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); + error2(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); } if (node.name && isIdentifier(node.name) && (node.name.escapedText === "this" || node.name.escapedText === "new")) { if (func.parameters.indexOf(node) !== 0) { - error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); + error2(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 175 /* Constructor */ || func.kind === 179 /* ConstructSignature */ || func.kind === 184 /* ConstructorType */) { - error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); + if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) { + error2(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 218 /* ArrowFunction */) { - error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); + if (func.kind === 219 /* ArrowFunction */) { + error2(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 176 /* GetAccessor */ || func.kind === 177 /* SetAccessor */) { - error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); + if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) { + error2(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } if (node.dotDotDotToken && !isBindingPattern(node.name) && !isTypeAssignableTo(getReducedType(getTypeOfSymbol(node.symbol)), anyReadonlyArrayType)) { - error(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type); + error2(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type); } } function checkTypePredicate(node) { const parent2 = getTypePredicateParent(node); if (!parent2) { - error(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + error2(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); return; } const signature = getSignatureFromDeclaration(parent2); @@ -79075,7 +79614,7 @@ function createTypeChecker(host) { } else { if (typePredicate.parameterIndex >= 0) { if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { - error(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); + error2(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { if (typePredicate.type) { const leadingError = () => chainDiagnosticMessages( @@ -79102,20 +79641,20 @@ function createTypeChecker(host) { } } if (!hasReportedError) { - error(node.parameterName, Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); + error2(node.parameterName, Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); } } } } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 218 /* ArrowFunction */: - case 178 /* CallSignature */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 219 /* ArrowFunction */: + case 179 /* CallSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: const parent2 = node.parent; if (node === parent2.type) { return parent2; @@ -79129,13 +79668,13 @@ function createTypeChecker(host) { } const name = element.name; if (name.kind === 80 /* Identifier */ && name.escapedText === predicateVariableName) { - error( + error2( predicateVariableNode, Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName ); return true; - } else if (name.kind === 206 /* ArrayBindingPattern */ || name.kind === 205 /* ObjectBindingPattern */) { + } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -79147,9 +79686,9 @@ function createTypeChecker(host) { } } function checkSignatureDeclaration(node) { - if (node.kind === 180 /* IndexSignature */) { + if (node.kind === 181 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 183 /* FunctionType */ || node.kind === 261 /* FunctionDeclaration */ || node.kind === 184 /* ConstructorType */ || node.kind === 178 /* CallSignature */ || node.kind === 175 /* Constructor */ || node.kind === 179 /* ConstructSignature */) { + } else if (node.kind === 184 /* FunctionType */ || node.kind === 262 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -79173,35 +79712,46 @@ function createTypeChecker(host) { addLazyDiagnostic(checkSignatureDeclarationDiagnostics); function checkSignatureDeclarationDiagnostics() { checkCollisionWithArgumentsInGeneratedCode(node); - const returnTypeNode = getEffectiveReturnTypeNode(node); + let returnTypeNode = getEffectiveReturnTypeNode(node); + let returnTypeErrorLocation = returnTypeNode; + if (isInJSFile(node)) { + const typeTag = getJSDocTypeTag(node); + if (typeTag && typeTag.typeExpression && isTypeReferenceNode(typeTag.typeExpression.type)) { + const signature = getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression)); + if (signature && signature.declaration) { + returnTypeNode = getEffectiveReturnTypeNode(signature.declaration); + returnTypeErrorLocation = typeTag.typeExpression.type; + } + } + } if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 179 /* ConstructSignature */: - error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); + case 180 /* ConstructSignature */: + error2(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 178 /* CallSignature */: - error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); + case 179 /* CallSignature */: + error2(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } } - if (returnTypeNode) { + if (returnTypeNode && returnTypeErrorLocation) { const functionFlags2 = getFunctionFlags(node); if ((functionFlags2 & (4 /* Invalid */ | 1 /* Generator */)) === 1 /* Generator */) { const returnType = getTypeFromTypeNode(returnTypeNode); if (returnType === voidType) { - error(returnTypeNode, Diagnostics.A_generator_cannot_have_a_void_type_annotation); + error2(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation); } else { const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType; const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType; const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType; const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */)); - checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeNode); + checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation); } } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) { - checkAsyncFunctionReturnType(node, returnTypeNode); + checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation); } } - if (node.kind !== 180 /* IndexSignature */ && node.kind !== 323 /* JSDocFunctionType */) { + if (node.kind !== 181 /* IndexSignature */ && node.kind !== 324 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -79211,7 +79761,7 @@ function createTypeChecker(host) { const staticNames = /* @__PURE__ */ new Map(); const privateIdentifiers = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 175 /* Constructor */) { + if (member.kind === 176 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -79229,16 +79779,16 @@ function createTypeChecker(host) { const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -79249,16 +79799,16 @@ function createTypeChecker(host) { const prev = names.get(name); if (prev) { if ((prev & 16 /* PrivateStatic */) !== (meaning & 16 /* PrivateStatic */)) { - error(location, Diagnostics.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, getTextOfNode(location)); + error2(location, Diagnostics.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, getTextOfNode(location)); } else { const prevIsMethod = !!(prev & 8 /* Method */); const isMethod = !!(meaning & 8 /* Method */); if (prevIsMethod || isMethod) { if (prevIsMethod !== isMethod) { - error(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); + error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); } } else if (prev & meaning & ~16 /* PrivateStatic */) { - error(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); + error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); } else { names.set(name, prev | meaning); } @@ -79279,10 +79829,13 @@ function createTypeChecker(host) { case "length": case "caller": case "arguments": + if (useDefineForClassFields) { + break; + } case "prototype": const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1; const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node)); - error(memberNameNode, message, memberName, className); + error2(memberNameNode, message, memberName, className); break; } } @@ -79291,7 +79844,7 @@ function createTypeChecker(host) { function checkObjectTypeForDuplicateDeclarations(node) { const names = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 170 /* PropertySignature */) { + if (member.kind === 171 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -79306,8 +79859,8 @@ function createTypeChecker(host) { continue; } if (names.get(memberName)) { - error(getNameOfDeclaration(member.symbol.valueDeclaration), Diagnostics.Duplicate_identifier_0, memberName); - error(member.name, Diagnostics.Duplicate_identifier_0, memberName); + error2(getNameOfDeclaration(member.symbol.valueDeclaration), Diagnostics.Duplicate_identifier_0, memberName); + error2(member.name, Diagnostics.Duplicate_identifier_0, memberName); } else { names.set(memberName, true); } @@ -79315,7 +79868,7 @@ function createTypeChecker(host) { } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 263 /* InterfaceDeclaration */) { + if (node.kind === 264 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfDeclaration(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -79339,7 +79892,7 @@ function createTypeChecker(host) { indexSignatureMap.forEach((entry) => { if (entry.declarations.length > 1) { for (const declaration of entry.declarations) { - error(declaration, Diagnostics.Duplicate_index_signature_for_type_0, typeToString(entry.type)); + error2(declaration, Diagnostics.Duplicate_index_signature_for_type_0, typeToString(entry.type)); } } }); @@ -79350,13 +79903,13 @@ function createTypeChecker(host) { checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* PropertyDeclaration */ && node.initializer) { - error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { + error2(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } function checkPropertySignature(node) { if (isPrivateIdentifier(node.name)) { - error(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + error2(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); } return checkPropertyDeclaration(node); } @@ -79364,21 +79917,21 @@ function createTypeChecker(host) { if (!checkGrammarMethod(node)) checkGrammarComputedPropertyName(node.name); if (isMethodDeclaration(node) && node.asteriskToken && isIdentifier(node.name) && idText(node.name) === "constructor") { - error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); + error2(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 173 /* MethodDeclaration */ && node.body) { - error(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + error2(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { - error(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + error2(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); } setNodeLinksForPrivateIdentifierScope(node); } function setNodeLinksForPrivateIdentifierScope(node) { if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) { for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) { - getNodeLinks(lexicalScope).flags |= 4194304 /* ContainsClassWithPrivateIdentifiers */; + getNodeLinks(lexicalScope).flags |= 1048576 /* ContainsClassWithPrivateIdentifiers */; } if (isClassExpression(node.parent)) { const enclosingIterationStatement = getEnclosingIterationStatement(node.parent); @@ -79412,7 +79965,7 @@ function createTypeChecker(host) { if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 171 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -79422,12 +79975,12 @@ function createTypeChecker(host) { const superCall = findFirstSuperCall(node.body); if (superCall) { if (classExtendsNull) { - error(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); + error2(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); } - const superCallShouldBeRootLevel = (getEmitScriptTarget(compilerOptions) !== 99 /* ESNext */ || !useDefineForClassFields) && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); + const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); if (superCallShouldBeRootLevel) { if (!superCallIsRootLevelInConstructor(superCall, node.body)) { - error(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); + error2(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); } else { let superCallStatement; for (const statement of node.body.statements) { @@ -79440,12 +79993,12 @@ function createTypeChecker(host) { } } if (superCallStatement === void 0) { - error(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers); + error2(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers); } } } } else if (!classExtendsNull) { - error(node, Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); + error2(node, Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); } } } @@ -79465,7 +80018,7 @@ function createTypeChecker(host) { } function checkAccessorDeclaration(node) { if (isIdentifier(node.name) && idText(node.name) === "constructor" && isClassLike(node.parent)) { - error(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); + error2(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); } addLazyDiagnostic(checkAccessorDeclarationDiagnostics); checkSourceElement(node.body); @@ -79475,36 +80028,36 @@ function createTypeChecker(host) { checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 176 /* GetAccessor */) { - if (!(node.flags & 16777216 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 256 /* HasImplicitReturn */) { - if (!(node.flags & 512 /* HasExplicitReturn */)) { - error(node.name, Diagnostics.A_get_accessor_must_return_a_value); + if (node.kind === 177 /* GetAccessor */) { + if (!(node.flags & 33554432 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 512 /* HasImplicitReturn */) { + if (!(node.flags & 1024 /* HasExplicitReturn */)) { + error2(node.name, Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfDeclaration(node); - const getter = getDeclarationOfKind(symbol, 176 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); const setterFlags = getEffectiveModifierFlags(setter); if ((getterFlags & 256 /* Abstract */) !== (setterFlags & 256 /* Abstract */)) { - error(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); - error(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); + error2(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); + error2(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); } if (getterFlags & 16 /* Protected */ && !(setterFlags & (16 /* Protected */ | 8 /* Private */)) || getterFlags & 8 /* Private */ && !(setterFlags & 8 /* Private */)) { - error(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); - error(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); + error2(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); + error2(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); } } } const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node)); - if (node.kind === 176 /* GetAccessor */) { + if (node.kind === 177 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -79565,7 +80118,7 @@ function createTypeChecker(host) { } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 182 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { + if (node.kind === 183 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { const sourceFile = getSourceFileOfNode(node); if (scanTokenAtPosition(sourceFile, node.typeName.end) === 25 /* DotToken */) { grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); @@ -79587,7 +80140,7 @@ function createTypeChecker(host) { } const symbol = getNodeLinks(node).resolvedSymbol; if (symbol) { - if (some(symbol.declarations, (d) => isTypeDeclaration(d) && !!(d.flags & 268435456 /* Deprecated */))) { + if (some(symbol.declarations, (d) => isTypeDeclaration(d) && !!(d.flags & 536870912 /* Deprecated */))) { addDeprecatedSuggestion( getDeprecatedSuggestionNode(node), symbol.declarations, @@ -79627,17 +80180,12 @@ function createTypeChecker(host) { const elementTypes = node.elements; let seenOptionalElement = false; let seenRestElement = false; - const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 201 /* NamedTupleMember */ && hasNamedElement) { - grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); - break; - } const flags = getTupleElementFlags(e); if (flags & 8 /* Variadic */) { const type = getTypeFromTypeNode(e.type); if (!isArrayLikeType(type)) { - error(e, Diagnostics.A_rest_element_type_must_be_an_array_type); + error2(e, Diagnostics.A_rest_element_type_must_be_an_array_type); break; } if (isArrayType(type) || isTupleType(type) && type.target.combinedFlags & 4 /* Rest */) { @@ -79674,8 +80222,8 @@ function createTypeChecker(host) { const objectType = type.objectType; const indexType = type.indexType; if (isTypeAssignableTo(indexType, getIndexType(objectType, 0 /* None */))) { - if (accessNode.kind === 211 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { - error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); + if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + error2(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } return type; } @@ -79688,12 +80236,12 @@ function createTypeChecker(host) { if (propertyName) { const propertySymbol = forEachType(apparentObjectType, (t) => getPropertyOfType(t, propertyName)); if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 24 /* NonPublicAccessibilityModifier */) { - error(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName)); + error2(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName)); return errorType; } } } - error(accessNode, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType)); + error2(accessNode, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType)); return errorType; } function checkIndexedAccessType(node) { @@ -79735,7 +80283,7 @@ function createTypeChecker(host) { forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 193 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -79745,11 +80293,11 @@ function createTypeChecker(host) { if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 167 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { - error(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_constraints, name); + error2(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_constraints, name); } } } @@ -79783,22 +80331,23 @@ function createTypeChecker(host) { if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 189 /* OptionalType */) { + if (node.type.kind === 190 /* OptionalType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type); } - if (node.type.kind === 190 /* RestType */) { + if (node.type.kind === 191 /* RestType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type); } checkSourceElement(node.type); getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 16777216 /* Ambient */); + return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { - let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 263 /* InterfaceDeclaration */ && n.parent.kind !== 262 /* ClassDeclaration */ && n.parent.kind !== 230 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { - if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { + let flags = getCombinedModifierFlagsCached(n); + if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) { + const container = getEnclosingContainer(n); + if (container && container.flags & 128 /* ExportContext */ && !(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } flags |= 2 /* Ambient */; @@ -79820,13 +80369,13 @@ function createTypeChecker(host) { forEach(overloads, (o) => { const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags; if (deviation & 1 /* Export */) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); } else if (deviation & 2 /* Ambient */) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); } else if (deviation & (8 /* Private */ | 16 /* Protected */)) { - error(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); + error2(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); } else if (deviation & 256 /* Abstract */) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); } }); } @@ -79837,7 +80386,7 @@ function createTypeChecker(host) { forEach(overloads, (o) => { const deviation = hasQuestionToken(o) !== canonicalHasQuestionToken; if (deviation) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_optional_or_required); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_optional_or_required); } }); } @@ -79873,27 +80422,27 @@ function createTypeChecker(host) { (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || // Both are computed property names isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) && isTypeIdenticalTo(checkComputedPropertyName(node.name), checkComputedPropertyName(subsequentName)) || // Both are literal property names that are the same. isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); if (reportError) { const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; - error(errorNode2, diagnostic); + error2(errorNode2, diagnostic); } return; } if (nodeIsPresent(subsequentNode.body)) { - error(errorNode2, Diagnostics.Function_implementation_name_must_be_0, declarationNameToString(node.name)); + error2(errorNode2, Diagnostics.Function_implementation_name_must_be_0, declarationNameToString(node.name)); return; } } } const errorNode = node.name || node; if (isConstructor) { - error(errorNode, Diagnostics.Constructor_implementation_is_missing); + error2(errorNode, Diagnostics.Constructor_implementation_is_missing); } else { if (hasSyntacticModifier(node, 256 /* Abstract */)) { - error(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive); + error2(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive); } else { - error(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); + error2(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); } } } @@ -79904,15 +80453,15 @@ function createTypeChecker(host) { if (declarations) { for (const current of declarations) { const node = current; - const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 263 /* InterfaceDeclaration */ || node.parent.kind === 186 /* TypeLiteral */) || inAmbientContext; + const inAmbientContext = node.flags & 33554432 /* Ambient */; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 264 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 261 /* FunctionDeclaration */ || node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */ || node.kind === 175 /* Constructor */) { + if (node.kind === 262 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -79956,21 +80505,21 @@ function createTypeChecker(host) { } if (multipleConstructorImplementation) { forEach(functionDeclarations, (declaration) => { - error(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed); + error2(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed); }); } if (duplicateFunctionDeclaration) { forEach(functionDeclarations, (declaration) => { - error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_function_implementation); + error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_function_implementation); }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 262 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 263 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 262 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 261 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 263 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 262 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; if (diagnostic) { addRelatedInfo( - error(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), + error2(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), ...relatedDiagnostics ); } @@ -79991,7 +80540,7 @@ function createTypeChecker(host) { if (!isImplementationCompatibleWithOverload(bodySignature, signature)) { const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration; addRelatedInfo( - error(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature), + error2(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature), createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here) ); break; @@ -80038,54 +80587,54 @@ function createTypeChecker(host) { const declarationSpaces = getDeclarationSpaces(d); const name = getNameOfDeclaration(d); if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) { - error(name, Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, declarationNameToString(name)); + error2(name, Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, declarationNameToString(name)); } else if (declarationSpaces & commonDeclarationSpacesForExportsAndLocals) { - error(name, Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, declarationNameToString(name)); + error2(name, Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, declarationNameToString(name)); } } } function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return 2 /* ExportType */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 276 /* ExportAssignment */: - case 225 /* BinaryExpression */: + case 277 /* ExportAssignment */: + case 226 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 270 /* ImportEqualsDeclaration */: - case 273 /* NamespaceImport */: - case 272 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 274 /* NamespaceImport */: + case 273 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfDeclaration(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: - case 261 /* FunctionDeclaration */: - case 275 /* ImportSpecifier */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 262 /* FunctionDeclaration */: + case 276 /* ImportSpecifier */: case 80 /* Identifier */: return 1 /* ExportValue */; - case 172 /* MethodSignature */: - case 170 /* PropertySignature */: + case 173 /* MethodSignature */: + case 171 /* PropertySignature */: return 2 /* ExportType */; default: return Debug.failBadSyntaxKind(d); @@ -80120,7 +80669,7 @@ function createTypeChecker(host) { const thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0 /* Call */) : emptyArray; if (thenSignatures.length === 0) { if (errorNode) { - error(errorNode, Diagnostics.A_promise_must_have_a_then_method); + error2(errorNode, Diagnostics.A_promise_must_have_a_then_method); } return void 0; } @@ -80140,7 +80689,7 @@ function createTypeChecker(host) { thisTypeForErrorOut.value = thisTypeForError; } if (errorNode) { - error(errorNode, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForError)); + error2(errorNode, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForError)); } return void 0; } @@ -80151,7 +80700,7 @@ function createTypeChecker(host) { const onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0 /* Call */); if (onfulfilledParameterSignatures.length === 0) { if (errorNode) { - error(errorNode, Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback); + error2(errorNode, Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback); } return void 0; } @@ -80232,7 +80781,7 @@ function createTypeChecker(host) { if (type.flags & 1048576 /* Union */) { if (awaitedTypeStack.lastIndexOf(type.id) >= 0) { if (errorNode) { - error(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); + error2(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); } return void 0; } @@ -80255,7 +80804,7 @@ function createTypeChecker(host) { if (promisedType) { if (type.id === promisedType.id || awaitedTypeStack.lastIndexOf(promisedType.id) >= 0) { if (errorNode) { - error(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); + error2(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); } return void 0; } @@ -80281,7 +80830,7 @@ function createTypeChecker(host) { } return typeAsAwaitable.awaitedTypeOfType = type; } - function checkAsyncFunctionReturnType(node, returnTypeNode) { + function checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation) { const returnType = getTypeFromTypeNode(returnTypeNode); if (languageVersion >= 2 /* ES2015 */) { if (isErrorType(returnType)) { @@ -80292,7 +80841,7 @@ function createTypeChecker(host) { true ); if (globalPromiseType !== emptyGenericType && !isReferenceToType2(returnType, globalPromiseType)) { - error(returnTypeNode, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); + reportErrorForInvalidReturnType(Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, returnTypeNode, returnTypeErrorLocation, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); return; } } else { @@ -80302,7 +80851,7 @@ function createTypeChecker(host) { } const promiseConstructorName = getEntityNameFromTypeNode(returnTypeNode); if (promiseConstructorName === void 0) { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, typeToString(returnType)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, typeToString(returnType)); return; } const promiseConstructorSymbol = resolveEntityName( @@ -80317,9 +80866,9 @@ function createTypeChecker(host) { /*reportErrors*/ false )) { - error(returnTypeNode, Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); + error2(returnTypeErrorLocation, Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } else { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); } return; } @@ -80328,21 +80877,22 @@ function createTypeChecker(host) { true ); if (globalPromiseConstructorLikeType === emptyObjectType) { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); return; } - if (!checkTypeAssignableTo( - promiseConstructorType, - globalPromiseConstructorLikeType, - returnTypeNode, - Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value - )) { + const headMessage = Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value; + const errorInfo = () => returnTypeNode === returnTypeErrorLocation ? void 0 : chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type + ); + if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeErrorLocation, headMessage, errorInfo)) { return; } const rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); const collidingSymbol = getSymbol2(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { - error( + error2( collidingSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, idText(rootName), @@ -80358,6 +80908,14 @@ function createTypeChecker(host) { node, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member ); + function reportErrorForInvalidReturnType(message, returnTypeNode2, returnTypeErrorLocation2, typeName) { + if (returnTypeNode2 === returnTypeErrorLocation2) { + error2(returnTypeErrorLocation2, message, typeName); + } else { + const diag2 = error2(returnTypeErrorLocation2, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); + addRelatedInfo(diag2, createDiagnosticForNode(returnTypeNode2, message, typeName)); + } + } } function checkDecorator(node) { const signature = getResolvedSignature(node); @@ -80372,21 +80930,21 @@ function createTypeChecker(host) { let headMessage; const expectedReturnType = decoratorSignature.resolvedReturnType; switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!legacyDecorators) { headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; } - case 168 /* Parameter */: + case 169 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; default: @@ -80455,7 +81013,7 @@ function createTypeChecker(host) { if (canCollectSymbolAliasAccessabilityData && symbolIsValue(rootSymbol) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) && !getTypeOnlyAliasDeclaration(rootSymbol)) { markAliasSymbolAsReferenced(rootSymbol); } else if (forDecoratorMetadata && getIsolatedModules(compilerOptions) && getEmitModuleKind(compilerOptions) >= 5 /* ES2015 */ && !symbolIsValue(rootSymbol) && !some(rootSymbol.declarations, isTypeOnlyImportOrExportDeclaration)) { - const diag2 = error(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled); + const diag2 = error2(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled); const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration2); if (aliasDeclaration) { addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName))); @@ -80476,15 +81034,15 @@ function createTypeChecker(host) { function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 192 /* IntersectionType */: - case 191 /* UnionType */: + case 193 /* IntersectionType */: + case 192 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; } } @@ -80492,13 +81050,13 @@ function createTypeChecker(host) { function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 195 /* ParenthesizedType */ || typeNode.kind === 201 /* NamedTupleMember */) { + while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) { typeNode = typeNode.type; } if (typeNode.kind === 146 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 200 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -80529,7 +81087,7 @@ function createTypeChecker(host) { } if (legacyDecorators) { checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } } else if (languageVersion < 99 /* ESNext */) { @@ -80555,7 +81113,7 @@ function createTypeChecker(host) { if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -80563,27 +81121,28 @@ function createTypeChecker(host) { } } break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - const otherKind = node.kind === 176 /* GetAccessor */ ? 177 /* SetAccessor */ : 176 /* GetAccessor */; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 168 /* Parameter */: + case 169 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } + markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(containingSignature)); break; } } @@ -80603,7 +81162,7 @@ function createTypeChecker(host) { } function checkJSDocTypeAliasTag(node) { if (!node.typeExpression) { - error(node.name, Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags); + error2(node.name, Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags); } if (node.name) { checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); @@ -80628,7 +81187,7 @@ function createTypeChecker(host) { if (length(tags) > 1) { for (let i = 1; i < length(tags); i++) { const tagName = tags[i].tagName; - error(tagName, Diagnostics._0_tag_already_specified, idText(tagName)); + error2(tagName, Diagnostics._0_tag_already_specified, idText(tagName)); } } } @@ -80660,40 +81219,40 @@ function createTypeChecker(host) { function checkJSDocImplementsTag(node) { const classLike = getEffectiveJSDocHost(node); if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { - error(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); + error2(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); } } function checkJSDocAugmentsTag(node) { const classLike = getEffectiveJSDocHost(node); if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { - error(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); + error2(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); return; } const augmentsTags = getJSDocTags(classLike).filter(isJSDocAugmentsTag); Debug.assert(augmentsTags.length > 0); if (augmentsTags.length > 1) { - error(augmentsTags[1], Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); + error2(augmentsTags[1], Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); } const name = getIdentifierFromEntityNameExpression(node.class.expression); const extend2 = getClassExtendsHeritageElement(classLike); if (extend2) { const className = getIdentifierFromEntityNameExpression(extend2.expression); if (className && name.escapedText !== className.escapedText) { - error(name, Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause, idText(node.tagName), idText(name), idText(className)); + error2(name, Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause, idText(node.tagName), idText(name), idText(className)); } } } function checkJSDocAccessibilityModifiers(node) { const host2 = getJSDocHost(node); if (host2 && isPrivateIdentifierClassElementDeclaration(host2)) { - error(node, Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + error2(node, Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); } } function getIdentifierFromEntityNameExpression(node) { switch (node.kind) { case 80 /* Identifier */: return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -80704,7 +81263,7 @@ function createTypeChecker(host) { checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -80712,7 +81271,7 @@ function createTypeChecker(host) { const localSymbol = node.localSymbol || symbol; const firstDeclaration = (_a = localSymbol.declarations) == null ? void 0 : _a.find( // Get first non javascript function declaration - (declaration) => declaration.kind === node.kind && !(declaration.flags & 262144 /* JavaScriptFile */) + (declaration) => declaration.kind === node.kind && !(declaration.flags & 524288 /* JavaScriptFile */) ); if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(localSymbol); @@ -80721,14 +81280,14 @@ function createTypeChecker(host) { checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 172 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); if (isInJSFile(node)) { const typeTag = getJSDocTypeTag(node); if (typeTag && typeTag.typeExpression && !getContextualCallSignature(getTypeFromTypeNode(typeTag.typeExpression), node)) { - error(typeTag.typeExpression.type, Diagnostics.The_type_of_a_function_declaration_must_match_the_function_s_signature); + error2(typeTag.typeExpression.type, Diagnostics.The_type_of_a_function_declaration_must_match_the_function_s_signature); } } function checkFunctionOrMethodDeclarationDiagnostics() { @@ -80757,42 +81316,42 @@ function createTypeChecker(host) { function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 311 /* SourceFile */: - case 266 /* ModuleDeclaration */: - case 240 /* Block */: - case 268 /* CaseBlock */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 312 /* SourceFile */: + case 267 /* ModuleDeclaration */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 175 /* Constructor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 194 /* InferType */: + case 195 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -80811,28 +81370,28 @@ function createTypeChecker(host) { function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 173 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - if (member.kind === 177 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfDeclaration(member); - if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 16777216 /* Ambient */)) { + if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 175 /* Constructor */: + case 176 /* Constructor */: for (const parameter of member.parameters) { if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } break; - case 180 /* IndexSignature */: - case 239 /* SemicolonClassElement */: - case 174 /* ClassStaticBlockDeclaration */: + case 181 /* IndexSignature */: + case 240 /* SemicolonClassElement */: + case 175 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -80856,7 +81415,7 @@ function createTypeChecker(host) { continue; const name = idText(typeParameter.name); const { parent: parent2 } = typeParameter; - if (parent2.kind !== 194 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { + if (parent2.kind !== 195 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { const sourceFile = getSourceFileOfNode(parent2); const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); @@ -80914,7 +81473,11 @@ function createTypeChecker(host) { addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId); } } else if (isVariableDeclaration(declaration)) { - addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); + const blockScopeKind = getCombinedNodeFlagsCached(declaration) & 7 /* BlockScoped */; + const name = getNameOfDeclaration(declaration); + if (blockScopeKind !== 4 /* Using */ && blockScopeKind !== 6 /* AwaitUsing */ || !name || !isIdentifierThatStartsWithUnderscore(name)) { + addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); + } } else { const parameter = local.valueDeclaration && tryGetRootParameterDeclaration(local.valueDeclaration); const name = local.valueDeclaration && getNameOfDeclaration(local.valueDeclaration); @@ -80935,7 +81498,7 @@ function createTypeChecker(host) { }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 273 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 274 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); } else { @@ -80946,7 +81509,7 @@ function createTypeChecker(host) { unusedDestructures.forEach(([bindingPattern, bindingElements]) => { const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */; if (bindingPattern.elements.length === bindingElements.length) { - if (bindingElements.length === 1 && bindingPattern.parent.kind === 259 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 260 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 260 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 261 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); @@ -80959,7 +81522,7 @@ function createTypeChecker(host) { }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 242 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -80988,21 +81551,21 @@ function createTypeChecker(host) { switch (name.kind) { case 80 /* Identifier */: return idText(name); - case 206 /* ArrayBindingPattern */: - case 205 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 272 /* ImportClause */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 273 /* NamespaceImport */; + return node.kind === 273 /* ImportClause */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 274 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 272 /* ImportClause */ ? decl : decl.kind === 273 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 273 /* ImportClause */ ? decl : decl.kind === 274 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 240 /* Block */) { + if (node.kind === 241 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -81017,7 +81580,7 @@ function createTypeChecker(host) { } } function checkCollisionWithArgumentsInGeneratedCode(node) { - if (languageVersion >= 2 /* ES2015 */ || !hasRestParameter(node) || node.flags & 16777216 /* Ambient */ || nodeIsMissing(node.body)) { + if (languageVersion >= 2 /* ES2015 */ || !hasRestParameter(node) || node.flags & 33554432 /* Ambient */ || nodeIsMissing(node.body)) { return; } forEach(node.parameters, (p) => { @@ -81030,10 +81593,10 @@ function createTypeChecker(host) { if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */ || node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */ || node.kind === 302 /* PropertyAssignment */) { + if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 303 /* PropertyAssignment */) { return false; } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return false; } if (isImportClause(node) || isImportEqualsDeclaration(node) || isImportSpecifier(node)) { @@ -81052,9 +81615,9 @@ function createTypeChecker(host) { if (getNodeCheckFlags(current) & 4 /* CaptureThis */) { const isDeclaration2 = node.kind !== 80 /* Identifier */; if (isDeclaration2) { - error(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); + error2(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } else { - error(node, Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference); + error2(node, Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference); } return true; } @@ -81066,9 +81629,9 @@ function createTypeChecker(host) { if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) { const isDeclaration2 = node.kind !== 80 /* Identifier */; if (isDeclaration2) { - error(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); + error2(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); } else { - error(node, Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference); + error2(node, Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference); } return true; } @@ -81086,7 +81649,7 @@ function createTypeChecker(host) { return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { + if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { errorSkippedOn( "noEmit", name, @@ -81104,7 +81667,7 @@ function createTypeChecker(host) { return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { + if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 4096 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -81121,7 +81684,7 @@ function createTypeChecker(host) { } function checkWeakMapSetCollision(node) { const enclosingBlockScope = getEnclosingBlockScopeContainer(node); - if (getNodeCheckFlags(enclosingBlockScope) & 4194304 /* ContainsClassWithPrivateIdentifiers */) { + if (getNodeCheckFlags(enclosingBlockScope) & 1048576 /* ContainsClassWithPrivateIdentifiers */) { Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier"); errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText); } @@ -81135,18 +81698,18 @@ function createTypeChecker(host) { let hasCollision = false; if (isClassExpression(node)) { for (const member of node.members) { - if (getNodeCheckFlags(member) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (getNodeCheckFlags(member) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; break; } } } else if (isFunctionExpression(node)) { - if (getNodeCheckFlags(node) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (getNodeCheckFlags(node) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; } } else { const container = getEnclosingBlockScopeContainer(node); - if (container && getNodeCheckFlags(container) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (container && getNodeCheckFlags(container) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; } } @@ -81170,7 +81733,7 @@ function createTypeChecker(host) { recordPotentialCollisionWithReflectInGeneratedCode(node, name); if (isClassLike(node)) { checkTypeNameIsReserved(name, Diagnostics.Class_name_cannot_be_0); - if (!(node.flags & 16777216 /* Ambient */)) { + if (!(node.flags & 33554432 /* Ambient */)) { checkClassNameCollisionWithObject(name); } } else if (isEnumDeclaration(node)) { @@ -81178,10 +81741,7 @@ function createTypeChecker(host) { } } function checkVarDeclaredNamesNotShadowed(node) { - if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { - return; - } - if (node.kind === 259 /* VariableDeclaration */ && !node.initializer) { + if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } const symbol = getSymbolOfDeclaration(node); @@ -81200,13 +81760,13 @@ function createTypeChecker(host) { false ); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { - if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 260 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 242 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 240 /* Block */ && isFunctionLike(container.parent) || container.kind === 267 /* ModuleBlock */ || container.kind === 266 /* ModuleDeclaration */ || container.kind === 311 /* SourceFile */); + if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 7 /* BlockScoped */) { + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 261 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 243 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 241 /* Block */ && isFunctionLike(container.parent) || container.kind === 268 /* ModuleBlock */ || container.kind === 267 /* ModuleDeclaration */ || container.kind === 312 /* SourceFile */); if (!namesShareScope) { const name = symbolToString(localDeclarationSymbol); - error(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); + error2(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); } } } @@ -81224,7 +81784,7 @@ function createTypeChecker(host) { if (!node.name) { return; } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -81238,7 +81798,7 @@ function createTypeChecker(host) { if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 166 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; @@ -81271,20 +81831,20 @@ function createTypeChecker(host) { } } if (isBindingPattern(node.name)) { - if (node.name.kind === 206 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); } if (isParameter(node) && node.initializer && nodeIsMissing(getContainingFunction(node).body)) { - error(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); + error2(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } if (isBindingPattern(node.name)) { if (isInAmbientOrTypeNode(node)) { return; } - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 248 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 249 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -81316,20 +81876,45 @@ function createTypeChecker(host) { const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); if (initializer) { const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a = symbol.exports) == null ? void 0 : _a.size); - if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 248 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 249 /* ForInStatement */) { + const initializerType = checkExpressionCached(initializer); checkTypeAssignableToAndOptionallyElaborate( - checkExpressionCached(initializer), + initializerType, type, node, initializer, /*headMessage*/ void 0 ); + const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */; + if (blockScopeKind === 6 /* AwaitUsing */) { + const globalAsyncDisposableType = getGlobalAsyncDisposableType( + /*reportErrors*/ + true + ); + const globalDisposableType = getGlobalDisposableType( + /*reportErrors*/ + true + ); + if (globalAsyncDisposableType !== emptyObjectType && globalDisposableType !== emptyObjectType) { + const optionalDisposableType = getUnionType([globalAsyncDisposableType, globalDisposableType, nullType, undefinedType]); + checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); + } + } else if (blockScopeKind === 4 /* Using */) { + const globalDisposableType = getGlobalDisposableType( + /*reportErrors*/ + true + ); + if (globalDisposableType !== emptyObjectType) { + const optionalDisposableType = getUnionType([globalDisposableType, nullType, undefinedType]); + checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); + } + } } } if (symbol.declarations && symbol.declarations.length > 1) { if (some(symbol.declarations, (d) => d !== node && isVariableLike(d) && !areDeclarationFlagsIdentical(d, node))) { - error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); + error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } } else { @@ -81348,12 +81933,12 @@ function createTypeChecker(host) { ); } if (symbol.valueDeclaration && !areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) { - error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); + error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */) { + if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -81361,9 +81946,9 @@ function createTypeChecker(host) { } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 171 /* PropertyDeclaration */ || nextDeclaration.kind === 170 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; + const message = nextDeclaration.kind === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; const declName = declarationNameToString(nextDeclarationName); - const err = error( + const err = error2( nextDeclarationName, message, declName, @@ -81378,7 +81963,7 @@ function createTypeChecker(host) { } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 168 /* Parameter */ && right.kind === 259 /* VariableDeclaration */ || left.kind === 259 /* VariableDeclaration */ && right.kind === 168 /* Parameter */) { + if (left.kind === 169 /* Parameter */ && right.kind === 260 /* VariableDeclaration */ || left.kind === 260 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -81398,10 +81983,17 @@ function createTypeChecker(host) { checkGrammarBindingElement(node); return checkVariableLikeDeclaration(node); } + function checkVariableDeclarationList(node) { + const blockScopeKind = getCombinedNodeFlags(node) & 7 /* BlockScoped */; + if (blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */) { + checkExternalEmitHelpers(node, 33554432 /* AddDisposableResourceAndDisposeResources */); + } + forEach(node.declarations, checkSourceElement); + } function checkVariableStatement(node) { if (!checkGrammarModifiers(node) && !checkGrammarVariableDeclarationList(node.declarationList)) - checkGrammarForDisallowedLetOrConstStatement(node); - forEach(node.declarationList.declarations, checkSourceElement); + checkGrammarForDisallowedBlockScopedVariableStatement(node); + checkVariableDeclarationList(node.declarationList); } function checkExpressionStatement(node) { checkGrammarStatementInAmbientContext(node); @@ -81412,8 +82004,8 @@ function createTypeChecker(host) { const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 241 /* EmptyStatement */) { - error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); + if (node.thenStatement.kind === 242 /* EmptyStatement */) { + error2(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); } @@ -81463,7 +82055,7 @@ function createTypeChecker(host) { getTypeNameForErrorDisplay(type) ); } else { - error(location, Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead); + error2(location, Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead); } } } @@ -81529,7 +82121,7 @@ function createTypeChecker(host) { } function checkTruthinessOfType(type, node) { if (type.flags & 16384 /* Void */) { - error(node, Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); + error2(node, Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); } return type; } @@ -81538,13 +82130,13 @@ function createTypeChecker(host) { } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 260 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 261 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 260 /* VariableDeclarationList */) { - forEach(node.initializer.declarations, checkVariableDeclaration); + if (node.initializer.kind === 261 /* VariableDeclarationList */) { + checkVariableDeclarationList(node.initializer); } else { checkExpression(node.initializer); } @@ -81563,7 +82155,7 @@ function createTypeChecker(host) { const container = getContainingFunctionOrClassStaticBlock(node); if (node.awaitModifier) { if (container && isClassStaticBlockDeclaration(container)) { - grammarErrorOnNode(node.awaitModifier, Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block); + grammarErrorOnNode(node.awaitModifier, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block); } else { const functionFlags = getFunctionFlags(container); if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < 99 /* ESNext */) { @@ -81573,12 +82165,12 @@ function createTypeChecker(host) { } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 260 /* VariableDeclarationList */) { - checkForInOrForOfVariableDeclaration(node); + if (node.initializer.kind === 261 /* VariableDeclarationList */) { + checkVariableDeclarationList(node.initializer); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 208 /* ArrayLiteralExpression */ || varExpr.kind === 209 /* ObjectLiteralExpression */) { + if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -81600,19 +82192,19 @@ function createTypeChecker(host) { function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 260 /* VariableDeclarationList */) { + if (node.initializer.kind === 261 /* VariableDeclarationList */) { const variable = node.initializer.declarations[0]; if (variable && isBindingPattern(variable.name)) { - error(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); + error2(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } - checkForInOrForOfVariableDeclaration(node); + checkVariableDeclarationList(node.initializer); } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 208 /* ArrayLiteralExpression */ || varExpr.kind === 209 /* ObjectLiteralExpression */) { - error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); + if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { - error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); + error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); } else { checkReferenceExpression( varExpr, @@ -81622,20 +82214,13 @@ function createTypeChecker(host) { } } if (rightType === neverType || !isTypeAssignableToKind(rightType, 67108864 /* NonPrimitive */ | 58982400 /* InstantiableNonPrimitive */)) { - error(node.expression, Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType)); + error2(node.expression, Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType)); } checkSourceElement(node.statement); if (node.locals) { registerForUnusedIdentifiersCheck(node); } } - function checkForInOrForOfVariableDeclaration(iterationStatement) { - const variableDeclarationList = iterationStatement.initializer; - if (variableDeclarationList.declarations.length >= 1) { - const decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); - } - } function checkRightHandSideOfForOf(statement) { const use = statement.awaitModifier ? 15 /* ForAwaitOf */ : 13 /* ForOf */; return checkIteratedTypeOrElementType(use, checkNonNullExpression(statement.expression), undefinedType, statement.expression); @@ -81693,7 +82278,7 @@ function createTypeChecker(host) { if (hasStringConstituent) { if (languageVersion < 1 /* ES5 */) { if (errorNode) { - error(errorNode, Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); + error2(errorNode, Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); reportedError = true; } } @@ -82153,7 +82738,7 @@ function createTypeChecker(host) { errorOutputContainer.errors ?? (errorOutputContainer.errors = []); errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, diagnostic, methodName)); } else { - error(errorNode, diagnostic, methodName); + error2(errorNode, diagnostic, methodName); } } return methodName === "next" ? noIterationTypes : void 0; @@ -82208,7 +82793,7 @@ function createTypeChecker(host) { errorOutputContainer.errors ?? (errorOutputContainer.errors = []); errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, resolver.mustHaveAValueDiagnostic, methodName)); } else { - error(errorNode, resolver.mustHaveAValueDiagnostic, methodName); + error2(errorNode, resolver.mustHaveAValueDiagnostic, methodName); } } yieldType = anyType; @@ -82292,13 +82877,13 @@ function createTypeChecker(host) { const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 177 /* SetAccessor */) { + if (container.kind === 178 /* SetAccessor */) { if (node.expression) { - error(node, Diagnostics.Setters_cannot_return_a_value); + error2(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 175 /* Constructor */) { + } else if (container.kind === 176 /* Constructor */) { if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) { - error(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); + error2(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } } else if (getReturnTypeFromAnnotation(container)) { const unwrappedReturnType = unwrapReturnType(returnType, functionFlags) ?? returnType; @@ -82313,13 +82898,13 @@ function createTypeChecker(host) { checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 175 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { - error(node, Diagnostics.Not_all_code_paths_return_a_value); + } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { + error2(node, Diagnostics.Not_all_code_paths_return_a_value); } } function checkWithStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.flags & 32768 /* AwaitContext */) { + if (node.flags & 65536 /* AwaitContext */) { grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block); } } @@ -82337,7 +82922,7 @@ function createTypeChecker(host) { let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 296 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 297 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -82345,12 +82930,12 @@ function createTypeChecker(host) { hasDuplicateDefaultClause = true; } } - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) { - error(clause, Diagnostics.Fallthrough_case_in_switch); + error2(clause, Diagnostics.Fallthrough_case_in_switch); } function createLazyCaseClauseDiagnostics(clause2) { return () => { @@ -82377,7 +82962,7 @@ function createTypeChecker(host) { if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 255 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 256 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -82467,8 +83052,8 @@ function createTypeChecker(host) { return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 263 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 225 /* BinaryExpression */ || name && name.kind === 166 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 226 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -82492,7 +83077,7 @@ function createTypeChecker(host) { function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 263 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -82500,7 +83085,7 @@ function createTypeChecker(host) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; const errorNode = localCheckDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getIndexInfoOfType(base, checkInfo.keyType) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); if (errorNode && !isTypeAssignableTo(checkInfo.type, info.type)) { - error( + error2( errorNode, Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, typeToString(checkInfo.keyType), @@ -82523,12 +83108,12 @@ function createTypeChecker(host) { case "symbol": case "void": case "object": - error(name, message, name.escapedText); + error2(name, message, name.escapedText); } } function checkClassNameCollisionWithObject(name) { if (languageVersion >= 1 /* ES5 */ && name.escapedText === "Object" && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(name).impliedNodeFormat === 1 /* CommonJS */)) { - error(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]); + error2(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]); } } function checkUnmatchedJSDocParameters(node) { @@ -82551,7 +83136,7 @@ function createTypeChecker(host) { const lastJSDocParamIndex = jsdocParameters.length - 1; const lastJSDocParam = jsdocParameters[lastJSDocParamIndex]; if (isJs && lastJSDocParam && isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression && lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !excludedParameters.has(lastJSDocParamIndex) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) { - error(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name)); + error2(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name)); } } else { forEach(jsdocParameters, ({ name, isNameFirst }, index) => { @@ -82560,7 +83145,7 @@ function createTypeChecker(host) { } if (isQualifiedName(name)) { if (isJs) { - error(name, Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, entityNameToString(name), entityNameToString(name.left)); + error2(name, Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, entityNameToString(name), entityNameToString(name.left)); } } else { if (!isNameFirst) { @@ -82585,11 +83170,11 @@ function createTypeChecker(host) { seenDefault = true; checkTypeParametersNotReferenced(node.default, typeParameterDeclarations, i); } else if (seenDefault) { - error(node, Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters); + error2(node, Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters); } for (let j = 0; j < i; j++) { if (typeParameterDeclarations[j].symbol === node.symbol) { - error(node.name, Diagnostics.Duplicate_identifier_0, declarationNameToString(node.name)); + error2(node.name, Diagnostics.Duplicate_identifier_0, declarationNameToString(node.name)); } } }; @@ -82598,12 +83183,12 @@ function createTypeChecker(host) { function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 182 /* TypeReference */) { + if (node.kind === 183 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { if (type.symbol === getSymbolOfDeclaration(typeParameters[i])) { - error(node, Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters); + error2(node, Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters); } } } @@ -82626,7 +83211,7 @@ function createTypeChecker(host) { if (!areTypeParametersIdentical(declarations, type.localTypeParameters, getEffectiveTypeParameterDeclarations)) { const name = symbolToString(symbol); for (const declaration of declarations) { - error(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name); + error2(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name); } } } @@ -82668,7 +83253,7 @@ function createTypeChecker(host) { node ); const willTransformPrivateElementsOrClassStaticBlocks = languageVersion <= 9 /* ES2022 */; - const willTransformInitializers = !useDefineForClassFields || languageVersion < 9 /* ES2022 */; + const willTransformInitializers = !emitStandardClassFields; if (willTransformStaticElementsOfDecoratedClass || willTransformPrivateElementsOrClassStaticBlocks) { for (const member of node.members) { if (willTransformStaticElementsOfDecoratedClass && classElementOrClassElementParameterIsDecorated( @@ -82749,7 +83334,7 @@ function createTypeChecker(host) { checkTypeParameterListsIdentical(symbol); checkFunctionOrConstructorSymbol(symbol); checkClassForDuplicateDeclarations(node); - const nodeInAmbientContext = !!(node.flags & 16777216 /* Ambient */); + const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); if (!nodeInAmbientContext) { checkClassForStaticPropertyNameConflicts(node); } @@ -82797,18 +83382,18 @@ function createTypeChecker(host) { } if (baseConstructorType.flags & 8650752 /* TypeVariable */) { if (!isMixinConstructorType(staticType)) { - error(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any); + error2(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any); } else { const constructSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 256 /* Abstract */)) { - error(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract); + error2(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract); } } } if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32 /* Class */) && !(baseConstructorType.flags & 8650752 /* TypeVariable */)) { const constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); if (forEach(constructors, (sig) => !isJSConstructor(sig.declaration) && !isTypeIdenticalTo(getReturnTypeOfSignature(sig), baseType))) { - error(baseTypeNode.expression, Diagnostics.Base_constructors_must_all_have_the_same_return_type); + error2(baseTypeNode.expression, Diagnostics.Base_constructors_must_all_have_the_same_return_type); } } checkKindsOfPropertyMemberOverrides(type, baseType); @@ -82820,7 +83405,7 @@ function createTypeChecker(host) { if (implementedTypeNodes) { for (const typeRefNode of implementedTypeNodes) { if (!isEntityNameExpression(typeRefNode.expression) || isOptionalChain(typeRefNode.expression)) { - error(typeRefNode.expression, Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments); + error2(typeRefNode.expression, Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments); } checkTypeReferenceNode(typeRefNode); addLazyDiagnostic(createImplementsDiagnostics(typeRefNode)); @@ -82853,7 +83438,7 @@ function createTypeChecker(host) { issueMemberSpecificError(node, typeWithThis, baseWithThis, genericDiag); } } else { - error(typeRefNode, Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members); + error2(typeRefNode, Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members); } } }; @@ -82920,7 +83505,7 @@ function createTypeChecker(host) { } function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, memberName, errorNode) { const isJs = isInJSFile(node); - const nodeInAmbientContext = !!(node.flags & 16777216 /* Ambient */); + const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) { const memberEscapedName = escapeLeadingUnderscores(memberName); const thisType = memberIsStatic ? staticType : typeWithThis; @@ -82931,12 +83516,12 @@ function createTypeChecker(host) { if (prop && !baseProp && memberHasOverrideModifier) { if (errorNode) { const suggestion = getSuggestedSymbolForNonexistentClassMember(memberName, baseType); - suggestion ? error( + suggestion ? error2( errorNode, isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, baseClassName, symbolToString(suggestion) - ) : error( + ) : error2( errorNode, isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, baseClassName @@ -82951,12 +83536,12 @@ function createTypeChecker(host) { if (!baseHasAbstract) { if (errorNode) { const diag2 = memberIsParameterProperty ? isJs ? Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 : isJs ? Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0; - error(errorNode, diag2, baseClassName); + error2(errorNode, diag2, baseClassName); } return 1 /* NeedsOverride */; } else if (memberHasAbstractModifier && baseHasAbstract) { if (errorNode) { - error(errorNode, Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, baseClassName); + error2(errorNode, Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, baseClassName); } return 1 /* NeedsOverride */; } @@ -82964,7 +83549,7 @@ function createTypeChecker(host) { } else if (memberHasOverrideModifier) { if (errorNode) { const className = typeToString(type); - error( + error2( errorNode, isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, className @@ -83017,7 +83602,7 @@ function createTypeChecker(host) { if (declaration && hasEffectiveModifier(declaration, 8 /* Private */)) { const typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); if (!isNodeWithinClass(node, typeClassDeclaration)) { - error(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); + error2(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); } } } @@ -83054,7 +83639,7 @@ function createTypeChecker(host) { return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 262 /* ClassDeclaration */ || d.kind === 263 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a, _b, _c, _d; @@ -83086,14 +83671,14 @@ function createTypeChecker(host) { } } if (!inheritedAbstractMemberNotImplementedError) { - inheritedAbstractMemberNotImplementedError = error( + inheritedAbstractMemberNotImplementedError = error2( derivedClassDecl, Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1, typeToString(type), typeToString(baseType) ); } - if (derivedClassDecl.kind === 230 /* ClassExpression */) { + if (derivedClassDecl.kind === 231 /* ClassExpression */) { addRelatedInfo( inheritedAbstractMemberNotImplementedError, createDiagnosticForNode( @@ -83132,15 +83717,15 @@ function createTypeChecker(host) { const overriddenInstanceAccessor = basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */; if (overriddenInstanceProperty || overriddenInstanceAccessor) { const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; - error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); + error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { - const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 171 /* PropertyDeclaration */ && !d.initializer); - if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) { + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer); + if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { const errorMessage2 = Diagnostics.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; - error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType)); + error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType)); } } } @@ -83157,7 +83742,7 @@ function createTypeChecker(host) { } else { errorMessage = Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function; } - error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); + error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); } } } @@ -83222,7 +83807,7 @@ function createTypeChecker(host) { return ok; } function checkPropertyInitialization(node) { - if (!strictNullChecks || !strictPropertyInitialization || node.flags & 16777216 /* Ambient */) { + if (!strictNullChecks || !strictPropertyInitialization || node.flags & 33554432 /* Ambient */) { return; } const constructor = findConstructorDeclaration(node); @@ -83236,7 +83821,7 @@ function createTypeChecker(host) { const type = getTypeOfSymbol(getSymbolOfDeclaration(member)); if (!(type.flags & 3 /* AnyOrUnknown */ || containsUndefinedType(type))) { if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) { - error(member.name, Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, declarationNameToString(propName)); + error2(member.name, Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, declarationNameToString(propName)); } } } @@ -83244,7 +83829,7 @@ function createTypeChecker(host) { } } function isPropertyWithoutInitializer(node) { - return node.kind === 171 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -83278,7 +83863,7 @@ function createTypeChecker(host) { checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfDeclaration(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 263 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 264 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -83293,7 +83878,7 @@ function createTypeChecker(host) { }); forEach(getInterfaceBaseTypeNodes(node), (heritageElement) => { if (!isEntityNameExpression(heritageElement.expression) || isOptionalChain(heritageElement.expression)) { - error(heritageElement.expression, Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments); + error2(heritageElement.expression, Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments); } checkTypeReferenceNode(heritageElement); }); @@ -83310,7 +83895,7 @@ function createTypeChecker(host) { checkTypeParameters(node.typeParameters); if (node.type.kind === 141 /* IntrinsicKeyword */) { if (!intrinsicTypeKinds.has(node.name.escapedText) || length(node.typeParameters) !== 1) { - error(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); + error2(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); } } else { checkSourceElement(node.type); @@ -83331,23 +83916,23 @@ function createTypeChecker(host) { } function computeMemberValue(member, autoValue) { if (isComputedNonLiteralName(member.name)) { - error(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums); + error2(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums); } else { const text = getTextOfPropertyName(member.name); if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) { - error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); + error2(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); } } if (member.initializer) { return computeConstantValue(member); } - if (member.parent.flags & 16777216 /* Ambient */ && !isEnumConst(member.parent)) { + if (member.parent.flags & 33554432 /* Ambient */ && !isEnumConst(member.parent)) { return void 0; } if (autoValue !== void 0) { return autoValue; } - error(member.name, Diagnostics.Enum_member_must_have_initializer); + error2(member.name, Diagnostics.Enum_member_must_have_initializer); return void 0; } function computeConstantValue(member) { @@ -83356,12 +83941,12 @@ function createTypeChecker(host) { const value = evaluate(initializer, member); if (value !== void 0) { if (isConstEnum && typeof value === "number" && !isFinite(value)) { - error(initializer, isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); + error2(initializer, isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); } } else if (isConstEnum) { - error(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); - } else if (member.parent.flags & 16777216 /* Ambient */) { - error(initializer, Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression); + error2(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); + } else if (member.parent.flags & 33554432 /* Ambient */) { + error2(initializer, Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression); } else { checkTypeAssignableTo(checkExpression(initializer), numberType, initializer, Diagnostics.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values); } @@ -83369,7 +83954,7 @@ function createTypeChecker(host) { } function evaluate(expr, location) { switch (expr.kind) { - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const value = evaluate(expr.operand, location); if (typeof value === "number") { switch (expr.operator) { @@ -83382,7 +83967,7 @@ function createTypeChecker(host) { } } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const left = evaluate(expr.left, location); const right = evaluate(expr.right, location); if (typeof left === "number" && typeof right === "number") { @@ -83419,18 +84004,30 @@ function createTypeChecker(host) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return expr.text; - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return evaluateTemplateExpression(expr, location); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return evaluate(expr.expression, location); - case 80 /* Identifier */: - if (isInfinityOrNaNString(expr.escapedText)) { - return +expr.escapedText; + case 80 /* Identifier */: { + const identifier = expr; + if (isInfinityOrNaNString(identifier.escapedText) && resolveEntityName( + identifier, + 111551 /* Value */, + /*ignoreErrors*/ + true + ) === getGlobalSymbol( + identifier.escapedText, + 111551 /* Value */, + /*diagnostic*/ + void 0 + )) { + return +identifier.escapedText; } - case 210 /* PropertyAccessExpression */: + } + case 211 /* PropertyAccessExpression */: if (isEntityNameExpression(expr)) { const symbol = resolveEntityName( expr, @@ -83440,18 +84037,18 @@ function createTypeChecker(host) { ); if (symbol) { if (symbol.flags & 8 /* EnumMember */) { - return evaluateEnumMember(expr, symbol, location); + return location ? evaluateEnumMember(expr, symbol, location) : getEnumMemberValue(symbol.valueDeclaration); } - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; - if (declaration && !declaration.type && declaration.initializer && declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location)) { + if (declaration && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { return evaluate(declaration.initializer, declaration); } } } } break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const root = expr.expression; if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { const rootSymbol = resolveEntityName( @@ -83464,7 +84061,7 @@ function createTypeChecker(host) { const name = escapeLeadingUnderscores(expr.argumentExpression.text); const member = rootSymbol.exports.get(name); if (member) { - return evaluateEnumMember(expr, member, location); + return location ? evaluateEnumMember(expr, member, location) : getEnumMemberValue(member.valueDeclaration); } } } @@ -83475,11 +84072,11 @@ function createTypeChecker(host) { function evaluateEnumMember(expr, symbol, location) { const declaration = symbol.valueDeclaration; if (!declaration || declaration === location) { - error(expr, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(symbol)); + error2(expr, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(symbol)); return void 0; } if (!isBlockScopedNameDeclaredBeforeUse(declaration, location)) { - error(expr, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums); + error2(expr, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums); return 0; } return getEnumMemberValue(declaration); @@ -83512,13 +84109,13 @@ function createTypeChecker(host) { const enumIsConst = isEnumConst(node); forEach(enumSymbol.declarations, (decl) => { if (isEnumDeclaration(decl) && isEnumConst(decl) !== enumIsConst) { - error(getNameOfDeclaration(decl), Diagnostics.Enum_declarations_must_all_be_const_or_non_const); + error2(getNameOfDeclaration(decl), Diagnostics.Enum_declarations_must_all_be_const_or_non_const); } }); } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 265 /* EnumDeclaration */) { + if (declaration.kind !== 266 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -83528,7 +84125,7 @@ function createTypeChecker(host) { const firstEnumMember = enumDeclaration.members[0]; if (!firstEnumMember.initializer) { if (seenEnumMissingInitialInitializer) { - error(firstEnumMember.name, Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element); + error2(firstEnumMember.name, Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element); } else { seenEnumMissingInitialInitializer = true; } @@ -83538,7 +84135,7 @@ function createTypeChecker(host) { } function checkEnumMember(node) { if (isPrivateIdentifier(node.name)) { - error(node, Diagnostics.An_enum_member_cannot_be_named_with_a_private_identifier); + error2(node, Diagnostics.An_enum_member_cannot_be_named_with_a_private_identifier); } if (node.initializer) { checkExpression(node.initializer); @@ -83548,7 +84145,7 @@ function createTypeChecker(host) { const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 262 /* ClassDeclaration */ || declaration.kind === 261 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 262 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 33554432 /* Ambient */)) { return declaration; } } @@ -83577,9 +84174,9 @@ function createTypeChecker(host) { function checkModuleDeclarationDiagnostics() { var _a, _b; const isGlobalAugmentation = isGlobalScopeAugmentation(node); - const inAmbientContext = node.flags & 16777216 /* Ambient */; + const inAmbientContext = node.flags & 33554432 /* Ambient */; if (isGlobalAugmentation && !inAmbientContext) { - error(node.name, Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); + error2(node.name, Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); } const isAmbientExternalModule = isAmbientModule(node); const contextErrorMessage = isAmbientExternalModule ? Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : Diagnostics.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module; @@ -83598,26 +84195,26 @@ function createTypeChecker(host) { const symbol = getSymbolOfDeclaration(node); if (symbol.flags & 512 /* ValueModule */ && !inAmbientContext && isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions))) { if (getIsolatedModules(compilerOptions) && !getSourceFileOfNode(node).externalModuleIndicator) { - error(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName); + error2(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName); } if (((_a = symbol.declarations) == null ? void 0 : _a.length) > 1) { const firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (firstNonAmbientClassOrFunc) { if (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc)) { - error(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); + error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); } else if (node.pos < firstNonAmbientClassOrFunc.pos) { - error(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); + error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - const mergedClass = getDeclarationOfKind(symbol, 262 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 263 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; } } - if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 311 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 95 /* ExportKeyword */); if (exportModifier) { - error(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + error2(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } } @@ -83631,15 +84228,15 @@ function createTypeChecker(host) { } } else if (isGlobalSourceFile(node.parent)) { if (isGlobalAugmentation) { - error(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + error2(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); } else if (isExternalModuleNameRelative(getTextOfIdentifierOrLiteral(node.name))) { - error(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + error2(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); } } else { if (isGlobalAugmentation) { - error(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + error2(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); } else { - error(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + error2(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); } } } @@ -83647,21 +84244,21 @@ function createTypeChecker(host) { } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 207 /* BindingElement */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 260 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -83669,12 +84266,12 @@ function createTypeChecker(host) { } break; } - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 261 /* FunctionDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 262 /* FunctionDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -83685,12 +84282,12 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 80 /* Identifier */); return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -83706,17 +84303,17 @@ function createTypeChecker(host) { return false; } if (!isStringLiteral(moduleName)) { - error(moduleName, Diagnostics.String_literal_expected); + error2(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 267 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 311 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 277 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule) { + error2(moduleName, node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { if (!isTopLevelInExternalModuleAugmentation(node)) { - error(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); + error2(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); return false; } } @@ -83725,7 +84322,7 @@ function createTypeChecker(host) { for (const clause of node.assertClause.elements) { if (!isStringLiteral(clause.value)) { hasError = true; - error(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions); + error2(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions); } } return !hasError; @@ -83740,9 +84337,9 @@ function createTypeChecker(host) { symbol = getMergedSymbol(symbol.exportSymbol || symbol); if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) { const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node; - Debug.assert(node.kind !== 279 /* NamespaceExport */); - if (node.kind === 280 /* ExportSpecifier */) { - const diag2 = error(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); + Debug.assert(node.kind !== 280 /* NamespaceExport */); + if (node.kind === 281 /* ExportSpecifier */) { + const diag2 = error2(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); const alreadyExportedSymbol = (_b = (_a = getSourceFileOfNode(node).symbol) == null ? void 0 : _a.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText); if (alreadyExportedSymbol === target) { const exportingDeclaration = (_c = alreadyExportedSymbol.declarations) == null ? void 0 : _c.find(isJSDocNode); @@ -83755,11 +84352,11 @@ function createTypeChecker(host) { } } } else { - Debug.assert(node.kind !== 259 /* VariableDeclaration */); + Debug.assert(node.kind !== 260 /* VariableDeclaration */); const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)); const moduleSpecifier = (importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) ?? "..."; const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName); - error( + error2( errorNode, Diagnostics._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation, importedIdentifier, @@ -83768,47 +84365,47 @@ function createTypeChecker(host) { } return; } - const targetFlags = getAllSymbolFlags(target); + const targetFlags = getSymbolFlags(target); const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (targetFlags & excludedMeanings) { - const message = node.kind === 280 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; - error(node, message, symbolToString(symbol)); + const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + error2(node, message, symbolToString(symbol)); } - if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { + if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */)) { const typeOnlyAlias = getTypeOnlyAliasDeclaration(symbol); const isType = !(targetFlags & 111551 /* Value */); if (isType || typeOnlyAlias) { switch (node.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 270 /* ImportEqualsDeclaration */: { + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 271 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports || compilerOptions.verbatimModuleSyntax) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? compilerOptions.verbatimModuleSyntax ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled : compilerOptions.verbatimModuleSyntax ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled; - const name = idText(node.kind === 275 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 276 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( - error(node, message, name), + error2(node, message, name), isType ? void 0 : typeOnlyAlias, name ); } - if (isType && node.kind === 270 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { - error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); + if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + error2(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; } - case 280 /* ExportSpecifier */: { + case 281 /* ExportSpecifier */: { if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const name = idText(node.propertyName || node.name); - const diagnostic = isType ? error(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); + const diagnostic = isType ? error2(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error2(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); addTypeOnlyDeclarationRelatedInfo(diagnostic, isType ? void 0 : typeOnlyAlias, name); break; } } } } - if (compilerOptions.verbatimModuleSyntax && node.kind !== 270 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { - error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + if (compilerOptions.verbatimModuleSyntax && node.kind !== 271 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } if (isImportSpecifier(node)) { @@ -83850,7 +84447,7 @@ function createTypeChecker(host) { function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 275 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 276 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -83897,7 +84494,7 @@ function createTypeChecker(host) { checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -83923,14 +84520,14 @@ function createTypeChecker(host) { if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 282 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfDeclaration(node)); if (target !== unknownSymbol) { - const targetFlags = getAllSymbolFlags(target); + const targetFlags = getSymbolFlags(target); if (targetFlags & 111551 /* Value */) { const moduleName = getFirstIdentifier(node.moduleReference); if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { - error(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName)); + error2(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName)); } } if (targetFlags & 788968 /* Type */) { @@ -83941,7 +84538,7 @@ function createTypeChecker(host) { grammarErrorOnNode(node, Diagnostics.An_import_alias_cannot_use_import_type); } } else { - if (moduleKind >= 5 /* ES2015 */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 16777216 /* Ambient */)) { + if (moduleKind >= 5 /* ES2015 */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 33554432 /* Ambient */)) { grammarErrorOnNode(node, Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead); } } @@ -83961,15 +84558,15 @@ function createTypeChecker(host) { if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 267 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 267 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 311 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { - error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); + const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 268 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 33554432 /* Ambient */; + if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + error2(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { const moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) { - error(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); + error2(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); } else if (node.exportClause) { checkAliasSymbol(node.exportClause); } @@ -83988,13 +84585,13 @@ function createTypeChecker(host) { } function checkGrammarExportDeclaration(node) { var _a; - if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 278 /* NamedExports */) { + if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 279 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 311 /* SourceFile */ || node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 266 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 312 /* SourceFile */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 267 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -84030,7 +84627,7 @@ function createTypeChecker(host) { } for (const statement of sourceFile.statements) { if (canConvertImportDeclarationToTypeOnly(statement) || canConvertImportEqualsDeclarationToTypeOnly(statement)) { - error( + error2( statement, Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error ); @@ -84060,13 +84657,13 @@ function createTypeChecker(host) { true ); if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || symbol.declarations && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { - error(exportedName, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, idText(exportedName)); + error2(exportedName, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, idText(exportedName)); } else { if (!node.isTypeOnly && !node.parent.parent.isTypeOnly) { markExportAsReferenced(node); } const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol); - if (!target || getAllSymbolFlags(target) & 111551 /* Value */) { + if (!target || getSymbolFlags(target) & 111551 /* Value */) { checkExpressionCached(node.propertyName || node.name); } } @@ -84081,12 +84678,12 @@ function createTypeChecker(host) { if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 311 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 266 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { - error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); + error2(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { - error(node, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + error2(node, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); } return; } @@ -84097,7 +84694,7 @@ function createTypeChecker(host) { if (typeAnnotationNode) { checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression); } - const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */); + const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */); if (node.expression.kind === 80 /* Identifier */) { const id = node.expression; const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName( @@ -84111,17 +84708,17 @@ function createTypeChecker(host) { )); if (sym) { markAliasReferenced(sym, id); - if (getAllSymbolFlags(sym) & 111551 /* Value */) { + if (getSymbolFlags(sym) & 111551 /* Value */) { checkExpressionCached(id); - if (!isIllegalExportDefaultInCJS && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) { - error( + if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) { + error2( id, node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : Diagnostics.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration, idText(id) ); } - } else if (!isIllegalExportDefaultInCJS && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax) { - error( + } else if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax) { + error2( id, node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type : Diagnostics.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type, idText(id) @@ -84141,16 +84738,16 @@ function createTypeChecker(host) { checkExpressionCached(node.expression); } if (isIllegalExportDefaultInCJS) { - error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } checkExternalModuleExports(container); - if (node.flags & 16777216 /* Ambient */ && !isEntityNameExpression(node.expression)) { + if (node.flags & 33554432 /* Ambient */ && !isEntityNameExpression(node.expression)) { grammarErrorOnNode(node.expression, Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context); } if (node.isExportEquals) { - if (moduleKind >= 5 /* ES2015 */ && (node.flags & 16777216 /* Ambient */ && getSourceFileOfNode(node).impliedNodeFormat === 99 /* ESNext */ || !(node.flags & 16777216 /* Ambient */) && getSourceFileOfNode(node).impliedNodeFormat !== 1 /* CommonJS */)) { + if (moduleKind >= 5 /* ES2015 */ && (node.flags & 33554432 /* Ambient */ && getSourceFileOfNode(node).impliedNodeFormat === 99 /* ESNext */ || !(node.flags & 33554432 /* Ambient */) && getSourceFileOfNode(node).impliedNodeFormat !== 1 /* CommonJS */)) { grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead); - } else if (moduleKind === 4 /* System */ && !(node.flags & 16777216 /* Ambient */)) { + } else if (moduleKind === 4 /* System */ && !(node.flags & 33554432 /* Ambient */)) { grammarErrorOnNode(node, Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system); } } @@ -84166,7 +84763,7 @@ function createTypeChecker(host) { if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { const declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; if (declaration && !isTopLevelInExternalModuleAugmentation(declaration) && !isInJSFile(declaration)) { - error(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + error2(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); } } const exports = getExportsOfModule(moduleSymbol); @@ -84223,182 +84820,182 @@ function createTypeChecker(host) { const kind = node.kind; if (cancellationToken) { switch (kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 242 /* FirstStatement */ && kind <= 258 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 243 /* FirstStatement */ && kind <= 259 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return checkTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return checkParameter(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checkPropertySignature(node); - case 184 /* ConstructorType */: - case 183 /* FunctionType */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 185 /* ConstructorType */: + case 184 /* FunctionType */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return checkSignatureDeclaration(node); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return checkMethodDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return checkConstructorDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return checkAccessorDeclaration(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return checkTypeReferenceNode(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return checkTypePredicate(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return checkTypeQuery(node); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return checkTypeLiteral(node); - case 187 /* ArrayType */: + case 188 /* ArrayType */: return checkArrayType(node); - case 188 /* TupleType */: + case 189 /* TupleType */: return checkTupleType(node); - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 195 /* ParenthesizedType */: - case 189 /* OptionalType */: - case 190 /* RestType */: + case 196 /* ParenthesizedType */: + case 190 /* OptionalType */: + case 191 /* RestType */: return checkSourceElement(node.type); - case 196 /* ThisType */: + case 197 /* ThisType */: return checkThisType(node); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return checkTypeOperator(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return checkConditionalType(node); - case 194 /* InferType */: + case 195 /* InferType */: return checkInferType(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return checkImportType(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 330 /* JSDocLink */: - case 331 /* JSDocLinkCode */: - case 332 /* JSDocLinkPlain */: + case 331 /* JSDocLink */: + case 332 /* JSDocLinkCode */: + case 333 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 321 /* JSDocNonNullableType */: - case 320 /* JSDocNullableType */: - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: - case 328 /* JSDocTypeLiteral */: + case 322 /* JSDocNonNullableType */: + case 321 /* JSDocNullableType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: + case 329 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 315 /* JSDocTypeExpression */: + case 316 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 339 /* JSDocPublicTag */: - case 341 /* JSDocProtectedTag */: - case 340 /* JSDocPrivateTag */: + case 340 /* JSDocPublicTag */: + case 342 /* JSDocProtectedTag */: + case 341 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 356 /* JSDocSatisfiesTag */: + case 357 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return checkMappedType(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 240 /* Block */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 268 /* ModuleBlock */: return checkBlock(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return checkVariableStatement(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return checkExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return checkIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return checkDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return checkWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return checkForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return checkForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return checkForOfStatement(node); - case 250 /* ContinueStatement */: - case 251 /* BreakStatement */: + case 251 /* ContinueStatement */: + case 252 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return checkReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return checkWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return checkSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return checkLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return checkThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return checkTryStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return checkBindingElement(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return checkClassDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return checkImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return checkExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return checkExportAssignment(node); - case 241 /* EmptyStatement */: - case 258 /* DebuggerStatement */: + case 242 /* EmptyStatement */: + case 259 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -84432,16 +85029,16 @@ function createTypeChecker(host) { const { parent: parent2 } = node; if (isParameter(parent2) && isJSDocFunctionType(parent2.parent)) { if (last(parent2.parent.parameters) !== parent2) { - error(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); + error2(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); } return; } if (!isJSDocTypeExpression(parent2)) { - error(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); + error2(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); } const paramTag = node.parent.parent; if (!isJSDocParameterTag(paramTag)) { - error(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); + error2(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); return; } const param = getParameterSymbolFromJSDoc(paramTag); @@ -84450,7 +85047,7 @@ function createTypeChecker(host) { } const host2 = getHostSignatureFromJSDoc(paramTag); if (!host2 || last(host2.parameters).symbol !== param) { - error(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); + error2(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); } } function getTypeFromJSDocVariadicType(node) { @@ -84497,38 +85094,38 @@ function createTypeChecker(host) { currentNode = node; instantiationCount = 0; switch (node.kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 285 /* JsxOpeningElement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 286 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 283 /* JsxElement */: + case 284 /* JsxElement */: checkJsxElementDeferred(node); break; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: - case 216 /* ParenthesizedExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 217 /* ParenthesizedExpression */: checkAssertionDeferred(node); } currentNode = saveCurrentNode; @@ -84586,7 +85183,7 @@ function createTypeChecker(host) { addLazyDiagnostic(() => { if (!node.isDeclarationFile && (compilerOptions.noUnusedLocals || compilerOptions.noUnusedParameters)) { checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(node), (containingNode, kind, diag2) => { - if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 16777216 /* Ambient */))) { + if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) { diagnostics.add(diag2); } }); @@ -84665,7 +85262,7 @@ function createTypeChecker(host) { return diagnostics.getGlobalDiagnostics(); } function getSymbolsInScope(location, meaning) { - if (location.flags & 33554432 /* InWithStatement */) { + if (location.flags & 67108864 /* InWithStatement */) { return []; } const symbols = createSymbolTable(); @@ -84679,27 +85276,27 @@ function createTypeChecker(host) { copySymbols(location.locals, meaning); } switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalModule(location)) break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */); break; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */); } break; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -84732,7 +85329,7 @@ function createTypeChecker(host) { function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 280 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 279 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) { copySymbol(symbol, meaning2); } }); @@ -84743,16 +85340,16 @@ function createTypeChecker(host) { return name.kind === 80 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 182 /* TypeReference */; + return node.parent.kind === 183 /* TypeReference */; } function isInNameOfExpressionWithTypeArguments(node) { - while (node.parent.kind === 210 /* PropertyAccessExpression */) { + while (node.parent.kind === 211 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 232 /* ExpressionWithTypeArguments */; + return node.parent.kind === 233 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -84778,13 +85375,13 @@ function createTypeChecker(host) { return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 165 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 270 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 271 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 276 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 277 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -84810,7 +85407,7 @@ function createTypeChecker(host) { node = parent2; parent2 = parent2.parent; } - if (parent2 && parent2.kind === 204 /* ImportType */ && parent2.qualifier === node) { + if (parent2 && parent2.kind === 205 /* ImportType */ && parent2.qualifier === node) { return parent2; } return void 0; @@ -84832,7 +85429,7 @@ function createTypeChecker(host) { /*contextFlags*/ void 0 ); - const type = contextualType && getThisTypeFromContextualType(contextualType); + const type = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); return type && !isTypeAny(type); } } @@ -84842,7 +85439,7 @@ function createTypeChecker(host) { if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 210 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name) && !isThisPropertyAndThisTyped(name.parent)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -84850,7 +85447,7 @@ function createTypeChecker(host) { } } } - if (name.parent.kind === 276 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 277 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, /*all meanings*/ @@ -84862,7 +85459,7 @@ function createTypeChecker(host) { return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 270 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 271 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals( name, @@ -84883,7 +85480,7 @@ function createTypeChecker(host) { } if (isInNameOfExpressionWithTypeArguments(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 232 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 233 /* ExpressionWithTypeArguments */) { meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -84902,10 +85499,10 @@ function createTypeChecker(host) { return entityNameSymbol; } } - if (name.parent.kind === 347 /* JSDocParameterTag */) { + if (name.parent.kind === 348 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 167 /* TypeParameter */ && name.parent.parent.kind === 351 /* JSDocTemplateTag */) { + if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 352 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -84958,12 +85555,12 @@ function createTypeChecker(host) { return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 210 /* PropertyAccessExpression */ || name.kind === 165 /* QualifiedName */) { + } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 210 /* PropertyAccessExpression */) { + if (name.kind === 211 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -85003,7 +85600,7 @@ function createTypeChecker(host) { return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 182 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName( name, meaning, @@ -85014,7 +85611,7 @@ function createTypeChecker(host) { ); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 181 /* TypePredicate */) { + if (name.parent.kind === 182 /* TypePredicate */) { return resolveEntityName( name, /*meaning*/ @@ -85055,7 +85652,7 @@ function createTypeChecker(host) { } const { parent: parent2 } = node; const grandParent = parent2.parent; - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } if (isDeclarationNameOrImportPropertyName(node)) { @@ -85067,7 +85664,7 @@ function createTypeChecker(host) { if (node.kind === 80 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 207 /* BindingElement */ && grandParent.kind === 205 /* ObjectBindingPattern */ && node === parent2.propertyName) { + } else if (parent2.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent2.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { @@ -85086,8 +85683,8 @@ function createTypeChecker(host) { switch (node.kind) { case 80 /* Identifier */: case 81 /* PrivateIdentifier */: - case 210 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } @@ -85108,19 +85705,19 @@ function createTypeChecker(host) { if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 196 /* ThisType */: + case 197 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; case 108 /* SuperKeyword */: return checkExpression(node).symbol; case 137 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 175 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) { return constructorDeclaration.parent.symbol; } return void 0; case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 271 /* ImportDeclaration */ || node.parent.kind === 277 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 272 /* ImportDeclaration */ || node.parent.kind === 278 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( node.parent, /*requireStringLiteralLikeArgument*/ false @@ -85138,16 +85735,16 @@ function createTypeChecker(host) { case 39 /* EqualsGreaterThanToken */: case 86 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 204 /* ImportType */: + case 205 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; case 95 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; case 102 /* ImportKeyword */: case 105 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return checkExpression(node).symbol; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) { const symbol = getIntrinsicTagSymbol(node.parent); return symbol === unknownSymbol ? void 0 : symbol; @@ -85166,7 +85763,7 @@ function createTypeChecker(host) { return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 303 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 304 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); } return void 0; @@ -85182,7 +85779,7 @@ function createTypeChecker(host) { if (isSourceFile(node) && !isExternalModule(node)) { return errorType; } - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return errorType; } const classDecl = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); @@ -85246,16 +85843,16 @@ function createTypeChecker(host) { return errorType; } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 209 /* ObjectLiteralExpression */ || expr.kind === 208 /* ArrayLiteralExpression */); - if (expr.parent.kind === 249 /* ForOfStatement */) { + Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */); + if (expr.parent.kind === 250 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 225 /* BinaryExpression */) { + if (expr.parent.kind === 226 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 302 /* PropertyAssignment */) { + if (expr.parent.kind === 303 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -85288,7 +85885,7 @@ function createTypeChecker(host) { case 9 /* NumericLiteral */: case 11 /* StringLiteral */: return getStringLiteralType(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -85358,7 +85955,7 @@ function createTypeChecker(host) { return symbolLinks2.exportsSomeValue; function isValue(s) { s = resolveSymbol(s); - return s && !!(getAllSymbolFlags(s) & 111551 /* Value */); + return s && !!(getSymbolFlags(s) & 111551 /* Value */); } } function isNameOfModuleOrEnumDeclaration(node) { @@ -85383,7 +85980,7 @@ function createTypeChecker(host) { } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 311 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 312 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -85413,7 +86010,7 @@ function createTypeChecker(host) { return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 298 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 299 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -85441,7 +86038,7 @@ function createTypeChecker(host) { /*lookInLabeledStatements*/ false ); - const inLoopBodyBlock = container.kind === 240 /* Block */ && isIterationStatement( + const inLoopBodyBlock = container.kind === 241 /* Block */ && isIterationStatement( container.parent, /*lookInLabeledStatements*/ false @@ -85481,31 +86078,35 @@ function createTypeChecker(host) { function isValueAliasDeclaration(node) { Debug.assert(canCollectSymbolAliasAccessabilityData); switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfDeclaration(node)); - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: const symbol = getSymbolOfDeclaration(node); - return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 277 /* ExportDeclaration */: + return !!symbol && isAliasResolvedToValue( + symbol, + /*excludeTypeOnlyValues*/ + true + ); + case 278 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfDeclaration(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 311 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 312 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node)); return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference); } - function isAliasResolvedToValue(symbol) { + function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) { if (!symbol) { return false; } @@ -85513,7 +86114,12 @@ function createTypeChecker(host) { if (target === unknownSymbol) { return true; } - return !!((getAllSymbolFlags(target) ?? -1) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target)); + return !!(getSymbolFlags( + symbol, + excludeTypeOnlyValues, + /*excludeLocalMeanings*/ + true + ) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target)); } function isConstEnumOrConstEnumOnlyModule(s) { return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; @@ -85527,7 +86133,7 @@ function createTypeChecker(host) { return true; } const target = getSymbolLinks(symbol).aliasTarget; - if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getAllSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { + if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { return true; } } @@ -85589,15 +86195,15 @@ function createTypeChecker(host) { } function canHaveConstantValue(node) { switch (node.kind) { - case 305 /* EnumMember */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 306 /* EnumMember */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 305 /* EnumMember */) { + if (node.kind === 306 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -85797,24 +86403,24 @@ function createTypeChecker(host) { if (symbol) { return filter(getExportSymbolOfValueSymbolIfExported(symbol).declarations, (declaration) => { switch (declaration.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 305 /* EnumMember */: - case 209 /* ObjectLiteralExpression */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 265 /* EnumDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 266 /* ModuleDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 306 /* EnumMember */: + case 210 /* ObjectLiteralExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 266 /* EnumDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 267 /* ModuleDeclaration */: return true; } return false; @@ -85825,7 +86431,7 @@ function createTypeChecker(host) { return void 0; } function isLiteralConstDeclaration(node) { - if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { + if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node)) { return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } return false; @@ -85943,12 +86549,12 @@ function createTypeChecker(host) { getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 177 /* SetAccessor */ ? 176 /* GetAccessor */ : 177 /* SetAccessor */; + const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 177 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 176 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -85969,7 +86575,7 @@ function createTypeChecker(host) { }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 311 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 312 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfDeclaration(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -86004,18 +86610,18 @@ function createTypeChecker(host) { return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 232 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 297 /* HeritageClause */; + return node.parent && node.parent.kind === 233 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 298 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 80 /* Identifier */ && isInTypeQuery(node) || node.kind === 210 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 80 /* Identifier */ && isInTypeQuery(node) || node.kind === 211 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -86058,7 +86664,7 @@ function createTypeChecker(host) { break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 311 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 312 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -86083,7 +86689,7 @@ function createTypeChecker(host) { } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 266 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 267 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker( specifier, specifier, @@ -86093,7 +86699,7 @@ function createTypeChecker(host) { if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 311 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 312 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -86275,11 +86881,11 @@ function createTypeChecker(host) { function checkExternalEmitHelpers(location, helpers) { if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) { const sourceFile = getSourceFileOfNode(location); - if (isEffectiveExternalModule(sourceFile, compilerOptions) && !(location.flags & 16777216 /* Ambient */)) { + if (isEffectiveExternalModule(sourceFile, compilerOptions) && !(location.flags & 33554432 /* Ambient */)) { const helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { const uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (let helper = 1 /* FirstEmitHelper */; helper <= 16777216 /* LastEmitHelper */; helper <<= 1) { + for (let helper = 1 /* FirstEmitHelper */; helper <= 33554432 /* LastEmitHelper */; helper <<= 1) { if (uncheckedHelpers & helper) { for (const name of getHelperNames(helper)) { if (requestedExternalEmitHelperNames.has(name)) @@ -86287,18 +86893,18 @@ function createTypeChecker(host) { requestedExternalEmitHelperNames.add(name); const symbol = resolveSymbol(getSymbol2(getExportsOfModule(helpersModule), escapeLeadingUnderscores(name), 111551 /* Value */)); if (!symbol) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name); } else if (helper & 524288 /* ClassPrivateFieldGet */) { if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 3)) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 4); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 4); } } else if (helper & 1048576 /* ClassPrivateFieldSet */) { if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 4)) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 5); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 5); } } else if (helper & 1024 /* SpreadArray */) { if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 2)) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 3); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 3); } } } @@ -86361,6 +86967,8 @@ function createTypeChecker(host) { return ["__setFunctionName"]; case 16777216 /* PropKey */: return ["__propKey"]; + case 33554432 /* AddDisposableResourceAndDisposeResources */: + return ["__addDisposableResource", "__disposeResources"]; default: return Debug.fail("Unrecognized helper"); } @@ -86379,6 +86987,7 @@ function createTypeChecker(host) { if (isParameter(node) && parameterIsThisKeyword(node)) { return grammarErrorOnFirstToken(node, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters); } + const blockScopeKind = isVariableStatement(node) ? node.declarationList.flags & 7 /* BlockScoped */ : 0 /* None */; let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator; let flags = 0 /* None */; let sawExportBeforeDecorators = false; @@ -86386,12 +86995,12 @@ function createTypeChecker(host) { for (const modifier of node.modifiers) { if (isDecorator(modifier)) { if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - if (node.kind === 173 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { + if (node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); } - } else if (legacyDecorators && (node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */)) { + } else if (legacyDecorators && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */)) { const accessors = getAllAccessorDeclarations(node.parent.members, node); if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -86405,7 +87014,7 @@ function createTypeChecker(host) { const sourceFile = getSourceFileOfNode(modifier); if (!hasParseDiagnostics(sourceFile)) { addRelatedInfo( - error(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), + error2(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), createDiagnosticForNode(firstDecorator, Diagnostics.Decorator_used_before_export_here) ); return true; @@ -86421,29 +87030,29 @@ function createTypeChecker(host) { firstDecorator ?? (firstDecorator = modifier); } else { if (modifier.kind !== 148 /* ReadonlyKeyword */) { - if (node.kind === 170 /* PropertySignature */ || node.kind === 172 /* MethodSignature */) { + if (node.kind === 171 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 180 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); } } if (modifier.kind !== 103 /* InKeyword */ && modifier.kind !== 147 /* OutKeyword */ && modifier.kind !== 87 /* ConstKeyword */) { - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { case 87 /* ConstKeyword */: - if (node.kind !== 265 /* EnumDeclaration */ && node.kind !== 167 /* TypeParameter */) { + if (node.kind !== 266 /* EnumDeclaration */ && node.kind !== 168 /* TypeParameter */) { return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(87 /* ConstKeyword */)); } const parent2 = node.parent; - if (node.kind === 167 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { + if (node.kind === 168 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind)); } break; - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: if (flags & 16384 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); } else if (flags & 2 /* Ambient */) { @@ -86474,7 +87083,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); } else if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); - } else if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { if (modifier.kind === 123 /* PrivateKeyword */) { @@ -86496,9 +87105,9 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); - } else if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); @@ -86515,7 +87124,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); } else if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); - } else if (node.kind !== 171 /* PropertyDeclaration */) { + } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; @@ -86523,7 +87132,7 @@ function createTypeChecker(host) { case 148 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 180 /* IndexSignature */ && node.kind !== 168 /* Parameter */) { + } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); @@ -86531,8 +87140,8 @@ function createTypeChecker(host) { flags |= 64 /* Readonly */; break; case 95 /* ExportKeyword */: - if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 264 /* TypeAliasDeclaration */ && node.kind !== 263 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later - node.kind !== 266 /* ModuleDeclaration */ && node.parent.kind === 311 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later + node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } if (flags & 1 /* Export */) { @@ -86545,15 +87154,23 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "export"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); } flags |= 1 /* Export */; break; case 90 /* DefaultKeyword */: - const container = node.parent.kind === 311 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 266 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); } else if (!(flags & 1 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); } else if (sawExportBeforeDecorators) { @@ -86570,9 +87187,13 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 267 /* ModuleBlock */) { + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "declare"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "declare"); + } else if (node.parent.flags & 33554432 /* Ambient */ && node.parent.kind === 268 /* ModuleBlock */) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); @@ -86586,12 +87207,12 @@ function createTypeChecker(host) { if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 262 /* ClassDeclaration */ && node.kind !== 184 /* ConstructorType */) { - if (node.kind !== 173 /* MethodDeclaration */ && node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 176 /* GetAccessor */ && node.kind !== 177 /* SetAccessor */) { + if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { + if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 262 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { - const message = node.kind === 171 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; + if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; return grammarErrorOnNode(modifier, message); } if (flags & 32 /* Static */) { @@ -86618,9 +87239,9 @@ function createTypeChecker(host) { case 134 /* AsyncKeyword */: if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); - } else if (flags & 2 /* Ambient */ || node.parent.flags & 16777216 /* Ambient */) { + } else if (flags & 2 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -86633,7 +87254,7 @@ function createTypeChecker(host) { case 147 /* OutKeyword */: const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 167 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + if (node.kind !== 168 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); } if (flags & inOutFlag) { @@ -86647,7 +87268,7 @@ function createTypeChecker(host) { } } } - if (node.kind === 175 /* Constructor */) { + if (node.kind === 176 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -86658,11 +87279,11 @@ function createTypeChecker(host) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 271 /* ImportDeclaration */ || node.kind === 270 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -86682,46 +87303,47 @@ function createTypeChecker(host) { } function findFirstIllegalModifier(node) { switch (node.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 266 /* ModuleDeclaration */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 267 /* ModuleDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return void 0; - case 174 /* ClassStaticBlockDeclaration */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 269 /* NamespaceExportDeclaration */: - case 281 /* MissingDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 270 /* NamespaceExportDeclaration */: + case 282 /* MissingDeclaration */: return find(node.modifiers, isModifier); default: - if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return void 0; } switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return findFirstModifierExcept(node, 134 /* AsyncKeyword */); - case 262 /* ClassDeclaration */: - case 184 /* ConstructorType */: + case 263 /* ClassDeclaration */: + case 185 /* ConstructorType */: return findFirstModifierExcept(node, 128 /* AbstractKeyword */); - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 242 /* VariableStatement */: - case 264 /* TypeAliasDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return find(node.modifiers, isModifier); - case 265 /* EnumDeclaration */: + case 243 /* VariableStatement */: + return node.declarationList.flags & 4 /* Using */ ? findFirstModifierExcept(node, 135 /* AwaitKeyword */) : find(node.modifiers, isModifier); + case 266 /* EnumDeclaration */: return findFirstModifierExcept(node, 87 /* ConstKeyword */); default: Debug.assertNever(node); @@ -86737,10 +87359,10 @@ function createTypeChecker(host) { } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -86768,7 +87390,7 @@ function createTypeChecker(host) { if (i !== parameterCount - 1) { return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); } - if (!(parameter.flags & 16777216 /* Ambient */)) { + if (!(parameter.flags & 33554432 /* Ambient */)) { checkGrammarForDisallowedTrailingComma(parameters, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); } if (parameter.questionToken) { @@ -86798,12 +87420,12 @@ function createTypeChecker(host) { if (length(nonSimpleParameters)) { forEach(nonSimpleParameters, (parameter) => { addRelatedInfo( - error(parameter, Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive), + error2(parameter, Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive), createDiagnosticForNode(useStrictDirective, Diagnostics.use_strict_directive_used_here) ); }); const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here) : createDiagnosticForNode(parameter, Diagnostics.and_here)); - addRelatedInfo(error(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2); + addRelatedInfo(error2(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2); return true; } } @@ -86885,7 +87507,7 @@ function createTypeChecker(host) { return checkGrammarForDisallowedTrailingComma(typeArguments) || checkGrammarForAtLeastOneTypeArgument(node, typeArguments); } function checkGrammarTaggedTemplateChain(node) { - if (node.questionDotToken || node.flags & 32 /* OptionalChain */) { + if (node.questionDotToken || node.flags & 64 /* OptionalChain */) { return grammarErrorOnNode(node.template, Diagnostics.Tagged_template_expressions_are_not_permitted_in_an_optional_chain); } return false; @@ -86953,11 +87575,11 @@ function createTypeChecker(host) { return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 225 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { + if (computedPropertyName.expression.kind === 226 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } return false; @@ -86965,9 +87587,9 @@ function createTypeChecker(host) { function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */ || node.kind === 173 /* MethodDeclaration */ + node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */ ); - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } if (!node.body) { @@ -86984,7 +87606,7 @@ function createTypeChecker(host) { function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = /* @__PURE__ */ new Map(); for (const prop of node.properties) { - if (prop.kind === 304 /* SpreadAssignment */) { + if (prop.kind === 305 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -86994,10 +87616,10 @@ function createTypeChecker(host) { continue; } const name = prop.name; - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 303 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 304 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { grammarErrorOnNode(prop.equalsToken, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern); } if (name.kind === 81 /* PrivateIdentifier */) { @@ -87005,7 +87627,7 @@ function createTypeChecker(host) { } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 173 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -87018,8 +87640,8 @@ function createTypeChecker(host) { } let currentKind; switch (prop.kind) { - case 303 /* ShorthandPropertyAssignment */: - case 302 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 9 /* NumericLiteral */) { @@ -87027,13 +87649,13 @@ function createTypeChecker(host) { } currentKind = 4 /* PropertyAssignment */; break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -87070,7 +87692,7 @@ function createTypeChecker(host) { checkGrammarTypeArguments(node, node.typeArguments); const seen = /* @__PURE__ */ new Map(); for (const attr of node.attributes.properties) { - if (attr.kind === 292 /* JsxSpreadAttribute */) { + if (attr.kind === 293 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -87080,7 +87702,7 @@ function createTypeChecker(host) { } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 293 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 294 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -87102,8 +87724,8 @@ function createTypeChecker(host) { if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 249 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { - if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { + if (forInOrOfStatement.kind === 250 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (!(forInOrOfStatement.flags & 65536 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { if (!hasParseDiagnostics(sourceFile)) { @@ -87142,7 +87764,7 @@ function createTypeChecker(host) { if (!hasParseDiagnostics(sourceFile)) { const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); const func = getContainingFunction(forInOrOfStatement); - if (func && func.kind !== 175 /* Constructor */) { + if (func && func.kind !== 176 /* Constructor */) { Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); @@ -87154,11 +87776,11 @@ function createTypeChecker(host) { return false; } } - if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 32768 /* AwaitContext */) && isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { + if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 65536 /* AwaitContext */) && isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 260 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 261 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -87166,16 +87788,16 @@ function createTypeChecker(host) { return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } const firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); } } @@ -87183,7 +87805,7 @@ function createTypeChecker(host) { return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 186 /* TypeLiteral */ && accessor.parent.kind !== 263 /* InterfaceDeclaration */) { + if (!(accessor.flags & 33554432 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 264 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -87198,7 +87820,7 @@ function createTypeChecker(host) { if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 186 /* TypeLiteral */ || accessor.parent.kind === 263 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -87208,10 +87830,10 @@ function createTypeChecker(host) { if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 176 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 177 /* SetAccessor */) { + if (accessor.kind === 178 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -87229,10 +87851,10 @@ function createTypeChecker(host) { return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 176 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 176 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } @@ -87249,7 +87871,7 @@ function createTypeChecker(host) { } } switch (parent2.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: const decl = parent2; if (decl.name.kind !== 80 /* Identifier */) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); @@ -87261,12 +87883,12 @@ function createTypeChecker(host) { return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(parent2) || !hasEffectiveReadonlyModifier(parent2)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); } break; - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (!hasSyntacticModifier(parent2, 64 /* Readonly */)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } @@ -87275,7 +87897,7 @@ function createTypeChecker(host) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } } else if (node.operator === 148 /* ReadonlyKeyword */) { - if (node.type.kind !== 187 /* ArrayType */ && node.type.kind !== 188 /* TupleType */) { + if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) { return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(155 /* SymbolKeyword */)); } } @@ -87289,8 +87911,8 @@ function createTypeChecker(host) { if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 173 /* MethodDeclaration */) { - if (node.parent.kind === 209 /* ObjectLiteralExpression */) { + if (node.kind === 174 /* MethodDeclaration */) { + if (node.parent.kind === 210 /* ObjectLiteralExpression */) { if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 134 /* AsyncKeyword */)) { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) { @@ -87309,14 +87931,14 @@ function createTypeChecker(host) { if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) { return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.kind === 173 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 174 /* MethodDeclaration */ && !node.body) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } - } else if (node.parent.kind === 263 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.parent.kind === 186 /* TypeLiteral */) { + } else if (node.parent.kind === 187 /* TypeLiteral */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } } @@ -87327,9 +87949,9 @@ function createTypeChecker(host) { return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 250 /* ContinueStatement */ && !isIterationStatement( + const isMisplacedContinueLabel = node.kind === 251 /* ContinueStatement */ && !isIterationStatement( current.statement, /*lookInLabeledStatements*/ true @@ -87340,8 +87962,8 @@ function createTypeChecker(host) { return false; } break; - case 254 /* SwitchStatement */: - if (node.kind === 251 /* BreakStatement */ && !node.label) { + case 255 /* SwitchStatement */: + if (node.kind === 252 /* BreakStatement */ && !node.label) { return false; } break; @@ -87358,10 +87980,10 @@ function createTypeChecker(host) { current = current.parent; } if (node.label) { - const message = node.kind === 251 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - const message = node.kind === 251 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } } @@ -87381,10 +88003,10 @@ function createTypeChecker(host) { } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 223 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 223 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; + return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -87395,7 +88017,7 @@ function createTypeChecker(host) { const initializer = node.initializer; if (initializer) { const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 112 /* TrueKeyword */ || initializer.kind === 97 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); - const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node); + const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { return grammarErrorOnNode(initializer, Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); @@ -87406,27 +88028,41 @@ function createTypeChecker(host) { } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 248 /* ForInStatement */ && node.parent.parent.kind !== 249 /* ForOfStatement */) { - if (node.flags & 16777216 /* Ambient */) { + const nodeFlags = getCombinedNodeFlagsCached(node); + const blockScopeKind = nodeFlags & 7 /* BlockScoped */; + if (isBindingPattern(node.name)) { + switch (blockScopeKind) { + case 6 /* AwaitUsing */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "await using"); + case 4 /* Using */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "using"); + } + } + if (node.parent.parent.kind !== 249 /* ForInStatement */ && node.parent.parent.kind !== 250 /* ForOfStatement */) { + if (nodeFlags & 33554432 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { if (isBindingPattern(node.name) && !isBindingPattern(node.parent)) { return grammarErrorOnNode(node, Diagnostics.A_destructuring_declaration_must_have_an_initializer); } - if (isVarConst(node)) { - return grammarErrorOnNode(node, Diagnostics.const_declarations_must_be_initialized); + switch (blockScopeKind) { + case 6 /* AwaitUsing */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "await using"); + case 4 /* Using */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "using"); + case 2 /* Const */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "const"); } } } - if (node.exclamationToken && (node.parent.parent.kind !== 242 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 243 /* VariableStatement */ || !node.type || node.initializer || nodeFlags & 33554432 /* Ambient */)) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } - if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 16777216 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { + if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { checkESModuleMarker(node.name); } - const checkLetConstNames = isLet(node) || isVarConst(node); - return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name); + return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name); } function checkESModuleMarker(name) { if (name.kind === 80 /* Identifier */) { @@ -87466,29 +88102,39 @@ function createTypeChecker(host) { if (!declarationList.declarations.length) { return grammarErrorAtPos(declarationList, declarations.pos, declarations.end - declarations.pos, Diagnostics.Variable_declaration_list_cannot_be_empty); } + const blockScopeFlags = declarationList.flags & 7 /* BlockScoped */; + if ((blockScopeFlags === 4 /* Using */ || blockScopeFlags === 6 /* AwaitUsing */) && isForInStatement(declarationList.parent)) { + return grammarErrorOnNode( + declarationList, + blockScopeFlags === 4 /* Using */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration + ); + } + if (blockScopeFlags === 6 /* AwaitUsing */) { + return checkAwaitGrammar(declarationList); + } return false; } function allowLetAndConstDeclarations(parent2) { switch (parent2.kind) { - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return false; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return allowLetAndConstDeclarations(parent2.parent); } return true; } - function checkGrammarForDisallowedLetOrConstStatement(node) { + function checkGrammarForDisallowedBlockScopedVariableStatement(node) { if (!allowLetAndConstDeclarations(node.parent)) { - if (isLet(node.declarationList)) { - return grammarErrorOnNode(node, Diagnostics.let_declarations_can_only_be_declared_inside_a_block); - } else if (isVarConst(node.declarationList)) { - return grammarErrorOnNode(node, Diagnostics.const_declarations_can_only_be_declared_inside_a_block); + const blockScopeKind = getCombinedNodeFlagsCached(node.declarationList) & 7 /* BlockScoped */; + if (blockScopeKind) { + const keyword = blockScopeKind === 1 /* Let */ ? "let" : blockScopeKind === 2 /* Const */ ? "const" : blockScopeKind === 4 /* Using */ ? "using" : blockScopeKind === 6 /* AwaitUsing */ ? "await using" : Debug.fail("Unknown BlockScope flag"); + return grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword); } } } @@ -87577,7 +88223,7 @@ function createTypeChecker(host) { if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 263 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } @@ -87594,23 +88240,23 @@ function createTypeChecker(host) { return grammarErrorOnNode(node.initializer, Diagnostics.A_type_literal_property_cannot_have_an_initializer); } } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { checkAmbientInitializer(node); } - if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & 16777216 /* Ambient */ || isStatic(node) || hasAbstractModifier(node))) { + if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & 33554432 /* Ambient */ || isStatic(node) || hasAbstractModifier(node))) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 263 /* InterfaceDeclaration */ || node.kind === 264 /* TypeAliasDeclaration */ || node.kind === 271 /* ImportDeclaration */ || node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 277 /* ExportDeclaration */ || node.kind === 276 /* ExportAssignment */ || node.kind === 269 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (const decl of file.statements) { - if (isDeclaration(decl) || decl.kind === 242 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 243 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -87619,15 +88265,15 @@ function createTypeChecker(host) { return false; } function checkGrammarSourceFile(node) { - return !!(node.flags & 16777216 /* Ambient */) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); + return !!(node.flags & 33554432 /* Ambient */) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); } function checkGrammarStatementInAmbientContext(node) { - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { const links = getNodeLinks(node); if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 240 /* Block */ || node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + if (node.parent.kind === 241 /* Block */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -87696,7 +88342,7 @@ function createTypeChecker(host) { if (node.isTypeOnly && node.name && node.namedBindings) { return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); } - if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 274 /* NamedImports */) { + if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -87706,7 +88352,7 @@ function createTypeChecker(host) { if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 275 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + specifier.kind === 276 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement ); } }); @@ -87820,17 +88466,37 @@ function createTypeChecker(host) { const name = getPropertyNameForPropertyNameNode(node); return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0; } + function getCombinedModifierFlagsCached(node) { + if (lastGetCombinedModifierFlagsNode === node) { + return lastGetCombinedModifierFlagsResult; + } + lastGetCombinedModifierFlagsNode = node; + lastGetCombinedModifierFlagsResult = getCombinedModifierFlags(node); + return lastGetCombinedModifierFlagsResult; + } + function getCombinedNodeFlagsCached(node) { + if (lastGetCombinedNodeFlagsNode === node) { + return lastGetCombinedNodeFlagsResult; + } + lastGetCombinedNodeFlagsNode = node; + lastGetCombinedNodeFlagsResult = getCombinedNodeFlags(node); + return lastGetCombinedNodeFlagsResult; + } + function isVarConstLike(node) { + const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */; + return blockScopeKind === 2 /* Const */ || blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */; + } } function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 261 /* FunctionDeclaration */ && declaration.kind !== 173 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 262 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -87883,13 +88549,13 @@ function createBasicNodeBuilderModuleSpecifierResolutionHost(host) { readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0 }; } -var SymbolTrackerImpl = class { +var SymbolTrackerImpl = class _SymbolTrackerImpl { constructor(context, tracker, moduleResolverHost) { this.moduleResolverHost = void 0; this.inner = void 0; this.disableTrackSymbol = false; var _a; - while (tracker instanceof SymbolTrackerImpl) { + while (tracker instanceof _SymbolTrackerImpl) { tracker = tracker.inner; } this.inner = tracker; @@ -88247,21 +88913,21 @@ function visitEachChild(node, visitor, context, nodesVisitor = visitNodes2, toke return fn === void 0 ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor); } var visitEachChildTable = { - [165 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [166 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [167 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -88270,7 +88936,7 @@ var visitEachChildTable = { nodeVisitor(node.default, visitor, isTypeNode) ); }, - [168 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88281,14 +88947,14 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [169 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [170 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -88297,7 +88963,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertyDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88308,7 +88974,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [172 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -88319,7 +88985,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [173 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88332,7 +88998,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88340,7 +89006,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88350,7 +89016,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88359,7 +89025,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [174 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -88367,7 +89033,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [178 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -88375,7 +89041,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [179 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -88383,7 +89049,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88392,7 +89058,7 @@ var visitEachChildTable = { ); }, // Types - [181 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -88400,14 +89066,14 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [182 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [183 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -88415,7 +89081,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [184 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -88424,56 +89090,56 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [185 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [186 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [187 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [188 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [189 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [190 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [191 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [192 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -88482,13 +89148,13 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [194 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [204 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -88498,14 +89164,14 @@ var visitEachChildTable = { node.isTypeOf ); }, - [301 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [201 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -88514,26 +89180,26 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [195 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [197 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [198 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [199 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -88544,20 +89210,20 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [200 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [202 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [203 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -88565,19 +89231,19 @@ var visitEachChildTable = { ); }, // Binding patterns - [205 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [206 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [207 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -88587,19 +89253,19 @@ var visitEachChildTable = { ); }, // Expression - [208 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [209 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [210 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88611,7 +89277,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [211 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88623,7 +89289,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [212 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88637,7 +89303,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [213 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88645,7 +89311,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [214 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -88653,20 +89319,20 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [215 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [216 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [217 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -88678,7 +89344,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [218 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -88689,43 +89355,43 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [220 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [220 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [222 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [223 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [224 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [225 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [226 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -88733,7 +89399,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [226 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -88743,27 +89409,27 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [227 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [228 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [229 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [229 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [230 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [230 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88773,28 +89439,28 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [232 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [233 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [237 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [238 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [234 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [235 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -88803,14 +89469,14 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [235 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [238 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88818,26 +89484,26 @@ var visitEachChildTable = { ); }, // Element - [240 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [241 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [242 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [243 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [243 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [244 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -88845,21 +89511,21 @@ var visitEachChildTable = { nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [245 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [246 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [247 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -88868,7 +89534,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -88876,7 +89542,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [250 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -88885,52 +89551,52 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [251 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [252 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [253 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [254 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [255 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [256 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [257 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -88938,7 +89604,7 @@ var visitEachChildTable = { nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [259 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [260 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -88947,13 +89613,13 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [260 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [261 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [261 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [262 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -88965,7 +89631,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [262 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [263 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88975,7 +89641,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [263 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88985,7 +89651,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [264 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -88994,7 +89660,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [265 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -89002,7 +89668,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isEnumMember) ); }, - [266 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -89010,25 +89676,25 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isModuleBody) ); }, - [267 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [268 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [268 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [269 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [269 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [270 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [270 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -89037,7 +89703,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [271 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -89046,21 +89712,21 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [299 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [300 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [272 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -89068,25 +89734,25 @@ var visitEachChildTable = { nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [273 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [279 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [280 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [274 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [275 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [275 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -89094,14 +89760,14 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [276 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [277 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -89111,13 +89777,13 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [278 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [280 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -89126,14 +89792,14 @@ var visitEachChildTable = { ); }, // Module references - [282 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [283 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -89141,7 +89807,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [284 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -89149,7 +89815,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [285 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -89157,20 +89823,20 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [286 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [294 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxNamespacedName( node, Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [287 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [288 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -89178,52 +89844,52 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [290 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isJsxAttributeName)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [291 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [292 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [292 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [293 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [295 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [296 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [297 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [297 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [298 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -89231,28 +89897,28 @@ var visitEachChildTable = { ); }, // Property assignments - [302 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [303 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [304 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [305 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [305 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -89260,20 +89926,20 @@ var visitEachChildTable = { ); }, // Top-level nodes - [311 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [312 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [359 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [360 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [360 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [361 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -89571,13 +90237,13 @@ function decodeMappings(mappings) { let sourceLine = 0; let sourceCharacter = 0; let nameIndex = 0; - let error; + let error2; return { get pos() { return pos; }, get error() { - return error; + return error2; }, get state() { return captureMapping( @@ -89662,8 +90328,8 @@ function decodeMappings(mappings) { return { value: void 0, done: true }; } function setError(message) { - if (error === void 0) { - error = message; + if (error2 === void 0) { + error2 = message; } } function setErrorAndStopIterating(message) { @@ -89671,7 +90337,7 @@ function decodeMappings(mappings) { return stopIterating(); } function hasReportedError() { - return error !== void 0; + return error2 !== void 0; } function isSourceMappingSegmentEnd() { return pos === mappings.length || mappings.charCodeAt(pos) === 44 /* comma */ || mappings.charCodeAt(pos) === 59 /* semicolon */; @@ -89868,7 +90534,7 @@ function isNamedDefaultReference(e) { function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 311 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 312 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -89898,9 +90564,11 @@ function getImportNeedsImportStarHelper(node) { function getImportNeedsImportDefaultHelper(node) { return !getImportNeedsImportStarHelper(node) && (isDefaultImport(node) || !!node.importClause && isNamedImports(node.importClause.namedBindings) && containsDefaultReference(node.importClause.namedBindings)); } -function collectExternalModuleInfo(context, sourceFile, resolver, compilerOptions) { +function collectExternalModuleInfo(context, sourceFile) { + const resolver = context.getEmitResolver(); + const compilerOptions = context.getCompilerOptions(); const externalImports = []; - const exportSpecifiers = createMultiMap(); + const exportSpecifiers = new IdentifierNameMultiMap(); const exportedBindings = []; const uniqueExports = /* @__PURE__ */ new Map(); let exportedNames; @@ -89911,7 +90579,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -89920,12 +90588,12 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption hasImportDefault = true; } break; - case 270 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 282 /* ExternalModuleReference */) { + case 271 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 283 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -89948,19 +90616,19 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption addExportedNamesForExportDeclaration(node); } break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings); } } break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -89977,7 +90645,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption } } break; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -90006,7 +90674,7 @@ function collectExternalModuleInfo(context, sourceFile, resolver, compilerOption if (!uniqueExports.get(idText(specifier.name))) { const name = specifier.propertyName || specifier.name; if (!node.moduleSpecifier) { - exportSpecifiers.add(idText(name), specifier); + exportSpecifiers.add(name, specifier); } const decl = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); if (decl) { @@ -90046,6 +90714,85 @@ function multiMapSparseArrayAdd(map2, key, value) { } return values; } +var IdentifierNameMap = class _IdentifierNameMap { + constructor() { + this._map = /* @__PURE__ */ new Map(); + } + get size() { + return this._map.size; + } + has(key) { + return this._map.has(_IdentifierNameMap.toKey(key)); + } + get(key) { + return this._map.get(_IdentifierNameMap.toKey(key)); + } + set(key, value) { + this._map.set(_IdentifierNameMap.toKey(key), value); + return this; + } + delete(key) { + var _a; + return ((_a = this._map) == null ? void 0 : _a.delete(_IdentifierNameMap.toKey(key))) ?? false; + } + clear() { + this._map.clear(); + } + values() { + return this._map.values(); + } + static toKey(name) { + if (isGeneratedPrivateIdentifier(name) || isGeneratedIdentifier(name)) { + const autoGenerate = name.emitNode.autoGenerate; + if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) { + const node = getNodeForGeneratedName(name); + const baseName = isMemberName(node) && node !== name ? _IdentifierNameMap.toKey(node) : `(generated@${getNodeId(node)})`; + return formatGeneratedName( + /*privateName*/ + false, + autoGenerate.prefix, + baseName, + autoGenerate.suffix, + _IdentifierNameMap.toKey + ); + } else { + const baseName = `(auto@${autoGenerate.id})`; + return formatGeneratedName( + /*privateName*/ + false, + autoGenerate.prefix, + baseName, + autoGenerate.suffix, + _IdentifierNameMap.toKey + ); + } + } + if (isPrivateIdentifier(name)) { + return idText(name).slice(1); + } + return idText(name); + } +}; +var IdentifierNameMultiMap = class extends IdentifierNameMap { + add(key, value) { + let values = this.get(key); + if (values) { + values.push(value); + } else { + this.set(key, values = [value]); + } + return values; + } + remove(key, value) { + const values = this.get(key); + if (values) { + unorderedRemoveItem(values, value); + if (!values.length) { + this.delete(key); + } + } + } +}; function isSimpleCopiableExpression(expression) { return isStringLiteralLike(expression) || expression.kind === 9 /* NumericLiteral */ || isKeyword(expression.kind) || isIdentifier(expression); } @@ -90096,14 +90843,23 @@ function getSuperCallFromStatement(statement) { const expression = skipParentheses(statement.expression); return isSuperCall(expression) ? expression : void 0; } -function findSuperStatementIndex(statements, indexAfterLastPrologueStatement) { - for (let i = indexAfterLastPrologueStatement; i < statements.length; i += 1) { +function findSuperStatementIndexPathWorker(statements, start2, indices) { + for (let i = start2; i < statements.length; i += 1) { const statement = statements[i]; if (getSuperCallFromStatement(statement)) { - return i; + indices.unshift(i); + return true; + } else if (isTryStatement(statement) && findSuperStatementIndexPathWorker(statement.tryBlock.statements, 0, indices)) { + indices.unshift(i); + return true; } } - return -1; + return false; +} +function findSuperStatementIndexPath(statements, start2) { + const indices = []; + findSuperStatementIndexPathWorker(statements, start2, indices); + return indices; } function getProperties(node, requireInitializer, isStatic2) { return filter(node.members, (m) => isInitializedOrStaticProperty(m, requireInitializer, isStatic2)); @@ -90121,7 +90877,7 @@ function isStaticPropertyDeclaration(member) { return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 171 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -90158,15 +90914,15 @@ function getAllDecoratorsOfClass(node) { } function getAllDecoratorsOfClassElement(member, parent2, useLegacyDecorators) { switch (member.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (!useLegacyDecorators) { return getAllDecoratorsOfMethod(member); } return getAllDecoratorsOfAccessors(member, parent2); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -90700,6 +91456,275 @@ function makeAssignmentElement(name) { return name; } +// src/compiler/transformers/classThis.ts +function createClassThisAssignmentBlock(factory2, classThis, thisExpression = factory2.createThis()) { + const expression = factory2.createAssignment(classThis, thisExpression); + const statement = factory2.createExpressionStatement(expression); + const body = factory2.createBlock( + [statement], + /*multiLine*/ + false + ); + const block = factory2.createClassStaticBlockDeclaration(body); + getOrCreateEmitNode(block).classThis = classThis; + return block; +} +function isClassThisAssignmentBlock(node) { + var _a; + if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { + return false; + } + const statement = node.body.statements[0]; + return isExpressionStatement(statement) && isAssignmentExpression( + statement.expression, + /*excludeCompoundAssignment*/ + true + ) && isIdentifier(statement.expression.left) && ((_a = node.emitNode) == null ? void 0 : _a.classThis) === statement.expression.left && statement.expression.right.kind === 110 /* ThisKeyword */; +} +function classHasClassThisAssignment(node) { + var _a; + return !!((_a = node.emitNode) == null ? void 0 : _a.classThis) && some(node.members, isClassThisAssignmentBlock); +} +function injectClassThisAssignmentIfMissing(factory2, node, classThis, thisExpression) { + if (classHasClassThisAssignment(node)) { + return node; + } + const staticBlock = createClassThisAssignmentBlock(factory2, classThis, thisExpression); + if (node.name) { + setSourceMapRange(staticBlock.body.statements[0], node.name); + } + const members = factory2.createNodeArray([staticBlock, ...node.members]); + setTextRange(members, node.members); + const updatedNode = isClassDeclaration(node) ? factory2.updateClassDeclaration( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ) : factory2.updateClassExpression( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ); + getOrCreateEmitNode(updatedNode).classThis = classThis; + return updatedNode; +} + +// src/compiler/transformers/namedEvaluation.ts +function getAssignedNameOfIdentifier(factory2, name, expression) { + const original = getOriginalNode(skipOuterExpressions(expression)); + if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 1024 /* Default */)) { + return factory2.createStringLiteral("default"); + } + return factory2.createStringLiteralFromNode(name); +} +function getAssignedNameOfPropertyName(context, name, assignedNameText) { + const { factory: factory2 } = context; + if (assignedNameText !== void 0) { + const assignedName2 = factory2.createStringLiteral(assignedNameText); + return { assignedName: assignedName2, name }; + } + if (isPropertyNameLiteral(name) || isPrivateIdentifier(name)) { + const assignedName2 = factory2.createStringLiteralFromNode(name); + return { assignedName: assignedName2, name }; + } + if (isPropertyNameLiteral(name.expression) && !isIdentifier(name.expression)) { + const assignedName2 = factory2.createStringLiteralFromNode(name.expression); + return { assignedName: assignedName2, name }; + } + const assignedName = factory2.getGeneratedNameForNode(name); + context.hoistVariableDeclaration(assignedName); + const key = context.getEmitHelperFactory().createPropKeyHelper(name.expression); + const assignment = factory2.createAssignment(assignedName, key); + const updatedName = factory2.updateComputedPropertyName(name, assignment); + return { assignedName, name: updatedName }; +} +function createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression = context.factory.createThis()) { + const { factory: factory2 } = context; + const expression = context.getEmitHelperFactory().createSetFunctionNameHelper(thisExpression, assignedName); + const statement = factory2.createExpressionStatement(expression); + const body = factory2.createBlock( + [statement], + /*multiLine*/ + false + ); + const block = factory2.createClassStaticBlockDeclaration(body); + getOrCreateEmitNode(block).assignedName = assignedName; + return block; +} +function isClassNamedEvaluationHelperBlock(node) { + var _a; + if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { + return false; + } + const statement = node.body.statements[0]; + return isExpressionStatement(statement) && isCallToHelper(statement.expression, "___setFunctionName") && statement.expression.arguments.length >= 2 && statement.expression.arguments[1] === ((_a = node.emitNode) == null ? void 0 : _a.assignedName); +} +function classHasExplicitlyAssignedName(node) { + var _a; + return !!((_a = node.emitNode) == null ? void 0 : _a.assignedName) && some(node.members, isClassNamedEvaluationHelperBlock); +} +function classHasDeclaredOrExplicitlyAssignedName(node) { + return !!node.name || classHasExplicitlyAssignedName(node); +} +function injectClassNamedEvaluationHelperBlockIfMissing(context, node, assignedName, thisExpression) { + if (classHasExplicitlyAssignedName(node)) { + return node; + } + const { factory: factory2 } = context; + const namedEvaluationBlock = createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression); + if (node.name) { + setSourceMapRange(namedEvaluationBlock.body.statements[0], node.name); + } + const insertionIndex = findIndex(node.members, isClassThisAssignmentBlock) + 1; + const leading = node.members.slice(0, insertionIndex); + const trailing = node.members.slice(insertionIndex); + const members = factory2.createNodeArray([...leading, namedEvaluationBlock, ...trailing]); + setTextRange(members, node.members); + node = isClassDeclaration(node) ? factory2.updateClassDeclaration( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ) : factory2.updateClassExpression( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ); + getOrCreateEmitNode(node).assignedName = assignedName; + return node; +} +function finishTransformNamedEvaluation(context, expression, assignedName, ignoreEmptyStringLiteral) { + if (ignoreEmptyStringLiteral && isStringLiteral(assignedName) && isEmptyStringLiteral(assignedName)) { + return expression; + } + const { factory: factory2 } = context; + const innerExpression = skipOuterExpressions(expression); + const updatedExpression = isClassExpression(innerExpression) ? cast(injectClassNamedEvaluationHelperBlockIfMissing(context, innerExpression, assignedName), isClassExpression) : context.getEmitHelperFactory().createSetFunctionNameHelper(innerExpression, assignedName); + return factory2.restoreOuterExpressions(expression, updatedExpression); +} +function transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updatePropertyAssignment( + node, + name, + initializer + ); +} +function transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.objectAssignmentInitializer); + const objectAssignmentInitializer = finishTransformNamedEvaluation(context, node.objectAssignmentInitializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateShorthandPropertyAssignment( + node, + node.name, + objectAssignmentInitializer + ); +} +function transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateVariableDeclaration( + node, + node.name, + node.exclamationToken, + node.type, + initializer + ); +} +function transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateParameterDeclaration( + node, + node.modifiers, + node.dotDotDotToken, + node.name, + node.questionToken, + node.type, + initializer + ); +} +function transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateBindingElement( + node, + node.dotDotDotToken, + node.propertyName, + node.name, + initializer + ); +} +function transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updatePropertyDeclaration( + node, + node.modifiers, + name, + node.questionToken ?? node.exclamationToken, + node.type, + initializer + ); +} +function transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.left, node.right); + const right = finishTransformNamedEvaluation(context, node.right, assignedName, ignoreEmptyStringLiteral); + return factory2.updateBinaryExpression( + node, + node.left, + node.operatorToken, + right + ); +} +function transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : factory2.createStringLiteral(node.isExportEquals ? "" : "default"); + const expression = finishTransformNamedEvaluation(context, node.expression, assignedName, ignoreEmptyStringLiteral); + return factory2.updateExportAssignment( + node, + node.modifiers, + expression + ); +} +function transformNamedEvaluation(context, node, ignoreEmptyStringLiteral, assignedName) { + switch (node.kind) { + case 303 /* PropertyAssignment */: + return transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedName); + case 304 /* ShorthandPropertyAssignment */: + return transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedName); + case 260 /* VariableDeclaration */: + return transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 169 /* Parameter */: + return transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 208 /* BindingElement */: + return transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedName); + case 172 /* PropertyDeclaration */: + return transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 226 /* BinaryExpression */: + return transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedName); + case 277 /* ExportAssignment */: + return transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedName); + } +} + // src/compiler/transformers/taggedTemplate.ts var ProcessLevel = /* @__PURE__ */ ((ProcessLevel2) => { ProcessLevel2[ProcessLevel2["LiftRestriction"] = 0] = "LiftRestriction"; @@ -90792,8 +91817,8 @@ function transformTypeScript(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -90804,14 +91829,14 @@ function transformTypeScript(context) { let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 312 /* Bundle */) { + if (node.kind === 313 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 314 /* InputFiles */) { + if (prepend.kind === 315 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -90842,22 +91867,22 @@ function transformTypeScript(context) { } function onBeforeVisitNode(node) { switch (node.kind) { - case 311 /* SourceFile */: - case 268 /* CaseBlock */: - case 267 /* ModuleBlock */: - case 240 /* Block */: + case 312 /* SourceFile */: + case 269 /* CaseBlock */: + case 268 /* ModuleBlock */: + case 241 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 262 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -90876,10 +91901,10 @@ function transformTypeScript(context) { } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -90894,13 +91919,13 @@ function transformTypeScript(context) { return node; } switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -90910,7 +91935,7 @@ function transformTypeScript(context) { return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 277 /* ExportDeclaration */ || node.kind === 271 /* ImportDeclaration */ || node.kind === 272 /* ImportClause */ || node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -90922,21 +91947,21 @@ function transformTypeScript(context) { } function classElementVisitorWorker(node, parent2) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructor(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent2); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return node; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -90947,15 +91972,15 @@ function transformTypeScript(context) { } function objectLiteralElementVisitorWorker(node, parent2) { switch (node.kind) { - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return visitor(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); default: return Debug.failBadSyntaxKind(node); @@ -90989,19 +92014,19 @@ function transformTypeScript(context) { case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: case 128 /* AbstractKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 87 /* ConstKeyword */: case 138 /* DeclareKeyword */: case 148 /* ReadonlyKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: - case 187 /* ArrayType */: - case 188 /* TupleType */: - case 189 /* OptionalType */: - case 190 /* RestType */: - case 186 /* TypeLiteral */: - case 181 /* TypePredicate */: - case 167 /* TypeParameter */: + case 188 /* ArrayType */: + case 189 /* TupleType */: + case 190 /* OptionalType */: + case 191 /* RestType */: + case 187 /* TypeLiteral */: + case 182 /* TypePredicate */: + case 168 /* TypeParameter */: case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 136 /* BooleanKeyword */: @@ -91010,80 +92035,80 @@ function transformTypeScript(context) { case 146 /* NeverKeyword */: case 116 /* VoidKeyword */: case 155 /* SymbolKeyword */: - case 184 /* ConstructorType */: - case 183 /* FunctionType */: - case 185 /* TypeQuery */: - case 182 /* TypeReference */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 193 /* ConditionalType */: - case 195 /* ParenthesizedType */: - case 196 /* ThisType */: - case 197 /* TypeOperator */: - case 198 /* IndexedAccessType */: - case 199 /* MappedType */: - case 200 /* LiteralType */: - case 180 /* IndexSignature */: + case 185 /* ConstructorType */: + case 184 /* FunctionType */: + case 186 /* TypeQuery */: + case 183 /* TypeReference */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 194 /* ConditionalType */: + case 196 /* ParenthesizedType */: + case 197 /* ThisType */: + case 198 /* TypeOperator */: + case 199 /* IndexedAccessType */: + case 200 /* MappedType */: + case 201 /* LiteralType */: + case 181 /* IndexSignature */: return void 0; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return void 0; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return visitHeritageClause(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return visitArrowFunction(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return visitAssertionExpression(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return visitNonNullExpression(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -91193,25 +92218,25 @@ function transformTypeScript(context) { insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); const iife = factory2.createImmediatelyInvokedArrowFunction(statements); setInternalEmitFlags(iife, 1 /* TypeScriptClassWrapper */); - const modifiers2 = facts & 16 /* IsNamedExternalExport */ ? factory2.createModifiersFromModifierFlags(1 /* Export */) : void 0; + const varDecl = factory2.createVariableDeclaration( + factory2.getLocalName( + node, + /*allowComments*/ + false, + /*allowSourceMaps*/ + false + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + iife + ); + setOriginalNode(varDecl, node); const varStatement = factory2.createVariableStatement( - modifiers2, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - false - ), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - iife - ) - ], 1 /* Let */) + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([varDecl], 1 /* Let */) ); setOriginalNode(varStatement, node); setCommentRange(varStatement, node); @@ -91240,10 +92265,10 @@ function transformTypeScript(context) { )) ]; } - if (facts & 16 /* IsNamedExternalExport */ && !promoteToIIFE) { + if (facts & 16 /* IsNamedExternalExport */) { return [ statement, - factory2.createExternalModuleExport(factory2.getLocalName( + factory2.createExternalModuleExport(factory2.getDeclarationName( node, /*allowComments*/ false, @@ -91407,19 +92432,19 @@ function transformTypeScript(context) { } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 171 /* PropertyDeclaration */; + return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 173 /* MethodDeclaration */; + return node.kind === 174 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; } return false; @@ -91468,7 +92493,7 @@ function transformTypeScript(context) { return !nodeIsMissing(node.body); } function visitPropertyDeclaration(node, parent2) { - const isAmbient = node.flags & 16777216 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); + const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); if (isAmbient && !(legacyDecorators && hasDecorators(node))) { return void 0; } @@ -91510,6 +92535,35 @@ function transformTypeScript(context) { transformConstructorBody(node.body, node) ); } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } function transformConstructorBody(body, constructor) { const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor)); if (!some(parametersWithPropertyAssignments)) { @@ -91524,25 +92578,22 @@ function transformTypeScript(context) { false, visitor ); - const superStatementIndex = findSuperStatementIndex(body.statements, prologueStatementCount); - if (superStatementIndex >= 0) { - addRange( + const superPath = findSuperStatementIndexPath(body.statements, prologueStatementCount); + const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment); + if (superPath.length) { + transformConstructorBodyWorker( statements, - visitNodes2(body.statements, visitor, isStatement, prologueStatementCount, superStatementIndex + 1 - prologueStatementCount) + body.statements, + prologueStatementCount, + superPath, + /*superPathDepth*/ + 0, + parameterPropertyAssignments ); - } - const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment); - if (superStatementIndex >= 0) { - addRange(statements, parameterPropertyAssignments); } else { - statements = [ - ...statements.slice(0, prologueStatementCount), - ...parameterPropertyAssignments, - ...statements.slice(prologueStatementCount) - ]; + addRange(statements, parameterPropertyAssignments); + addRange(statements, visitNodes2(body.statements, visitor, isStatement, prologueStatementCount)); } - const start2 = superStatementIndex >= 0 ? superStatementIndex + 1 : prologueStatementCount; - addRange(statements, visitNodes2(body.statements, visitor, isStatement, start2)); statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); const block = factory2.createBlock( setTextRange(factory2.createNodeArray(statements), body.statements), @@ -92038,7 +93089,7 @@ function transformTypeScript(context) { /*allowSourceMaps*/ true )); - const varFlags = currentLexicalScope.kind === 311 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; + const varFlags = currentLexicalScope.kind === 312 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; const statement = factory2.createVariableStatement( visitNodes2(node.modifiers, modifierVisitor, isModifier), factory2.createVariableDeclarationList([varDecl], varFlags) @@ -92049,7 +93100,7 @@ function transformTypeScript(context) { setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 265 /* EnumDeclaration */) { + if (node.kind === 266 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -92157,7 +93208,7 @@ function transformTypeScript(context) { let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 267 /* ModuleBlock */) { + if (node.body.kind === 268 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -92188,13 +93239,13 @@ function transformTypeScript(context) { true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 267 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 268 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 266 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -92229,7 +93280,7 @@ function transformTypeScript(context) { ) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 273 /* NamespaceImport */) { + if (node.kind === 274 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.verbatimModuleSyntax || compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -92427,15 +93478,15 @@ function transformTypeScript(context) { if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(266 /* ModuleDeclaration */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(267 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 266 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 267 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 265 /* EnumDeclaration */; + return getOriginalNode(node).kind === 266 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -92480,9 +93531,9 @@ function transformTypeScript(context) { switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -92497,8 +93548,8 @@ function transformTypeScript(context) { /*prefixLocals*/ false ); - if (container && container.kind !== 311 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 266 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 265 /* EnumDeclaration */; + if (container && container.kind !== 312 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 267 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 266 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -92523,7 +93574,7 @@ function transformTypeScript(context) { const constantValue = tryGetConstEnumValue(node); if (constantValue !== void 0) { setConstantValue(node, constantValue); - const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : factory2.createNumericLiteral(constantValue); + const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue); if (!compilerOptions.removeComments) { const originalNode = getOriginalNode(node, isAccessExpression); addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `); @@ -92578,8 +93629,9 @@ function transformClassFields(context) { let pendingStatements; let lexicalEnvironment; const lexicalEnvironmentMap = /* @__PURE__ */ new Map(); + const noSubstitution = /* @__PURE__ */ new Set(); let currentClassContainer; - let currentStaticPropertyDeclarationOrStaticBlock; + let currentClassElement; let shouldSubstituteThisWithClassThis = false; let previousShouldSubstituteThisWithClassThis = false; return chainBundle(context, transformSourceFile); @@ -92611,76 +93663,77 @@ function transformClassFields(context) { switch (node.kind) { case 129 /* AccessorKeyword */: return Debug.fail("Use `modifierVisitor` instead."); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: - return visitClassExpression( - node, - /*referencedName*/ - void 0 - ); - case 174 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: + case 231 /* ClassExpression */: + return visitClassExpression(node); + case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: return Debug.fail("Use `classElementVisitor` instead."); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return visitBindingElement(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); case 81 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ + case 110 /* ThisKeyword */: + return visitThisExpression(node); + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + return setCurrentClassElementAnd( + /*classElement*/ void 0, fallbackVisitor, node ); + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { + return setCurrentClassElementAnd( + node, + fallbackVisitor, + node + ); } default: return fallbackVisitor(node); @@ -92689,56 +93742,32 @@ function transformClassFields(context) { function fallbackVisitor(node) { return visitEachChild(node, visitor, context); } - function namedEvaluationVisitor(node, referencedName) { - switch (node.kind) { - case 359 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 216 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 230 /* ClassExpression */: - return visitClassExpression(node, referencedName); - default: - return visitor(node); - } - } function discardedValueVisitor(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - true, - /*referencedName*/ - void 0 + true ); default: return visitor(node); @@ -92746,9 +93775,9 @@ function transformClassFields(context) { } function heritageClauseVisitor(node) { switch (node.kind) { - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -92756,8 +93785,8 @@ function transformClassFields(context) { } function assignmentTargetVisitor(node) { switch (node.kind) { - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -92765,29 +93794,35 @@ function transformClassFields(context) { } function classElementVisitor(node) { switch (node.kind) { - case 175 /* Constructor */: - return visitConstructorDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ - void 0, + case 176 /* Constructor */: + return setCurrentClassElementAnd( + node, + visitConstructorDeclaration, + node + ); + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + return setCurrentClassElementAnd( + node, visitMethodOrAccessorDeclaration, node ); - case 171 /* PropertyDeclaration */: - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ - void 0, + case 172 /* PropertyDeclaration */: + return setCurrentClassElementAnd( + node, visitPropertyDeclaration, node ); - case 174 /* ClassStaticBlockDeclaration */: - return visitClassStaticBlockDeclaration(node); - case 166 /* ComputedPropertyName */: + case 175 /* ClassStaticBlockDeclaration */: + return setCurrentClassElementAnd( + node, + visitClassStaticBlockDeclaration, + node + ); + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return node; default: return isModifierLike(node) ? modifierVisitor(node) : visitor(node); @@ -92795,7 +93830,7 @@ function transformClassFields(context) { } function propertyNameVisitor(node) { switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); default: return visitor(node); @@ -92803,10 +93838,10 @@ function transformClassFields(context) { } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -92835,9 +93870,7 @@ function transformClassFields(context) { } function visitPropertyAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updatePropertyAssignment(node, name, initializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } @@ -92849,71 +93882,33 @@ function transformClassFields(context) { pendingStatements = savedPendingStatements; return statement; } - function getAssignedNameOfIdentifier(name, initializer) { - const originalClass = getOriginalNode(initializer, isClassLike); - return originalClass && !originalClass.name && hasSyntacticModifier(originalClass, 1024 /* Default */) ? factory2.createStringLiteral("default") : factory2.createStringLiteralFromNode(name); - } function visitVariableDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateVariableDeclaration( - node, - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitParameterDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitBindingElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const propertyName = visitNode(node.propertyName, visitor, isPropertyName); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBindingElement( - node, - /*dotDotDotToken*/ - void 0, - propertyName, - name, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitExportAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = factory2.createStringLiteral(node.isExportEquals ? "" : "default"); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const expression = visitNode(node.expression, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateExportAssignment(node, modifiers, expression); + node = transformNamedEvaluation( + context, + node, + /*ignoreEmptyStringLiteral*/ + true, + node.isExportEquals ? "" : "default" + ); } return visitEachChild(node, visitor, context); } @@ -92978,12 +93973,15 @@ function transformClassFields(context) { } return void 0; } - function setCurrentStaticPropertyDeclarationOrStaticBlockAnd(current, visitor2, arg) { - const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; - currentStaticPropertyDeclarationOrStaticBlock = current; - const result = visitor2(arg); - currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock; - return result; + function setCurrentClassElementAnd(classElement, visitor2, arg) { + if (classElement !== currentClassElement) { + const savedCurrentClassElement = currentClassElement; + currentClassElement = classElement; + const result = visitor2(arg); + currentClassElement = savedCurrentClassElement; + return result; + } + return visitor2(arg); } function getHoistedFunctionName(node) { Debug.assert(isPrivateIdentifier(node.name)); @@ -93001,6 +93999,11 @@ function transformClassFields(context) { } } } + function getClassThis() { + const lex = getClassLexicalEnvironment(); + const classThis = lex.classThis ?? lex.classConstructor ?? (currentClassContainer == null ? void 0 : currentClassContainer.name); + return Debug.checkDefined(classThis); + } function transformAutoAccessor(node) { const commentRange = getCommentRange(node); const sourceMapRange = getSourceMapRange(node); @@ -93027,11 +94030,13 @@ function transformClassFields(context) { setOriginalNode(backingField, node); setEmitFlags(backingField, 3072 /* NoComments */); setSourceMapRange(backingField, sourceMapRange); - const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName); + const receiver = isStatic(node) ? getClassThis() : factory2.createThis(); + const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName, receiver); setOriginalNode(getter, node); setCommentRange(getter, commentRange); setSourceMapRange(getter, sourceMapRange); - const setter = createAccessorPropertySetRedirector(factory2, node, modifiers, setterName); + const setterModifiers = factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers)); + const setter = createAccessorPropertySetRedirector(factory2, node, setterModifiers, setterName, receiver); setOriginalNode(setter, node); setEmitFlags(setter, 3072 /* NoComments */); setSourceMapRange(setter, sourceMapRange); @@ -93070,17 +94075,7 @@ function transformClassFields(context) { ); } if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - return factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - name, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, (child) => namedEvaluationVisitor(child, referencedName), isExpression) - ); + node = transformNamedEvaluation(context, node); } return factory2.updatePropertyDeclaration( node, @@ -93098,9 +94093,7 @@ function transformClassFields(context) { const expr = getPropertyNameExpressionIfNeeded( node.name, /*shouldHoist*/ - !!node.initializer || useDefineForClassFields, - /*captureReferencedName*/ - isNamedEvaluation(node, isAnonymousClassNeedingAssignedName) + !!node.initializer || useDefineForClassFields ); if (expr) { getPendingExpressions().push(...flattenCommaList(expr)); @@ -93145,8 +94138,21 @@ function transformClassFields(context) { } return transformFieldInitializer(node); } + function shouldForceDynamicThis() { + return !!currentClassElement && hasStaticModifier(currentClassElement) && isAccessor(currentClassElement) && isAutoAccessorPropertyDeclaration(getOriginalNode(currentClassElement)); + } + function ensureDynamicThisIfNeeded(node) { + if (shouldForceDynamicThis()) { + const innerExpression = skipOuterExpressions(node); + if (innerExpression.kind === 110 /* ThisKeyword */) { + noSubstitution.add(innerExpression); + } + } + } function createPrivateIdentifierAccess(info, receiver) { - return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression)); + receiver = visitNode(receiver, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); + return createPrivateIdentifierAccessHelper(info, receiver); } function createPrivateIdentifierAccessHelper(info, receiver) { setCommentRange(receiver, moveRangePos(receiver, -1)); @@ -93191,7 +94197,7 @@ function transformClassFields(context) { ); } } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && isIdentifier(node.name) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isIdentifier(node.name) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -93210,7 +94216,7 @@ function transformClassFields(context) { return visitEachChild(node, visitor, context); } function visitElementAccessExpression(node) { - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -93235,6 +94241,7 @@ function transformClassFields(context) { let info; if (info = accessPrivateIdentifier2(operand.name)) { const receiver = visitNode(operand.expression, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); let expression = createPrivateIdentifierAccess(info, readExpression); const temp = isPrefixUnaryExpression(node) || discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); @@ -93253,7 +94260,7 @@ function transformClassFields(context) { } return expression; } - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(operand) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(operand) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { const expression = visitInvalidSuperProperty(operand); @@ -93310,6 +94317,9 @@ function transformClassFields(context) { } function createCopiableReceiverExpr(receiver) { const clone2 = nodeIsSynthesized(receiver) ? receiver : factory2.cloneNode(receiver); + if (receiver.kind === 110 /* ThisKeyword */ && noSubstitution.has(receiver)) { + noSubstitution.add(clone2); + } if (isSimpleInlineableExpression(receiver)) { return { readExpression: clone2, initializeExpression: void 0 }; } @@ -93340,7 +94350,7 @@ function transformClassFields(context) { [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)] ); } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.expression) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { const invocation = factory2.createFunctionCallCall( visitNode(node.expression, visitor, isExpression), lexicalEnvironment.data.classConstructor, @@ -93369,7 +94379,7 @@ function transformClassFields(context) { visitNode(node.template, visitor, isTemplateLiteral) ); } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.tag) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { const invocation = factory2.createFunctionBindCall( visitNode(node.tag, visitor, isExpression), lexicalEnvironment.data.classConstructor, @@ -93392,30 +94402,40 @@ function transformClassFields(context) { lexicalEnvironmentMap.set(getOriginalNode(node), lexicalEnvironment); } if (shouldTransformPrivateElementsOrClassStaticBlocks) { + if (isClassThisAssignmentBlock(node)) { + const result = visitNode(node.body.statements[0].expression, visitor, isExpression); + if (isAssignmentExpression( + result, + /*excludeCompoundAssignment*/ + true + ) && result.left === result.right) { + return void 0; + } + return result; + } + if (isClassNamedEvaluationHelperBlock(node)) { + return visitNode(node.body.statements[0].expression, visitor, isExpression); + } startLexicalEnvironment(); - let statements = setCurrentStaticPropertyDeclarationOrStaticBlockAnd( + let statements = setCurrentClassElementAnd( node, (statements2) => visitNodes2(statements2, visitor, isStatement), node.body.statements ); statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); const iife = factory2.createImmediatelyInvokedArrowFunction(statements); + setOriginalNode(skipParentheses(iife.expression), node); + addEmitFlags(skipParentheses(iife.expression), 4 /* AdviseOnEmitNode */); setOriginalNode(iife, node); setTextRange(iife, node); - addEmitFlags(iife, 4 /* AdviseOnEmitNode */); return iife; } } function isAnonymousClassNeedingAssignedName(node) { if (isClassExpression(node) && !node.name) { const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - const classStaticBlock = find(staticPropertiesOrClassStaticBlocks, isClassStaticBlockDeclaration); - if (classStaticBlock) { - for (const statement of classStaticBlock.body.statements) { - if (isExpressionStatement(statement) && isCallToHelper(statement.expression, "___setFunctionName")) { - return false; - } - } + if (some(staticPropertiesOrClassStaticBlocks, isClassNamedEvaluationHelperBlock)) { + return false; } const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || !!(getInternalEmitFlags(node) && 32 /* TransformPrivateStaticElements */)) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2)); return hasTransformableStatics; @@ -93438,10 +94458,8 @@ function transformClassFields(context) { } if (isAssignmentExpression(node)) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const left2 = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left2, node.operatorToken, right); + node = transformNamedEvaluation(context, node); + Debug.assertNode(node, isAssignmentExpression); } const left = skipOuterExpressions(node.left, 8 /* PartiallyEmittedExpressions */ | 1 /* Parentheses */); if (isPrivateIdentifierPropertyAccessExpression(left)) { @@ -93455,7 +94473,7 @@ function transformClassFields(context) { node ); } - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.left) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.left) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return factory2.updateBinaryExpression( @@ -93520,36 +94538,15 @@ function transformClassFields(context) { const elements = discarded ? visitCommaListElements(node.elements, discardedValueVisitor) : visitCommaListElements(node.elements, visitor, discardedValueVisitor); return factory2.updateCommaListExpression(node, elements); } - function visitParenthesizedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitParenthesizedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updateParenthesizedExpression(node, expression); } - function visitPartiallyEmittedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; - const expression = visitNode(node.expression, visitorFunc, isExpression); - return factory2.updatePartiallyEmittedExpression(node, expression); - } - function visitReferencedPropertyName(node) { - if (isPropertyNameLiteral(node) || isPrivateIdentifier(node)) { - const referencedName2 = factory2.createStringLiteralFromNode(node); - const name2 = visitNode(node, visitor, isPropertyName); - return { referencedName: referencedName2, name: name2 }; - } - if (isPropertyNameLiteral(node.expression) && !isIdentifier(node.expression)) { - const referencedName2 = factory2.createStringLiteralFromNode(node.expression); - const name2 = visitNode(node, visitor, isPropertyName); - return { referencedName: referencedName2, name: name2 }; - } - const referencedName = factory2.createTempVariable(hoistVariableDeclaration); - const key = emitHelpers().createPropKeyHelper(visitNode(node.expression, visitor, isExpression)); - const assignment = factory2.createAssignment(referencedName, key); - const name = factory2.updateComputedPropertyName(node, injectPendingExpressions(assignment)); - return { referencedName, name }; - } function createPrivateIdentifierAssignment(info, receiver, right, operator) { receiver = visitNode(receiver, visitor, isExpression); right = visitNode(right, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); if (isCompoundAssignment(operator)) { const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); receiver = initializeExpression || readExpression; @@ -93596,11 +94593,15 @@ function transformClassFields(context) { return filter(node.members, isNonStaticMethodOrAccessorWithPrivateName); } function getClassFacts(node) { + var _a; let facts = 0 /* None */; const original = getOriginalNode(node); if (isClassDeclaration(original) && classOrConstructorParameterIsDecorated(legacyDecorators, original)) { facts |= 1 /* ClassWasDecorated */; } + if (shouldTransformPrivateElementsOrClassStaticBlocks && (classHasClassThisAssignment(node) || classHasExplicitlyAssignedName(node))) { + facts |= 2 /* NeedsClassConstructorReference */; + } let containsPublicInstanceFields = false; let containsInitializedPublicInstanceFields = false; let containsInstancePrivateElements = false; @@ -93609,6 +94610,8 @@ function transformClassFields(context) { if (isStatic(member)) { if (member.name && (isPrivateIdentifier(member.name) || isAutoAccessorPropertyDeclaration(member)) && shouldTransformPrivateElementsOrClassStaticBlocks) { facts |= 2 /* NeedsClassConstructorReference */; + } else if (isAutoAccessorPropertyDeclaration(member) && shouldTransformAutoAccessors === -1 /* True */ && !node.name && !((_a = node.emitNode) == null ? void 0 : _a.classThis)) { + facts |= 2 /* NeedsClassConstructorReference */; } if (isPropertyDeclaration(member) || isClassStaticBlockDeclaration(member)) { if (shouldTransformThisInStaticInitializers && member.transformFlags & 16384 /* ContainsLexicalThis */) { @@ -93629,6 +94632,9 @@ function transformClassFields(context) { containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member)); } else if (isPrivateIdentifierClassElementDeclaration(member)) { containsInstancePrivateElements = true; + if (resolver.getNodeCheckFlags(member) & 262144 /* ContainsConstructorReference */) { + facts |= 2 /* NeedsClassConstructorReference */; + } } else if (isPropertyDeclaration(member)) { containsPublicInstanceFields = true; containsInitializedPublicInstanceFields || (containsInitializedPublicInstanceFields = !!member.initializer); @@ -93663,7 +94669,8 @@ function transformClassFields(context) { } return visitEachChild(node, visitor, context); } - function visitInNewClassLexicalEnvironment(node, referencedName, visitor2) { + function visitInNewClassLexicalEnvironment(node, visitor2) { + var _a; const savedCurrentClassContainer = currentClassContainer; const savedPendingExpressions = pendingExpressions; const savedLexicalEnvironment = lexicalEnvironment; @@ -93675,6 +94682,15 @@ function transformClassFields(context) { const name = getNameOfDeclaration(node); if (name && isIdentifier(name)) { getPrivateIdentifierEnvironment().data.className = name; + } else if ((_a = node.emitNode) == null ? void 0 : _a.assignedName) { + if (isStringLiteral(node.emitNode.assignedName)) { + if (node.emitNode.assignedName.textSourceNode && isIdentifier(node.emitNode.assignedName.textSourceNode)) { + getPrivateIdentifierEnvironment().data.className = node.emitNode.assignedName.textSourceNode; + } else if (isIdentifierText(node.emitNode.assignedName.text, languageVersion)) { + const prefixName = factory2.createIdentifier(node.emitNode.assignedName.text); + getPrivateIdentifierEnvironment().data.className = prefixName; + } + } } } if (shouldTransformPrivateElementsOrClassStaticBlocks) { @@ -93693,7 +94709,7 @@ function transformClassFields(context) { if (facts & 8 /* NeedsSubstitutionForThisInClassStaticField */) { enableSubstitutionForClassStaticThisOrSuperReference(); } - const result = visitor2(node, facts, referencedName); + const result = visitor2(node, facts); endClassLexicalEnvironment(); Debug.assert(lexicalEnvironment === savedLexicalEnvironment); currentClassContainer = savedCurrentClassContainer; @@ -93701,12 +94717,7 @@ function transformClassFields(context) { return result; } function visitClassDeclaration(node) { - return visitInNewClassLexicalEnvironment( - node, - /*referencedName*/ - void 0, - visitClassDeclarationInNewClassLexicalEnvironment - ); + return visitInNewClassLexicalEnvironment(node, visitClassDeclarationInNewClassLexicalEnvironment); } function visitClassDeclarationInNewClassLexicalEnvironment(node, facts) { var _a, _b; @@ -93724,10 +94735,11 @@ function transformClassFields(context) { getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp); pendingClassReferenceAssignment = factory2.createAssignment(temp, factory2.getInternalName(node)); } - if ((_b = node.emitNode) == null ? void 0 : _b.classThis) { - getClassLexicalEnvironment().classThis = node.emitNode.classThis; - } } + if ((_b = node.emitNode) == null ? void 0 : _b.classThis) { + getClassLexicalEnvironment().classThis = node.emitNode.classThis; + } + const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */; const isExport = hasSyntacticModifier(node, 1 /* Export */); const isDefault = hasSyntacticModifier(node, 1024 /* Default */); let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); @@ -93762,6 +94774,11 @@ function transformClassFields(context) { ) )); } + const alias = getClassLexicalEnvironment().classConstructor; + if (isClassWithConstructorReference && alias) { + enableSubstitutionForClassAliases(); + classAliases[getOriginalNodeId(node)] = alias; + } const classDecl = factory2.updateClassDeclaration( node, modifiers, @@ -93777,24 +94794,27 @@ function transformClassFields(context) { } return statements; } - function visitClassExpression(node, referencedName) { - return visitInNewClassLexicalEnvironment(node, referencedName, visitClassExpressionInNewClassLexicalEnvironment); + function visitClassExpression(node) { + return visitInNewClassLexicalEnvironment(node, visitClassExpressionInNewClassLexicalEnvironment); } - function visitClassExpressionInNewClassLexicalEnvironment(node, facts, referencedName) { - var _a, _b, _c, _d; + function visitClassExpressionInNewClassLexicalEnvironment(node, facts) { + var _a, _b, _c; const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */); const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */; + const classCheckFlags = resolver.getNodeCheckFlags(node); + const isClassWithConstructorReference = classCheckFlags & 262144 /* ContainsConstructorReference */; let temp; function createClassTempVar() { var _a2; if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a2 = node.emitNode) == null ? void 0 : _a2.classThis)) { return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis; } - const classCheckFlags = resolver.getNodeCheckFlags(node); - const isClassWithConstructorReference2 = classCheckFlags & 1048576 /* ClassWithConstructorReference */; const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */; - const temp2 = factory2.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference2); + const temp2 = factory2.createTempVariable( + requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, + /*reservedInNestedScopes*/ + true + ); getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp2); return temp2; } @@ -93807,7 +94827,7 @@ function transformClassFields(context) { const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause); const { members, prologue } = transformClassMembers(node); - let classExpression = factory2.updateClassExpression( + const classExpression = factory2.updateClassExpression( node, modifiers, node.name, @@ -93821,41 +94841,18 @@ function transformClassFields(context) { expressions.push(prologue); } const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2)); - if (hasTransformableStatics || some(pendingExpressions) || referencedName) { + if (hasTransformableStatics || some(pendingExpressions)) { if (isDecoratedClassDeclaration) { Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); if (some(pendingExpressions)) { addRange(pendingStatements, map(pendingExpressions, factory2.createExpressionStatement)); } - if (referencedName) { - if (shouldTransformPrivateElementsOrClassStaticBlocks) { - const setNameExpression = emitHelpers().createSetFunctionNameHelper(temp ?? ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node), referencedName); - pendingStatements.push(factory2.createExpressionStatement(setNameExpression)); - } else { - const setNameExpression = emitHelpers().createSetFunctionNameHelper(factory2.createThis(), referencedName); - classExpression = factory2.updateClassExpression( - classExpression, - classExpression.modifiers, - classExpression.name, - classExpression.typeParameters, - classExpression.heritageClauses, - [ - factory2.createClassStaticBlockDeclaration( - factory2.createBlock([ - factory2.createExpressionStatement(setNameExpression) - ]) - ), - ...classExpression.members - ] - ); - } - } if (some(staticPropertiesOrClassStaticBlocks)) { - addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_c = node.emitNode) == null ? void 0 : _c.classThis) ?? factory2.getInternalName(node)); + addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node)); } if (temp) { expressions.push(factory2.createAssignment(temp, classExpression)); - } else if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_d = node.emitNode) == null ? void 0 : _d.classThis)) { + } else if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_c = node.emitNode) == null ? void 0 : _c.classThis)) { expressions.push(factory2.createAssignment(node.emitNode.classThis, classExpression)); } else { expressions.push(classExpression); @@ -93870,9 +94867,6 @@ function transformClassFields(context) { } expressions.push(factory2.createAssignment(temp, classExpression)); addRange(expressions, pendingExpressions); - if (referencedName) { - expressions.push(emitHelpers().createSetFunctionNameHelper(temp, referencedName)); - } addRange(expressions, generateInitializedPropertyExpressionsOrClassStaticBlock(staticPropertiesOrClassStaticBlocks, temp)); expressions.push(factory2.cloneNode(temp)); } @@ -93891,6 +94885,13 @@ function transformClassFields(context) { } return void 0; } + function visitThisExpression(node) { + if (shouldTransformThisInStaticInitializers && currentClassElement && isClassStaticBlockDeclaration(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + const { classThis, classConstructor } = lexicalEnvironment.data; + return classThis ?? classConstructor ?? node; + } + return node; + } function transformClassMembers(node) { const shouldTransformPrivateStaticElementsInClass = !!(getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */); if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformPrivateStaticElementsInFile) { @@ -93970,9 +94971,14 @@ function transformClassFields(context) { } if (syntheticConstructor || syntheticStaticBlock) { let membersArray; + const classThisAssignmentBlock = find(members, isClassThisAssignmentBlock); + const classNamedEvaluationHelperBlock = find(members, isClassNamedEvaluationHelperBlock); + membersArray = append(membersArray, classThisAssignmentBlock); + membersArray = append(membersArray, classNamedEvaluationHelperBlock); membersArray = append(membersArray, syntheticConstructor); membersArray = append(membersArray, syntheticStaticBlock); - membersArray = addRange(membersArray, members); + const remainingMembers = classThisAssignmentBlock || classNamedEvaluationHelperBlock ? filter(members, (member) => member !== classThisAssignmentBlock && member !== classNamedEvaluationHelperBlock) : members; + membersArray = addRange(membersArray, remainingMembers); members = setTextRange( factory2.createNodeArray(membersArray), /*location*/ @@ -94033,8 +95039,46 @@ function transformClassFields(context) { ) ); } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements, constructor) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + statementOffset = superStatementIndex + 1; + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements, + constructor + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + while (statementOffset < statementsIn.length) { + const statement = statementsIn[statementOffset]; + if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { + statementOffset++; + } else { + break; + } + } + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset)); + } function transformConstructorBody(node, constructor, isDerivedClass) { - var _a; const instanceProperties = getProperties( node, /*requireInitializer*/ @@ -94058,68 +95102,65 @@ function transformClassFields(context) { } resumeLexicalEnvironment(); const needsSyntheticConstructor = !constructor && isDerivedClass; - let indexOfFirstStatementAfterSuperAndPrologue = 0; - let prologueStatementCount = 0; - let superStatementIndex = -1; + let statementOffset = 0; let statements = []; - if ((_a = constructor == null ? void 0 : constructor.body) == null ? void 0 : _a.statements) { - prologueStatementCount = factory2.copyPrologue( + const initializerStatements = []; + const receiver = factory2.createThis(); + addInstanceMethodStatements(initializerStatements, privateMethodsAndAccessors, receiver); + if (constructor) { + const parameterProperties = filter(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); + const nonParameterProperties = filter(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); + addPropertyOrClassStaticBlockStatements(initializerStatements, parameterProperties, receiver); + addPropertyOrClassStaticBlockStatements(initializerStatements, nonParameterProperties, receiver); + } else { + addPropertyOrClassStaticBlockStatements(initializerStatements, properties, receiver); + } + if (constructor == null ? void 0 : constructor.body) { + statementOffset = factory2.copyPrologue( constructor.body.statements, statements, /*ensureUseStrict*/ false, visitor ); - superStatementIndex = findSuperStatementIndex(constructor.body.statements, prologueStatementCount); - if (superStatementIndex >= 0) { - indexOfFirstStatementAfterSuperAndPrologue = superStatementIndex + 1; - statements = [ - ...statements.slice(0, prologueStatementCount), - ...visitNodes2(constructor.body.statements, visitor, isStatement, prologueStatementCount, indexOfFirstStatementAfterSuperAndPrologue - prologueStatementCount), - ...statements.slice(prologueStatementCount) - ]; - } else if (prologueStatementCount >= 0) { - indexOfFirstStatementAfterSuperAndPrologue = prologueStatementCount; - } - } - if (needsSyntheticConstructor) { - statements.push( - factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createSuper(), - /*typeArguments*/ - void 0, - [factory2.createSpreadElement(factory2.createIdentifier("arguments"))] - ) - ) - ); - } - let parameterPropertyDeclarationCount = 0; - if (constructor == null ? void 0 : constructor.body) { - for (let i = indexOfFirstStatementAfterSuperAndPrologue; i < constructor.body.statements.length; i++) { - const statement = constructor.body.statements[i]; - if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { - parameterPropertyDeclarationCount++; - } else { - break; + const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, statementOffset); + if (superStatementIndices.length) { + transformConstructorBodyWorker( + statements, + constructor.body.statements, + statementOffset, + superStatementIndices, + /*superPathDepth*/ + 0, + initializerStatements, + constructor + ); + } else { + while (statementOffset < constructor.body.statements.length) { + const statement = constructor.body.statements[statementOffset]; + if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { + statementOffset++; + } else { + break; + } } + addRange(statements, initializerStatements); + addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, statementOffset)); } - if (parameterPropertyDeclarationCount > 0) { - indexOfFirstStatementAfterSuperAndPrologue += parameterPropertyDeclarationCount; - } - } - const receiver = factory2.createThis(); - addInstanceMethodStatements(statements, privateMethodsAndAccessors, receiver); - if (constructor) { - const parameterProperties = filter(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - const nonParameterProperties = filter(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - addPropertyOrClassStaticBlockStatements(statements, parameterProperties, receiver); - addPropertyOrClassStaticBlockStatements(statements, nonParameterProperties, receiver); } else { - addPropertyOrClassStaticBlockStatements(statements, properties, receiver); - } - if (constructor) { - addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, indexOfFirstStatementAfterSuperAndPrologue)); + if (needsSyntheticConstructor) { + statements.push( + factory2.createExpressionStatement( + factory2.createCallExpression( + factory2.createSuper(), + /*typeArguments*/ + void 0, + [factory2.createSpreadElement(factory2.createIdentifier("arguments"))] + ) + ) + ); + } + addRange(statements, initializerStatements); } statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); if (statements.length === 0 && !constructor) { @@ -94152,7 +95193,7 @@ function transformClassFields(context) { } } function transformPropertyOrClassStaticBlock(property, receiver) { - const expression = isClassStaticBlockDeclaration(property) ? transformClassStaticBlockDeclaration(property) : transformProperty(property, receiver); + const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : transformProperty(property, receiver); if (!expression) { return void 0; } @@ -94177,7 +95218,12 @@ function transformClassFields(context) { function generateInitializedPropertyExpressionsOrClassStaticBlock(propertiesOrClassStaticBlocks, receiver) { const expressions = []; for (const property of propertiesOrClassStaticBlocks) { - const expression = isClassStaticBlockDeclaration(property) ? transformClassStaticBlockDeclaration(property) : transformProperty(property, receiver); + const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : setCurrentClassElementAnd( + property, + () => transformProperty(property, receiver), + /*arg*/ + void 0 + ); if (!expression) { continue; } @@ -94192,7 +95238,7 @@ function transformClassFields(context) { } function transformProperty(property, receiver) { var _a; - const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; + const savedCurrentClassElement = currentClassElement; const transformed = transformPropertyWorker(property, receiver); if (transformed && hasStaticModifier(property) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.facts)) { setOriginalNode(transformed, property); @@ -94200,26 +95246,18 @@ function transformClassFields(context) { setSourceMapRange(transformed, getSourceMapRange(property.name)); lexicalEnvironmentMap.set(getOriginalNode(property), lexicalEnvironment); } - currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock; + currentClassElement = savedCurrentClassElement; return transformed; } function transformPropertyWorker(property, receiver) { const emitAssignment = !useDefineForClassFields; - let referencedName; if (isNamedEvaluation(property, isAnonymousClassNeedingAssignedName)) { - if (isPropertyNameLiteral(property.name) || isPrivateIdentifier(property.name)) { - referencedName = factory2.createStringLiteralFromNode(property.name); - } else if (isPropertyNameLiteral(property.name.expression) && !isIdentifier(property.name.expression)) { - referencedName = factory2.createStringLiteralFromNode(property.name.expression); - } else { - referencedName = factory2.getGeneratedNameForNode(property.name); - } + property = transformNamedEvaluation(context, property); } const propertyName = hasAccessorModifier(property) ? factory2.getGeneratedPrivateNameForNode(property.name) : isComputedPropertyName(property.name) && !isSimpleInlineableExpression(property.name.expression) ? factory2.updateComputedPropertyName(property.name, factory2.getGeneratedNameForNode(property.name)) : property.name; if (hasStaticModifier(property)) { - currentStaticPropertyDeclarationOrStaticBlock = property; + currentClassElement = property; } - const initializerVisitor = referencedName ? (child) => namedEvaluationVisitor(child, referencedName) : visitor; if (isPrivateIdentifier(propertyName) && shouldTransformClassElementToWeakMap(property)) { const privateIdentifierInfo = accessPrivateIdentifier2(propertyName); if (privateIdentifierInfo) { @@ -94228,14 +95266,14 @@ function transformClassFields(context) { return createPrivateInstanceFieldInitializer( factory2, receiver, - visitNode(property.initializer, initializerVisitor, isExpression), + visitNode(property.initializer, visitor, isExpression), privateIdentifierInfo.brandCheckIdentifier ); } else { return createPrivateStaticFieldInitializer( factory2, privateIdentifierInfo.variableName, - visitNode(property.initializer, initializerVisitor, isExpression) + visitNode(property.initializer, visitor, isExpression) ); } } else { @@ -94252,7 +95290,7 @@ function transformClassFields(context) { if (hasSyntacticModifier(propertyOriginalNode, 256 /* Abstract */)) { return void 0; } - let initializer = visitNode(property.initializer, initializerVisitor, isExpression); + let initializer = visitNode(property.initializer, visitor, isExpression); if (isParameterPropertyDeclaration(propertyOriginalNode, propertyOriginalNode.parent) && isIdentifier(propertyName)) { const localName = factory2.cloneNode(propertyName); if (initializer) { @@ -94297,14 +95335,14 @@ function transformClassFields(context) { if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(261 /* FunctionDeclaration */); - context.enableEmitNotification(217 /* FunctionExpression */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(171 /* PropertyDeclaration */); - context.enableEmitNotification(166 /* ComputedPropertyName */); + context.enableEmitNotification(262 /* FunctionDeclaration */); + context.enableEmitNotification(218 /* FunctionExpression */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(172 /* PropertyDeclaration */); + context.enableEmitNotification(167 /* ComputedPropertyName */); } } function addInstanceMethodStatements(statements, methods, receiver) { @@ -94330,10 +95368,10 @@ function transformClassFields(context) { visitNode(node.argumentExpression, visitor, isExpression) ); } - function getPropertyNameExpressionIfNeeded(name, shouldHoist, captureReferencedName) { + function getPropertyNameExpressionIfNeeded(name, shouldHoist) { if (isComputedPropertyName(name)) { const cacheAssignment = findComputedPropertyNameCacheAssignment(name); - let expression = visitNode(name.expression, visitor, isExpression); + const expression = visitNode(name.expression, visitor, isExpression); const innerExpression = skipPartiallyEmittedExpressions(expression); const inlinable = isSimpleInlineableExpression(innerExpression); const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left); @@ -94344,9 +95382,6 @@ function transformClassFields(context) { } else { hoistVariableDeclaration(generatedName); } - if (captureReferencedName) { - expression = emitHelpers().createPropKeyHelper(expression); - } return factory2.createAssignment(generatedName, expression); } return inlinable || isIdentifier(innerExpression) ? void 0 : expression; @@ -94542,7 +95577,7 @@ function transformClassFields(context) { } if (isPrivateIdentifierPropertyAccessExpression(node)) { return wrapPrivateIdentifierForDestructuringTarget(node); - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -94569,10 +95604,7 @@ function transformClassFields(context) { } function visitAssignmentElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const left = visitDestructuringAssignmentTarget(node.left); - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); + node = transformNamedEvaluation(context, node); } if (isAssignmentExpression( node, @@ -94619,9 +95651,7 @@ function transformClassFields(context) { } function visitShorthandAssignmentProperty(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.objectAssignmentInitializer); - const objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateShorthandPropertyAssignment(node, node.name, objectAssignmentInitializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } @@ -94671,16 +95701,16 @@ function transformClassFields(context) { return; } switch (node.kind) { - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) { break; } - case 261 /* FunctionDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: { + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { const savedLexicalEnvironment = lexicalEnvironment; const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; lexicalEnvironment = void 0; @@ -94692,7 +95722,7 @@ function transformClassFields(context) { lexicalEnvironment = savedLexicalEnvironment; return; } - case 166 /* ComputedPropertyName */: { + case 167 /* ComputedPropertyName */: { const savedLexicalEnvironment = lexicalEnvironment; const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; @@ -94722,11 +95752,8 @@ function transformClassFields(context) { return node; } function substituteThisExpression(node) { - if (enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */ && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */ && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) && !noSubstitution.has(node)) { const { facts, classConstructor, classThis } = lexicalEnvironment.data; - if (facts & 1 /* ClassWasDecorated */ && legacyDecorators) { - return factory2.createParenthesizedExpression(factory2.createVoidZero()); - } const substituteThis = shouldSubstituteThisWithClassThis ? classThis ?? classConstructor : classConstructor; if (substituteThis) { return setTextRange( @@ -94737,6 +95764,9 @@ function transformClassFields(context) { node ); } + if (facts & 1 /* ClassWasDecorated */ && legacyDecorators) { + return factory2.createParenthesizedExpression(factory2.createVoidZero()); + } } return node; } @@ -94745,7 +95775,7 @@ function transformClassFields(context) { } function trySubstituteClassAlias(node) { if (enabledSubstitutions & 1 /* ClassAliases */) { - if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) { + if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) { const declaration = resolver.getReferencedValueDeclaration(node); if (declaration) { const classAlias = classAliases[declaration.id]; @@ -94791,6 +95821,12 @@ function isReservedPrivateName(node) { function isPrivateIdentifierInExpression(node) { return isPrivateIdentifier(node.left) && node.operatorToken.kind === 103 /* InKeyword */; } +function isStaticPropertyDeclaration2(node) { + return isPropertyDeclaration(node) && hasStaticModifier(node); +} +function isStaticPropertyDeclarationOrClassStaticBlock(node) { + return isClassStaticBlockDeclaration(node) || isStaticPropertyDeclaration2(node); +} // src/compiler/transformers/typeSerializer.ts function createRuntimeTypeSerializer(context) { @@ -94826,15 +95862,15 @@ function createRuntimeTypeSerializer(context) { } function serializeTypeOfNode(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: return serializeTypeNode(node.type); - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 173 /* MethodDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 174 /* MethodDeclaration */: return factory2.createIdentifier("Function"); default: return factory2.createVoidZero(); @@ -94861,7 +95897,7 @@ function createRuntimeTypeSerializer(context) { return factory2.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 176 /* GetAccessor */) { + if (container && node.kind === 177 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -94887,72 +95923,72 @@ function createRuntimeTypeSerializer(context) { case 157 /* UndefinedKeyword */: case 146 /* NeverKeyword */: return factory2.createVoidZero(); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return factory2.createIdentifier("Function"); - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return factory2.createIdentifier("Array"); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean"); case 136 /* BooleanKeyword */: return factory2.createIdentifier("Boolean"); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: case 154 /* StringKeyword */: return factory2.createIdentifier("String"); case 151 /* ObjectKeyword */: return factory2.createIdentifier("Object"); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); case 150 /* NumberKeyword */: return factory2.createIdentifier("Number"); - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); case 155 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return serializeTypeReferenceNode(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ true ); - case 191 /* UnionType */: + case 192 /* UnionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ false ); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return serializeUnionOrIntersectionConstituents( [node.trueType, node.falseType], /*isIntersection*/ false ); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: if (node.operator === 148 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 185 /* TypeQuery */: - case 198 /* IndexedAccessType */: - case 199 /* MappedType */: - case 186 /* TypeLiteral */: + case 186 /* TypeQuery */: + case 199 /* IndexedAccessType */: + case 200 /* MappedType */: + case 187 /* TypeLiteral */: case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: - case 196 /* ThisType */: - case 204 /* ImportType */: + case 197 /* ThisType */: + case 205 /* ImportType */: break; - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: - case 323 /* JSDocFunctionType */: - case 324 /* JSDocVariadicType */: - case 325 /* JSDocNamepathType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: + case 324 /* JSDocFunctionType */: + case 325 /* JSDocVariadicType */: + case 326 /* JSDocNamepathType */: break; - case 320 /* JSDocNullableType */: - case 321 /* JSDocNonNullableType */: - case 322 /* JSDocOptionalType */: + case 321 /* JSDocNullableType */: + case 322 /* JSDocNonNullableType */: + case 323 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -94964,7 +96000,7 @@ function createRuntimeTypeSerializer(context) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return factory2.createIdentifier("String"); - case 223 /* PrefixUnaryExpression */: { + case 224 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 9 /* NumericLiteral */: @@ -95123,7 +96159,7 @@ function createRuntimeTypeSerializer(context) { name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -95173,23 +96209,23 @@ function transformLegacyDecorators(context) { return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructorDeclaration(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -95329,39 +96365,36 @@ function transformLegacyDecorators(context) { ); setOriginalNode(classExpression, node); setTextRange(classExpression, location); + const varInitializer = classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression; const varDecl = factory2.createVariableDeclaration( declName, /*exclamationToken*/ void 0, /*type*/ void 0, - classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression + varInitializer ); setOriginalNode(varDecl, node); - let varModifiers; - if (isExport && !isDefault) { - varModifiers = factory2.createModifiersFromModifierFlags(1 /* Export */); - } - const statement = factory2.createVariableStatement( - varModifiers, - factory2.createVariableDeclarationList([ - varDecl - ], 1 /* Let */) + const varDeclList = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); + const varStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + varDeclList ); - setOriginalNode(statement, node); - setTextRange(statement, location); - setCommentRange(statement, node); - const statements = [statement]; + setOriginalNode(varStatement, node); + setTextRange(varStatement, location); + setCommentRange(varStatement, node); + const statements = [varStatement]; addRange(statements, decorationStatements); addConstructorDecorationStatement(statements, node); - if (isExport && isDefault) { - statements.push(factory2.createExportAssignment( - /*modifiers*/ - void 0, - /*isExportEquals*/ - false, - declName - )); + if (isExport) { + if (isDefault) { + const exportStatement = factory2.createExportDefault(declName); + statements.push(exportStatement); + } else { + const exportStatement = factory2.createExternalModuleExport(factory2.getDeclarationName(node)); + statements.push(exportStatement); + } } return statements; } @@ -95428,7 +96461,7 @@ function transformLegacyDecorators(context) { ), node); } function visitPropertyDeclaration(node) { - if (node.flags & 16777216 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { + if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { return void 0; } return finishClassElement(factory2.updatePropertyDeclaration( @@ -95596,7 +96629,7 @@ function transformLegacyDecorators(context) { } } function getClassAliasIfNeeded(node) { - if (resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */) { + if (resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */) { enableSubstitutionForClassAliases(); const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default"); classAliases[getOriginalNodeId(node)] = classAlias; @@ -95629,7 +96662,7 @@ function transformLegacyDecorators(context) { } function trySubstituteClassAlias(node) { if (classAliases) { - if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) { + if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) { const declaration = resolver.getReferencedValueDeclaration(node); if (declaration) { const classAlias = classAliases[declaration.id]; @@ -95655,8 +96688,7 @@ function transformESDecorators(context) { endLexicalEnvironment, hoistVariableDeclaration } = context; - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); + const languageVersion = getEmitScriptTarget(context.getCompilerOptions()); let top; let classInfo; let classThis; @@ -95768,86 +96800,78 @@ function transformESDecorators(context) { return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return Debug.fail("Use `modifierVisitor` instead."); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: - return visitClassExpression( - node, - /*referencedName*/ - void 0 - ); - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: + case 231 /* ClassExpression */: + return visitClassExpression(node); + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return Debug.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return visitBindingElement(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); case 110 /* ThisKeyword */: return visitThisExpression(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ false ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: { + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: { enterOther(); const result = visitEachChild(node, fallbackVisitor, context); exitOther(); @@ -95859,7 +96883,7 @@ function transformESDecorators(context) { } function fallbackVisitor(node) { switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; default: return visitor(node); @@ -95867,7 +96891,7 @@ function transformESDecorators(context) { } function modifierVisitor(node) { switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; default: return node; @@ -95875,72 +96899,48 @@ function transformESDecorators(context) { } function classElementVisitor(node) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructorDeclaration(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); default: return visitor(node); } } - function namedEvaluationVisitor(node, referencedName) { - switch (node.kind) { - case 359 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 216 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 230 /* ClassExpression */: - return visitClassExpression(node, referencedName); - default: - return visitor(node); - } - } function discardedValueVisitor(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - true, - /*referencedName*/ - void 0 + true ); default: return visitor(node); @@ -95978,6 +96978,7 @@ function transformESDecorators(context) { ); } function createClassInfo(node) { + const metadataReference = factory2.createUniqueName("_metadata", 16 /* Optimistic */ | 32 /* FileLevel */); let instanceExtraInitializersName; let staticExtraInitializersName; let hasStaticInitializers = false; @@ -95991,13 +96992,15 @@ function transformESDecorators(context) { node )) { if (hasStaticModifier(member)) { - staticExtraInitializersName ?? (staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */)); + staticExtraInitializersName ?? (staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); } else { - instanceExtraInitializersName ?? (instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */)); + instanceExtraInitializersName ?? (instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); } } if (isClassStaticBlockDeclaration(member)) { - hasStaticInitializers = true; + if (!isClassNamedEvaluationHelperBlock(member)) { + hasStaticInitializers = true; + } } else if (isPropertyDeclaration(member)) { if (hasStaticModifier(member)) { hasStaticInitializers || (hasStaticInitializers = !!member.initializer || hasDecorators(member)); @@ -96014,6 +97017,7 @@ function transformESDecorators(context) { } return { class: node, + metadataReference, instanceExtraInitializersName, staticExtraInitializersName, hasStaticInitializers, @@ -96021,19 +97025,15 @@ function transformESDecorators(context) { hasStaticPrivateClassElements }; } - function containsLexicalSuperInStaticInitializer(node) { - for (const member of node.members) { - if (isClassStaticBlockDeclaration(member) || isPropertyDeclaration(member) && hasStaticModifier(member)) { - if (member.transformFlags & 134217728 /* ContainsLexicalSuper */) { - return true; - } - } - } - return false; - } - function transformClassLike(node, className) { - var _a; + function transformClassLike(node) { startLexicalEnvironment(); + if (!classHasDeclaredOrExplicitlyAssignedName(node) && classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + node + )) { + node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, factory2.createStringLiteral("")); + } const classReference = factory2.getLocalName( node, /*allowComments*/ @@ -96052,10 +97052,11 @@ function transformESDecorators(context) { let shouldTransformPrivateStaticElementsInClass = false; const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(node)); if (classDecorators) { - classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */); - classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */); - classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */); - classInfo2.classThis = factory2.createUniqueName("_classThis", 16 /* Optimistic */); + classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */); + const needsUniqueClassThis = some(node.members, (member) => (isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)); + classInfo2.classThis = factory2.createUniqueName("_classThis", needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */); classDefinitionStatements.push( createLet(classInfo2.classDecoratorsName, factory2.createArrayLiteralExpression(classDecorators)), createLet(classInfo2.classDescriptorName), @@ -96067,34 +97068,26 @@ function transformESDecorators(context) { shouldTransformPrivateStaticElementsInFile = true; } } - if (classDecorators && containsLexicalSuperInStaticInitializer(node)) { - const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); - const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); - const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); - if (extendsExpression) { - classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */); - const unwrapped = skipOuterExpressions(extendsExpression); - const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; - classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression)); - const updatedExtendsElement = factory2.updateExpressionWithTypeArguments( - extendsElement, - classInfo2.classSuper, - /*typeArguments*/ - void 0 - ); - const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]); - heritageClauses = factory2.createNodeArray([updatedExtendsClause]); - } - } else { - heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); + const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); + const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); + const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); + if (extendsExpression) { + classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */ | 32 /* FileLevel */); + const unwrapped = skipOuterExpressions(extendsExpression); + const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; + classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression)); + const updatedExtendsElement = factory2.updateExpressionWithTypeArguments( + extendsElement, + classInfo2.classSuper, + /*typeArguments*/ + void 0 + ); + const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]); + heritageClauses = factory2.createNodeArray([updatedExtendsClause]); } const renamedClassThis = classInfo2.classThis ?? factory2.createThis(); - const needsSetNameHelper = !((_a = getOriginalNode(node, isClassLike)) == null ? void 0 : _a.name) && (classDecorators || !isStringLiteral(className) || !isEmptyStringLiteral(className)); - if (needsSetNameHelper) { - const setNameExpr = emitHelpers().createSetFunctionNameHelper(factory2.createThis(), className); - leadingBlockStatements = append(leadingBlockStatements, factory2.createExpressionStatement(setNameExpr)); - } enterClass(classInfo2); + leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo2.metadataReference, classInfo2.classSuper)); let members = visitNodes2(node.members, classElementVisitor, isClassElement); if (pendingExpressions) { let outerThis; @@ -96192,15 +97185,15 @@ function transformESDecorators(context) { leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.nonStaticFieldDecorationStatements); if (classInfo2.classDescriptorName && classInfo2.classDecoratorsName && classInfo2.classExtraInitializersName && classInfo2.classThis) { leadingBlockStatements ?? (leadingBlockStatements = []); - const valueProperty = factory2.createPropertyAssignment("value", factory2.createThis()); + const valueProperty = factory2.createPropertyAssignment("value", renamedClassThis); const classDescriptor = factory2.createObjectLiteralExpression([valueProperty]); const classDescriptorAssignment = factory2.createAssignment(classInfo2.classDescriptorName, classDescriptor); - const classNameReference = factory2.createPropertyAccessExpression(factory2.createThis(), "name"); + const classNameReference = factory2.createPropertyAccessExpression(renamedClassThis, "name"); const esDecorateHelper2 = emitHelpers().createESDecorateHelper( factory2.createNull(), classDescriptorAssignment, classInfo2.classDecoratorsName, - { kind: "class", name: classNameReference }, + { kind: "class", name: classNameReference, metadata: classInfo2.metadataReference }, factory2.createNull(), classInfo2.classExtraInitializersName ); @@ -96212,6 +97205,7 @@ function transformESDecorators(context) { const classReferenceAssignment = factory2.createAssignment(classReference, classThisAssignment); leadingBlockStatements.push(factory2.createExpressionStatement(classReferenceAssignment)); } + leadingBlockStatements.push(createSymbolMetadata(renamedClassThis, classInfo2.metadataReference)); if (classInfo2.staticExtraInitializersName) { const runStaticInitializersHelper = emitHelpers().createRunInitializersHelper(renamedClassThis, classInfo2.staticExtraInitializersName); const runStaticInitializersStatement = factory2.createExpressionStatement(runStaticInitializersHelper); @@ -96228,32 +97222,35 @@ function transformESDecorators(context) { addRange(leadingBlockStatements, trailingBlockStatements); trailingBlockStatements = void 0; } - let newMembers = members; - if (leadingBlockStatements) { - const leadingStaticBlockBody = factory2.createBlock( - leadingBlockStatements, - /*multiLine*/ - true - ); - const leadingStaticBlock = factory2.createClassStaticBlockDeclaration(leadingStaticBlockBody); - if (shouldTransformPrivateStaticElementsInClass) { - setInternalEmitFlags(leadingStaticBlock, 32 /* TransformPrivateStaticElements */); - } - newMembers = [leadingStaticBlock, ...newMembers]; - } - if (syntheticConstructor) { - newMembers = [...newMembers, syntheticConstructor]; - } - if (trailingBlockStatements) { - const trailingStaticBlockBody = factory2.createBlock( - trailingBlockStatements, - /*multiLine*/ - true - ); - const trailingStaticBlock = factory2.createClassStaticBlockDeclaration(trailingStaticBlockBody); - newMembers = [...newMembers, trailingStaticBlock]; + const leadingStaticBlock = leadingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock( + leadingBlockStatements, + /*multiLine*/ + true + )); + if (leadingStaticBlock && shouldTransformPrivateStaticElementsInClass) { + setInternalEmitFlags(leadingStaticBlock, 32 /* TransformPrivateStaticElements */); } - if (newMembers !== members) { + const trailingStaticBlock = trailingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock( + trailingBlockStatements, + /*multiLine*/ + true + )); + if (leadingStaticBlock || syntheticConstructor || trailingStaticBlock) { + const newMembers = []; + const existingNamedEvaluationHelperBlockIndex = members.findIndex(isClassNamedEvaluationHelperBlock); + if (leadingStaticBlock) { + addRange(newMembers, members, 0, existingNamedEvaluationHelperBlockIndex + 1); + newMembers.push(leadingStaticBlock); + addRange(newMembers, members, existingNamedEvaluationHelperBlockIndex + 1); + } else { + addRange(newMembers, members); + } + if (syntheticConstructor) { + newMembers.push(syntheticConstructor); + } + if (trailingStaticBlock) { + newMembers.push(trailingStaticBlock); + } members = setTextRange(factory2.createNodeArray(newMembers), members); } const lexicalEnvironment = endLexicalEnvironment(); @@ -96269,6 +97266,9 @@ function transformESDecorators(context) { heritageClauses, members ); + if (classInfo2.classThis) { + classExpression = injectClassThisAssignmentIfMissing(factory2, classExpression, classInfo2.classThis); + } const classReferenceDeclaration = factory2.createVariableDeclaration( classReference, /*exclamationToken*/ @@ -96308,7 +97308,6 @@ function transformESDecorators(context) { } } setOriginalNode(classExpression, node); - getOrCreateEmitNode(classExpression).classThis = classInfo2.classThis; return factory2.createImmediatelyInvokedArrowFunction(factory2.mergeLexicalEnvironment(classDefinitionStatements, lexicalEnvironment)); } function isDecoratedClassLike(node) { @@ -96324,26 +97323,51 @@ function transformESDecorators(context) { } function visitClassDeclaration(node) { if (isDecoratedClassLike(node)) { - if (hasSyntacticModifier(node, 1 /* Export */) && hasSyntacticModifier(node, 1024 /* Default */)) { - const originalClass = getOriginalNode(node, isClassLike) ?? node; - const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); - const iife = transformClassLike(node, className); - const statement = factory2.createExportDefault(iife); - setOriginalNode(statement, node); - setCommentRange(statement, getCommentRange(node)); - setSourceMapRange(statement, moveRangePastDecorators(node)); - return statement; + const statements = []; + const originalClass = getOriginalNode(node, isClassLike) ?? node; + const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); + const isExport = hasSyntacticModifier(node, 1 /* Export */); + const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + if (!node.name) { + node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className); + } + if (isExport && isDefault) { + const iife = transformClassLike(node); + if (node.name) { + const varDecl = factory2.createVariableDeclaration( + factory2.getLocalName(node), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + iife + ); + setOriginalNode(varDecl, node); + const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); + const varStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + varDecls + ); + statements.push(varStatement); + const exportStatement = factory2.createExportDefault(factory2.getDeclarationName(node)); + setOriginalNode(exportStatement, node); + setCommentRange(exportStatement, getCommentRange(node)); + setSourceMapRange(exportStatement, moveRangePastDecorators(node)); + statements.push(exportStatement); + } else { + const exportStatement = factory2.createExportDefault(iife); + setOriginalNode(exportStatement, node); + setCommentRange(exportStatement, getCommentRange(node)); + setSourceMapRange(exportStatement, moveRangePastDecorators(node)); + statements.push(exportStatement); + } } else { Debug.assertIsDefined(node.name, "A class declaration that is not a default export must have a name."); - const iife = transformClassLike(node, factory2.createStringLiteralFromNode(node.name)); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const declName = languageVersion <= 2 /* ES2015 */ ? factory2.getInternalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ) : factory2.getLocalName( + const iife = transformClassLike(node); + const modifierVisitorNoExport = isExport ? (node2) => isExportModifier(node2) ? void 0 : modifierVisitor(node2) : modifierVisitor; + const modifiers = visitNodes2(node.modifiers, modifierVisitorNoExport, isModifier); + const declName = factory2.getLocalName( node, /*allowComments*/ false, @@ -96360,11 +97384,17 @@ function transformESDecorators(context) { ); setOriginalNode(varDecl, node); const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); - const statement = factory2.createVariableStatement(modifiers, varDecls); - setOriginalNode(statement, node); - setCommentRange(statement, getCommentRange(node)); - return statement; + const varStatement = factory2.createVariableStatement(modifiers, varDecls); + setOriginalNode(varStatement, node); + setCommentRange(varStatement, getCommentRange(node)); + statements.push(varStatement); + if (isExport) { + const exportStatement = factory2.createExternalModuleExport(declName); + setOriginalNode(exportStatement, node); + statements.push(exportStatement); + } } + return singleOrMany(statements); } else { const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); @@ -96385,10 +97415,9 @@ function transformESDecorators(context) { ); } } - function visitClassExpression(node, referencedName) { + function visitClassExpression(node) { if (isDecoratedClassLike(node)) { - const className = node.name ? factory2.createStringLiteralFromNode(node.name) : referencedName ?? factory2.createStringLiteral(""); - const iife = transformClassLike(node, className); + const iife = transformClassLike(node); setOriginalNode(iife, node); return iife; } else { @@ -96425,6 +97454,35 @@ function transformESDecorators(context) { return statements; } } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } function visitConstructorDeclaration(node) { enterClassElement(node); const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); @@ -96441,11 +97499,9 @@ function transformESDecorators(context) { false, visitor ); - const superStatementIndex = findSuperStatementIndex(node.body.statements, nonPrologueStart); - if (superStatementIndex >= 0) { - addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, nonPrologueStart, superStatementIndex + 1 - nonPrologueStart)); - addRange(statements, initializerStatements); - addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, superStatementIndex + 1)); + const superStatementIndices = findSuperStatementIndexPath(node.body.statements, nonPrologueStart); + if (superStatementIndices.length > 0) { + transformConstructorBodyWorker(statements, node.body.statements, nonPrologueStart, superStatementIndices, 0, initializerStatements); } else { addRange(statements, initializerStatements); addRange(statements, visitNodes2(node.body.statements, visitor, isStatement)); @@ -96470,7 +97526,7 @@ function transformESDecorators(context) { } return updated; } - function partialTransformClassElement(member, useNamedEvaluation, classInfo2, createDescriptor) { + function partialTransformClassElement(member, classInfo2, createDescriptor) { let referencedName; let name; let initializersName; @@ -96479,11 +97535,7 @@ function transformESDecorators(context) { if (!classInfo2) { const modifiers2 = visitNodes2(member.modifiers, modifierVisitor, isModifier); enterName(); - if (useNamedEvaluation) { - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - } else { - name = visitPropertyName(member.name); - } + name = visitPropertyName(member.name); exitName(); return { modifiers: modifiers2, referencedName, name, initializersName, descriptorName, thisArg }; } @@ -96532,9 +97584,10 @@ function transformESDecorators(context) { get: isPropertyDeclaration(member) || isGetAccessorDeclaration(member) || isMethodDeclaration(member), // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ... set: isPropertyDeclaration(member) || isSetAccessorDeclaration(member) - } + }, + metadata: classInfo2.metadataReference }; - const extraInitializers = isStatic(member) ? classInfo2.staticExtraInitializersName ?? (classInfo2.staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */)) : classInfo2.instanceExtraInitializersName ?? (classInfo2.instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */)); + const extraInitializers = isStatic(member) ? classInfo2.staticExtraInitializersName ?? (classInfo2.staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)) : classInfo2.instanceExtraInitializersName ?? (classInfo2.instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); if (isMethodOrAccessor(member)) { let descriptor; if (isPrivateIdentifierClassElementDeclaration(member) && createDescriptor) { @@ -96576,11 +97629,7 @@ function transformESDecorators(context) { } if (name === void 0) { enterName(); - if (useNamedEvaluation) { - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - } else { - name = visitPropertyName(member.name); - } + name = visitPropertyName(member.name); exitName(); } if (!some(modifiers) && (isMethodDeclaration(member) || isPropertyDeclaration(member))) { @@ -96590,13 +97639,7 @@ function transformESDecorators(context) { } function visitMethodDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createMethodDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createMethodDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createMethodDescriptorForwarder(modifiers, name, descriptorName), node); @@ -96622,13 +97665,7 @@ function transformESDecorators(context) { } function visitGetAccessorDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createGetAccessorDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createGetAccessorDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createGetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); @@ -96649,13 +97686,7 @@ function transformESDecorators(context) { } function visitSetAccessorDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createSetAccessorDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createSetAccessorDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createSetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); @@ -96668,19 +97699,31 @@ function transformESDecorators(context) { } function visitClassStaticBlockDeclaration(node) { enterClassElement(node); - if (classInfo) - classInfo.hasStaticInitializers = true; - const result = visitEachChild(node, visitor, context); + let result; + if (isClassNamedEvaluationHelperBlock(node)) { + result = visitEachChild(node, visitor, context); + } else if (isClassThisAssignmentBlock(node)) { + const savedClassThis = classThis; + classThis = void 0; + result = visitEachChild(node, visitor, context); + classThis = savedClassThis; + } else { + if (classInfo) + classInfo.hasStaticInitializers = true; + result = visitEachChild(node, visitor, context); + } exitClassElement(); return result; } function visitPropertyDeclaration(node) { + if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); + } enterClassElement(node); Debug.assert(!isAmbientPropertyDeclaration(node), "Not yet implemented."); - const useNamedEvaluation = isNamedEvaluation(node, isAnonymousClassNeedingAssignedName); - const { modifiers, name, referencedName, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, useNamedEvaluation, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : void 0); + const { modifiers, name, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : void 0); startLexicalEnvironment(); - let initializer = referencedName ? visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression) : visitNode(node.initializer, visitor, isExpression); + let initializer = visitNode(node.initializer, visitor, isExpression); if (initializersName) { initializer = emitHelpers().createRunInitializersHelper( thisArg ?? factory2.createThis(), @@ -96810,38 +97853,21 @@ function transformESDecorators(context) { return visitEachChild(node, visitor, context); } function visitParameterDeclaration(node) { - let updated; if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - updated = factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - initializer - ); - } else { - updated = factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - node.dotDotDotToken, - visitNode(node.name, visitor, isBindingName), - /*questionToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } + const updated = factory2.updateParameterDeclaration( + node, + /*modifiers*/ + void 0, + node.dotDotDotToken, + visitNode(node.name, visitor, isBindingName), + /*questionToken*/ + void 0, + /*type*/ + void 0, + visitNode(node.initializer, visitor, isExpression) + ); if (updated !== node) { setCommentRange(updated, node); setTextRange(updated, moveRangePastModifiers(node)); @@ -96853,6 +97879,14 @@ function transformESDecorators(context) { function isAnonymousClassNeedingAssignedName(node) { return isClassExpression(node) && !node.name && isDecoratedClassLike(node); } + function canIgnoreEmptyStringLiteralInAssignedName(node) { + const innerExpression = skipOuterExpressions(node); + return isClassExpression(innerExpression) && !innerExpression.name && !classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + innerExpression + ); + } function visitForStatement(node) { return factory2.updateForStatement( node, @@ -96873,10 +97907,8 @@ function transformESDecorators(context) { } if (isAssignmentExpression(node)) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const left = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); + return visitEachChild(node, visitor, context); } if (isSuperProperty(node.left) && classThis && classSuper) { let setterName = isElementAccessExpression(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0; @@ -96996,43 +98028,19 @@ function transformESDecorators(context) { } function visitPropertyAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updatePropertyAssignment(node, name, initializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } function visitVariableDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateVariableDeclaration( - node, - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } function visitBindingElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const propertyName = visitNode(node.propertyName, visitor, isPropertyName); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBindingElement( - node, - /*dotDotDotToken*/ - void 0, - propertyName, - name, - initializer - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } @@ -97069,14 +98077,11 @@ function transformESDecorators(context) { /*excludeCompoundAssignment*/ true )) { - const assignmentTarget = visitDestructuringAssignmentTarget(node.left); - let initializer; if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - initializer = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - } else { - initializer = visitNode(node.right, visitor, isExpression); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); } + const assignmentTarget = visitDestructuringAssignmentTarget(node.left); + const initializer = visitNode(node.right, visitor, isExpression); return factory2.updateBinaryExpression(node, assignmentTarget, node.operatorToken, initializer); } else { return visitDestructuringAssignmentTarget(node); @@ -97115,10 +98120,7 @@ function transformESDecorators(context) { } function visitShorthandAssignmentProperty(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.objectAssignmentInitializer); - const name = visitNode(node.name, visitor, isIdentifier); - const objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.objectAssignmentInitializer)); } return visitEachChild(node, visitor, context); } @@ -97150,20 +98152,17 @@ function transformESDecorators(context) { } function visitExportAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const referencedName = factory2.createStringLiteral(node.isExportEquals ? "" : "default"); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const expression = visitNode(node.expression, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updateExportAssignment(node, modifiers, expression); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.expression)); } return visitEachChild(node, visitor, context); } - function visitParenthesizedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitParenthesizedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updateParenthesizedExpression(node, expression); } - function visitPartiallyEmittedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitPartiallyEmittedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updatePartiallyEmittedExpression(node, expression); } @@ -97191,6 +98190,17 @@ function transformESDecorators(context) { function transformDecorator(decorator) { const expression = visitNode(decorator.expression, visitor, isExpression); setEmitFlags(expression, 3072 /* NoComments */); + const innerExpression = skipOuterExpressions(expression); + if (isAccessExpression(innerExpression)) { + const { target, thisArg } = factory2.createCallBinding( + expression, + hoistVariableDeclaration, + languageVersion, + /*cacheIdentifiers*/ + true + ); + return factory2.restoreOuterExpressions(expression, factory2.createFunctionBindCall(target, thisArg, [])); + } return expression; } function createDescriptorMethod(original, name, modifiers, asteriskToken, kind, parameters, body) { @@ -97376,9 +98386,59 @@ function transformESDecorators(context) { ]) ); } - function getAssignedNameOfIdentifier(name, initializer) { - const originalClass = getOriginalNode(initializer, isClassLike); - return originalClass && !originalClass.name && hasSyntacticModifier(originalClass, 1024 /* Default */) ? factory2.createStringLiteral("default") : factory2.createStringLiteralFromNode(name); + function createMetadata(name, classSuper2) { + const varDecl = factory2.createVariableDeclaration( + name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + factory2.createConditionalExpression( + factory2.createLogicalAnd( + factory2.createTypeCheck(factory2.createIdentifier("Symbol"), "function"), + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata") + ), + factory2.createToken(58 /* QuestionToken */), + factory2.createCallExpression( + factory2.createPropertyAccessExpression(factory2.createIdentifier("Object"), "create"), + /*typeArguments*/ + void 0, + [classSuper2 ? createSymbolMetadataReference(classSuper2) : factory2.createNull()] + ), + factory2.createToken(59 /* ColonToken */), + factory2.createVoidZero() + ) + ); + return factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([varDecl], 2 /* Const */) + ); + } + function createSymbolMetadata(target, value) { + const defineProperty = factory2.createObjectDefinePropertyCall( + target, + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata"), + factory2.createPropertyDescriptor( + { configurable: true, writable: true, enumerable: true, value }, + /*singleLine*/ + true + ) + ); + return setEmitFlags( + factory2.createIfStatement(value, factory2.createExpressionStatement(defineProperty)), + 1 /* SingleLine */ + ); + } + function createSymbolMetadataReference(classSuper2) { + return factory2.createBinaryExpression( + factory2.createElementAccessExpression( + classSuper2, + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata") + ), + 61 /* QuestionQuestionToken */, + factory2.createNull() + ); } } @@ -97456,34 +98516,34 @@ function transformES2017(context) { switch (node.kind) { case 134 /* AsyncKeyword */: return void 0; - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return visitAwaitExpression(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 175 /* Constructor */: + case 176 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -97492,27 +98552,27 @@ function transformES2017(context) { function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 240 /* Block */: - case 254 /* SwitchStatement */: - case 268 /* CaseBlock */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 257 /* TryStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 244 /* IfStatement */: - case 253 /* WithStatement */: - case 255 /* LabeledStatement */: + case 241 /* Block */: + case 255 /* SwitchStatement */: + case 269 /* CaseBlock */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 258 /* TryStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 245 /* IfStatement */: + case 254 /* WithStatement */: + case 256 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -97705,7 +98765,7 @@ function transformES2017(context) { } } function isVariableDeclarationListWithCollidingName(node) { - return !!node && isVariableDeclarationList(node) && !(node.flags & 3 /* BlockScoped */) && node.declarations.some(collidesWithParameterName); + return !!node && isVariableDeclarationList(node) && !(node.flags & 7 /* BlockScoped */) && node.declarations.some(collidesWithParameterName); } function visitVariableDeclarationListWithCollidingNames(node, hasReceiver) { hoistVariableDeclarationList(node); @@ -97789,7 +98849,7 @@ function transformES2017(context) { const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 218 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 219 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = /* @__PURE__ */ new Set(); @@ -97888,15 +98948,15 @@ function transformES2017(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); - context.enableEmitNotification(262 /* ClassDeclaration */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(242 /* VariableStatement */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableEmitNotification(263 /* ClassDeclaration */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(243 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -97927,11 +98987,11 @@ function transformES2017(context) { } function substituteExpression(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -97975,7 +99035,7 @@ function transformES2017(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 262 /* ClassDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -98215,119 +99275,119 @@ function transformES2018(context) { return node; } switch (node.kind) { - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return visitAwaitExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 248 /* ForInStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 249 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return visitVoidExpression(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -98412,7 +99472,7 @@ function transformES2018(context) { function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 249 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 250 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -98423,7 +99483,7 @@ function transformES2018(context) { let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 304 /* SpreadAssignment */) { + if (e.kind === 305 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -98431,7 +99491,7 @@ function transformES2018(context) { const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 302 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -98442,7 +99502,7 @@ function transformES2018(context) { function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 209 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -99211,15 +100271,15 @@ function transformES2018(context) { function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); - context.enableEmitNotification(262 /* ClassDeclaration */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(242 /* VariableStatement */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableEmitNotification(263 /* ClassDeclaration */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(243 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -99250,11 +100310,11 @@ function transformES2018(context) { } function substituteExpression(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -99298,7 +100358,7 @@ function transformES2018(context) { } function isSuperContainer(node) { const kind = node.kind; - return kind === 262 /* ClassDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -99343,7 +100403,7 @@ function transformES2019(context) { return node; } switch (node.kind) { - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -99382,7 +100442,7 @@ function transformES2020(context) { return node; } switch (node.kind) { - case 212 /* CallExpression */: { + case 213 /* CallExpression */: { const updated = visitNonOptionalCallExpression( node, /*captureThisArg*/ @@ -99391,8 +100451,8 @@ function transformES2020(context) { Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression( node, @@ -99405,12 +100465,12 @@ function transformES2020(context) { return updated; } return visitEachChild(node, visitor, context); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (node.operatorToken.kind === 61 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -99448,7 +100508,7 @@ function transformES2020(context) { thisArg = expression; } } - expression = node.kind === 210 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -99484,12 +100544,12 @@ function transformES2020(context) { } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -99515,8 +100575,8 @@ function transformES2020(context) { for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -99525,9 +100585,9 @@ function transformES2020(context) { thisArg = rightExpression; } } - rightExpression = segment.kind === 210 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -99698,22 +100758,636 @@ function transformES2021(context) { // src/compiler/transformers/esnext.ts function transformESNext(context) { + const { + factory: factory2, + getEmitHelperFactory: emitHelpers, + hoistVariableDeclaration, + startLexicalEnvironment, + endLexicalEnvironment + } = context; + let exportBindings; + let exportVars; + let defaultExportBinding; + let exportEqualsBinding; return chainBundle(context, transformSourceFile); function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } - return visitEachChild(node, visitor, context); + const visited = visitNode(node, visitor, isSourceFile); + addEmitHelpers(visited, context.readEmitHelpers()); + exportVars = void 0; + exportBindings = void 0; + defaultExportBinding = void 0; + return visited; } function visitor(node) { if ((node.transformFlags & 4 /* ContainsESNext */) === 0) { return node; } switch (node.kind) { + case 312 /* SourceFile */: + return visitSourceFile(node); + case 241 /* Block */: + return visitBlock(node); + case 248 /* ForStatement */: + return visitForStatement(node); + case 250 /* ForOfStatement */: + return visitForOfStatement(node); + case 255 /* SwitchStatement */: + return visitSwitchStatement(node); default: return visitEachChild(node, visitor, context); } } + function visitSourceFile(node) { + const usingKind = getUsingKindOfStatements(node.statements); + if (usingKind) { + startLexicalEnvironment(); + exportBindings = new IdentifierNameMap(); + exportVars = []; + const prologueCount = countPrologueStatements(node.statements); + const topLevelStatements = []; + addRange(topLevelStatements, visitArray(node.statements, visitor, isStatement, 0, prologueCount)); + let pos = prologueCount; + while (pos < node.statements.length) { + const statement = node.statements[pos]; + if (getUsingKind(statement) !== 0 /* None */) { + if (pos > prologueCount) { + addRange(topLevelStatements, visitNodes2(node.statements, visitor, isStatement, prologueCount, pos - prologueCount)); + } + break; + } + pos++; + } + Debug.assert(pos < node.statements.length, "Should have encountered at least one 'using' statement."); + const envBinding = createEnvBinding(); + const bodyStatements = transformUsingDeclarations(node.statements, pos, node.statements.length, envBinding, topLevelStatements); + if (exportBindings.size) { + append(topLevelStatements, factory2.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory2.createNamedExports(arrayFrom(exportBindings.values())) + )); + } + addRange(topLevelStatements, endLexicalEnvironment()); + if (exportVars.length) { + topLevelStatements.push(factory2.createVariableStatement( + factory2.createModifiersFromModifierFlags(1 /* Export */), + factory2.createVariableDeclarationList( + exportVars, + 1 /* Let */ + ) + )); + } + addRange(topLevelStatements, createDownlevelUsingStatements(bodyStatements, envBinding, usingKind === 2 /* Async */)); + if (exportEqualsBinding) { + topLevelStatements.push(factory2.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + true, + exportEqualsBinding + )); + } + return factory2.updateSourceFile(node, topLevelStatements); + } + return visitEachChild(node, visitor, context); + } + function visitBlock(node) { + const usingKind = getUsingKindOfStatements(node.statements); + if (usingKind) { + const prologueCount = countPrologueStatements(node.statements); + const envBinding = createEnvBinding(); + return factory2.updateBlock( + node, + [ + ...visitArray(node.statements, visitor, isStatement, 0, prologueCount), + ...createDownlevelUsingStatements( + transformUsingDeclarations( + node.statements, + prologueCount, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ), + envBinding, + usingKind === 2 /* Async */ + ) + ] + ); + } + return visitEachChild(node, visitor, context); + } + function visitForStatement(node) { + if (node.initializer && isUsingVariableDeclarationList(node.initializer)) { + return visitNode( + factory2.createBlock([ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + node.initializer + ), + factory2.updateForStatement( + node, + /*initializer*/ + void 0, + node.condition, + node.incrementor, + node.statement + ) + ]), + visitor, + isStatement + ); + } + return visitEachChild(node, visitor, context); + } + function visitForOfStatement(node) { + if (isUsingVariableDeclarationList(node.initializer)) { + const forInitializer = node.initializer; + Debug.assertNode(forInitializer, isUsingVariableDeclarationList); + Debug.assert(forInitializer.declarations.length === 1, "ForInitializer may only have one declaration"); + const forDecl = forInitializer.declarations[0]; + Debug.assert(!forDecl.initializer, "ForInitializer may not have an initializer"); + const isAwaitUsing = getUsingKindOfVariableDeclarationList(forInitializer) === 2 /* Async */; + const temp = factory2.getGeneratedNameForNode(forDecl.name); + const usingVar = factory2.updateVariableDeclaration( + forDecl, + forDecl.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + temp + ); + const usingVarList = factory2.createVariableDeclarationList([usingVar], isAwaitUsing ? 6 /* AwaitUsing */ : 4 /* Using */); + const usingVarStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + usingVarList + ); + return visitNode( + factory2.updateForOfStatement( + node, + node.awaitModifier, + factory2.createVariableDeclarationList([ + factory2.createVariableDeclaration(temp) + ], 2 /* Const */), + node.expression, + isBlock(node.statement) ? factory2.updateBlock(node.statement, [ + usingVarStatement, + ...node.statement.statements + ]) : factory2.createBlock( + [ + usingVarStatement, + node.statement + ], + /*multiLine*/ + true + ) + ), + visitor, + isStatement + ); + } + return visitEachChild(node, visitor, context); + } + function visitCaseOrDefaultClause(node, envBinding) { + if (getUsingKindOfStatements(node.statements) !== 0 /* None */) { + if (isCaseClause(node)) { + return factory2.updateCaseClause( + node, + visitNode(node.expression, visitor, isExpression), + transformUsingDeclarations( + node.statements, + /*start*/ + 0, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ) + ); + } else { + return factory2.updateDefaultClause( + node, + transformUsingDeclarations( + node.statements, + /*start*/ + 0, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ) + ); + } + } + return visitEachChild(node, visitor, context); + } + function visitSwitchStatement(node) { + const usingKind = getUsingKindOfCaseOrDefaultClauses(node.caseBlock.clauses); + if (usingKind) { + const envBinding = createEnvBinding(); + return createDownlevelUsingStatements( + [ + factory2.updateSwitchStatement( + node, + visitNode(node.expression, visitor, isExpression), + factory2.updateCaseBlock( + node.caseBlock, + node.caseBlock.clauses.map((clause) => visitCaseOrDefaultClause(clause, envBinding)) + ) + ) + ], + envBinding, + usingKind === 2 /* Async */ + ); + } + return visitEachChild(node, visitor, context); + } + function transformUsingDeclarations(statementsIn, start2, end, envBinding, topLevelStatements) { + const statements = []; + for (let i = start2; i < end; i++) { + const statement = statementsIn[i]; + const usingKind = getUsingKind(statement); + if (usingKind) { + Debug.assertNode(statement, isVariableStatement); + const declarations = []; + for (let declaration of statement.declarationList.declarations) { + if (!isIdentifier(declaration.name)) { + declarations.length = 0; + break; + } + if (isNamedEvaluation(declaration)) { + declaration = transformNamedEvaluation(context, declaration); + } + const initializer = visitNode(declaration.initializer, visitor, isExpression) ?? factory2.createVoidZero(); + declarations.push(factory2.updateVariableDeclaration( + declaration, + declaration.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + emitHelpers().createAddDisposableResourceHelper( + envBinding, + initializer, + usingKind === 2 /* Async */ + ) + )); + } + if (declarations.length) { + const varList = factory2.createVariableDeclarationList(declarations, 2 /* Const */); + setOriginalNode(varList, statement.declarationList); + setTextRange(varList, statement.declarationList); + hoistOrAppendNode(factory2.updateVariableStatement( + statement, + /*modifiers*/ + void 0, + varList + )); + continue; + } + } + const result = visitor(statement); + if (isArray(result)) { + result.forEach(hoistOrAppendNode); + } else if (result) { + hoistOrAppendNode(result); + } + } + return statements; + function hoistOrAppendNode(node) { + Debug.assertNode(node, isStatement); + append(statements, hoist(node)); + } + function hoist(node) { + if (!topLevelStatements) + return node; + switch (node.kind) { + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 262 /* FunctionDeclaration */: + return hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements); + case 277 /* ExportAssignment */: + return hoistExportAssignment(node); + case 263 /* ClassDeclaration */: + return hoistClassDeclaration(node); + case 243 /* VariableStatement */: + return hoistVariableStatement(node); + } + return node; + } + } + function hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements) { + topLevelStatements.push(node); + return void 0; + } + function hoistExportAssignment(node) { + return node.isExportEquals ? hoistExportEquals(node) : hoistExportDefault(node); + } + function hoistExportDefault(node) { + if (defaultExportBinding) { + return node; + } + defaultExportBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistBindingIdentifier( + defaultExportBinding, + /*isExport*/ + true, + "default", + node + ); + let expression = node.expression; + let innerExpression = skipOuterExpressions(expression); + if (isNamedEvaluation(innerExpression)) { + innerExpression = transformNamedEvaluation( + context, + innerExpression, + /*ignoreEmptyStringLiteral*/ + false, + "default" + ); + expression = factory2.restoreOuterExpressions(expression, innerExpression); + } + const assignment = factory2.createAssignment(defaultExportBinding, expression); + return factory2.createExpressionStatement(assignment); + } + function hoistExportEquals(node) { + if (exportEqualsBinding) { + return node; + } + exportEqualsBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistVariableDeclaration(exportEqualsBinding); + const assignment = factory2.createAssignment(exportEqualsBinding, node.expression); + return factory2.createExpressionStatement(assignment); + } + function hoistClassDeclaration(node) { + if (!node.name && defaultExportBinding) { + return node; + } + const isExported2 = hasSyntacticModifier(node, 1 /* Export */); + const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + let expression = factory2.converters.convertToClassExpression(node); + if (node.name) { + hoistBindingIdentifier( + factory2.getLocalName(node), + isExported2 && !isDefault, + /*exportAlias*/ + void 0, + node + ); + expression = factory2.createAssignment(factory2.getDeclarationName(node), expression); + if (isNamedEvaluation(expression)) { + expression = transformNamedEvaluation( + context, + expression, + /*ignoreEmptyStringLiteral*/ + false + ); + } + setOriginalNode(expression, node); + setSourceMapRange(expression, node); + setCommentRange(expression, node); + } + if (isDefault && !defaultExportBinding) { + defaultExportBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistBindingIdentifier( + defaultExportBinding, + /*isExport*/ + true, + "default", + node + ); + expression = factory2.createAssignment(defaultExportBinding, expression); + if (isNamedEvaluation(expression)) { + expression = transformNamedEvaluation( + context, + expression, + /*ignoreEmptyStringLiteral*/ + false, + "default" + ); + } + setOriginalNode(expression, node); + } + return factory2.createExpressionStatement(expression); + } + function hoistVariableStatement(node) { + let expressions; + const isExported2 = hasSyntacticModifier(node, 1 /* Export */); + for (const variable of node.declarationList.declarations) { + hoistBindingElement(variable, isExported2, variable); + if (variable.initializer) { + expressions = append(expressions, hoistInitializedVariable(variable)); + } + } + if (expressions) { + const statement = factory2.createExpressionStatement(factory2.inlineExpressions(expressions)); + setOriginalNode(statement, node); + setCommentRange(statement, node); + setSourceMapRange(statement, node); + return statement; + } + return void 0; + } + function hoistInitializedVariable(node) { + Debug.assertIsDefined(node.initializer); + let target; + if (isIdentifier(node.name)) { + target = factory2.cloneNode(node.name); + setEmitFlags(target, getEmitFlags(target) & ~(32768 /* LocalName */ | 16384 /* ExportName */ | 65536 /* InternalName */)); + } else { + target = factory2.converters.convertToAssignmentPattern(node.name); + } + const assignment = factory2.createAssignment(target, node.initializer); + setOriginalNode(assignment, node); + setCommentRange(assignment, node); + setSourceMapRange(assignment, node); + return assignment; + } + function hoistBindingElement(node, isExportedDeclaration, original) { + if (isBindingPattern(node.name)) { + for (const element of node.name.elements) { + if (!isOmittedExpression(element)) { + hoistBindingElement(element, isExportedDeclaration, original); + } + } + } else { + hoistBindingIdentifier( + node.name, + isExportedDeclaration, + /*exportAlias*/ + void 0, + original + ); + } + } + function hoistBindingIdentifier(node, isExport, exportAlias, original) { + const name = isGeneratedIdentifier(node) ? node : factory2.cloneNode(node); + if (isExport) { + if (exportAlias === void 0 && !isLocalName(name)) { + const varDecl = factory2.createVariableDeclaration(name); + if (original) { + setOriginalNode(varDecl, original); + } + exportVars.push(varDecl); + return; + } + const localName = exportAlias !== void 0 ? name : void 0; + const exportName = exportAlias !== void 0 ? exportAlias : name; + const specifier = factory2.createExportSpecifier( + /*isTypeOnly*/ + false, + localName, + exportName + ); + if (original) { + setOriginalNode(specifier, original); + } + exportBindings.set(name, specifier); + } + hoistVariableDeclaration(name); + } + function createEnvBinding() { + return factory2.createUniqueName("env"); + } + function createDownlevelUsingStatements(bodyStatements, envBinding, async) { + const statements = []; + const envObject = factory2.createObjectLiteralExpression([ + factory2.createPropertyAssignment("stack", factory2.createArrayLiteralExpression()), + factory2.createPropertyAssignment("error", factory2.createVoidZero()), + factory2.createPropertyAssignment("hasError", factory2.createFalse()) + ]); + const envVar = factory2.createVariableDeclaration( + envBinding, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + envObject + ); + const envVarList = factory2.createVariableDeclarationList([envVar], 2 /* Const */); + const envVarStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + envVarList + ); + statements.push(envVarStatement); + const tryBlock = factory2.createBlock( + bodyStatements, + /*multiLine*/ + true + ); + const bodyCatchBinding = factory2.createUniqueName("e"); + const catchClause = factory2.createCatchClause( + bodyCatchBinding, + factory2.createBlock( + [ + factory2.createExpressionStatement( + factory2.createAssignment( + factory2.createPropertyAccessExpression(envBinding, "error"), + bodyCatchBinding + ) + ), + factory2.createExpressionStatement( + factory2.createAssignment( + factory2.createPropertyAccessExpression(envBinding, "hasError"), + factory2.createTrue() + ) + ) + ], + /*multiLine*/ + true + ) + ); + let finallyBlock; + if (async) { + const result = factory2.createUniqueName("result"); + finallyBlock = factory2.createBlock( + [ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([ + factory2.createVariableDeclaration( + result, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + emitHelpers().createDisposeResourcesHelper(envBinding) + ) + ], 2 /* Const */) + ), + factory2.createIfStatement(result, factory2.createExpressionStatement(factory2.createAwaitExpression(result))) + ], + /*multiLine*/ + true + ); + } else { + finallyBlock = factory2.createBlock( + [ + factory2.createExpressionStatement( + emitHelpers().createDisposeResourcesHelper(envBinding) + ) + ], + /*multiLine*/ + true + ); + } + const tryStatement = factory2.createTryStatement(tryBlock, catchClause, finallyBlock); + statements.push(tryStatement); + return statements; + } +} +function countPrologueStatements(statements) { + for (let i = 0; i < statements.length; i++) { + if (!isPrologueDirective(statements[i]) && !isCustomPrologue(statements[i])) { + return i; + } + } + return 0; +} +function isUsingVariableDeclarationList(node) { + return isVariableDeclarationList(node) && getUsingKindOfVariableDeclarationList(node) !== 0 /* None */; +} +function getUsingKindOfVariableDeclarationList(node) { + return (node.flags & 7 /* BlockScoped */) === 6 /* AwaitUsing */ ? 2 /* Async */ : (node.flags & 7 /* BlockScoped */) === 4 /* Using */ ? 1 /* Sync */ : 0 /* None */; +} +function getUsingKindOfVariableStatement(node) { + return getUsingKindOfVariableDeclarationList(node.declarationList); +} +function getUsingKind(statement) { + return isVariableStatement(statement) ? getUsingKindOfVariableStatement(statement) : 0 /* None */; +} +function getUsingKindOfStatements(statements) { + let result = 0 /* None */; + for (const statement of statements) { + const usingKind = getUsingKind(statement); + if (usingKind === 2 /* Async */) + return 2 /* Async */; + if (usingKind > result) + result = usingKind; + } + return result; +} +function getUsingKindOfCaseOrDefaultClauses(clauses) { + let result = 0 /* None */; + for (const clause of clauses) { + const usingKind = getUsingKindOfStatements(clause.statements); + if (usingKind === 2 /* Async */) + return 2 /* Async */; + if (usingKind > result) + result = usingKind; + } + return result; } // src/compiler/transformers/jsx.ts @@ -99867,25 +101541,25 @@ function transformJsx(context) { } function visitorWorker(node) { switch (node.kind) { - case 283 /* JsxElement */: + case 284 /* JsxElement */: return visitJsxElement( node, /*isChild*/ false ); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ false ); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ false ); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -99895,21 +101569,21 @@ function transformJsx(context) { switch (node.kind) { case 12 /* JsxText */: return visitJsxText(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return visitJsxExpression(node); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return visitJsxElement( node, /*isChild*/ true ); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ true ); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ @@ -100117,10 +101791,10 @@ function transformJsx(context) { for (const prop of attr.expression.properties) { if (isSpreadAssignment(prop)) { finishObjectLiteralIfNeeded(); - expressions.push(prop.expression); + expressions.push(Debug.checkDefined(visitNode(prop.expression, visitor, isExpression))); continue; } - properties.push(prop); + properties.push(Debug.checkDefined(visitNode(prop, visitor))); } continue; } @@ -100159,7 +101833,7 @@ function transformJsx(context) { const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 293 /* JsxExpression */) { + if (node.kind === 294 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -100233,7 +101907,7 @@ function transformJsx(context) { return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 283 /* JsxElement */) { + if (node.kind === 284 /* JsxElement */) { return getTagName(node.openingElement); } else { const tagName = node.tagName; @@ -100533,7 +102207,7 @@ function transformES2016(context) { return node; } switch (node.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -100661,7 +102335,7 @@ function transformES2015(context) { hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 252 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -100728,85 +102402,85 @@ function transformES2015(context) { switch (node.kind) { case 126 /* StaticKeyword */: return void 0; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return visitArrowFunction(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); case 80 /* Identifier */: return visitIdentifier(node); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock( node, /*isFunctionBody*/ false ); - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return visitDoOrWhileStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 15 /* NoSubstitutionTemplateLiteral */: case 16 /* TemplateHead */: @@ -100817,13 +102491,13 @@ function transformES2015(context) { return visitStringLiteral(node); case 9 /* NumericLiteral */: return visitNumericLiteral(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return visitTemplateExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return visitSpreadElement(node); case 108 /* SuperKeyword */: return visitSuperKeyword( @@ -100832,18 +102506,18 @@ function transformES2015(context) { ); case 110 /* ThisKeyword */: return visitThisKeyword(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return visitMetaProperty(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return visitAccessorDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -100941,7 +102615,7 @@ function transformES2015(context) { return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments")); } } - if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) { + if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { return setOriginalNode(setTextRange( factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), node @@ -100951,13 +102625,13 @@ function transformES2015(context) { } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 251 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 252 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump; if (!canUseBreakOrContinue) { let labelMarker; const label = node.label; if (!label) { - if (node.kind === 251 /* BreakStatement */) { + if (node.kind === 252 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -100965,7 +102639,7 @@ function transformES2015(context) { labelMarker = "continue"; } } else { - if (node.kind === 251 /* BreakStatement */) { + if (node.kind === 252 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump( convertedLoopState, @@ -101171,6 +102845,104 @@ function transformES2015(context) { setEmitFlags(block, 3072 /* NoComments */); return block; } + function transformConstructorBodyWorker(prologueOut, statementsOut, statementsIn, statementOffset, superPath, superPathDepth, constructor, isDerivedClass, hasSynthesizedSuper, isFirstStatement) { + let mayReplaceThis = false; + const superStatementIndex = superPathDepth < superPath.length ? superPath[superPathDepth] : -1; + const leadingStatementsEnd = superStatementIndex >= 0 ? superStatementIndex : statementsIn.length; + if (isFirstStatement && superStatementIndex >= 0) { + let firstMaterialIndex = statementOffset; + while (isFirstStatement && firstMaterialIndex < superStatementIndex) { + const statement = constructor.body.statements[firstMaterialIndex]; + if (!isUninitializedVariableStatement(statement) && !isUsingDeclarationStateVariableStatement(statement)) + break; + firstMaterialIndex++; + } + isFirstStatement = superStatementIndex === firstMaterialIndex; + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, leadingStatementsEnd - statementOffset)); + const superStatement = superStatementIndex >= 0 ? statementsIn[superStatementIndex] : void 0; + if (superStatement && isTryStatement(superStatement)) { + const tryBlockStatements = []; + mayReplaceThis = transformConstructorBodyWorker( + prologueOut, + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + constructor, + isDerivedClass, + hasSynthesizedSuper, + isFirstStatement + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + const superCall = superStatement && getSuperCallFromStatement(superStatement); + let superCallExpression; + if (hasSynthesizedSuper) { + superCallExpression = createDefaultSuperCallOrThis(); + hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + } else if (superCall) { + superCallExpression = visitSuperCallInBody(superCall); + hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + } + if (isDerivedClass || superCallExpression) { + if (superCallExpression && superStatementIndex === statementsIn.length - 1 && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { + const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); + const returnStatement = factory2.createReturnStatement(superCallExpression); + setCommentRange(returnStatement, getCommentRange(superCall2)); + setEmitFlags(superCall2, 3072 /* NoComments */); + statementsOut.push(returnStatement); + return false; + } else { + if (isFirstStatement) { + insertCaptureThisForNode(statementsOut, constructor, superCallExpression || createActualThis()); + } else { + insertCaptureThisForNode(prologueOut, constructor, createActualThis()); + if (superCallExpression) { + addSuperThisCaptureThisForNode(statementsOut, superCallExpression); + } + } + mayReplaceThis = true; + } + } else { + insertCaptureThisForNodeIfNeeded(prologueOut, constructor); + } + } + if (superStatementIndex >= 0) { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } + return mayReplaceThis; + } + function isUninitializedVariableStatement(node) { + return isVariableStatement(node) && every(node.declarationList.declarations, (decl) => isIdentifier(decl.name) && !decl.initializer); + } + function isUsingDeclarationStateVariableStatement(node) { + if (!isVariableStatement(node) || node.declarationList.declarations.length !== 1) + return false; + const varDecl = node.declarationList.declarations[0]; + if (!isIdentifier(varDecl.name) || !varDecl.initializer) + return false; + const initializer = varDecl.initializer; + if (!isObjectLiteralExpression(initializer) || initializer.properties.length !== 3) + return false; + const [stackProp, errorProp, hasErrorProp] = initializer.properties; + if (!isPropertyAssignment(stackProp) || !isIdentifier(stackProp.name) || idText(stackProp.name) !== "stack" || !isArrayLiteralExpression(stackProp.initializer)) + return false; + if (!isPropertyAssignment(errorProp) || !isIdentifier(errorProp.name) || idText(errorProp.name) !== "error" || !isVoidExpression(errorProp.initializer) || !isNumericLiteral(errorProp.initializer.expression)) + return false; + if (!isPropertyAssignment(hasErrorProp) || !isIdentifier(hasErrorProp.name) || idText(hasErrorProp.name) !== "hasError" || hasErrorProp.initializer.kind !== 97 /* FalseKeyword */) + return false; + return true; + } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */; if (!constructor) @@ -101178,82 +102950,43 @@ function transformES2015(context) { const prologue = []; const statements = []; resumeLexicalEnvironment(); - const existingPrologue = takeWhile(constructor.body.statements, isPrologueDirective); - const { superCall, superStatementIndex } = findSuperCallAndStatementIndex(constructor.body.statements, existingPrologue); - const postSuperStatementsStart = superStatementIndex === -1 ? existingPrologue.length : superStatementIndex + 1; - let statementOffset = postSuperStatementsStart; - if (!hasSynthesizedSuper) - statementOffset = factory2.copyStandardPrologue( - constructor.body.statements, - prologue, - statementOffset, - /*ensureUseStrict*/ - false - ); - if (!hasSynthesizedSuper) - statementOffset = factory2.copyCustomPrologue( - constructor.body.statements, - statements, - statementOffset, - visitor, - /*filter*/ - void 0 - ); - let superCallExpression; - if (hasSynthesizedSuper) { - superCallExpression = createDefaultSuperCallOrThis(); - } else if (superCall) { - superCallExpression = visitSuperCallInBody(superCall); - } - if (superCallExpression) { + const standardPrologueEnd = factory2.copyStandardPrologue( + constructor.body.statements, + prologue, + /*statementOffset*/ + 0 + ); + const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, standardPrologueEnd); + if (hasSynthesizedSuper || superStatementIndices.length > 0) { hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; } - addDefaultValueAssignmentsIfNeeded2(prologue, constructor); - addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); - addRange(statements, visitNodes2( - constructor.body.statements, - visitor, - isStatement, - /*start*/ - statementOffset - )); - factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded( + const mayReplaceThis = transformConstructorBodyWorker( prologue, + statements, + constructor.body.statements, + standardPrologueEnd, + superStatementIndices, + /*superPathDepth*/ + 0, constructor, - /*copyOnWrite*/ - false + isDerivedClass, + hasSynthesizedSuper, + /*isFirstStatement*/ + true + // NOTE: this will be recalculated inside of transformConstructorBodyWorker ); - if (isDerivedClass || superCallExpression) { - if (superCallExpression && postSuperStatementsStart === constructor.body.statements.length && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { - const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); - const returnStatement = factory2.createReturnStatement(superCallExpression); - setCommentRange(returnStatement, getCommentRange(superCall2)); - setEmitFlags(superCall2, 3072 /* NoComments */); - statements.push(returnStatement); - } else { - if (superStatementIndex <= existingPrologue.length) { - insertCaptureThisForNode(statements, constructor, superCallExpression || createActualThis()); - } else { - insertCaptureThisForNode(prologue, constructor, createActualThis()); - if (superCallExpression) { - insertSuperThisCaptureThisForNode(statements, superCallExpression); - } - } - if (!isSufficientlyCoveredByReturnStatements(constructor.body)) { - statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); - } - } - } else { - insertCaptureThisForNodeIfNeeded(prologue, constructor); + addDefaultValueAssignmentsIfNeeded2(prologue, constructor); + addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); + insertCaptureNewTargetIfNeeded(prologue, constructor); + factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); + if (mayReplaceThis && !isSufficientlyCoveredByReturnStatements(constructor.body)) { + statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); } const body = factory2.createBlock( setTextRange( factory2.createNodeArray( [ - ...existingPrologue, ...prologue, - ...superStatementIndex <= existingPrologue.length ? emptyArray : visitNodes2(constructor.body.statements, visitor, isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length), ...statements ] ), @@ -101266,29 +102999,15 @@ function transformES2015(context) { setTextRange(body, constructor.body); return body; } - function findSuperCallAndStatementIndex(originalBodyStatements, existingPrologue) { - for (let i = existingPrologue.length; i < originalBodyStatements.length; i += 1) { - const superCall = getSuperCallFromStatement(originalBodyStatements[i]); - if (superCall) { - return { - superCall, - superStatementIndex: i - }; - } - } - return { - superStatementIndex: -1 - }; - } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 252 /* ReturnStatement */) { + if (statement.kind === 253 /* ReturnStatement */) { return true; - } else if (statement.kind === 244 /* IfStatement */) { + } else if (statement.kind === 245 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 240 /* Block */) { + } else if (statement.kind === 241 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -101562,13 +103281,13 @@ function transformES2015(context) { return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 218 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } return false; } - function insertSuperThisCaptureThisForNode(statements, superExpression) { + function addSuperThisCaptureThisForNode(statements, superExpression) { enableSubstitutionsForCapturedThis(); const assignSuperExpression = factory2.createExpressionStatement( factory2.createBinaryExpression( @@ -101577,7 +103296,7 @@ function transformES2015(context) { superExpression ) ); - insertStatementAfterCustomPrologue(statements, assignSuperExpression); + statements.push(assignSuperExpression); setCommentRange(assignSuperExpression, getOriginalNode(superExpression).parent); } function insertCaptureThisForNode(statements, node, initializer) { @@ -101600,25 +103319,25 @@ function transformES2015(context) { setSourceMapRange(captureThisStatement, node); insertStatementAfterCustomPrologue(statements, captureThisStatement); } - function insertCaptureNewTargetIfNeeded(statements, node, copyOnWrite) { + function insertCaptureNewTargetIfNeeded(statements, node) { if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return statements; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 175 /* Constructor */: + case 176 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), "constructor" ); break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), @@ -101657,9 +103376,6 @@ function transformES2015(context) { ]) ); setEmitFlags(captureNewTargetStatement, 3072 /* NoComments */ | 2097152 /* CustomPrologue */); - if (copyOnWrite) { - statements = statements.slice(); - } insertStatementAfterCustomPrologue(statements, captureNewTargetStatement); } return statements; @@ -101667,21 +103383,21 @@ function transformES2015(context) { function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 175 /* Constructor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -101888,7 +103604,7 @@ function transformES2015(context) { const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -101949,7 +103665,7 @@ function transformES2015(context) { multiLine = true; } } else { - Debug.assert(node.kind === 218 /* ArrowFunction */); + Debug.assert(node.kind === 219 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -101968,12 +103684,7 @@ function transformES2015(context) { closeBraceLocation = body; } factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded( - prologue, - node, - /*copyOnWrite*/ - false - ); + insertCaptureNewTargetIfNeeded(prologue, node); insertCaptureThisForNodeIfNeeded(prologue, node); if (some(prologue)) { multiLine = true; @@ -102051,7 +103762,7 @@ function transformES2015(context) { function visitVariableStatement(node) { const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); let updated; - if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { + if (convertedLoopState && (node.declarationList.flags & 7 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { let assignments; for (const decl of node.declarationList.declarations) { hoistVariableDeclarationDeclaredInConvertedLoop(convertedLoopState, decl); @@ -102083,8 +103794,8 @@ function transformES2015(context) { return updated; } function visitVariableDeclarationList(node) { - if (node.flags & 3 /* BlockScoped */ || node.transformFlags & 524288 /* ContainsBindingPattern */) { - if (node.flags & 3 /* BlockScoped */) { + if (node.flags & 7 /* BlockScoped */ || node.transformFlags & 524288 /* ContainsBindingPattern */) { + if (node.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration); @@ -102175,14 +103886,14 @@ function transformES2015(context) { } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -102238,7 +103949,7 @@ function transformES2015(context) { const statements = []; const initializer = node.initializer; if (isVariableDeclarationList(initializer)) { - if (node.initializer.flags & 3 /* BlockScoped */) { + if (node.initializer.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } const firstOriginalDeclaration = firstOrUndefined(initializer.declarations); @@ -102532,7 +104243,7 @@ function transformES2015(context) { let numInitialProperties = -1, hasComputed = false; for (let i = 0; i < properties.length; i++) { const property = properties[i]; - if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 166 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -102654,15 +104365,15 @@ function transformES2015(context) { } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -102714,18 +104425,18 @@ function transformES2015(context) { function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 260 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 261 /* VariableDeclarationList */) { loopInitializer = initializer; } break; } const loopParameters = []; const loopOutParameters = []; - if (loopInitializer && getCombinedNodeFlags(loopInitializer) & 3 /* BlockScoped */) { + if (loopInitializer && getCombinedNodeFlags(loopInitializer) & 7 /* BlockScoped */) { const hasCapturedBindingsInForHead = shouldConvertInitializerOfForStatement(node) || shouldConvertConditionOfForStatement(node) || shouldConvertIncrementorOfForStatement(node); for (const decl of loopInitializer.declarations) { processLoopVariableDeclaration(node, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForHead); @@ -103133,10 +104844,10 @@ function transformES2015(context) { name )); const checkFlags = resolver.getNodeCheckFlags(decl); - if (checkFlags & 262144 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) { + if (checkFlags & 65536 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) { const outParamName = factory2.createUniqueName("out_" + idText(name)); let flags = 0 /* None */; - if (checkFlags & 262144 /* NeedsLoopOutParameter */) { + if (checkFlags & 65536 /* NeedsLoopOutParameter */) { flags |= 1 /* Body */; } if (isForStatement(container)) { @@ -103157,20 +104868,20 @@ function transformES2015(context) { for (let i = start2; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -103296,7 +105007,7 @@ function transformES2015(context) { let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (node.kind === 176 /* GetAccessor */) { + if (node.kind === 177 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -103660,13 +105371,13 @@ function transformES2015(context) { if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(218 /* ArrowFunction */); - context.enableEmitNotification(217 /* FunctionExpression */); - context.enableEmitNotification(261 /* FunctionDeclaration */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(219 /* ArrowFunction */); + context.enableEmitNotification(218 /* FunctionExpression */); + context.enableEmitNotification(262 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -103690,10 +105401,10 @@ function transformES2015(context) { } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 260 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -103750,11 +105461,11 @@ function transformES2015(context) { return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 243 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 244 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 212 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; @@ -103762,7 +105473,7 @@ function transformES2015(context) { return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 229 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 230 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -103779,24 +105490,24 @@ function transformES5(context) { if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(285 /* JsxOpeningElement */); - context.enableEmitNotification(286 /* JsxClosingElement */); - context.enableEmitNotification(284 /* JsxSelfClosingElement */); + context.enableEmitNotification(286 /* JsxOpeningElement */); + context.enableEmitNotification(287 /* JsxClosingElement */); + context.enableEmitNotification(285 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(302 /* PropertyAssignment */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(303 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: + case 285 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -103922,13 +105633,13 @@ function transformGenerators(context) { } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -103936,24 +105647,24 @@ function transformGenerators(context) { } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return visitAccessorDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return visitBreakStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return visitContinueStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -103967,23 +105678,23 @@ function transformGenerators(context) { } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return visitConditionalExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -103991,9 +105702,9 @@ function transformGenerators(context) { } function visitGenerator(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -104178,14 +105889,14 @@ function transformGenerators(context) { if (containsYield(right)) { let target; switch (left.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), left.name ); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), @@ -104518,35 +106229,35 @@ function transformGenerators(context) { } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 240 /* Block */: + case 241 /* Block */: return transformAndEmitBlock(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return transformAndEmitIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return transformAndEmitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return transformAndEmitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return transformAndEmitWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -104898,7 +106609,7 @@ function transformGenerators(context) { for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 296 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 297 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -104908,7 +106619,7 @@ function transformGenerators(context) { let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -105875,12 +107586,12 @@ function transformModule(context) { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(214 /* TaggedTemplateExpression */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(215 /* TaggedTemplateExpression */); context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(225 /* BinaryExpression */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(226 /* BinaryExpression */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(312 /* SourceFile */); const moduleInfoMap = []; let currentSourceFile; let currentModuleInfo; @@ -105892,7 +107603,7 @@ function transformModule(context) { return node; } currentSourceFile = node; - currentModuleInfo = collectExternalModuleInfo(context, node, resolver, compilerOptions); + currentModuleInfo = collectExternalModuleInfo(context, node); moduleInfoMap[getOriginalNodeId(node)] = currentModuleInfo; const transformModule2 = getTransformModuleDelegate(moduleKind); const updated = transformModule2(node); @@ -106292,63 +108003,59 @@ function transformModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: - return visitImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: - return visitExportDeclaration(node); - case 276 /* ExportAssignment */: - return visitExportAssignment(node); - case 261 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: - return visitClassDeclaration(node); + case 272 /* ImportDeclaration */: + return visitTopLevelImportDeclaration(node); + case 271 /* ImportEqualsDeclaration */: + return visitTopLevelImportEqualsDeclaration(node); + case 278 /* ExportDeclaration */: + return visitTopLevelExportDeclaration(node); + case 277 /* ExportAssignment */: + return visitTopLevelExportAssignment(node); default: return topLevelNestedVisitor(node); } } function topLevelNestedVisitor(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return visitWithStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return visitIfStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return visitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return visitDefaultClause(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return visitTryStatement(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock(node); default: return visitor(node); @@ -106359,30 +108066,30 @@ function transformModule(context) { return node; } switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -106405,24 +108112,24 @@ function transformModule(context) { if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -106450,7 +108157,7 @@ function transformModule(context) { return visitEachChild(node, visitor, context); } function visitForStatement(node, isTopLevel) { - if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -106491,7 +108198,7 @@ function transformModule(context) { ); } function visitForInStatement(node) { - if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -106519,7 +108226,7 @@ function transformModule(context) { ); } function visitForOfStatement(node) { - if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -106899,7 +108606,7 @@ function transformModule(context) { } return innerExpr; } - function visitImportDeclaration(node) { + function visitTopLevelImportDeclaration(node) { let statements; const namespaceDeclaration = getNamespaceDeclarationNode(node); if (moduleKind !== 2 /* AMD */) { @@ -107008,7 +108715,7 @@ function transformModule(context) { args ); } - function visitImportEqualsDeclaration(node) { + function visitTopLevelImportEqualsDeclaration(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); let statements; if (moduleKind !== 2 /* AMD */) { @@ -107076,7 +108783,7 @@ function transformModule(context) { statements = appendExportsOfImportEqualsDeclaration(statements, node); return singleOrMany(statements); } - function visitExportDeclaration(node) { + function visitTopLevelExportDeclaration(node) { if (!node.moduleSpecifier) { return void 0; } @@ -107178,7 +108885,7 @@ function transformModule(context) { ); } } - function visitExportAssignment(node) { + function visitTopLevelExportAssignment(node) { if (node.isExportEquals) { return void 0; } @@ -107382,19 +109089,21 @@ function transformModule(context) { if (!importClause) { return statements; } + const seen = new IdentifierNameMap(); if (importClause.name) { - statements = appendExportsOfDeclaration(statements, importClause); + statements = appendExportsOfDeclaration(statements, seen, importClause); } const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: - statements = appendExportsOfDeclaration(statements, namedBindings); + case 274 /* NamespaceImport */: + statements = appendExportsOfDeclaration(statements, seen, namedBindings); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration( statements, + seen, importBinding, /*liveBinding*/ true @@ -107409,7 +109118,7 @@ function transformModule(context) { if (currentModuleInfo.exportEquals) { return statements; } - return appendExportsOfDeclaration(statements, decl); + return appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); } function appendExportsOfVariableStatement(statements, node) { return appendExportsOfVariableDeclarationList( @@ -107439,7 +109148,7 @@ function transformModule(context) { } } } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer || isForInOrOfInitializer)) { - statements = appendExportsOfDeclaration(statements, decl); + statements = appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); } return statements; } @@ -107447,10 +109156,12 @@ function transformModule(context) { if (currentModuleInfo.exportEquals) { return statements; } + const seen = new IdentifierNameMap(); if (hasSyntacticModifier(decl, 1 /* Export */)) { const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); statements = appendExportStatement( statements, + seen, exportName, factory2.getLocalName(decl), /*location*/ @@ -107458,17 +109169,18 @@ function transformModule(context) { ); } if (decl.name) { - statements = appendExportsOfDeclaration(statements, decl); + statements = appendExportsOfDeclaration(statements, seen, decl); } return statements; } - function appendExportsOfDeclaration(statements, decl, liveBinding) { + function appendExportsOfDeclaration(statements, seen, decl, liveBinding) { const name = factory2.getDeclarationName(decl); - const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(idText(name)); + const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { statements = appendExportStatement( statements, + seen, exportSpecifier.name, name, /*location*/ @@ -107481,8 +109193,11 @@ function transformModule(context) { } return statements; } - function appendExportStatement(statements, exportName, expression, location, allowComments, liveBinding) { - statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); + function appendExportStatement(statements, seen, exportName, expression, location, allowComments, liveBinding) { + if (!seen.has(exportName)) { + seen.set(exportName, true); + statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); + } return statements; } function createUnderscoreUnderscoreESModule() { @@ -107577,7 +109292,7 @@ function transformModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -107615,11 +109330,11 @@ function transformModule(context) { switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -107672,7 +109387,7 @@ function transformModule(context) { return node; } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 311 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 312 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -107709,7 +109424,7 @@ function transformModule(context) { return node; } function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && !isGeneratedIdentifier(node.left) && !isLocalName(node.left)) { + if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { let expression = node; @@ -107748,6 +109463,15 @@ function transformModule(context) { return arrayFrom(bindingsSet); } } + } else if (isFileLevelReservedGeneratedIdentifier(name)) { + const exportSpecifiers = currentModuleInfo == null ? void 0 : currentModuleInfo.exportSpecifiers.get(name); + if (exportSpecifiers) { + const exportedNames = []; + for (const exportSpecifier of exportSpecifiers) { + exportedNames.push(exportSpecifier.name); + } + return exportedNames; + } } } } @@ -107774,10 +109498,10 @@ function transformSystemModule(context) { context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableSubstitution(225 /* BinaryExpression */); - context.enableSubstitution(235 /* MetaProperty */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableSubstitution(226 /* BinaryExpression */); + context.enableSubstitution(236 /* MetaProperty */); + context.enableEmitNotification(312 /* SourceFile */); const moduleInfoMap = []; const exportFunctionsMap = []; const noSubstitutionMap = []; @@ -107797,7 +109521,7 @@ function transformSystemModule(context) { const id = getOriginalNodeId(node); currentSourceFile = node; enclosingBlockScopedContainer = node; - moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node, resolver, compilerOptions); + moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node); exportFunction = factory2.createUniqueName("exports"); exportFunctionsMap[id] = exportFunction; contextObject = contextObjectMap[id] = factory2.createUniqueName("context"); @@ -107964,7 +109688,7 @@ function transformSystemModule(context) { if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 277 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 278 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -108112,11 +109836,11 @@ function transformSystemModule(context) { for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -108139,7 +109863,7 @@ function transformSystemModule(context) { ); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -108234,13 +109958,13 @@ function transformSystemModule(context) { } function topLevelVisitor(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return visitExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -108337,18 +110061,43 @@ function transformSystemModule(context) { if (!shouldHoistVariableDeclarationList(node.declarationList)) { return visitNode(node, visitor, isStatement); } - let expressions; - const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); - for (const variable of node.declarationList.declarations) { - if (variable.initializer) { - expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); - } else { - hoistBindingElement(variable); - } - } let statements; - if (expressions) { - statements = append(statements, setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node)); + if (isVarUsing(node.declarationList) || isVarAwaitUsing(node.declarationList)) { + const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifierLike); + const declarations = []; + for (const variable of node.declarationList.declarations) { + declarations.push(factory2.updateVariableDeclaration( + variable, + factory2.getGeneratedNameForNode(variable.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + transformInitializedVariable( + variable, + /*isExportedDeclaration*/ + false + ) + )); + } + const declarationList = factory2.updateVariableDeclarationList( + node.declarationList, + declarations + ); + statements = append(statements, factory2.updateVariableStatement(node, modifiers, declarationList)); + } else { + let expressions; + const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); + for (const variable of node.declarationList.declarations) { + if (variable.initializer) { + expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); + } else { + hoistBindingElement(variable); + } + } + if (expressions) { + statements = append(statements, setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node)); + } } statements = appendExportsOfVariableStatement( statements, @@ -108370,7 +110119,7 @@ function transformSystemModule(context) { } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 311 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 312 /* SourceFile */ || (getOriginalNode(node).flags & 7 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -108420,10 +110169,10 @@ function transformSystemModule(context) { const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -108489,7 +110238,7 @@ function transformSystemModule(context) { return statements; } const name = factory2.getDeclarationName(decl); - const exportSpecifiers = moduleInfo.exportSpecifiers.get(idText(name)); + const exportSpecifiers = moduleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { if (exportSpecifier.name.escapedText !== excludeName) { @@ -108523,45 +110272,45 @@ function transformSystemModule(context) { } function topLevelNestedVisitor(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return visitWithStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return visitIfStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return visitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return visitDefaultClause(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return visitTryStatement(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock(node); default: return visitor(node); @@ -108715,30 +110464,30 @@ function transformSystemModule(context) { return node; } switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -108811,7 +110560,7 @@ function transformSystemModule(context) { return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 311 /* SourceFile */; + return container !== void 0 && container.kind === 312 /* SourceFile */; } else { return false; } @@ -108855,7 +110604,7 @@ function transformSystemModule(context) { return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -108889,7 +110638,7 @@ function transformSystemModule(context) { } function substituteUnspecified(node) { switch (node.kind) { - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -108933,9 +110682,9 @@ function transformSystemModule(context) { switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return substituteBinaryExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -108976,7 +110725,7 @@ function transformSystemModule(context) { return node; } function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && !isGeneratedIdentifier(node.left) && !isLocalName(node.left)) { + if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { let expression = node; @@ -109003,10 +110752,19 @@ function transformSystemModule(context) { /*prefixLocals*/ false ); - if (exportContainer && exportContainer.kind === 311 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 312 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); + } else if (isGeneratedIdentifier(name) && isFileLevelReservedGeneratedIdentifier(name)) { + const exportSpecifiers = moduleInfo == null ? void 0 : moduleInfo.exportSpecifiers.get(name); + if (exportSpecifiers) { + const exportedNames2 = []; + for (const exportSpecifier of exportSpecifiers) { + exportedNames2.push(exportSpecifier.name); + } + return exportedNames2; + } } return exportedNames; } @@ -109053,7 +110811,7 @@ function transformECMAScriptModule(context) { const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(311 /* SourceFile */); + context.enableEmitNotification(312 /* SourceFile */); context.enableSubstitution(80 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -109101,11 +110859,11 @@ function transformECMAScriptModule(context) { } function visitor(node) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -109310,8 +111068,8 @@ function transformNodeModule(context) { const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(311 /* SourceFile */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(312 /* SourceFile */); + context.enableEmitNotification(312 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -109354,7 +111112,7 @@ function transformNodeModule(context) { return result; } function transformSourceFileOrBundle(node) { - return node.kind === 311 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 312 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -109384,7 +111142,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -109401,7 +111159,7 @@ function createGetSymbolAccessibilityDiagnosticForNodeName(node) { function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; @@ -109432,12 +111190,12 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`); } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 210 /* PropertyAccessExpression */ || node.kind === 211 /* ElementAccessExpression */ || node.kind === 225 /* BinaryExpression */ || node.kind === 170 /* PropertySignature */ || node.kind === 168 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */ || node.kind === 168 /* Parameter */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -109454,7 +111212,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 177 /* SetAccessor */) { + if (node.kind === 178 /* SetAccessor */) { if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1; } else { @@ -109476,26 +111234,26 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 178 /* CallSignature */: + case 179 /* CallSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -109516,29 +111274,29 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 179 /* ConstructSignature */: - case 184 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 185 /* ConstructorType */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 178 /* CallSignature */: + case 179 /* CallSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node.parent)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 261 /* FunctionDeclaration */: - case 183 /* FunctionType */: + case 262 /* FunctionDeclaration */: + case 184 /* FunctionType */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1; default: return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`); @@ -109547,40 +111305,40 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 199 /* MappedType */: + case 200 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 178 /* CallSignature */: + case 179 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node.parent)) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 183 /* FunctionType */: - case 261 /* FunctionDeclaration */: + case 184 /* FunctionType */: + case 262 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 194 /* InferType */: + case 195 /* InferType */: diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; break; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -109642,7 +111400,7 @@ function hasInternalAnnotation(range, currentSourceFile) { } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 168 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -109874,10 +111632,10 @@ function transformDeclarations(context) { return result; } function transformRoot(node) { - if (node.kind === 311 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 312 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 312 /* Bundle */) { + if (node.kind === 313 /* Bundle */) { isBundledEmit = true; refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); @@ -109944,7 +111702,7 @@ function transformDeclarations(context) { ); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 314 /* InputFiles */) { + if (prepend.kind === 315 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -110112,14 +111870,14 @@ function transformDeclarations(context) { if (name.kind === 80 /* Identifier */) { return name; } else { - if (name.kind === 206 /* ArrayBindingPattern */) { + if (name.kind === 207 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 231 /* OmittedExpression */) { + if (elem.kind === 232 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { @@ -110183,14 +111941,14 @@ function transformDeclarations(context) { if (shouldPrintWithInitializer(node)) { return; } - const shouldUseResolverType = node.kind === 168 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 169 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } if (!getParseTreeNode(node)) { return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */); } - if (node.kind === 177 /* SetAccessor */) { + if (node.kind === 178 /* SetAccessor */) { return factory2.createKeywordTypeNode(133 /* AnyKeyword */); } errorNameNode = node.name; @@ -110199,10 +111957,10 @@ function transformDeclarations(context) { oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 168 /* Parameter */ || node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */) { + if (node.kind === 169 /* Parameter */ || node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */) { if (isPropertySignature(node) || !node.initializer) return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); @@ -110219,21 +111977,21 @@ function transformDeclarations(context) { function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: return !resolver.isDeclarationVisible(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: return false; - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -110321,7 +112079,7 @@ function transformDeclarations(context) { function rewriteModuleSpecifier(parent2, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 266 /* ModuleDeclaration */ && parent2.kind !== 204 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 267 /* ModuleDeclaration */ && parent2.kind !== 205 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); @@ -110340,7 +112098,7 @@ function transformDeclarations(context) { function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 283 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -110377,7 +112135,7 @@ function transformDeclarations(context) { void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 @@ -110480,7 +112238,7 @@ function transformDeclarations(context) { const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 186 /* TypeLiteral */ || input.kind === 199 /* MappedType */) && input.parent.kind !== 264 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -110508,26 +112266,26 @@ function transformDeclarations(context) { } if (isProcessedComponent(input)) { switch (input.kind) { - case 232 /* ExpressionWithTypeArguments */: { + case 233 /* ExpressionWithTypeArguments */: { if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) { checkEntityNameVisibility(input.expression, enclosingDeclaration); } const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); } - case 182 /* TypeReference */: { + case 183 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 175 /* Constructor */: { + case 176 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( /*modifiers*/ ensureModifiers(input), @@ -110537,7 +112295,7 @@ function transformDeclarations(context) { ); return cleanup(ctor); } - case 173 /* MethodDeclaration */: { + case 174 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -110558,7 +112316,7 @@ function transformDeclarations(context) { ); return cleanup(sig); } - case 176 /* GetAccessor */: { + case 177 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -110576,7 +112334,7 @@ function transformDeclarations(context) { void 0 )); } - case 177 /* SetAccessor */: { + case 178 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -110592,7 +112350,7 @@ function transformDeclarations(context) { void 0 )); } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -110607,7 +112365,7 @@ function transformDeclarations(context) { ensureType(input, input.type), ensureNoInitializer(input) )); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -110621,7 +112379,7 @@ function transformDeclarations(context) { input.questionToken, ensureType(input, input.type) )); - case 172 /* MethodSignature */: { + case 173 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -110638,7 +112396,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 178 /* CallSignature */: { + case 179 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -110646,7 +112404,7 @@ function transformDeclarations(context) { ensureType(input, input.type) )); } - case 180 /* IndexSignature */: { + case 181 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), @@ -110654,7 +112412,7 @@ function transformDeclarations(context) { visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(133 /* AnyKeyword */) )); } - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -110669,7 +112427,7 @@ function transformDeclarations(context) { ensureNoInitializer(input) )); } - case 167 /* TypeParameter */: { + case 168 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration( input, @@ -110683,7 +112441,7 @@ function transformDeclarations(context) { } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 193 /* ConditionalType */: { + case 194 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); const oldEnclosingDecl = enclosingDeclaration; @@ -110697,13 +112455,13 @@ function transformDeclarations(context) { Debug.assert(falseType); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 183 /* FunctionType */: { + case 184 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 184 /* ConstructorType */: { + case 185 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 204 /* ImportType */: { + case 205 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -110743,7 +112501,7 @@ function transformDeclarations(context) { } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 173 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -110752,7 +112510,7 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 277 /* ExportDeclaration */: { + case 278 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -110766,7 +112524,7 @@ function transformDeclarations(context) { getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -110807,6 +112565,21 @@ function transformDeclarations(context) { const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (258047 /* All */ ^ 1 /* Export */)); return factory2.updateModifiers(statement, modifiers); } + function updateModuleDeclarationAndKeyword(node, modifiers, name, body) { + const updated = factory2.updateModuleDeclaration(node, modifiers, name, body); + if (isAmbientModule(updated) || updated.flags & 32 /* Namespace */) { + return updated; + } + const fixed = factory2.createModuleDeclaration( + updated.modifiers, + updated.name, + updated.body, + updated.flags | 32 /* Namespace */ + ); + setOriginalNode(fixed, updated); + setTextRange(fixed, updated); + return fixed; + } function transformTopLevelDeclaration(input) { if (lateMarkedStatements) { while (orderedRemoveItem(lateMarkedStatements, input)) @@ -110815,10 +112588,10 @@ function transformDeclarations(context) { if (shouldStripInternal(input)) return; switch (input.kind) { - case 270 /* ImportEqualsDeclaration */: { + case 271 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 271 /* ImportDeclaration */: { + case 272 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -110838,7 +112611,7 @@ function transformDeclarations(context) { } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 264 /* TypeAliasDeclaration */: { + case 265 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -110850,7 +112623,7 @@ function transformDeclarations(context) { needsDeclare = previousNeedsDeclare; return clean2; } - case 263 /* InterfaceDeclaration */: { + case 264 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -110860,7 +112633,7 @@ function transformDeclarations(context) { visitNodes2(input.members, visitDeclarationSubtree, isTypeElement) )); } - case 261 /* FunctionDeclaration */: { + case 262 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -110880,7 +112653,7 @@ function transformDeclarations(context) { void 0, clean2.name || factory2.createIdentifier("_default"), factory2.createModuleBlock([]), - 16 /* Namespace */ + 32 /* Namespace */ ); setParent(fakespace, enclosingDeclaration); fakespace.locals = createSymbolTable(props); @@ -110930,7 +112703,7 @@ function transformDeclarations(context) { })) )); } - const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 16 /* Namespace */); + const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 32 /* Namespace */); if (!hasEffectiveModifier(clean2, 1024 /* Default */)) { return [clean2, namespaceDecl]; } @@ -110969,17 +112742,17 @@ function transformDeclarations(context) { return clean2; } } - case 266 /* ModuleDeclaration */: { + case 267 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 267 /* ModuleBlock */) { + if (inner && inner.kind === 268 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; needsScopeFixMarker = false; const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement); let lateStatements = transformAndReplaceLatePaintedStatements(statements); - if (input.flags & 16777216 /* Ambient */) { + if (input.flags & 33554432 /* Ambient */) { needsScopeFixMarker = false; } if (!isGlobalScopeAugmentation(input) && !hasScopeMarker2(lateStatements) && !resultHasScopeMarker) { @@ -110994,7 +112767,7 @@ function transformDeclarations(context) { needsScopeFixMarker = oldNeedsScopeFix; resultHasScopeMarker = oldHasScopeFix; const mods = ensureModifiers(input); - return cleanup(factory2.updateModuleDeclaration( + return cleanup(updateModuleDeclarationAndKeyword( input, mods, isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, @@ -111008,7 +112781,7 @@ function transformDeclarations(context) { const id = getOriginalNodeId(inner); const body = lateStatementReplacementMap.get(id); lateStatementReplacementMap.delete(id); - return cleanup(factory2.updateModuleDeclaration( + return cleanup(updateModuleDeclarationAndKeyword( input, mods, input.name, @@ -111016,7 +112789,7 @@ function transformDeclarations(context) { )); } } - case 262 /* ClassDeclaration */: { + case 263 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -111132,10 +112905,10 @@ function transformDeclarations(context) { )); } } - case 242 /* VariableStatement */: { + case 243 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 265 /* EnumDeclaration */: { + case 266 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -111152,7 +112925,7 @@ function transformDeclarations(context) { if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 266 /* ModuleDeclaration */) { + if (input.kind === 267 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -111169,13 +112942,23 @@ function transformDeclarations(context) { const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration); if (!length(nodes)) return; - return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes)); + const modifiers = factory2.createNodeArray(ensureModifiers(input)); + let declList; + if (isVarUsing(input.declarationList) || isVarAwaitUsing(input.declarationList)) { + declList = factory2.createVariableDeclarationList(nodes, 2 /* Const */); + setOriginalNode(declList, input.declarationList); + setTextRange(declList, input.declarationList); + setCommentRange(declList, input.declarationList); + } else { + declList = factory2.updateVariableDeclarationList(input.declarationList, nodes); + } + return factory2.updateVariableStatement(input, modifiers, declList); } function recreateBindingPattern(d) { return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 231 /* OmittedExpression */) { + if (e.kind === 232 /* OmittedExpression */) { return; } if (e.name) { @@ -111235,7 +113018,7 @@ function transformDeclarations(context) { function ensureModifierFlags(node) { let mask2 = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; - const parentIsFile = node.parent.kind === 311 /* SourceFile */; + const parentIsFile = node.parent.kind === 312 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask2 ^= 2 /* Ambient */; additions = 0 /* None */; @@ -111261,7 +113044,7 @@ function transformDeclarations(context) { } } function isAlwaysType(node) { - if (node.kind === 263 /* InterfaceDeclaration */) { + if (node.kind === 264 /* InterfaceDeclaration */) { return true; } return false; @@ -111281,57 +113064,57 @@ function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public * } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 176 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 177 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 168 /* Parameter */: - case 259 /* VariableDeclaration */: + case 169 /* Parameter */: + case 260 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 242 /* VariableStatement */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 243 /* VariableStatement */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 179 /* ConstructSignature */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 180 /* IndexSignature */: - case 259 /* VariableDeclaration */: - case 167 /* TypeParameter */: - case 232 /* ExpressionWithTypeArguments */: - case 182 /* TypeReference */: - case 193 /* ConditionalType */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 204 /* ImportType */: + case 180 /* ConstructSignature */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 181 /* IndexSignature */: + case 260 /* VariableDeclaration */: + case 168 /* TypeParameter */: + case 233 /* ExpressionWithTypeArguments */: + case 183 /* TypeReference */: + case 194 /* ConditionalType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 205 /* ImportType */: return true; } return false; @@ -111372,16 +113155,17 @@ function getScriptTransformers(compilerOptions, customTransformers, emitOnly) { transformers.push(transformTypeScript); if (compilerOptions.experimentalDecorators) { transformers.push(transformLegacyDecorators); - } else if (languageVersion < 99 /* ESNext */ || !useDefineForClassFields) { - transformers.push(transformESDecorators); } - transformers.push(transformClassFields); if (getJSXTransformEnabled(compilerOptions)) { transformers.push(transformJsx); } if (languageVersion < 99 /* ESNext */) { transformers.push(transformESNext); } + if (!compilerOptions.experimentalDecorators && (languageVersion < 99 /* ESNext */ || !useDefineForClassFields)) { + transformers.push(transformESDecorators); + } + transformers.push(transformClassFields); if (languageVersion < 8 /* ES2021 */) { transformers.push(transformES2021); } @@ -111440,7 +113224,7 @@ function noEmitNotification(hint, node, callback) { } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a, _b; - const enabledSyntaxKindFeatures = new Array(362 /* Count */); + const enabledSyntaxKindFeatures = new Array(363 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -111519,7 +113303,7 @@ function transformNodes(resolver, host, factory2, options, nodes, transformers, state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 311 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 312 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); (_b = tracing) == null ? void 0 : _b.pop(); } @@ -111839,7 +113623,7 @@ function getOutputPathsForBundle(options, forceDtsPaths) { } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 312 /* Bundle */) { + if (sourceFile.kind === 313 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -112231,8 +114015,8 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, mapOptions) { const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 312 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 311 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 313 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 312 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -112294,7 +114078,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 311 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 312 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -112662,11 +114446,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { break; } switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return printFile(node); - case 312 /* Bundle */: + case 313 /* Bundle */: return printBundle(node); - case 313 /* UnparsedSource */: + case 314 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -113045,301 +114829,301 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 81 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return emitQualifiedName(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return emitTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return emitParameter(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return emitDecorator(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return emitPropertySignature(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 172 /* MethodSignature */: + case 173 /* MethodSignature */: return emitMethodSignature(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return emitConstructor(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return emitAccessorDeclaration(node); - case 178 /* CallSignature */: + case 179 /* CallSignature */: return emitCallSignature(node); - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return emitConstructSignature(node); - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return emitIndexSignature(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return emitTypePredicate(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return emitTypeReference(node); - case 183 /* FunctionType */: + case 184 /* FunctionType */: return emitFunctionType(node); - case 184 /* ConstructorType */: + case 185 /* ConstructorType */: return emitConstructorType(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return emitTypeQuery(node); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return emitTypeLiteral(node); - case 187 /* ArrayType */: + case 188 /* ArrayType */: return emitArrayType(node); - case 188 /* TupleType */: + case 189 /* TupleType */: return emitTupleType(node); - case 189 /* OptionalType */: + case 190 /* OptionalType */: return emitOptionalType(node); - case 191 /* UnionType */: + case 192 /* UnionType */: return emitUnionType(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return emitIntersectionType(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return emitConditionalType(node); - case 194 /* InferType */: + case 195 /* InferType */: return emitInferType(node); - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return emitParenthesizedType(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 196 /* ThisType */: + case 197 /* ThisType */: return emitThisType(); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return emitTypeOperator(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return emitMappedType(node); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return emitLiteralType(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return emitTemplateType(node); - case 203 /* TemplateLiteralTypeSpan */: + case 204 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return emitImportTypeNode(node); - case 205 /* ObjectBindingPattern */: + case 206 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return emitBindingElement(node); - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return emitTemplateSpan(node); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 240 /* Block */: + case 241 /* Block */: return emitBlock(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return emitVariableStatement(node); - case 241 /* EmptyStatement */: + case 242 /* EmptyStatement */: return emitEmptyStatement( /*isEmbeddedStatement*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return emitExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return emitIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return emitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return emitWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return emitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return emitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return emitForOfStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return emitContinueStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return emitBreakStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return emitReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return emitWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return emitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return emitLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return emitThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return emitTryStatement(node); - case 258 /* DebuggerStatement */: + case 259 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return emitClassDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return emitModuleBlock(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return emitCaseBlock(node); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return emitImportDeclaration(node); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return emitImportClause(node); - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return emitNamespaceImport(node); - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return emitNamespaceExport(node); - case 274 /* NamedImports */: + case 275 /* NamedImports */: return emitNamedImports(node); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return emitImportSpecifier(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return emitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return emitExportDeclaration(node); - case 278 /* NamedExports */: + case 279 /* NamedExports */: return emitNamedExports(node); - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return emitExportSpecifier(node); - case 299 /* AssertClause */: + case 300 /* AssertClause */: return emitAssertClause(node); - case 300 /* AssertEntry */: + case 301 /* AssertEntry */: return emitAssertEntry(node); - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return; - case 282 /* ExternalModuleReference */: + case 283 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 12 /* JsxText */: return emitJsxText(node); - case 285 /* JsxOpeningElement */: - case 288 /* JsxOpeningFragment */: + case 286 /* JsxOpeningElement */: + case 289 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 286 /* JsxClosingElement */: - case 289 /* JsxClosingFragment */: + case 287 /* JsxClosingElement */: + case 290 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return emitJsxAttribute(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return emitJsxAttributes(node); - case 292 /* JsxSpreadAttribute */: + case 293 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return emitJsxExpression(node); - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return emitJsxNamespacedName(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return emitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return emitDefaultClause(node); - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return emitHeritageClause(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return emitCatchClause(node); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 305 /* EnumMember */: + case 306 /* EnumMember */: return emitEnumMember(node); - case 306 /* UnparsedPrologue */: + case 307 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 313 /* UnparsedSource */: - case 307 /* UnparsedPrepend */: + case 314 /* UnparsedSource */: + case 308 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 308 /* UnparsedText */: - case 309 /* UnparsedInternalText */: + case 309 /* UnparsedText */: + case 310 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 310 /* UnparsedSyntheticReference */: + case 311 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 311 /* SourceFile */: + case 312 /* SourceFile */: return emitSourceFile(node); - case 312 /* Bundle */: + case 313 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 314 /* InputFiles */: + case 315 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 315 /* JSDocTypeExpression */: + case 316 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 316 /* JSDocNameReference */: + case 317 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 318 /* JSDocAllType */: + case 319 /* JSDocAllType */: return writePunctuation("*"); - case 319 /* JSDocUnknownType */: + case 320 /* JSDocUnknownType */: return writePunctuation("?"); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 321 /* JSDocNonNullableType */: + case 322 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 190 /* RestType */: - case 324 /* JSDocVariadicType */: + case 191 /* RestType */: + case 325 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 325 /* JSDocNamepathType */: + case 326 /* JSDocNamepathType */: return; - case 326 /* JSDoc */: + case 327 /* JSDoc */: return emitJSDoc(node); - case 328 /* JSDocTypeLiteral */: + case 329 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 329 /* JSDocSignature */: + case 330 /* JSDocSignature */: return emitJSDocSignature(node); - case 333 /* JSDocTag */: - case 338 /* JSDocClassTag */: - case 343 /* JSDocOverrideTag */: + case 334 /* JSDocTag */: + case 339 /* JSDocClassTag */: + case 344 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 334 /* JSDocAugmentsTag */: - case 335 /* JSDocImplementsTag */: + case 335 /* JSDocAugmentsTag */: + case 336 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 336 /* JSDocAuthorTag */: - case 337 /* JSDocDeprecatedTag */: + case 337 /* JSDocAuthorTag */: + case 338 /* JSDocDeprecatedTag */: return; - case 339 /* JSDocPublicTag */: - case 340 /* JSDocPrivateTag */: - case 341 /* JSDocProtectedTag */: - case 342 /* JSDocReadonlyTag */: + case 340 /* JSDocPublicTag */: + case 341 /* JSDocPrivateTag */: + case 342 /* JSDocProtectedTag */: + case 343 /* JSDocReadonlyTag */: return; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return emitJSDocOverloadTag(node); - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 346 /* JSDocEnumTag */: - case 348 /* JSDocReturnTag */: - case 349 /* JSDocThisTag */: - case 350 /* JSDocTypeTag */: - case 355 /* JSDocThrowsTag */: - case 356 /* JSDocSatisfiesTag */: + case 347 /* JSDocEnumTag */: + case 349 /* JSDocReturnTag */: + case 350 /* JSDocThisTag */: + case 351 /* JSDocTypeTag */: + case 356 /* JSDocThrowsTag */: + case 357 /* JSDocSatisfiesTag */: return emitJSDocSimpleTypedTag(node); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 353 /* JSDocSeeTag */: + case 354 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 358 /* NotEmittedStatement */: + case 359 /* NotEmittedStatement */: return; } if (isExpression(node)) { @@ -113372,83 +115156,83 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitIdentifier(node); case 81 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return emitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return emitNewExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return emitFunctionExpression(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return emitArrowFunction(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return emitDeleteExpression(node); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return emitVoidExpression(node); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return emitAwaitExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return emitBinaryExpression(node); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return emitConditionalExpression(node); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return emitTemplateExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return emitYieldExpression(node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return emitSpreadElement(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return emitClassExpression(node); - case 231 /* OmittedExpression */: + case 232 /* OmittedExpression */: return; - case 233 /* AsExpression */: + case 234 /* AsExpression */: return emitAsExpression(node); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return emitNonNullExpression(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return emitMetaProperty(node); - case 236 /* SyntheticExpression */: + case 237 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return; - case 283 /* JsxElement */: + case 284 /* JsxElement */: return emitJsxElement(node); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return emitJsxFragment(node); - case 357 /* SyntaxList */: + case 358 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 358 /* NotEmittedStatement */: + case 359 /* NotEmittedStatement */: return; - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return emitCommaList(node); - case 361 /* SyntheticReferenceExpression */: + case 362 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -113494,7 +115278,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 312 /* Bundle */ ? node : void 0; + const bundle = node.kind === 313 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -113569,7 +115353,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 308 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 309 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -113605,7 +115389,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 241 /* EmptyStatement */, + node.kind === 242 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -113677,7 +115461,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 323 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 324 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -113753,7 +115537,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { /*allowDecorators*/ true ); - const token = node.kind === 176 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; + const token = node.kind === 177 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; emitTokenWithComment(token, pos, writeKeyword, node); writeSpace(); emit(node.name); @@ -114107,7 +115891,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */)); } else if (isAccessExpression(expression)) { const constantValue = getConstantValue(expression); - return typeof constantValue === "number" && isFinite(constantValue) && Math.floor(constantValue) === constantValue; + return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue; } } function emitElementAccessExpression(node) { @@ -114218,7 +116002,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 223 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); + return operand.kind === 224 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary); @@ -114477,7 +116261,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); emitTokenWithComment(93 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 244 /* IfStatement */) { + if (node.elseStatement.kind === 245 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -114544,7 +116328,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(164 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -114552,7 +116336,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 260 /* VariableDeclarationList */) { + if (node.kind === 261 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -114588,7 +116372,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 293 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */; emitTrailingCommentsOfPosition( pos, /*prefixSpace*/ @@ -114700,7 +116484,14 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitInitializer(node.initializer, ((_a = node.type) == null ? void 0 : _a.end) ?? ((_c = (_b = node.name.emitNode) == null ? void 0 : _b.typeNode) == null ? void 0 : _c.end) ?? node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma); } function emitVariableDeclarationList(node) { - writeKeyword(isLet(node) ? "let" : isVarConst(node) ? "const" : "var"); + if (isVarAwaitUsing(node)) { + writeKeyword("await"); + writeSpace(); + writeKeyword("using"); + } else { + const head = isLet(node) ? "let" : isVarConst(node) ? "const" : isVarUsing(node) ? "using" : "var"; + writeKeyword(head); + } writeSpace(); emitList(node, node.declarations, 528 /* VariableDeclarationList */); } @@ -114909,8 +116700,8 @@ function createPrinter(printerOptions = {}, handlers = {}) { /*allowDecorators*/ false ); - if (~node.flags & 1024 /* GlobalAugmentation */) { - writeKeyword(node.flags & 16 /* Namespace */ ? "namespace" : "module"); + if (~node.flags & 2048 /* GlobalAugmentation */) { + writeKeyword(node.flags & 32 /* Namespace */ ? "namespace" : "module"); writeSpace(); } emit(node.name); @@ -114986,7 +116777,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.importClause) { emit(node.importClause); writeSpace(); - emitTokenWithComment(160 /* FromKeyword */, node.importClause.end, writeKeyword, node); + emitTokenWithComment(161 /* FromKeyword */, node.importClause.end, writeKeyword, node); writeSpace(); } emitExpression(node.moduleSpecifier); @@ -115053,7 +116844,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (node.moduleSpecifier) { writeSpace(); const fromPos = node.exportClause ? node.exportClause.end : nextPos; - emitTokenWithComment(160 /* FromKeyword */, fromPos, writeKeyword, node); + emitTokenWithComment(161 /* FromKeyword */, fromPos, writeKeyword, node); writeSpace(); emitExpression(node.moduleSpecifier); } @@ -115308,7 +117099,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 350 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 351 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -115352,7 +117143,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 315 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 316 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -115370,7 +117161,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 328 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 329 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -116253,7 +118044,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 216 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -116340,84 +118131,84 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 240 /* Block */: + case 241 /* Block */: forEach(node.statements, generateNames); break; - case 255 /* LabeledStatement */: - case 253 /* WithStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 256 /* LabeledStatement */: + case 254 /* WithStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: generateNames(node.statement); break; - case 244 /* IfStatement */: + case 245 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 298 /* CatchClause */: + case 299 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: generateNames(node.declarationList); break; - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: generateNames(node.importClause); break; - case 272 /* ImportClause */: + case 273 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: forEach(node.elements, generateNames); break; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -116426,12 +118217,12 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (!node) return; switch (node.kind) { - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -116689,16 +118480,16 @@ function createPrinter(printerOptions = {}, handlers = {}) { prefix, suffix ); - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: { + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: { Debug.assert(!prefix && !suffix && !privateName); const name = node.name; if (name && !isGeneratedIdentifier(name)) { @@ -116713,17 +118504,17 @@ function createPrinter(printerOptions = {}, handlers = {}) { } return generateNameForExportDefault(); } - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return makeTempVariableName( 0 /* Auto */, /*reservedInNestedScopes*/ @@ -116817,7 +118608,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitLeadingComments( pos, /*isEmittedNode*/ - node.kind !== 358 /* NotEmittedStatement */ + node.kind !== 359 /* NotEmittedStatement */ ); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) { @@ -116825,7 +118616,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 260 /* VariableDeclarationList */) { + if (node.kind === 261 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -116841,7 +118632,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 358 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 359 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -117113,7 +118904,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 128 /* NoNestedSourceMaps */) { @@ -117128,7 +118919,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { if (emitFlags & 128 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -117237,14 +119028,14 @@ function getEmitListItem(emit, parenthesizerRule) { } // src/compiler/watchUtilities.ts -function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames) { +function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) { if (!host.getDirectories || !host.readDirectory) { return void 0; } const cachedReadDirectoryResult = /* @__PURE__ */ new Map(); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); return { - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, fileExists, readFile: (path, encoding) => host.readFile(path, encoding), directoryExists: host.directoryExists && directoryExists, @@ -117366,7 +119157,7 @@ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensi const rootResult = tryReadDirectory2(rootDir, rootDirPath); let rootSymLinkResult; if (rootResult !== void 0) { - return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath); + return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath); } return host.readDirectory(rootDir, extensions, excludes, includes, depth); function getFileSystemEntries(dir) { @@ -117567,7 +119358,7 @@ function isIgnoredFileFromWildCardWatching({ program, extraFileExtensions, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 }) { @@ -117583,7 +119374,7 @@ function isIgnoredFileFromWildCardWatching({ writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`); return true; } - if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) { + if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) { writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`); return true; } @@ -117646,7 +119437,7 @@ function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo2) { function createExcludeHandlingAddWatch(key) { return (file, cb, flags, options, detailInfo1, detailInfo2) => { var _a; - return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call( + return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call( /*thisArgs*/ void 0, file, @@ -117658,7 +119449,7 @@ function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo2) { ) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2); }; } - function useCaseSensitiveFileNames() { + function useCaseSensitiveFileNames2() { return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames(); } function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) { @@ -118475,7 +120266,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([ Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code, Diagnostics.Duplicate_label_0.code, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, - Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block.code, + Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code, @@ -118505,14 +120296,17 @@ var plainJSErrors = /* @__PURE__ */ new Set([ Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind.code, Diagnostics._0_modifier_cannot_be_used_here.code, Diagnostics._0_modifier_must_precede_1_modifier.code, - Diagnostics.const_declarations_can_only_be_declared_inside_a_block.code, - Diagnostics.const_declarations_must_be_initialized.code, + Diagnostics._0_declarations_can_only_be_declared_inside_a_block.code, + Diagnostics._0_declarations_must_be_initialized.code, Diagnostics.extends_clause_already_seen.code, - Diagnostics.let_declarations_can_only_be_declared_inside_a_block.code, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code, Diagnostics.Class_constructor_may_not_be_a_generator.code, Diagnostics.Class_constructor_may_not_be_an_accessor.code, - Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code + Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class.code, + // Type errors + Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code ]); function shouldProgramCreateNewSourceFiles(program, newOptions) { if (!program) @@ -119261,13 +121055,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config sourceFileOptions, /*onError*/ void 0, - shouldCreateNewSourceFile || sourceFileOptions.impliedNodeFormat !== oldSourceFile.impliedNodeFormat + shouldCreateNewSourceFile ) : host.getSourceFile( oldSourceFile.fileName, sourceFileOptions, /*onError*/ void 0, - shouldCreateNewSourceFile || sourceFileOptions.impliedNodeFormat !== oldSourceFile.impliedNodeFormat + shouldCreateNewSourceFile ); if (!newSourceFile) { return 0 /* Not */; @@ -119318,7 +121112,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config structureIsReused = 1 /* SafeModules */; } else if (!arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) { structureIsReused = 1 /* SafeModules */; - } else if ((oldSourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */) !== (newSourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */)) { + } else if ((oldSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */) !== (newSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */)) { structureIsReused = 1 /* SafeModules */; } else if (!arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) { structureIsReused = 1 /* SafeModules */; @@ -119709,89 +121503,97 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return diagnostics; function walk(node, parent2) { switch (parent2.kind) { - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: if (parent2.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 259 /* VariableDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 260 /* VariableDeclaration */: if (parent2.type === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); return "skip"; } } switch (node.kind) { - case 272 /* ImportClause */: + case 273 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? "import...type" : "export...type")); return "skip"; } break; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: const heritageClause = node; if (heritageClause.token === 119 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: const interfaceKeyword = tokenToString(120 /* InterfaceKeyword */); Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); return "skip"; - case 266 /* ModuleDeclaration */: - const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */); + case 267 /* ModuleDeclaration */: + const moduleKeyword = node.flags & 32 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */); Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); return "skip"; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 265 /* EnumDeclaration */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + if (!node.body) { + diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Signature_declarations_can_only_be_used_in_TypeScript_files)); + return "skip"; + } + return; + case 266 /* EnumDeclaration */: const enumKeyword = Debug.checkDefined(tokenToString(94 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); return "skip"; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 233 /* AsExpression */: + case 234 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: Debug.fail(); } } @@ -119826,26 +121628,26 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } } switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: if (nodes === parent2.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 242 /* VariableStatement */); + checkModifiers(parent2.modifiers, parent2.kind === 243 /* VariableStatement */); return "skip"; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (nodes === parent2.modifiers) { for (const modifier of nodes) { if (isModifier(modifier) && modifier.kind !== 126 /* StaticKeyword */ && modifier.kind !== 129 /* AccessorKeyword */) { @@ -119855,18 +121657,18 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return "skip"; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (nodes === parent2.modifiers && some(nodes, isModifier)) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: - case 214 /* TaggedTemplateExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 215 /* TaggedTemplateExpression */: if (nodes === parent2.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -119887,7 +121689,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config case 148 /* ReadonlyKeyword */: case 138 /* DeclareKeyword */: case 128 /* AbstractKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); @@ -119985,8 +121787,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */); setParent(externalHelpersModuleReference, importDecl); setParent(importDecl, file); - externalHelpersModuleReference.flags &= ~8 /* Synthesized */; - importDecl.flags &= ~8 /* Synthesized */; + externalHelpersModuleReference.flags &= ~16 /* Synthesized */; + importDecl.flags &= ~16 /* Synthesized */; return externalHelpersModuleReference; } function collectExternalModuleReferences(file) { @@ -120015,7 +121817,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config ); } const shouldProcessRequires = isJavaScriptFile && shouldResolveJsRequire(options); - if (file.flags & 2097152 /* PossiblyContainsDynamicImport */ || shouldProcessRequires) { + if (file.flags & 4194304 /* PossiblyContainsDynamicImport */ || shouldProcessRequires) { collectDynamicImportOrRequireCalls(file); } file.imports = imports || emptyArray; @@ -120223,7 +122025,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 }; } function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) { - var _a2, _b2; + var _a2; const path = toPath3(fileName); if (useSourceOfProjectReferenceRedirect) { let source = getSourceOfProjectReferenceRedirect(path); @@ -120302,7 +122104,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config Diagnostics.Cannot_read_file_0_Colon_1, [fileName, hostErrorMessage] ), - shouldCreateNewSourceFile || ((_a2 = oldProgram == null ? void 0 : oldProgram.getSourceFileByPath(toPath3(fileName))) == null ? void 0 : _a2.impliedNodeFormat) !== sourceFileOptions.impliedNodeFormat + shouldCreateNewSourceFile ); if (packageId) { const packageIdKey = packageIdToString(packageId); @@ -120327,7 +122129,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config file.path = path; file.resolvedPath = toPath3(fileName); file.originalFileName = originalFileName; - file.packageJsonLocations = ((_b2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _b2.length) ? sourceFileOptions.packageJsonLocations : void 0; + file.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0; file.packageJsonScope = sourceFileOptions.packageJsonScope; addFileIncludeReason(file, reason); if (host.useCaseSensitiveFileNames()) { @@ -120637,7 +122439,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config currentNodeModulesDepth++; } const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth; - const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index]) || !(file.imports[index].flags & 8388608 /* JSDoc */)); + const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index]) || !(file.imports[index].flags & 16777216 /* JSDoc */)); if (elideImport) { modulesWithElidedImports.set(file.path, true); } else if (shouldAddFile) { @@ -120996,6 +122798,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind)) { createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later, "bundler"); } + if (ModuleKind[moduleKind] && (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) && !(3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) { + const moduleKindName = ModuleKind[moduleKind]; + createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleKindName, moduleKindName); + } else if (ModuleResolutionKind[moduleResolution] && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */) && !(100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */)) { + const moduleResolutionName = ModuleResolutionKind[moduleResolution]; + createOptionValueDiagnostic("module", Diagnostics.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, moduleResolutionName, moduleResolutionName); + } if (!options.noEmit && !options.suppressOutputPathCheck) { const emitHost = getEmitHost(); const emitFilesSeen = /* @__PURE__ */ new Set(); @@ -121686,6 +123495,9 @@ function parseConfigHostFromCompilerHostLike(host, directoryStructureHost = host return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: (f) => directoryStructureHost.readFile(f), + directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists), + getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories), + realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(), getCurrentDirectory: () => host.getCurrentDirectory(), onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined, @@ -124582,17 +126394,17 @@ function getFilesInErrorForSummary(diagnostics) { function getWatchErrorSummaryDiagnosticMessage(errorCount) { return errorCount === 1 ? Diagnostics.Found_1_error_Watching_for_file_changes : Diagnostics.Found_0_errors_Watching_for_file_changes; } -function prettyPathForFileError(error, cwd) { - const line = formatColorAndReset(":" + error.line, "\x1B[90m" /* Grey */); - if (pathIsAbsolute(error.fileName) && pathIsAbsolute(cwd)) { +function prettyPathForFileError(error2, cwd) { + const line = formatColorAndReset(":" + error2.line, "\x1B[90m" /* Grey */); + if (pathIsAbsolute(error2.fileName) && pathIsAbsolute(cwd)) { return getRelativePathFromDirectory( cwd, - error.fileName, + error2.fileName, /*ignoreCase*/ false ) + line; } - return error.fileName + line; + return error2.fileName + line; } function getErrorSummaryText(errorCount, filesInError, newLine, host) { if (errorCount === 0) @@ -124725,12 +126537,12 @@ function getMatchedIncludeSpec(program, fileName) { return true; const isJsonFile = fileExtensionIs(fileName, ".json" /* Json */); const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory())); - const useCaseSensitiveFileNames = program.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames(); return find((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => { if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */)) return false; const pattern = getPatternFromSpec(includeSpec, basePath, "files"); - return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames).test(fileName); + return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName); }); } function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) { @@ -124959,7 +126771,7 @@ function createWatchFactory(host, options) { return result; } function createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) { - const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames(); const compilerHost = { getSourceFile: createGetSourceFile( (fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding), @@ -124975,8 +126787,8 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt (path) => host.directoryExists(path) ), getCurrentDirectory: memoize(() => host.getCurrentDirectory()), - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, - getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames), + useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, + getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2), getNewLine: () => getNewLineCharacter(getCompilerOptions()), fileExists: (f) => host.fileExists(f), readFile: (f) => host.readFile(f), @@ -125216,7 +127028,7 @@ function createWatchProgram(host) { const sourceFilesCache = /* @__PURE__ */ new Map(); let missingFilePathsRequestedForRelease; let hasChangedCompilerOptions = false; - const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames(); const currentDirectory = host.getCurrentDirectory(); const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host; let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host; @@ -125224,7 +127036,7 @@ function createWatchProgram(host) { let configFileParsingDiagnostics; let canConfigFileJsonReportNoInputFiles = false; let hasChangedConfigFileParsingErrors = false; - const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames); + const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2); const directoryStructureHost = cachedDirectoryStructureHost || host; const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost); let newLine = updateNewLine(); @@ -125242,8 +127054,8 @@ function createWatchProgram(host) { Debug.assert(compilerOptions); Debug.assert(rootFileNames); const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); - writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); + writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`); let configFileWatcher; if (configFileName) { configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile); @@ -125352,7 +127164,6 @@ function createWatchProgram(host) { if (hasChangedCompilerOptions) { newLine = updateNewLine(); if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) { - debugger; resolutionCache.onChangesAffectModuleResolution(); } } @@ -125457,7 +127268,8 @@ function createWatchProgram(host) { if (isFileMissingOnHost(hostSourceFile)) { return void 0; } - if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile)) { + const impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : void 0; + if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile) || hostSourceFile.sourceFile.impliedNodeFormat !== impliedNodeFormat) { const sourceFile = getNewSourceFile(fileName, languageVersionOrOptions, onError); if (hostSourceFile) { if (sourceFile) { @@ -125748,7 +127560,7 @@ function createWatchProgram(host) { options: compilerOptions, program: getCurrentBuilderProgram() || rootFileNames, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 })) @@ -125838,7 +127650,7 @@ function createWatchProgram(host) { options: config.parsedCommandLine.options, program: config.parsedCommandLine.fileNames, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 })) @@ -128452,6 +130264,8 @@ var ScriptElementKind = /* @__PURE__ */ ((ScriptElementKind2) => { ScriptElementKind2["enumMemberElement"] = "enum member"; ScriptElementKind2["variableElement"] = "var"; ScriptElementKind2["localVariableElement"] = "local var"; + ScriptElementKind2["variableUsingElement"] = "using"; + ScriptElementKind2["variableAwaitUsingElement"] = "await using"; ScriptElementKind2["functionElement"] = "function"; ScriptElementKind2["localFunctionElement"] = "local function"; ScriptElementKind2["memberFunctionElement"] = "method"; @@ -128576,36 +130390,36 @@ var SemanticMeaning = /* @__PURE__ */ ((SemanticMeaning3) => { })(SemanticMeaning || {}); function getMeaningFromDeclaration(node) { switch (node.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 298 /* CatchClause */: - case 290 /* JsxAttribute */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 299 /* CatchClause */: + case 291 /* JsxAttribute */: return 1 /* Value */; - case 167 /* TypeParameter */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 186 /* TypeLiteral */: + case 168 /* TypeParameter */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 187 /* TypeLiteral */: return 2 /* Type */; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 305 /* EnumMember */: - case 262 /* ClassDeclaration */: + case 306 /* EnumMember */: + case 263 /* ClassDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -128613,15 +130427,15 @@ function getMeaningFromDeclaration(node) { } else { return 4 /* Namespace */; } - case 265 /* EnumDeclaration */: - case 274 /* NamedImports */: - case 275 /* ImportSpecifier */: - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 266 /* EnumDeclaration */: + case 275 /* NamedImports */: + case 276 /* ImportSpecifier */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: return 7 /* All */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 7 /* All */; @@ -128629,7 +130443,7 @@ function getMeaningFromDeclaration(node) { function getMeaningFromLocation(node) { node = getAdjustedReferenceLocation(node); const parent2 = node.parent; - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return 1 /* Value */; } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7 /* All */; @@ -128653,11 +130467,11 @@ function getMeaningFromLocation(node) { } } function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 165 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 270 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; + const name = node.kind === 166 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; + return name && name.parent.kind === 271 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; } function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -128668,26 +130482,26 @@ function isNamespaceReference(node) { function isQualifiedNameNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 165 /* QualifiedName */) { - while (root.parent && root.parent.kind === 165 /* QualifiedName */) { + if (root.parent.kind === 166 /* QualifiedName */) { + while (root.parent && root.parent.kind === 166 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 182 /* TypeReference */ && !isLastClause; + return root.parent.kind === 183 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 210 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 210 /* PropertyAccessExpression */) { + if (root.parent.kind === 211 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 211 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 232 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 297 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 233 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 298 /* HeritageClause */) { const decl = root.parent.parent.parent; - return decl.kind === 262 /* ClassDeclaration */ && root.parent.parent.token === 119 /* ImplementsKeyword */ || decl.kind === 263 /* InterfaceDeclaration */ && root.parent.parent.token === 96 /* ExtendsKeyword */; + return decl.kind === 263 /* ClassDeclaration */ && root.parent.parent.token === 119 /* ImplementsKeyword */ || decl.kind === 264 /* InterfaceDeclaration */ && root.parent.parent.token === 96 /* ExtendsKeyword */; } return false; } @@ -128698,15 +130512,15 @@ function isTypeReference(node) { switch (node.kind) { case 110 /* ThisKeyword */: return !isExpressionNode(node); - case 196 /* ThisType */: + case 197 /* ThisType */: return true; } switch (node.parent.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return true; - case 204 /* ImportType */: + case 205 /* ImportType */: return !node.parent.isTypeOf; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isPartOfTypeNode(node.parent); } return false; @@ -128753,7 +130567,7 @@ function climbPastPropertyOrElementAccess(node) { } function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 255 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { + if (referenceNode.kind === 256 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -128803,22 +130617,22 @@ function isNameOfFunctionDeclaration(node) { } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 302 /* PropertyAssignment */: - case 305 /* EnumMember */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 266 /* ModuleDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 303 /* PropertyAssignment */: + case 306 /* EnumMember */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 267 /* ModuleDeclaration */: return getNameOfDeclaration(node.parent) === node; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return true; - case 200 /* LiteralType */: - return node.parent.parent.kind === 198 /* IndexedAccessType */; + case 201 /* LiteralType */: + return node.parent.parent.kind === 199 /* IndexedAccessType */; default: return false; } @@ -128836,83 +130650,83 @@ function getContainerNode(node) { return void 0; } switch (node.kind) { - case 311 /* SourceFile */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 266 /* ModuleDeclaration */: + case 312 /* SourceFile */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: return node; } } } function getNodeKind(node) { switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return "module" /* moduleElement */; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return "class" /* classElement */; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; - case 264 /* TypeAliasDeclaration */: - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: + case 265 /* TypeAliasDeclaration */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: return "type" /* typeElement */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return "enum" /* enumElement */; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return "function" /* functionElement */; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return "getter" /* memberGetAccessorElement */; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return "setter" /* memberSetAccessorElement */; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return "method" /* memberFunctionElement */; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: const { initializer } = node; return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return "property" /* memberVariableElement */; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return "index" /* indexSignatureElement */; - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return "construct" /* constructSignatureElement */; - case 178 /* CallSignature */: + case 179 /* CallSignature */: return "call" /* callSignatureElement */; - case 175 /* Constructor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: return "constructor" /* constructorImplementationElement */; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return "type parameter" /* typeParameterElement */; - case 305 /* EnumMember */: + case 306 /* EnumMember */: return "enum member" /* enumMemberElement */; - case 168 /* Parameter */: + case 169 /* Parameter */: return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: - case 273 /* NamespaceImport */: - case 279 /* NamespaceExport */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: + case 274 /* NamespaceImport */: + case 280 /* NamespaceExport */: return "alias" /* alias */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const kind = getAssignmentDeclarationKind(node); const { right } = node; switch (kind) { @@ -128940,7 +130754,7 @@ function getNodeKind(node) { } case 80 /* Identifier */: return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: const scriptKind = getNodeKind(node.expression); return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: @@ -128955,7 +130769,7 @@ function isThis(node) { case 110 /* ThisKeyword */: return true; case 80 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 168 /* Parameter */; + return identifierIsThisKeyword(node) && node.parent.kind === 169 /* Parameter */; default: return false; } @@ -129004,41 +130818,41 @@ function isCompletedNode(n, sourceFile) { return false; } switch (n.kind) { - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 205 /* ObjectBindingPattern */: - case 186 /* TypeLiteral */: - case 240 /* Block */: - case 267 /* ModuleBlock */: - case 268 /* CaseBlock */: - case 274 /* NamedImports */: - case 278 /* NamedExports */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 187 /* TypeLiteral */: + case 241 /* Block */: + case 268 /* ModuleBlock */: + case 269 /* CaseBlock */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: return nodeEndsWith(n, 20 /* CloseBraceToken */, sourceFile); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 213 /* NewExpression */: + case 214 /* NewExpression */: if (!n.arguments) { return true; } - case 212 /* CallExpression */: - case 216 /* ParenthesizedExpression */: - case 195 /* ParenthesizedType */: + case 213 /* CallExpression */: + case 217 /* ParenthesizedExpression */: + case 196 /* ParenthesizedType */: return nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 179 /* ConstructSignature */: - case 178 /* CallSignature */: - case 218 /* ArrowFunction */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 180 /* ConstructSignature */: + case 179 /* CallSignature */: + case 219 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -129046,60 +130860,60 @@ function isCompletedNode(n, sourceFile) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 22 /* CloseParenToken */, sourceFile); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return !!n.body && isCompletedNode(n.body, sourceFile); - case 244 /* IfStatement */: + case 245 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 27 /* SemicolonToken */, sourceFile); - case 208 /* ArrayLiteralExpression */: - case 206 /* ArrayBindingPattern */: - case 211 /* ElementAccessExpression */: - case 166 /* ComputedPropertyName */: - case 188 /* TupleType */: + case 209 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 212 /* ElementAccessExpression */: + case 167 /* ComputedPropertyName */: + case 189 /* TupleType */: return nodeEndsWith(n, 24 /* CloseBracketToken */, sourceFile); - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 24 /* CloseBracketToken */, sourceFile); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return false; - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 246 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 247 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return hasChildOfKind(n, 117 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 220 /* TypeOfExpression */: - case 219 /* DeleteExpression */: - case 221 /* VoidExpression */: - case 228 /* YieldExpression */: - case 229 /* SpreadElement */: + case 221 /* TypeOfExpression */: + case 220 /* DeleteExpression */: + case 222 /* VoidExpression */: + case 229 /* YieldExpression */: + case 230 /* SpreadElement */: const unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: const lastSpan = lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return nodeIsPresent(n.literal); - case 277 /* ExportDeclaration */: - case 271 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: return nodeIsPresent(n.moduleSpecifier); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -129190,7 +131004,7 @@ function getAncestorTypeNode(node) { return lastTypeNode; } function getContextualTypeFromParentOrAncestorTypeNode(node, checker) { - if (node.flags & (8388608 /* JSDoc */ & ~262144 /* JavaScriptFile */)) + if (node.flags & (16777216 /* JSDoc */ & ~524288 /* JavaScriptFile */)) return void 0; const contextualType = getContextualTypeFromParent(node, checker); if (contextualType) @@ -129201,13 +131015,13 @@ function getContextualTypeFromParentOrAncestorTypeNode(node, checker) { function getAdjustedLocationForDeclaration(node, forRename) { if (!forRename) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return getAdjustedLocationForClass(node); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return getAdjustedLocationForFunction(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return node; } } @@ -129316,7 +131130,7 @@ function getAdjustedLocation(node, forRename) { if (node.kind === 149 /* RequireKeyword */ && isExternalModuleReference(parent2)) { return parent2.expression; } - if (node.kind === 160 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { + if (node.kind === 161 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { return parent2.moduleSpecifier; } if ((node.kind === 96 /* ExtendsKeyword */ || node.kind === 119 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) { @@ -129357,7 +131171,7 @@ function getAdjustedLocation(node, forRename) { if (node.kind === 130 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 103 /* InKeyword */ && isForInStatement(parent2) || node.kind === 164 /* OfKeyword */ && isForOfStatement(parent2)) { + if (node.kind === 103 /* InKeyword */ && isForInStatement(parent2) || node.kind === 165 /* OfKeyword */ && isForOfStatement(parent2)) { return skipOuterExpressions(parent2.expression); } } @@ -129550,7 +131364,7 @@ function findPrecedingToken(position, sourceFile, startNode2, excludeJsdoc) { } } } - Debug.assert(startNode2 !== void 0 || n.kind === 311 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); + Debug.assert(startNode2 !== void 0 || n.kind === 312 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); const candidate = findRightmostChildNodeWithTokens( children, /*exclusiveStartPosition*/ @@ -129585,7 +131399,7 @@ function findRightmostChildNodeWithTokens(children, exclusiveStartPosition, sour for (let i = exclusiveStartPosition - 1; i >= 0; i--) { const child = children[i]; if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 12 /* JsxText */ || parentKind === 284 /* JsxSelfClosingElement */)) { + if (i === 0 && (parentKind === 12 /* JsxText */ || parentKind === 285 /* JsxSelfClosingElement */)) { Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); } } else if (nodeHasTokens(children[i], sourceFile)) { @@ -129617,13 +131431,13 @@ function isInsideJsxElementOrAttribute(sourceFile, position) { if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 12 /* JsxText */) { return true; } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 293 /* JsxExpression */) { + if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 294 /* JsxExpression */) { return true; } - if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 293 /* JsxExpression */) { + if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 294 /* JsxExpression */) { return true; } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 286 /* JsxClosingElement */) { + if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 287 /* JsxClosingElement */) { return true; } return false; @@ -129651,9 +131465,9 @@ function isInJSXText(sourceFile, position) { function isInsideJsxElement(sourceFile, position) { function isInsideJsxElementTraversal(node) { while (node) { - if (node.kind >= 284 /* JsxSelfClosingElement */ && node.kind <= 293 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) { + if (node.kind >= 285 /* JsxSelfClosingElement */ && node.kind <= 294 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) { node = node.parent; - } else if (node.kind === 283 /* JsxElement */) { + } else if (node.kind === 284 /* JsxElement */) { if (position > node.getStart(sourceFile)) return true; node = node.parent; @@ -129823,17 +131637,17 @@ function getNodeModifiers(node, excludeFlags = 0 /* None */) { result.push("export" /* exportedModifier */); if (flags & 8192 /* Deprecated */) result.push("deprecated" /* deprecatedModifier */); - if (node.flags & 16777216 /* Ambient */) + if (node.flags & 33554432 /* Ambient */) result.push("declare" /* ambientModifier */); - if (node.kind === 276 /* ExportAssignment */) + if (node.kind === 277 /* ExportAssignment */) result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 182 /* TypeReference */ || node.kind === 212 /* CallExpression */) { + if (node.kind === 183 /* TypeReference */ || node.kind === 213 /* CallExpression */) { return node.typeArguments; } - if (isFunctionLike(node) || node.kind === 262 /* ClassDeclaration */ || node.kind === 263 /* InterfaceDeclaration */) { + if (isFunctionLike(node) || node.kind === 263 /* ClassDeclaration */ || node.kind === 264 /* InterfaceDeclaration */) { return node.typeParameters; } return void 0; @@ -129875,14 +131689,14 @@ function cloneCompilerOptions(options) { return result; } function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 208 /* ArrayLiteralExpression */ || node.kind === 209 /* ObjectLiteralExpression */) { - if (node.parent.kind === 225 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) { + if (node.kind === 209 /* ArrayLiteralExpression */ || node.kind === 210 /* ObjectLiteralExpression */) { + if (node.parent.kind === 226 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) { return true; } - if (node.parent.kind === 249 /* ForOfStatement */ && node.parent.initializer === node) { + if (node.parent.kind === 250 /* ForOfStatement */ && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 302 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 303 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -129950,7 +131764,7 @@ function createTextChange(span, newText) { var typeKeywords = [ 133 /* AnyKeyword */, 131 /* AssertsKeyword */, - 162 /* BigIntKeyword */, + 163 /* BigIntKeyword */, 136 /* BooleanKeyword */, 97 /* FalseKeyword */, 140 /* InferKeyword */, @@ -130002,7 +131816,7 @@ function skipConstraint(type) { return type.isTypeParameter() ? type.getConstraint() || type : type; } function getNameFromPropertyName(name) { - return name.kind === 166 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); + return name.kind === 167 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); } function programContainsModules(program) { return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!(s.externalModuleIndicator || s.commonJsModuleIndicator)); @@ -130129,7 +131943,7 @@ function findModifier(node, kind) { } function insertImports(changes, sourceFile, imports, blankLineBetween, preferences) { const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 242 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; + const importKindPredicate = decl.kind === 243 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; const existingImportStatements = filter(sourceFile.statements, importKindPredicate); let sortKind = isArray(imports) ? ts_OrganizeImports_exports.detectImportDeclarationSorting(imports, preferences) : 3 /* Both */; const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); @@ -130701,13 +132515,13 @@ function needsParentheses(expression) { function getContextualTypeFromParent(node, checker, contextFlags) { const parent2 = walkUpParenthesizedExpressions(node.parent); switch (parent2.kind) { - case 213 /* NewExpression */: + case 214 /* NewExpression */: return checker.getContextualType(parent2, contextFlags); - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const { left, operatorToken, right } = parent2; return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node, contextFlags); } - case 295 /* CaseClause */: + case 296 /* CaseClause */: return getSwitchedType(parent2, checker); default: return checker.getContextualType(node, contextFlags); @@ -130733,8 +132547,8 @@ function isStringLiteralOrTemplate(node) { switch (node.kind) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: - case 214 /* TaggedTemplateExpression */: + case 228 /* TemplateExpression */: + case 215 /* TaggedTemplateExpression */: return true; default: return false; @@ -130770,16 +132584,16 @@ function getTypeNodeIfAccessible(type, enclosingScope, program, host) { return typeIsAccessible ? res : void 0; } function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 178 /* CallSignature */ || kind === 179 /* ConstructSignature */ || kind === 180 /* IndexSignature */ || kind === 170 /* PropertySignature */ || kind === 172 /* MethodSignature */; + return kind === 179 /* CallSignature */ || kind === 180 /* ConstructSignature */ || kind === 181 /* IndexSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */; } function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 261 /* FunctionDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 266 /* ModuleDeclaration */; + return kind === 267 /* ModuleDeclaration */; } function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 242 /* VariableStatement */ || kind === 243 /* ExpressionStatement */ || kind === 245 /* DoStatement */ || kind === 250 /* ContinueStatement */ || kind === 251 /* BreakStatement */ || kind === 252 /* ReturnStatement */ || kind === 256 /* ThrowStatement */ || kind === 258 /* DebuggerStatement */ || kind === 171 /* PropertyDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 276 /* ExportAssignment */; + return kind === 243 /* VariableStatement */ || kind === 244 /* ExpressionStatement */ || kind === 246 /* DoStatement */ || kind === 251 /* ContinueStatement */ || kind === 252 /* BreakStatement */ || kind === 253 /* ReturnStatement */ || kind === 257 /* ThrowStatement */ || kind === 259 /* DebuggerStatement */ || kind === 172 /* PropertyDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 277 /* ExportAssignment */; } var syntaxMayBeASICandidate = or( syntaxRequiresTrailingCommaOrSemicolonOrASI, @@ -130809,7 +132623,7 @@ function nodeIsASICandidate(node, sourceFile) { } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { return false; } - if (node.kind === 245 /* DoStatement */) { + if (node.kind === 246 /* DoStatement */) { return true; } const topNode = findAncestor(node, (ancestor) => !ancestor.parent); @@ -131187,13 +133001,16 @@ function needsNameFromDeclaration(symbol) { return !(symbol.flags & 33554432 /* Transient */) && (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */); } function getDefaultLikeExportNameFromDeclaration(symbol) { - return firstDefined( - symbol.declarations, - (d) => { - var _a, _b; - return isExportAssignment(d) ? (_a = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a.text : (_b = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _b.text; + return firstDefined(symbol.declarations, (d) => { + var _a, _b, _c; + if (isExportAssignment(d)) { + return (_a = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a.text; } - ); + if (isExportSpecifier(d) && d.symbol.flags === 2097152 /* Alias */) { + return (_b = tryCast(d.propertyName, isIdentifier)) == null ? void 0 : _b.text; + } + return (_c = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _c.text; + }); } function getSymbolParentOrFail(symbol) { var _a; @@ -131590,10 +133407,10 @@ function isImportablePath(fromPath, toPath3, getCanonicalFileName, globalCachePa } function forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) { var _a, _b; - const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host); + const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); const excludePatterns = preferences.autoImportFileExcludePatterns && mapDefined(preferences.autoImportFileExcludePatterns, (spec) => { const pattern = getPatternFromSpec(spec, "", "exclude"); - return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames) : void 0; + return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0; }); forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, (module2, file) => cb( module2, @@ -132122,13 +133939,13 @@ function getSemanticClassifications(typeChecker, cancellationToken, sourceFile, } function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -132344,49 +134161,49 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) pos = tag.tagName.end; let commentStart = tag.tagName.end; switch (tag.kind) { - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: const param = tag; processJSDocParameterTag(param); commentStart = param.isNameFirst && ((_a = param.typeExpression) == null ? void 0 : _a.end) || param.name.end; break; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: const prop = tag; commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; break; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; commentStart = tag.typeParameters.end; break; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 315 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; + commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 316 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; break; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: commentStart = tag.typeExpression.end; break; - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = tag.typeExpression.end; break; - case 349 /* JSDocThisTag */: - case 346 /* JSDocEnumTag */: + case 350 /* JSDocThisTag */: + case 347 /* JSDocEnumTag */: commentStart = tag.typeExpression.end; break; - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; break; - case 353 /* JSDocSeeTag */: + case 354 /* JSDocSeeTag */: commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; break; - case 334 /* JSDocAugmentsTag */: - case 335 /* JSDocImplementsTag */: + case 335 /* JSDocAugmentsTag */: + case 336 /* JSDocImplementsTag */: commentStart = tag.class.end; break; - case 355 /* JSDocThrowsTag */: + case 356 /* JSDocThrowsTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_h = tag.typeExpression) == null ? void 0 : _h.end) || commentStart; @@ -132531,22 +134348,22 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 286 /* JsxClosingElement */: + case 287 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -132567,11 +134384,11 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) if (token) { const parent2 = token.parent; if (tokenKind === 64 /* EqualsToken */) { - if (parent2.kind === 259 /* VariableDeclaration */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 168 /* Parameter */ || parent2.kind === 290 /* JsxAttribute */) { + if (parent2.kind === 260 /* VariableDeclaration */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 169 /* Parameter */ || parent2.kind === 291 /* JsxAttribute */) { return 5 /* operator */; } } - if (parent2.kind === 225 /* BinaryExpression */ || parent2.kind === 223 /* PrefixUnaryExpression */ || parent2.kind === 224 /* PostfixUnaryExpression */ || parent2.kind === 226 /* ConditionalExpression */) { + if (parent2.kind === 226 /* BinaryExpression */ || parent2.kind === 224 /* PrefixUnaryExpression */ || parent2.kind === 225 /* PostfixUnaryExpression */ || parent2.kind === 227 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -132581,7 +134398,7 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } else if (tokenKind === 10 /* BigIntLiteral */) { return 25 /* bigintLiteral */; } else if (tokenKind === 11 /* StringLiteral */) { - return token && token.parent.kind === 290 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 291 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 14 /* RegularExpressionLiteral */) { return 6 /* stringLiteral */; } else if (isTemplateLiteralKind(tokenKind)) { @@ -132591,32 +134408,32 @@ function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) } else if (tokenKind === 80 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 168 /* Parameter */: + case 169 /* Parameter */: if (token.parent.name === token) { return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -132775,7 +134592,7 @@ var DocumentHighlights; let child = throwStatement; while (child.parent) { const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 311 /* SourceFile */) { + if (isFunctionBlock(parent2) || parent2.kind === 312 /* SourceFile */) { return parent2; } if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { @@ -132805,15 +134622,15 @@ var DocumentHighlights; function getBreakOrContinueOwner(statement) { return findAncestor(statement, (node) => { switch (node.kind) { - case 254 /* SwitchStatement */: - if (statement.kind === 250 /* ContinueStatement */) { + case 255 /* SwitchStatement */: + if (statement.kind === 251 /* ContinueStatement */) { return false; } - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 246 /* WhileStatement */: - case 245 /* DoStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 247 /* WhileStatement */: + case 246 /* DoStatement */: return !statement.label || isLabeledBy(node, statement.label.escapedText); default: return isFunctionLike(node) && "quit"; @@ -132826,24 +134643,24 @@ var DocumentHighlights; function getNodesToSearchForModifier(declaration, modifierFlag) { const container = declaration.parent; switch (container.kind) { - case 267 /* ModuleBlock */: - case 311 /* SourceFile */: - case 240 /* Block */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 268 /* ModuleBlock */: + case 312 /* SourceFile */: + case 241 /* Block */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; } - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 186 /* TypeLiteral */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 187 /* TypeLiteral */: const nodes = container.members; if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); @@ -132854,7 +134671,7 @@ var DocumentHighlights; return [...nodes, container]; } return nodes; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return void 0; default: Debug.assertNever(container, "Invalid container kind."); @@ -132870,7 +134687,7 @@ var DocumentHighlights; function getLoopBreakContinueOccurrences(loopNode) { const keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 99 /* ForKeyword */, 117 /* WhileKeyword */, 92 /* DoKeyword */)) { - if (loopNode.kind === 245 /* DoStatement */) { + if (loopNode.kind === 246 /* DoStatement */) { const loopTokens = loopNode.getChildren(); for (let i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 117 /* WhileKeyword */)) { @@ -132890,13 +134707,13 @@ var DocumentHighlights; const owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -133055,12 +134872,12 @@ var DocumentHighlights; function isDocumentRegistryEntry(entry) { return !!entry.sourceFile; } -function createDocumentRegistry(useCaseSensitiveFileNames, currentDirectory) { - return createDocumentRegistryInternal(useCaseSensitiveFileNames, currentDirectory); +function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) { + return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory); } -function createDocumentRegistryInternal(useCaseSensitiveFileNames, currentDirectory = "", externalCache) { +function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) { const buckets = /* @__PURE__ */ new Map(); - const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); + const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2); function reportStats() { const bucketInfoArray = arrayFrom(buckets.keys()).filter((name) => name && name.charAt(0) === "_").map((name) => { const entries = buckets.get(name); @@ -133241,13 +135058,6 @@ function createDocumentRegistryInternal(useCaseSensitiveFileNames, currentDirect } } } - function getLanguageServiceRefCounts(path, scriptKind) { - return arrayFrom(buckets.entries(), ([key, bucket]) => { - const bucketEntry = bucket.get(path); - const entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind); - return [key, entry && entry.languageServiceRefCount]; - }); - } return { acquireDocument, acquireDocumentWithKey, @@ -133255,9 +135065,10 @@ function createDocumentRegistryInternal(useCaseSensitiveFileNames, currentDirect updateDocumentWithKey, releaseDocument, releaseDocumentWithKey, - getLanguageServiceRefCounts, + getKeyForCompilationSettings, + getDocumentRegistryBucketKeyWithMode, reportStats, - getKeyForCompilationSettings + getBuckets: () => buckets }; } function getKeyForCompilationSettings(settings) { @@ -133269,12 +135080,12 @@ function getDocumentRegistryBucketKeyWithMode(key, mode) { // src/services/getEditsForFileRename.ts function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) { - const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const oldToNew = getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper); const newToOld = getPathUpdater(newFileOrDirPath, oldFileOrDirPath, getCanonicalFileName, sourceMapper); return ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => { - updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames); + updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames2); updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName); }); } @@ -133296,7 +135107,7 @@ function makeCorrespondingRelativeChange(a0, b0, a1, getCanonicalFileName) { const rel = getRelativePathFromFile(a0, b0, getCanonicalFileName); return combinePathsSafe(getDirectoryPath(a1), rel); } -function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames) { +function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames2) { const { configFile } = program.getCompilerOptions(); if (!configFile) return; @@ -133320,10 +135131,10 @@ function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, /*excludes*/ [], includes, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, currentDirectory ); - if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { + if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(newFileOrDirPath)) { changeTracker.insertNodeAfter(configFile, last(property.initializer.elements), factory.createStringLiteral(relativePath(newFileOrDirPath))); } return; @@ -133371,7 +135182,7 @@ function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, configDir, path, /*ignoreCase*/ - !useCaseSensitiveFileNames + !useCaseSensitiveFileNames2 ); } } @@ -133905,7 +135716,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo if (token === 156 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); - return token2 !== 160 /* FromKeyword */ && (token2 === 42 /* AsteriskToken */ || token2 === 19 /* OpenBraceToken */ || token2 === 80 /* Identifier */ || isKeyword(token2)); + return token2 !== 161 /* FromKeyword */ && (token2 === 42 /* AsteriskToken */ || token2 === 19 /* OpenBraceToken */ || token2 === 80 /* Identifier */ || isKeyword(token2)); }); if (skipTypeKeyword) { token = nextToken(); @@ -133913,7 +135724,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo } if (token === 80 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -133939,7 +135750,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo } if (token === 20 /* CloseBraceToken */) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -133952,7 +135763,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo token = nextToken(); if (token === 80 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -133987,7 +135798,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo } if (token === 20 /* CloseBraceToken */) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -133996,7 +135807,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo } } else if (token === 42 /* AsteriskToken */) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -134161,7 +135972,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo } // src/services/sourcemaps.ts -var base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/; +var base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/; function getSourceMapper(host) { const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); const currentDirectory = host.getCurrentDirectory(); @@ -134346,8 +136157,8 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { diags.push(createDiagnosticForNode(init, Diagnostics.require_call_may_be_converted_to_an_import)); } } - const jsdocTypedefNode = ts_codefix_exports.getJSDocTypedefNode(node); - if (jsdocTypedefNode) { + const jsdocTypedefNodes = ts_codefix_exports.getJSDocTypedefNodes(node); + for (const jsdocTypedefNode of jsdocTypedefNodes) { diags.push(createDiagnosticForNode(jsdocTypedefNode, Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type)); } if (ts_codefix_exports.parameterShouldGetTypeFromJSDoc(node)) { @@ -134363,13 +136174,13 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { function containsTopLevelCommonjs(sourceFile) { return sourceFile.statements.some((statement) => { switch (statement.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall( propertyAccessLeftHandSide(decl.initializer), /*requireStringLiteralLikeArgument*/ true )); - case 243 /* ExpressionStatement */: { + case 244 /* ExpressionStatement */: { const { expression } = statement; if (!isBinaryExpression(expression)) return isRequireCall( @@ -134390,10 +136201,10 @@ function propertyAccessLeftHandSide(node) { } function importNameForConvertToDefaultImport(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 273 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 270 /* ImportEqualsDeclaration */: + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 274 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; + case 271 /* ImportEqualsDeclaration */: return node.name; default: return void 0; @@ -134457,18 +136268,18 @@ function hasSupportedNumberOfArguments(node) { } function isFixablePromiseArgument(arg, checker) { switch (arg.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: const functionFlags = getFunctionFlags(arg); if (functionFlags & 1 /* Generator */) { return false; } - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); case 106 /* NullKeyword */: return true; case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: { + case 211 /* PropertyAccessExpression */: { const symbol = checker.getSymbolAtLocation(arg); if (!symbol) { return false; @@ -134502,10 +136313,10 @@ function canBeConvertedToClass(node, checker) { } function canBeConvertedToAsync(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: return false; @@ -134680,9 +136491,9 @@ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checke } function shouldKeepItem(declaration, checker) { switch (declaration.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 270 /* ImportEqualsDeclaration */: + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 271 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); return importer.escapedName !== imported.escapedName; @@ -134692,7 +136503,7 @@ function shouldKeepItem(declaration, checker) { } function tryAddSingleDeclarationName(declaration, containers) { const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 166 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); + return !!name && (pushLiteral(name, containers) || name.kind === 167 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); } function tryAddComputedPropertyName(expression, containers) { return pushLiteral(expression, containers) || isPropertyAccessExpression(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers); @@ -134703,7 +136514,7 @@ function pushLiteral(node, containers) { function getContainers(declaration) { const containers = []; const name = getNameOfDeclaration(declaration); - if (name && name.kind === 166 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { + if (name && name.kind === 167 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { return emptyArray; } containers.shift(); @@ -134874,7 +136685,7 @@ function addNodeWithRecursiveInitializer(node) { } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 225 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + return !hasDynamicName(node) || node.kind !== 226 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -134882,7 +136693,7 @@ function addChildrenRecursively(node) { return; } switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: const ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (const param of ctr.parameters) { @@ -134891,32 +136702,32 @@ function addChildrenRecursively(node) { } } break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 173 /* MethodSignature */: if (hasNavigationBarName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasNavigationBarName(node)) { addNodeWithRecursiveInitializer(node); } break; - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (hasNavigationBarName(node)) { addLeafNode(node); } break; - case 272 /* ImportClause */: + case 273 /* ImportClause */: const importClause = node; if (importClause.name) { addLeafNode(importClause.name); } const { namedBindings } = importClause; if (namedBindings) { - if (namedBindings.kind === 273 /* NamespaceImport */) { + if (namedBindings.kind === 274 /* NamespaceImport */) { addLeafNode(namedBindings); } else { for (const element of namedBindings.elements) { @@ -134925,16 +136736,16 @@ function addChildrenRecursively(node) { } } break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: addNodeWithRecursiveChild(node, node.name); break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: const { expression } = node; isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: - case 259 /* VariableDeclaration */: { + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: + case 260 /* VariableDeclaration */: { const child = node; if (isBindingPattern(child.name)) { addChildrenRecursively(child.name); @@ -134943,18 +136754,18 @@ function addChildrenRecursively(node) { } break; } - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: const nameNode = node.name; if (nameNode && isIdentifier(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); break; - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: startNode(node); for (const member of node.members) { if (!isComputedProperty(member)) { @@ -134963,19 +136774,19 @@ function addChildrenRecursively(node) { } endNode(); break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: startNode(node); for (const member of node.members) { addChildrenRecursively(member); } endNode(); break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const expression2 = node.expression; const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; if (child) { @@ -134987,16 +136798,16 @@ function addChildrenRecursively(node) { } break; } - case 280 /* ExportSpecifier */: - case 270 /* ImportEqualsDeclaration */: - case 180 /* IndexSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 264 /* TypeAliasDeclaration */: + case 281 /* ExportSpecifier */: + case 271 /* ImportEqualsDeclaration */: + case 181 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 265 /* TypeAliasDeclaration */: addLeafNode(node); break; - case 212 /* CallExpression */: - case 225 /* BinaryExpression */: { + case 213 /* CallExpression */: + case 226 /* BinaryExpression */: { const special = getAssignmentDeclarationKind(node); switch (special) { case 1 /* ExportsProperty */: @@ -135218,19 +137029,19 @@ function shouldReallyMerge(a, b, parent2) { return false; } switch (a.kind) { - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return isStatic(a) === isStatic(b); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); default: return true; } } function isSynthesized(node) { - return !!(node.flags & 8 /* Synthesized */); + return !!(node.flags & 16 /* Synthesized */); } function isOwnChild(n, parent2) { const par = isModuleBlock(n.parent) ? n.parent.parent : n.parent; @@ -135240,7 +137051,7 @@ function areSameModule(a, b) { if (!a.body || !b.body) { return a.body === b.body; } - return a.body.kind === b.body.kind && (a.body.kind !== 266 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); + return a.body.kind === b.body.kind && (a.body.kind !== 267 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); } function merge(target, source) { target.additionalNodes = target.additionalNodes || []; @@ -135261,7 +137072,7 @@ function compareChildren(child1, child2) { return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); } function tryGetName(node) { - if (node.kind === 266 /* ModuleDeclaration */) { + if (node.kind === 267 /* ModuleDeclaration */) { return getModuleName(node); } const declName = getNameOfDeclaration(node); @@ -135270,16 +137081,16 @@ function tryGetName(node) { return propertyName && unescapeLeadingUnderscores(propertyName); } switch (node.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 230 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 231 /* ClassExpression */: return getFunctionOrClassName(node); default: return void 0; } } function getItemName(node, name) { - if (node.kind === 266 /* ModuleDeclaration */) { + if (node.kind === 267 /* ModuleDeclaration */) { return cleanText(getModuleName(node)); } if (name) { @@ -135289,27 +137100,27 @@ function getItemName(node, name) { } } switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: if (getSyntacticModifierFlags(node) & 1024 /* Default */) { return "default"; } return getFunctionOrClassName(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return "constructor"; - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return "new()"; - case 178 /* CallSignature */: + case 179 /* CallSignature */: return "()"; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return "[]"; default: return ""; @@ -135334,19 +137145,19 @@ function primaryNavBarMenuItems(root) { return true; } switch (navigationBarNodeKind(item)) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 265 /* EnumDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 311 /* SourceFile */: - case 264 /* TypeAliasDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 266 /* EnumDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 312 /* SourceFile */: + case 265 /* TypeAliasDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: return true; - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -135356,10 +137167,10 @@ function primaryNavBarMenuItems(root) { return false; } switch (navigationBarNodeKind(item2.parent)) { - case 267 /* ModuleBlock */: - case 311 /* SourceFile */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: + case 268 /* ModuleBlock */: + case 312 /* SourceFile */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: return true; default: return false; @@ -135418,7 +137229,7 @@ function getModuleName(moduleDeclaration) { } function getFullyQualifiedModuleName(moduleDeclaration) { const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 266 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } @@ -135428,13 +137239,13 @@ function getInteriorModule(decl) { return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 166 /* ComputedPropertyName */; + return !member.name || member.name.kind === 167 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 311 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); + return node.kind === 312 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); } function getModifiers2(node) { - if (node.parent && node.parent.kind === 259 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 260 /* VariableDeclaration */) { node = node.parent; } return getNodeModifiers(node); @@ -135479,9 +137290,9 @@ function getCalledExpressionName(expr) { } function isFunctionOrClassExpression(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: return true; default: return false; @@ -135540,8 +137351,8 @@ function getApplicableRefactors(context, includeInteractiveActions) { return context.cancellationToken && context.cancellationToken.isCancellationRequested() || !((_a = refactor.kinds) == null ? void 0 : _a.some((kind) => refactorKindBeginsWith(kind, context.kind))) ? void 0 : refactor.getAvailableActions(context, includeInteractiveActions); })); } -function getEditsForRefactor(context, refactorName13, actionName2, interactiveRefactorArguments) { - const refactor = refactors.get(refactorName13); +function getEditsForRefactor(context, refactorName14, actionName2, interactiveRefactorArguments) { + const refactor = refactors.get(refactorName14); return refactor && refactor.getEditsForAction(context, actionName2, interactiveRefactorArguments); } @@ -135549,12 +137360,12 @@ function getEditsForRefactor(context, refactorName13, actionName2, interactiveRe var refactorName = "Convert export"; var defaultToNamedAction = { name: "Convert default export to named export", - description: Diagnostics.Convert_default_export_to_named_export.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), kind: "refactor.rewrite.export.named" }; var namedToDefaultAction = { name: "Convert named export to default export", - description: Diagnostics.Convert_named_export_to_default_export.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_export_to_default_export), kind: "refactor.rewrite.export.default" }; registerRefactor(refactorName, { @@ -135572,7 +137383,7 @@ registerRefactor(refactorName, { } if (context.preferences.provideRefactorNotApplicableReason) { return [ - { name: refactorName, description: Diagnostics.Convert_default_export_to_named_export.message, actions: [ + { name: refactorName, description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), actions: [ { ...defaultToNamedAction, notApplicableReason: info.error }, { ...namedToDefaultAction, notApplicableReason: info.error } ] } @@ -135605,18 +137416,18 @@ function getInfo2(context, considerPartialSpans = true) { } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 266 /* ModuleDeclaration */: { + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 267 /* ModuleDeclaration */: { const node = exportNode; if (!node.name) return void 0; return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; } - case 242 /* VariableStatement */: { + case 243 /* VariableStatement */: { const vs = exportNode; if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { return void 0; @@ -135627,7 +137438,7 @@ function getInfo2(context, considerPartialSpans = true) { Debug.assert(!wasDefault, "Can't have a default flag here"); return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; } - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const node = exportNode; if (node.isExportEquals) return void 0; @@ -135659,20 +137470,20 @@ function changeExport(exportingSourceFile, { wasDefault, exportNode, exportName } else { const exportKeyword = Debug.checkDefined(findModifier(exportNode, 95 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(90 /* DefaultKeyword */)); break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: const decl = first(exportNode.declarationList.declarations); if (!ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile) && !decl.type) { changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(decl.initializer, "Initializer was previously known to be present"))); break; } - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 266 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 267 /* ModuleDeclaration */: changes.deleteModifier(exportingSourceFile, exportKeyword); changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); break; @@ -135698,23 +137509,23 @@ function changeImports(program, { wasDefault, exportName, exportingModuleSymbol function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { const { parent: parent2 } = ref; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); break; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: { + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: { const spec = parent2; changes.replaceNode(importingSourceFile, spec, makeImportSpecifier(exportName, spec.name.text)); break; } - case 272 /* ImportClause */: { + case 273 /* ImportClause */: { const clause = parent2; Debug.assert(clause.name === ref, "Import clause name should match provided ref"); const spec = makeImportSpecifier(exportName, ref.text); const { namedBindings } = clause; if (!namedBindings) { changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec])); - } else if (namedBindings.kind === 273 /* NamespaceImport */) { + } else if (namedBindings.kind === 274 /* NamespaceImport */) { changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) }); const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1 /* Double */; const newImport = makeImport( @@ -135731,7 +137542,7 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam } break; } - case 204 /* ImportType */: + case 205 /* ImportType */: const importTypeNode = parent2; changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; @@ -135742,10 +137553,10 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam function changeNamedToDefaultImport(importingSourceFile, ref, changes) { const parent2 = ref.parent; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); break; - case 275 /* ImportSpecifier */: { + case 276 /* ImportSpecifier */: { const defaultImport = factory.createIdentifier(parent2.name.text); if (parent2.parent.elements.length === 1) { changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); @@ -135755,7 +137566,7 @@ function changeNamedToDefaultImport(importingSourceFile, ref, changes) { } break; } - case 280 /* ExportSpecifier */: { + case 281 /* ExportSpecifier */: { changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); break; } @@ -135795,17 +137606,17 @@ var refactorName2 = "Convert import"; var actions = { [0 /* Named */]: { name: "Convert namespace import to named imports", - description: Diagnostics.Convert_namespace_import_to_named_imports.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_namespace_import_to_named_imports), kind: "refactor.rewrite.import.named" }, [2 /* Namespace */]: { name: "Convert named imports to namespace import", - description: Diagnostics.Convert_named_imports_to_namespace_import.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_namespace_import), kind: "refactor.rewrite.import.namespace" }, [1 /* Default */]: { name: "Convert named imports to default import", - description: Diagnostics.Convert_named_imports_to_default_import.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_default_import), kind: "refactor.rewrite.import.default" } }; @@ -135854,7 +137665,7 @@ function getImportConversionInfo(context, considerPartialSpans = true) { if (!importClause.namedBindings) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; } - if (importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { return { convertTo: 0 /* Named */, import: importClause.namedBindings }; } const shouldUseDefault = getShouldUseDefault(context.program, importClause); @@ -136309,24 +138120,168 @@ function refactorKindBeginsWith(known, requested) { return known.substr(0, requested.length) === requested; } +// src/services/refactors/inlineVariable.ts +var refactorName4 = "Inline variable"; +var refactorDescription = getLocaleSpecificMessage(Diagnostics.Inline_variable); +var inlineVariableAction = { + name: refactorName4, + description: refactorDescription, + kind: "refactor.inline.variable" +}; +registerRefactor(refactorName4, { + kinds: [inlineVariableAction.kind], + getAvailableActions(context) { + const { + file, + program, + preferences, + startPosition, + triggerReason + } = context; + const info = getInliningInfo(file, startPosition, triggerReason === "invoked", program); + if (!info) { + return emptyArray; + } + if (!ts_refactor_exports.isRefactorErrorInfo(info)) { + return [{ + name: refactorName4, + description: refactorDescription, + actions: [inlineVariableAction] + }]; + } + if (preferences.provideRefactorNotApplicableReason) { + return [{ + name: refactorName4, + description: refactorDescription, + actions: [{ + ...inlineVariableAction, + notApplicableReason: info.error + }] + }]; + } + return emptyArray; + }, + getEditsForAction(context, actionName2) { + Debug.assert(actionName2 === refactorName4, "Unexpected refactor invoked"); + const { file, program, startPosition } = context; + const info = getInliningInfo( + file, + startPosition, + /*tryWithReferenceToken*/ + true, + program + ); + if (!info || ts_refactor_exports.isRefactorErrorInfo(info)) { + return void 0; + } + const { references, declaration, replacement } = info; + const edits = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => { + for (const node of references) { + tracker.replaceNode(file, node, getReplacementExpression(node, replacement)); + } + tracker.delete(file, declaration); + }); + return { edits }; + } +}); +function getInliningInfo(file, startPosition, tryWithReferenceToken, program) { + var _a, _b; + const checker = program.getTypeChecker(); + const token = getTouchingPropertyName(file, startPosition); + const parent2 = token.parent; + if (!isIdentifier(token)) { + return void 0; + } + if (isInitializedVariable(parent2) && isVariableDeclarationInVariableStatement(parent2) && isIdentifier(parent2.name)) { + if (((_a = checker.getMergedSymbol(parent2.symbol).declarations) == null ? void 0 : _a.length) !== 1) { + return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; + } + if (isDeclarationExported(parent2)) { + return void 0; + } + const references = getReferenceNodes(parent2, checker, file); + return references && { references, declaration: parent2, replacement: parent2.initializer }; + } + if (tryWithReferenceToken) { + let definition = checker.resolveName( + token.text, + token, + 111551 /* Value */, + /*excludeGlobals*/ + false + ); + definition = definition && checker.getMergedSymbol(definition); + if (((_b = definition == null ? void 0 : definition.declarations) == null ? void 0 : _b.length) !== 1) { + return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; + } + const declaration = definition.declarations[0]; + if (!isInitializedVariable(declaration) || !isVariableDeclarationInVariableStatement(declaration) || !isIdentifier(declaration.name)) { + return void 0; + } + if (isDeclarationExported(declaration)) { + return void 0; + } + const references = getReferenceNodes(declaration, checker, file); + return references && { references, declaration, replacement: declaration.initializer }; + } + return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_variable_to_inline) }; +} +function isDeclarationExported(declaration) { + const variableStatement = cast(declaration.parent.parent, isVariableStatement); + return some(variableStatement.modifiers, isExportModifier); +} +function getReferenceNodes(declaration, checker, file) { + const references = []; + const cannotInline = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(declaration.name, checker, file, (ref) => { + if (ts_FindAllReferences_exports.isWriteAccessForReference(ref)) { + return true; + } + if (isExportSpecifier(ref.parent) || isExportAssignment(ref.parent)) { + return true; + } + if (isTypeQueryNode(ref.parent)) { + return true; + } + if (textRangeContainsPositionInclusive(declaration, ref.pos)) { + return true; + } + references.push(ref); + }); + return references.length === 0 || cannotInline ? void 0 : references; +} +function getReplacementExpression(reference, replacement) { + replacement = getSynthesizedDeepClone(replacement); + const { parent: parent2 } = reference; + if (isExpression(parent2) && (getExpressionPrecedence(replacement) < getExpressionPrecedence(parent2) || needsParentheses(parent2))) { + return factory.createParenthesizedExpression(replacement); + } + if (isFunctionLike(replacement) && (isCallLikeExpression(parent2) || isPropertyAccessExpression(parent2))) { + return factory.createParenthesizedExpression(replacement); + } + if (isPropertyAccessExpression(parent2) && (isNumericLiteral(replacement) || isObjectLiteralExpression(replacement))) { + return factory.createParenthesizedExpression(replacement); + } + return replacement; +} + // src/services/refactors/moveToNewFile.ts -var refactorName4 = "Move to a new file"; +var refactorName5 = "Move to a new file"; var description = getLocaleSpecificMessage(Diagnostics.Move_to_a_new_file); var moveToNewFileAction = { - name: refactorName4, + name: refactorName5, description, kind: "refactor.move.newFile" }; -registerRefactor(refactorName4, { +registerRefactor(refactorName5, { kinds: [moveToNewFileAction.kind], getAvailableActions: function getRefactorActionsToMoveToNewFile(context) { const statements = getStatementsToMove(context); if (context.preferences.allowTextChangesInNewFiles && statements) { - return [{ name: refactorName4, description, actions: [moveToNewFileAction] }]; + return [{ name: refactorName5, description, actions: [moveToNewFileAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName4, + name: refactorName5, description, actions: [{ ...moveToNewFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] }]; @@ -136334,7 +138289,7 @@ registerRefactor(refactorName4, { return emptyArray; }, getEditsForAction: function getRefactorEditsToMoveToNewFile(context, actionName2) { - Debug.assert(actionName2 === refactorName4, "Wrong refactor invoked"); + Debug.assert(actionName2 === refactorName5, "Wrong refactor invoked"); const statements = Debug.checkDefined(getStatementsToMove(context)); const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange3(context.file, context.program, statements, t, context.host, context.preferences, context)); return { edits, renameFilename: void 0, renameLocation: void 0 }; @@ -136451,15 +138406,22 @@ registerRefactor(refactorNameForMoveToFile, { getEditsForAction: function getRefactorEditsToMoveToFile(context, actionName2, interactiveRefactorArguments) { Debug.assert(actionName2 === refactorNameForMoveToFile, "Wrong refactor invoked"); const statements = Debug.checkDefined(getStatementsToMove(context)); + const { host, program } = context; Debug.assert(interactiveRefactorArguments, "No interactive refactor arguments available"); const targetFile = interactiveRefactorArguments.targetFile; if (hasJSFileExtension(targetFile) || hasTSFileExtension(targetFile)) { + if (host.fileExists(targetFile) && program.getSourceFile(targetFile) === void 0) { + return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_statements_to_the_selected_file)); + } const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences)); return { edits, renameFilename: void 0, renameLocation: void 0 }; } - return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid) }; + return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid)); } }); +function error(notApplicableReason) { + return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason }; +} function doChange4(context, oldFile, targetFile, program, toMove, changes, host, preferences) { const checker = program.getTypeChecker(); const usage = getUsageInfo(oldFile, toMove.all, checker); @@ -136500,7 +138462,7 @@ function getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, usage, chang const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromTargetFile, useEsModuleSyntax); if (typeof targetFile !== "string") { if (targetFile.statements.length > 0) { - changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], body); + moveStatementsToTargetFile(changes, program, body, targetFile, toMove); } else { changes.insertNodesAtEndOfFile( targetFile, @@ -136521,7 +138483,7 @@ function getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, usage, chang } } if (importAdder) { - importAdder.writeFixes(changes); + importAdder.writeFixes(changes, quotePreference); } if (imports.length && body.length) { return [ @@ -136651,11 +138613,11 @@ function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols } function getNamespaceLikeImport(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 273 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 274 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; + case 271 /* ImportEqualsDeclaration */: return node.name; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return tryCast(node.name, isIdentifier); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); @@ -136691,7 +138653,7 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie const newNamespaceId = factory.createIdentifier(newNamespaceName); const newModuleString = makeStringLiteral(newModuleSpecifier, quotePreference); switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return factory.createImportDeclaration( /*modifiers*/ void 0, @@ -136706,7 +138668,7 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie /*assertClause*/ void 0 ); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return factory.createImportEqualsDeclaration( /*modifiers*/ void 0, @@ -136715,7 +138677,7 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie newNamespaceId, factory.createExternalModuleReference(newModuleString) ); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return factory.createVariableDeclaration( newNamespaceId, /*exclamationToken*/ @@ -136737,7 +138699,7 @@ function createRequireCall(moduleSpecifier) { ); } function moduleSpecifierFromImport(i) { - return i.kind === 271 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 270 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; + return i.kind === 272 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 271 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { if (isImportDeclaration(statement)) { @@ -136835,15 +138797,15 @@ function isExported(sourceFile, decl, useEs6Exports, name) { } function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { switch (importDecl.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused); break; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (isUnused(importDecl.name)) { changes.delete(sourceFile, importDecl); } break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused); break; default: @@ -136855,7 +138817,7 @@ function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnu return; const { name, namedBindings } = importDecl.importClause; const defaultUnused = !name || isUnused(name); - const namedBindingsUnused = !namedBindings || (namedBindings.kind === 273 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); + const namedBindingsUnused = !namedBindings || (namedBindings.kind === 274 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); if (defaultUnused && namedBindingsUnused) { changes.delete(sourceFile, importDecl); } else { @@ -136875,7 +138837,7 @@ function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnu void 0 ) ); - } else if (namedBindings.kind === 274 /* NamedImports */) { + } else if (namedBindings.kind === 275 /* NamedImports */) { for (const element of namedBindings.elements) { if (isUnused(element.name)) changes.delete(sourceFile, element); @@ -136903,9 +138865,9 @@ function deleteUnusedImportsInVariableDeclaration(sourceFile, varDecl, changes, } } break; - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: break; - case 205 /* ObjectBindingPattern */: + case 206 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { changes.delete( sourceFile, @@ -136931,24 +138893,24 @@ function addExport(decl, useEs6Exports) { function addEs6Export(d) { const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(95 /* ExportKeyword */)], getModifiers(d)) : void 0; switch (d.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const decorators = canHaveDecorators(d) ? getDecorators(d) : void 0; return factory.updateClassDeclaration(d, concatenate(decorators, modifiers), d.name, d.typeParameters, d.heritageClauses, d.members); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return Debug.fail(); default: return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); @@ -136968,18 +138930,18 @@ function createExportAssignment(name) { } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: return [decl.name.text]; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 271 /* ImportEqualsDeclaration */: return emptyArray; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return Debug.fail("Can't export an ExpressionStatement"); default: return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); @@ -136987,7 +138949,7 @@ function getNamesToExportInCommonJS(decl) { } function filterImport(i, moduleSpecifier, keep) { switch (i.kind) { - case 271 /* ImportDeclaration */: { + case 272 /* ImportDeclaration */: { const clause = i.importClause; if (!clause) return void 0; @@ -137002,9 +138964,9 @@ function filterImport(i, moduleSpecifier, keep) { void 0 ) : void 0; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return keep(i.name) ? i : void 0; - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { const name = filterBindingName(i.name, keep); return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; } @@ -137013,7 +138975,7 @@ function filterImport(i, moduleSpecifier, keep) { } } function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 273 /* NamespaceImport */) { + if (namedBindings.kind === 274 /* NamespaceImport */) { return keep(namedBindings.name) ? namedBindings : void 0; } else { const newElements = namedBindings.elements.filter((e) => keep(e.name)); @@ -137024,9 +138986,9 @@ function filterBindingName(name, keep) { switch (name.kind) { case 80 /* Identifier */: return keep(name) ? name : void 0; - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: return name; - case 205 /* ObjectBindingPattern */: { + case 206 /* ObjectBindingPattern */: { const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } @@ -137037,9 +138999,9 @@ function nameOfTopLevelDeclaration(d) { } function getTopLevelDeclarationStatement(d) { switch (d.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return d.parent.parent; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getTopLevelDeclarationStatement( cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) ); @@ -137087,21 +139049,25 @@ function getRangeToMove(context) { const { file } = context; const range = createTextRangeFromSpan(getRefactorContextSpan(context)); const { statements } = file; - const startNodeIndex = findIndex(statements, (s) => s.end > range.pos); + let startNodeIndex = findIndex(statements, (s) => s.end > range.pos); if (startNodeIndex === -1) return void 0; const startStatement = statements[startNodeIndex]; - if (isNamedDeclaration(startStatement) && startStatement.name && rangeContainsRange(startStatement.name, range)) { - return { toMove: [statements[startNodeIndex]], afterLast: statements[startNodeIndex + 1] }; + const overloadRangeToMove = getOverloadRangeToMove(file, startStatement); + if (overloadRangeToMove) { + startNodeIndex = overloadRangeToMove.start; + } + let endNodeIndex = findIndex(statements, (s) => s.end >= range.end, startNodeIndex); + if (endNodeIndex !== -1 && range.end <= statements[endNodeIndex].getStart()) { + endNodeIndex--; + } + const endingOverloadRangeToMove = getOverloadRangeToMove(file, statements[endNodeIndex]); + if (endingOverloadRangeToMove) { + endNodeIndex = endingOverloadRangeToMove.end; } - if (range.pos > startStatement.getStart(file)) - return void 0; - const afterEndNodeIndex = findIndex(statements, (s) => s.end > range.end, startNodeIndex); - if (afterEndNodeIndex !== -1 && (afterEndNodeIndex === 0 || statements[afterEndNodeIndex].getStart(file) < range.end)) - return void 0; return { - toMove: statements.slice(startNodeIndex, afterEndNodeIndex === -1 ? statements.length : afterEndNodeIndex), - afterLast: afterEndNodeIndex === -1 ? void 0 : statements[afterEndNodeIndex] + toMove: statements.slice(startNodeIndex, endNodeIndex === -1 ? statements.length : endNodeIndex + 1), + afterLast: endNodeIndex === -1 ? void 0 : statements[endNodeIndex + 1] }; } function getStatementsToMove(context) { @@ -137123,11 +139089,11 @@ function isAllowedStatementToMove(statement) { } function isPureImport(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return true; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return !hasSyntacticModifier(node, 1 /* Export */); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall( d.initializer, /*requireStringLiteralLikeArgument*/ @@ -137220,17 +139186,17 @@ function forEachReference(node, checker, onReference) { } function forEachTopLevelDeclaration(statement, cb) { switch (statement.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 271 /* ImportEqualsDeclaration */: return cb(statement); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 243 /* ExpressionStatement */: { + case 244 /* ExpressionStatement */: { const { expression } = statement; return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; } @@ -137238,14 +139204,14 @@ function forEachTopLevelDeclaration(statement, cb) { } function isInImport(decl) { switch (decl.kind) { - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: return true; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return isVariableDeclarationInImport(decl); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); default: return false; @@ -137268,8 +139234,8 @@ function forEachTopLevelDeclarationInBindingName(name, cb) { switch (name.kind) { case 80 /* Identifier */: return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 206 /* ArrayBindingPattern */: - case 205 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); default: return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); @@ -137277,31 +139243,107 @@ function forEachTopLevelDeclarationInBindingName(name, cb) { } function isNonVariableTopLevelDeclaration(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 271 /* ImportEqualsDeclaration */: return true; default: return false; } } +function moveStatementsToTargetFile(changes, program, statements, targetFile, toMove) { + var _a; + const removedExports = /* @__PURE__ */ new Set(); + const targetExports = (_a = targetFile.symbol) == null ? void 0 : _a.exports; + if (targetExports) { + const checker = program.getTypeChecker(); + const targetToSourceExports = /* @__PURE__ */ new Map(); + for (const node of toMove.all) { + if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 1 /* Export */)) { + forEachTopLevelDeclaration(node, (declaration) => { + var _a2; + const targetDeclarations = canHaveSymbol(declaration) ? (_a2 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a2.declarations : void 0; + const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0); + if (exportDeclaration && exportDeclaration.moduleSpecifier) { + targetToSourceExports.set( + exportDeclaration, + (targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration) + ); + } + }); + } + } + for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) { + if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) { + const elements = exportDeclaration.exportClause.elements; + const updatedElements = filter(elements, (elem) => find(skipAlias(elem.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0); + if (length(updatedElements) === 0) { + changes.deleteNode(targetFile, exportDeclaration); + removedExports.add(exportDeclaration); + continue; + } + if (length(updatedElements) < length(elements)) { + changes.replaceNode( + targetFile, + exportDeclaration, + factory.updateExportDeclaration( + exportDeclaration, + exportDeclaration.modifiers, + exportDeclaration.isTypeOnly, + factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), + exportDeclaration.moduleSpecifier, + exportDeclaration.assertClause + ) + ); + } + } + } + } + const lastReExport = findLast(targetFile.statements, (n) => isExportDeclaration(n) && !!n.moduleSpecifier && !removedExports.has(n)); + if (lastReExport) { + changes.insertNodesBefore( + targetFile, + lastReExport, + statements, + /*blankLineBetween*/ + true + ); + } else { + changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], statements); + } +} +function getOverloadRangeToMove(sourceFile, statement) { + if (isFunctionLikeDeclaration(statement)) { + const declarations = statement.symbol.declarations; + if (declarations === void 0 || length(declarations) <= 1 || !contains(declarations, statement)) { + return void 0; + } + const firstDecl = declarations[0]; + const lastDecl = declarations[length(declarations) - 1]; + const statementsToMove = mapDefined(declarations, (d) => getSourceFileOfNode(d) === sourceFile && isStatement(d) ? d : void 0); + const end = findIndex(sourceFile.statements, (s) => s.end >= lastDecl.end); + const start2 = findIndex(sourceFile.statements, (s) => s.end >= firstDecl.end); + return { toMove: statementsToMove, start: start2, end }; + } + return void 0; +} // src/services/_namespaces/ts.refactor.addOrRemoveBracesToArrowFunction.ts var ts_refactor_addOrRemoveBracesToArrowFunction_exports = {}; // src/services/refactors/convertOverloadListToSingleSignature.ts -var refactorName5 = "Convert overload list to single signature"; -var refactorDescription = Diagnostics.Convert_overload_list_to_single_signature.message; +var refactorName6 = "Convert overload list to single signature"; +var refactorDescription2 = getLocaleSpecificMessage(Diagnostics.Convert_overload_list_to_single_signature); var functionOverloadAction = { - name: refactorName5, - description: refactorDescription, + name: refactorName6, + description: refactorDescription2, kind: "refactor.rewrite.function.overloadList" }; -registerRefactor(refactorName5, { +registerRefactor(refactorName6, { kinds: [functionOverloadAction.kind], getEditsForAction: getRefactorEditsToConvertOverloadsToOneSignature, getAvailableActions: getRefactorActionsToConvertOverloadsToOneSignature @@ -137312,8 +139354,8 @@ function getRefactorActionsToConvertOverloadsToOneSignature(context) { if (!info) return emptyArray; return [{ - name: refactorName5, - description: refactorDescription, + name: refactorName6, + description: refactorDescription2, actions: [functionOverloadAction] }]; } @@ -137326,7 +139368,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { const lastDeclaration = signatureDecls[signatureDecls.length - 1]; let updated = lastDeclaration; switch (lastDeclaration.kind) { - case 172 /* MethodSignature */: { + case 173 /* MethodSignature */: { updated = factory.updateMethodSignature( lastDeclaration, lastDeclaration.modifiers, @@ -137338,7 +139380,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 173 /* MethodDeclaration */: { + case 174 /* MethodDeclaration */: { updated = factory.updateMethodDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -137352,7 +139394,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 178 /* CallSignature */: { + case 179 /* CallSignature */: { updated = factory.updateCallSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -137361,7 +139403,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 175 /* Constructor */: { + case 176 /* Constructor */: { updated = factory.updateConstructorDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -137370,7 +139412,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 179 /* ConstructSignature */: { + case 180 /* ConstructSignature */: { updated = factory.updateConstructSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -137379,7 +139421,7 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { ); break; } - case 261 /* FunctionDeclaration */: { + case 262 /* FunctionDeclaration */: { updated = factory.updateFunctionDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -137452,12 +139494,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConvertableSignatureDeclaration(d) { switch (d.kind) { - case 172 /* MethodSignature */: - case 173 /* MethodDeclaration */: - case 178 /* CallSignature */: - case 175 /* Constructor */: - case 179 /* ConstructSignature */: - case 261 /* FunctionDeclaration */: + case 173 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 179 /* CallSignature */: + case 176 /* Constructor */: + case 180 /* ConstructSignature */: + case 262 /* FunctionDeclaration */: return true; } return false; @@ -137506,19 +139548,19 @@ function getConvertableOverloadListAtPosition(file, startPosition, program) { } // src/services/refactors/addOrRemoveBracesToArrowFunction.ts -var refactorName6 = "Add or remove braces in an arrow function"; -var refactorDescription2 = Diagnostics.Add_or_remove_braces_in_an_arrow_function.message; +var refactorName7 = "Add or remove braces in an arrow function"; +var refactorDescription3 = getLocaleSpecificMessage(Diagnostics.Add_or_remove_braces_in_an_arrow_function); var addBracesAction = { name: "Add braces to arrow function", - description: Diagnostics.Add_braces_to_arrow_function.message, + description: getLocaleSpecificMessage(Diagnostics.Add_braces_to_arrow_function), kind: "refactor.rewrite.arrow.braces.add" }; var removeBracesAction = { name: "Remove braces from arrow function", - description: Diagnostics.Remove_braces_from_arrow_function.message, + description: getLocaleSpecificMessage(Diagnostics.Remove_braces_from_arrow_function), kind: "refactor.rewrite.arrow.braces.remove" }; -registerRefactor(refactorName6, { +registerRefactor(refactorName7, { kinds: [removeBracesAction.kind], getEditsForAction: getRefactorEditsToRemoveFunctionBraces, getAvailableActions: getRefactorActionsToRemoveFunctionBraces @@ -137530,8 +139572,8 @@ function getRefactorActionsToRemoveFunctionBraces(context) { return emptyArray; if (!isRefactorErrorInfo(info)) { return [{ - name: refactorName6, - description: refactorDescription2, + name: refactorName7, + description: refactorDescription3, actions: [ info.addBraces ? addBracesAction : removeBracesAction ] @@ -137539,8 +139581,8 @@ function getRefactorActionsToRemoveFunctionBraces(context) { } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName6, - description: refactorDescription2, + name: refactorName7, + description: refactorDescription3, actions: [ { ...addBracesAction, notApplicableReason: info.error }, { ...removeBracesAction, notApplicableReason: info.error } @@ -137636,8 +139678,8 @@ function getConvertibleArrowFunctionAtPosition(file, startPosition, considerFunc var ts_refactor_convertArrowFunctionOrFunctionExpression_exports = {}; // src/services/refactors/convertArrowFunctionOrFunctionExpression.ts -var refactorName7 = "Convert arrow function or function expression"; -var refactorDescription3 = getLocaleSpecificMessage(Diagnostics.Convert_arrow_function_or_function_expression); +var refactorName8 = "Convert arrow function or function expression"; +var refactorDescription4 = getLocaleSpecificMessage(Diagnostics.Convert_arrow_function_or_function_expression); var toAnonymousFunctionAction = { name: "Convert to anonymous function", description: getLocaleSpecificMessage(Diagnostics.Convert_to_anonymous_function), @@ -137653,7 +139695,7 @@ var toArrowFunctionAction = { description: getLocaleSpecificMessage(Diagnostics.Convert_to_arrow_function), kind: "refactor.rewrite.function.arrow" }; -registerRefactor(refactorName7, { +registerRefactor(refactorName8, { kinds: [ toAnonymousFunctionAction.kind, toNamedFunctionAction.kind, @@ -137671,32 +139713,32 @@ function getRefactorActionsToConvertFunctionExpressions(context) { const possibleActions = []; const errors = []; if (refactorKindBeginsWith(toNamedFunctionAction.kind, kind)) { - const error = selectedVariableDeclaration || isArrowFunction(func) && isVariableDeclaration(func.parent) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function); - if (error) { - errors.push({ ...toNamedFunctionAction, notApplicableReason: error }); + const error2 = selectedVariableDeclaration || isArrowFunction(func) && isVariableDeclaration(func.parent) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function); + if (error2) { + errors.push({ ...toNamedFunctionAction, notApplicableReason: error2 }); } else { possibleActions.push(toNamedFunctionAction); } } if (refactorKindBeginsWith(toAnonymousFunctionAction.kind, kind)) { - const error = !selectedVariableDeclaration && isArrowFunction(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function); - if (error) { - errors.push({ ...toAnonymousFunctionAction, notApplicableReason: error }); + const error2 = !selectedVariableDeclaration && isArrowFunction(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function); + if (error2) { + errors.push({ ...toAnonymousFunctionAction, notApplicableReason: error2 }); } else { possibleActions.push(toAnonymousFunctionAction); } } if (refactorKindBeginsWith(toArrowFunctionAction.kind, kind)) { - const error = isFunctionExpression(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function); - if (error) { - errors.push({ ...toArrowFunctionAction, notApplicableReason: error }); + const error2 = isFunctionExpression(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function); + if (error2) { + errors.push({ ...toArrowFunctionAction, notApplicableReason: error2 }); } else { possibleActions.push(toArrowFunctionAction); } } return [{ - name: refactorName7, - description: refactorDescription3, + name: refactorName8, + description: refactorDescription4, actions: possibleActions.length === 0 && context.preferences.provideRefactorNotApplicableReason ? errors : possibleActions }]; } @@ -137861,15 +139903,15 @@ function isFunctionReferencedInFile(sourceFile, typeChecker, node) { var ts_refactor_convertParamsToDestructuredObject_exports = {}; // src/services/refactors/convertParamsToDestructuredObject.ts -var refactorName8 = "Convert parameters to destructured object"; +var refactorName9 = "Convert parameters to destructured object"; var minimumParameterLength = 1; -var refactorDescription4 = getLocaleSpecificMessage(Diagnostics.Convert_parameters_to_destructured_object); +var refactorDescription5 = getLocaleSpecificMessage(Diagnostics.Convert_parameters_to_destructured_object); var toDestructuredAction = { - name: refactorName8, - description: refactorDescription4, + name: refactorName9, + description: refactorDescription5, kind: "refactor.rewrite.parameters.toDestructured" }; -registerRefactor(refactorName8, { +registerRefactor(refactorName9, { kinds: [toDestructuredAction.kind], getEditsForAction: getRefactorEditsToConvertParametersToDestructuredObject, getAvailableActions: getRefactorActionsToConvertParametersToDestructuredObject @@ -137883,13 +139925,13 @@ function getRefactorActionsToConvertParametersToDestructuredObject(context) { if (!functionDeclaration) return emptyArray; return [{ - name: refactorName8, - description: refactorDescription4, + name: refactorName9, + description: refactorDescription5, actions: [toDestructuredAction] }]; } function getRefactorEditsToConvertParametersToDestructuredObject(context, actionName2) { - Debug.assert(actionName2 === refactorName8, "Unexpected action name"); + Debug.assert(actionName2 === refactorName9, "Unexpected action name"); const { file, startPosition, program, cancellationToken, host } = context; const functionDeclaration = getFunctionDeclarationAtPosition(file, startPosition, program.getTypeChecker()); if (!functionDeclaration || !cancellationToken) @@ -138075,14 +140117,14 @@ function entryToFunctionCall(entry) { const functionReference = entry.node; const parent2 = functionReference.parent; switch (parent2.kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); if (callOrNewExpression && callOrNewExpression.expression === functionReference) { return callOrNewExpression; } break; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); @@ -138091,7 +140133,7 @@ function entryToFunctionCall(entry) { } } break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); @@ -138109,13 +140151,13 @@ function entryToAccessExpression(entry) { const reference = entry.node; const parent2 = reference.parent; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; @@ -138157,22 +140199,22 @@ function isValidFunctionDeclaration(functionDeclaration, checker) { if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false; switch (functionDeclaration.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: if (isObjectLiteralExpression(functionDeclaration.parent)) { const contextualSymbol = getSymbolForContextualType(functionDeclaration.name, checker); return ((_a = contextualSymbol == null ? void 0 : contextualSymbol.declarations) == null ? void 0 : _a.length) === 1 && isSingleImplementation(functionDeclaration, checker); } return isSingleImplementation(functionDeclaration, checker); - case 175 /* Constructor */: + case 176 /* Constructor */: if (isClassDeclaration(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); } - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return isValidVariableDeclaration(functionDeclaration.parent); } return false; @@ -138349,7 +140391,7 @@ function getParameterName(paramDeclaration) { } function getClassNames(constructorDeclaration) { switch (constructorDeclaration.parent.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const classDeclaration = constructorDeclaration.parent; if (classDeclaration.name) return [classDeclaration.name]; @@ -138358,7 +140400,7 @@ function getClassNames(constructorDeclaration) { "Nameless class declaration should be a default export" ); return [defaultModifier]; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: const classExpression = constructorDeclaration.parent; const variableDeclaration = constructorDeclaration.parent.parent; const className = classExpression.name; @@ -138369,7 +140411,7 @@ function getClassNames(constructorDeclaration) { } function getFunctionNames(functionDeclaration) { switch (functionDeclaration.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: if (functionDeclaration.name) return [functionDeclaration.name]; const defaultModifier = Debug.checkDefined( @@ -138377,21 +140419,21 @@ function getFunctionNames(functionDeclaration) { "Nameless function declaration should be a default export" ); return [defaultModifier]; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return [functionDeclaration.name]; - case 175 /* Constructor */: + case 176 /* Constructor */: const ctrKeyword = Debug.checkDefined( findChildOfKind(functionDeclaration, 137 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword" ); - if (functionDeclaration.parent.kind === 230 /* ClassExpression */) { + if (functionDeclaration.parent.kind === 231 /* ClassExpression */) { const variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; } return [ctrKeyword]; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return [functionDeclaration.parent.name]; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name]; return [functionDeclaration.parent.name]; @@ -138404,14 +140446,14 @@ function getFunctionNames(functionDeclaration) { var ts_refactor_convertStringOrTemplateLiteral_exports = {}; // src/services/refactors/convertStringOrTemplateLiteral.ts -var refactorName9 = "Convert to template string"; -var refactorDescription5 = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string); +var refactorName10 = "Convert to template string"; +var refactorDescription6 = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string); var convertStringAction = { - name: refactorName9, - description: refactorDescription5, + name: refactorName10, + description: refactorDescription6, kind: "refactor.rewrite.string" }; -registerRefactor(refactorName9, { +registerRefactor(refactorName10, { kinds: [convertStringAction.kind], getEditsForAction: getRefactorEditsToConvertToTemplateString, getAvailableActions: getRefactorActionsToConvertToTemplateString @@ -138420,7 +140462,7 @@ function getRefactorActionsToConvertToTemplateString(context) { const { file, startPosition } = context; const node = getNodeOrParentOfParentheses(file, startPosition); const maybeBinary = getParentBinaryExpression(node); - const refactorInfo = { name: refactorName9, description: refactorDescription5, actions: [] }; + const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] }; if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) { refactorInfo.actions.push(convertStringAction); return [refactorInfo]; @@ -138446,7 +140488,7 @@ function getRefactorEditsToConvertToTemplateString(context, actionName2) { const { file, startPosition } = context; const node = getNodeOrParentOfParentheses(file, startPosition); switch (actionName2) { - case refactorDescription5: + case refactorDescription6: return { edits: getEditsForToTemplateLiteral(context, node) }; default: return Debug.fail("invalid action"); @@ -138469,16 +140511,16 @@ function getEditsForToTemplateLiteral(context, node) { } } function isNotEqualsOperator(node) { - return node.operatorToken.kind !== 64 /* EqualsToken */; + return !(node.operatorToken.kind === 64 /* EqualsToken */ || node.operatorToken.kind === 65 /* PlusEqualsToken */); } function getParentBinaryExpression(expr) { const container = findAncestor(expr.parent, (n) => { switch (n.kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return false; - case 227 /* TemplateExpression */: - case 225 /* BinaryExpression */: + case 228 /* TemplateExpression */: + case 226 /* BinaryExpression */: return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; @@ -138628,14 +140670,14 @@ function getExpressionFromParenthesesOrExpression(node) { var ts_refactor_convertToOptionalChainExpression_exports = {}; // src/services/refactors/convertToOptionalChainExpression.ts -var refactorName10 = "Convert to optional chain expression"; +var refactorName11 = "Convert to optional chain expression"; var convertToOptionalChainExpressionMessage = getLocaleSpecificMessage(Diagnostics.Convert_to_optional_chain_expression); var toOptionalChainAction = { - name: refactorName10, + name: refactorName11, description: convertToOptionalChainExpressionMessage, kind: "refactor.rewrite.expression.optionalChain" }; -registerRefactor(refactorName10, { +registerRefactor(refactorName11, { kinds: [toOptionalChainAction.kind], getEditsForAction: getRefactorEditsToConvertToOptionalChain, getAvailableActions: getRefactorActionsToConvertToOptionalChain @@ -138646,14 +140688,14 @@ function getRefactorActionsToConvertToOptionalChain(context) { return emptyArray; if (!isRefactorErrorInfo(info)) { return [{ - name: refactorName10, + name: refactorName11, description: convertToOptionalChainExpressionMessage, actions: [toOptionalChainAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName10, + name: refactorName11, description: convertToOptionalChainExpressionMessage, actions: [{ ...toOptionalChainAction, notApplicableReason: info.error }] }]; @@ -138849,7 +140891,7 @@ __export(ts_refactor_extractSymbol_exports, { }); // src/services/refactors/extractSymbol.ts -var refactorName11 = "Extract Symbol"; +var refactorName12 = "Extract Symbol"; var extractConstantAction = { name: "Extract Constant", description: getLocaleSpecificMessage(Diagnostics.Extract_constant), @@ -138860,7 +140902,7 @@ var extractFunctionAction = { description: getLocaleSpecificMessage(Diagnostics.Extract_function), kind: "refactor.extract.function" }; -registerRefactor(refactorName11, { +registerRefactor(refactorName12, { kinds: [ extractConstantAction.kind, extractFunctionAction.kind @@ -138879,14 +140921,14 @@ function getRefactorActionsToExtractSymbol(context) { const errors = []; if (refactorKindBeginsWith(extractFunctionAction.kind, requestedRefactor)) { errors.push({ - name: refactorName11, + name: refactorName12, description: extractFunctionAction.description, actions: [{ ...extractFunctionAction, notApplicableReason: getStringError(rangeToExtract.errors) }] }); } if (refactorKindBeginsWith(extractConstantAction.kind, requestedRefactor)) { errors.push({ - name: refactorName11, + name: refactorName12, description: extractConstantAction.description, actions: [{ ...extractConstantAction, notApplicableReason: getStringError(rangeToExtract.errors) }] }); @@ -138950,37 +140992,37 @@ function getRefactorActionsToExtractSymbol(context) { const infos = []; if (functionActions.length) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_function), actions: functionActions }); } else if (context.preferences.provideRefactorNotApplicableReason && innermostErrorFunctionAction) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_function), actions: [innermostErrorFunctionAction] }); } if (constantActions.length) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_constant), actions: constantActions }); } else if (context.preferences.provideRefactorNotApplicableReason && innermostErrorConstantAction) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_constant), actions: [innermostErrorConstantAction] }); } return infos.length ? infos : emptyArray; function getStringError(errors) { - let error = errors[0].messageText; - if (typeof error !== "string") { - error = error.messageText; + let error2 = errors[0].messageText; + if (typeof error2 !== "string") { + error2 = error2.messageText; } - return error; + return error2; } } function getRefactorEditsToExtractSymbol(context, actionName2) { @@ -139055,7 +141097,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { if (!start2 || !end) { return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] }; } - if (start2.flags & 8388608 /* JSDoc */) { + if (start2.flags & 16777216 /* JSDoc */) { return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractJSDoc)] }; } if (start2.parent !== end.parent) { @@ -139126,18 +141168,18 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { function checkForStaticContext(nodeToCheck, containingClass) { let current = nodeToCheck; while (current !== containingClass) { - if (current.kind === 171 /* PropertyDeclaration */) { + if (current.kind === 172 /* PropertyDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 168 /* Parameter */) { + } else if (current.kind === 169 /* Parameter */) { const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 175 /* Constructor */) { + if (ctorOrMethod.kind === 176 /* Constructor */) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 173 /* MethodDeclaration */) { + } else if (current.kind === 174 /* MethodDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } @@ -139158,7 +141200,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { if (!isStatement(nodeToCheck) && !(isExpressionNode(nodeToCheck) && isExtractableExpression(nodeToCheck)) && !isStringLiteralJsxAttribute(nodeToCheck)) { return [createDiagnosticForNode(nodeToCheck, Messages.statementOrExpressionExpected)]; } - if (nodeToCheck.flags & 16777216 /* Ambient */) { + if (nodeToCheck.flags & 33554432 /* Ambient */) { return [createDiagnosticForNode(nodeToCheck, Messages.cannotExtractAmbientBlock)]; } const containingClass = getContainingClass(nodeToCheck); @@ -139177,7 +141219,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { /*includeClassComputedPropertyName*/ false ); - if (container.kind === 261 /* FunctionDeclaration */ || container.kind === 173 /* MethodDeclaration */ && container.parent.kind === 209 /* ObjectLiteralExpression */ || container.kind === 217 /* FunctionExpression */) { + if (container.kind === 262 /* FunctionDeclaration */ || container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ || container.kind === 218 /* FunctionExpression */) { rangeFacts |= 16 /* UsesThisInFunction */; } } @@ -139187,21 +141229,21 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { return true; } if (isDeclaration(node2)) { - const declaringNode = node2.kind === 259 /* VariableDeclaration */ ? node2.parent.parent : node2; + const declaringNode = node2.kind === 260 /* VariableDeclaration */ ? node2.parent.parent : node2; if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } } switch (node2.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); return true; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; case 108 /* SuperKeyword */: - if (node2.parent.kind === 212 /* CallExpression */) { + if (node2.parent.kind === 213 /* CallExpression */) { const containingClass2 = getContainingClass(node2); if (containingClass2 === void 0 || containingClass2.pos < span.start || containingClass2.end >= span.start + span.length) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractSuper)); @@ -139212,7 +141254,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { thisNode = node2; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: forEachChild(node2, function check(n) { if (isThis(n)) { rangeFacts |= 8 /* UsesThis */; @@ -139223,34 +141265,34 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { forEachChild(n, check); } }); - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); } - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return false; } const savedPermittedJumps = permittedJumps; switch (node2.kind) { - case 244 /* IfStatement */: + case 245 /* IfStatement */: permittedJumps &= ~4 /* Return */; break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: permittedJumps = 0 /* None */; break; - case 240 /* Block */: - if (node2.parent && node2.parent.kind === 257 /* TryStatement */ && node2.parent.finallyBlock === node2) { + case 241 /* Block */: + if (node2.parent && node2.parent.kind === 258 /* TryStatement */ && node2.parent.finallyBlock === node2) { permittedJumps = 4 /* Return */; } break; - case 296 /* DefaultClause */: - case 295 /* CaseClause */: + case 297 /* DefaultClause */: + case 296 /* CaseClause */: permittedJumps |= 1 /* Break */; break; default: @@ -139264,39 +141306,39 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { break; } switch (node2.kind) { - case 196 /* ThisType */: + case 197 /* ThisType */: case 110 /* ThisKeyword */: rangeFacts |= 8 /* UsesThis */; thisNode = node2; break; - case 255 /* LabeledStatement */: { + case 256 /* LabeledStatement */: { const label = node2.label; (seenLabels || (seenLabels = [])).push(label.escapedText); forEachChild(node2, visit); seenLabels.pop(); break; } - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: { + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: { const label = node2.label; if (label) { if (!contains(seenLabels, label.escapedText)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { - if (!(permittedJumps & (node2.kind === 251 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { + if (!(permittedJumps & (node2.kind === 252 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; } - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: rangeFacts |= 4 /* IsAsyncFunction */; break; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: rangeFacts |= 2 /* IsGenerator */; break; - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: if (permittedJumps & 4 /* Return */) { rangeFacts |= 1 /* HasReturn */; } else { @@ -139346,12 +141388,12 @@ function collectEnclosingScopes(range) { const scopes = []; while (true) { current = current.parent; - if (current.kind === 168 /* Parameter */) { + if (current.kind === 169 /* Parameter */) { current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; } if (isScope(current)) { scopes.push(current); - if (current.kind === 311 /* SourceFile */) { + if (current.kind === 312 /* SourceFile */) { return scopes; } } @@ -139427,28 +141469,28 @@ function getDescriptionForConstantInScope(scope) { } function getDescriptionForFunctionLikeDeclaration(scope) { switch (scope.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return "constructor"; - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return "arrow function"; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return `method '${scope.name.getText()}'`; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return `'get ${scope.name.getText()}'`; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return `'set ${scope.name.getText()}'`; default: Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); } } function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 262 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; + return scope.kind === 263 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; } function getDescriptionForModuleLikeDeclaration(scope) { - return scope.kind === 267 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; + return scope.kind === 268 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; } function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParameterUsages, substitutions }, exposedVariableDeclarations, range, context) { const checker = context.program.getTypeChecker(); @@ -139825,7 +141867,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); const localReference = factory.createIdentifier(localNameText); changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 243 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { + } else if (node.parent.kind === 244 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { const newVariableStatement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -139855,7 +141897,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont false ); } - if (node.parent.kind === 243 /* ExpressionStatement */) { + if (node.parent.kind === 244 /* ExpressionStatement */) { changeTracker.delete(context.file, node.parent); } else { let localReference = factory.createIdentifier(localNameText); @@ -140407,27 +142449,27 @@ function getExtractableParent(node) { function isExtractableExpression(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 305 /* EnumMember */: + case 306 /* EnumMember */: return false; } switch (node.kind) { case 11 /* StringLiteral */: - return parent2.kind !== 271 /* ImportDeclaration */ && parent2.kind !== 275 /* ImportSpecifier */; - case 229 /* SpreadElement */: - case 205 /* ObjectBindingPattern */: - case 207 /* BindingElement */: + return parent2.kind !== 272 /* ImportDeclaration */ && parent2.kind !== 276 /* ImportSpecifier */; + case 230 /* SpreadElement */: + case 206 /* ObjectBindingPattern */: + case 208 /* BindingElement */: return false; case 80 /* Identifier */: - return parent2.kind !== 207 /* BindingElement */ && parent2.kind !== 275 /* ImportSpecifier */ && parent2.kind !== 280 /* ExportSpecifier */; + return parent2.kind !== 208 /* BindingElement */ && parent2.kind !== 276 /* ImportSpecifier */ && parent2.kind !== 281 /* ExportSpecifier */; } return true; } function isBlockLike(node) { switch (node.kind) { - case 240 /* Block */: - case 311 /* SourceFile */: - case 267 /* ModuleBlock */: - case 295 /* CaseClause */: + case 241 /* Block */: + case 312 /* SourceFile */: + case 268 /* ModuleBlock */: + case 296 /* CaseClause */: return true; default: return false; @@ -140445,7 +142487,7 @@ var ts_refactor_generateGetAccessorAndSetAccessor_exports = {}; // src/services/refactors/generateGetAccessorAndSetAccessor.ts var actionName = "Generate 'get' and 'set' accessors"; -var actionDescription = Diagnostics.Generate_get_and_set_accessors.message; +var actionDescription = getLocaleSpecificMessage(Diagnostics.Generate_get_and_set_accessors); var generateGetSetAction = { name: actionName, description: actionDescription, @@ -140501,14 +142543,14 @@ registerRefactor(actionName, { var ts_refactor_inferFunctionReturnType_exports = {}; // src/services/refactors/inferFunctionReturnType.ts -var refactorName12 = "Infer function return type"; -var refactorDescription6 = Diagnostics.Infer_function_return_type.message; +var refactorName13 = "Infer function return type"; +var refactorDescription7 = getLocaleSpecificMessage(Diagnostics.Infer_function_return_type); var inferReturnTypeAction = { - name: refactorName12, - description: refactorDescription6, + name: refactorName13, + description: refactorDescription7, kind: "refactor.rewrite.function.returnType" }; -registerRefactor(refactorName12, { +registerRefactor(refactorName13, { kinds: [inferReturnTypeAction.kind], getEditsForAction: getRefactorEditsToInferReturnType, getAvailableActions: getRefactorActionsToInferReturnType @@ -140527,15 +142569,15 @@ function getRefactorActionsToInferReturnType(context) { return emptyArray; if (!isRefactorErrorInfo(info)) { return [{ - name: refactorName12, - description: refactorDescription6, + name: refactorName13, + description: refactorDescription7, actions: [inferReturnTypeAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName12, - description: refactorDescription6, + name: refactorName13, + description: refactorDescription7, actions: [{ ...inferReturnTypeAction, notApplicableReason: info.error }] }]; } @@ -140573,10 +142615,10 @@ function getInfo4(context) { } function isConvertibleDeclaration(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return true; default: return false; @@ -140659,13 +142701,13 @@ function collectTokens(program, sourceFile, span, collector, cancellationToken) let inJSXElement = false; function visit(node) { switch (node.kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { @@ -140802,25 +142844,25 @@ function isRightSideOfQualifiedNameOrPropertyAccess2(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node; } var tokenFromDeclarationMapping = /* @__PURE__ */ new Map([ - [259 /* VariableDeclaration */, 7 /* variable */], - [168 /* Parameter */, 6 /* parameter */], - [171 /* PropertyDeclaration */, 9 /* property */], - [266 /* ModuleDeclaration */, 3 /* namespace */], - [265 /* EnumDeclaration */, 1 /* enum */], - [305 /* EnumMember */, 8 /* enumMember */], - [262 /* ClassDeclaration */, 0 /* class */], - [173 /* MethodDeclaration */, 11 /* member */], - [261 /* FunctionDeclaration */, 10 /* function */], - [217 /* FunctionExpression */, 10 /* function */], - [172 /* MethodSignature */, 11 /* member */], - [176 /* GetAccessor */, 9 /* property */], - [177 /* SetAccessor */, 9 /* property */], - [170 /* PropertySignature */, 9 /* property */], - [263 /* InterfaceDeclaration */, 2 /* interface */], - [264 /* TypeAliasDeclaration */, 5 /* type */], - [167 /* TypeParameter */, 4 /* typeParameter */], - [302 /* PropertyAssignment */, 9 /* property */], - [303 /* ShorthandPropertyAssignment */, 9 /* property */] + [260 /* VariableDeclaration */, 7 /* variable */], + [169 /* Parameter */, 6 /* parameter */], + [172 /* PropertyDeclaration */, 9 /* property */], + [267 /* ModuleDeclaration */, 3 /* namespace */], + [266 /* EnumDeclaration */, 1 /* enum */], + [306 /* EnumMember */, 8 /* enumMember */], + [263 /* ClassDeclaration */, 0 /* class */], + [174 /* MethodDeclaration */, 11 /* member */], + [262 /* FunctionDeclaration */, 10 /* function */], + [218 /* FunctionExpression */, 10 /* function */], + [173 /* MethodSignature */, 11 /* member */], + [177 /* GetAccessor */, 9 /* property */], + [178 /* SetAccessor */, 9 /* property */], + [171 /* PropertySignature */, 9 /* property */], + [264 /* InterfaceDeclaration */, 2 /* interface */], + [265 /* TypeAliasDeclaration */, 5 /* type */], + [168 /* TypeParameter */, 4 /* typeParameter */], + [303 /* PropertyAssignment */, 9 /* property */], + [304 /* ShorthandPropertyAssignment */, 9 /* property */] ]); // src/services/services.ts @@ -140828,7 +142870,7 @@ var servicesVersion = "0.8"; function createNode(kind, pos, end, parent2) { const node = isNodeKind(kind) ? new NodeObject(kind, pos, end) : kind === 80 /* Identifier */ ? new IdentifierObject(80 /* Identifier */, pos, end) : kind === 81 /* PrivateIdentifier */ ? new PrivateIdentifierObject(81 /* PrivateIdentifier */, pos, end) : new TokenObject(kind, pos, end); node.parent = parent2; - node.flags = parent2.flags & 50720768 /* ContextFlags */; + node.flags = parent2.flags & 101441536 /* ContextFlags */; return node; } var NodeObject = class { @@ -140898,8 +142940,8 @@ var NodeObject = class { if (!children.length) { return void 0; } - const child = find(children, (kid) => kid.kind < 315 /* FirstJSDocNode */ || kid.kind > 356 /* LastJSDocNode */); - return child.kind < 165 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + const child = find(children, (kid) => kid.kind < 316 /* FirstJSDocNode */ || kid.kind > 357 /* LastJSDocNode */); + return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile); } getLastToken(sourceFile) { this.assertHasRealPosition(); @@ -140908,7 +142950,7 @@ var NodeObject = class { if (!child) { return void 0; } - return child.kind < 165 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 166 /* FirstNode */ ? child : child.getLastToken(sourceFile); } forEachChild(cbNode, cbNodeArray) { return forEachChild(this, cbNode, cbNodeArray); @@ -140965,7 +143007,7 @@ function addSyntheticNodes(nodes, pos, end, parent2) { } } function createSyntaxList(nodes, parent2) { - const list = createNode(357 /* SyntaxList */, nodes.pos, nodes.end, parent2); + const list = createNode(358 /* SyntaxList */, nodes.pos, nodes.end, parent2); list._children = []; let pos = nodes.pos; for (const node of nodes) { @@ -141282,7 +143324,7 @@ function getJsDocTagsOfDeclarations(declarations, checker) { var _a; if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 176 /* GetAccessor */ || declaration.kind === 177 /* SetAccessor */) { + if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { return symbol.getContextualJsDocTags(declaration, checker); } return ((_a = symbol.declarations) == null ? void 0 : _a.length) === 1 ? symbol.getJsDocTags() : void 0; @@ -141305,7 +143347,7 @@ function getDocumentationComment(declarations, checker) { const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 176 /* GetAccessor */ || declaration.kind === 177 /* SetAccessor */) { + if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { return symbol.getContextualDocumentationComment(declaration, checker); } return symbol.getDocumentationComment(checker); @@ -141319,7 +143361,7 @@ function getDocumentationComment(declarations, checker) { } function findBaseOfDeclaration(checker, declaration, cb) { var _a; - const classOrInterfaceDeclaration = ((_a = declaration.parent) == null ? void 0 : _a.kind) === 175 /* Constructor */ ? declaration.parent.parent : declaration.parent; + const classOrInterfaceDeclaration = ((_a = declaration.parent) == null ? void 0 : _a.kind) === 176 /* Constructor */ ? declaration.parent.parent : declaration.parent; if (!classOrInterfaceDeclaration) return; const isStaticMember = hasStaticModifier(declaration); @@ -141333,7 +143375,7 @@ function findBaseOfDeclaration(checker, declaration, cb) { var SourceFileObject = class extends NodeObject { constructor(kind, pos, end) { super(kind, pos, end); - this.kind = 311 /* SourceFile */; + this.kind = 312 /* SourceFile */; } update(newText, textChangeRange) { return updateSourceFile(this, newText, textChangeRange); @@ -141389,10 +143431,10 @@ var SourceFileObject = class extends NodeObject { } function visit(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: const functionDeclaration = node; const declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -141408,29 +143450,29 @@ var SourceFileObject = class extends NodeObject { } forEachChild(node, visit); break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 266 /* ModuleDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 280 /* ExportSpecifier */: - case 275 /* ImportSpecifier */: - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 186 /* TypeLiteral */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 281 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 187 /* TypeLiteral */: addDeclaration(node); forEachChild(node, visit); break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { break; } - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: { + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: { const decl = node; if (isBindingPattern(decl.name)) { forEachChild(decl.name, visit); @@ -141440,12 +143482,12 @@ var SourceFileObject = class extends NodeObject { visit(decl.initializer); } } - case 305 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 306 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: addDeclaration(node); break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDeclaration = node; if (exportDeclaration.exportClause) { if (isNamedExports(exportDeclaration.exportClause)) { @@ -141455,14 +143497,14 @@ var SourceFileObject = class extends NodeObject { } } break; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: const importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause.name); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { forEach(importClause.namedBindings.elements, visit); @@ -141470,7 +143512,7 @@ var SourceFileObject = class extends NodeObject { } } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) !== 0 /* None */) { addDeclaration(node); } @@ -141741,10 +143783,10 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h host.log(message); } } - const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const sourceMapper = getSourceMapper({ - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, + useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, getCurrentDirectory: () => currentDirectory, getProgram, fileExists: maybeBind(host, host.fileExists), @@ -141756,9 +143798,9 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h function getValidSourceFile(fileName) { const sourceFile = program.getSourceFile(fileName); if (!sourceFile) { - const error = new Error(`Could not find source file: '${fileName}'.`); - error.ProgramFiles = program.getSourceFiles().map((f) => f.fileName); - throw error; + const error2 = new Error(`Could not find source file: '${fileName}'.`); + error2.ProgramFiles = program.getSourceFiles().map((f) => f.fileName); + throw error2; } return sourceFile; } @@ -141792,7 +143834,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h getSourceFileByPath: getOrCreateSourceFileByPath, getCancellationToken: () => cancellationToken, getCanonicalFileName, - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, + useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, getNewLine: () => getNewLineCharacter(newSettings), getDefaultLibFileName: (options2) => host.getDefaultLibFileName(options2), writeFile: noop, @@ -141836,9 +143878,12 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h compilerHost.getSourceFile = getSourceFileWithCache; (_c = host.setCompilerHost) == null ? void 0 : _c.call(host, compilerHost); const parseConfigHost = { - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, fileExists: (fileName) => compilerHost.fileExists(fileName), readFile: (fileName) => compilerHost.readFile(fileName), + directoryExists: (f) => compilerHost.directoryExists(f), + getDirectories: (f) => compilerHost.getDirectories(f), + realpath: compilerHost.realpath, readDirectory: (...args) => compilerHost.readDirectory(...args), trace: compilerHost.trace, getCurrentDirectory: compilerHost.getCurrentDirectory, @@ -141991,14 +144036,14 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h } } function cleanupSemanticCache() { - program = void 0; - } - function dispose() { if (program) { const key = documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions()); forEach(program.getSourceFiles(), (f) => documentRegistry.releaseDocumentWithKey(f.resolvedPath, key, f.scriptKind, f.impliedNodeFormat)); program = void 0; } + } + function dispose() { + cleanupSemanticCache(); host = void 0; } function getSyntacticDiagnostics(fileName) { @@ -142117,15 +144162,15 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h switch (node.kind) { case 80 /* Identifier */: return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 210 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: return !isInComment(sourceFile, position); case 110 /* ThisKeyword */: - case 196 /* ThisType */: + case 197 /* ThisType */: case 108 /* SuperKeyword */: - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return true; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return isImportMeta(node); default: return false; @@ -142225,15 +144270,15 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h return void 0; } switch (node.kind) { - case 210 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: case 11 /* StringLiteral */: case 97 /* FalseKeyword */: case 112 /* TrueKeyword */: case 106 /* NullKeyword */: case 108 /* SuperKeyword */: case 110 /* ThisKeyword */: - case 196 /* ThisType */: + case 197 /* ThisType */: case 80 /* Identifier */: break; default: @@ -142244,7 +144289,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 266 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 267 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { break; @@ -142421,7 +144466,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h function getLinkedEditingRangeAtPosition(fileName, position) { const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); const token = findPrecedingToken(position, sourceFile); - if (!token || token.parent.kind === 311 /* SourceFile */) + if (!token || token.parent.kind === 312 /* SourceFile */) return void 0; const jsxTagWordPattern = "[a-zA-Z0-9:\\-\\._$]*"; if (isJsxFragment(token.parent.parent)) { @@ -142669,7 +144714,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h return !tagNamesAreEquivalent(openingElement.tagName, closingElement.tagName) || isJsxElement(parent2) && tagNamesAreEquivalent(openingElement.tagName, parent2.openingElement.tagName) && isUnclosedTag(parent2); } function isUnclosedFragment({ closingFragment, parent: parent2 }) { - return !!(closingFragment.flags & 131072 /* ThisNodeHasError */) || isJsxFragment(parent2) && isUnclosedFragment(parent2); + return !!(closingFragment.flags & 262144 /* ThisNodeHasError */) || isJsxFragment(parent2) && isUnclosedFragment(parent2); } function getSpanOfEnclosingComment(fileName, position, onlyMultiLine) { const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); @@ -142711,7 +144756,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h } return result; function escapeRegExp(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&"); } function getTodoCommentsRegExp() { const singleLineCommentStart = /(?:\/\/+\s*)/.source; @@ -142779,10 +144824,10 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h const newFileName = createNewFileName(sourceFile, program, getRefactorContext(sourceFile, positionOrRange, preferences, emptyOptions), host); return { newFileName, files }; } - function getEditsForRefactor2(fileName, formatOptions, positionOrRange, refactorName13, actionName2, preferences = emptyOptions, interactiveRefactorArguments) { + function getEditsForRefactor2(fileName, formatOptions, positionOrRange, refactorName14, actionName2, preferences = emptyOptions, interactiveRefactorArguments) { synchronizeHostData(); const file = getValidSourceFile(fileName); - return ts_refactor_exports.getEditsForRefactor(getRefactorContext(file, positionOrRange, preferences, formatOptions), refactorName13, actionName2, interactiveRefactorArguments); + return ts_refactor_exports.getEditsForRefactor(getRefactorContext(file, positionOrRange, preferences, formatOptions), refactorName14, actionName2, interactiveRefactorArguments); } function toLineColumnOffset(fileName, position) { if (position === 0) { @@ -142930,7 +144975,7 @@ function initializeNameTable(sourceFile) { }); } function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 282 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); + return isDeclarationName(node) || node.parent.kind === 283 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); @@ -142941,11 +144986,11 @@ function getContainingObjectLiteralElementWorker(node) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; } case 80 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 209 /* ObjectLiteralExpression */ || node.parent.parent.kind === 291 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; + return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.parent.kind === 292 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; } return void 0; } @@ -142986,7 +145031,7 @@ function getPropertySymbolsFromContextualType(node, checker, contextualType, uni return discriminatedPropertySymbols; } function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 211 /* ElementAccessExpression */ && node.parent.argumentExpression === node; + return node && node.parent && node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { if (sys) { @@ -143971,7 +146016,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } tokenAtLocation = preceding; } - if (tokenAtLocation.flags & 16777216 /* Ambient */) { + if (tokenAtLocation.flags & 33554432 /* Ambient */) { return void 0; } return spanInNode(tokenAtLocation); @@ -144014,89 +146059,89 @@ function spanInSourceFileAtLocation(sourceFile, position) { if (node) { const { parent: parent2 } = node; switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 259 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 260 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return spanInVariableDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return spanInParameterDeclaration(node); - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 240 /* Block */: + case 241 /* Block */: if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return spanInBlock(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return spanInBlock(node.block); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return textSpan(node.expression); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return spanInNode(node.statement); - case 258 /* DebuggerStatement */: + case 259 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return spanInNode(node.statement); - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return spanInForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return spanInInitializerOfForLike(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return spanInNode(node.statements[0]); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return spanInBlock(node.tryBlock); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return textSpan(node, node.expression); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return textSpan(node, node.expression); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return textSpan(node, node.moduleReference); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (getModuleInstanceState(node) !== 1 /* Instantiated */) { return void 0; } - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 207 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 208 /* BindingElement */: return textSpan(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return spanInNode(node.statement); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return spanInBindingPattern(node); - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return void 0; case 27 /* SemicolonToken */: case 1 /* EndOfFileToken */: @@ -144124,16 +146169,16 @@ function spanInSourceFileAtLocation(sourceFile, position) { case 85 /* CatchKeyword */: case 98 /* FinallyKeyword */: return spanInNextNode(node); - case 164 /* OfKeyword */: + case 165 /* OfKeyword */: return spanInOfKeyword(node); default: if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 80 /* Identifier */ || node.kind === 229 /* SpreadElement */ || node.kind === 302 /* PropertyAssignment */ || node.kind === 303 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { + if ((node.kind === 80 /* Identifier */ || node.kind === 230 /* SpreadElement */ || node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { return textSpan(node); } - if (node.kind === 225 /* BinaryExpression */) { + if (node.kind === 226 /* BinaryExpression */) { const { left, operatorToken } = node; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern( @@ -144149,19 +146194,19 @@ function spanInSourceFileAtLocation(sourceFile, position) { } if (isExpressionNode(node)) { switch (parent2.kind) { - case 245 /* DoStatement */: + case 246 /* DoStatement */: return spanInPreviousNode(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNode(node.parent); - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: return textSpan(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (node.parent.operatorToken.kind === 28 /* CommaToken */) { return textSpan(node); } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (node.parent.body === node) { return textSpan(node); } @@ -144169,25 +146214,25 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } switch (node.parent.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } break; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: if (node.parent.type === node) { return spanInNextNode(node.parent.type); } break; - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: { + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: { const { initializer, type } = node.parent; if (initializer === node || type === node || isAssignmentOperator(node.kind)) { return spanInPreviousNode(node); } break; } - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const { left } = node.parent; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { return spanInPreviousNode(node); @@ -144210,14 +146255,14 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 248 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 249 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } const parent2 = variableDeclaration.parent; if (isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } - if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 249 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 250 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -144244,7 +146289,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 262 /* ClassDeclaration */ && functionDeclaration.kind !== 175 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 263 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -144264,22 +146309,22 @@ function spanInSourceFileAtLocation(sourceFile, position) { } function spanInBlock(block) { switch (block.parent.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return void 0; } - case 246 /* WhileStatement */: - case 244 /* IfStatement */: - case 248 /* ForInStatement */: + case 247 /* WhileStatement */: + case 245 /* IfStatement */: + case 249 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 260 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 261 /* VariableDeclarationList */) { const variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -144302,64 +146347,64 @@ function spanInSourceFileAtLocation(sourceFile, position) { function spanInBindingPattern(bindingPattern) { const firstBindingElement = forEach( bindingPattern.elements, - (element) => element.kind !== 231 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 207 /* BindingElement */) { + if (bindingPattern.parent.kind === 208 /* BindingElement */) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 206 /* ArrayBindingPattern */ && node2.kind !== 205 /* ObjectBindingPattern */); - const elements = node2.kind === 208 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; + Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */); + const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; const firstBindingElement = forEach( elements, - (element) => element.kind !== 231 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node2.parent.kind === 225 /* BinaryExpression */ ? node2.parent : node2); + return textSpan(node2.parent.kind === 226 /* BinaryExpression */ ? node2.parent : node2); } function spanInOpenBraceToken(node2) { switch (node2.parent.kind) { - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: const enumDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const classDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); } return spanInNode(node2.parent); } function spanInCloseBraceToken(node2) { switch (node2.parent.kind) { - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { return void 0; } - case 265 /* EnumDeclaration */: - case 262 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 263 /* ClassDeclaration */: return textSpan(node2); - case 240 /* Block */: + case 241 /* Block */: if (isFunctionBlock(node2.parent)) { return textSpan(node2); } - case 298 /* CatchClause */: + case 299 /* CatchClause */: return spanInNode(lastOrUndefined(node2.parent.statements)); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: const caseBlock = node2.parent; const lastClause = lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(lastOrUndefined(lastClause.statements)); } return void 0; - case 205 /* ObjectBindingPattern */: + case 206 /* ObjectBindingPattern */: const bindingPattern = node2.parent; return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -144372,7 +146417,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } function spanInCloseBracketToken(node2) { switch (node2.parent.kind) { - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: const bindingPattern = node2.parent; return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -144384,57 +146429,57 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInOpenParenToken(node2) { - if (node2.parent.kind === 245 /* DoStatement */ || // Go to while keyword and do action instead - node2.parent.kind === 212 /* CallExpression */ || node2.parent.kind === 213 /* NewExpression */) { + if (node2.parent.kind === 246 /* DoStatement */ || // Go to while keyword and do action instead + node2.parent.kind === 213 /* CallExpression */ || node2.parent.kind === 214 /* NewExpression */) { return spanInPreviousNode(node2); } - if (node2.parent.kind === 216 /* ParenthesizedExpression */) { + if (node2.parent.kind === 217 /* ParenthesizedExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInCloseParenToken(node2) { switch (node2.parent.kind) { - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: - case 246 /* WhileStatement */: - case 245 /* DoStatement */: - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 216 /* ParenthesizedExpression */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: + case 247 /* WhileStatement */: + case 246 /* DoStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 217 /* ParenthesizedExpression */: return spanInPreviousNode(node2); default: return spanInNode(node2.parent); } } function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 302 /* PropertyAssignment */ || node2.parent.kind === 168 /* Parameter */) { + if (isFunctionLike(node2.parent) || node2.parent.kind === 303 /* PropertyAssignment */ || node2.parent.kind === 169 /* Parameter */) { return spanInPreviousNode(node2); } return spanInNode(node2.parent); } function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 215 /* TypeAssertionExpression */) { + if (node2.parent.kind === 216 /* TypeAssertionExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInWhileKeyword(node2) { - if (node2.parent.kind === 245 /* DoStatement */) { + if (node2.parent.kind === 246 /* DoStatement */) { return textSpanEndingAtNextToken(node2, node2.parent.expression); } return spanInNode(node2.parent); } function spanInOfKeyword(node2) { - if (node2.parent.kind === 249 /* ForOfStatement */) { + if (node2.parent.kind === 250 /* ForOfStatement */) { return spanInNextNode(node2); } return spanInNode(node2.parent); @@ -144523,16 +146568,16 @@ function getCallHierarchItemContainerName(node) { return; } switch (node.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - if (node.parent.kind === 209 /* ObjectLiteralExpression */) { + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + if (node.parent.kind === 210 /* ObjectLiteralExpression */) { return (_a = getAssignedName(node.parent)) == null ? void 0 : _a.getText(); } return (_b = getNameOfDeclaration(node.parent)) == null ? void 0 : _b.getText(); - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { return node.parent.parent.name.getText(); } @@ -144734,7 +146779,7 @@ function createCallSiteCollector(program, callSites) { function collect(node) { if (!node) return; - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return; } if (isValidCallHierarchyDeclaration(node)) { @@ -144749,55 +146794,55 @@ function createCallSiteCollector(program, callSites) { } switch (node.kind) { case 80 /* Identifier */: - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return; - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: recordCallSite(node); return; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: collect(node.expression); return; - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: collect(node.name); collect(node.initializer); return; - case 212 /* CallExpression */: + case 213 /* CallExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 213 /* NewExpression */: + case 214 /* NewExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: recordCallSite(node); collect(node.tag); collect(node.template); return; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: recordCallSite(node); collect(node.tagName); collect(node.attributes); return; - case 169 /* Decorator */: + case 170 /* Decorator */: recordCallSite(node); collect(node.expression); return; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: recordCallSite(node); forEachChild(node, collect); break; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: collect(node.expression); return; } @@ -144850,25 +146895,25 @@ function collectCallSites(program, node) { const callSites = []; const collect = createCallSiteCollector(program, callSites); switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: collectCallSitesOfSourceFile(node, collect); break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: collectCallSitesOfModuleDeclaration(node, collect); break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: collectCallSitesOfClassLikeDeclaration(node, collect); break; - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: collectCallSitesOfClassStaticBlockDeclaration(node, collect); break; default: @@ -144883,7 +146928,7 @@ function convertCallSiteGroupToOutgoingCall(program, entries) { return createCallHierarchyOutgoingCall(createCallHierarchyItem(program, entries[0].declaration), map(entries, (entry) => createTextSpanFromRange(entry.range))); } function getOutgoingCalls(program, declaration) { - if (declaration.flags & 16777216 /* Ambient */ || isMethodSignature(declaration)) { + if (declaration.flags & 33554432 /* Ambient */ || isMethodSignature(declaration)) { return []; } return group(collectCallSites(program, declaration), getCallSiteGroupKey, (entries) => convertCallSiteGroupToOutgoingCall(program, entries)); @@ -144934,7 +146979,7 @@ __export(ts_codefix_exports, { getFixes: () => getFixes, getImportCompletionAction: () => getImportCompletionAction, getImportKind: () => getImportKind, - getJSDocTypedefNode: () => getJSDocTypedefNode, + getJSDocTypedefNodes: () => getJSDocTypedefNodes, getNoopSymbolTrackerWithResolver: () => getNoopSymbolTrackerWithResolver, getPromoteTypeOnlyCompletionAction: () => getPromoteTypeOnlyCompletionAction, getSupportedErrorCodes: () => getSupportedErrorCodes, @@ -144974,9 +147019,9 @@ function createCodeFixActionWorker(fixName8, description3, changes, fixId52, fix return { fixName: fixName8, description: description3, changes, fixId: fixId52, fixAllDescription, commands: command ? [command] : void 0 }; } function registerCodeFix(reg) { - for (const error of reg.errorCodes) { + for (const error2 of reg.errorCodes) { errorCodeToFixesArray = void 0; - errorCodeToFixes.add(String(error), reg); + errorCodeToFixes.add(String(error2), reg); } if (reg.fixIds) { for (const fixId52 of reg.fixIds) { @@ -145071,6 +147116,7 @@ function getAssertion(sourceFile, pos) { registerCodeFix({ errorCodes: [ Diagnostics.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.code, + Diagnostics.await_using_statements_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.code, Diagnostics.for_await_loops_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.code ], getCodeActions: function getCodeActionsToAddEmptyExportDeclaration(context) { @@ -145267,7 +147313,7 @@ function findAwaitableInitializers(expression, sourceFile, cancellationToken, pr } const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 242 /* VariableStatement */); + const variableStatement = getAncestor(declaration, 243 /* VariableStatement */); if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; @@ -145326,7 +147372,7 @@ function symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, c checker.getTypeAtLocation(errorNode).flags & 1 /* Any */; } function isInsideAwaitableBody(node) { - return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 261 /* FunctionDeclaration */ || ancestor.parent.kind === 217 /* FunctionExpression */ || ancestor.parent.kind === 218 /* ArrowFunction */ || ancestor.parent.kind === 173 /* MethodDeclaration */)); + return node.kind & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 262 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -145448,10 +147494,10 @@ function applyChange(changeTracker, initializer, sourceFile, fixedNodes) { function isPossiblyPartOfDestructuring(node) { switch (node.kind) { case 80 /* Identifier */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return true; default: return false; @@ -145468,7 +147514,7 @@ function arrayElementCouldBeVariableDeclaration(expression, checker) { function isPossiblyPartOfCommaSeperatedInitializer(node) { switch (node.kind) { case 80 /* Identifier */: - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: case 28 /* CommaToken */: return true; default: @@ -145510,7 +147556,7 @@ function makeChange5(changeTracker, sourceFile, pos, fixedNodes) { return; } const declaration = token.parent; - if (declaration.kind === 171 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { + if (declaration.kind === 172 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { changeTracker.insertModifierBefore(sourceFile, 138 /* DeclareKeyword */, declaration); } } @@ -145654,7 +147700,7 @@ function addUndefinedToOptionalProperty(changes, toAdd) { const d = add.valueDeclaration; if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ - ...d.type.kind === 191 /* UnionType */ ? d.type.types : [d.type], + ...d.type.kind === 192 /* UnionType */ ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") ]); changes.replaceNode(d.getSourceFile(), d.type, t); @@ -145722,26 +147768,26 @@ function doChange8(changes, sourceFile, decl) { } } function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 259 /* VariableDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 171 /* PropertyDeclaration */; + return isFunctionLikeDeclaration(node) || node.kind === 260 /* VariableDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 172 /* PropertyDeclaration */; } function transformJSDocType(node) { switch (node.kind) { - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: return factory.createTypeReferenceNode("any", emptyArray); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return transformJSDocOptionalType(node); - case 321 /* JSDocNonNullableType */: + case 322 /* JSDocNonNullableType */: return transformJSDocType(node.type); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return transformJSDocNullableType(node); - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: return transformJSDocVariadicType(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return transformJSDocFunctionType(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return transformJSDocTypeReference(node); - case 328 /* JSDocTypeLiteral */: + case 329 /* JSDocTypeLiteral */: return transformJSDocTypeLiteral(node); default: const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); @@ -145774,7 +147820,7 @@ function transformJSDocFunctionType(node) { } function transformJSDocParameter(node) { const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 324 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; + const isRest = node.type.kind === 325 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; const name = node.name || (isRest ? "rest" : "arg" + index); const dotdotdot = isRest ? factory.createToken(26 /* DotDotDotToken */) : node.dotDotDotToken; return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer); @@ -145941,7 +147987,7 @@ function doChange9(changes, sourceFile, position, checker, preferences, compiler })) { return; } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 243 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; + const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 244 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; changes.delete(sourceFile, nodeToDelete); if (!assignmentExpr) { members.push(factory.createPropertyDeclaration( @@ -146026,7 +148072,7 @@ function doChange9(changes, sourceFile, position, checker, preferences, compiler function createArrowFunctionExpressionMember(members2, arrowFunction, name) { const arrowFunctionBody = arrowFunction.body; let bodyBlock; - if (arrowFunctionBody.kind === 240 /* Block */) { + if (arrowFunctionBody.kind === 241 /* Block */) { bodyBlock = arrowFunctionBody; } else { bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); @@ -146583,7 +148629,7 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, i switch (func.kind) { case 106 /* NullKeyword */: break; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: case 80 /* Identifier */: if (!inputArgName) { break; @@ -146608,8 +148654,8 @@ function transformCallbackArgument(func, hasContinuation, continuationArgName, i continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); } return varDeclOrAssignment; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: { + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: { const funcBody = func.body; const returnType2 = (_a = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a.getReturnType(); if (isBlock(funcBody)) { @@ -146845,7 +148891,7 @@ function fixImportOfModuleExports(importingFile, exportingFile, changes, quotePr } const importNode = importFromModuleSpecifier(moduleSpecifier); switch (importNode.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: changes.replaceNode(importingFile, importNode, makeImport( importNode.name, /*namedImports*/ @@ -146854,7 +148900,7 @@ function fixImportOfModuleExports(importingFile, exportingFile, changes, quotePr quotePreference )); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isRequireCall( importNode, /*requireStringLiteralLikeArgument*/ @@ -146923,13 +148969,13 @@ function forEachExportReference(sourceFile, cb) { } function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) { switch (statement.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); return false; - case 243 /* ExpressionStatement */: { + case 244 /* ExpressionStatement */: { const { expression } = statement; switch (expression.kind) { - case 212 /* CallExpression */: { + case 213 /* CallExpression */: { if (isRequireCall( expression, /*requireStringLiteralLikeArgument*/ @@ -146946,7 +148992,7 @@ function convertStatement(sourceFile, statement, checker, changes, identifiers, } return false; } - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const { operatorToken } = expression; return operatorToken.kind === 64 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify); } @@ -147000,8 +149046,8 @@ function convertVariableStatement(sourceFile, statement, changes, checker, ident } function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: { + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: { const tmp = makeUniqueName(propertyName, identifiers); return convertedImports([ makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), @@ -147049,14 +149095,14 @@ function convertAssignment(sourceFile, checker, assignment, changes, exports, us function tryChangeModuleExportsObject(object, useSitesToUnqualify) { const statements = mapAllOrFail(object.properties, (prop) => { switch (prop.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return void 0; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(95 /* ExportKeyword */)], prop, useSitesToUnqualify); default: Debug.assertNever(prop, `Convert to ES6 got invalid prop kind ${prop.kind}`); @@ -147134,15 +149180,15 @@ function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sour function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { const modifiers = [factory.createToken(95 /* ExportKeyword */)]; switch (exported.kind) { - case 217 /* FunctionExpression */: { + case 218 /* FunctionExpression */: { const { name: expressionName } = exported; if (expressionName && expressionName.text !== name) { return exportConst(); } } - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); default: return exportConst(); @@ -147167,7 +149213,7 @@ function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { replaceNode ); function replaceNode(original) { - if (original.kind === 210 /* PropertyAccessExpression */) { + if (original.kind === 211 /* PropertyAccessExpression */) { const replacement = useSitesToUnqualify.get(original); useSitesToUnqualify.delete(original); return replacement; @@ -147176,7 +149222,7 @@ function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { } function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: { + case 206 /* ObjectBindingPattern */: { const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier(e.propertyName) || !isIdentifier(e.name) ? void 0 : makeImportSpecifier2(e.propertyName && e.propertyName.text, e.name.text)); if (importSpecifiers) { return convertedImports([makeImport( @@ -147188,7 +149234,7 @@ function convertSingleImport(name, moduleSpecifier, checker, identifiers, target )]); } } - case 206 /* ArrayBindingPattern */: { + case 207 /* ArrayBindingPattern */: { const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); return convertedImports([ makeImport( @@ -147275,11 +149321,11 @@ function forEachFreeIdentifier(node, cb) { function isFreeIdentifier(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return parent2.name !== node; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return parent2.propertyName !== node; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return parent2.propertyName !== node; default: return true; @@ -147486,19 +149532,41 @@ var fixId13 = "convertToTypeOnlyImport"; registerCodeFix({ errorCodes: errorCodes14, getCodeActions: function getCodeActionsToConvertToTypeOnlyImport(context) { + var _a; const declaration = getDeclaration2(context.sourceFile, context.span.start); if (declaration) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration)); - return [createCodeFixAction(fixId13, changes, Diagnostics.Convert_to_type_only_import, fixId13, Diagnostics.Convert_all_imports_not_used_as_a_value_to_type_only_imports)]; + const importDeclarationChanges = declaration.kind === 276 /* ImportSpecifier */ && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0; + const mainAction = createCodeFixAction( + fixId13, + changes, + declaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Use_type_0, ((_a = declaration.propertyName) == null ? void 0 : _a.text) ?? declaration.name.text] : Diagnostics.Use_import_type, + fixId13, + Diagnostics.Fix_all_with_type_only_imports + ); + if (some(importDeclarationChanges)) { + return [ + createCodeFixActionWithoutFixAll(fixId13, importDeclarationChanges, Diagnostics.Use_import_type), + mainAction + ]; + } + return [mainAction]; } return void 0; }, fixIds: [fixId13], getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyImport(context) { + const fixedImportDeclarations = /* @__PURE__ */ new Set(); return codeFixAll(context, errorCodes14, (changes, diag2) => { - const declaration = getDeclaration2(diag2.file, diag2.start); - if (declaration) { - doChange11(changes, diag2.file, declaration); + const errorDeclaration = getDeclaration2(diag2.file, diag2.start); + if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 272 /* ImportDeclaration */ && !fixedImportDeclarations.has(errorDeclaration)) { + doChange11(changes, diag2.file, errorDeclaration); + fixedImportDeclarations.add(errorDeclaration); + } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */ && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) { + doChange11(changes, diag2.file, errorDeclaration.parent.parent.parent); + fixedImportDeclarations.add(errorDeclaration.parent.parent.parent); + } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */) { + doChange11(changes, diag2.file, errorDeclaration); } }); } @@ -147507,7 +149575,27 @@ function getDeclaration2(sourceFile, pos) { const { parent: parent2 } = getTokenAtPosition(sourceFile, pos); return isImportSpecifier(parent2) || isImportDeclaration(parent2) && parent2.importClause ? parent2 : void 0; } +function canConvertImportDeclarationForSpecifier(specifier, sourceFile, program) { + if (specifier.parent.parent.name) { + return false; + } + const nonTypeOnlySpecifiers = specifier.parent.elements.filter((e) => !e.isTypeOnly); + if (nonTypeOnlySpecifiers.length === 1) { + return true; + } + const checker = program.getTypeChecker(); + for (const specifier2 of nonTypeOnlySpecifiers) { + const isUsedAsValue = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(specifier2.name, checker, sourceFile, (usage) => { + return !isValidTypeOnlyAliasUseSite(usage); + }); + if (isUsedAsValue) { + return false; + } + } + return true; +} function doChange11(changes, sourceFile, declaration) { + var _a; if (isImportSpecifier(declaration)) { changes.replaceNode(sourceFile, declaration, factory.updateImportSpecifier( declaration, @@ -147578,6 +149666,16 @@ function doChange11(changes, sourceFile, declaration) { ) ]); } else { + const newNamedBindings = ((_a = importClause.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */ ? factory.updateNamedImports( + importClause.namedBindings, + sameMap(importClause.namedBindings.elements, (e) => factory.updateImportSpecifier( + e, + /*isTypeOnly*/ + false, + e.propertyName, + e.name + )) + ) : importClause.namedBindings; const importDeclaration = factory.updateImportDeclaration( declaration, declaration.modifiers, @@ -147586,7 +149684,7 @@ function doChange11(changes, sourceFile, declaration) { /*isTypeOnly*/ true, importClause.name, - importClause.namedBindings + newNamedBindings ), declaration.moduleSpecifier, declaration.assertClause @@ -147603,13 +149701,14 @@ registerCodeFix({ fixIds: [fixId14], errorCodes: errorCodes15, getCodeActions(context) { + const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); const node = getTokenAtPosition( context.sourceFile, context.span.start ); if (!node) return; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange12(t, node, context.sourceFile)); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange12(t, node, context.sourceFile, newLineCharacter)); if (changes.length > 0) { return [ createCodeFixAction( @@ -147622,29 +149721,72 @@ registerCodeFix({ ]; } }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes15, (changes, diag2) => { - const node = getTokenAtPosition(diag2.file, diag2.start); - if (node) - doChange12(changes, node, diag2.file); - }) + getAllCodeActions: (context) => codeFixAll( + context, + errorCodes15, + (changes, diag2) => { + const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); + const node = getTokenAtPosition(diag2.file, diag2.start); + const fixAll = true; + if (node) + doChange12(changes, node, diag2.file, newLineCharacter, fixAll); + } + ) }); -function doChange12(changes, node, sourceFile) { - if (isJSDocTypedefTag(node)) { - fixSingleTypeDef(changes, node, sourceFile); - } -} -function fixSingleTypeDef(changes, typeDefNode, sourceFile) { - if (!typeDefNode) +function doChange12(changes, node, sourceFile, newLine, fixAll = false) { + if (!isJSDocTypedefTag(node)) return; - const declaration = createDeclaration(typeDefNode); + const declaration = createDeclaration(node); if (!declaration) return; - const comment = typeDefNode.parent; - changes.replaceNode( - sourceFile, - comment, - declaration + const commentNode = node.parent; + const { leftSibling, rightSibling } = getLeftAndRightSiblings(node); + let pos = commentNode.getStart(); + let prefix = ""; + if (!leftSibling && commentNode.comment) { + pos = findEndOfTextBetween(commentNode, commentNode.getStart(), node.getStart()); + prefix = `${newLine} */${newLine}`; + } + if (leftSibling) { + if (fixAll && isJSDocTypedefTag(leftSibling)) { + pos = node.getStart(); + prefix = ""; + } else { + pos = findEndOfTextBetween(commentNode, leftSibling.getStart(), node.getStart()); + prefix = `${newLine} */${newLine}`; + } + } + let end = commentNode.getEnd(); + let suffix = ""; + if (rightSibling) { + if (fixAll && isJSDocTypedefTag(rightSibling)) { + end = rightSibling.getStart(); + suffix = `${newLine}${newLine}`; + } else { + end = rightSibling.getStart(); + suffix = `${newLine}/**${newLine} * `; + } + } + changes.replaceRange(sourceFile, { pos, end }, declaration, { prefix, suffix }); +} +function getLeftAndRightSiblings(typedefNode) { + const commentNode = typedefNode.parent; + const maxChildIndex = commentNode.getChildCount() - 1; + const currentNodeIndex = commentNode.getChildren().findIndex( + (n) => n.getStart() === typedefNode.getStart() && n.getEnd() === typedefNode.getEnd() ); + const leftSibling = currentNodeIndex > 0 ? commentNode.getChildAt(currentNodeIndex - 1) : void 0; + const rightSibling = currentNodeIndex < maxChildIndex ? commentNode.getChildAt(currentNodeIndex + 1) : void 0; + return { leftSibling, rightSibling }; +} +function findEndOfTextBetween(jsDocComment, from, to) { + const comment = jsDocComment.getText().substring(from - jsDocComment.getStart(), to - jsDocComment.getStart()); + for (let i = comment.length; i > 0; i--) { + if (!/[*/\s]/g.test(comment.substring(i - 1, i))) { + return from + i; + } + } + return to; } function createDeclaration(tag) { var _a; @@ -147654,10 +149796,10 @@ function createDeclaration(tag) { const typeName = (_a = tag.name) == null ? void 0 : _a.getText(); if (!typeName) return; - if (typeExpression.kind === 328 /* JSDocTypeLiteral */) { + if (typeExpression.kind === 329 /* JSDocTypeLiteral */) { return createInterfaceForTypeLiteral(typeName, typeExpression); } - if (typeExpression.kind === 315 /* JSDocTypeExpression */) { + if (typeExpression.kind === 316 /* JSDocTypeExpression */) { return createTypeAliasForTypeExpression(typeName, typeExpression); } } @@ -147665,7 +149807,7 @@ function createInterfaceForTypeLiteral(typeName, typeLiteral) { const propertySignatures = createSignatureFromTypeLiteral(typeLiteral); if (!some(propertySignatures)) return; - const interfaceDeclaration = factory.createInterfaceDeclaration( + return factory.createInterfaceDeclaration( /*modifiers*/ void 0, typeName, @@ -147675,13 +149817,12 @@ function createInterfaceForTypeLiteral(typeName, typeLiteral) { void 0, propertySignatures ); - return interfaceDeclaration; } function createTypeAliasForTypeExpression(typeName, typeExpression) { const typeReference = getSynthesizedDeepClone(typeExpression.type); if (!typeReference) return; - const declaration = factory.createTypeAliasDeclaration( + return factory.createTypeAliasDeclaration( /*modifiers*/ void 0, factory.createIdentifier(typeName), @@ -147689,7 +149830,6 @@ function createTypeAliasForTypeExpression(typeName, typeExpression) { void 0, typeReference ); - return declaration; } function createSignatureFromTypeLiteral(typeLiteral) { const propertyTags = typeLiteral.jsDocPropertyTags; @@ -147709,30 +149849,28 @@ function createSignatureFromTypeLiteral(typeLiteral) { } if (typeReference && name) { const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; - const prop = factory.createPropertySignature( + return factory.createPropertySignature( /*modifiers*/ void 0, name, questionToken, typeReference ); - return prop; } }; - const props = mapDefined(propertyTags, getSignature); - return props; + return mapDefined(propertyTags, getSignature); } function getPropertyName(tag) { return tag.name.kind === 80 /* Identifier */ ? tag.name.text : tag.name.right.text; } -function getJSDocTypedefNode(node) { +function getJSDocTypedefNodes(node) { if (hasJSDocNodes(node)) { - return forEach(node.jsDoc, (node2) => { + return flatMap(node.jsDoc, (doc) => { var _a; - return (_a = node2.tags) == null ? void 0 : _a.find(isJSDocTypedefTag); + return (_a = doc.tags) == null ? void 0 : _a.filter((tag) => isJSDocTypedefTag(tag)); }); } - return void 0; + return []; } // src/services/codefixes/convertLiteralTypeToMappedType.ts @@ -148080,8 +150218,13 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre return `${topLevelTypeOnly ? 1 : 0}|${moduleSpecifier}`; } } - function writeFixes(changeTracker) { - const quotePreference = getQuotePreference(sourceFile, preferences); + function writeFixes(changeTracker, oldFileQuotePreference) { + let quotePreference; + if (sourceFile.imports.length === 0 && oldFileQuotePreference !== void 0) { + quotePreference = oldFileQuotePreference; + } else { + quotePreference = getQuotePreference(sourceFile, preferences); + } for (const fix of addToNamespace) { addNamespaceQualifier(changeTracker, sourceFile, fix); } @@ -148269,11 +150412,11 @@ function tryUseExistingNamespaceImport(existingImports, position) { function getNamespaceLikeImportText(declaration) { var _a, _b, _c; switch (declaration.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return (_a = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a.text; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return declaration.name.text; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); @@ -148305,11 +150448,11 @@ function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker } return best; function getAddToExistingImportFix({ declaration, importKind, symbol, targetFlags }) { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 270 /* ImportEqualsDeclaration */) { + if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 271 /* ImportEqualsDeclaration */) { return void 0; } - if (declaration.kind === 259 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 205 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; + if (declaration.kind === 260 /* VariableDeclaration */) { + return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 206 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; } const { importClause } = declaration; if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier)) { @@ -148332,7 +150475,7 @@ function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker addAsTypeOnly === 2 /* Required */ && namedBindings)) { return void 0; } - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 273 /* NamespaceImport */) { + if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 274 /* NamespaceImport */) { return void 0; } return { @@ -148353,7 +150496,7 @@ function createExistingImportMap(checker, importingFile, compilerOptions) { if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); } - } else if (i.kind === 271 /* ImportDeclaration */ || i.kind === 270 /* ImportEqualsDeclaration */) { + } else if (i.kind === 272 /* ImportDeclaration */ || i.kind === 271 /* ImportEqualsDeclaration */) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); @@ -148384,6 +150527,10 @@ function shouldUseRequire(sourceFile, program) { if (compilerOptions.configFile) { return getEmitModuleKind(compilerOptions) < 5 /* ES2015 */; } + if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) + return true; + if (sourceFile.impliedNodeFormat === 99 /* ESNext */) + return false; for (const otherFile of program.getSourceFiles()) { if (otherFile === sourceFile || !isSourceFileJS(otherFile) || program.isSourceFileFromExternalLibrary(otherFile)) continue; @@ -148805,7 +150952,7 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile, preferences); - return promotedDeclaration.kind === 275 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; + return promotedDeclaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; } default: return Debug.assertNever(fix, `Unexpected fix kind ${fix.kind}`); @@ -148813,12 +150960,12 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy } function getModuleSpecifierText(promotedDeclaration) { var _a, _b; - return promotedDeclaration.kind === 270 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; + return promotedDeclaration.kind === 271 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; } function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceFile, preferences) { const convertExistingToTypeOnly = importNameElisionDisabled(compilerOptions); switch (aliasDeclaration.kind) { - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences); if (aliasDeclaration.parent.elements.length > 1 && sortKind) { @@ -148842,13 +150989,13 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF promoteImportClause(aliasDeclaration.parent.parent); return aliasDeclaration.parent.parent; } - case 272 /* ImportClause */: + case 273 /* ImportClause */: promoteImportClause(aliasDeclaration); return aliasDeclaration; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: promoteImportClause(aliasDeclaration.parent); return aliasDeclaration.parent; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); return aliasDeclaration; default: @@ -148856,10 +151003,18 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF } function promoteImportClause(importClause) { changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile)); + if (!compilerOptions.allowImportingTsExtensions) { + const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent); + const resolvedModule = moduleSpecifier && getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier)); + if (resolvedModule == null ? void 0 : resolvedModule.resolvedUsingTsExtension) { + const changedExtension = changeAnyExtension(moduleSpecifier.text, getOutputExtension(moduleSpecifier.text, compilerOptions)); + changes.replaceNode(sourceFile, moduleSpecifier, factory.createStringLiteral(changedExtension)); + } + } if (convertExistingToTypeOnly) { const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { - if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 275 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { + if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 276 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { changes.delete(sourceFile, aliasDeclaration); changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); } @@ -148874,7 +151029,7 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF } function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, preferences) { var _a; - if (clause.kind === 205 /* ObjectBindingPattern */) { + if (clause.kind === 206 /* ObjectBindingPattern */) { if (defaultImport) { addElementToBindingPattern(clause, defaultImport.name, "default"); } @@ -149330,7 +151485,7 @@ function doAddOverrideModifierChange(changeTracker, sourceFile, pos) { const lastDecorator = findLast(modifiers, isDecorator); const modifierPos = abstractModifier ? abstractModifier.end : staticModifier ? staticModifier.end : accessibilityModifier ? accessibilityModifier.end : lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : classElement.getStart(sourceFile); const options = accessibilityModifier || staticModifier || abstractModifier ? { prefix: " " } : { suffix: " " }; - changeTracker.insertModifierAt(sourceFile, modifierPos, 163 /* OverrideKeyword */, options); + changeTracker.insertModifierAt(sourceFile, modifierPos, 164 /* OverrideKeyword */, options); } function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { const classElement = findContainerClassElementLike(sourceFile, pos); @@ -149344,13 +151499,13 @@ function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { } function isClassElementLikeHasJSDoc(node) { switch (node.kind) { - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; - case 168 /* Parameter */: + case 169 /* Parameter */: return isParameterPropertyDeclaration(node, node.parent); default: return false; @@ -149650,7 +151805,7 @@ registerCodeFix({ }); function getNamedTupleMember(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 201 /* NamedTupleMember */); + return findAncestor(token, (t) => t.kind === 202 /* NamedTupleMember */); } function doChange17(changes, sourceFile, namedTupleMember) { if (!namedTupleMember) { @@ -149659,10 +151814,10 @@ function doChange17(changes, sourceFile, namedTupleMember) { let unwrappedType = namedTupleMember.type; let sawOptional = false; let sawRest = false; - while (unwrappedType.kind === 189 /* OptionalType */ || unwrappedType.kind === 190 /* RestType */ || unwrappedType.kind === 195 /* ParenthesizedType */) { - if (unwrappedType.kind === 189 /* OptionalType */) { + while (unwrappedType.kind === 190 /* OptionalType */ || unwrappedType.kind === 191 /* RestType */ || unwrappedType.kind === 196 /* ParenthesizedType */) { + if (unwrappedType.kind === 190 /* OptionalType */) { sawOptional = true; - } else if (unwrappedType.kind === 190 /* RestType */) { + } else if (unwrappedType.kind === 191 /* RestType */) { sawRest = true; } unwrappedType = unwrappedType.type; @@ -149728,7 +151883,7 @@ function getInfo8(sourceFile, pos, context, errorCode) { if (isPropertyAccessExpression(parent2) && parent2.name === node) { Debug.assert(isMemberName(node), "Expected an identifier for spelling (property access)"); let containingType = checker.getTypeAtLocation(parent2.expression); - if (parent2.flags & 32 /* OptionalChain */) { + if (parent2.flags & 64 /* OptionalChain */) { containingType = checker.getNonNullableType(containingType); } suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); @@ -149973,6 +152128,8 @@ function getInfo9(checker, sourceFile, position, errorCode) { if (!declaration || !isCallExpression(declaration.parent) || !declaration.body) return void 0; const pos = declaration.parent.arguments.indexOf(declaration); + if (pos === -1) + return void 0; const type = checker.getContextualTypeForArgumentAtIndex(declaration.parent, pos); if (!type) return void 0; @@ -150001,19 +152158,19 @@ function getInfo9(checker, sourceFile, position, errorCode) { } function getVariableLikeInitializer(declaration) { switch (declaration.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: return declaration.initializer; - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 303 /* ShorthandPropertyAssignment */: - case 170 /* PropertySignature */: - case 305 /* EnumMember */: - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: + case 304 /* ShorthandPropertyAssignment */: + case 171 /* PropertySignature */: + case 306 /* EnumMember */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: return void 0; } } @@ -150270,7 +152427,7 @@ function createActionForAddMissingMemberInJavascriptFile(context, { parentDeclar function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { const tokenName = token.text; if (makeStatic) { - if (classDeclaration.kind === 230 /* ClassExpression */) { + if (classDeclaration.kind === 231 /* ClassExpression */) { return; } const className = classDeclaration.name.getText(); @@ -150323,7 +152480,7 @@ function createActionsForAddMissingMemberInTypeScriptFile(context, { parentDecla } function getTypeNode2(checker, node, token) { let typeNode; - if (token.parent.parent.kind === 225 /* BinaryExpression */) { + if (token.parent.parent.kind === 226 /* BinaryExpression */) { const binaryExpression = token.parent.parent; const otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left; const widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression))); @@ -150401,9 +152558,6 @@ function getActionsForMissingMethodDeclaration(context, info) { if (call === void 0) { return void 0; } - if (isPrivateIdentifier(token)) { - return void 0; - } const methodName = token.text; const addMethodDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addMethodDeclaration(context, t, call, token, modifierFlags2, parentDeclaration, declSourceFile)); const actions2 = [createCodeFixAction(fixMissingMember, addMethodDeclarationChanges(modifierFlags & 32 /* Static */), [modifierFlags & 32 /* Static */ ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, methodName], fixMissingMember, Diagnostics.Add_all_missing_members)]; @@ -150414,7 +152568,7 @@ function getActionsForMissingMethodDeclaration(context, info) { } function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 173 /* MethodDeclaration */ : 172 /* MethodSignature */; + const kind = isClassLike(parentDeclaration) ? 174 /* MethodDeclaration */ : 173 /* MethodSignature */; const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); if (containingMethodDeclaration) { @@ -150443,8 +152597,8 @@ function addEnumMemberDeclaration(changes, checker, { token, parentDeclaration } function addFunctionDeclaration(changes, context, info) { const quotePreference = getQuotePreference(context.sourceFile, context.preferences); const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(261 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( - 261 /* FunctionDeclaration */, + const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(262 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( + 262 /* FunctionDeclaration */, context, quotePreference, info.signature, @@ -150593,7 +152747,7 @@ function tryGetValueFromType(context, checker, importAdder, quotePreference, typ if (signature === void 0) return createUndefined(); const func = createSignatureDeclarationFromSignature( - 217 /* FunctionExpression */, + 218 /* FunctionExpression */, context, quotePreference, signature[0], @@ -150976,7 +153130,7 @@ function doChange22(changes, sourceFile, arg, expression) { ); } function getSuggestion(messageText) { - const [_, suggestion] = flattenDiagnosticMessageText(messageText, "\n", 0).match(/\'(.*)\'/) || []; + const [_, suggestion] = flattenDiagnosticMessageText(messageText, "\n", 0).match(/'(.*)'/) || []; return suggestion; } @@ -150984,6 +153138,7 @@ function getSuggestion(messageText) { registerCodeFix({ errorCodes: [ Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, + Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code ], getCodeActions: function getCodeActionsToFixModuleAndTarget(context) { @@ -151271,14 +153426,14 @@ registerCodeFix({ const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); if (!importDeclaration) return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 275 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); + const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 276 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); const typeOnlyChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => doTypeOnlyImportChange(t, context.sourceFile, importDeclaration, context.program)); let actions2; if (namespaceChanges.length) { actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, namespaceChanges, Diagnostics.Convert_named_imports_to_namespace_import)); } if (typeOnlyChanges.length) { - actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, typeOnlyChanges, Diagnostics.Convert_to_type_only_import)); + actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, typeOnlyChanges, Diagnostics.Use_import_type)); } return actions2; }, @@ -151286,18 +153441,18 @@ registerCodeFix({ }); function getImportDeclaration(sourceFile, program, start2) { const identifier = tryCast(getTokenAtPosition(sourceFile, start2), isIdentifier); - if (!identifier || identifier.parent.kind !== 182 /* TypeReference */) + if (!identifier || identifier.parent.kind !== 183 /* TypeReference */) return; const checker = program.getTypeChecker(); const symbol = checker.getSymbolAtLocation(identifier); return find((symbol == null ? void 0 : symbol.declarations) || emptyArray, or(isImportClause, isImportSpecifier, isImportEqualsDeclaration)); } function doTypeOnlyImportChange(changes, sourceFile, importDeclaration, program) { - if (importDeclaration.kind === 270 /* ImportEqualsDeclaration */) { + if (importDeclaration.kind === 271 /* ImportEqualsDeclaration */) { changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, importDeclaration.name); return; } - const importClause = importDeclaration.kind === 272 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; + const importClause = importDeclaration.kind === 273 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; if (importClause.name && importClause.namedBindings) { return; } @@ -151495,7 +153650,7 @@ function deleteTypeParameters(changes, sourceFile, token) { changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } function isImport(token) { - return token.kind === 102 /* ImportKeyword */ || token.kind === 80 /* Identifier */ && (token.parent.kind === 275 /* ImportSpecifier */ || token.parent.kind === 272 /* ImportClause */); + return token.kind === 102 /* ImportKeyword */ || token.kind === 80 /* Identifier */ && (token.parent.kind === 276 /* ImportSpecifier */ || token.parent.kind === 273 /* ImportClause */); } function tryGetFullImport(token) { return token.kind === 102 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; @@ -151504,7 +153659,7 @@ function canDeleteEntireVariableStatement(sourceFile, token) { return isVariableDeclarationList(token.parent) && first(token.parent.getChildren(sourceFile)) === token; } function deleteEntireVariableStatement(changes, sourceFile, node) { - changes.delete(sourceFile, node.parent.kind === 242 /* VariableStatement */ ? node.parent : node); + changes.delete(sourceFile, node.parent.kind === 243 /* VariableStatement */ ? node.parent : node); } function deleteDestructuringElements(changes, sourceFile, node) { forEach(node.elements, (n) => changes.delete(sourceFile, n)); @@ -151546,14 +153701,14 @@ function tryPrefixDeclaration(changes, errorCode, sourceFile, token) { } function canPrefix(token) { switch (token.parent.kind) { - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return true; - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { const varDecl = token.parent; switch (varDecl.parent.parent.kind) { - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: return true; } } @@ -151602,8 +153757,8 @@ function isNotProvidedArguments(parameter, checker, sourceFiles) { function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { const { parent: parent2 } = parameter; switch (parent2.kind) { - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: const index = parent2.parameters.indexOf(parameter); const referent = isMethodDeclaration(parent2) ? parent2.name : parent2; const entries = ts_FindAllReferences_exports.Core.getReferencedSymbolsForNode(parent2.pos, referent, program, sourceFiles, cancellationToken); @@ -151621,18 +153776,18 @@ function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program } } return true; - case 261 /* FunctionDeclaration */: { + case 262 /* FunctionDeclaration */: { if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { return isLastParameter(parent2, parameter, isFixAll); } return true; } - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return isLastParameter(parent2, parameter, isFixAll); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return false; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return true; default: return Debug.failBadSyntaxKind(parent2); @@ -151682,7 +153837,7 @@ function doChange26(changes, sourceFile, start2, length2, errorCode) { const container = (isBlock(statement.parent) ? statement.parent : statement).parent; if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { - case 244 /* IfStatement */: + case 245 /* IfStatement */: if (container.elseStatement) { if (isBlock(statement.parent)) { break; @@ -151691,8 +153846,8 @@ function doChange26(changes, sourceFile, start2, length2, errorCode) { } return; } - case 246 /* WhileStatement */: - case 247 /* ForStatement */: + case 247 /* WhileStatement */: + case 248 /* ForStatement */: changes.delete(sourceFile, container); return; } @@ -151760,7 +153915,7 @@ registerCodeFix({ const { typeNode, type } = info; const original = typeNode.getText(sourceFile); const actions2 = [fix(type, fixIdPlain, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)]; - if (typeNode.kind === 320 /* JSDocNullableType */) { + if (typeNode.kind === 321 /* JSDocNullableType */) { actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); } return actions2; @@ -151778,7 +153933,7 @@ registerCodeFix({ if (!info) return; const { typeNode, type } = info; - const fixedType = typeNode.kind === 320 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; + const fixedType = typeNode.kind === 321 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; doChange28(changes, sourceFile, typeNode, fixedType, checker); }); } @@ -151799,22 +153954,22 @@ function getInfo14(sourceFile, pos, checker) { } function isTypeContainer(node) { switch (node.kind) { - case 233 /* AsExpression */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 261 /* FunctionDeclaration */: - case 176 /* GetAccessor */: - case 180 /* IndexSignature */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* SetAccessor */: - case 264 /* TypeAliasDeclaration */: - case 215 /* TypeAssertionExpression */: - case 259 /* VariableDeclaration */: + case 234 /* AsExpression */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 262 /* FunctionDeclaration */: + case 177 /* GetAccessor */: + case 181 /* IndexSignature */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 178 /* SetAccessor */: + case 265 /* TypeAliasDeclaration */: + case 216 /* TypeAssertionExpression */: + case 260 /* VariableDeclaration */: return true; default: return false; @@ -151877,6 +154032,7 @@ function getCallName(sourceFile, start2) { var fixId36 = "fixAwaitInSyncFunction"; var errorCodes46 = [ Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code ]; @@ -151917,14 +154073,14 @@ function getNodes3(sourceFile, start2) { } let insertBefore; switch (containingFunction.kind) { - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: insertBefore = containingFunction.name; break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: insertBefore = findChildOfKind(containingFunction, 100 /* FunctionKeyword */, sourceFile); break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: const kind = containingFunction.typeParameters ? 30 /* LessThanToken */ : 21 /* OpenParenToken */; insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); break; @@ -152254,7 +154410,7 @@ function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclar function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 170 /* PropertySignature */) { + if (isInJSFile(sourceFile) && declaration.kind !== 171 /* PropertySignature */) { const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; if (!parent2) { return; @@ -152365,17 +154521,17 @@ function inferTypeForParametersFromUsage(func, sourceFile, program, cancellation function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { let searchToken; switch (containingFunction.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: searchToken = findChildOfKind(containingFunction, 137 /* ConstructorKeyword */, sourceFile); break; - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: const parent2 = containingFunction.parent; searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; break; - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: searchToken = containingFunction.name; break; } @@ -152511,44 +154667,44 @@ function inferTypeFromReferences(program, references, cancellationToken) { node = node.parent; } switch (node.parent.kind) { - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: inferTypeFromExpressionStatement(node, usage); break; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: usage.isNumber = true; break; - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: inferTypeFromPrefixUnaryExpression(node.parent, usage); break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: inferTypeFromBinaryExpression(node, node.parent, usage); break; - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: inferTypeFromSwitchStatementLabel(node.parent, usage); break; - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: if (node.parent.expression === node) { inferTypeFromCallExpression(node.parent, usage); } else { inferTypeFromContextualType(node, usage); } break; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: inferTypeFromPropertyAccessExpression(node.parent, usage); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: inferTypeFromPropertyElementExpression(node.parent, node, usage); break; - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: inferTypeFromPropertyAssignment(node.parent, usage); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: inferTypeFromPropertyDeclaration(node.parent, usage); break; - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { const { name, initializer } = node.parent; if (node === name) { if (initializer) { @@ -152648,7 +154804,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { break; case 57 /* BarBarToken */: case 61 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 259 /* VariableDeclaration */ || isAssignmentExpression( + if (node === parent2.left && (node.parent.parent.kind === 260 /* VariableDeclaration */ || isAssignmentExpression( node.parent.parent, /*excludeCompoundAssignment*/ true @@ -152676,7 +154832,7 @@ function inferTypeFromReferences(program, references, cancellationToken) { } } calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 212 /* CallExpression */) { + if (parent2.kind === 213 /* CallExpression */) { (usage.calls || (usage.calls = [])).push(call); } else { (usage.constructs || (usage.constructs = [])).push(call); @@ -153141,28 +155297,25 @@ var PreserveOptionalFlags = /* @__PURE__ */ ((PreserveOptionalFlags2) => { })(PreserveOptionalFlags || {}); function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, preserveOptional = 3 /* All */, isAmbient = false) { const declarations = symbol.getDeclarations(); - const declaration = declarations == null ? void 0 : declarations[0]; + const declaration = firstOrUndefined(declarations); const checker = context.program.getTypeChecker(); const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); - const kind = (declaration == null ? void 0 : declaration.kind) ?? 170 /* PropertySignature */; - const declarationName = getSynthesizedDeepClone( - getNameOfDeclaration(declaration), - /*includeTrivia*/ - false - ); + const kind = (declaration == null ? void 0 : declaration.kind) ?? 171 /* PropertySignature */; + const declarationName = createDeclarationName(symbol, declaration); const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */; - let modifierFlags = effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; + let modifierFlags = effectiveModifierFlags & 32 /* Static */; + modifierFlags |= effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; if (declaration && isAutoAccessorPropertyDeclaration(declaration)) { modifierFlags |= 128 /* Accessor */; } const modifiers = createModifiers(); const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); const optional = !!(symbol.flags & 16777216 /* Optional */); - const ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient; + const ambient = !!(enclosingDeclaration.flags & 33554432 /* Ambient */) || isAmbient; const quotePreference = getQuotePreference(sourceFile, preferences); switch (kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: const flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : void 0; let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { @@ -153181,8 +155334,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con void 0 )); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { Debug.assertIsDefined(declarations); let typeNode2 = checker.typeToTypeNode( type, @@ -153230,8 +155383,8 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con } break; } - case 172 /* MethodSignature */: - case 173 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 174 /* MethodDeclaration */: Debug.assertIsDefined(declarations); const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); if (!some(signatures)) { @@ -153258,7 +155411,7 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con break; } function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(173 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); + const method = createSignatureDeclarationFromSignature(174 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); if (method) addClassElement(method); } @@ -153268,7 +155421,7 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con modifiers2 = combine(modifiers2, factory.createModifiersFromModifierFlags(modifierFlags)); } if (shouldAddOverrideKeyword()) { - modifiers2 = append(modifiers2, factory.createToken(163 /* OverrideKeyword */)); + modifiers2 = append(modifiers2, factory.createToken(164 /* OverrideKeyword */)); } return modifiers2 && factory.createNodeArray(modifiers2); } @@ -153299,6 +155452,19 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con false ); } + function createDeclarationName(symbol2, declaration2) { + if (getCheckFlags(symbol2) & 262144 /* Mapped */) { + const nameType = symbol2.links.nameType; + if (nameType && isTypeUsableAsPropertyName(nameType)) { + return factory.createIdentifier(unescapeLeadingUnderscores(getPropertyNameFromType(nameType))); + } + } + return getSynthesizedDeepClone( + getNameOfDeclaration(declaration2), + /*includeTrivia*/ + false + ); + } } function createSignatureDeclarationFromSignature(kind, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder) { const program = context.program; @@ -153406,8 +155572,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder instanceTypes, contextNode, scriptTarget, - /*flags*/ - void 0, + 1 /* NoTruncation */, tracker ); const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0; @@ -153429,7 +155594,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder tracker ); switch (kind) { - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return factory.createMethodDeclaration( modifiers, asteriskToken, @@ -153441,7 +155606,7 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder type, createStubbedMethodBody(quotePreference) ); - case 172 /* MethodSignature */: + case 173 /* MethodSignature */: return factory.createMethodSignature( modifiers, name, @@ -153451,7 +155616,8 @@ function createSignatureDeclarationFromCallExpression(kind, context, importAdder parameters, type === void 0 ? factory.createKeywordTypeNode(159 /* UnknownKeyword */) : type ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: + Debug.assert(typeof name === "string" || isIdentifier(name), "Unexpected name"); return factory.createFunctionDeclaration( modifiers, asteriskToken, @@ -153843,7 +156009,7 @@ function getAccessorConvertiblePropertyAtPosition(file, program, start2, end, co isStatic: hasStaticModifier(declaration), isReadonly: hasEffectiveReadonlyModifier(declaration), type: getDeclarationType(declaration, program), - container: declaration.kind === 168 /* Parameter */ ? declaration.parent.parent : declaration.parent, + container: declaration.kind === 169 /* Parameter */ ? declaration.parent.parent : declaration.parent, originalName: declaration.name.text, declaration, fieldName, @@ -154017,7 +156183,7 @@ registerCodeFix({ }); function getActionsForUsageOfInvalidImport(context) { const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 212 /* CallExpression */ : 213 /* NewExpression */; + const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 213 /* CallExpression */ : 214 /* NewExpression */; const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); if (!node) { return []; @@ -154388,7 +156554,7 @@ registerCodeFix({ function getImportTypeNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); Debug.assert(token.kind === 102 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 204 /* ImportType */, "Token parent should be an ImportType"); + Debug.assert(token.parent.kind === 205 /* ImportType */, "Token parent should be an ImportType"); return token.parent; } function doChange36(changes, sourceFile, importType) { @@ -154600,8 +156766,8 @@ registerCodeFix({ return [createCodeFixAction(fixId48, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId48, Diagnostics.Split_all_invalid_type_only_imports)]; } }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes60, (changes, error) => { - splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error), context); + getAllCodeActions: (context) => codeFixAll(context, errorCodes60, (changes, error2) => { + splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error2), context); }) }); function getImportDeclaration2(sourceFile, span) { @@ -154844,6 +157010,7 @@ var CompletionSource = /* @__PURE__ */ ((CompletionSource2) => { CompletionSource2["TypeOnlyAlias"] = "TypeOnlyAlias/"; CompletionSource2["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/"; CompletionSource2["SwitchCases"] = "SwitchCases/"; + CompletionSource2["ObjectLiteralMemberWithComma"] = "ObjectLiteralMemberWithComma/"; return CompletionSource2; })(CompletionSource || {}); var SymbolOriginInfoKind = /* @__PURE__ */ ((SymbolOriginInfoKind2) => { @@ -155614,14 +157781,14 @@ function getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, options, } function typeNodeToExpression(typeNode, languageVersion, quotePreference) { switch (typeNode.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: const typeName = typeNode.typeName; return entityNameToExpression(typeName, languageVersion, quotePreference); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: const objectExpression = typeNodeToExpression(typeNode.objectType, languageVersion, quotePreference); const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference); return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression); - case 200 /* LiteralType */: + case 201 /* LiteralType */: const literal = typeNode.literal; switch (literal.kind) { case 11 /* StringLiteral */: @@ -155630,12 +157797,12 @@ function typeNodeToExpression(typeNode, languageVersion, quotePreference) { return factory.createNumericLiteral(literal.text, literal.numericLiteralFlags); } return void 0; - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference); return exp && (isIdentifier(exp) ? exp : factory.createParenthesizedExpression(exp)); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference); - case 204 /* ImportType */: + case 205 /* ImportType */: Debug.fail(`We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.`); } return void 0; @@ -155670,12 +157837,12 @@ function isMemberCompletionKind(kind) { function getJsxClosingTagCompletion(location, sourceFile) { const jsxClosingElement = findAncestor(location, (node) => { switch (node.kind) { - case 286 /* JsxClosingElement */: + case 287 /* JsxClosingElement */: return true; case 44 /* SlashToken */: case 32 /* GreaterThanToken */: case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return false; default: return "quit"; @@ -155722,7 +157889,9 @@ function createCompletionEntryForLiteral(sourceFile, preferences, literal) { return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; } function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol) { + var _a, _b; let insertText; + let filterText; let replacementSpan = getReplacementSpanForContextToken(replacementToken); let data; let isSnippet; @@ -155779,13 +157948,23 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken, if ((origin == null ? void 0 : origin.kind) === 64 /* TypeOnlyAlias */) { hasAction = true; } + if (completionKind === 0 /* ObjectPropertyDeclaration */ && contextToken && ((_a = findPrecedingToken(contextToken.pos, sourceFile, contextToken)) == null ? void 0 : _a.kind) !== 28 /* CommaToken */) { + if (isMethodDeclaration(contextToken.parent.parent) || isGetAccessorDeclaration(contextToken.parent.parent) || isSetAccessorDeclaration(contextToken.parent.parent) || isSpreadAssignment(contextToken.parent) || ((_b = findAncestor(contextToken.parent, isPropertyAssignment)) == null ? void 0 : _b.getLastToken(sourceFile)) === contextToken || isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) { + source = "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */; + hasAction = true; + } + } if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === 3 /* MemberLike */ && isClassLikeMemberCompletion(symbol, location, sourceFile)) { let importAdder; - ({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext)); - sortText = SortText.ClassMemberSnippets; - if (importAdder == null ? void 0 : importAdder.hasFixes()) { - hasAction = true; - source = "ClassMemberSnippet/" /* ClassMemberSnippet */; + const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext); + if (memberCompletionEntry) { + ({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry); + if (importAdder == null ? void 0 : importAdder.hasFixes()) { + hasAction = true; + source = "ClassMemberSnippet/" /* ClassMemberSnippet */; + } + } else { + return void 0; } } if (origin && originIsObjectLiteralMethod(origin)) { @@ -155820,6 +157999,13 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken, data = originToCompletionEntryData(origin); hasAction = !importStatementCompletion; } + const parentNamedImportOrExport = findAncestor(location, isNamedImportsOrExports); + if ((parentNamedImportOrExport == null ? void 0 : parentNamedImportOrExport.kind) === 275 /* NamedImports */) { + const possibleToken = stringToToken(name); + if (parentNamedImportOrExport && possibleToken && (possibleToken === 135 /* AwaitKeyword */ || isNonContextualKeyword(possibleToken))) { + insertText = `${name} as ${name}_`; + } + } return { name, kind: ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, location), @@ -155829,6 +158015,7 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken, hasAction: hasAction ? true : void 0, isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || void 0, insertText, + filterText, replacementSpan, sourceDisplay, labelDetails, @@ -155849,11 +158036,11 @@ function isClassLikeMemberCompletion(symbol, location, sourceFile) { function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) { const classLikeDeclaration = findAncestor(location, isClassLike); if (!classLikeDeclaration) { - return { insertText: name }; + return void 0; } let isSnippet; - let replacementSpan; let insertText = name; + const filterText = name; const checker = program.getTypeChecker(); const sourceFile = location.getSourceFile(); const printer = createSnippetPrinter({ @@ -155882,9 +158069,9 @@ function getEntryForMemberCompletion(host, program, options, preferences, name, ); } let modifiers = 0 /* None */; - const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position); - const isAbstract = !!(presentModifiers & 256 /* Abstract */); - const completionNodes = []; + const { modifiers: presentModifiers, range: eraseRange, decorators: presentDecorators } = getPresentModifiers(contextToken, sourceFile, position); + const isAbstract = presentModifiers & 256 /* Abstract */ && classLikeDeclaration.modifierFlagsCache & 256 /* Abstract */; + let completionNodes = []; ts_codefix_exports.addNewNodeForMemberSymbol( symbol, classLikeDeclaration, @@ -155908,18 +158095,42 @@ function getEntryForMemberCompletion(host, program, options, preferences, name, requiredModifiers |= 16384 /* Override */; } if (!completionNodes.length) { - modifiers = node.modifierFlagsCache | requiredModifiers | presentModifiers; + modifiers = node.modifierFlagsCache | requiredModifiers; } node = factory.updateModifiers(node, modifiers); completionNodes.push(node); }, body, ts_codefix_exports.PreserveOptionalFlags.Property, - isAbstract + !!isAbstract ); if (completionNodes.length) { + const isMethod = symbol.flags & 8192 /* Method */; + let allowedModifiers = modifiers | 16384 /* Override */ | 4 /* Public */; + if (!isMethod) { + allowedModifiers |= 2 /* Ambient */ | 64 /* Readonly */; + } else { + allowedModifiers |= 512 /* Async */; + } + const allowedAndPresent = presentModifiers & allowedModifiers; + if (presentModifiers & ~allowedModifiers) { + return void 0; + } + if (modifiers & 16 /* Protected */ && allowedAndPresent & 4 /* Public */) { + modifiers &= ~16 /* Protected */; + } + if (allowedAndPresent !== 0 /* None */ && !(allowedAndPresent & 4 /* Public */)) { + modifiers &= ~4 /* Public */; + } + modifiers |= allowedAndPresent; + completionNodes = completionNodes.map((node) => factory.updateModifiers(node, modifiers)); + if (presentDecorators == null ? void 0 : presentDecorators.length) { + const lastNode = completionNodes[completionNodes.length - 1]; + if (canHaveDecorators(lastNode)) { + completionNodes[completionNodes.length - 1] = factory.updateModifierLike(lastNode, presentDecorators.concat(getModifiers(lastNode) || [])); + } + } const format = 1 /* MultiLine */ | 131072 /* NoTrailingNewLine */; - replacementSpan = modifiersSpan; if (formatContext) { insertText = printer.printAndFormatSnippetList( format, @@ -155935,24 +158146,29 @@ function getEntryForMemberCompletion(host, program, options, preferences, name, ); } } - return { insertText, isSnippet, importAdder, replacementSpan }; + return { insertText, filterText, isSnippet, importAdder, eraseRange }; } function getPresentModifiers(contextToken, sourceFile, position) { if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) { return { modifiers: 0 /* None */ }; } let modifiers = 0 /* None */; - let span; + let decorators; let contextMod; - if (contextMod = isModifierLike2(contextToken)) { - modifiers |= modifierToFlag(contextMod); - span = createTextSpanFromNode(contextToken); - } - if (isPropertyDeclaration(contextToken.parent)) { + const range = { pos: position, end: position }; + if (isPropertyDeclaration(contextToken.parent) && contextToken.parent.modifiers) { modifiers |= modifiersToFlags(contextToken.parent.modifiers) & 126975 /* Modifier */; - span = createTextSpanFromNode(contextToken.parent); + decorators = contextToken.parent.modifiers.filter(isDecorator) || []; + range.pos = Math.min(range.pos, contextToken.parent.modifiers.pos); + } + if (contextMod = isModifierLike2(contextToken)) { + const contextModifierFlag = modifierToFlag(contextMod); + if (!(modifiers & contextModifierFlag)) { + modifiers |= contextModifierFlag; + range.pos = Math.min(range.pos, contextToken.pos); + } } - return { modifiers, span }; + return { modifiers, decorators, range: range.pos !== position ? range : void 0 }; } function isModifierLike2(node) { if (isModifier(node)) { @@ -156029,10 +158245,10 @@ function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, pro const quotePreference = getQuotePreference(sourceFile, preferences); const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (declaration.kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: - case 172 /* MethodSignature */: - case 173 /* MethodDeclaration */: { + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 173 /* MethodSignature */: + case 174 /* MethodDeclaration */: { let effectiveType = type.flags & 1048576 /* Union */ && type.types.length < 10 ? checker.getUnionType(type.types, 2 /* Subtype */) : type; if (effectiveType.flags & 1048576 /* Union */) { const functionTypes = filter(effectiveType.types, (type2) => checker.getSignaturesOfType(type2, 0 /* Call */).length > 0); @@ -156475,7 +158691,7 @@ function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entr return firstDefined(symbols, (symbol, index) => { const origin = symbolToOriginInfoMap[index]; const info = getCompletionEntryDisplayNameForSymbol(symbol, getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected); - return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0; + return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source || entryId.source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0; }) || { type: "none" }; } function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) { @@ -156570,12 +158786,12 @@ function createCompletionDetails(name, kindModifiers, kind, displayParts, docume } function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken, origin, symbol, program, host, compilerOptions, sourceFile, position, previousToken, formatContext, preferences, data, source, cancellationToken) { if (data == null ? void 0 : data.moduleSpecifier) { - if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken).replacementSpan) { + if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken, sourceFile).replacementSpan) { return { codeActions: void 0, sourceDisplay: [textPart(data.moduleSpecifier)] }; } } if (source === "ClassMemberSnippet/" /* ClassMemberSnippet */) { - const { importAdder } = getEntryForMemberCompletion( + const { importAdder, eraseRange } = getEntryForMemberCompletion( host, program, compilerOptions, @@ -156587,10 +158803,17 @@ function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextTo contextToken, formatContext ); - if (importAdder) { + if (importAdder || eraseRange) { const changes = ts_textChanges_exports.ChangeTracker.with( { host, formatContext, preferences }, - importAdder.writeFixes + (tracker) => { + if (importAdder) { + importAdder.writeFixes(tracker); + } + if (eraseRange) { + tracker.deleteRange(sourceFile, eraseRange); + } + } ); return { sourceDisplay: void 0, @@ -156613,6 +158836,21 @@ function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextTo Debug.assertIsDefined(codeAction2, "Expected to have a code action for promoting type-only alias"); return { codeActions: [codeAction2], sourceDisplay: void 0 }; } + if (source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */ && contextToken) { + const changes = ts_textChanges_exports.ChangeTracker.with( + { host, formatContext, preferences }, + (tracker) => tracker.insertText(sourceFile, contextToken.end, ",") + ); + if (changes) { + return { + sourceDisplay: void 0, + codeActions: [{ + changes, + description: diagnosticToString([Diagnostics.Add_missing_comma_for_object_member_completion_0, name]) + }] + }; + } + } if (!origin || !(originIsExport(origin) || originIsResolvedExport(origin))) { return { codeActions: void 0, sourceDisplay: void 0 }; } @@ -156663,11 +158901,11 @@ function getContextualType(previousToken, position, sourceFile, checker) { return getContextualTypeFromParent(previousToken, checker); case 64 /* EqualsToken */: switch (parent2.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return checker.getContextualType(parent2.initializer); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return checker.getTypeAtLocation(parent2.left); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return checker.getContextualTypeForJsxAttribute(parent2); default: return void 0; @@ -156705,7 +158943,7 @@ function getFirstSymbolInChain(symbol, enclosingDeclaration, checker) { } function isModuleSymbol(symbol) { var _a; - return !!((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d.kind === 311 /* SourceFile */)); + return !!((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d.kind === 312 /* SourceFile */)); } function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { const typeChecker = program.getTypeChecker(); @@ -156724,7 +158962,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return { kind: 1 /* JsDocTagName */ }; } else { const lineStart = getLineStartPositionForPosition(position, sourceFile); - if (!/[^\*|\s(/)]/.test(sourceFile.text.substring(lineStart, position))) { + if (!/[^*|\s(/)]/.test(sourceFile.text.substring(lineStart, position))) { return { kind: 2 /* JsDocTag */ }; } } @@ -156737,7 +158975,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const typeExpression = tryGetTypeExpressionFromTag(tag); if (typeExpression) { currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 354 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { + if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 355 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); } } @@ -156770,7 +159008,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, let isNewIdentifierLocation = false; let flags = 0 /* None */; if (contextToken) { - const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken); + const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken, sourceFile); if (importStatementCompletionInfo.keywordCompletion) { if (importStatementCompletionInfo.isKeywordOnlyCompletion) { return { @@ -156795,7 +159033,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, isRightOfDot = contextToken.kind === 25 /* DotToken */; isRightOfQuestionDot = contextToken.kind === 29 /* QuestionDotToken */; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); @@ -156803,16 +159041,16 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return void 0; } break; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: node = parent2.left; break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: node = parent2.name; break; - case 204 /* ImportType */: + case 205 /* ImportType */: node = parent2; break; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: node = parent2.getFirstToken(sourceFile); Debug.assert(node.kind === 102 /* ImportKeyword */ || node.kind === 105 /* NewKeyword */); break; @@ -156820,51 +159058,51 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return void 0; } } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 210 /* PropertyAccessExpression */) { + if (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { contextToken = parent2; parent2 = parent2.parent; } if (currentToken.parent === location) { switch (currentToken.kind) { case 32 /* GreaterThanToken */: - if (currentToken.parent.kind === 283 /* JsxElement */ || currentToken.parent.kind === 285 /* JsxOpeningElement */) { + if (currentToken.parent.kind === 284 /* JsxElement */ || currentToken.parent.kind === 286 /* JsxOpeningElement */) { location = currentToken; } break; case 44 /* SlashToken */: - if (currentToken.parent.kind === 284 /* JsxSelfClosingElement */) { + if (currentToken.parent.kind === 285 /* JsxSelfClosingElement */) { location = currentToken; } break; } } switch (parent2.kind) { - case 286 /* JsxClosingElement */: + case 287 /* JsxClosingElement */: if (contextToken.kind === 44 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (!binaryExpressionMayBeOpenTag(parent2)) { break; } - case 284 /* JsxSelfClosingElement */: - case 283 /* JsxElement */: - case 285 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: + case 284 /* JsxElement */: + case 286 /* JsxOpeningElement */: isJsxIdentifierExpected = true; if (contextToken.kind === 30 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } break; - case 293 /* JsxExpression */: - case 292 /* JsxSpreadAttribute */: - if (previousToken.kind === 20 /* CloseBraceToken */ || previousToken.kind === 80 /* Identifier */ && previousToken.parent.kind === 290 /* JsxAttribute */) { + case 294 /* JsxExpression */: + case 293 /* JsxSpreadAttribute */: + if (previousToken.kind === 20 /* CloseBraceToken */ || previousToken.kind === 80 /* Identifier */ && previousToken.parent.kind === 291 /* JsxAttribute */) { isJsxIdentifierExpected = true; } break; - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: if (parent2.initializer === previousToken && previousToken.end < position) { isJsxIdentifierExpected = true; break; @@ -156952,15 +159190,15 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: - case 348 /* JSDocReturnTag */: - case 350 /* JSDocTypeTag */: - case 352 /* JSDocTypedefTag */: - case 355 /* JSDocThrowsTag */: - case 356 /* JSDocSatisfiesTag */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 349 /* JSDocReturnTag */: + case 351 /* JSDocTypeTag */: + case 353 /* JSDocTypedefTag */: + case 356 /* JSDocThrowsTag */: + case 357 /* JSDocSatisfiesTag */: return true; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return !!tag.constraint; default: return false; @@ -156969,7 +159207,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function tryGetTypeExpressionFromTag(tag) { if (isTagWithTypeExpression(tag)) { const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 315 /* JSDocTypeExpression */ ? typeExpression : void 0; + return typeExpression && typeExpression.kind === 316 /* JSDocTypeExpression */ ? typeExpression : void 0; } if (isJSDocAugmentsTag(tag) || isJSDocImplementsTag(tag)) { return tag.class; @@ -157005,7 +159243,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, symbols.push(exportedSymbol); } } - if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 311 /* SourceFile */ && d.kind !== 266 /* ModuleDeclaration */ && d.kind !== 265 /* EnumDeclaration */)) { + if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 312 /* SourceFile */ && d.kind !== 267 /* ModuleDeclaration */ && d.kind !== 266 /* EnumDeclaration */)) { let type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); let insertQuestionDot = false; if (type.isNullableType()) { @@ -157017,30 +159255,40 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } - addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); + addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot); } return; } } } - if (!isTypeLocation) { + if (!isTypeLocation || isInTypeQuery(node)) { typeChecker.tryGetThisTypeAt( node, /*includeGlobalThis*/ false ); let type = typeChecker.getTypeAtLocation(node).getNonOptionalType(); - let insertQuestionDot = false; - if (type.isNullableType()) { - const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false; - if (canCorrectToQuestionDot || isRightOfQuestionDot) { - type = type.getNonNullableType(); - if (canCorrectToQuestionDot) { - insertQuestionDot = true; + if (!isTypeLocation) { + let insertQuestionDot = false; + if (type.isNullableType()) { + const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } } } + addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot); + } else { + addTypeProperties( + type.getNonNullableType(), + /*insertAwait*/ + false, + /*insertQuestionDot*/ + false + ); } - addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } } function addTypeProperties(type, insertAwait, insertQuestionDot) { @@ -157048,7 +159296,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (isRightOfQuestionDot && some(type.getCallSignatures())) { isNewIdentifierLocation = true; } - const propertyAccess = node.kind === 204 /* ImportType */ ? node : node.parent; + const propertyAccess = node.kind === 205 /* ImportType */ ? node : node.parent; if (inCheckedFile) { for (const symbol of type.getApparentProperties()) { if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) { @@ -157086,7 +159334,8 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const leftMostName = getLeftMostName(computedPropertyName.expression); const nameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName); const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker); - if (firstAccessibleSymbol && addToSeen(seenPropertySymbols, getSymbolId(firstAccessibleSymbol))) { + const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol); + if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) { const index = symbols.length; symbols.push(firstAccessibleSymbol); const moduleSymbol = firstAccessibleSymbol.parent; @@ -157116,6 +159365,9 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } else if (preferences.includeCompletionsWithInsertText) { + if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) { + return; + } addSymbolOriginInfo(symbol); addSymbolSortInfo(symbol); symbols.push(symbol); @@ -157204,7 +159456,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 311 /* SourceFile */) { + if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 312 /* SourceFile */) { const thisType = typeChecker.tryGetThisTypeAt( scopeNode, /*includeGlobalThis*/ @@ -157239,10 +159491,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } function isSnippetScope(scopeNode) { switch (scopeNode.kind) { - case 311 /* SourceFile */: - case 227 /* TemplateExpression */: - case 293 /* JsxExpression */: - case 240 /* Block */: + case 312 /* SourceFile */: + case 228 /* TemplateExpression */: + case 294 /* JsxExpression */: + case 241 /* Block */: return true; default: return isStatement(scopeNode); @@ -157252,24 +159504,24 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 185 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 181 /* TypePredicate */); + return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */); } function isContextTokenTypeLocation(contextToken2) { if (contextToken2) { const parentKind = contextToken2.parent.kind; switch (contextToken2.kind) { case 59 /* ColonToken */: - return parentKind === 171 /* PropertyDeclaration */ || parentKind === 170 /* PropertySignature */ || parentKind === 168 /* Parameter */ || parentKind === 259 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); + return parentKind === 172 /* PropertyDeclaration */ || parentKind === 171 /* PropertySignature */ || parentKind === 169 /* Parameter */ || parentKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); case 64 /* EqualsToken */: - return parentKind === 264 /* TypeAliasDeclaration */; + return parentKind === 265 /* TypeAliasDeclaration */; case 130 /* AsKeyword */: - return parentKind === 233 /* AsExpression */; + return parentKind === 234 /* AsExpression */; case 30 /* LessThanToken */: - return parentKind === 182 /* TypeReference */ || parentKind === 215 /* TypeAssertionExpression */; + return parentKind === 183 /* TypeReference */ || parentKind === 216 /* TypeAssertionExpression */; case 96 /* ExtendsKeyword */: - return parentKind === 167 /* TypeParameter */; + return parentKind === 168 /* TypeParameter */; case 152 /* SatisfiesKeyword */: - return parentKind === 237 /* SatisfiesExpression */; + return parentKind === 238 /* SatisfiesExpression */; } } return false; @@ -157447,14 +159699,14 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return true; } if (contextToken2.kind === 32 /* GreaterThanToken */ && contextToken2.parent) { - if (location === contextToken2.parent && (location.kind === 285 /* JsxOpeningElement */ || location.kind === 284 /* JsxSelfClosingElement */)) { + if (location === contextToken2.parent && (location.kind === 286 /* JsxOpeningElement */ || location.kind === 285 /* JsxSelfClosingElement */)) { return false; } - if (contextToken2.parent.kind === 285 /* JsxOpeningElement */) { - return location.parent.kind !== 285 /* JsxOpeningElement */; + if (contextToken2.parent.kind === 286 /* JsxOpeningElement */) { + return location.parent.kind !== 286 /* JsxOpeningElement */; } - if (contextToken2.parent.kind === 286 /* JsxClosingElement */ || contextToken2.parent.kind === 284 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 283 /* JsxElement */; + if (contextToken2.parent.kind === 287 /* JsxClosingElement */ || contextToken2.parent.kind === 285 /* JsxSelfClosingElement */) { + return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 284 /* JsxElement */; } } return false; @@ -157465,29 +159717,29 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const tokenKind = keywordForNode(contextToken); switch (tokenKind) { case 28 /* CommaToken */: - return containingNodeKind === 212 /* CallExpression */ || containingNodeKind === 175 /* Constructor */ || containingNodeKind === 213 /* NewExpression */ || containingNodeKind === 208 /* ArrayLiteralExpression */ || containingNodeKind === 225 /* BinaryExpression */ || containingNodeKind === 183 /* FunctionType */ || containingNodeKind === 209 /* ObjectLiteralExpression */; + return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 226 /* BinaryExpression */ || containingNodeKind === 184 /* FunctionType */ || containingNodeKind === 210 /* ObjectLiteralExpression */; case 21 /* OpenParenToken */: - return containingNodeKind === 212 /* CallExpression */ || containingNodeKind === 175 /* Constructor */ || containingNodeKind === 213 /* NewExpression */ || containingNodeKind === 216 /* ParenthesizedExpression */ || containingNodeKind === 195 /* ParenthesizedType */; + return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 217 /* ParenthesizedExpression */ || containingNodeKind === 196 /* ParenthesizedType */; case 23 /* OpenBracketToken */: - return containingNodeKind === 208 /* ArrayLiteralExpression */ || containingNodeKind === 180 /* IndexSignature */ || containingNodeKind === 166 /* ComputedPropertyName */; + return containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 181 /* IndexSignature */ || containingNodeKind === 167 /* ComputedPropertyName */; case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: case 102 /* ImportKeyword */: return true; case 25 /* DotToken */: - return containingNodeKind === 266 /* ModuleDeclaration */; + return containingNodeKind === 267 /* ModuleDeclaration */; case 19 /* OpenBraceToken */: - return containingNodeKind === 262 /* ClassDeclaration */ || containingNodeKind === 209 /* ObjectLiteralExpression */; + return containingNodeKind === 263 /* ClassDeclaration */ || containingNodeKind === 210 /* ObjectLiteralExpression */; case 64 /* EqualsToken */: - return containingNodeKind === 259 /* VariableDeclaration */ || containingNodeKind === 225 /* BinaryExpression */; + return containingNodeKind === 260 /* VariableDeclaration */ || containingNodeKind === 226 /* BinaryExpression */; case 16 /* TemplateHead */: - return containingNodeKind === 227 /* TemplateExpression */; + return containingNodeKind === 228 /* TemplateExpression */; case 17 /* TemplateMiddle */: - return containingNodeKind === 238 /* TemplateSpan */; + return containingNodeKind === 239 /* TemplateSpan */; case 134 /* AsyncKeyword */: - return containingNodeKind === 173 /* MethodDeclaration */ || containingNodeKind === 303 /* ShorthandPropertyAssignment */; + return containingNodeKind === 174 /* MethodDeclaration */ || containingNodeKind === 304 /* ShorthandPropertyAssignment */; case 42 /* AsteriskToken */: - return containingNodeKind === 173 /* MethodDeclaration */; + return containingNodeKind === 174 /* MethodDeclaration */; } if (isClassMemberCompletionKeyword(tokenKind)) { return true; @@ -157519,16 +159771,16 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } function tryGetObjectLikeCompletionSymbols() { const symbolsStartIndex = symbols.length; - const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken); + const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile); if (!objectLikeContainer) return 0 /* Continue */; completionKind = 0 /* ObjectPropertyDeclaration */; let typeMembers; let existingMembers; - if (objectLikeContainer.kind === 209 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */) { const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker); if (instantiatedType === void 0) { - if (objectLikeContainer.flags & 33554432 /* InWithStatement */) { + if (objectLikeContainer.flags & 67108864 /* InWithStatement */) { return 2 /* Fail */; } isNonContextualObjectLiteral = true; @@ -157547,16 +159799,16 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, } } } else { - Debug.assert(objectLikeContainer.kind === 205 /* ObjectBindingPattern */); + Debug.assert(objectLikeContainer.kind === 206 /* ObjectBindingPattern */); isNewIdentifierLocation = false; const rootDeclaration = getRootDeclaration(objectLikeContainer.parent); if (!isVariableLike(rootDeclaration)) return Debug.fail("Root declaration is not variable-like."); - let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 249 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 168 /* Parameter */) { + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 250 /* ForOfStatement */; + if (!canGetType && rootDeclaration.kind === 169 /* Parameter */) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 173 /* MethodDeclaration */ || rootDeclaration.parent.kind === 177 /* SetAccessor */) { + } else if (rootDeclaration.parent.kind === 174 /* MethodDeclaration */ || rootDeclaration.parent.kind === 178 /* SetAccessor */) { canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -157582,7 +159834,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); symbols = concatenate(symbols, filteredMembers); setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 209 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { + if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { transformObjectLiteralMembersSortText(symbolsStartIndex); collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); } @@ -157598,10 +159850,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (!isTypeKeywordTokenOrIdentifier(contextToken)) { keywordFilters = 8 /* TypeKeyword */; } - const { moduleSpecifier } = namedImportsOrExports.kind === 274 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 275 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; if (!moduleSpecifier) { isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 274 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; + return namedImportsOrExports.kind === 275 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; } const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); if (!moduleSpecifierSymbol) { @@ -157726,11 +159978,11 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, case 31 /* LessThanSlashToken */: case 44 /* SlashToken */: case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: - case 291 /* JsxAttributes */: - case 290 /* JsxAttribute */: - case 292 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 284 /* JsxSelfClosingElement */ || parent2.kind === 285 /* JsxOpeningElement */)) { + case 211 /* PropertyAccessExpression */: + case 292 /* JsxAttributes */: + case 291 /* JsxAttribute */: + case 293 /* JsxSpreadAttribute */: + if (parent2 && (parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 286 /* JsxOpeningElement */)) { if (contextToken2.kind === 32 /* GreaterThanToken */) { const precedingToken = findPrecedingToken( contextToken2.pos, @@ -157742,20 +159994,20 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, break; } return parent2; - } else if (parent2.kind === 290 /* JsxAttribute */) { + } else if (parent2.kind === 291 /* JsxAttribute */) { return parent2.parent.parent; } break; case 11 /* StringLiteral */: - if (parent2 && (parent2.kind === 290 /* JsxAttribute */ || parent2.kind === 292 /* JsxSpreadAttribute */)) { + if (parent2 && (parent2.kind === 291 /* JsxAttribute */ || parent2.kind === 293 /* JsxSpreadAttribute */)) { return parent2.parent.parent; } break; case 20 /* CloseBraceToken */: - if (parent2 && parent2.kind === 293 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 290 /* JsxAttribute */) { + if (parent2 && parent2.kind === 294 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 291 /* JsxAttribute */) { return parent2.parent.parent.parent; } - if (parent2 && parent2.kind === 292 /* JsxSpreadAttribute */) { + if (parent2 && parent2.kind === 293 /* JsxSpreadAttribute */) { return parent2.parent.parent; } break; @@ -157768,44 +160020,44 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const containingNodeKind = parent2.kind; switch (contextToken2.kind) { case 28 /* CommaToken */: - return containingNodeKind === 259 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 242 /* VariableStatement */ || containingNodeKind === 265 /* EnumDeclaration */ || // enum a { foo, | - isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 263 /* InterfaceDeclaration */ || // interface A= contextToken2.pos; case 25 /* DotToken */: - return containingNodeKind === 206 /* ArrayBindingPattern */; + return containingNodeKind === 207 /* ArrayBindingPattern */; case 59 /* ColonToken */: - return containingNodeKind === 207 /* BindingElement */; + return containingNodeKind === 208 /* BindingElement */; case 23 /* OpenBracketToken */: - return containingNodeKind === 206 /* ArrayBindingPattern */; + return containingNodeKind === 207 /* ArrayBindingPattern */; case 21 /* OpenParenToken */: - return containingNodeKind === 298 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); + return containingNodeKind === 299 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); case 19 /* OpenBraceToken */: - return containingNodeKind === 265 /* EnumDeclaration */; + return containingNodeKind === 266 /* EnumDeclaration */; case 30 /* LessThanToken */: - return containingNodeKind === 262 /* ClassDeclaration */ || // class A< | - containingNodeKind === 230 /* ClassExpression */ || // var C = class D< | - containingNodeKind === 263 /* InterfaceDeclaration */ || // interface A< | - containingNodeKind === 264 /* TypeAliasDeclaration */ || // type List< | + return containingNodeKind === 263 /* ClassDeclaration */ || // class A< | + containingNodeKind === 231 /* ClassExpression */ || // var C = class D< | + containingNodeKind === 264 /* InterfaceDeclaration */ || // interface A< | + containingNodeKind === 265 /* TypeAliasDeclaration */ || // type List< | isFunctionLikeKind(containingNodeKind); case 126 /* StaticKeyword */: - return containingNodeKind === 171 /* PropertyDeclaration */ && !isClassLike(parent2.parent); + return containingNodeKind === 172 /* PropertyDeclaration */ && !isClassLike(parent2.parent); case 26 /* DotDotDotToken */: - return containingNodeKind === 168 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 206 /* ArrayBindingPattern */; + return containingNodeKind === 169 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 207 /* ArrayBindingPattern */; case 125 /* PublicKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: - return containingNodeKind === 168 /* Parameter */ && !isConstructorDeclaration(parent2.parent); + return containingNodeKind === 169 /* Parameter */ && !isConstructorDeclaration(parent2.parent); case 130 /* AsKeyword */: - return containingNodeKind === 275 /* ImportSpecifier */ || containingNodeKind === 280 /* ExportSpecifier */ || containingNodeKind === 273 /* NamespaceImport */; + return containingNodeKind === 276 /* ImportSpecifier */ || containingNodeKind === 281 /* ExportSpecifier */ || containingNodeKind === 274 /* NamespaceImport */; case 139 /* GetKeyword */: case 153 /* SetKeyword */: return !isFromObjectTypeDeclaration(contextToken2); case 80 /* Identifier */: - if (containingNodeKind === 275 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { + if (containingNodeKind === 276 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { return false; } break; @@ -157820,7 +160072,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, case 140 /* InferKeyword */: return true; case 156 /* TypeKeyword */: - return containingNodeKind !== 275 /* ImportSpecifier */; + return containingNodeKind !== 276 /* ImportSpecifier */; case 42 /* AsteriskToken */: return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); } @@ -157854,7 +160106,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { return false; } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 171 /* PropertyDeclaration */); + const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 172 /* PropertyDeclaration */); if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { return false; @@ -157868,7 +160120,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return contextToken2.kind !== 64 /* EqualsToken */ && (contextToken2.kind === 27 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); } function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 175 /* Constructor */; + return isFunctionLikeKind(kind) && kind !== 176 /* Constructor */; } function isDotOfNumericLiteral(contextToken2) { if (contextToken2.kind === 9 /* NumericLiteral */) { @@ -157878,7 +160130,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return false; } function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 260 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); + return node2.parent.kind === 261 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); } function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (existingMembers.length === 0) { @@ -157887,7 +160139,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set(); const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 302 /* PropertyAssignment */ && m.kind !== 303 /* ShorthandPropertyAssignment */ && m.kind !== 207 /* BindingElement */ && m.kind !== 173 /* MethodDeclaration */ && m.kind !== 176 /* GetAccessor */ && m.kind !== 177 /* SetAccessor */ && m.kind !== 304 /* SpreadAssignment */) { + if (m.kind !== 303 /* PropertyAssignment */ && m.kind !== 304 /* ShorthandPropertyAssignment */ && m.kind !== 208 /* BindingElement */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */ && m.kind !== 305 /* SpreadAssignment */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -157965,7 +160217,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 171 /* PropertyDeclaration */ && m.kind !== 173 /* MethodDeclaration */ && m.kind !== 176 /* GetAccessor */ && m.kind !== 177 /* SetAccessor */) { + if (m.kind !== 172 /* PropertyDeclaration */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -157991,7 +160243,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (isCurrentlyEditingNode(attr)) { continue; } - if (attr.kind === 290 /* JsxAttribute */) { + if (attr.kind === 291 /* JsxAttribute */) { seenNames.add(getEscapedTextOfJsxAttributeName(attr.name)); } else if (isJsxSpreadAttribute(attr)) { setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); @@ -158005,7 +160257,8 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, return node2.getStart(sourceFile) <= position && position <= node2.getEnd(); } } -function tryGetObjectLikeCompletionContainer(contextToken) { +function tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile) { + var _a; if (contextToken) { const { parent: parent2 } = contextToken; switch (contextToken.kind) { @@ -158020,7 +160273,29 @@ function tryGetObjectLikeCompletionContainer(contextToken) { case 134 /* AsyncKeyword */: return tryCast(parent2.parent, isObjectLiteralExpression); case 80 /* Identifier */: - return contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent) ? contextToken.parent.parent : void 0; + if (contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent)) { + return contextToken.parent.parent; + } else { + if (isObjectLiteralExpression(contextToken.parent.parent) && (isSpreadAssignment(contextToken.parent) || isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line)) { + return contextToken.parent.parent; + } + const ancestorNode2 = findAncestor(parent2, isPropertyAssignment); + if ((ancestorNode2 == null ? void 0 : ancestorNode2.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression(ancestorNode2.parent)) { + return ancestorNode2.parent; + } + } + break; + default: + if (((_a = parent2.parent) == null ? void 0 : _a.parent) && (isMethodDeclaration(parent2.parent) || isGetAccessorDeclaration(parent2.parent) || isSetAccessorDeclaration(parent2.parent)) && isObjectLiteralExpression(parent2.parent.parent)) { + return parent2.parent.parent; + } + if (isSpreadAssignment(parent2) && isObjectLiteralExpression(parent2.parent)) { + return parent2.parent; + } + const ancestorNode = findAncestor(parent2, isPropertyAssignment); + if (contextToken.kind !== 59 /* ColonToken */ && (ancestorNode == null ? void 0 : ancestorNode.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression(ancestorNode.parent)) { + return ancestorNode.parent; + } } } return void 0; @@ -158081,7 +160356,7 @@ function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, js var _keywordCompletions = []; var allKeywordsCompletions = memoize(() => { const res = []; - for (let i = 83 /* FirstKeyword */; i <= 164 /* LastKeyword */; i++) { + for (let i = 83 /* FirstKeyword */; i <= 165 /* LastKeyword */; i++) { res.push({ name: tokenToString(i), kind: "keyword" /* keyword */, @@ -158128,11 +160403,11 @@ function isTypeScriptOnlyKeyword(kind) { switch (kind) { case 128 /* AbstractKeyword */: case 133 /* AnyKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 138 /* DeclareKeyword */: case 94 /* EnumKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: case 119 /* ImplementsKeyword */: case 140 /* InferKeyword */: case 120 /* InterfaceKeyword */: @@ -158143,7 +160418,7 @@ function isTypeScriptOnlyKeyword(kind) { case 146 /* NeverKeyword */: case 150 /* NumberKeyword */: case 151 /* ObjectKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: case 125 /* PublicKeyword */: @@ -158170,7 +160445,7 @@ function isClassMemberCompletionKeyword(kind) { case 153 /* SetKeyword */: case 134 /* AsyncKeyword */: case 138 /* DeclareKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return true; default: return isClassMemberModifier(kind); @@ -158227,7 +160502,7 @@ function getPropertiesForCompletion(type, checker) { } function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { switch (location.kind) { - case 357 /* SyntaxList */: + case 358 /* SyntaxList */: return tryCast(location.parent, isObjectTypeDeclaration); case 1 /* EndOfFileToken */: const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration); @@ -158235,6 +160510,11 @@ function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken return cls; } break; + case 81 /* PrivateIdentifier */: + if (tryCast(location.parent, isPropertyDeclaration)) { + return findAncestor(location, isClassLike); + } + break; case 80 /* Identifier */: { const originalKeywordKind = identifierToKeywordKind(location); if (originalKeywordKind) { @@ -158286,7 +160566,7 @@ function tryGetTypeLiteralNode(node) { case 27 /* SemicolonToken */: case 28 /* CommaToken */: case 80 /* Identifier */: - if (parent2.kind === 170 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 171 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { return parent2.parent; } break; @@ -158303,11 +160583,11 @@ function getConstraintOfTypeArgumentProperty(node, checker) { if (!t) return void 0; switch (node.kind) { - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 192 /* IntersectionType */: - case 186 /* TypeLiteral */: - case 191 /* UnionType */: + case 193 /* IntersectionType */: + case 187 /* TypeLiteral */: + case 192 /* UnionType */: return t; } } @@ -158330,7 +160610,7 @@ function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) { case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 311 /* SourceFile */; + return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 312 /* SourceFile */; default: return Debug.assertNever(triggerCharacter); } @@ -158391,7 +160671,7 @@ function tryGetObjectLiteralContextualType(node, typeChecker) { } return void 0; } -function getImportStatementCompletionInfo(contextToken) { +function getImportStatementCompletionInfo(contextToken, sourceFile) { var _a, _b, _c; let keywordCompletion; let isKeywordOnlyCompletion = false; @@ -158407,6 +160687,12 @@ function getImportStatementCompletionInfo(contextToken) { function getCandidate() { const parent2 = contextToken.parent; if (isImportEqualsDeclaration(parent2)) { + const lastToken = parent2.getLastToken(sourceFile); + if (isIdentifier(contextToken) && lastToken !== contextToken) { + keywordCompletion = 161 /* FromKeyword */; + isKeywordOnlyCompletion = true; + return void 0; + } keywordCompletion = contextToken.kind === 156 /* TypeKeyword */ ? void 0 : 156 /* TypeKeyword */; return isModuleSpecifierMissingOrEmpty(parent2.moduleReference) ? parent2 : void 0; } @@ -158420,7 +160706,7 @@ function getImportStatementCompletionInfo(contextToken) { if (canCompleteFromNamedBindings(parent2)) { if (contextToken.kind === 20 /* CloseBraceToken */ || contextToken.kind === 80 /* Identifier */) { isKeywordOnlyCompletion = true; - keywordCompletion = 160 /* FromKeyword */; + keywordCompletion = 161 /* FromKeyword */; } else { return parent2.parent.parent; } @@ -158447,8 +160733,8 @@ function getSingleLineReplacementSpanForImportCompletionNode(node) { if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); } - Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 275 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 271 /* ImportDeclaration */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference; + Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 276 /* ImportSpecifier */); + const potentialSplitPoint = top.kind === 272 /* ImportDeclaration */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference; const withoutModuleSpecifier = { pos: top.getFirstToken().getStart(), end: potentialSplitPoint.pos @@ -158710,37 +160996,37 @@ function kindModifiersFromExtension(extension) { function getStringLiteralCompletionEntries(sourceFile, node, position, typeChecker, compilerOptions, host, preferences) { const parent2 = walkUpParentheses(node.parent); switch (parent2.kind) { - case 200 /* LiteralType */: { + case 201 /* LiteralType */: { const grandParent = walkUpParentheses(parent2.parent); - if (grandParent.kind === 204 /* ImportType */) { + if (grandParent.kind === 205 /* ImportType */) { return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; } return fromUnionableLiteralType(grandParent); } - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker, parent2.parent); } return fromContextualType() || fromContextualType(0 /* None */); - case 211 /* ElementAccessExpression */: { + case 212 /* ElementAccessExpression */: { const { expression, argumentExpression } = parent2; if (node === skipParentheses(argumentExpression)) { return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression)); } return void 0; } - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 290 /* JsxAttribute */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 291 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 290 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); - return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */); + const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 291 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); + return argumentInfo && (getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker, 0 /* Normal */)) || fromContextualType(0 /* None */); } - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 282 /* ExternalModuleReference */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 283 /* ExternalModuleReference */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - case 295 /* CaseClause */: + case 296 /* CaseClause */: const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses); const contextualTypes = fromContextualType(); if (!contextualTypes) { @@ -158753,21 +161039,21 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck } function fromUnionableLiteralType(grandParent) { switch (grandParent.kind) { - case 232 /* ExpressionWithTypeArguments */: - case 182 /* TypeReference */: { + case 233 /* ExpressionWithTypeArguments */: + case 183 /* TypeReference */: { const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); if (typeArgument) { return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; } return void 0; } - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: const { indexType, objectType } = grandParent; if (!rangeContainsPosition(indexType, position)) { return void 0; } return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType)); - case 191 /* UnionType */: { + case 192 /* UnionType */: { const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent)); if (!result) { return void 0; @@ -158792,9 +161078,9 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck } function walkUpParentheses(node) { switch (node.kind) { - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return walkUpParenthesizedTypes(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return walkUpParenthesizedExpressions(node); default: return node; @@ -158803,12 +161089,12 @@ function walkUpParentheses(node) { function getAlreadyUsedTypesInStringLiteralUnion(union, current) { return mapDefined(union.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : void 0); } -function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) { +function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) { let isNewIdentifier = false; const uniques = /* @__PURE__ */ new Map(); const candidates = []; const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg; - checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates); + checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates, checkMode); const types = flatMap(candidates, (candidate) => { if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return; @@ -158908,7 +161194,7 @@ function getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, c extensionOptions, host, /*moduleSpecifierIsRelative*/ - false, + true, scriptPath ).values()); } @@ -159169,7 +161455,7 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c } const keys = getOwnKeys(exports); const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); - const conditions = mode === 99 /* ESNext */ ? ["node", "import", "types"] : ["node", "require", "types"]; + const conditions = getConditions(compilerOptions, mode === 99 /* ESNext */); addCompletionEntriesFromPathsOrExports( result, fragmentSubpath, @@ -159240,16 +161526,18 @@ function getModulesForPathsPattern(fragment, packageDirectory, pattern, extensio const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0; const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory; const normalizedSuffix = normalizePath(parsed.suffix); + const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix); + const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix]; const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory)); const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase; - const includeGlob = normalizedSuffix ? "**/*" + normalizedSuffix : "./*"; + const includeGlobs = normalizedSuffix ? matchingSuffixes.map((suffix) => "**/*" + suffix) : ["./*"]; const matches = mapDefined(tryReadDirectory( host, baseDirectory, extensionOptions.extensionsToSearch, /*exclude*/ void 0, - [includeGlob] + includeGlobs ), (match) => { const trimmedWithPattern = trimPrefixAndSuffix(match); if (trimmedWithPattern) { @@ -159263,8 +161551,10 @@ function getModulesForPathsPattern(fragment, packageDirectory, pattern, extensio const directories = normalizedSuffix ? emptyArray : mapDefined(tryGetDirectories(host, baseDirectory), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir)); return [...matches, ...directories]; function trimPrefixAndSuffix(path) { - const inner = withoutStartAndEnd(normalizePath(path), completePrefix, normalizedSuffix); - return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner); + return firstDefined(matchingSuffixes, (suffix) => { + const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix); + return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner); + }); } } function withoutStartAndEnd(s, start2, end) { @@ -159418,6 +161708,7 @@ __export(ts_FindAllReferences_exports, { getTextSpanOfEntry: () => getTextSpanOfEntry, isContextWithStartAndEndNode: () => isContextWithStartAndEndNode, isDeclarationOfSymbol: () => isDeclarationOfSymbol, + isWriteAccessForReference: () => isWriteAccessForReference, nodeEntry: () => nodeEntry, toContextSpan: () => toContextSpan, toHighlightSpan: () => toHighlightSpan, @@ -159475,14 +161766,14 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { if (cancellationToken) cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(direct)) { handleImportCall(direct); break; } if (!isAvailableThroughGlobal) { const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 259 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent2.kind === 260 /* VariableDeclaration */) { const { name } = parent2; if (name.kind === 80 /* Identifier */) { directImports.push(name); @@ -159493,7 +161784,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { break; case 80 /* Identifier */: break; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: handleNamespaceImport( direct, direct.name, @@ -159502,10 +161793,10 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { false ); break; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 273 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 274 /* NamespaceImport */) { handleNamespaceImport( direct, namedBindings.name, @@ -159518,10 +161809,10 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 279 /* NamespaceExport */) { + } else if (direct.exportClause.kind === 280 /* NamespaceExport */) { addIndirectUser( getSourceFileLikeForImportDeclaration(direct), /*addTransitiveDependencies*/ @@ -159531,7 +161822,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { directImports.push(direct); } break; - case 204 /* ImportType */: + case 205 /* ImportType */: if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { addIndirectUser( direct.getSourceFile(), @@ -159572,7 +161863,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { directImports.push(importDeclaration); } else if (!isAvailableThroughGlobal) { const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 311 /* SourceFile */ || sourceFileLike.kind === 266 /* ModuleDeclaration */); + Debug.assert(sourceFileLike.kind === 312 /* SourceFile */ || sourceFileLike.kind === 267 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUser( sourceFileLike, @@ -159626,7 +161917,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c } return { importSearches, singleReferences }; function handleImport(decl) { - if (decl.kind === 270 /* ImportEqualsDeclaration */) { + if (decl.kind === 271 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } @@ -159636,7 +161927,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c handleNamespaceImportLike(decl); return; } - if (decl.kind === 204 /* ImportType */) { + if (decl.kind === 205 /* ImportType */) { if (decl.qualifier) { const firstIdentifier = getFirstIdentifier(decl.qualifier); if (firstIdentifier.escapedText === symbolName(exportSymbol)) { @@ -159650,7 +161941,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c if (decl.moduleSpecifier.kind !== 11 /* StringLiteral */) { return; } - if (decl.kind === 277 /* ExportDeclaration */) { + if (decl.kind === 278 /* ExportDeclaration */) { if (decl.exportClause && isNamedExports(decl.exportClause)) { searchForNamedImport(decl.exportClause); } @@ -159659,10 +161950,10 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: handleNamespaceImportLike(namedBindings.name); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { searchForNamedImport(namedBindings); } @@ -159696,7 +161987,7 @@ function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, c addSearch(name, checker.getSymbolAtLocation(name)); } } else { - const localSymbol = element.kind === 280 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); + const localSymbol = element.kind === 281 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); } } @@ -159720,7 +162011,7 @@ function findModuleReferences(program, sourceFiles, searchModuleSymbol) { const checker = program.getTypeChecker(); for (const referencingFile of sourceFiles) { const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 311 /* SourceFile */) { + if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 312 /* SourceFile */) { for (const ref of referencingFile.referencedFiles) { if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { refs.push({ kind: "reference", referencingFile, ref }); @@ -159762,7 +162053,7 @@ function getDirectImportsMap(sourceFiles, checker, cancellationToken) { return map2; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 311 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( + return forEach(sourceFileLike.kind === 312 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( // TODO: GH#18217 action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action) )); @@ -159775,15 +162066,15 @@ function forEachImport(sourceFile, action) { } else { forEachPossibleImportOrExportStatement(sourceFile, (statement) => { switch (statement.kind) { - case 277 /* ExportDeclaration */: - case 271 /* ImportDeclaration */: { + case 278 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: { const decl = statement; if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; } - case 270 /* ImportEqualsDeclaration */: { + case 271 /* ImportEqualsDeclaration */: { const decl = statement; if (isExternalModuleImportEquals(decl)) { action(decl, decl.moduleReference.expression); @@ -159801,7 +162092,7 @@ function getImportOrExportSymbol(node, symbol, checker, comingFromExport) { const { parent: parent2 } = node; const grandparent = parent2.parent; if (symbol.exportSymbol) { - if (parent2.kind === 210 /* PropertyAccessExpression */) { + if (parent2.kind === 211 /* PropertyAccessExpression */) { return ((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport( grandparent, /*useLhsSymbol*/ @@ -159918,15 +162209,15 @@ function getExportNode(parent2, node) { function isNodeImport(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return parent2.name === node && isExternalModuleImportEquals(parent2); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return !parent2.propertyName; - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: Debug.assert(parent2.name === node); return true; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); default: return false; @@ -159957,21 +162248,21 @@ function getContainingModuleSymbol(importer, checker) { return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { return node.getSourceFile(); } const { parent: parent2 } = node; - if (parent2.kind === 311 /* SourceFile */) { + if (parent2.kind === 312 /* SourceFile */) { return parent2; } - Debug.assert(parent2.kind === 267 /* ModuleBlock */); + Debug.assert(parent2.kind === 268 /* ModuleBlock */); return cast(parent2.parent, isAmbientModuleDeclaration); } function isAmbientModuleDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */ && node.name.kind === 11 /* StringLiteral */; + return node.kind === 267 /* ModuleDeclaration */ && node.name.kind === 11 /* StringLiteral */; } function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 282 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 11 /* StringLiteral */; + return eq.moduleReference.kind === 283 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 11 /* StringLiteral */; } // src/services/findAllReferences.ts @@ -160044,28 +162335,28 @@ function getContextNode(node) { if (!node) return void 0; switch (node.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getContextNode(node.parent.parent); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent; - case 280 /* ExportSpecifier */: - case 273 /* NamespaceImport */: + case 281 /* ExportSpecifier */: + case 274 /* NamespaceImport */: return node.parent.parent; - case 272 /* ImportClause */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 280 /* NamespaceExport */: return node.parent; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isExpressionStatement(node.parent) ? node.parent : node; - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: return { start: node.initializer, end: node.expression }; - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( findAncestor( node.parent, @@ -160110,7 +162401,7 @@ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, s const node = getTouchingPropertyName(sourceFile, position); let referenceEntries; const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 210 /* PropertyAccessExpression */ || node.parent.kind === 207 /* BindingElement */ || node.parent.kind === 211 /* ElementAccessExpression */ || node.kind === 108 /* SuperKeyword */) { + if (node.parent.kind === 211 /* PropertyAccessExpression */ || node.parent.kind === 208 /* BindingElement */ || node.parent.kind === 212 /* ElementAccessExpression */ || node.kind === 108 /* SuperKeyword */) { referenceEntries = entries && [...entries]; } else if (entries) { const queue = createQueue(entries); @@ -160131,11 +162422,11 @@ function getImplementationsAtPosition(program, cancellationToken, sourceFiles, s return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return void 0; } const checker = program.getTypeChecker(); - if (node.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { const result = []; Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); return result; @@ -160330,12 +162621,12 @@ function implementationKindDisplayParts(node, checker) { const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); if (symbol) { return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 209 /* ObjectLiteralExpression */) { + } else if (node.kind === 210 /* ObjectLiteralExpression */) { return { kind: "interface" /* interfaceElement */, displayParts: [punctuationPart(21 /* OpenParenToken */), textPart("object literal"), punctuationPart(22 /* CloseParenToken */)] }; - } else if (node.kind === 230 /* ClassExpression */) { + } else if (node.kind === 231 /* ClassExpression */) { return { kind: "local class" /* localClassElement */, displayParts: [punctuationPart(21 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(22 /* CloseParenToken */)] @@ -160390,49 +162681,49 @@ function isDeclarationOfSymbol(node, target) { return !!(source && ((_a = target.declarations) == null ? void 0 : _a.some((d) => d === source || d === commonjsSource))); } function declarationIsWriteAccess(decl) { - if (!!(decl.flags & 16777216 /* Ambient */)) + if (!!(decl.flags & 33554432 /* Ambient */)) return true; switch (decl.kind) { - case 225 /* BinaryExpression */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 226 /* BinaryExpression */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: case 90 /* DefaultKeyword */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 280 /* ExportSpecifier */: - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 263 /* InterfaceDeclaration */: - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: - case 290 /* JsxAttribute */: - case 266 /* ModuleDeclaration */: - case 269 /* NamespaceExportDeclaration */: - case 273 /* NamespaceImport */: - case 279 /* NamespaceExport */: - case 168 /* Parameter */: - case 303 /* ShorthandPropertyAssignment */: - case 264 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 281 /* ExportSpecifier */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 264 /* InterfaceDeclaration */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 291 /* JsxAttribute */: + case 267 /* ModuleDeclaration */: + case 270 /* NamespaceExportDeclaration */: + case 274 /* NamespaceImport */: + case 280 /* NamespaceExport */: + case 169 /* Parameter */: + case 304 /* ShorthandPropertyAssignment */: + case 265 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: return true; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return !!decl.body; - case 259 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: + case 260 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: return !!decl.initializer || isCatchClause(decl.parent); - case 172 /* MethodSignature */: - case 170 /* PropertySignature */: - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: + case 173 /* MethodSignature */: + case 171 /* PropertySignature */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: return false; default: return Debug.failBadSyntaxKind(decl); @@ -160657,9 +162948,9 @@ var Core; if (symbol.declarations) { for (const decl of symbol.declarations) { switch (decl.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { references.push(nodeEntry(decl.name)); } @@ -160783,7 +163074,7 @@ var Core; } function getSpecialSearchKind(node) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: case 137 /* ConstructorKeyword */: return 1 /* Constructor */; case 80 /* Identifier */: @@ -160992,7 +163283,7 @@ var Core; } function getSymbolScope(symbol) { const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 217 /* FunctionExpression */ || valueDeclaration.kind === 230 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 218 /* FunctionExpression */ || valueDeclaration.kind === 231 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -161001,7 +163292,7 @@ var Core; if (flags & (4 /* Property */ | 8192 /* Method */)) { const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { - return getAncestor(privateDeclaration, 262 /* ClassDeclaration */); + return getAncestor(privateDeclaration, 263 /* ClassDeclaration */); } return void 0; } @@ -161018,7 +163309,7 @@ var Core; if (scope && scope !== container) { return void 0; } - if (!container || container.kind === 311 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 312 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { return void 0; } scope = container; @@ -161096,7 +163387,10 @@ var Core; } Core2.someSignatureUsage = someSignatureUsage; function getPossibleSymbolReferenceNodes(sourceFile, symbolName2, container = sourceFile) { - return getPossibleSymbolReferencePositions(sourceFile, symbolName2, container).map((pos) => getTouchingPropertyName(sourceFile, pos)); + return mapDefined(getPossibleSymbolReferencePositions(sourceFile, symbolName2, container), (pos) => { + const referenceLocation = getTouchingPropertyName(sourceFile, pos); + return referenceLocation === sourceFile ? void 0 : referenceLocation; + }); } function getPossibleSymbolReferencePositions(sourceFile, symbolName2, container = sourceFile) { const positions = []; @@ -161365,14 +163659,14 @@ var Core; if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { const ctrKeyword = findChildOfKind(decl, 137 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 175 /* Constructor */ && !!ctrKeyword); + Debug.assert(decl.kind === 176 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } } if (classSymbol.exports) { classSymbol.exports.forEach((member) => { const decl = member.valueDeclaration; - if (decl && decl.kind === 173 /* MethodDeclaration */) { + if (decl && decl.kind === 174 /* MethodDeclaration */) { const body = decl.body; if (body) { forEachDescendantOfKind(body, 110 /* ThisKeyword */, (thisKeyword) => { @@ -161394,7 +163688,7 @@ var Core; return; } for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 175 /* Constructor */); + Debug.assert(decl.kind === 176 /* Constructor */); const body = decl.body; if (body) { forEachDescendantOfKind(body, 108 /* SuperKeyword */, (node) => { @@ -161429,12 +163723,12 @@ var Core; if (refNode.kind !== 80 /* Identifier */) { return; } - if (refNode.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 304 /* ShorthandPropertyAssignment */) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); } - const containingClass = getContainingClassIfInHeritageClause(refNode); - if (containingClass) { - addReference2(containingClass); + const containingNode = getContainingNodeIfInHeritageClause(refNode); + if (containingNode) { + addReference2(containingNode); return; } const typeNode = findAncestor(refNode, (a) => !isQualifiedName(a.parent) && !isTypeNode(a.parent) && !isTypeElement(a.parent)); @@ -161444,7 +163738,7 @@ var Core; addIfImplementation(typeHavingNode.initializer); } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { const body = typeHavingNode.body; - if (body.kind === 240 /* Block */) { + if (body.kind === 241 /* Block */) { forEachReturnStatement(body, (returnStatement) => { if (returnStatement.expression) addIfImplementation(returnStatement.expression); @@ -161461,18 +163755,18 @@ var Core; addReference2(e); } } - function getContainingClassIfInHeritageClause(node) { - return isIdentifier(node) || isPropertyAccessExpression(node) ? getContainingClassIfInHeritageClause(node.parent) : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, isClassLike) : void 0; + function getContainingNodeIfInHeritageClause(node) { + return isIdentifier(node) || isPropertyAccessExpression(node) ? getContainingNodeIfInHeritageClause(node.parent) : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, or(isClassLike, isInterfaceDeclaration)) : void 0; } function isImplementationExpression(node) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 208 /* ArrayLiteralExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 209 /* ArrayLiteralExpression */: return true; default: return false; @@ -161506,13 +163800,13 @@ var Core; } let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -161534,7 +163828,7 @@ var Core; return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; } function isParameterName(node) { - return node.kind === 80 /* Identifier */ && node.parent.kind === 168 /* Parameter */ && node.parent.name === node; + return node.kind === 80 /* Identifier */ && node.parent.kind === 169 /* Parameter */ && node.parent.name === node; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { let searchSpaceNode = getThisContainer( @@ -161546,32 +163840,32 @@ var Core; ); let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isObjectLiteralMethod(searchSpaceNode)) { staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { return void 0; } - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: break; default: return void 0; } - const references = flatMap(searchSpaceNode.kind === 311 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { + const references = flatMap(searchSpaceNode.kind === 312 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { cancellationToken.throwIfCancellationRequested(); return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { if (!isThis(node)) { @@ -161587,18 +163881,18 @@ var Core; if (!canHaveSymbol(container)) return false; switch (searchSpaceNode.kind) { - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return searchSpaceNode.symbol === container.symbol; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: - case 209 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 210 /* ObjectLiteralExpression */: return container.parent && canHaveSymbol(container.parent) && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 311 /* SourceFile */: - return container.kind === 311 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); + case 312 /* SourceFile */: + return container.kind === 312 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); } }); }).map((n) => nodeEntry(n)); @@ -161722,7 +164016,7 @@ var Core; Debug.assert(paramProps.length === 2 && !!(paramProps[0].flags & 1 /* FunctionScopedVariable */) && !!(paramProps[1].flags & 4 /* Property */)); return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } - const exportSpecifier = getDeclarationOfKind(symbol, 280 /* ExportSpecifier */); + const exportSpecifier = getDeclarationOfKind(symbol, 281 /* ExportSpecifier */); if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); if (localSymbol) { @@ -161763,7 +164057,7 @@ var Core; ) || (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */) && allowBaseTypes(rootSymbol) ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, (base) => cbSymbol(sym, rootSymbol, base, kind)) : void 0)); } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol2, checker2) { - const bindingElement = getDeclarationOfKind(symbol2, 207 /* BindingElement */); + const bindingElement = getDeclarationOfKind(symbol2, 208 /* BindingElement */); if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { return getPropertySymbolFromBindingElement(checker2, bindingElement); } @@ -161829,7 +164123,7 @@ var Core; } Core2.getIntersectingMeaningFromDeclarations = getIntersectingMeaningFromDeclarations; function isImplementation(node) { - return !!(node.flags & 16777216 /* Ambient */) ? !(isInterfaceDeclaration(node) || isTypeAliasDeclaration(node)) : isVariableLike(node) ? hasInitializer(node) : isFunctionLikeDeclaration(node) ? !!node.body : isClassLike(node) || isModuleOrEnumDeclaration(node); + return !!(node.flags & 33554432 /* Ambient */) ? !(isInterfaceDeclaration(node) || isTypeAliasDeclaration(node)) : isVariableLike(node) ? hasInitializer(node) : isFunctionLikeDeclaration(node) ? !!node.body : isClassLike(node) || isModuleOrEnumDeclaration(node); } function getReferenceEntriesForShorthandPropertyAssignment(node, checker, addReference2) { const refSymbol = checker.getSymbolAtLocation(node); @@ -161890,7 +164184,7 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles } const { parent: parent2 } = node; const typeChecker = program.getTypeChecker(); - if (node.kind === 163 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { + if (node.kind === 164 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { return getDefinitionFromOverriddenMember(typeChecker, node) || emptyArray; } if (isJumpStatementTarget(node)) { @@ -161981,7 +164275,7 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles return node.kind === 108 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; } } - if (node.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { const shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo( decl, @@ -162082,6 +164376,76 @@ function getReferenceAtPosition(sourceFile, position, program) { } return void 0; } +var typesWithUnwrappedTypeArguments = /* @__PURE__ */ new Set([ + "Array", + "ArrayLike", + "ReadonlyArray", + "Promise", + "PromiseLike", + "Iterable", + "IterableIterator", + "AsyncIterable", + "Set", + "WeakSet", + "ReadonlySet", + "Map", + "WeakMap", + "ReadonlyMap", + "Partial", + "Required", + "Readonly", + "Pick", + "Omit" +]); +function shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type) { + const referenceName = type.symbol.name; + if (!typesWithUnwrappedTypeArguments.has(referenceName)) { + return false; + } + const globalType = typeChecker.resolveName( + referenceName, + /*location*/ + void 0, + 788968 /* Type */, + /*excludeGlobals*/ + false + ); + return !!globalType && globalType === type.target.symbol; +} +function shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) { + if (!type.aliasSymbol) { + return false; + } + const referenceName = type.aliasSymbol.name; + if (!typesWithUnwrappedTypeArguments.has(referenceName)) { + return false; + } + const globalType = typeChecker.resolveName( + referenceName, + /*location*/ + void 0, + 788968 /* Type */, + /*excludeGlobals*/ + false + ); + return !!globalType && globalType === type.aliasSymbol; +} +function getFirstTypeArgumentDefinitions(typeChecker, type, node, failedAliasResolution) { + var _a, _b; + if (!!(getObjectFlags(type) & 4 /* Reference */) && shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type)) { + return definitionFromType(typeChecker.getTypeArguments(type)[0], typeChecker, node, failedAliasResolution); + } + if (shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) && type.aliasTypeArguments) { + return definitionFromType(type.aliasTypeArguments[0], typeChecker, node, failedAliasResolution); + } + if (getObjectFlags(type) & 32 /* Mapped */ && type.target && shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type.target)) { + const declaration = (_b = (_a = type.aliasSymbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b[0]; + if (declaration && isTypeAliasDeclaration(declaration) && isTypeReferenceNode(declaration.type) && declaration.type.typeArguments) { + return definitionFromType(typeChecker.getTypeAtLocation(declaration.type.typeArguments[0]), typeChecker, node, failedAliasResolution); + } + } + return []; +} function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) { const node = getTouchingPropertyName(sourceFile, position); if (node === sourceFile) { @@ -162107,8 +164471,8 @@ function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) { const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node); const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker); const fromReturnType = returnType && definitionFromType(returnType, typeChecker, node, failedAliasResolution); - const typeDefinitions = fromReturnType && fromReturnType.length !== 0 ? fromReturnType : definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution); - return typeDefinitions.length ? typeDefinitions : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0; + const [resolvedType, typeDefinitions] = fromReturnType && fromReturnType.length !== 0 ? [returnType, fromReturnType] : [typeAtLocation, definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution)]; + return typeDefinitions.length ? [...getFirstTypeArgumentDefinitions(typeChecker, resolvedType, node, failedAliasResolution), ...typeDefinitions] : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0; } function definitionFromType(type, checker, node, failedAliasResolution) { return flatMap(type.isUnion() && !(type.flags & 32 /* Enum */) ? type.types : [type], (t) => t.symbol && getDefinitionFromSymbol(checker, t.symbol, node, failedAliasResolution)); @@ -162158,7 +164522,7 @@ function shouldSkipAlias(node, declaration) { if (node.parent === declaration) { return true; } - if (declaration.kind === 273 /* NamespaceImport */) { + if (declaration.kind === 274 /* NamespaceImport */) { return false; } return true; @@ -162248,7 +164612,7 @@ function createDefinitionInfoFromName(checker, declaration, symbolKind, symbolNa ts_FindAllReferences_exports.getContextNode(declaration) ), isLocal: !isDefinitionVisible(checker, declaration), - isAmbient: !!(declaration.flags & 16777216 /* Ambient */), + isAmbient: !!(declaration.flags & 33554432 /* Ambient */), unverified, failedAliasResolution }; @@ -162261,19 +164625,19 @@ function isDefinitionVisible(checker, declaration) { if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent); switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: if (hasEffectiveModifier(declaration, 8 /* Private */)) return false; - case 175 /* Constructor */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: + case 176 /* Constructor */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: return isDefinitionVisible(checker, declaration.parent); default: return false; @@ -162317,9 +164681,9 @@ function tryGetSignatureDeclaration(typeChecker, node) { } function isConstructorLike(node) { switch (node.kind) { - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: return true; default: return false; @@ -162333,7 +164697,7 @@ __export(ts_InlayHints_exports, { }); // src/services/inlayHints.ts -var maxHintsLength = 30; +var maxTypeHintLength = 30; var leadingParameterNameCommentRegexFactory = (name) => { return new RegExp(`^\\s?/\\*\\*?\\s?${name}\\s?\\*\\/\\s?$`); }; @@ -162343,6 +164707,9 @@ function shouldShowParameterNameHints(preferences) { function shouldShowLiteralParameterNameHintsOnly(preferences) { return preferences.includeInlayParameterNameHints === "literals"; } +function shouldUseInteractiveInlayHints(preferences) { + return preferences.interactiveInlayHints === true; +} function provideInlayHints(context) { const { file, program, span, cancellationToken, preferences } = context; const sourceFileText = file.text; @@ -162356,14 +164723,14 @@ function provideInlayHints(context) { return; } switch (node.kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 218 /* ArrowFunction */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { @@ -162393,17 +164760,26 @@ function provideInlayHints(context) { function isSignatureSupportingReturnAnnotation(node) { return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node); } - function addParameterHints(text, position, isFirstVariadicArgument) { + function addParameterHints(text, parameter, position, isFirstVariadicArgument) { + let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`; + let displayParts; + if (shouldUseInteractiveInlayHints(preferences)) { + displayParts = [getNodeDisplayPart(hintText, parameter), { text: ":" }]; + hintText = ""; + } else { + hintText += ":"; + } result.push({ - text: `${isFirstVariadicArgument ? "..." : ""}${truncation(text, maxHintsLength)}:`, + text: hintText, position, kind: "Parameter" /* Parameter */, - whitespaceAfter: true + whitespaceAfter: true, + displayParts }); } function addTypeHints(text, position) { result.push({ - text: `: ${truncation(text, maxHintsLength)}`, + text: `: ${text.length > maxTypeHintLength ? text.substr(0, maxTypeHintLength - "...".length) + "..." : text}`, position, kind: "Type" /* Type */, whitespaceBefore: true @@ -162411,7 +164787,7 @@ function provideInlayHints(context) { } function addEnumMemberValueHints(text, position) { result.push({ - text: `= ${truncation(text, maxHintsLength)}`, + text: `= ${text}`, position, kind: "Enum" /* Enum */, whitespaceBefore: true @@ -162460,15 +164836,31 @@ function provideInlayHints(context) { if (!signature || !candidates.length) { return; } - for (let i = 0; i < args.length; ++i) { - const originalArg = args[i]; + let signatureParamPos = 0; + for (const originalArg of args) { const arg = skipParentheses(originalArg); if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) { continue; } - const identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i); - if (identifierNameInfo) { - const [parameterName, isFirstVariadicArgument] = identifierNameInfo; + let spreadArgs = 0; + if (isSpreadElement(arg)) { + const spreadType = checker.getTypeAtLocation(arg.expression); + if (checker.isTupleType(spreadType)) { + const { elementFlags, fixedLength } = spreadType.target; + if (fixedLength === 0) { + continue; + } + const firstOptionalIndex = findIndex(elementFlags, (f) => !(f & 1 /* Required */)); + const requiredArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex; + if (requiredArgs > 0) { + spreadArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex; + } + } + } + const identifierInfo = checker.getParameterIdentifierInfoAtPosition(signature, signatureParamPos); + signatureParamPos = signatureParamPos + (spreadArgs || 1); + if (identifierInfo) { + const { parameter, parameterName, isRestParameter: isFirstVariadicArgument } = identifierInfo; const isParameterNameNotSameAsArgument = preferences.includeInlayParameterNameHintsWhenArgumentMatchesName || !identifierOrAccessExpressionPostfixMatchesParameterName(arg, parameterName); if (!isParameterNameNotSameAsArgument && !isFirstVariadicArgument) { continue; @@ -162477,7 +164869,7 @@ function provideInlayHints(context) { if (leadingCommentsContainsParameterName(arg, name)) { continue; } - addParameterHints(name, originalArg.getStart(), isFirstVariadicArgument); + addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument); } } } @@ -162503,7 +164895,7 @@ function provideInlayHints(context) { } function isHintableLiteral(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: { + case 224 /* PrefixUnaryExpression */: { const operand = node.operand; return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); } @@ -162511,7 +164903,7 @@ function provideInlayHints(context) { case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return true; case 80 /* Identifier */: { const name = node.escapedText; @@ -162583,12 +164975,6 @@ function provideInlayHints(context) { } return printTypeInSingleLine(signatureParamType); } - function truncation(text, maxLength2) { - if (text.length > maxLength2) { - return text.substr(0, maxLength2 - "...".length) + "..."; - } - return text; - } function printTypeInSingleLine(type) { const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; const printer = createPrinterWithRemoveComments(); @@ -162619,6 +165005,14 @@ function provideInlayHints(context) { } return true; } + function getNodeDisplayPart(text, node) { + const sourceFile = node.getSourceFile(); + return { + text, + span: createTextSpanFromNode(node, sourceFile), + file: sourceFile.fileName + }; + } } // src/services/_namespaces/ts.JsDoc.ts @@ -162727,8 +165121,8 @@ function getJsDocCommentsFromDeclarations(declarations, checker) { const parts = []; forEachUnique(declarations, (declaration) => { for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 333 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 352 /* JSDocTypedefTag */ && declaration.kind !== 344 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 352 /* JSDocTypedefTag */ || t.kind === 344 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 347 /* JSDocParameterTag */ || t.kind === 348 /* JSDocReturnTag */)) { + const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 334 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); + if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 353 /* JSDocTypedefTag */ && declaration.kind !== 345 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 353 /* JSDocTypedefTag */ || t.kind === 345 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 348 /* JSDocParameterTag */ || t.kind === 349 /* JSDocReturnTag */)) { continue; } let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; @@ -162747,11 +165141,11 @@ function isIdenticalListOfDisplayParts(parts1, parts2) { } function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: return [declaration]; - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return getJSDocCommentsAndTags(declaration); @@ -162761,7 +165155,7 @@ function getJsDocTagsFromDeclarations(declarations, checker) { const infos = []; forEachUnique(declarations, (declaration) => { const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 352 /* JSDocTypedefTag */ || t.kind === 344 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 347 /* JSDocParameterTag */ || t.kind === 348 /* JSDocReturnTag */)) { + if (tags.some((t) => t.kind === 353 /* JSDocTypedefTag */ || t.kind === 345 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 348 /* JSDocParameterTag */ || t.kind === 349 /* JSDocReturnTag */)) { return; } for (const tag of tags) { @@ -162776,21 +165170,21 @@ function getDisplayPartsFromComment(comment, checker) { } return flatMap( comment, - (node) => node.kind === 327 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) + (node) => node.kind === 328 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) ); } function getCommentDisplayParts(tag, checker) { const { comment, kind } = tag; const namePart = getTagNameDisplayPart(kind); switch (kind) { - case 355 /* JSDocThrowsTag */: + case 356 /* JSDocThrowsTag */: const typeExpression = tag.typeExpression; return typeExpression ? withNode(typeExpression) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return withNode(tag.class); - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return withNode(tag.class); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: const templateTag = tag; const displayParts = []; if (templateTag.constraint) { @@ -162812,14 +165206,14 @@ function getCommentDisplayParts(tag, checker) { displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); } return displayParts; - case 350 /* JSDocTypeTag */: - case 356 /* JSDocSatisfiesTag */: + case 351 /* JSDocTypeTag */: + case 357 /* JSDocSatisfiesTag */: return withNode(tag.typeExpression); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: - case 353 /* JSDocSeeTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: + case 354 /* JSDocSeeTag */: const { name } = tag; return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); default: @@ -162842,14 +165236,14 @@ function getCommentDisplayParts(tag, checker) { } function getTagNameDisplayPart(kind) { switch (kind) { - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return parameterNamePart; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return propertyNamePart; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return typeParameterNamePart; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: return typeAliasNamePart; default: return textPart; @@ -162943,7 +165337,7 @@ function getDocCommentTemplateAtPosition(newLine, sourceFile, position, options) const tags = (parameters ? parameterDocComments(parameters || [], isJavaScriptFile, indentationStr, newLine) : "") + (hasReturn2 ? returnsDocComment(indentationStr, newLine) : ""); const openComment = "/**"; const closeComment = " */"; - const hasTag = (commentOwnerJsDoc || []).some((jsDoc) => !!jsDoc.tags); + const hasTag = length(getJSDocTags(commentOwner)) > 0; if (tags && !hasTag) { const preamble = openComment + newLine + indentationStr + " * "; const endLine = tokenStart === position ? newLine + indentationStr : ""; @@ -162975,46 +165369,46 @@ function getCommentOwnerInfo(tokenAtPos, options) { } function getCommentOwnerInfoWorker(commentOwner, options) { switch (commentOwner.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 172 /* MethodSignature */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 173 /* MethodSignature */: + case 219 /* ArrowFunction */: const host = commentOwner; return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 264 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 265 /* TypeAliasDeclaration */: return { commentOwner }; - case 170 /* PropertySignature */: { + case 171 /* PropertySignature */: { const host2 = commentOwner; return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; } - case 242 /* VariableStatement */: { + case 243 /* VariableStatement */: { const varStatement = commentOwner; const varDeclarations = varStatement.declarationList.declarations; const host2 = varDeclarations.length === 1 && varDeclarations[0].initializer ? getRightHandSideOfAssignment(varDeclarations[0].initializer) : void 0; return host2 ? { commentOwner, parameters: host2.parameters, hasReturn: hasReturn(host2, options) } : { commentOwner }; } - case 311 /* SourceFile */: + case 312 /* SourceFile */: return "quit"; - case 266 /* ModuleDeclaration */: - return commentOwner.parent.kind === 266 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 243 /* ExpressionStatement */: + case 267 /* ModuleDeclaration */: + return commentOwner.parent.kind === 267 /* ModuleDeclaration */ ? void 0 : { commentOwner }; + case 244 /* ExpressionStatement */: return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const be = commentOwner; if (getAssignmentDeclarationKind(be) === 0 /* None */) { return "quit"; } return isFunctionLike(be.right) ? { commentOwner, parameters: be.right.parameters, hasReturn: hasReturn(be.right, options) } : { commentOwner }; } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: const init = commentOwner.initializer; if (init && (isFunctionExpression(init) || isArrowFunction(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; @@ -163025,14 +165419,14 @@ function hasReturn(node, options) { return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock(node.body) && !!forEachReturnStatement(node.body, (n) => n)); } function getRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 216 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 217 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return rightHandSide; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return find(rightHandSide.members, isConstructorDeclaration); } } @@ -163090,7 +165484,7 @@ function organizeImports(sourceFile, formatContext, host, program, preferences, if (length(oldImportDecls) === 0) { return; } - suppressLeadingTrivia(oldImportDecls[0]); + setEmitFlags(oldImportDecls[0], 1024 /* NoLeadingComments */); const oldImportGroups = shouldCombine ? group(oldImportDecls, (importDecl) => getExternalModuleName2(importDecl.moduleSpecifier)) : [oldImportDecls]; const sortedImportGroups = shouldSort ? stableSort(oldImportGroups, (group1, group2) => compareModuleSpecifiersWorker(group1[0].moduleSpecifier, group2[0].moduleSpecifier, comparer)) : oldImportGroups; const newImportDecls = flatMap(sortedImportGroups, (importGroup) => getExternalModuleName2(importGroup[0].moduleSpecifier) || importGroup[0].moduleSpecifier === void 0 ? coalesce(importGroup) : importGroup); @@ -163413,11 +165807,11 @@ function compareModuleSpecifiersWorker(m1, m2, comparer) { function getModuleSpecifierExpression(declaration) { var _a; switch (declaration.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return (_a = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return declaration.moduleSpecifier; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return declaration.declarationList.declarations[0].initializer.arguments[0]; } } @@ -163553,19 +165947,19 @@ function compareImportKind(s1, s2) { function getImportKindOrder(s1) { var _a; switch (s1.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: if (!s1.importClause) return 0; if (s1.importClause.isTypeOnly) return 1; - if (((_a = s1.importClause.namedBindings) == null ? void 0 : _a.kind) === 273 /* NamespaceImport */) + if (((_a = s1.importClause.namedBindings) == null ? void 0 : _a.kind) === 274 /* NamespaceImport */) return 2; if (s1.importClause.name) return 3; return 4; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return 5; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return 6; } } @@ -163814,21 +166208,21 @@ function createOutliningSpanFromBounds(pos, end, kind) { } function getOutliningSpanForNode(n, sourceFile) { switch (n.kind) { - case 240 /* Block */: + case 241 /* Block */: if (isFunctionLike(n.parent)) { return functionSpan(n.parent, n, sourceFile); } switch (n.parent.kind) { - case 245 /* DoStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 244 /* IfStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 298 /* CatchClause */: + case 246 /* DoStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 245 /* IfStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 299 /* CatchClause */: return spanForNode(n.parent); - case 257 /* TryStatement */: + case 258 /* TryStatement */: const tryStatement = n.parent; if (tryStatement.tryBlock === n) { return spanForNode(n.parent); @@ -163840,17 +166234,17 @@ function getOutliningSpanForNode(n, sourceFile) { default: return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); } - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return spanForNode(n.parent); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 268 /* CaseBlock */: - case 186 /* TypeLiteral */: - case 205 /* ObjectBindingPattern */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 269 /* CaseBlock */: + case 187 /* TypeLiteral */: + case 206 /* ObjectBindingPattern */: return spanForNode(n); - case 188 /* TupleType */: + case 189 /* TupleType */: return spanForNode( n, /*autoCollapse*/ @@ -163859,24 +166253,24 @@ function getOutliningSpanForNode(n, sourceFile) { !isTupleTypeNode(n.parent), 23 /* OpenBracketToken */ ); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return spanForNodeArray(n.statements); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return spanForObjectOrArrayLiteral(n); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return spanForObjectOrArrayLiteral(n, 23 /* OpenBracketToken */); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return spanForJSXElement(n); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return spanForJSXFragment(n); - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: case 15 /* NoSubstitutionTemplateLiteral */: return spanForTemplateLiteral(n); - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: return spanForNode( n, /*autoCollapse*/ @@ -163885,15 +166279,15 @@ function getOutliningSpanForNode(n, sourceFile) { !isBindingElement(n.parent), 23 /* OpenBracketToken */ ); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return spanForArrowFunction(n); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return spanForCallExpression(n); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return spanForParenthesizedExpression(n); - case 274 /* NamedImports */: - case 278 /* NamedExports */: - case 299 /* AssertClause */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: + case 300 /* AssertClause */: return spanForNamedImportsOrExportsOrAssertClause(n); } function spanForNamedImportsOrExportsOrAssertClause(node) { @@ -164014,7 +166408,7 @@ function functionSpan(node, body, sourceFile) { node, sourceFile, /*autoCollapse*/ - node.kind !== 218 /* ArrowFunction */ + node.kind !== 219 /* ArrowFunction */ ); } function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { @@ -164083,7 +166477,7 @@ function getRenameInfoForNode(node, typeChecker, sourceFile, program, preference return getRenameInfoError(wouldRenameNodeModules); } const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; + const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; const displayName = specifierName || typeChecker.symbolToString(symbol); const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol); return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), node, sourceFile); @@ -164357,10 +166751,10 @@ function getImmediatelyContainingArgumentInfo(node, position, sourceFile) { ); } return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 214 /* TaggedTemplateExpression */) { + } else if (isTemplateHead(node) && parent2.parent.kind === 215 /* TaggedTemplateExpression */) { const templateExpression = parent2; const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 227 /* TemplateExpression */); + Debug.assert(templateExpression.kind === 228 /* TemplateExpression */); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { @@ -164437,17 +166831,17 @@ function getAdjustedNode(node) { function getContextualSignatureLocationInfo(node, sourceFile, position, checker) { const { parent: parent2 } = node; switch (parent2.kind) { - case 216 /* ParenthesizedExpression */: - case 173 /* MethodDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 217 /* ParenthesizedExpression */: + case 174 /* MethodDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: const info = getArgumentOrParameterListInfo(node, position, sourceFile); if (!info) return void 0; const { argumentIndex, argumentCount, argumentsSpan } = info; const contextualType = isMethodDeclaration(parent2) ? checker.getContextualTypeForObjectLiteralElement(parent2) : checker.getContextualType(parent2); return contextualType && { contextualType, argumentIndex, argumentCount, argumentsSpan }; - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const highestBinary = getHighestBinary(parent2); const contextualType2 = checker.getContextualType(highestBinary); const argumentIndex2 = node.kind === 21 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; @@ -164521,7 +166915,7 @@ function getApplicableSpanForTaggedTemplate(taggedTemplate, sourceFile) { const template = taggedTemplate.template; const applicableSpanStart = template.getStart(); let applicableSpanEnd = template.getEnd(); - if (template.kind === 227 /* TemplateExpression */) { + if (template.kind === 228 /* TemplateExpression */) { const lastSpan = last(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia( @@ -164821,7 +167215,7 @@ function getSelectionChildren(node) { const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 148 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 58 /* QuestionToken */); const groupedWithBrackets = groupChildren( groupedWithPlusMinusTokens, - ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 167 /* TypeParameter */ || kind === 24 /* CloseBracketToken */ + ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 24 /* CloseBracketToken */ ); return [ openBraceToken, @@ -164832,7 +167226,7 @@ function getSelectionChildren(node) { } if (isPropertySignature(node)) { const children = groupChildren(node.getChildren(), (child) => child === node.name || contains(node.modifiers, child)); - const firstJSDocChild = ((_a = children[0]) == null ? void 0 : _a.kind) === 326 /* JSDoc */ ? children[0] : void 0; + const firstJSDocChild = ((_a = children[0]) == null ? void 0 : _a.kind) === 327 /* JSDoc */ ? children[0] : void 0; const withJSDocSeparated = firstJSDocChild ? children.slice(1) : children; const splittedChildren = splitChildren(withJSDocSeparated, ({ kind }) => kind === 59 /* ColonToken */); return firstJSDocChild ? [firstJSDocChild, createSyntaxList2(splittedChildren)] : splittedChildren; @@ -164893,19 +167287,19 @@ function createSyntaxList2(children) { } function isListOpener(token) { const kind = token && token.kind; - return kind === 19 /* OpenBraceToken */ || kind === 23 /* OpenBracketToken */ || kind === 21 /* OpenParenToken */ || kind === 285 /* JsxOpeningElement */; + return kind === 19 /* OpenBraceToken */ || kind === 23 /* OpenBracketToken */ || kind === 21 /* OpenParenToken */ || kind === 286 /* JsxOpeningElement */; } function isListCloser(token) { const kind = token && token.kind; - return kind === 20 /* CloseBraceToken */ || kind === 24 /* CloseBracketToken */ || kind === 22 /* CloseParenToken */ || kind === 286 /* JsxClosingElement */; + return kind === 20 /* CloseBraceToken */ || kind === 24 /* CloseBracketToken */ || kind === 22 /* CloseParenToken */ || kind === 287 /* JsxClosingElement */; } function getEndPos(sourceFile, node) { switch (node.kind) { - case 347 /* JSDocParameterTag */: - case 344 /* JSDocCallbackTag */: - case 354 /* JSDocPropertyTag */: - case 352 /* JSDocTypedefTag */: - case 349 /* JSDocThisTag */: + case 348 /* JSDocParameterTag */: + case 345 /* JSDocCallbackTag */: + case 355 /* JSDocPropertyTag */: + case 353 /* JSDocTypedefTag */: + case 350 /* JSDocThisTag */: return sourceFile.getLineEndOfPosition(node.getStart()); default: return node.getEnd(); @@ -164929,7 +167323,7 @@ function getSymbolKind(typeChecker, symbol, location) { } const flags = getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 230 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; + return getDeclarationOfKind(symbol, 231 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; } if (flags & 384 /* Enum */) return "enum" /* enumElement */; @@ -164967,6 +167361,10 @@ function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeCheck return "parameter" /* parameterElement */; } else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration)) { return "const" /* constElement */; + } else if (symbol.valueDeclaration && isVarUsing(symbol.valueDeclaration)) { + return "using" /* variableUsingElement */; + } else if (symbol.valueDeclaration && isVarAwaitUsing(symbol.valueDeclaration)) { + return "await using" /* variableAwaitUsingElement */; } else if (forEach(symbol.declarations, isLet)) { return "let" /* letElement */; } @@ -165034,7 +167432,7 @@ function getSymbolModifiers(typeChecker, symbol) { } return modifiers.size > 0 ? arrayFrom(modifiers.values()).join(",") : "" /* none */; } -function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias) { +function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, type, semanticMeaning, alias) { var _a; const displayParts = []; let documentation = []; @@ -165043,7 +167441,6 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so let symbolKind = semanticMeaning & 1 /* Value */ ? getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) : "" /* unknown */; let hasAddedSymbolInfo = false; const isThisExpression = location.kind === 110 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location); - let type; let documentationFromAlias; let tagsFromAlias; let hasMultipleSignatures = false; @@ -165055,13 +167452,13 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location); if (declaration) { switch (declaration.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: symbolKind = "getter" /* memberGetAccessorElement */; break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: symbolKind = "setter" /* memberSetAccessorElement */; break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: symbolKind = "accessor" /* memberAccessorVariableElement */; break; default: @@ -165072,8 +167469,8 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so } } let signature; - type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (location.parent && location.parent.kind === 210 /* PropertyAccessExpression */) { + type ?? (type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location)); + if (location.parent && location.parent.kind === 211 /* PropertyAccessExpression */) { const right = location.parent.name; if (right === location || right && right.getFullWidth() === 0) { location = location.parent; @@ -165089,7 +167486,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so } if (callExpressionLike) { signature = typeChecker.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 213 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 108 /* SuperKeyword */; + const useConstructSignatures = callExpressionLike.kind === 214 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 108 /* SuperKeyword */; const allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (signature && !contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : void 0; @@ -165152,21 +167549,21 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so hasMultipleSignatures = allSignatures.length > 1; } } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || // name of function declaration - location.kind === 137 /* ConstructorKeyword */ && location.parent.kind === 175 /* Constructor */) { + location.kind === 137 /* ConstructorKeyword */ && location.parent.kind === 176 /* Constructor */) { const functionDeclaration = location.parent; const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 137 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 175 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + const allSignatures = functionDeclaration.kind === 176 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 175 /* Constructor */) { + if (functionDeclaration.kind === 176 /* Constructor */) { symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 178 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -165178,7 +167575,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 230 /* ClassExpression */)) { + if (getDeclarationOfKind(symbol, 231 /* ClassExpression */)) { pushSymbolKind("local class" /* localClassElement */); } else { displayParts.push(keywordPart(86 /* ClassKeyword */)); @@ -165217,7 +167614,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so } if (symbolFlags & 1536 /* Module */ && !isThisExpression) { prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 266 /* ModuleDeclaration */); + const declaration = getDeclarationOfKind(symbol, 267 /* ModuleDeclaration */); const isNamespace = declaration && declaration.name && declaration.name.kind === 80 /* Identifier */; displayParts.push(keywordPart(isNamespace ? 145 /* NamespaceKeyword */ : 144 /* ModuleKeyword */)); displayParts.push(spacePart()); @@ -165235,7 +167632,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so addFullSymbolName(symbol.parent, enclosingDeclaration); writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - const decl = getDeclarationOfKind(symbol, 167 /* TypeParameter */); + const decl = getDeclarationOfKind(symbol, 168 /* TypeParameter */); if (decl === void 0) return Debug.fail(); const declaration = decl.parent; @@ -165243,10 +167640,10 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so if (isFunctionLike(declaration)) { addInPrefix(); const signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 179 /* ConstructSignature */) { + if (declaration.kind === 180 /* ConstructSignature */) { displayParts.push(keywordPart(105 /* NewKeyword */)); displayParts.push(spacePart()); - } else if (declaration.kind !== 178 /* CallSignature */ && declaration.name) { + } else if (declaration.kind !== 179 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); @@ -165264,7 +167661,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so symbolKind = "enum member" /* enumMemberElement */; addPrefixForAnyFunctionOrVar(symbol, "enum member"); const declaration = (_a = symbol.declarations) == null ? void 0 : _a[0]; - if ((declaration == null ? void 0 : declaration.kind) === 305 /* EnumMember */) { + if ((declaration == null ? void 0 : declaration.kind) === 306 /* EnumMember */) { const constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== void 0) { displayParts.push(spacePart()); @@ -165287,12 +167684,13 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so if (declarationName && !hasAddedSymbolInfo) { const isExternalModuleDeclaration = isModuleWithStringLiteralName(resolvedNode) && hasSyntacticModifier(resolvedNode, 2 /* Ambient */); const shouldUseAliasName = symbol.name !== "default" && !isExternalModuleDeclaration; - const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKind( + const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKindWorker( typeChecker, resolvedSymbol, getSourceFileOfNode(resolvedNode), resolvedNode, declarationName, + type, semanticMeaning, shouldUseAliasName ? symbol : resolvedSymbol ); @@ -165308,17 +167706,17 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so } if (symbol.declarations) { switch (symbol.declarations[0].kind) { - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: displayParts.push(keywordPart(95 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(145 /* NamespaceKeyword */)); break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: displayParts.push(keywordPart(95 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 64 /* EqualsToken */ : 90 /* DefaultKeyword */)); break; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: displayParts.push(keywordPart(95 /* ExportKeyword */)); break; default: @@ -165328,7 +167726,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so displayParts.push(spacePart()); addFullSymbolName(symbol); forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 270 /* ImportEqualsDeclaration */) { + if (declaration.kind === 271 /* ImportEqualsDeclaration */) { const importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); @@ -165360,7 +167758,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so } else { addPrefixForAnyFunctionOrVar(symbol, symbolKind); } - if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || isThisExpression) { + if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || symbolKind === "using" /* variableUsingElement */ || symbolKind === "await using" /* variableAwaitUsingElement */ || isThisExpression) { displayParts.push(punctuationPart(59 /* ColonToken */)); displayParts.push(spacePart()); if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== "index" /* indexSignatureElement */) { @@ -165396,9 +167794,9 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker); } if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 311 /* SourceFile */)) { + if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 312 /* SourceFile */)) { for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 225 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 226 /* BinaryExpression */) { continue; } const rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -165510,6 +167908,8 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so case "let" /* letElement */: case "const" /* constElement */: case "constructor" /* constructorImplementationElement */: + case "using" /* variableUsingElement */: + case "await using" /* variableAwaitUsingElement */: displayParts.push(textOrKeywordPart(symbolKind2)); return; default: @@ -165545,19 +167945,32 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so addRange(displayParts, typeParameterParts); } } +function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias) { + return getSymbolDisplayPartsDocumentationAndSymbolKindWorker( + typeChecker, + symbol, + sourceFile, + enclosingDeclaration, + location, + /*type*/ + void 0, + semanticMeaning, + alias + ); +} function isLocalVariableOrFunction(symbol) { if (symbol.parent) { return false; } return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 217 /* FunctionExpression */) { + if (declaration.kind === 218 /* FunctionExpression */) { return true; } - if (declaration.kind !== 259 /* VariableDeclaration */ && declaration.kind !== 261 /* FunctionDeclaration */) { + if (declaration.kind !== 260 /* VariableDeclaration */ && declaration.kind !== 262 /* FunctionDeclaration */) { return false; } for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 311 /* SourceFile */ || parent2.kind === 267 /* ModuleBlock */) { + if (parent2.kind === 312 /* SourceFile */ || parent2.kind === 268 /* ModuleBlock */) { return false; } } @@ -165740,12 +168153,12 @@ function getAdjustedEndPosition(sourceFile, node, options) { return newEnd !== end && (trailingTriviaOption === 2 /* Include */ || isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))) ? newEnd : end; } function isSeparator(node, candidate) { - return !!candidate && !!node.parent && (candidate.kind === 28 /* CommaToken */ || candidate.kind === 27 /* SemicolonToken */ && node.parent.kind === 209 /* ObjectLiteralExpression */); + return !!candidate && !!node.parent && (candidate.kind === 28 /* CommaToken */ || candidate.kind === 27 /* SemicolonToken */ && node.parent.kind === 210 /* ObjectLiteralExpression */); } function isThisTypeAnnotatable(containingFunction) { return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); } -var ChangeTracker = class { +var ChangeTracker = class _ChangeTracker { /** Public for tests only. Other callers should use `ChangeTracker.with`. */ constructor(newLineCharacter, formatContext) { this.newLineCharacter = newLineCharacter; @@ -165756,10 +168169,10 @@ var ChangeTracker = class { this.deletedNodes = []; } static fromContext(context) { - return new ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext); + return new _ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext); } static with(context, cb) { - const tracker = ChangeTracker.fromContext(context); + const tracker = _ChangeTracker.fromContext(context); cb(tracker); return tracker.getChanges(); } @@ -165894,6 +168307,9 @@ var ChangeTracker = class { insertNodeBefore(sourceFile, before, newNode, blankLineBetween = false, options = {}) { this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween)); } + insertNodesBefore(sourceFile, before, newNodes, blankLineBetween = false, options = {}) { + this.insertNodesAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNodes, this.getOptionsForInsertNodeBefore(before, first(newNodes), blankLineBetween)); + } insertModifierAt(sourceFile, pos, modifier, options = {}) { this.insertNodeAt(sourceFile, pos, factory.createToken(modifier), options); } @@ -165966,7 +168382,7 @@ var ChangeTracker = class { endNode2 = first(node.parameters); } } else { - endNode2 = (node.kind === 259 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) ?? node.name; + endNode2 = (node.kind === 260 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) ?? node.name; } this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); return true; @@ -166114,18 +168530,18 @@ ${options.prefix}` : "\n" : options.prefix } getInsertNodeAfterOptionsWorker(node) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: case 11 /* StringLiteral */: case 80 /* Identifier */: return { prefix: ", " }; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return { suffix: "," + this.newLineCharacter }; case 95 /* ExportKeyword */: return { prefix: " " }; - case 168 /* Parameter */: + case 169 /* Parameter */: return {}; default: Debug.assert(isStatement(node) || isClassOrTypeElement(node)); @@ -166134,7 +168550,7 @@ ${options.prefix}` : "\n" : options.prefix } insertName(sourceFile, node, name) { Debug.assert(!node.name); - if (node.kind === 218 /* ArrowFunction */) { + if (node.kind === 219 /* ArrowFunction */) { const arrow = findChildOfKind(node, 39 /* EqualsGreaterThanToken */, sourceFile); const lparen = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile); if (lparen) { @@ -166144,12 +168560,12 @@ ${options.prefix}` : "\n" : options.prefix this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); this.replaceRange(sourceFile, arrow, factory.createToken(22 /* CloseParenToken */)); } - if (node.body.kind !== 240 /* Block */) { + if (node.body.kind !== 241 /* Block */) { this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(19 /* OpenBraceToken */), factory.createToken(107 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); this.insertNodesAt(sourceFile, node.body.end, [factory.createToken(27 /* SemicolonToken */), factory.createToken(20 /* CloseBraceToken */)], { joiner: " " }); } } else { - const pos = findChildOfKind(node, node.kind === 217 /* FunctionExpression */ ? 100 /* FunctionKeyword */ : 86 /* ClassKeyword */, sourceFile).end; + const pos = findChildOfKind(node, node.kind === 218 /* FunctionExpression */ ? 100 /* FunctionKeyword */ : 86 /* ClassKeyword */, sourceFile).end; this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); } } @@ -166290,10 +168706,10 @@ ${options.prefix}` : "\n" : options.prefix } }; function updateJSDocHost(parent2) { - if (parent2.kind !== 218 /* ArrowFunction */) { + if (parent2.kind !== 219 /* ArrowFunction */) { return parent2; } - const jsDocNode = parent2.parent.kind === 171 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; + const jsDocNode = parent2.parent.kind === 172 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; jsDocNode.jsDoc = parent2.jsDoc; return jsDocNode; } @@ -166302,7 +168718,7 @@ function tryMergeJsdocTags(oldTag, newTag) { return void 0; } switch (oldTag.kind) { - case 347 /* JSDocParameterTag */: { + case 348 /* JSDocParameterTag */: { const oldParam = oldTag; const newParam = newTag; return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag( @@ -166316,14 +168732,14 @@ function tryMergeJsdocTags(oldTag, newTag) { oldParam.comment ) : void 0; } - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: return factory.createJSDocReturnTag( /*tagName*/ void 0, newTag.typeExpression, oldTag.comment ); - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return factory.createJSDocTypeTag( /*tagName*/ void 0, @@ -166777,13 +169193,13 @@ function isValidLocationToAddComment(sourceFile, position) { return !isInComment(sourceFile, position) && !isInString(sourceFile, position) && !isInTemplateString(sourceFile, position) && !isInJSXText(sourceFile, position); } function needSemicolonBetween(a, b) { - return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 166 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 167 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } var deleteDeclaration; ((_deleteDeclaration) => { function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { switch (node.kind) { - case 168 /* Parameter */: { + case 169 /* Parameter */: { const oldFunction = node.parent; if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 21 /* OpenParenToken */, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); @@ -166792,29 +169208,29 @@ var deleteDeclaration; } break; } - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: const isFirstImport = sourceFile.imports.length && node === first(sourceFile.imports).parent || node === find(sourceFile.statements, isAnyImportSyntax); deleteNode(changes, sourceFile, node, { leadingTriviaOption: isFirstImport ? 0 /* Exclude */ : hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: const pattern = node.parent; - const preserveComma = pattern.kind === 206 /* ArrayBindingPattern */ && node !== last(pattern.elements); + const preserveComma = pattern.kind === 207 /* ArrayBindingPattern */ && node !== last(pattern.elements); if (preserveComma) { deleteNode(changes, sourceFile, node); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); break; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: const namedImports = node.parent; if (namedImports.elements.length === 1) { deleteImportBinding(changes, sourceFile, namedImports); @@ -166822,7 +169238,7 @@ var deleteDeclaration; deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: deleteImportBinding(changes, sourceFile, node); break; case 27 /* SemicolonToken */: @@ -166831,8 +169247,8 @@ var deleteDeclaration; case 100 /* FunctionKeyword */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); break; - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -166874,13 +169290,13 @@ var deleteDeclaration; const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { - const importDecl = getAncestor(node, 271 /* ImportDeclaration */); + const importDecl = getAncestor(node, 272 /* ImportDeclaration */); deleteNode(changes, sourceFile, importDecl); } } function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { const { parent: parent2 } = node; - if (parent2.kind === 298 /* CatchClause */) { + if (parent2.kind === 299 /* CatchClause */) { changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 21 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 22 /* CloseParenToken */, sourceFile)); return; } @@ -166890,14 +169306,14 @@ var deleteDeclaration; } const gp = parent2.parent; switch (gp.kind) { - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); break; - case 247 /* ForStatement */: + case 248 /* ForStatement */: deleteNode(changes, sourceFile, parent2); break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -167107,10 +169523,10 @@ function getFormattingScanner(text, languageVariant, startPos, endPos, cb) { function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 290 /* JsxAttribute */: - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: - case 284 /* JsxSelfClosingElement */: + case 291 /* JsxAttribute */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: + case 285 /* JsxSelfClosingElement */: return isKeyword(node.kind) || node.kind === 80 /* Identifier */; } } @@ -167284,7 +169700,7 @@ var RuleFlags = /* @__PURE__ */ ((RuleFlags2) => { // src/services/formatting/rules.ts function getAllRules() { const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 164 /* LastToken */; token++) { + for (let token = 0 /* FirstToken */; token <= 165 /* LastToken */; token++) { if (token !== 1 /* EndOfFileToken */) { allTokens.push(token); } @@ -167295,12 +169711,12 @@ function getAllRules() { const anyToken = { tokens: allTokens, isSpecific: false }; const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(83 /* FirstKeyword */, 164 /* LastKeyword */); + const keywords = tokenRangeFromRange(83 /* FirstKeyword */, 165 /* LastKeyword */); const binaryOperators = tokenRangeFromRange(30 /* FirstBinaryOperator */, 79 /* LastBinaryOperator */); const binaryKeywordOperators = [ 103 /* InKeyword */, 104 /* InstanceOfKeyword */, - 164 /* OfKeyword */, + 165 /* OfKeyword */, 130 /* AsKeyword */, 142 /* IsKeyword */, 152 /* SatisfiesKeyword */ @@ -167429,7 +169845,7 @@ function getAllRules() { 153 /* SetKeyword */, 126 /* StaticKeyword */, 156 /* TypeKeyword */, - 160 /* FromKeyword */, + 161 /* FromKeyword */, 143 /* KeyOfKeyword */, 140 /* InferKeyword */ ], @@ -167440,7 +169856,7 @@ function getAllRules() { rule( "SpaceBeforeCertainTypeScriptKeywords", anyToken, - [96 /* ExtendsKeyword */, 119 /* ImplementsKeyword */, 160 /* FromKeyword */], + [96 /* ExtendsKeyword */, 119 /* ImplementsKeyword */, 161 /* FromKeyword */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */ ), @@ -167630,40 +170046,40 @@ function isOptionEnabledOrUndefined(optionName) { return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; } function isForContext(context) { - return context.contextNode.kind === 247 /* ForStatement */; + return context.contextNode.kind === 248 /* ForStatement */; } function isNotForContext(context) { return !isForContext(context); } function isBinaryOpContext(context) { switch (context.contextNode.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return context.contextNode.operatorToken.kind !== 28 /* CommaToken */; - case 226 /* ConditionalExpression */: - case 193 /* ConditionalType */: - case 233 /* AsExpression */: - case 280 /* ExportSpecifier */: - case 275 /* ImportSpecifier */: - case 181 /* TypePredicate */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 237 /* SatisfiesExpression */: + case 227 /* ConditionalExpression */: + case 194 /* ConditionalType */: + case 234 /* AsExpression */: + case 281 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 182 /* TypePredicate */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 238 /* SatisfiesExpression */: return true; - case 207 /* BindingElement */: - case 264 /* TypeAliasDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 276 /* ExportAssignment */: - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 305 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 208 /* BindingElement */: + case 265 /* TypeAliasDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 277 /* ExportAssignment */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 306 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */; - case 248 /* ForInStatement */: - case 167 /* TypeParameter */: + case 249 /* ForInStatement */: + case 168 /* TypeParameter */: return context.currentTokenSpan.kind === 103 /* InKeyword */ || context.nextTokenSpan.kind === 103 /* InKeyword */ || context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */; - case 249 /* ForOfStatement */: - return context.currentTokenSpan.kind === 164 /* OfKeyword */ || context.nextTokenSpan.kind === 164 /* OfKeyword */; + case 250 /* ForOfStatement */: + return context.currentTokenSpan.kind === 165 /* OfKeyword */ || context.nextTokenSpan.kind === 165 /* OfKeyword */; } return false; } @@ -167675,16 +170091,16 @@ function isNotTypeAnnotationContext(context) { } function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; - return contextKind === 171 /* PropertyDeclaration */ || contextKind === 170 /* PropertySignature */ || contextKind === 168 /* Parameter */ || contextKind === 259 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); + return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } function isConditionalOperatorContext(context) { - return context.contextNode.kind === 226 /* ConditionalExpression */ || context.contextNode.kind === 193 /* ConditionalType */; + return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */; } function isSameLineTokenOrBeforeBlockContext(context) { return context.TokensAreOnSameLine() || isBeforeBlockContext(context); } function isBraceWrappedContext(context) { - return context.contextNode.kind === 205 /* ObjectBindingPattern */ || context.contextNode.kind === 199 /* MappedType */ || isSingleLineBlockContext(context); + return context.contextNode.kind === 206 /* ObjectBindingPattern */ || context.contextNode.kind === 200 /* MappedType */ || isSingleLineBlockContext(context); } function isBeforeMultilineBlockContext(context) { return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -167706,26 +170122,26 @@ function nodeIsBlockContext(node) { return true; } switch (node.kind) { - case 240 /* Block */: - case 268 /* CaseBlock */: - case 209 /* ObjectLiteralExpression */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 210 /* ObjectLiteralExpression */: + case 268 /* ModuleBlock */: return true; } return false; } function isFunctionDeclContext(context) { switch (context.contextNode.kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 178 /* CallSignature */: - case 217 /* FunctionExpression */: - case 175 /* Constructor */: - case 218 /* ArrowFunction */: - case 263 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 179 /* CallSignature */: + case 218 /* FunctionExpression */: + case 176 /* Constructor */: + case 219 /* ArrowFunction */: + case 264 /* InterfaceDeclaration */: return true; } return false; @@ -167734,39 +170150,39 @@ function isNotFunctionDeclContext(context) { return !isFunctionDeclContext(context); } function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 261 /* FunctionDeclaration */ || context.contextNode.kind === 217 /* FunctionExpression */; + return context.contextNode.kind === 262 /* FunctionDeclaration */ || context.contextNode.kind === 218 /* FunctionExpression */; } function isTypeScriptDeclWithBlockContext(context) { return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); } function nodeIsTypeScriptDeclWithBlockContext(node) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 186 /* TypeLiteral */: - case 266 /* ModuleDeclaration */: - case 277 /* ExportDeclaration */: - case 278 /* NamedExports */: - case 271 /* ImportDeclaration */: - case 274 /* NamedImports */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 187 /* TypeLiteral */: + case 267 /* ModuleDeclaration */: + case 278 /* ExportDeclaration */: + case 279 /* NamedExports */: + case 272 /* ImportDeclaration */: + case 275 /* NamedImports */: return true; } return false; } function isAfterCodeBlockContext(context) { switch (context.currentTokenParent.kind) { - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 298 /* CatchClause */: - case 267 /* ModuleBlock */: - case 254 /* SwitchStatement */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 299 /* CatchClause */: + case 268 /* ModuleBlock */: + case 255 /* SwitchStatement */: return true; - case 240 /* Block */: { + case 241 /* Block */: { const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 218 /* ArrowFunction */ && blockParent.kind !== 217 /* FunctionExpression */) { + if (!blockParent || blockParent.kind !== 219 /* ArrowFunction */ && blockParent.kind !== 218 /* FunctionExpression */) { return true; } } @@ -167775,29 +170191,29 @@ function isAfterCodeBlockContext(context) { } function isControlDeclContext(context) { switch (context.contextNode.kind) { - case 244 /* IfStatement */: - case 254 /* SwitchStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 246 /* WhileStatement */: - case 257 /* TryStatement */: - case 245 /* DoStatement */: - case 253 /* WithStatement */: - case 298 /* CatchClause */: + case 245 /* IfStatement */: + case 255 /* SwitchStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 247 /* WhileStatement */: + case 258 /* TryStatement */: + case 246 /* DoStatement */: + case 254 /* WithStatement */: + case 299 /* CatchClause */: return true; default: return false; } } function isObjectContext(context) { - return context.contextNode.kind === 209 /* ObjectLiteralExpression */; + return context.contextNode.kind === 210 /* ObjectLiteralExpression */; } function isFunctionCallContext(context) { - return context.contextNode.kind === 212 /* CallExpression */; + return context.contextNode.kind === 213 /* CallExpression */; } function isNewContext(context) { - return context.contextNode.kind === 213 /* NewExpression */; + return context.contextNode.kind === 214 /* NewExpression */; } function isFunctionCallOrNewContext(context) { return isFunctionCallContext(context) || isNewContext(context); @@ -167812,10 +170228,10 @@ function isNextTokenNotCloseParen(context) { return context.nextTokenSpan.kind !== 22 /* CloseParenToken */; } function isArrowFunctionContext(context) { - return context.contextNode.kind === 218 /* ArrowFunction */; + return context.contextNode.kind === 219 /* ArrowFunction */; } function isImportTypeContext(context) { - return context.contextNode.kind === 204 /* ImportType */; + return context.contextNode.kind === 205 /* ImportType */; } function isNonJsxSameLineTokenContext(context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 12 /* JsxText */; @@ -167824,19 +170240,19 @@ function isNonJsxTextContext(context) { return context.contextNode.kind !== 12 /* JsxText */; } function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 283 /* JsxElement */ && context.contextNode.kind !== 287 /* JsxFragment */; + return context.contextNode.kind !== 284 /* JsxElement */ && context.contextNode.kind !== 288 /* JsxFragment */; } function isJsxExpressionContext(context) { - return context.contextNode.kind === 293 /* JsxExpression */ || context.contextNode.kind === 292 /* JsxSpreadAttribute */; + return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 290 /* JsxAttribute */; + return context.nextTokenParent.kind === 291 /* JsxAttribute */; } function isJsxAttributeContext(context) { - return context.contextNode.kind === 290 /* JsxAttribute */; + return context.contextNode.kind === 291 /* JsxAttribute */; } function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 284 /* JsxSelfClosingElement */; + return context.contextNode.kind === 285 /* JsxSelfClosingElement */; } function isNotBeforeBlockInFunctionDeclarationContext(context) { return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); @@ -167848,44 +170264,44 @@ function nodeIsInDecoratorContext(node) { while (node && isExpression(node)) { node = node.parent; } - return node && node.kind === 169 /* Decorator */; + return node && node.kind === 170 /* Decorator */; } function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 260 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; + return context.currentTokenParent.kind === 261 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; } function isNotFormatOnEnter(context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; } function isModuleDeclContext(context) { - return context.contextNode.kind === 266 /* ModuleDeclaration */; + return context.contextNode.kind === 267 /* ModuleDeclaration */; } function isObjectTypeContext(context) { - return context.contextNode.kind === 186 /* TypeLiteral */; + return context.contextNode.kind === 187 /* TypeLiteral */; } function isConstructorSignatureContext(context) { - return context.contextNode.kind === 179 /* ConstructSignature */; + return context.contextNode.kind === 180 /* ConstructSignature */; } function isTypeArgumentOrParameterOrAssertion(token, parent2) { if (token.kind !== 30 /* LessThanToken */ && token.kind !== 32 /* GreaterThanToken */) { return false; } switch (parent2.kind) { - case 182 /* TypeReference */: - case 215 /* TypeAssertionExpression */: - case 264 /* TypeAliasDeclaration */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 232 /* ExpressionWithTypeArguments */: + case 183 /* TypeReference */: + case 216 /* TypeAssertionExpression */: + case 265 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 233 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -167895,31 +170311,31 @@ function isTypeArgumentOrParameterOrAssertionContext(context) { return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); } function isTypeAssertionContext(context) { - return context.contextNode.kind === 215 /* TypeAssertionExpression */; + return context.contextNode.kind === 216 /* TypeAssertionExpression */; } function isNonTypeAssertionContext(context) { return !isTypeAssertionContext(context); } function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 116 /* VoidKeyword */ && context.currentTokenParent.kind === 221 /* VoidExpression */; + return context.currentTokenSpan.kind === 116 /* VoidKeyword */ && context.currentTokenParent.kind === 222 /* VoidExpression */; } function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 228 /* YieldExpression */ && context.contextNode.expression !== void 0; + return context.contextNode.kind === 229 /* YieldExpression */ && context.contextNode.expression !== void 0; } function isNonNullAssertionContext(context) { - return context.contextNode.kind === 234 /* NonNullExpression */; + return context.contextNode.kind === 235 /* NonNullExpression */; } function isNotStatementConditionContext(context) { return !isStatementConditionContext(context); } function isStatementConditionContext(context) { switch (context.contextNode.kind) { - case 244 /* IfStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 245 /* IfStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return true; default: return false; @@ -167945,16 +170361,16 @@ function isSemicolonDeletionContext(context) { if (startLine === endLine) { return nextTokenKind === 20 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; } - if (nextTokenKind === 239 /* SemicolonClassElement */ || nextTokenKind === 27 /* SemicolonToken */) { + if (nextTokenKind === 240 /* SemicolonClassElement */ || nextTokenKind === 27 /* SemicolonToken */) { return false; } - if (context.contextNode.kind === 263 /* InterfaceDeclaration */ || context.contextNode.kind === 264 /* TypeAliasDeclaration */) { + if (context.contextNode.kind === 264 /* InterfaceDeclaration */ || context.contextNode.kind === 265 /* TypeAliasDeclaration */) { return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 21 /* OpenParenToken */; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; } - return context.currentTokenParent.kind !== 247 /* ForStatement */ && context.currentTokenParent.kind !== 241 /* EmptyStatement */ && context.currentTokenParent.kind !== 239 /* SemicolonClassElement */ && nextTokenKind !== 23 /* OpenBracketToken */ && nextTokenKind !== 21 /* OpenParenToken */ && nextTokenKind !== 40 /* PlusToken */ && nextTokenKind !== 41 /* MinusToken */ && nextTokenKind !== 44 /* SlashToken */ && nextTokenKind !== 14 /* RegularExpressionLiteral */ && nextTokenKind !== 28 /* CommaToken */ && nextTokenKind !== 227 /* TemplateExpression */ && nextTokenKind !== 16 /* TemplateHead */ && nextTokenKind !== 15 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 25 /* DotToken */; + return context.currentTokenParent.kind !== 248 /* ForStatement */ && context.currentTokenParent.kind !== 242 /* EmptyStatement */ && context.currentTokenParent.kind !== 240 /* SemicolonClassElement */ && nextTokenKind !== 23 /* OpenBracketToken */ && nextTokenKind !== 21 /* OpenParenToken */ && nextTokenKind !== 40 /* PlusToken */ && nextTokenKind !== 41 /* MinusToken */ && nextTokenKind !== 44 /* SlashToken */ && nextTokenKind !== 14 /* RegularExpressionLiteral */ && nextTokenKind !== 28 /* CommaToken */ && nextTokenKind !== 228 /* TemplateExpression */ && nextTokenKind !== 16 /* TemplateHead */ && nextTokenKind !== 15 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 25 /* DotToken */; } function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); @@ -168029,12 +170445,12 @@ function buildMap(rules) { return map2; } function getRuleBucketIndex(row, column) { - Debug.assert(row <= 164 /* LastKeyword */ && column <= 164 /* LastKeyword */, "Must compute formatting context from tokens"); + Debug.assert(row <= 165 /* LastKeyword */ && column <= 165 /* LastKeyword */, "Must compute formatting context from tokens"); return row * mapRowLength + column; } var maskBitSize = 5; var mask = 31; -var mapRowLength = 164 /* LastToken */ + 1; +var mapRowLength = 165 /* LastToken */ + 1; var RulesPosition = ((RulesPosition2) => { RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; @@ -168143,17 +170559,17 @@ function findOutermostNodeWithinListLevel(node) { } function isListElement(parent2, node) { switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: return rangeContainsRange(parent2.members, node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const body = parent2.body; - return !!body && body.kind === 267 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 311 /* SourceFile */: - case 240 /* Block */: - case 267 /* ModuleBlock */: + return !!body && body.kind === 268 /* ModuleBlock */ && rangeContainsRange(body.statements, node); + case 312 /* SourceFile */: + case 241 /* Block */: + case 268 /* ModuleBlock */: return rangeContainsRange(parent2.statements, node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return rangeContainsRange(parent2.block.statements, node); } return false; @@ -168185,11 +170601,11 @@ function prepareRangeContainsErrorFunction(errors, originalRange) { if (index >= sorted.length) { return false; } - const error = sorted[index]; - if (r.end <= error.start) { + const error2 = sorted[index]; + if (r.end <= error2.start) { return false; } - if (startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { + if (startEndOverlapsWithStartEnd(r.pos, r.end, error2.start, error2.start + error2.length)) { return true; } index++; @@ -168294,7 +170710,8 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt } processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta); } - if (!formattingScanner.isOnToken()) { + const remainingTrivia = formattingScanner.getCurrentLeadingTrivia(); + if (remainingTrivia) { const indentation = SmartIndenter.nodeWillIndentChild( options, enclosingNode, @@ -168304,25 +170721,30 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt /*indentByDefault*/ false ) ? initialIndentation + options.indentSize : initialIndentation; - const leadingTrivia = formattingScanner.getCurrentLeadingTrivia(); - if (leadingTrivia) { - indentTriviaItems( - leadingTrivia, - indentation, - /*indentNextTokenOrTrivia*/ - false, - (item) => processRange( + indentTriviaItems( + remainingTrivia, + indentation, + /*indentNextTokenOrTrivia*/ + true, + (item) => { + processRange( item, sourceFile.getLineAndCharacterOfPosition(item.pos), enclosingNode, enclosingNode, /*dynamicIndentation*/ void 0 - ) - ); - if (options.trimTrailingWhitespace !== false) { - trimTrailingWhitespacesForRemainingRange(leadingTrivia); + ); + insertIndentation( + item.pos, + indentation, + /*lineAdded*/ + false + ); } + ); + if (options.trimTrailingWhitespace !== false) { + trimTrailingWhitespacesForRemainingRange(remainingTrivia); } } if (previousRange && formattingScanner.getTokenFullStart() >= originalRange.end) { @@ -168385,24 +170807,24 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt return modifier.kind; } switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return 86 /* ClassKeyword */; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return 120 /* InterfaceKeyword */; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return 100 /* FunctionKeyword */; - case 265 /* EnumDeclaration */: - return 265 /* EnumDeclaration */; - case 176 /* GetAccessor */: + case 266 /* EnumDeclaration */: + return 266 /* EnumDeclaration */; + case 177 /* GetAccessor */: return 139 /* GetKeyword */; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return 153 /* SetKeyword */; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: if (node.asteriskToken) { return 42 /* AsteriskToken */; } - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: const name = getNameOfDeclaration(node); if (name) { return name.kind; @@ -168452,15 +170874,15 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt case 44 /* SlashToken */: case 32 /* GreaterThanToken */: switch (container.kind) { - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: + case 285 /* JsxSelfClosingElement */: return false; } break; case 23 /* OpenBracketToken */: case 24 /* CloseBracketToken */: - if (container.kind !== 199 /* MappedType */) { + if (container.kind !== 200 /* MappedType */) { return false; } break; @@ -168561,11 +170983,11 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt return inheritedIndentation; } } - const effectiveParentStartLine = child.kind === 169 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + const effectiveParentStartLine = child.kind === 170 /* Decorator */ ? childStartLine : undecoratedParentStartLine; const childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent2.kind === 208 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent2.kind === 209 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -168986,50 +171408,50 @@ function getRangeOfEnclosingComment(sourceFile, position, precedingToken, tokenA } function getOpenTokenForList(node, list) { switch (node.kind) { - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 218 /* ArrowFunction */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 219 /* ArrowFunction */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (node.typeParameters === list) { return 30 /* LessThanToken */; } else if (node.parameters === list) { return 21 /* OpenParenToken */; } break; - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: if (node.typeArguments === list) { return 30 /* LessThanToken */; } else if (node.arguments === list) { return 21 /* OpenParenToken */; } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: if (node.typeParameters === list) { return 30 /* LessThanToken */; } break; - case 182 /* TypeReference */: - case 214 /* TaggedTemplateExpression */: - case 185 /* TypeQuery */: - case 232 /* ExpressionWithTypeArguments */: - case 204 /* ImportType */: + case 183 /* TypeReference */: + case 215 /* TaggedTemplateExpression */: + case 186 /* TypeQuery */: + case 233 /* ExpressionWithTypeArguments */: + case 205 /* ImportType */: if (node.typeArguments === list) { return 30 /* LessThanToken */; } break; - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return 19 /* OpenBraceToken */; } return 0 /* Unknown */; @@ -169119,11 +171541,11 @@ var SmartIndenter; } const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 19 /* OpenBraceToken */ && currentToken.parent.kind === 209 /* ObjectLiteralExpression */; + const isObjectLiteral = currentToken.kind === 19 /* OpenBraceToken */ && currentToken.parent.kind === 210 /* ObjectLiteralExpression */; if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { return getBlockIndent(sourceFile, position, options); } - if (precedingToken.kind === 28 /* CommaToken */ && precedingToken.parent.kind !== 225 /* BinaryExpression */) { + if (precedingToken.kind === 28 /* CommaToken */ && precedingToken.parent.kind !== 226 /* BinaryExpression */) { const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { return actualIndentation; @@ -169131,7 +171553,7 @@ var SmartIndenter; } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [217 /* FunctionExpression */, 218 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -169273,7 +171695,7 @@ var SmartIndenter; } } function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 311 /* SourceFile */ || !parentAndChildShareLine); + const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 312 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -169311,7 +171733,7 @@ var SmartIndenter; } SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 244 /* IfStatement */ && parent2.elseStatement === child) { + if (parent2.kind === 245 /* IfStatement */ && parent2.elseStatement === child) { const elseKeyword = findChildOfKind(parent2, 93 /* ElseKeyword */, sourceFile); Debug.assert(elseKeyword !== void 0); const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -169362,42 +171784,42 @@ var SmartIndenter; } function getListByRange(start2, end, node, sourceFile) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return getList(node.typeArguments); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return getList(node.properties); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getList(node.elements); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return getList(node.members); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: return getList(node.typeParameters) || getList(node.parameters); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return getList(node.parameters); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 351 /* JSDocTemplateTag */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 352 /* JSDocTemplateTag */: return getList(node.typeParameters); - case 213 /* NewExpression */: - case 212 /* CallExpression */: + case 214 /* NewExpression */: + case 213 /* CallExpression */: return getList(node.typeArguments) || getList(node.arguments); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return getList(node.declarations); - case 274 /* NamedImports */: - case 278 /* NamedExports */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: return getList(node.elements); - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return getList(node.elements); } function getList(list) { @@ -169420,7 +171842,7 @@ var SmartIndenter; return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); } function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 260 /* VariableDeclarationList */) { + if (node.parent && node.parent.kind === 261 /* VariableDeclarationList */) { return -1 /* Unknown */; } const containingList = getContainingList(node, sourceFile); @@ -169481,96 +171903,96 @@ var SmartIndenter; function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { const childKind = child ? child.kind : 0 /* Unknown */; switch (parent2.kind) { - case 243 /* ExpressionStatement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 208 /* ArrayLiteralExpression */: - case 240 /* Block */: - case 267 /* ModuleBlock */: - case 209 /* ObjectLiteralExpression */: - case 186 /* TypeLiteral */: - case 199 /* MappedType */: - case 188 /* TupleType */: - case 216 /* ParenthesizedExpression */: - case 210 /* PropertyAccessExpression */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 242 /* VariableStatement */: - case 276 /* ExportAssignment */: - case 252 /* ReturnStatement */: - case 226 /* ConditionalExpression */: - case 206 /* ArrayBindingPattern */: - case 205 /* ObjectBindingPattern */: - case 285 /* JsxOpeningElement */: - case 288 /* JsxOpeningFragment */: - case 284 /* JsxSelfClosingElement */: - case 293 /* JsxExpression */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 168 /* Parameter */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 195 /* ParenthesizedType */: - case 214 /* TaggedTemplateExpression */: - case 222 /* AwaitExpression */: - case 278 /* NamedExports */: - case 274 /* NamedImports */: - case 280 /* ExportSpecifier */: - case 275 /* ImportSpecifier */: - case 171 /* PropertyDeclaration */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 244 /* ExpressionStatement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 209 /* ArrayLiteralExpression */: + case 241 /* Block */: + case 268 /* ModuleBlock */: + case 210 /* ObjectLiteralExpression */: + case 187 /* TypeLiteral */: + case 200 /* MappedType */: + case 189 /* TupleType */: + case 217 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 243 /* VariableStatement */: + case 277 /* ExportAssignment */: + case 253 /* ReturnStatement */: + case 227 /* ConditionalExpression */: + case 207 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 286 /* JsxOpeningElement */: + case 289 /* JsxOpeningFragment */: + case 285 /* JsxSelfClosingElement */: + case 294 /* JsxExpression */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 169 /* Parameter */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 196 /* ParenthesizedType */: + case 215 /* TaggedTemplateExpression */: + case 223 /* AwaitExpression */: + case 279 /* NamedExports */: + case 275 /* NamedImports */: + case 281 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 172 /* PropertyDeclaration */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return true; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return settings.indentSwitchCase ?? true; - case 259 /* VariableDeclaration */: - case 302 /* PropertyAssignment */: - case 225 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 209 /* ObjectLiteralExpression */) { + case 260 /* VariableDeclaration */: + case 303 /* PropertyAssignment */: + case 226 /* BinaryExpression */: + if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 210 /* ObjectLiteralExpression */) { return rangeIsOnOneLine(sourceFile, child); } - if (parent2.kind === 225 /* BinaryExpression */ && sourceFile && child && childKind === 283 /* JsxElement */) { + if (parent2.kind === 226 /* BinaryExpression */ && sourceFile && child && childKind === 284 /* JsxElement */) { const parentStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, parent2.pos)).line; const childStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, child.pos)).line; return parentStartLine !== childStartLine; } - if (parent2.kind !== 225 /* BinaryExpression */) { + if (parent2.kind !== 226 /* BinaryExpression */) { return true; } break; - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 244 /* IfStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - return childKind !== 240 /* Block */; - case 218 /* ArrowFunction */: - if (sourceFile && childKind === 216 /* ParenthesizedExpression */) { + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 245 /* IfStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + return childKind !== 241 /* Block */; + case 219 /* ArrowFunction */: + if (sourceFile && childKind === 217 /* ParenthesizedExpression */) { return rangeIsOnOneLine(sourceFile, child); } - return childKind !== 240 /* Block */; - case 277 /* ExportDeclaration */: - return childKind !== 278 /* NamedExports */; - case 271 /* ImportDeclaration */: - return childKind !== 272 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 274 /* NamedImports */; - case 283 /* JsxElement */: - return childKind !== 286 /* JsxClosingElement */; - case 287 /* JsxFragment */: - return childKind !== 289 /* JsxClosingFragment */; - case 192 /* IntersectionType */: - case 191 /* UnionType */: - if (childKind === 186 /* TypeLiteral */ || childKind === 188 /* TupleType */) { + return childKind !== 241 /* Block */; + case 278 /* ExportDeclaration */: + return childKind !== 279 /* NamedExports */; + case 272 /* ImportDeclaration */: + return childKind !== 273 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 275 /* NamedImports */; + case 284 /* JsxElement */: + return childKind !== 287 /* JsxClosingElement */; + case 288 /* JsxFragment */: + return childKind !== 290 /* JsxClosingFragment */; + case 193 /* IntersectionType */: + case 192 /* UnionType */: + if (childKind === 187 /* TypeLiteral */ || childKind === 189 /* TupleType */) { return false; } break; @@ -169580,11 +172002,11 @@ var SmartIndenter; SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; function isControlFlowEndingStatement(kind, parent2) { switch (kind) { - case 252 /* ReturnStatement */: - case 256 /* ThrowStatement */: - case 250 /* ContinueStatement */: - case 251 /* BreakStatement */: - return parent2.kind !== 240 /* Block */; + case 253 /* ReturnStatement */: + case 257 /* ThrowStatement */: + case 251 /* ContinueStatement */: + case 252 /* BreakStatement */: + return parent2.kind !== 241 /* Block */; default: return false; } @@ -169634,6 +172056,7 @@ __export(ts_exports2, { CompletionTriggerKind: () => CompletionTriggerKind, Completions: () => ts_Completions_exports, ConfigFileProgramReloadLevel: () => ConfigFileProgramReloadLevel, + ContainerFlags: () => ContainerFlags, ContextFlags: () => ContextFlags, CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, @@ -169663,6 +172086,8 @@ __export(ts_exports2, { GetLiteralTextFlags: () => GetLiteralTextFlags, GoToDefinition: () => ts_GoToDefinition_exports, HighlightSpanKind: () => HighlightSpanKind, + IdentifierNameMap: () => IdentifierNameMap, + IdentifierNameMultiMap: () => IdentifierNameMultiMap, ImportKind: () => ImportKind, ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, IndentStyle: () => IndentStyle, @@ -169767,6 +172192,7 @@ __export(ts_exports2, { WatchLogLevel: () => WatchLogLevel, WatchType: () => WatchType, accessPrivateIdentifier: () => accessPrivateIdentifier, + addDisposableResourceHelper: () => addDisposableResourceHelper, addEmitFlags: () => addEmitFlags, addEmitHelper: () => addEmitHelper, addEmitHelpers: () => addEmitHelpers, @@ -169846,6 +172272,9 @@ __export(ts_exports2, { changesAffectingProgramStructure: () => changesAffectingProgramStructure, childIsDecorated: () => childIsDecorated, classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, + classHasClassThisAssignment: () => classHasClassThisAssignment, + classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, + classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, classPrivateFieldInHelper: () => classPrivateFieldInHelper, @@ -169943,6 +172372,8 @@ __export(ts_exports2, { createCacheWithRedirects: () => createCacheWithRedirects, createCacheableExportInfoMap: () => createCacheableExportInfoMap, createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, + createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, + createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, createClassifier: () => createClassifier, createCommentDirectivesMap: () => createCommentDirectivesMap, createCompilerDiagnostic: () => createCompilerDiagnostic, @@ -170075,6 +172506,7 @@ __export(ts_exports2, { displayPart: () => displayPart, displayPartsToString: () => displayPartsToString, disposeEmitNodes: () => disposeEmitNodes, + disposeResourcesHelper: () => disposeResourcesHelper, documentSpansEqual: () => documentSpansEqual, dumpTracingLegend: () => dumpTracingLegend, elementAt: () => elementAt, @@ -170152,7 +172584,7 @@ __export(ts_exports2, { findPackageJsons: () => findPackageJsons, findPrecedingMatchingToken: () => findPrecedingMatchingToken, findPrecedingToken: () => findPrecedingToken, - findSuperStatementIndex: () => findSuperStatementIndex, + findSuperStatementIndexPath: () => findSuperStatementIndexPath, findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition, findUseStrictPrologue: () => findUseStrictPrologue, first: () => first, @@ -170227,6 +172659,7 @@ __export(ts_exports2, { getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, getAssignedName: () => getAssignedName, + getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, getAssignmentTargetKind: () => getAssignmentTargetKind, @@ -170254,8 +172687,10 @@ __export(ts_exports2, { getConditions: () => getConditions, getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, getConstantValue: () => getConstantValue, + getContainerFlags: () => getContainerFlags, getContainerNode: () => getContainerNode, getContainingClass: () => getContainingClass, + getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators, getContainingClassStaticBlock: () => getContainingClassStaticBlock, getContainingFunction: () => getContainingFunction, getContainingFunctionDeclaration: () => getContainingFunctionDeclaration, @@ -170313,7 +172748,9 @@ __export(ts_exports2, { getEmitModuleKind: () => getEmitModuleKind, getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, getEmitScriptTarget: () => getEmitScriptTarget, + getEmitStandardClassFields: () => getEmitStandardClassFields, getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer, + getEnclosingContainer: () => getEnclosingContainer, getEncodedSemanticClassifications: () => getEncodedSemanticClassifications, getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications, getEndLinePosition: () => getEndLinePosition, @@ -170531,6 +172968,7 @@ __export(ts_exports2, { getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression, getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode, getPropertyNameForUniqueESSymbol: () => getPropertyNameForUniqueESSymbol, + getPropertyNameFromType: () => getPropertyNameFromType, getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement, getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement, getPropertySymbolsFromContextualType: () => getPropertySymbolsFromContextualType, @@ -170711,6 +173149,8 @@ __export(ts_exports2, { indexOfNode: () => indexOfNode, indicesOf: () => indicesOf, inferredTypesContainingFile: () => inferredTypesContainingFile, + injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing, + injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing, insertImports: () => insertImports, insertLeadingStatement: () => insertLeadingStatement, insertSorted: () => insertSorted, @@ -170813,8 +173253,10 @@ __export(ts_exports2, { isClassExpression: () => isClassExpression, isClassLike: () => isClassLike, isClassMemberModifier: () => isClassMemberModifier, + isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, isClassOrTypeElement: () => isClassOrTypeElement, isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration, + isClassThisAssignmentBlock: () => isClassThisAssignmentBlock, isCollapsedRange: () => isCollapsedRange, isColonToken: () => isColonToken, isCommaExpression: () => isCommaExpression, @@ -170860,6 +173302,7 @@ __export(ts_exports2, { isDiagnosticWithLocation: () => isDiagnosticWithLocation, isDiskPathRoot: () => isDiskPathRoot, isDoStatement: () => isDoStatement, + isDocumentRegistryEntry: () => isDocumentRegistryEntry, isDotDotDotToken: () => isDotDotDotToken, isDottedName: () => isDottedName, isDynamicName: () => isDynamicName, @@ -170910,6 +173353,7 @@ __export(ts_exports2, { isExternalModuleReference: () => isExternalModuleReference, isExternalModuleSymbol: () => isExternalModuleSymbol, isExternalOrCommonJsModule: () => isExternalOrCommonJsModule, + isFileLevelReservedGeneratedIdentifier: () => isFileLevelReservedGeneratedIdentifier, isFileLevelUniqueName: () => isFileLevelUniqueName, isFileProbablyExternalModule: () => isFileProbablyExternalModule, isFirstDeclarationOfSymbolParameter: () => isFirstDeclarationOfSymbolParameter, @@ -170980,6 +173424,7 @@ __export(ts_exports2, { isInString: () => isInString, isInTemplateString: () => isInTemplateString, isInTopLevelContext: () => isInTopLevelContext, + isInTypeQuery: () => isInTypeQuery, isIncrementalCompilation: () => isIncrementalCompilation, isIndexSignatureDeclaration: () => isIndexSignatureDeclaration, isIndexedAccessTypeNode: () => isIndexedAccessTypeNode, @@ -171357,6 +173802,7 @@ __export(ts_exports2, { isTypeQueryNode: () => isTypeQueryNode, isTypeReferenceNode: () => isTypeReferenceNode, isTypeReferenceType: () => isTypeReferenceType, + isTypeUsableAsPropertyName: () => isTypeUsableAsPropertyName, isUMDExportSymbol: () => isUMDExportSymbol, isUnaryExpression: () => isUnaryExpression, isUnaryExpressionWithWrite: () => isUnaryExpressionWithWrite, @@ -171371,7 +173817,9 @@ __export(ts_exports2, { isValidESSymbolDeclaration: () => isValidESSymbolDeclaration, isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite, isValueSignatureDeclaration: () => isValueSignatureDeclaration, + isVarAwaitUsing: () => isVarAwaitUsing, isVarConst: () => isVarConst, + isVarUsing: () => isVarUsing, isVariableDeclaration: () => isVariableDeclaration, isVariableDeclarationInVariableStatement: () => isVariableDeclarationInVariableStatement, isVariableDeclarationInitializedToBareOrAccessedRequire: () => isVariableDeclarationInitializedToBareOrAccessedRequire, @@ -171783,6 +174231,7 @@ __export(ts_exports2, { transformJsx: () => transformJsx, transformLegacyDecorators: () => transformLegacyDecorators, transformModule: () => transformModule, + transformNamedEvaluation: () => transformNamedEvaluation, transformNodeModule: () => transformNodeModule, transformNodes: () => transformNodes, transformSystemModule: () => transformSystemModule, @@ -171882,11 +174331,11 @@ var typeScriptVersion2; function getTypeScriptVersion() { return typeScriptVersion2 ?? (typeScriptVersion2 = new Version(version)); } -function formatDeprecationMessage(name, error, errorAfter, since, message) { - let deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: "; +function formatDeprecationMessage(name, error2, errorAfter, since, message) { + let deprecationMessage = error2 ? "DeprecationError: " : "DeprecationWarning: "; deprecationMessage += `'${name}' `; deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated"; - deprecationMessage += error ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : "."; + deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : "."; deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : ""; return deprecationMessage; } @@ -171924,9 +174373,9 @@ function createDeprecation(name, options = {}) { const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter; const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter; const since = typeof options.since === "string" ? new Version(options.since) : options.since ?? warnAfter; - const error = options.error || errorAfter && version2.compareTo(errorAfter) >= 0; + const error2 = options.error || errorAfter && version2.compareTo(errorAfter) >= 0; const warn = !warnAfter || version2.compareTo(warnAfter) >= 0; - return error ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop; + return error2 ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop; } function wrapFunction(deprecation, func) { return function() { @@ -171986,9 +174435,9 @@ function buildOverload(name) { // src/deprecatedCompat/5.0/identifierProperties.ts addObjectAllocatorPatcher((objectAllocator2) => { - const Identifier74 = objectAllocator2.getIdentifierConstructor(); - if (!hasProperty(Identifier74.prototype, "originalKeywordKind")) { - Object.defineProperty(Identifier74.prototype, "originalKeywordKind", { + const Identifier78 = objectAllocator2.getIdentifierConstructor(); + if (!hasProperty(Identifier78.prototype, "originalKeywordKind")) { + Object.defineProperty(Identifier78.prototype, "originalKeywordKind", { get: deprecate(function() { return identifierToKeywordKind(this); }, { @@ -172000,10 +174449,10 @@ addObjectAllocatorPatcher((objectAllocator2) => { }) }); } - if (!hasProperty(Identifier74.prototype, "isInJSDocNamespace")) { - Object.defineProperty(Identifier74.prototype, "isInJSDocNamespace", { + if (!hasProperty(Identifier78.prototype, "isInJSDocNamespace")) { + Object.defineProperty(Identifier78.prototype, "isInJSDocNamespace", { get: deprecate(function() { - return this.flags & 2048 /* IdentifierIsInJSDocNamespace */ ? true : void 0; + return this.flags & 4096 /* IdentifierIsInJSDocNamespace */ ? true : void 0; }, { name: "isInJSDocNamespace", since: "5.0", @@ -172024,6 +174473,7 @@ __export(ts_server_exports3, { ActionWatchTypingLocations: () => ActionWatchTypingLocations, Arguments: () => Arguments, AutoImportProviderProject: () => AutoImportProviderProject, + AuxiliaryProject: () => AuxiliaryProject, CharRangeSection: () => CharRangeSection, CommandNames: () => CommandNames, ConfigFileDiagEvent: () => ConfigFileDiagEvent, @@ -172562,7 +175012,7 @@ function createSortedArray2() { } // src/server/utilities.ts -var ThrottledOperations = class { +var ThrottledOperations = class _ThrottledOperations { constructor(host, logger) { this.host = host; this.pendingTimeouts = /* @__PURE__ */ new Map(); @@ -172579,7 +175029,7 @@ var ThrottledOperations = class { if (pendingTimeout) { this.host.clearTimeout(pendingTimeout); } - this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, operationId, this, cb)); + this.pendingTimeouts.set(operationId, this.host.setTimeout(_ThrottledOperations.run, delay, operationId, this, cb)); if (this.logger) { this.logger.info(`Scheduled: ${operationId}${pendingTimeout ? ", Cancelled earlier one" : ""}`); } @@ -172602,7 +175052,7 @@ var ThrottledOperations = class { (_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation(); } }; -var GcTimer = class { +var GcTimer = class _GcTimer { constructor(host, delay, logger) { this.host = host; this.delay = delay; @@ -172612,7 +175062,7 @@ var GcTimer = class { if (!this.host.gc || this.timerId !== void 0) { return; } - this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this); + this.timerId = this.host.setTimeout(_GcTimer.run, this.delay, this); } static run(self) { var _a, _b; @@ -173563,7 +176013,7 @@ function hasNoTypeScriptSource(fileNames) { function isGeneratedFileWatcher(watch) { return watch.generatedFilePath !== void 0; } -var Project3 = class { +var Project3 = class _Project { /** @internal */ constructor(projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, watchOptions, directoryStructureHost, currentDirectory) { this.projectKind = projectKind; @@ -173680,7 +176130,7 @@ var Project3 = class { return hasOneOrMoreJsAndNoTsFiles(this); } static resolveModule(moduleName, initialDir, host, log) { - return Project3.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule; + return _Project.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule; } /** @internal */ static importServicePluginSync(pluginConfigEntry, searchPaths, host, log) { @@ -174057,6 +176507,16 @@ var Project3 = class { true ); } + /** @internal */ + cleanupProgram() { + if (this.program) { + for (const f of this.program.getSourceFiles()) { + this.detachScriptInfoIfNotRoot(f.fileName); + } + this.program.forEachResolvedProjectReference((ref) => this.detachScriptInfoFromProject(ref.sourceFile.fileName)); + this.program = void 0; + } + } disableLanguageService(lastFileExceededProgramSize) { if (!this.languageServiceEnabled) { return; @@ -174064,6 +176524,7 @@ var Project3 = class { Debug.assert(this.projectService.serverMode !== 2 /* Syntactic */); this.languageService.cleanupSemanticCache(); this.languageServiceEnabled = false; + this.cleanupProgram(); this.lastFileExceededProgramSize = lastFileExceededProgramSize; this.builderState = void 0; if (this.autoImportProviderHost) { @@ -174072,6 +176533,7 @@ var Project3 = class { this.autoImportProviderHost = void 0; this.resolutionCache.closeTypeRootsWatch(); this.clearGeneratedFileWatch(); + this.projectService.verifyDocumentRegistry(); this.projectService.onUpdateLanguageServiceStateForProject( this, /*languageServiceEnabled*/ @@ -174115,12 +176577,7 @@ var Project3 = class { close() { this.projectService.typingsCache.onProjectClosed(this); this.closeWatchingTypingLocations(); - if (this.program) { - for (const f of this.program.getSourceFiles()) { - this.detachScriptInfoIfNotRoot(f.fileName); - } - this.program.forEachResolvedProjectReference((ref) => this.detachScriptInfoFromProject(ref.sourceFile.fileName)); - } + this.cleanupProgram(); forEach(this.externalFiles, (externalFile) => this.detachScriptInfoIfNotRoot(externalFile)); for (const root of this.rootFiles) { root.detachFromProject(this); @@ -174498,6 +176955,7 @@ var Project3 = class { updateGraphWorker() { var _a, _b; const oldProgram = this.languageService.getCurrentProgram(); + Debug.assert(oldProgram === this.program); Debug.assert(!this.isClosed(), "Called update graph worker of closed project"); this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`); const start2 = timestamp(); @@ -174628,6 +177086,7 @@ var Project3 = class { } else if (this.program !== oldProgram) { this.writeLog(`Different program with same set of files`); } + this.projectService.verifyDocumentRegistry(); return hasNewProgram; } /** @internal */ @@ -175024,7 +177483,7 @@ var Project3 = class { return this.projectService.includePackageJsonAutoImports(); } /** @internal */ - getModuleResolutionHostForAutoImportProvider() { + getHostForAutoImportProvider() { var _a, _b; if (this.program) { return { @@ -175035,7 +177494,8 @@ var Project3 = class { readFile: this.projectService.host.readFile.bind(this.projectService.host), getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host), trace: (_b = this.projectService.host.trace) == null ? void 0 : _b.bind(this.projectService.host), - useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames() + useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(), + readDirectory: this.projectService.host.readDirectory.bind(this.projectService.host) }; } return this.projectService.host; @@ -175063,7 +177523,7 @@ var Project3 = class { if (dependencySelection) { (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "getPackageJsonAutoImportProvider"); const start2 = timestamp(); - this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getModuleResolutionHostForAutoImportProvider(), this.documentRegistry); + this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getHostForAutoImportProvider(), this.documentRegistry); if (this.autoImportProviderHost) { updateProjectIfDirty(this.autoImportProviderHost); this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", timestamp() - start2); @@ -175272,12 +177732,11 @@ var AuxiliaryProject = class extends Project3 { isOrphan() { return true; } - /** @internal */ scheduleInvalidateResolutionsOfFailedLookupLocations() { return; } }; -var _AutoImportProviderProject = class extends Project3 { +var _AutoImportProviderProject = class _AutoImportProviderProject extends Project3 { /** @internal */ constructor(hostProject, initialRootNames, documentRegistry, compilerOptions) { super( @@ -175302,7 +177761,7 @@ var _AutoImportProviderProject = class extends Project3 { this.getParsedCommandLine = maybeBind(this.hostProject, this.hostProject.getParsedCommandLine); } /** @internal */ - static getRootFileNames(dependencySelection, hostProject, moduleResolutionHost, compilerOptions) { + static getRootFileNames(dependencySelection, hostProject, host, compilerOptions) { var _a, _b; if (!dependencySelection) { return emptyArray; @@ -175332,7 +177791,7 @@ var _AutoImportProviderProject = class extends Project3 { name, hostProject.currentDirectory, compilerOptions, - moduleResolutionHost, + host, program.getModuleResolutionCache() ); if (packageJson) { @@ -175349,7 +177808,7 @@ var _AutoImportProviderProject = class extends Project3 { `@types/${name}`, directory, compilerOptions, - moduleResolutionHost, + host, program.getModuleResolutionCache() ); if (typesPackageJson) { @@ -175389,12 +177848,12 @@ var _AutoImportProviderProject = class extends Project3 { const entrypoints = getEntrypointsFromPackageJsonInfo( packageJson, compilerOptions, - moduleResolutionHost, + host, program2.getModuleResolutionCache(), resolveJs ); if (entrypoints) { - const real = (_a2 = moduleResolutionHost.realpath) == null ? void 0 : _a2.call(moduleResolutionHost, packageJson.packageDirectory); + const real = (_a2 = host.realpath) == null ? void 0 : _a2.call(host, packageJson.packageDirectory); const isSymlink = real && real !== packageJson.packageDirectory; if (isSymlink) { symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, { @@ -175412,7 +177871,7 @@ var _AutoImportProviderProject = class extends Project3 { } } /** @internal */ - static create(dependencySelection, hostProject, moduleResolutionHost, documentRegistry) { + static create(dependencySelection, hostProject, host, documentRegistry) { if (dependencySelection === 0 /* Off */) { return void 0; } @@ -175420,7 +177879,7 @@ var _AutoImportProviderProject = class extends Project3 { ...hostProject.getCompilerOptions(), ...this.compilerOptionsOverrides }; - const rootNames = this.getRootFileNames(dependencySelection, hostProject, moduleResolutionHost, compilerOptions); + const rootNames = this.getRootFileNames(dependencySelection, hostProject, host, compilerOptions); if (!rootNames.length) { return void 0; } @@ -175439,7 +177898,7 @@ var _AutoImportProviderProject = class extends Project3 { rootFileNames = _AutoImportProviderProject.getRootFileNames( this.hostProject.includePackageJsonAutoImports(), this.hostProject, - this.hostProject.getModuleResolutionHostForAutoImportProvider(), + this.hostProject.getHostForAutoImportProvider(), this.getCompilationSettings() ); } @@ -175478,7 +177937,7 @@ var _AutoImportProviderProject = class extends Project3 { onPackageJsonChange() { throw new Error("package.json changes should be notified on an AutoImportProvider's host project"); } - getModuleResolutionHostForAutoImportProvider() { + getHostForAutoImportProvider() { throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead."); } getProjectReferences() { @@ -175501,11 +177960,10 @@ var _AutoImportProviderProject = class extends Project3 { return (_a = this.hostProject.getCurrentProgram()) == null ? void 0 : _a.getModuleResolutionCache(); } }; -var AutoImportProviderProject = _AutoImportProviderProject; /** @internal */ -AutoImportProviderProject.maxDependencies = 10; +_AutoImportProviderProject.maxDependencies = 10; /** @internal */ -AutoImportProviderProject.compilerOptionsOverrides = { +_AutoImportProviderProject.compilerOptionsOverrides = { diagnostics: false, skipLibCheck: true, sourceMap: false, @@ -175513,6 +177971,7 @@ AutoImportProviderProject.compilerOptionsOverrides = { lib: emptyArray, noLib: true }; +var AutoImportProviderProject = _AutoImportProviderProject; var ConfiguredProject2 = class extends Project3 { /** @internal */ constructor(configFileName, canonicalConfigFilePath, projectService, documentRegistry, cachedDirectoryStructureHost) { @@ -175835,7 +178294,7 @@ var indentStyle = new Map(Object.entries({ var defaultTypeSafeList = { "jquery": { // jquery files can have names like "jquery-1.10.2.min.js" (or "jquery.intellisense.js") - match: /jquery(-[\d\.]+)?(\.intellisense)?(\.min)?\.js$/i, + match: /jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i, types: ["jquery"] }, "WinJS": { @@ -176074,7 +178533,7 @@ function createProjectNameFactoryWithCounter(nameFactory) { let nextId = 1; return () => nameFactory(nextId++); } -var _ProjectService = class { +var _ProjectService = class _ProjectService { constructor(opts) { /** * Container of all known scripts @@ -176152,6 +178611,9 @@ var _ProjectService = class { this.sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map(); /** @internal */ this.extendedConfigCache = /* @__PURE__ */ new Map(); + /** @internal */ + this.verifyDocumentRegistry = noop; + var _a; this.host = opts.host; this.logger = opts.logger; this.cancellationToken = opts.cancellationToken; @@ -176199,6 +178661,7 @@ var _ProjectService = class { watchFile: returnNoopFileWatcher, watchDirectory: returnNoopFileWatcher } : getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); + (_a = opts.incrementalVerifier) == null ? void 0 : _a.call(opts, this); } toPath(fileName) { return toPath(fileName, this.currentDirectory, this.toCanonicalFileName); @@ -177527,6 +179990,7 @@ var _ProjectService = class { /*ensureSynchronized*/ false ).cleanupSemanticCache(); + project.cleanupProgram(); project.markAsDirty(); } sendConfigFileDiagEvent(project, triggerFile) { @@ -178732,7 +181196,7 @@ Dynamic files must always be opened with service's current directory or service } } if (!exclude) { - if (/^.+[\.-]min\.js$/.test(normalizedNames[i])) { + if (/^.+[.-]min\.js$/.test(normalizedNames[i])) { excludedFiles.push(normalizedNames[i]); } else { filesToKeep.push(proj.rootFiles[i]); @@ -179052,9 +181516,9 @@ Dynamic files must always be opened with service's current directory or service return this.incompleteCompletionsCache || (this.incompleteCompletionsCache = createIncompleteCompletionsCache()); } }; -var ProjectService3 = _ProjectService; /** Makes a filename safe to insert in a RegExp */ -ProjectService3.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g; +_ProjectService.filenameEscapeRegexp = /[-/\\^$*+?.()|[\]{}]/g; +var ProjectService3 = _ProjectService; function createIncompleteCompletionsCache() { let info; return { @@ -179721,7 +182185,7 @@ var invalidSyntacticModeCommands = [ "documentHighlights" /* DocumentHighlights */, "documentHighlights-full" /* DocumentHighlightsFull */ ]; -var Session3 = class { +var Session3 = class _Session { constructor(opts) { this.changeSeq = 0; this.handlers = new Map(Object.entries({ @@ -180396,7 +182860,8 @@ var Session3 = class { allowLocalPluginLoads: opts.allowLocalPluginLoads, typesMapLocation: opts.typesMapLocation, serverMode: opts.serverMode, - session: this + session: this, + incrementalVerifier: opts.incrementalVerifier }; this.projectService = new ProjectService3(settings); this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)); @@ -180716,6 +183181,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter /*ensureSynchronized*/ false ).cleanupSemanticCache(); + p.cleanupProgram(); } } cleanup() { @@ -180822,7 +183288,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const { file, project } = this.getFileAndProject(args); const position = this.getPositionInFile(args, file); const definitions = this.mapDefinitionInfoLocations(project.getLanguageService().getDefinitionAtPosition(file, position) || emptyArray2, project); - return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(Session3.mapToOriginalLocation); + return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(_Session.mapToOriginalLocation); } mapDefinitionInfoLocations(definitions, project) { return definitions.map((info) => { @@ -180859,7 +183325,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter }; } return { - definitions: definitions.map(Session3.mapToOriginalLocation), + definitions: definitions.map(_Session.mapToOriginalLocation), textSpan }; } @@ -180981,7 +183447,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter } const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); const symbol = program.getTypeChecker().getSymbolAtLocation(initialNode); - const importSpecifier = symbol && getDeclarationOfKind(symbol, 275 /* ImportSpecifier */); + const importSpecifier = symbol && getDeclarationOfKind(symbol, 276 /* ImportSpecifier */); if (!importSpecifier) return void 0; const nameToSearch = ((_a2 = importSpecifier.propertyName) == null ? void 0 : _a2.text) || importSpecifier.name.text; @@ -181116,7 +183582,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const { file, project } = this.getFileAndProject(args); const position = this.getPositionInFile(args, file); const implementations = this.mapImplementationLocations(project.getLanguageService().getImplementationAtPosition(file, position) || emptyArray2, project); - return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(Session3.mapToOriginalLocation); + return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(_Session.mapToOriginalLocation); } getSyntacticDiagnosticsSync(args) { const { configFile } = this.getConfigFileAndProject(args); @@ -181195,10 +183661,29 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const { file, project } = this.getFileAndProject(args); const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); const hints = project.getLanguageService().provideInlayHints(file, args, this.getPreferences(file)); - return hints.map((hint) => ({ - ...hint, - position: scriptInfo.positionToLineOffset(hint.position) - })); + return hints.map((hint) => { + const { position, displayParts } = hint; + return { + ...hint, + position: scriptInfo.positionToLineOffset(position), + displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => { + if (span) { + Debug.assertIsDefined(file2, "Target file should be defined together with its span."); + const scriptInfo2 = this.projectService.getScriptInfo(file2); + return { + text, + span: { + start: scriptInfo2.positionToLineOffset(span.start), + end: scriptInfo2.positionToLineOffset(span.start + span.length), + file: file2 + } + }; + } else { + return { text }; + } + }) + }; + }); } setCompilerOptionsForInferredProjects(args) { this.projectService.setCompilerOptionsForInferredProjects(args.options, args.projectRootPath); @@ -181599,6 +184084,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter kindModifiers, sortText, insertText, + filterText, replacementSpan, hasAction, source, @@ -181617,6 +184103,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter kindModifiers, sortText, insertText, + filterText, replacementSpan: convertedSpan, isSnippet, hasAction: hasAction || void 0, @@ -182738,7 +185225,7 @@ var TextChange9 = class { ); } }; -var _ScriptVersionCache = class { +var _ScriptVersionCache = class _ScriptVersionCache { constructor() { this.changes = []; this.versions = new Array(_ScriptVersionCache.maxVersions); @@ -182830,11 +185317,11 @@ var _ScriptVersionCache = class { return svc; } }; +_ScriptVersionCache.changeNumberThreshold = 8; +_ScriptVersionCache.changeLengthThreshold = 256; +_ScriptVersionCache.maxVersions = 8; var ScriptVersionCache = _ScriptVersionCache; -ScriptVersionCache.changeNumberThreshold = 8; -ScriptVersionCache.changeLengthThreshold = 256; -ScriptVersionCache.maxVersions = 8; -var LineIndexSnapshot = class { +var LineIndexSnapshot = class _LineIndexSnapshot { constructor(version2, cache, index, changesSincePreviousVersion = emptyArray2) { this.version = version2; this.cache = cache; @@ -182848,7 +185335,7 @@ var LineIndexSnapshot = class { return this.index.getLength(); } getChangeRange(oldSnapshot) { - if (oldSnapshot instanceof LineIndexSnapshot && this.cache === oldSnapshot.cache) { + if (oldSnapshot instanceof _LineIndexSnapshot && this.cache === oldSnapshot.cache) { if (this.version <= oldSnapshot.version) { return unchangedTextChangeRange; } else { @@ -182857,7 +185344,7 @@ var LineIndexSnapshot = class { } } }; -var LineIndex = class { +var LineIndex = class _LineIndex { constructor() { // set this to true to check each edit for accuracy this.checkEdits = false; @@ -182890,7 +185377,7 @@ var LineIndex = class { for (let i = 0; i < lines.length; i++) { leaves[i] = new LineLeaf(lines[i]); } - this.root = LineIndex.buildTreeFromBottom(leaves); + this.root = _LineIndex.buildTreeFromBottom(leaves); } else { this.root = new LineNode(); } @@ -182934,7 +185421,7 @@ var LineIndex = class { if (this.root.charCount() === 0) { Debug.assert(deleteLength === 0); if (newText !== void 0) { - this.load(LineIndex.linesFromText(newText).lines); + this.load(_LineIndex.linesFromText(newText).lines); return this; } return void 0; @@ -183005,7 +185492,7 @@ var LineIndex = class { return { lines, lineMap }; } }; -var LineNode = class { +var LineNode = class _LineNode { constructor(children = []) { this.children = children; this.totalChars = 0; @@ -183137,7 +185624,7 @@ var LineNode = class { childIndex++; const endLength = childIndex; if (childIndex < clen) { - splitNode = new LineNode(); + splitNode = new _LineNode(); while (childIndex < clen) { splitNode.add(this.children[childIndex]); childIndex++; @@ -183186,7 +185673,7 @@ var LineNode = class { splitNodes = new Array(splitNodeCount); let splitNodeIndex = 0; for (let i = 0; i < splitNodeCount; i++) { - splitNodes[i] = new LineNode(); + splitNodes[i] = new _LineNode(); } let splitNode = splitNodes[0]; while (nodeIndex < nodeCount) { @@ -183252,6 +185739,7 @@ __export(ts_server_exports4, { ActionWatchTypingLocations: () => ActionWatchTypingLocations, Arguments: () => Arguments, AutoImportProviderProject: () => AutoImportProviderProject, + AuxiliaryProject: () => AuxiliaryProject, CharRangeSection: () => CharRangeSection, CommandNames: () => CommandNames, ConfigFileDiagEvent: () => ConfigFileDiagEvent, @@ -183668,7 +186156,7 @@ function startNodeSession(options, logger, cancellationToken) { output: process.stdout, terminal: false }); - const _NodeTypingsInstaller = class { + const _NodeTypingsInstaller = class _NodeTypingsInstaller { constructor(telemetryEnabled2, logger2, host, globalTypingsCacheLocation, typingSafeListLocation2, typesMapLocation2, npmLocation2, validateDefaultNpmLocation2, event) { this.telemetryEnabled = telemetryEnabled2; this.logger = logger2; @@ -183876,14 +186364,14 @@ function startNodeSession(options, logger, cancellationToken) { this.host.setTimeout(request.operation, _NodeTypingsInstaller.requestDelayMillis); } }; - let NodeTypingsInstaller = _NodeTypingsInstaller; // This number is essentially arbitrary. Processing more than one typings request // at a time makes sense, but having too many in the pipe results in a hang // (see https://github.com/nodejs/node/issues/7657). // It would be preferable to base our limit on the amount of space left in the // buffer, but we have yet to find a way to retrieve that value. - NodeTypingsInstaller.maxActiveRequestCount = 10; - NodeTypingsInstaller.requestDelayMillis = 100; + _NodeTypingsInstaller.maxActiveRequestCount = 10; + _NodeTypingsInstaller.requestDelayMillis = 100; + let NodeTypingsInstaller = _NodeTypingsInstaller; class IOSession extends Session3 { constructor() { const event = (body, eventName) => { @@ -184105,6 +186593,7 @@ start(initializeNodeSystem(), require("os").platform()); CompletionTriggerKind, Completions, ConfigFileProgramReloadLevel, + ContainerFlags, ContextFlags, CoreServicesShimHostAdapter, Debug, @@ -184134,6 +186623,8 @@ start(initializeNodeSystem(), require("os").platform()); GetLiteralTextFlags, GoToDefinition, HighlightSpanKind, + IdentifierNameMap, + IdentifierNameMultiMap, ImportKind, ImportsNotUsedAsValues, IndentStyle, @@ -184238,6 +186729,7 @@ start(initializeNodeSystem(), require("os").platform()); WatchLogLevel, WatchType, accessPrivateIdentifier, + addDisposableResourceHelper, addEmitFlags, addEmitHelper, addEmitHelpers, @@ -184317,6 +186809,9 @@ start(initializeNodeSystem(), require("os").platform()); changesAffectingProgramStructure, childIsDecorated, classElementOrClassElementParameterIsDecorated, + classHasClassThisAssignment, + classHasDeclaredOrExplicitlyAssignedName, + classHasExplicitlyAssignedName, classOrConstructorParameterIsDecorated, classPrivateFieldGetHelper, classPrivateFieldInHelper, @@ -184414,6 +186909,8 @@ start(initializeNodeSystem(), require("os").platform()); createCacheWithRedirects, createCacheableExportInfoMap, createCachedDirectoryStructureHost, + createClassNamedEvaluationHelperBlock, + createClassThisAssignmentBlock, createClassifier, createCommentDirectivesMap, createCompilerDiagnostic, @@ -184546,6 +187043,7 @@ start(initializeNodeSystem(), require("os").platform()); displayPart, displayPartsToString, disposeEmitNodes, + disposeResourcesHelper, documentSpansEqual, dumpTracingLegend, elementAt, @@ -184623,7 +187121,7 @@ start(initializeNodeSystem(), require("os").platform()); findPackageJsons, findPrecedingMatchingToken, findPrecedingToken, - findSuperStatementIndex, + findSuperStatementIndexPath, findTokenOnLeftOfPosition, findUseStrictPrologue, first, @@ -184698,6 +187196,7 @@ start(initializeNodeSystem(), require("os").platform()); getAreDeclarationMapsEnabled, getAssignedExpandoInitializer, getAssignedName, + getAssignedNameOfIdentifier, getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind, getAssignmentTargetKind, @@ -184725,8 +187224,10 @@ start(initializeNodeSystem(), require("os").platform()); getConditions, getConfigFileParsingDiagnostics, getConstantValue, + getContainerFlags, getContainerNode, getContainingClass, + getContainingClassExcludingClassDecorators, getContainingClassStaticBlock, getContainingFunction, getContainingFunctionDeclaration, @@ -184784,7 +187285,9 @@ start(initializeNodeSystem(), require("os").platform()); getEmitModuleKind, getEmitModuleResolutionKind, getEmitScriptTarget, + getEmitStandardClassFields, getEnclosingBlockScopeContainer, + getEnclosingContainer, getEncodedSemanticClassifications, getEncodedSyntacticClassifications, getEndLinePosition, @@ -185002,6 +187505,7 @@ start(initializeNodeSystem(), require("os").platform()); getPropertyAssignmentAliasLikeExpression, getPropertyNameForPropertyNameNode, getPropertyNameForUniqueESSymbol, + getPropertyNameFromType, getPropertyNameOfBindingOrAssignmentElement, getPropertySymbolFromBindingElement, getPropertySymbolsFromContextualType, @@ -185182,6 +187686,8 @@ start(initializeNodeSystem(), require("os").platform()); indexOfNode, indicesOf, inferredTypesContainingFile, + injectClassNamedEvaluationHelperBlockIfMissing, + injectClassThisAssignmentIfMissing, insertImports, insertLeadingStatement, insertSorted, @@ -185284,8 +187790,10 @@ start(initializeNodeSystem(), require("os").platform()); isClassExpression, isClassLike, isClassMemberModifier, + isClassNamedEvaluationHelperBlock, isClassOrTypeElement, isClassStaticBlockDeclaration, + isClassThisAssignmentBlock, isCollapsedRange, isColonToken, isCommaExpression, @@ -185331,6 +187839,7 @@ start(initializeNodeSystem(), require("os").platform()); isDiagnosticWithLocation, isDiskPathRoot, isDoStatement, + isDocumentRegistryEntry, isDotDotDotToken, isDottedName, isDynamicName, @@ -185381,6 +187890,7 @@ start(initializeNodeSystem(), require("os").platform()); isExternalModuleReference, isExternalModuleSymbol, isExternalOrCommonJsModule, + isFileLevelReservedGeneratedIdentifier, isFileLevelUniqueName, isFileProbablyExternalModule, isFirstDeclarationOfSymbolParameter, @@ -185451,6 +187961,7 @@ start(initializeNodeSystem(), require("os").platform()); isInString, isInTemplateString, isInTopLevelContext, + isInTypeQuery, isIncrementalCompilation, isIndexSignatureDeclaration, isIndexedAccessTypeNode, @@ -185828,6 +188339,7 @@ start(initializeNodeSystem(), require("os").platform()); isTypeQueryNode, isTypeReferenceNode, isTypeReferenceType, + isTypeUsableAsPropertyName, isUMDExportSymbol, isUnaryExpression, isUnaryExpressionWithWrite, @@ -185842,7 +188354,9 @@ start(initializeNodeSystem(), require("os").platform()); isValidESSymbolDeclaration, isValidTypeOnlyAliasUseSite, isValueSignatureDeclaration, + isVarAwaitUsing, isVarConst, + isVarUsing, isVariableDeclaration, isVariableDeclarationInVariableStatement, isVariableDeclarationInitializedToBareOrAccessedRequire, @@ -186254,6 +188768,7 @@ start(initializeNodeSystem(), require("os").platform()); transformJsx, transformLegacyDecorators, transformModule, + transformNamedEvaluation, transformNodeModule, transformNodes, transformSystemModule, diff --git a/node_modules/typescript/lib/tsserverlibrary.d.ts b/node_modules/typescript/lib/tsserverlibrary.d.ts index 24685f553b..4b9d52e470 100644 --- a/node_modules/typescript/lib/tsserverlibrary.d.ts +++ b/node_modules/typescript/lib/tsserverlibrary.d.ts @@ -1830,6 +1830,11 @@ declare namespace ts { * coupled with `replacementSpan` to replace a dotted access with a bracket access. */ insertText?: string; + /** + * A string that should be used when filtering a set of + * completion items. + */ + filterText?: string; /** * `insertText` should be interpreted as a snippet if true. */ @@ -2119,11 +2124,17 @@ declare namespace ts { arguments: InlayHintsRequestArgs; } interface InlayHintItem { + /** This property will be the empty string when displayParts is set. */ text: string; position: Location; kind: InlayHintKind; whitespaceBefore?: boolean; whitespaceAfter?: boolean; + displayParts?: InlayHintItemDisplayPart[]; + } + interface InlayHintItemDisplayPart { + text: string; + span?: FileSpan; } interface InlayHintsResponse extends Response { body?: InlayHintItem[]; @@ -2827,6 +2838,7 @@ declare namespace ts { readonly includeInlayPropertyDeclarationTypeHints?: boolean; readonly includeInlayFunctionLikeReturnTypeHints?: boolean; readonly includeInlayEnumMemberValueHints?: boolean; + readonly interactiveInlayHints?: boolean; readonly autoImportFileExcludePatterns?: string[]; /** * Indicates whether imports should be organized in a case-insensitive manner. @@ -3395,7 +3407,7 @@ declare namespace ts { markAsDirty(): void; getScriptFileNames(): string[]; getLanguageService(): never; - getModuleResolutionHostForAutoImportProvider(): never; + getHostForAutoImportProvider(): never; getProjectReferences(): readonly ts.ProjectReference[] | undefined; getTypeAcquisition(): TypeAcquisition; } @@ -4062,7 +4074,7 @@ declare namespace ts { responseRequired?: boolean; } } - const versionMajorMinor = "5.1"; + const versionMajorMinor = "5.2"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -4252,211 +4264,212 @@ declare namespace ts { UndefinedKeyword = 157, UniqueKeyword = 158, UnknownKeyword = 159, - FromKeyword = 160, - GlobalKeyword = 161, - BigIntKeyword = 162, - OverrideKeyword = 163, - OfKeyword = 164, - QualifiedName = 165, - ComputedPropertyName = 166, - TypeParameter = 167, - Parameter = 168, - Decorator = 169, - PropertySignature = 170, - PropertyDeclaration = 171, - MethodSignature = 172, - MethodDeclaration = 173, - ClassStaticBlockDeclaration = 174, - Constructor = 175, - GetAccessor = 176, - SetAccessor = 177, - CallSignature = 178, - ConstructSignature = 179, - IndexSignature = 180, - TypePredicate = 181, - TypeReference = 182, - FunctionType = 183, - ConstructorType = 184, - TypeQuery = 185, - TypeLiteral = 186, - ArrayType = 187, - TupleType = 188, - OptionalType = 189, - RestType = 190, - UnionType = 191, - IntersectionType = 192, - ConditionalType = 193, - InferType = 194, - ParenthesizedType = 195, - ThisType = 196, - TypeOperator = 197, - IndexedAccessType = 198, - MappedType = 199, - LiteralType = 200, - NamedTupleMember = 201, - TemplateLiteralType = 202, - TemplateLiteralTypeSpan = 203, - ImportType = 204, - ObjectBindingPattern = 205, - ArrayBindingPattern = 206, - BindingElement = 207, - ArrayLiteralExpression = 208, - ObjectLiteralExpression = 209, - PropertyAccessExpression = 210, - ElementAccessExpression = 211, - CallExpression = 212, - NewExpression = 213, - TaggedTemplateExpression = 214, - TypeAssertionExpression = 215, - ParenthesizedExpression = 216, - FunctionExpression = 217, - ArrowFunction = 218, - DeleteExpression = 219, - TypeOfExpression = 220, - VoidExpression = 221, - AwaitExpression = 222, - PrefixUnaryExpression = 223, - PostfixUnaryExpression = 224, - BinaryExpression = 225, - ConditionalExpression = 226, - TemplateExpression = 227, - YieldExpression = 228, - SpreadElement = 229, - ClassExpression = 230, - OmittedExpression = 231, - ExpressionWithTypeArguments = 232, - AsExpression = 233, - NonNullExpression = 234, - MetaProperty = 235, - SyntheticExpression = 236, - SatisfiesExpression = 237, - TemplateSpan = 238, - SemicolonClassElement = 239, - Block = 240, - EmptyStatement = 241, - VariableStatement = 242, - ExpressionStatement = 243, - IfStatement = 244, - DoStatement = 245, - WhileStatement = 246, - ForStatement = 247, - ForInStatement = 248, - ForOfStatement = 249, - ContinueStatement = 250, - BreakStatement = 251, - ReturnStatement = 252, - WithStatement = 253, - SwitchStatement = 254, - LabeledStatement = 255, - ThrowStatement = 256, - TryStatement = 257, - DebuggerStatement = 258, - VariableDeclaration = 259, - VariableDeclarationList = 260, - FunctionDeclaration = 261, - ClassDeclaration = 262, - InterfaceDeclaration = 263, - TypeAliasDeclaration = 264, - EnumDeclaration = 265, - ModuleDeclaration = 266, - ModuleBlock = 267, - CaseBlock = 268, - NamespaceExportDeclaration = 269, - ImportEqualsDeclaration = 270, - ImportDeclaration = 271, - ImportClause = 272, - NamespaceImport = 273, - NamedImports = 274, - ImportSpecifier = 275, - ExportAssignment = 276, - ExportDeclaration = 277, - NamedExports = 278, - NamespaceExport = 279, - ExportSpecifier = 280, - MissingDeclaration = 281, - ExternalModuleReference = 282, - JsxElement = 283, - JsxSelfClosingElement = 284, - JsxOpeningElement = 285, - JsxClosingElement = 286, - JsxFragment = 287, - JsxOpeningFragment = 288, - JsxClosingFragment = 289, - JsxAttribute = 290, - JsxAttributes = 291, - JsxSpreadAttribute = 292, - JsxExpression = 293, - JsxNamespacedName = 294, - CaseClause = 295, - DefaultClause = 296, - HeritageClause = 297, - CatchClause = 298, - AssertClause = 299, - AssertEntry = 300, - ImportTypeAssertionContainer = 301, - PropertyAssignment = 302, - ShorthandPropertyAssignment = 303, - SpreadAssignment = 304, - EnumMember = 305, - /** @deprecated */ UnparsedPrologue = 306, - /** @deprecated */ UnparsedPrepend = 307, - /** @deprecated */ UnparsedText = 308, - /** @deprecated */ UnparsedInternalText = 309, - /** @deprecated */ UnparsedSyntheticReference = 310, - SourceFile = 311, - Bundle = 312, - /** @deprecated */ UnparsedSource = 313, - /** @deprecated */ InputFiles = 314, - JSDocTypeExpression = 315, - JSDocNameReference = 316, - JSDocMemberName = 317, - JSDocAllType = 318, - JSDocUnknownType = 319, - JSDocNullableType = 320, - JSDocNonNullableType = 321, - JSDocOptionalType = 322, - JSDocFunctionType = 323, - JSDocVariadicType = 324, - JSDocNamepathType = 325, - JSDoc = 326, + UsingKeyword = 160, + FromKeyword = 161, + GlobalKeyword = 162, + BigIntKeyword = 163, + OverrideKeyword = 164, + OfKeyword = 165, + QualifiedName = 166, + ComputedPropertyName = 167, + TypeParameter = 168, + Parameter = 169, + Decorator = 170, + PropertySignature = 171, + PropertyDeclaration = 172, + MethodSignature = 173, + MethodDeclaration = 174, + ClassStaticBlockDeclaration = 175, + Constructor = 176, + GetAccessor = 177, + SetAccessor = 178, + CallSignature = 179, + ConstructSignature = 180, + IndexSignature = 181, + TypePredicate = 182, + TypeReference = 183, + FunctionType = 184, + ConstructorType = 185, + TypeQuery = 186, + TypeLiteral = 187, + ArrayType = 188, + TupleType = 189, + OptionalType = 190, + RestType = 191, + UnionType = 192, + IntersectionType = 193, + ConditionalType = 194, + InferType = 195, + ParenthesizedType = 196, + ThisType = 197, + TypeOperator = 198, + IndexedAccessType = 199, + MappedType = 200, + LiteralType = 201, + NamedTupleMember = 202, + TemplateLiteralType = 203, + TemplateLiteralTypeSpan = 204, + ImportType = 205, + ObjectBindingPattern = 206, + ArrayBindingPattern = 207, + BindingElement = 208, + ArrayLiteralExpression = 209, + ObjectLiteralExpression = 210, + PropertyAccessExpression = 211, + ElementAccessExpression = 212, + CallExpression = 213, + NewExpression = 214, + TaggedTemplateExpression = 215, + TypeAssertionExpression = 216, + ParenthesizedExpression = 217, + FunctionExpression = 218, + ArrowFunction = 219, + DeleteExpression = 220, + TypeOfExpression = 221, + VoidExpression = 222, + AwaitExpression = 223, + PrefixUnaryExpression = 224, + PostfixUnaryExpression = 225, + BinaryExpression = 226, + ConditionalExpression = 227, + TemplateExpression = 228, + YieldExpression = 229, + SpreadElement = 230, + ClassExpression = 231, + OmittedExpression = 232, + ExpressionWithTypeArguments = 233, + AsExpression = 234, + NonNullExpression = 235, + MetaProperty = 236, + SyntheticExpression = 237, + SatisfiesExpression = 238, + TemplateSpan = 239, + SemicolonClassElement = 240, + Block = 241, + EmptyStatement = 242, + VariableStatement = 243, + ExpressionStatement = 244, + IfStatement = 245, + DoStatement = 246, + WhileStatement = 247, + ForStatement = 248, + ForInStatement = 249, + ForOfStatement = 250, + ContinueStatement = 251, + BreakStatement = 252, + ReturnStatement = 253, + WithStatement = 254, + SwitchStatement = 255, + LabeledStatement = 256, + ThrowStatement = 257, + TryStatement = 258, + DebuggerStatement = 259, + VariableDeclaration = 260, + VariableDeclarationList = 261, + FunctionDeclaration = 262, + ClassDeclaration = 263, + InterfaceDeclaration = 264, + TypeAliasDeclaration = 265, + EnumDeclaration = 266, + ModuleDeclaration = 267, + ModuleBlock = 268, + CaseBlock = 269, + NamespaceExportDeclaration = 270, + ImportEqualsDeclaration = 271, + ImportDeclaration = 272, + ImportClause = 273, + NamespaceImport = 274, + NamedImports = 275, + ImportSpecifier = 276, + ExportAssignment = 277, + ExportDeclaration = 278, + NamedExports = 279, + NamespaceExport = 280, + ExportSpecifier = 281, + MissingDeclaration = 282, + ExternalModuleReference = 283, + JsxElement = 284, + JsxSelfClosingElement = 285, + JsxOpeningElement = 286, + JsxClosingElement = 287, + JsxFragment = 288, + JsxOpeningFragment = 289, + JsxClosingFragment = 290, + JsxAttribute = 291, + JsxAttributes = 292, + JsxSpreadAttribute = 293, + JsxExpression = 294, + JsxNamespacedName = 295, + CaseClause = 296, + DefaultClause = 297, + HeritageClause = 298, + CatchClause = 299, + AssertClause = 300, + AssertEntry = 301, + ImportTypeAssertionContainer = 302, + PropertyAssignment = 303, + ShorthandPropertyAssignment = 304, + SpreadAssignment = 305, + EnumMember = 306, + /** @deprecated */ UnparsedPrologue = 307, + /** @deprecated */ UnparsedPrepend = 308, + /** @deprecated */ UnparsedText = 309, + /** @deprecated */ UnparsedInternalText = 310, + /** @deprecated */ UnparsedSyntheticReference = 311, + SourceFile = 312, + Bundle = 313, + /** @deprecated */ UnparsedSource = 314, + /** @deprecated */ InputFiles = 315, + JSDocTypeExpression = 316, + JSDocNameReference = 317, + JSDocMemberName = 318, + JSDocAllType = 319, + JSDocUnknownType = 320, + JSDocNullableType = 321, + JSDocNonNullableType = 322, + JSDocOptionalType = 323, + JSDocFunctionType = 324, + JSDocVariadicType = 325, + JSDocNamepathType = 326, + JSDoc = 327, /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 326, - JSDocText = 327, - JSDocTypeLiteral = 328, - JSDocSignature = 329, - JSDocLink = 330, - JSDocLinkCode = 331, - JSDocLinkPlain = 332, - JSDocTag = 333, - JSDocAugmentsTag = 334, - JSDocImplementsTag = 335, - JSDocAuthorTag = 336, - JSDocDeprecatedTag = 337, - JSDocClassTag = 338, - JSDocPublicTag = 339, - JSDocPrivateTag = 340, - JSDocProtectedTag = 341, - JSDocReadonlyTag = 342, - JSDocOverrideTag = 343, - JSDocCallbackTag = 344, - JSDocOverloadTag = 345, - JSDocEnumTag = 346, - JSDocParameterTag = 347, - JSDocReturnTag = 348, - JSDocThisTag = 349, - JSDocTypeTag = 350, - JSDocTemplateTag = 351, - JSDocTypedefTag = 352, - JSDocSeeTag = 353, - JSDocPropertyTag = 354, - JSDocThrowsTag = 355, - JSDocSatisfiesTag = 356, - SyntaxList = 357, - NotEmittedStatement = 358, - PartiallyEmittedExpression = 359, - CommaListExpression = 360, - SyntheticReferenceExpression = 361, - Count = 362, + JSDocComment = 327, + JSDocText = 328, + JSDocTypeLiteral = 329, + JSDocSignature = 330, + JSDocLink = 331, + JSDocLinkCode = 332, + JSDocLinkPlain = 333, + JSDocTag = 334, + JSDocAugmentsTag = 335, + JSDocImplementsTag = 336, + JSDocAuthorTag = 337, + JSDocDeprecatedTag = 338, + JSDocClassTag = 339, + JSDocPublicTag = 340, + JSDocPrivateTag = 341, + JSDocProtectedTag = 342, + JSDocReadonlyTag = 343, + JSDocOverrideTag = 344, + JSDocCallbackTag = 345, + JSDocOverloadTag = 346, + JSDocEnumTag = 347, + JSDocParameterTag = 348, + JSDocReturnTag = 349, + JSDocThisTag = 350, + JSDocTypeTag = 351, + JSDocTemplateTag = 352, + JSDocTypedefTag = 353, + JSDocSeeTag = 354, + JSDocPropertyTag = 355, + JSDocThrowsTag = 356, + JSDocSatisfiesTag = 357, + SyntaxList = 358, + NotEmittedStatement = 359, + PartiallyEmittedExpression = 360, + CommaListExpression = 361, + SyntheticReferenceExpression = 362, + Count = 363, FirstAssignment = 64, LastAssignment = 79, FirstCompoundAssignment = 65, @@ -4464,15 +4477,15 @@ declare namespace ts { FirstReservedWord = 83, LastReservedWord = 118, FirstKeyword = 83, - LastKeyword = 164, + LastKeyword = 165, FirstFutureReservedWord = 119, LastFutureReservedWord = 127, - FirstTypeNode = 181, - LastTypeNode = 204, + FirstTypeNode = 182, + LastTypeNode = 205, FirstPunctuation = 19, LastPunctuation = 79, FirstToken = 0, - LastToken = 164, + LastToken = 165, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 9, @@ -4481,19 +4494,19 @@ declare namespace ts { LastTemplateToken = 18, FirstBinaryOperator = 30, LastBinaryOperator = 79, - FirstStatement = 242, - LastStatement = 258, - FirstNode = 165, - FirstJSDocNode = 315, - LastJSDocNode = 356, - FirstJSDocTagNode = 333, - LastJSDocTagNode = 356 + FirstStatement = 243, + LastStatement = 259, + FirstNode = 166, + FirstJSDocNode = 316, + LastJSDocNode = 357, + FirstJSDocTagNode = 334, + LastJSDocTagNode = 357 } type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken; - type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; + type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; @@ -4503,32 +4516,35 @@ declare namespace ts { None = 0, Let = 1, Const = 2, - NestedNamespace = 4, - Synthesized = 8, - Namespace = 16, - OptionalChain = 32, - ExportContext = 64, - ContainsThis = 128, - HasImplicitReturn = 256, - HasExplicitReturn = 512, - GlobalAugmentation = 1024, - HasAsyncFunctions = 2048, - DisallowInContext = 4096, - YieldContext = 8192, - DecoratorContext = 16384, - AwaitContext = 32768, - DisallowConditionalTypesContext = 65536, - ThisNodeHasError = 131072, - JavaScriptFile = 262144, - ThisNodeOrAnySubNodesHasError = 524288, - HasAggregatedChildData = 1048576, - JSDoc = 8388608, - JsonFile = 67108864, - BlockScoped = 3, - ReachabilityCheckFlags = 768, - ReachabilityAndEmitFlags = 2816, - ContextFlags = 50720768, - TypeExcludesFlags = 40960 + Using = 4, + AwaitUsing = 6, + NestedNamespace = 8, + Synthesized = 16, + Namespace = 32, + OptionalChain = 64, + ExportContext = 128, + ContainsThis = 256, + HasImplicitReturn = 512, + HasExplicitReturn = 1024, + GlobalAugmentation = 2048, + HasAsyncFunctions = 4096, + DisallowInContext = 8192, + YieldContext = 16384, + DecoratorContext = 32768, + AwaitContext = 65536, + DisallowConditionalTypesContext = 131072, + ThisNodeHasError = 262144, + JavaScriptFile = 524288, + ThisNodeOrAnySubNodesHasError = 1048576, + HasAggregatedChildData = 2097152, + JSDoc = 16777216, + JsonFile = 134217728, + BlockScoped = 7, + Constant = 6, + ReachabilityCheckFlags = 1536, + ReachabilityAndEmitFlags = 5632, + ContextFlags = 101441536, + TypeExcludesFlags = 81920 } enum ModifierFlags { None = 0, @@ -5818,9 +5834,11 @@ declare namespace ts { }; }) | ExportDeclaration & { readonly isTypeOnly: true; + readonly moduleSpecifier: Expression; } | NamespaceExport & { readonly parent: ExportDeclaration & { readonly isTypeOnly: true; + readonly moduleSpecifier: Expression; }; }; type TypeOnlyAliasDeclaration = TypeOnlyImportDeclaration | TypeOnlyExportDeclaration; @@ -6265,7 +6283,7 @@ declare namespace ts { getSourceFileByPath(path: Path): SourceFile | undefined; getCurrentDirectory(): string; } - interface ParseConfigHost { + interface ParseConfigHost extends ModuleResolutionHost { useCaseSensitiveFileNames: boolean; readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; /** @@ -6942,7 +6960,7 @@ declare namespace ts { hasRestElement: boolean; combinedFlags: ElementFlags; readonly: boolean; - labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[]; + labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration | undefined)[]; } interface TupleTypeReference extends TypeReference { target: TupleType; @@ -7583,7 +7601,14 @@ declare namespace ts { All = 15, ExcludeJSDocTypeAssertion = 16 } - type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function"; + type ImmediatelyInvokedFunctionExpression = CallExpression & { + readonly expression: FunctionExpression; + }; + type ImmediatelyInvokedArrowFunction = CallExpression & { + readonly expression: ParenthesizedExpression & { + readonly expression: ArrowFunction; + }; + }; interface NodeFactory { createNodeArray(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray; createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral; @@ -8053,8 +8078,8 @@ declare namespace ts { createPostfixDecrement(operand: Expression): PostfixUnaryExpression; createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression; createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; + createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): ImmediatelyInvokedArrowFunction; + createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): ImmediatelyInvokedArrowFunction; createVoidZero(): VoidExpression; createExportDefault(expression: Expression): ExportAssignment; createExternalModuleExport(exportName: Identifier): ExportDeclaration; @@ -8384,6 +8409,7 @@ declare namespace ts { readonly includeInlayPropertyDeclarationTypeHints?: boolean; readonly includeInlayFunctionLikeReturnTypeHints?: boolean; readonly includeInlayEnumMemberValueHints?: boolean; + readonly interactiveInlayHints?: boolean; readonly allowRenameOfImportPath?: boolean; readonly autoImportFileExcludePatterns?: string[]; readonly organizeImportsIgnoreCase?: "auto" | boolean; @@ -10366,11 +10392,18 @@ declare namespace ts { Enum = "Enum" } interface InlayHint { + /** This property will be the empty string when displayParts is set. */ text: string; position: number; kind: InlayHintKind; whitespaceBefore?: boolean; whitespaceAfter?: boolean; + displayParts?: InlayHintDisplayPart[]; + } + interface InlayHintDisplayPart { + text: string; + span?: TextSpan; + file?: string; } interface TodoCommentDescriptor { text: string; @@ -10802,6 +10835,7 @@ declare namespace ts { kindModifiers?: string; sortText: string; insertText?: string; + filterText?: string; isSnippet?: true; /** * An optional span that indicates the text to be replaced by this completion item. @@ -10961,6 +10995,10 @@ declare namespace ts { variableElement = "var", /** Inside function */ localVariableElement = "local var", + /** using foo = ... */ + variableUsingElement = "using", + /** await using foo = ... */ + variableAwaitUsingElement = "await using", /** * Inside module and script only * function f() { } diff --git a/node_modules/typescript/lib/tsserverlibrary.js b/node_modules/typescript/lib/tsserverlibrary.js index 6861715ba5..d53fe81a33 100644 --- a/node_modules/typescript/lib/tsserverlibrary.js +++ b/node_modules/typescript/lib/tsserverlibrary.js @@ -34,8 +34,8 @@ var ts = (() => { var init_corePublic = __esm({ "src/compiler/corePublic.ts"() { "use strict"; - versionMajorMinor = "5.1"; - version = "5.1.6"; + versionMajorMinor = "5.2"; + version = "5.2.2"; Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -1464,8 +1464,8 @@ var ts = (() => { } return false; } - function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; + function createGetCanonicalFileName(useCaseSensitiveFileNames2) { + return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase; } function patternText({ prefix, suffix }) { return `${prefix}*${suffix}`; @@ -1646,7 +1646,7 @@ var ts = (() => { return void 0; }; hasOwnProperty = Object.prototype.hasOwnProperty; - fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; AssertionLevel = /* @__PURE__ */ ((AssertionLevel2) => { AssertionLevel2[AssertionLevel2["None"] = 0] = "None"; AssertionLevel2[AssertionLevel2["Normal"] = 1] = "Normal"; @@ -1748,10 +1748,10 @@ var ts = (() => { } Debug2.log = log; ((_log) => { - function error(s) { + function error2(s) { logMessage(1 /* Error */, s); } - _log.error = error; + _log.error = error2; function warn(s) { logMessage(2 /* Warning */, s); } @@ -1951,7 +1951,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return func.name; } else { const text = Function.prototype.toString.call(func); - const match = /^function\s+([\w\$]+)\s*\(/.exec(text); + const match = /^function\s+([\w$]+)\s*\(/.exec(text); return match ? match[1] : ""; } } @@ -2025,6 +2025,15 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, ); } Debug2.formatSnippetKind = formatSnippetKind; + function formatScriptKind(kind) { + return formatEnum( + kind, + ScriptKind, + /*isFlags*/ + false + ); + } + Debug2.formatScriptKind = formatScriptKind; function formatNodeFlags(flags) { return formatEnum( flags, @@ -2927,13 +2936,13 @@ ${lanes.join("\n")} "src/compiler/semver.ts"() { "use strict"; init_ts2(); - versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; + versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; prereleaseRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i; prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i; buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i; buildPartRegExp = /^[a-z0-9-]+$/i; numericIdentifierRegExp = /^(0|[1-9]\d*)$/; - _Version = class { + _Version = class _Version { constructor(major, minor = 0, patch = 0, prerelease = "", build2 = "") { if (typeof major === "string") { const result = Debug.checkDefined(tryParseComponents(major), "Invalid version"); @@ -2997,16 +3006,16 @@ ${lanes.join("\n")} return result; } }; + _Version.zero = new _Version(0, 0, 0, ["0"]); Version = _Version; - Version.zero = new _Version(0, 0, 0, ["0"]); - VersionRange = class { + VersionRange = class _VersionRange { constructor(spec) { this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray; } static tryParse(text) { const sets = parseRange(text); if (sets) { - const range = new VersionRange(""); + const range = new _VersionRange(""); range._alternatives = sets; return range; } @@ -3684,210 +3693,211 @@ ${lanes.join("\n")} SyntaxKind5[SyntaxKind5["UndefinedKeyword"] = 157] = "UndefinedKeyword"; SyntaxKind5[SyntaxKind5["UniqueKeyword"] = 158] = "UniqueKeyword"; SyntaxKind5[SyntaxKind5["UnknownKeyword"] = 159] = "UnknownKeyword"; - SyntaxKind5[SyntaxKind5["FromKeyword"] = 160] = "FromKeyword"; - SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 161] = "GlobalKeyword"; - SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 162] = "BigIntKeyword"; - SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 163] = "OverrideKeyword"; - SyntaxKind5[SyntaxKind5["OfKeyword"] = 164] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 165] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 166] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 167] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 168] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 169] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 170] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 171] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 172] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 173] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 174] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 175] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 176] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 177] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 178] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 179] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 180] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 181] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 182] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 183] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 184] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 185] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 186] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 187] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 188] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 189] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 190] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 191] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 192] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 193] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 194] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 195] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 196] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 197] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 198] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 199] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 200] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 201] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 202] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 203] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 204] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 205] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 206] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 207] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 208] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 209] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 210] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 211] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 212] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 213] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 214] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 215] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 216] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 217] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 218] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 219] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 220] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 221] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 222] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 223] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 224] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 225] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 226] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 227] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 228] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 229] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 230] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 231] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 232] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 233] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 234] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 235] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 236] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 237] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 238] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 239] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 240] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 241] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 242] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 243] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 244] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 245] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 246] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 247] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 248] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 249] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 250] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 251] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 252] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 253] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 254] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 255] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 256] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 257] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 258] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 259] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 260] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 261] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 262] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 263] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 264] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 265] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 266] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 267] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 268] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 269] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 270] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 271] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 272] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 273] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 274] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 275] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 276] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 277] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 278] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 279] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 280] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 281] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 282] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 283] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 284] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 285] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 286] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 287] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 288] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 289] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 290] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 291] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 292] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 293] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["JsxNamespacedName"] = 294] = "JsxNamespacedName"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 295] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 296] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 297] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 298] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 299] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 300] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 301] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 302] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 303] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 304] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 305] = "EnumMember"; - SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 306] = "UnparsedPrologue"; - SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 307] = "UnparsedPrepend"; - SyntaxKind5[SyntaxKind5["UnparsedText"] = 308] = "UnparsedText"; - SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 309] = "UnparsedInternalText"; - SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 310] = "UnparsedSyntheticReference"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 311] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 312] = "Bundle"; - SyntaxKind5[SyntaxKind5["UnparsedSource"] = 313] = "UnparsedSource"; - SyntaxKind5[SyntaxKind5["InputFiles"] = 314] = "InputFiles"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 315] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 316] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 317] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 318] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 319] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 320] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 321] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 322] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 323] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 324] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 325] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 326] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 326 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 327] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 328] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 329] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 330] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 331] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 332] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 333] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 334] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 335] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 336] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 337] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 338] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 339] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 340] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 341] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 342] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 343] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 344] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 345] = "JSDocOverloadTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 346] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 347] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 348] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 349] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 350] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 351] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 352] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 353] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 354] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 355] = "JSDocThrowsTag"; - SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 356] = "JSDocSatisfiesTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 357] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 358] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 360] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 362] = "Count"; + SyntaxKind5[SyntaxKind5["UsingKeyword"] = 160] = "UsingKeyword"; + SyntaxKind5[SyntaxKind5["FromKeyword"] = 161] = "FromKeyword"; + SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 162] = "GlobalKeyword"; + SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 163] = "BigIntKeyword"; + SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 164] = "OverrideKeyword"; + SyntaxKind5[SyntaxKind5["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind5[SyntaxKind5["QualifiedName"] = 166] = "QualifiedName"; + SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 167] = "ComputedPropertyName"; + SyntaxKind5[SyntaxKind5["TypeParameter"] = 168] = "TypeParameter"; + SyntaxKind5[SyntaxKind5["Parameter"] = 169] = "Parameter"; + SyntaxKind5[SyntaxKind5["Decorator"] = 170] = "Decorator"; + SyntaxKind5[SyntaxKind5["PropertySignature"] = 171] = "PropertySignature"; + SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 172] = "PropertyDeclaration"; + SyntaxKind5[SyntaxKind5["MethodSignature"] = 173] = "MethodSignature"; + SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 174] = "MethodDeclaration"; + SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; + SyntaxKind5[SyntaxKind5["Constructor"] = 176] = "Constructor"; + SyntaxKind5[SyntaxKind5["GetAccessor"] = 177] = "GetAccessor"; + SyntaxKind5[SyntaxKind5["SetAccessor"] = 178] = "SetAccessor"; + SyntaxKind5[SyntaxKind5["CallSignature"] = 179] = "CallSignature"; + SyntaxKind5[SyntaxKind5["ConstructSignature"] = 180] = "ConstructSignature"; + SyntaxKind5[SyntaxKind5["IndexSignature"] = 181] = "IndexSignature"; + SyntaxKind5[SyntaxKind5["TypePredicate"] = 182] = "TypePredicate"; + SyntaxKind5[SyntaxKind5["TypeReference"] = 183] = "TypeReference"; + SyntaxKind5[SyntaxKind5["FunctionType"] = 184] = "FunctionType"; + SyntaxKind5[SyntaxKind5["ConstructorType"] = 185] = "ConstructorType"; + SyntaxKind5[SyntaxKind5["TypeQuery"] = 186] = "TypeQuery"; + SyntaxKind5[SyntaxKind5["TypeLiteral"] = 187] = "TypeLiteral"; + SyntaxKind5[SyntaxKind5["ArrayType"] = 188] = "ArrayType"; + SyntaxKind5[SyntaxKind5["TupleType"] = 189] = "TupleType"; + SyntaxKind5[SyntaxKind5["OptionalType"] = 190] = "OptionalType"; + SyntaxKind5[SyntaxKind5["RestType"] = 191] = "RestType"; + SyntaxKind5[SyntaxKind5["UnionType"] = 192] = "UnionType"; + SyntaxKind5[SyntaxKind5["IntersectionType"] = 193] = "IntersectionType"; + SyntaxKind5[SyntaxKind5["ConditionalType"] = 194] = "ConditionalType"; + SyntaxKind5[SyntaxKind5["InferType"] = 195] = "InferType"; + SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 196] = "ParenthesizedType"; + SyntaxKind5[SyntaxKind5["ThisType"] = 197] = "ThisType"; + SyntaxKind5[SyntaxKind5["TypeOperator"] = 198] = "TypeOperator"; + SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 199] = "IndexedAccessType"; + SyntaxKind5[SyntaxKind5["MappedType"] = 200] = "MappedType"; + SyntaxKind5[SyntaxKind5["LiteralType"] = 201] = "LiteralType"; + SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 202] = "NamedTupleMember"; + SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 203] = "TemplateLiteralType"; + SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; + SyntaxKind5[SyntaxKind5["ImportType"] = 205] = "ImportType"; + SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; + SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; + SyntaxKind5[SyntaxKind5["BindingElement"] = 208] = "BindingElement"; + SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; + SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; + SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; + SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 212] = "ElementAccessExpression"; + SyntaxKind5[SyntaxKind5["CallExpression"] = 213] = "CallExpression"; + SyntaxKind5[SyntaxKind5["NewExpression"] = 214] = "NewExpression"; + SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; + SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; + SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; + SyntaxKind5[SyntaxKind5["FunctionExpression"] = 218] = "FunctionExpression"; + SyntaxKind5[SyntaxKind5["ArrowFunction"] = 219] = "ArrowFunction"; + SyntaxKind5[SyntaxKind5["DeleteExpression"] = 220] = "DeleteExpression"; + SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 221] = "TypeOfExpression"; + SyntaxKind5[SyntaxKind5["VoidExpression"] = 222] = "VoidExpression"; + SyntaxKind5[SyntaxKind5["AwaitExpression"] = 223] = "AwaitExpression"; + SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 224] = "PrefixUnaryExpression"; + SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 225] = "PostfixUnaryExpression"; + SyntaxKind5[SyntaxKind5["BinaryExpression"] = 226] = "BinaryExpression"; + SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 227] = "ConditionalExpression"; + SyntaxKind5[SyntaxKind5["TemplateExpression"] = 228] = "TemplateExpression"; + SyntaxKind5[SyntaxKind5["YieldExpression"] = 229] = "YieldExpression"; + SyntaxKind5[SyntaxKind5["SpreadElement"] = 230] = "SpreadElement"; + SyntaxKind5[SyntaxKind5["ClassExpression"] = 231] = "ClassExpression"; + SyntaxKind5[SyntaxKind5["OmittedExpression"] = 232] = "OmittedExpression"; + SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 233] = "ExpressionWithTypeArguments"; + SyntaxKind5[SyntaxKind5["AsExpression"] = 234] = "AsExpression"; + SyntaxKind5[SyntaxKind5["NonNullExpression"] = 235] = "NonNullExpression"; + SyntaxKind5[SyntaxKind5["MetaProperty"] = 236] = "MetaProperty"; + SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 237] = "SyntheticExpression"; + SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 238] = "SatisfiesExpression"; + SyntaxKind5[SyntaxKind5["TemplateSpan"] = 239] = "TemplateSpan"; + SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 240] = "SemicolonClassElement"; + SyntaxKind5[SyntaxKind5["Block"] = 241] = "Block"; + SyntaxKind5[SyntaxKind5["EmptyStatement"] = 242] = "EmptyStatement"; + SyntaxKind5[SyntaxKind5["VariableStatement"] = 243] = "VariableStatement"; + SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 244] = "ExpressionStatement"; + SyntaxKind5[SyntaxKind5["IfStatement"] = 245] = "IfStatement"; + SyntaxKind5[SyntaxKind5["DoStatement"] = 246] = "DoStatement"; + SyntaxKind5[SyntaxKind5["WhileStatement"] = 247] = "WhileStatement"; + SyntaxKind5[SyntaxKind5["ForStatement"] = 248] = "ForStatement"; + SyntaxKind5[SyntaxKind5["ForInStatement"] = 249] = "ForInStatement"; + SyntaxKind5[SyntaxKind5["ForOfStatement"] = 250] = "ForOfStatement"; + SyntaxKind5[SyntaxKind5["ContinueStatement"] = 251] = "ContinueStatement"; + SyntaxKind5[SyntaxKind5["BreakStatement"] = 252] = "BreakStatement"; + SyntaxKind5[SyntaxKind5["ReturnStatement"] = 253] = "ReturnStatement"; + SyntaxKind5[SyntaxKind5["WithStatement"] = 254] = "WithStatement"; + SyntaxKind5[SyntaxKind5["SwitchStatement"] = 255] = "SwitchStatement"; + SyntaxKind5[SyntaxKind5["LabeledStatement"] = 256] = "LabeledStatement"; + SyntaxKind5[SyntaxKind5["ThrowStatement"] = 257] = "ThrowStatement"; + SyntaxKind5[SyntaxKind5["TryStatement"] = 258] = "TryStatement"; + SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 259] = "DebuggerStatement"; + SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 260] = "VariableDeclaration"; + SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 261] = "VariableDeclarationList"; + SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 262] = "FunctionDeclaration"; + SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 263] = "ClassDeclaration"; + SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 264] = "InterfaceDeclaration"; + SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 265] = "TypeAliasDeclaration"; + SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 266] = "EnumDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 267] = "ModuleDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleBlock"] = 268] = "ModuleBlock"; + SyntaxKind5[SyntaxKind5["CaseBlock"] = 269] = "CaseBlock"; + SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 270] = "NamespaceExportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 271] = "ImportEqualsDeclaration"; + SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 272] = "ImportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportClause"] = 273] = "ImportClause"; + SyntaxKind5[SyntaxKind5["NamespaceImport"] = 274] = "NamespaceImport"; + SyntaxKind5[SyntaxKind5["NamedImports"] = 275] = "NamedImports"; + SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 276] = "ImportSpecifier"; + SyntaxKind5[SyntaxKind5["ExportAssignment"] = 277] = "ExportAssignment"; + SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 278] = "ExportDeclaration"; + SyntaxKind5[SyntaxKind5["NamedExports"] = 279] = "NamedExports"; + SyntaxKind5[SyntaxKind5["NamespaceExport"] = 280] = "NamespaceExport"; + SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 281] = "ExportSpecifier"; + SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 282] = "MissingDeclaration"; + SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 283] = "ExternalModuleReference"; + SyntaxKind5[SyntaxKind5["JsxElement"] = 284] = "JsxElement"; + SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 285] = "JsxSelfClosingElement"; + SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 286] = "JsxOpeningElement"; + SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 287] = "JsxClosingElement"; + SyntaxKind5[SyntaxKind5["JsxFragment"] = 288] = "JsxFragment"; + SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 289] = "JsxOpeningFragment"; + SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 290] = "JsxClosingFragment"; + SyntaxKind5[SyntaxKind5["JsxAttribute"] = 291] = "JsxAttribute"; + SyntaxKind5[SyntaxKind5["JsxAttributes"] = 292] = "JsxAttributes"; + SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 293] = "JsxSpreadAttribute"; + SyntaxKind5[SyntaxKind5["JsxExpression"] = 294] = "JsxExpression"; + SyntaxKind5[SyntaxKind5["JsxNamespacedName"] = 295] = "JsxNamespacedName"; + SyntaxKind5[SyntaxKind5["CaseClause"] = 296] = "CaseClause"; + SyntaxKind5[SyntaxKind5["DefaultClause"] = 297] = "DefaultClause"; + SyntaxKind5[SyntaxKind5["HeritageClause"] = 298] = "HeritageClause"; + SyntaxKind5[SyntaxKind5["CatchClause"] = 299] = "CatchClause"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 300] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 301] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; + SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 303] = "PropertyAssignment"; + SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; + SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 305] = "SpreadAssignment"; + SyntaxKind5[SyntaxKind5["EnumMember"] = 306] = "EnumMember"; + SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 307] = "UnparsedPrologue"; + SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 308] = "UnparsedPrepend"; + SyntaxKind5[SyntaxKind5["UnparsedText"] = 309] = "UnparsedText"; + SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 310] = "UnparsedInternalText"; + SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 311] = "UnparsedSyntheticReference"; + SyntaxKind5[SyntaxKind5["SourceFile"] = 312] = "SourceFile"; + SyntaxKind5[SyntaxKind5["Bundle"] = 313] = "Bundle"; + SyntaxKind5[SyntaxKind5["UnparsedSource"] = 314] = "UnparsedSource"; + SyntaxKind5[SyntaxKind5["InputFiles"] = 315] = "InputFiles"; + SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 316] = "JSDocTypeExpression"; + SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 317] = "JSDocNameReference"; + SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 318] = "JSDocMemberName"; + SyntaxKind5[SyntaxKind5["JSDocAllType"] = 319] = "JSDocAllType"; + SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 320] = "JSDocUnknownType"; + SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 321] = "JSDocNullableType"; + SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 322] = "JSDocNonNullableType"; + SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 323] = "JSDocOptionalType"; + SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 324] = "JSDocFunctionType"; + SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 325] = "JSDocVariadicType"; + SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 326] = "JSDocNamepathType"; + SyntaxKind5[SyntaxKind5["JSDoc"] = 327] = "JSDoc"; + SyntaxKind5[SyntaxKind5["JSDocComment"] = 327 /* JSDoc */] = "JSDocComment"; + SyntaxKind5[SyntaxKind5["JSDocText"] = 328] = "JSDocText"; + SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 329] = "JSDocTypeLiteral"; + SyntaxKind5[SyntaxKind5["JSDocSignature"] = 330] = "JSDocSignature"; + SyntaxKind5[SyntaxKind5["JSDocLink"] = 331] = "JSDocLink"; + SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 332] = "JSDocLinkCode"; + SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 333] = "JSDocLinkPlain"; + SyntaxKind5[SyntaxKind5["JSDocTag"] = 334] = "JSDocTag"; + SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 335] = "JSDocAugmentsTag"; + SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 336] = "JSDocImplementsTag"; + SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 337] = "JSDocAuthorTag"; + SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 338] = "JSDocDeprecatedTag"; + SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 339] = "JSDocClassTag"; + SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 340] = "JSDocPublicTag"; + SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 341] = "JSDocPrivateTag"; + SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 342] = "JSDocProtectedTag"; + SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 343] = "JSDocReadonlyTag"; + SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 344] = "JSDocOverrideTag"; + SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 345] = "JSDocCallbackTag"; + SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 346] = "JSDocOverloadTag"; + SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 347] = "JSDocEnumTag"; + SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 348] = "JSDocParameterTag"; + SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 349] = "JSDocReturnTag"; + SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 350] = "JSDocThisTag"; + SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 351] = "JSDocTypeTag"; + SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 352] = "JSDocTemplateTag"; + SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 353] = "JSDocTypedefTag"; + SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 354] = "JSDocSeeTag"; + SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 355] = "JSDocPropertyTag"; + SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 356] = "JSDocThrowsTag"; + SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 357] = "JSDocSatisfiesTag"; + SyntaxKind5[SyntaxKind5["SyntaxList"] = 358] = "SyntaxList"; + SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 359] = "NotEmittedStatement"; + SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 360] = "PartiallyEmittedExpression"; + SyntaxKind5[SyntaxKind5["CommaListExpression"] = 361] = "CommaListExpression"; + SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 362] = "SyntheticReferenceExpression"; + SyntaxKind5[SyntaxKind5["Count"] = 363] = "Count"; SyntaxKind5[SyntaxKind5["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment"; SyntaxKind5[SyntaxKind5["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -3895,15 +3905,15 @@ ${lanes.join("\n")} SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 83 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind5[SyntaxKind5["LastReservedWord"] = 118 /* WithKeyword */] = "LastReservedWord"; SyntaxKind5[SyntaxKind5["FirstKeyword"] = 83 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 164 /* OfKeyword */] = "LastKeyword"; + SyntaxKind5[SyntaxKind5["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 119 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 127 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 181 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 204 /* ImportType */] = "LastTypeNode"; + SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind5[SyntaxKind5["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 19 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind5[SyntaxKind5["LastPunctuation"] = 79 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 164 /* LastKeyword */] = "LastToken"; + SyntaxKind5[SyntaxKind5["LastToken"] = 165 /* LastKeyword */] = "LastToken"; SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 9 /* NumericLiteral */] = "FirstLiteralToken"; @@ -3912,56 +3922,59 @@ ${lanes.join("\n")} SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 18 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 30 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 79 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 242 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 258 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 165 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 315 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 356 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 333 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 356 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; + SyntaxKind5[SyntaxKind5["FirstStatement"] = 243 /* VariableStatement */] = "FirstStatement"; + SyntaxKind5[SyntaxKind5["LastStatement"] = 259 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind5[SyntaxKind5["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 316 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 334 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 128 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 164 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind5; })(SyntaxKind || {}); NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { NodeFlags3[NodeFlags3["None"] = 0] = "None"; NodeFlags3[NodeFlags3["Let"] = 1] = "Let"; NodeFlags3[NodeFlags3["Const"] = 2] = "Const"; - NodeFlags3[NodeFlags3["NestedNamespace"] = 4] = "NestedNamespace"; - NodeFlags3[NodeFlags3["Synthesized"] = 8] = "Synthesized"; - NodeFlags3[NodeFlags3["Namespace"] = 16] = "Namespace"; - NodeFlags3[NodeFlags3["OptionalChain"] = 32] = "OptionalChain"; - NodeFlags3[NodeFlags3["ExportContext"] = 64] = "ExportContext"; - NodeFlags3[NodeFlags3["ContainsThis"] = 128] = "ContainsThis"; - NodeFlags3[NodeFlags3["HasImplicitReturn"] = 256] = "HasImplicitReturn"; - NodeFlags3[NodeFlags3["HasExplicitReturn"] = 512] = "HasExplicitReturn"; - NodeFlags3[NodeFlags3["GlobalAugmentation"] = 1024] = "GlobalAugmentation"; - NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 2048] = "HasAsyncFunctions"; - NodeFlags3[NodeFlags3["DisallowInContext"] = 4096] = "DisallowInContext"; - NodeFlags3[NodeFlags3["YieldContext"] = 8192] = "YieldContext"; - NodeFlags3[NodeFlags3["DecoratorContext"] = 16384] = "DecoratorContext"; - NodeFlags3[NodeFlags3["AwaitContext"] = 32768] = "AwaitContext"; - NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 65536] = "DisallowConditionalTypesContext"; - NodeFlags3[NodeFlags3["ThisNodeHasError"] = 131072] = "ThisNodeHasError"; - NodeFlags3[NodeFlags3["JavaScriptFile"] = 262144] = "JavaScriptFile"; - NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 524288] = "ThisNodeOrAnySubNodesHasError"; - NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 1048576] = "HasAggregatedChildData"; - NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 2097152] = "PossiblyContainsDynamicImport"; - NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 4194304] = "PossiblyContainsImportMeta"; - NodeFlags3[NodeFlags3["JSDoc"] = 8388608] = "JSDoc"; - NodeFlags3[NodeFlags3["Ambient"] = 16777216] = "Ambient"; - NodeFlags3[NodeFlags3["InWithStatement"] = 33554432] = "InWithStatement"; - NodeFlags3[NodeFlags3["JsonFile"] = 67108864] = "JsonFile"; - NodeFlags3[NodeFlags3["TypeCached"] = 134217728] = "TypeCached"; - NodeFlags3[NodeFlags3["Deprecated"] = 268435456] = "Deprecated"; - NodeFlags3[NodeFlags3["BlockScoped"] = 3] = "BlockScoped"; - NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags"; - NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 2816] = "ReachabilityAndEmitFlags"; - NodeFlags3[NodeFlags3["ContextFlags"] = 50720768] = "ContextFlags"; - NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 40960] = "TypeExcludesFlags"; - NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 6291456] = "PermanentlySetIncrementalFlags"; - NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 128 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; - NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 2048 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; + NodeFlags3[NodeFlags3["Using"] = 4] = "Using"; + NodeFlags3[NodeFlags3["AwaitUsing"] = 6] = "AwaitUsing"; + NodeFlags3[NodeFlags3["NestedNamespace"] = 8] = "NestedNamespace"; + NodeFlags3[NodeFlags3["Synthesized"] = 16] = "Synthesized"; + NodeFlags3[NodeFlags3["Namespace"] = 32] = "Namespace"; + NodeFlags3[NodeFlags3["OptionalChain"] = 64] = "OptionalChain"; + NodeFlags3[NodeFlags3["ExportContext"] = 128] = "ExportContext"; + NodeFlags3[NodeFlags3["ContainsThis"] = 256] = "ContainsThis"; + NodeFlags3[NodeFlags3["HasImplicitReturn"] = 512] = "HasImplicitReturn"; + NodeFlags3[NodeFlags3["HasExplicitReturn"] = 1024] = "HasExplicitReturn"; + NodeFlags3[NodeFlags3["GlobalAugmentation"] = 2048] = "GlobalAugmentation"; + NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 4096] = "HasAsyncFunctions"; + NodeFlags3[NodeFlags3["DisallowInContext"] = 8192] = "DisallowInContext"; + NodeFlags3[NodeFlags3["YieldContext"] = 16384] = "YieldContext"; + NodeFlags3[NodeFlags3["DecoratorContext"] = 32768] = "DecoratorContext"; + NodeFlags3[NodeFlags3["AwaitContext"] = 65536] = "AwaitContext"; + NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 131072] = "DisallowConditionalTypesContext"; + NodeFlags3[NodeFlags3["ThisNodeHasError"] = 262144] = "ThisNodeHasError"; + NodeFlags3[NodeFlags3["JavaScriptFile"] = 524288] = "JavaScriptFile"; + NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 1048576] = "ThisNodeOrAnySubNodesHasError"; + NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 2097152] = "HasAggregatedChildData"; + NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 4194304] = "PossiblyContainsDynamicImport"; + NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 8388608] = "PossiblyContainsImportMeta"; + NodeFlags3[NodeFlags3["JSDoc"] = 16777216] = "JSDoc"; + NodeFlags3[NodeFlags3["Ambient"] = 33554432] = "Ambient"; + NodeFlags3[NodeFlags3["InWithStatement"] = 67108864] = "InWithStatement"; + NodeFlags3[NodeFlags3["JsonFile"] = 134217728] = "JsonFile"; + NodeFlags3[NodeFlags3["TypeCached"] = 268435456] = "TypeCached"; + NodeFlags3[NodeFlags3["Deprecated"] = 536870912] = "Deprecated"; + NodeFlags3[NodeFlags3["BlockScoped"] = 7] = "BlockScoped"; + NodeFlags3[NodeFlags3["Constant"] = 6] = "Constant"; + NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 1536] = "ReachabilityCheckFlags"; + NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 5632] = "ReachabilityAndEmitFlags"; + NodeFlags3[NodeFlags3["ContextFlags"] = 101441536] = "ContextFlags"; + NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 81920] = "TypeExcludesFlags"; + NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 12582912] = "PermanentlySetIncrementalFlags"; + NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 256 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; + NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 4096 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; return NodeFlags3; })(NodeFlags || {}); ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { @@ -4374,15 +4387,13 @@ ${lanes.join("\n")} NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding"; NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding"; NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop"; - NodeCheckFlags2[NodeCheckFlags2["ClassWithBodyScopedClassBinding"] = 65536] = "ClassWithBodyScopedClassBinding"; - NodeCheckFlags2[NodeCheckFlags2["BodyScopedClassBinding"] = 131072] = "BodyScopedClassBinding"; - NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 262144] = "NeedsLoopOutParameter"; - NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 524288] = "AssignmentsMarked"; - NodeCheckFlags2[NodeCheckFlags2["ClassWithConstructorReference"] = 1048576] = "ClassWithConstructorReference"; - NodeCheckFlags2[NodeCheckFlags2["ConstructorReferenceInClass"] = 2097152] = "ConstructorReferenceInClass"; - NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 4194304] = "ContainsClassWithPrivateIdentifiers"; - NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 8388608] = "ContainsSuperPropertyInStaticInitializer"; - NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 16777216] = "InCheckIdentifier"; + NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 65536] = "NeedsLoopOutParameter"; + NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 131072] = "AssignmentsMarked"; + NodeCheckFlags2[NodeCheckFlags2["ContainsConstructorReference"] = 262144] = "ContainsConstructorReference"; + NodeCheckFlags2[NodeCheckFlags2["ConstructorReference"] = 536870912] = "ConstructorReference"; + NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 1048576] = "ContainsClassWithPrivateIdentifiers"; + NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 2097152] = "ContainsSuperPropertyInStaticInitializer"; + NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 4194304] = "InCheckIdentifier"; return NodeCheckFlags2; })(NodeCheckFlags || {}); TypeFlags = /* @__PURE__ */ ((TypeFlags2) => { @@ -4563,7 +4574,8 @@ ${lanes.join("\n")} SignatureFlags5[SignatureFlags5["IsOuterCallChain"] = 16] = "IsOuterCallChain"; SignatureFlags5[SignatureFlags5["IsUntypedSignatureInJSFile"] = 32] = "IsUntypedSignatureInJSFile"; SignatureFlags5[SignatureFlags5["IsNonInferrable"] = 64] = "IsNonInferrable"; - SignatureFlags5[SignatureFlags5["PropagatingFlags"] = 39] = "PropagatingFlags"; + SignatureFlags5[SignatureFlags5["IsSignatureCandidateForOverloadFailure"] = 128] = "IsSignatureCandidateForOverloadFailure"; + SignatureFlags5[SignatureFlags5["PropagatingFlags"] = 167] = "PropagatingFlags"; SignatureFlags5[SignatureFlags5["CallChainFlags"] = 24] = "CallChainFlags"; return SignatureFlags5; })(SignatureFlags || {}); @@ -4705,16 +4717,16 @@ ${lanes.join("\n")} NewLineKind3[NewLineKind3["LineFeed"] = 1] = "LineFeed"; return NewLineKind3; })(NewLineKind || {}); - ScriptKind = /* @__PURE__ */ ((ScriptKind6) => { - ScriptKind6[ScriptKind6["Unknown"] = 0] = "Unknown"; - ScriptKind6[ScriptKind6["JS"] = 1] = "JS"; - ScriptKind6[ScriptKind6["JSX"] = 2] = "JSX"; - ScriptKind6[ScriptKind6["TS"] = 3] = "TS"; - ScriptKind6[ScriptKind6["TSX"] = 4] = "TSX"; - ScriptKind6[ScriptKind6["External"] = 5] = "External"; - ScriptKind6[ScriptKind6["JSON"] = 6] = "JSON"; - ScriptKind6[ScriptKind6["Deferred"] = 7] = "Deferred"; - return ScriptKind6; + ScriptKind = /* @__PURE__ */ ((ScriptKind7) => { + ScriptKind7[ScriptKind7["Unknown"] = 0] = "Unknown"; + ScriptKind7[ScriptKind7["JS"] = 1] = "JS"; + ScriptKind7[ScriptKind7["JSX"] = 2] = "JSX"; + ScriptKind7[ScriptKind7["TS"] = 3] = "TS"; + ScriptKind7[ScriptKind7["TSX"] = 4] = "TSX"; + ScriptKind7[ScriptKind7["External"] = 5] = "External"; + ScriptKind7[ScriptKind7["JSON"] = 6] = "JSON"; + ScriptKind7[ScriptKind7["Deferred"] = 7] = "Deferred"; + return ScriptKind7; })(ScriptKind || {}); ScriptTarget = /* @__PURE__ */ ((ScriptTarget11) => { ScriptTarget11[ScriptTarget11["ES3"] = 0] = "ES3"; @@ -5029,8 +5041,9 @@ ${lanes.join("\n")} ExternalEmitHelpers2[ExternalEmitHelpers2["CreateBinding"] = 4194304] = "CreateBinding"; ExternalEmitHelpers2[ExternalEmitHelpers2["SetFunctionName"] = 8388608] = "SetFunctionName"; ExternalEmitHelpers2[ExternalEmitHelpers2["PropKey"] = 16777216] = "PropKey"; + ExternalEmitHelpers2[ExternalEmitHelpers2["AddDisposableResourceAndDisposeResources"] = 33554432] = "AddDisposableResourceAndDisposeResources"; ExternalEmitHelpers2[ExternalEmitHelpers2["FirstEmitHelper"] = 1 /* Extends */] = "FirstEmitHelper"; - ExternalEmitHelpers2[ExternalEmitHelpers2["LastEmitHelper"] = 16777216 /* PropKey */] = "LastEmitHelper"; + ExternalEmitHelpers2[ExternalEmitHelpers2["LastEmitHelper"] = 33554432 /* AddDisposableResourceAndDisposeResources */] = "LastEmitHelper"; ExternalEmitHelpers2[ExternalEmitHelpers2["ForOfIncludes"] = 256 /* Values */] = "ForOfIncludes"; ExternalEmitHelpers2[ExternalEmitHelpers2["ForAwaitOfIncludes"] = 16384 /* AsyncValues */] = "ForAwaitOfIncludes"; ExternalEmitHelpers2[ExternalEmitHelpers2["AsyncGeneratorIncludes"] = 6144] = "AsyncGeneratorIncludes"; @@ -5411,10 +5424,10 @@ ${lanes.join("\n")} pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval)); } } - function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) { + function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) { const fileWatcherCallbacks = createMultiMap(); const dirWatchers = /* @__PURE__ */ new Map(); - const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2); return nonPollingWatchFile; function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) { const filePath = toCanonicalName(fileName); @@ -5490,8 +5503,8 @@ ${lanes.join("\n")} pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue"); } } - function createSingleWatcherPerName(cache, useCaseSensitiveFileNames, name, callback, createWatcher) { - const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) { + const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const path = toCanonicalFileName(name); const existing = cache.get(path); if (existing) { @@ -5541,7 +5554,7 @@ ${lanes.join("\n")} } function createDirectoryWatcherSupportingRecursive({ watchDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, getAccessibleSortedChildDirectories, fileSystemEntryExists, @@ -5553,8 +5566,8 @@ ${lanes.join("\n")} const callbackCache = createMultiMap(); const cacheToUpdateChildWatches = /* @__PURE__ */ new Map(); let timerToUpdateChildWatches; - const filePathComparer = getStringComparer(!useCaseSensitiveFileNames); - const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames); + const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2); + const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2); return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options); function createDirectoryWatcher(dirName, options, callback) { const dirPath = toCanonicalFilePath(dirName); @@ -5721,12 +5734,12 @@ ${lanes.join("\n")} } } function isIgnoredPath(path, options) { - return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames, getCurrentDirectory); + return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory); } function isInPath(path, searchPath) { if (stringContains(path, searchPath)) return true; - if (useCaseSensitiveFileNames) + if (useCaseSensitiveFileNames2) return false; return stringContains(toCanonicalFilePath(path), searchPath); } @@ -5744,14 +5757,14 @@ ${lanes.join("\n")} } }; } - function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames, getCurrentDirectory) { - return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames, getCurrentDirectory())); + function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) { + return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames2, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2, getCurrentDirectory())); } - function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory) { + function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) { return (eventName, relativeFileName) => { if (eventName === "rename") { const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName)); - if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames, getCurrentDirectory)) { + if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) { callback(fileName); } } @@ -5764,7 +5777,7 @@ ${lanes.join("\n")} clearTimeout: clearTimeout2, fsWatchWorker, fileSystemEntryExists, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories, @@ -5836,7 +5849,7 @@ ${lanes.join("\n")} ); case 5 /* UseFsEventsOnParentDirectory */: if (!nonPollingWatchFile) { - nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames); + nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2); } return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options)); default: @@ -5885,7 +5898,7 @@ ${lanes.join("\n")} return fsWatch( directoryName, 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), + createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), recursive, 500 /* Medium */, getFallbackOptions(options) @@ -5893,7 +5906,7 @@ ${lanes.join("\n")} } if (!hostRecursiveDirectoryWatcher) { hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({ - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fileSystemEntryExists, getAccessibleSortedChildDirectories, @@ -5939,7 +5952,7 @@ ${lanes.join("\n")} return fsWatch( directoryName, 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), + createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), recursive, 500 /* Medium */, getFallbackOptions(watchDirectoryOptions) @@ -5967,7 +5980,7 @@ ${lanes.join("\n")} function pollingWatchFile(fileName, callback, pollingInterval, options) { return createSingleWatcherPerName( pollingWatches, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, fileName, callback, (cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options) @@ -5976,7 +5989,7 @@ ${lanes.join("\n")} function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) { return createSingleWatcherPerName( recursive ? fsWatchesRecursive : fsWatches, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, fileOrDirectory, callback, (cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions) @@ -6135,7 +6148,7 @@ ${lanes.join("\n")} const Buffer2 = require("buffer").Buffer; const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin"; const platform = _os.platform(); - const useCaseSensitiveFileNames = isFileSystemCaseSensitive(); + const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive(); const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync; const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename; const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin"; @@ -6146,7 +6159,7 @@ ${lanes.join("\n")} setTimeout, clearTimeout, fsWatchWorker, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fileSystemEntryExists, // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows @@ -6163,7 +6176,7 @@ ${lanes.join("\n")} const nodeSystem = { args: process.argv.slice(2), newLine: _os.EOL, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, write(s) { process.stdout.write(s); }, @@ -6228,7 +6241,7 @@ ${lanes.join("\n")} disableCPUProfiler, cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"), realpath, - debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)), + debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay, tryEnableSourceMapsForHost() { try { require("source-map-support").install(); @@ -6254,8 +6267,8 @@ ${lanes.join("\n")} try { const modulePath = resolveJSModule(moduleName, baseDir, nodeSystem); return { module: require(modulePath), modulePath, error: void 0 }; - } catch (error) { - return { module: void 0, modulePath: void 0, error }; + } catch (error2) { + return { module: void 0, modulePath: void 0, error: error2 }; } } }; @@ -6292,12 +6305,12 @@ ${lanes.join("\n")} for (const node of profile.nodes) { if (node.callFrame.url) { const url = normalizeSlashes(node.callFrame.url); - if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames)) { + if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) { node.callFrame.url = getRelativePathToDirectoryOrUrl( fileUrlRoot, url, fileUrlRoot, - createGetCanonicalFileName(useCaseSensitiveFileNames), + createGetCanonicalFileName(useCaseSensitiveFileNames2), /*isAbsolutePathAnUrl*/ true ); @@ -6477,7 +6490,7 @@ ${lanes.join("\n")} } } function readDirectory(path, extensions, excludes, includes, depth) { - return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); + return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); } function fileSystemEntryExists(path, entryKind) { const originalStackTraceLimit = Error.stackTraceLimit; @@ -7053,6 +7066,7 @@ ${lanes.join("\n")} Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, 1 /* Error */, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, 1 /* Error */, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: diag(1065, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065", "The return type of an async function or method must be the global Promise type."), In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, 1 /* Error */, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, 1 /* Error */, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, 1 /* Error */, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), @@ -7082,6 +7096,7 @@ ${lanes.join("\n")} A_return_statement_can_only_be_used_within_a_function_body: diag(1108, 1 /* Error */, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), Expression_expected: diag(1109, 1 /* Error */, "Expression_expected_1109", "Expression expected."), Type_expected: diag(1110, 1 /* Error */, "Type_expected_1110", "Type expected."), + Private_field_0_must_be_declared_in_an_enclosing_class: diag(1111, 1 /* Error */, "Private_field_0_must_be_declared_in_an_enclosing_class_1111", "Private field '{0}' must be declared in an enclosing class."), A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, 1 /* Error */, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), Duplicate_label_0: diag(1114, 1 /* Error */, "Duplicate_label_0_1114", "Duplicate label '{0}'."), A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, 1 /* Error */, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), @@ -7116,9 +7131,8 @@ ${lanes.join("\n")} Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, 1 /* Error */, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, 1 /* Error */, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, 1 /* Error */, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), - const_declarations_must_be_initialized: diag(1155, 1 /* Error */, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."), - const_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."), - let_declarations_can_only_be_declared_inside_a_block: diag(1157, 1 /* Error */, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."), + _0_declarations_must_be_initialized: diag(1155, 1 /* Error */, "_0_declarations_must_be_initialized_1155", "'{0}' declarations must be initialized."), + _0_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "_0_declarations_can_only_be_declared_inside_a_block_1156", "'{0}' declarations can only be declared inside a block."), Unterminated_template_literal: diag(1160, 1 /* Error */, "Unterminated_template_literal_1160", "Unterminated template literal."), Unterminated_regular_expression_literal: diag(1161, 1 /* Error */, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), An_object_member_cannot_be_declared_optional: diag(1162, 1 /* Error */, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), @@ -7300,8 +7314,6 @@ ${lanes.join("\n")} Class_constructor_may_not_be_a_generator: diag(1368, 1 /* Error */, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), Did_you_mean_0: diag(1369, 3 /* Message */, "Did_you_mean_0_1369", "Did you mean '{0}'?"), This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, 1 /* Error */, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."), - Convert_to_type_only_import: diag(1373, 3 /* 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, 3 /* 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, 1 /* 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."), _0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."), _0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."), @@ -7405,6 +7417,11 @@ ${lanes.join("\n")} Escape_sequence_0_is_not_allowed: diag(1488, 1 /* Error */, "Escape_sequence_0_is_not_allowed_1488", "Escape sequence '{0}' is not allowed."), Decimals_with_leading_zeros_are_not_allowed: diag(1489, 1 /* Error */, "Decimals_with_leading_zeros_are_not_allowed_1489", "Decimals with leading zeros are not allowed."), File_appears_to_be_binary: diag(1490, 1 /* Error */, "File_appears_to_be_binary_1490", "File appears to be binary."), + _0_modifier_cannot_appear_on_a_using_declaration: diag(1491, 1 /* Error */, "_0_modifier_cannot_appear_on_a_using_declaration_1491", "'{0}' modifier cannot appear on a 'using' declaration."), + _0_declarations_may_not_have_binding_patterns: diag(1492, 1 /* Error */, "_0_declarations_may_not_have_binding_patterns_1492", "'{0}' declarations may not have binding patterns."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), + The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), + _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* 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, 1 /* 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( @@ -7499,7 +7516,6 @@ ${lanes.join("\n")} This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, 1 /* Error */, "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}'."), Type_0_does_not_satisfy_the_constraint_1: diag(2344, 1 /* Error */, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, 1 /* Error */, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), - Call_target_does_not_contain_any_signatures: diag(2346, 1 /* Error */, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), Untyped_function_calls_may_not_accept_type_arguments: diag(2347, 1 /* Error */, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, 1 /* Error */, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), This_expression_is_not_callable: diag(2349, 1 /* Error */, "This_expression_is_not_callable_2349", "This expression is not callable."), @@ -7951,6 +7967,11 @@ ${lanes.join("\n")} A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: diag(2846, 1 /* Error */, "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"), The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression: diag(2848, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848", "The right-hand side of an 'instanceof' expression must not be an instantiation expression."), Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1: diag(2849, 1 /* Error */, "Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849", "Target signature provides too few arguments. Expected {0} or more, but got {1}."), + The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined: diag(2850, 1 /* Error */, "The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850", "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: diag(2851, 1 /* Error */, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), + await_using_statements_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(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* 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, 1 /* 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, 1 /* 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}'."), @@ -8104,7 +8125,6 @@ ${lanes.join("\n")} Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: diag(5081, 1 /* Error */, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: diag(5082, 1 /* Error */, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), Cannot_read_file_0: diag(5083, 1 /* Error */, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), - Tuple_members_must_all_have_names_or_all_not_have_names: diag(5084, 1 /* Error */, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."), A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, 1 /* Error */, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, 1 /* Error */, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, 1 /* Error */, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), @@ -8127,6 +8147,8 @@ ${lanes.join("\n")} Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), + Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."), + Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -8507,6 +8529,8 @@ ${lanes.join("\n")} Resolved_under_condition_0: diag(6414, 3 /* Message */, "Resolved_under_condition_0_6414", "Resolved under condition '{0}'."), Failed_to_resolve_under_condition_0: diag(6415, 3 /* Message */, "Failed_to_resolve_under_condition_0_6415", "Failed to resolve under condition '{0}'."), Exiting_conditional_exports: diag(6416, 3 /* Message */, "Exiting_conditional_exports_6416", "Exiting conditional exports."), + Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: diag(6417, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", "Searching all ancestor node_modules directories for preferred extensions: {0}."), + Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: diag(6418, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", "Searching all ancestor node_modules directories for fallback extensions: {0}."), The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* Message */, "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_this_index_signature: diag(6501, 3 /* Message */, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, 3 /* Message */, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), @@ -8745,6 +8769,7 @@ ${lanes.join("\n")} Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, 1 /* Error */, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, 1 /* Error */, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, 1 /* Error */, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), + Signature_declarations_can_only_be_used_in_TypeScript_files: diag(8017, 1 /* Error */, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."), Report_errors_in_js_files: diag(8019, 3 /* Message */, "Report_errors_in_js_files_8019", "Report errors in .js files."), JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, 1 /* Error */, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, 1 /* Error */, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), @@ -9019,6 +9044,14 @@ ${lanes.join("\n")} Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."), Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"), Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"), + Use_import_type: diag(95180, 3 /* Message */, "Use_import_type_95180", "Use 'import type'"), + Use_type_0: diag(95181, 3 /* Message */, "Use_type_0_95181", "Use 'type {0}'"), + Fix_all_with_type_only_imports: diag(95182, 3 /* Message */, "Fix_all_with_type_only_imports_95182", "Fix all with type-only imports"), + Cannot_move_statements_to_the_selected_file: diag(95183, 3 /* Message */, "Cannot_move_statements_to_the_selected_file_95183", "Cannot move statements to the selected file"), + Inline_variable: diag(95184, 3 /* Message */, "Inline_variable_95184", "Inline variable"), + Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."), + Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."), + Add_missing_comma_for_object_member_completion_0: diag(95187, 3 /* Message */, "Add_missing_comma_for_object_member_completion_0_95187", "Add missing comma for object member completion '{0}'."), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* 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, 1 /* 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, 1 /* 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?"), @@ -9045,8 +9078,8 @@ ${lanes.join("\n")} Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, 3 /* Message */, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, 1 /* Error */, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, 1 /* Error */, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), - Await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."), - For_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."), + await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "await_expression_cannot_be_used_inside_a_class_static_block_18037", "'await' expression cannot be used inside a class static block."), + for_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "for_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'for await' loops cannot be used inside a class static block."), Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, 1 /* Error */, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, 1 /* Error */, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, 1 /* Error */, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), @@ -9060,7 +9093,8 @@ ${lanes.join("\n")} The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."), Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"), - Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type.") + Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."), + await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block.") }; } }); @@ -9337,9 +9371,9 @@ ${lanes.join("\n")} } return false; } - function scanConflictMarkerTrivia(text, pos, error) { - if (error) { - error(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength); + function scanConflictMarkerTrivia(text, pos, error2) { + if (error2) { + error2(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength); } const ch = text.charCodeAt(pos); const len = text.length; @@ -9635,7 +9669,7 @@ ${lanes.join("\n")} }); } return scanner2; - function error(message, errPos = pos, length3, arg0) { + function error2(message, errPos = pos, length3, arg0) { if (onError) { const oldPos = pos; pos = errPos; @@ -9659,9 +9693,9 @@ ${lanes.join("\n")} } else { tokenFlags |= 16384 /* ContainsInvalidSeparator */; if (isPreviousTokenSeparator) { - error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); + error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); } } pos++; @@ -9678,7 +9712,7 @@ ${lanes.join("\n")} } if (text.charCodeAt(pos - 1) === 95 /* _ */) { tokenFlags |= 16384 /* ContainsInvalidSeparator */; - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); } return result + text.substring(start2, pos); } @@ -9689,7 +9723,7 @@ ${lanes.join("\n")} pos++; if (text.charCodeAt(pos) === 95 /* _ */) { tokenFlags |= 512 /* ContainsSeparator */ | 16384 /* ContainsInvalidSeparator */; - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); pos--; mainFragment = scanNumberFragment(); } else if (!scanDigits()) { @@ -9704,8 +9738,8 @@ ${lanes.join("\n")} const literal = (withMinus ? "-" : "") + "0o" + (+tokenValue).toString(8); if (withMinus) start2--; - error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal); - return { type: 9 /* NumericLiteral */, value: tokenValue }; + error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal); + return 9 /* NumericLiteral */; } } else { mainFragment = scanNumberFragment(); @@ -9725,7 +9759,7 @@ ${lanes.join("\n")} const preNumericPart = pos; const finalFragment = scanNumberFragment(); if (!finalFragment) { - error(Diagnostics.Digit_expected); + error2(Diagnostics.Digit_expected); } else { scientificFragment = text.substring(end2, preNumericPart) + finalFragment; end2 = pos; @@ -9744,21 +9778,19 @@ ${lanes.join("\n")} result = text.substring(start2, end2); } if (tokenFlags & 8192 /* ContainsLeadingZero */) { - error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2); - return { type: 9 /* NumericLiteral */, value: "" + +result }; + error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2); + tokenValue = "" + +result; + return 9 /* NumericLiteral */; } if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) { checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */)); - return { - type: 9 /* NumericLiteral */, - value: "" + +result - // if value is not an integer, it can be safely coerced to a number - }; + tokenValue = "" + +result; + return 9 /* NumericLiteral */; } else { tokenValue = result; const type = checkBigIntSuffix(); checkForIdentifierStartAfterNumericLiteral(start2); - return { type, value: tokenValue }; + return type; } } function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) { @@ -9769,12 +9801,12 @@ ${lanes.join("\n")} const { length: length3 } = scanIdentifierParts(); if (length3 === 1 && text[identifierStart] === "n") { if (isScientific) { - error(Diagnostics.A_bigint_literal_cannot_use_exponential_notation, numericStart, identifierStart - numericStart + 1); + error2(Diagnostics.A_bigint_literal_cannot_use_exponential_notation, numericStart, identifierStart - numericStart + 1); } else { - error(Diagnostics.A_bigint_literal_must_be_an_integer, numericStart, identifierStart - numericStart + 1); + error2(Diagnostics.A_bigint_literal_must_be_an_integer, numericStart, identifierStart - numericStart + 1); } } else { - error(Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, identifierStart, length3); + error2(Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, identifierStart, length3); pos = identifierStart; } } @@ -9821,9 +9853,9 @@ ${lanes.join("\n")} allowSeparator = false; isPreviousTokenSeparator = true; } else if (isPreviousTokenSeparator) { - error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); + error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); } pos++; continue; @@ -9842,7 +9874,7 @@ ${lanes.join("\n")} valueChars = []; } if (text.charCodeAt(pos - 1) === 95 /* _ */) { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); } return String.fromCharCode(...valueChars); } @@ -9855,7 +9887,7 @@ ${lanes.join("\n")} if (pos >= end) { result += text.substring(start2, pos); tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_string_literal); + error2(Diagnostics.Unterminated_string_literal); break; } const ch = text.charCodeAt(pos); @@ -9876,7 +9908,7 @@ ${lanes.join("\n")} if (isLineBreak(ch) && !jsxAttributeString) { result += text.substring(start2, pos); tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_string_literal); + error2(Diagnostics.Unterminated_string_literal); break; } pos++; @@ -9893,7 +9925,7 @@ ${lanes.join("\n")} if (pos >= end) { contents += text.substring(start2, pos); tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_template_literal); + error2(Diagnostics.Unterminated_template_literal); resultingToken = startedWithBacktick ? 15 /* NoSubstitutionTemplateLiteral */ : 18 /* TemplateTail */; break; } @@ -9936,7 +9968,7 @@ ${lanes.join("\n")} const start2 = pos; pos++; if (pos >= end) { - error(Diagnostics.Unexpected_end_of_text); + error2(Diagnostics.Unexpected_end_of_text); return ""; } const ch = text.charCodeAt(pos); @@ -9962,7 +9994,7 @@ ${lanes.join("\n")} tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { const code = parseInt(text.substring(start2 + 1, pos), 8); - error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0")); + error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0")); return String.fromCharCode(code); } return text.substring(start2, pos); @@ -9970,7 +10002,7 @@ ${lanes.join("\n")} case 57 /* _9 */: tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Escape_sequence_0_is_not_allowed, start2, pos - start2, text.substring(start2, pos)); + error2(Diagnostics.Escape_sequence_0_is_not_allowed, start2, pos - start2, text.substring(start2, pos)); return String.fromCharCode(ch); } return text.substring(start2, pos); @@ -10002,28 +10034,28 @@ ${lanes.join("\n")} if (escapedValue < 0) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); } return text.substring(start2, pos); } if (!isCodePoint(escapedValue)) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); + error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); } return text.substring(start2, pos); } if (pos >= end) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Unexpected_end_of_text); + error2(Diagnostics.Unexpected_end_of_text); } return text.substring(start2, pos); } if (text.charCodeAt(pos) !== 125 /* closeBrace */) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Unterminated_Unicode_escape_sequence); + error2(Diagnostics.Unterminated_Unicode_escape_sequence); } return text.substring(start2, pos); } @@ -10035,7 +10067,7 @@ ${lanes.join("\n")} if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); } return text.substring(start2, pos); } @@ -10047,7 +10079,7 @@ ${lanes.join("\n")} if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); } return text.substring(start2, pos); } @@ -10075,19 +10107,19 @@ ${lanes.join("\n")} const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; let isInvalidExtendedEscape = false; if (escapedValue < 0) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); isInvalidExtendedEscape = true; } else if (escapedValue > 1114111) { - error(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); + error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); isInvalidExtendedEscape = true; } if (pos >= end) { - error(Diagnostics.Unexpected_end_of_text); + error2(Diagnostics.Unexpected_end_of_text); isInvalidExtendedEscape = true; } else if (text.charCodeAt(pos) === 125 /* closeBrace */) { pos++; } else { - error(Diagnostics.Unterminated_Unicode_escape_sequence); + error2(Diagnostics.Unterminated_Unicode_escape_sequence); isInvalidExtendedEscape = true; } if (isInvalidExtendedEscape) { @@ -10181,9 +10213,9 @@ ${lanes.join("\n")} separatorAllowed = false; isPreviousTokenSeparator = true; } else if (isPreviousTokenSeparator) { - error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); + error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); } pos++; continue; @@ -10197,7 +10229,7 @@ ${lanes.join("\n")} isPreviousTokenSeparator = false; } if (text.charCodeAt(pos - 1) === 95 /* _ */) { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); } return value; } @@ -10227,7 +10259,7 @@ ${lanes.join("\n")} const ch = codePointAt(text, pos); if (pos === 0) { if (ch === 65533 /* replacementCharacter */) { - error(Diagnostics.File_appears_to_be_binary); + error2(Diagnostics.File_appears_to_be_binary); pos = end; return token = 8 /* NonTextFileMarkerTrivia */; } @@ -10367,7 +10399,7 @@ ${lanes.join("\n")} return token = 41 /* MinusToken */; case 46 /* dot */: if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = scanNumber().value; + scanNumber(); return token = 9 /* NumericLiteral */; } if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { @@ -10418,7 +10450,7 @@ ${lanes.join("\n")} } commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart); if (!commentClosed) { - error(Diagnostics.Asterisk_Slash_expected); + error2(Diagnostics.Asterisk_Slash_expected); } if (skipTrivia2) { continue; @@ -10443,7 +10475,7 @@ ${lanes.join("\n")} true ); if (!tokenValue) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); tokenValue = "0"; } tokenValue = "0x" + tokenValue; @@ -10456,7 +10488,7 @@ ${lanes.join("\n")} 2 ); if (!tokenValue) { - error(Diagnostics.Binary_digit_expected); + error2(Diagnostics.Binary_digit_expected); tokenValue = "0"; } tokenValue = "0b" + tokenValue; @@ -10469,7 +10501,7 @@ ${lanes.join("\n")} 8 ); if (!tokenValue) { - error(Diagnostics.Octal_digit_expected); + error2(Diagnostics.Octal_digit_expected); tokenValue = "0"; } tokenValue = "0o" + tokenValue; @@ -10485,8 +10517,7 @@ ${lanes.join("\n")} case 55 /* _7 */: case 56 /* _8 */: case 57 /* _9 */: - ({ type: token, value: tokenValue } = scanNumber()); - return token; + return token = scanNumber(); case 58 /* colon */: pos++; return token = 59 /* ColonToken */; @@ -10495,7 +10526,7 @@ ${lanes.join("\n")} return token = 27 /* SemicolonToken */; case 60 /* lessThan */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -10518,7 +10549,7 @@ ${lanes.join("\n")} return token = 30 /* LessThanToken */; case 61 /* equals */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -10538,7 +10569,7 @@ ${lanes.join("\n")} return token = 64 /* EqualsToken */; case 62 /* greaterThan */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -10576,7 +10607,7 @@ ${lanes.join("\n")} return token = 19 /* OpenBraceToken */; case 124 /* bar */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -10618,12 +10649,12 @@ ${lanes.join("\n")} tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); return token = getIdentifierToken(); } - error(Diagnostics.Invalid_character); + error2(Diagnostics.Invalid_character); pos++; return token = 0 /* Unknown */; case 35 /* hash */: if (pos !== 0 && text[pos + 1] === "!") { - error(Diagnostics.can_only_be_used_at_the_start_of_a_file); + error2(Diagnostics.can_only_be_used_at_the_start_of_a_file); pos++; return token = 0 /* Unknown */; } @@ -10651,7 +10682,7 @@ ${lanes.join("\n")} scanIdentifier(charAfterHash, languageVersion); } else { tokenValue = "#"; - error(Diagnostics.Invalid_character, pos++, charSize(ch)); + error2(Diagnostics.Invalid_character, pos++, charSize(ch)); } return token = 81 /* PrivateIdentifier */; default: @@ -10667,7 +10698,7 @@ ${lanes.join("\n")} continue; } const size = charSize(ch); - error(Diagnostics.Invalid_character, pos, size); + error2(Diagnostics.Invalid_character, pos, size); pos += size; return token = 0 /* Unknown */; } @@ -10733,13 +10764,13 @@ ${lanes.join("\n")} while (true) { if (p >= end) { tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_regular_expression_literal); + error2(Diagnostics.Unterminated_regular_expression_literal); break; } const ch = text.charCodeAt(p); if (isLineBreak(ch)) { tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_regular_expression_literal); + error2(Diagnostics.Unterminated_regular_expression_literal); break; } if (inEscape) { @@ -10851,16 +10882,16 @@ ${lanes.join("\n")} } if (char === 60 /* lessThan */) { if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); return token = 7 /* ConflictMarkerTrivia */; } break; } if (char === 62 /* greaterThan */) { - error(Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); + error2(Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); } if (char === 125 /* closeBrace */) { - error(Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); + error2(Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); } if (isLineBreak(char) && firstNonWhitespace === 0) { firstNonWhitespace = -1; @@ -11130,7 +11161,7 @@ ${lanes.join("\n")} as: 130 /* AsKeyword */, asserts: 131 /* AssertsKeyword */, assert: 132 /* AssertKeyword */, - bigint: 162 /* BigIntKeyword */, + bigint: 163 /* BigIntKeyword */, boolean: 136 /* BooleanKeyword */, break: 83 /* BreakKeyword */, case: 84 /* CaseKeyword */, @@ -11151,7 +11182,7 @@ ${lanes.join("\n")} false: 97 /* FalseKeyword */, finally: 98 /* FinallyKeyword */, for: 99 /* ForKeyword */, - from: 160 /* FromKeyword */, + from: 161 /* FromKeyword */, function: 100 /* FunctionKeyword */, get: 139 /* GetKeyword */, if: 101 /* IfKeyword */, @@ -11176,11 +11207,11 @@ ${lanes.join("\n")} private: 123 /* PrivateKeyword */, protected: 124 /* ProtectedKeyword */, public: 125 /* PublicKeyword */, - override: 163 /* OverrideKeyword */, + override: 164 /* OverrideKeyword */, out: 147 /* OutKeyword */, readonly: 148 /* ReadonlyKeyword */, require: 149 /* RequireKeyword */, - global: 161 /* GlobalKeyword */, + global: 162 /* GlobalKeyword */, return: 107 /* ReturnKeyword */, satisfies: 152 /* SatisfiesKeyword */, set: 153 /* SetKeyword */, @@ -11198,6 +11229,7 @@ ${lanes.join("\n")} undefined: 157 /* UndefinedKeyword */, unique: 158 /* UniqueKeyword */, unknown: 159 /* UnknownKeyword */, + using: 160 /* UsingKeyword */, var: 115 /* VarKeyword */, void: 116 /* VoidKeyword */, while: 117 /* WhileKeyword */, @@ -11205,7 +11237,7 @@ ${lanes.join("\n")} yield: 127 /* YieldKeyword */, async: 134 /* AsyncKeyword */, await: 135 /* AwaitKeyword */, - of: 164 /* OfKeyword */ + of: 165 /* OfKeyword */ }; textToKeyword = new Map(Object.entries(textToKeywordObj)); textToToken = new Map(Object.entries({ @@ -11427,16 +11459,16 @@ ${lanes.join("\n")} ); } function getTypeParameterOwner(d) { - if (d && d.kind === 167 /* TypeParameter */) { + if (d && d.kind === 168 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 263 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 264 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent2) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 175 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -11462,14 +11494,14 @@ ${lanes.join("\n")} node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 259 /* VariableDeclaration */) { + if (node.kind === 260 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 260 /* VariableDeclarationList */) { + if (node && node.kind === 261 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 242 /* VariableStatement */) { + if (node && node.kind === 243 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -11481,11 +11513,14 @@ ${lanes.join("\n")} return getCombinedFlags(node, getEffectiveModifierFlagsAlwaysIncludeJSDoc); } function getCombinedNodeFlags(node) { - return getCombinedFlags(node, (n) => n.flags); + return getCombinedFlags(node, getNodeFlags); + } + function getNodeFlags(node) { + return node.flags; } function validateLocaleAndSetLanguage(locale, sys2, errors) { const lowerCaseLocale = locale.toLowerCase(); - const matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(lowerCaseLocale); + const matchResult = /^([a-z]+)([_-]([a-z]+))?$/.exec(lowerCaseLocale); if (!matchResult) { if (errors) { errors.push(createCompilerDiagnostic(Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp")); @@ -11558,7 +11593,7 @@ ${lanes.join("\n")} return void 0; } function isParseTreeNode(node) { - return (node.flags & 8 /* Synthesized */) === 0; + return (node.flags & 16 /* Synthesized */) === 0; } function getParseTreeNode(node, nodeTest) { if (node === void 0 || isParseTreeNode(node)) { @@ -11601,30 +11636,30 @@ ${lanes.join("\n")} return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 225 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { + if (expr.kind === 226 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return expr.name; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 216 /* ParenthesizedExpression */: { + case 217 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 255 /* LabeledStatement */: { + case 256 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -11655,16 +11690,16 @@ ${lanes.join("\n")} switch (declaration.kind) { case 80 /* Identifier */: return declaration; - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: { + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 165 /* QualifiedName */) { + if (name.kind === 166 /* QualifiedName */) { return name.right; } break; } - case 212 /* CallExpression */: - case 225 /* BinaryExpression */: { + case 213 /* CallExpression */: + case 226 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -11680,15 +11715,15 @@ ${lanes.join("\n")} return void 0; } } - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 346 /* JSDocEnumTag */: + case 347 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -11935,10 +11970,10 @@ ${lanes.join("\n")} return getJSDocTags(node).filter((doc) => doc.kind === kind); } function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 327 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 328 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 330 /* JSDocLink */ ? "link" : link.kind === 331 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 331 /* JSDocLink */ ? "link" : link.kind === 332 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -11954,7 +11989,7 @@ ${lanes.join("\n")} return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 326 /* JSDoc */); + Debug.assert(node.parent.kind === 327 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -11982,20 +12017,20 @@ ${lanes.join("\n")} return node.kind === 80 /* Identifier */ || node.kind === 81 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 177 /* SetAccessor */ || node.kind === 176 /* GetAccessor */; + return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */; } function isPropertyAccessChain(node) { - return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isPropertyAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isElementAccessChain(node) { - return isElementAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isElementAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isCallChain(node) { - return isCallExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isCallExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */ || kind === 212 /* CallExpression */ || kind === 234 /* NonNullExpression */); + return !!(node.flags & 64 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 235 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -12007,7 +12042,7 @@ ${lanes.join("\n")} return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; + return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -12016,37 +12051,37 @@ ${lanes.join("\n")} return skipOuterExpressions(node, 8 /* PartiallyEmittedExpressions */); } function isNonNullChain(node) { - return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isNonNullExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 251 /* BreakStatement */ || node.kind === 250 /* ContinueStatement */; + return node.kind === 252 /* BreakStatement */ || node.kind === 251 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 279 /* NamespaceExport */ || node.kind === 278 /* NamedExports */; + return node.kind === 280 /* NamespaceExport */ || node.kind === 279 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 308 /* UnparsedText */: - case 309 /* UnparsedInternalText */: + case 309 /* UnparsedText */: + case 310 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 306 /* UnparsedPrologue */ || node.kind === 310 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 307 /* UnparsedPrologue */ || node.kind === 311 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 354 /* JSDocPropertyTag */ || node.kind === 347 /* JSDocParameterTag */; + return node.kind === 355 /* JSDocPropertyTag */ || node.kind === 348 /* JSDocParameterTag */; } function isNode(node) { return isNodeKind(node.kind); } function isNodeKind(kind) { - return kind >= 165 /* FirstNode */; + return kind >= 166 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 164 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -12062,11 +12097,11 @@ ${lanes.join("\n")} } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: case 14 /* RegularExpressionLiteral */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: return true; } return false; @@ -12086,23 +12121,23 @@ ${lanes.join("\n")} } function isTypeOnlyImportDeclaration(node) { switch (node.kind) { - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.isTypeOnly; - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: return node.isTypeOnly; } return false; } function isTypeOnlyExportDeclaration(node) { switch (node.kind) { - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause; - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return node.parent.isTypeOnly; } return false; @@ -12124,6 +12159,10 @@ ${lanes.join("\n")} var _a; return isPrivateIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0; } + function isFileLevelReservedGeneratedIdentifier(node) { + const flags = node.emitNode.autoGenerate.flags; + return !!(flags & 32 /* FileLevel */) && !!(flags & 16 /* Optimistic */) && !!(flags & 8 /* ReservedInNestedScopes */); + } function isPrivateIdentifierClassElementDeclaration(node) { return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name); } @@ -12146,7 +12185,7 @@ ${lanes.join("\n")} case 148 /* ReadonlyKeyword */: case 126 /* StaticKeyword */: case 147 /* OutKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return true; } return false; @@ -12155,22 +12194,22 @@ ${lanes.join("\n")} return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 163 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; + return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; } function isModifier(node) { return isModifierKind(node.kind); } function isEntityName(node) { const kind = node.kind; - return kind === 165 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 166 /* ComputedPropertyName */; + return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 205 /* ObjectBindingPattern */ || kind === 206 /* ArrayBindingPattern */; + return kind === 80 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -12186,13 +12225,13 @@ ${lanes.join("\n")} } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: return false; @@ -12200,14 +12239,14 @@ ${lanes.join("\n")} } function isFunctionLikeKind(kind) { switch (kind) { - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 183 /* FunctionType */: - case 323 /* JSDocFunctionType */: - case 184 /* ConstructorType */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 184 /* FunctionType */: + case 324 /* JSDocFunctionType */: + case 185 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -12218,22 +12257,22 @@ ${lanes.join("\n")} } function isClassElement(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 180 /* IndexSignature */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 239 /* SemicolonClassElement */; + return kind === 176 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 240 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */); + return node && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */); } function isAccessor(node) { - return node && (node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */); + return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -12241,10 +12280,10 @@ ${lanes.join("\n")} } function isNamedClassElement(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: return true; default: return false; @@ -12255,22 +12294,22 @@ ${lanes.join("\n")} } function isTypeElement(node) { const kind = node.kind; - return kind === 179 /* ConstructSignature */ || kind === 178 /* CallSignature */ || kind === 170 /* PropertySignature */ || kind === 172 /* MethodSignature */ || kind === 180 /* IndexSignature */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 304 /* SpreadAssignment */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 305 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return true; } return false; @@ -12278,23 +12317,23 @@ ${lanes.join("\n")} function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 206 /* ArrayBindingPattern */ || kind === 205 /* ObjectBindingPattern */; + return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 208 /* ArrayLiteralExpression */ || kind === 209 /* ObjectLiteralExpression */; + return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 207 /* BindingElement */ || kind === 231 /* OmittedExpression */; + return kind === 208 /* BindingElement */ || kind === 232 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: return true; } return false; @@ -12307,40 +12346,40 @@ ${lanes.join("\n")} } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 205 /* ObjectBindingPattern */: - case 209 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 210 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return true; } return false; } function isArrayBindingOrAssignmentElement(node) { switch (node.kind) { - case 207 /* BindingElement */: - case 231 /* OmittedExpression */: - case 229 /* SpreadElement */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: + case 208 /* BindingElement */: + case 232 /* OmittedExpression */: + case 230 /* SpreadElement */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return true; } return isAssignmentExpression( @@ -12351,50 +12390,50 @@ ${lanes.join("\n")} } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 210 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */ || kind === 204 /* ImportType */; + return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 205 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 210 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */; + return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; } function isCallLikeExpression(node) { switch (node.kind) { - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 169 /* Decorator */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 170 /* Decorator */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 212 /* CallExpression */ || node.kind === 213 /* NewExpression */; + return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 227 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; + return kind === 228 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 213 /* NewExpression */: - case 212 /* CallExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: - case 214 /* TaggedTemplateExpression */: - case 208 /* ArrayLiteralExpression */: - case 216 /* ParenthesizedExpression */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 214 /* NewExpression */: + case 213 /* CallExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: + case 215 /* TaggedTemplateExpression */: + case 209 /* ArrayLiteralExpression */: + case 217 /* ParenthesizedExpression */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: case 80 /* Identifier */: case 81 /* PrivateIdentifier */: case 14 /* RegularExpressionLiteral */: @@ -12402,17 +12441,17 @@ ${lanes.join("\n")} case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 110 /* ThisKeyword */: case 112 /* TrueKeyword */: case 108 /* SuperKeyword */: - case 234 /* NonNullExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 235 /* MetaProperty */: + case 235 /* NonNullExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 236 /* MetaProperty */: case 102 /* ImportKeyword */: - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return true; default: return false; @@ -12423,13 +12462,13 @@ ${lanes.join("\n")} } function isUnaryExpressionKind(kind) { switch (kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: - case 219 /* DeleteExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 222 /* AwaitExpression */: - case 215 /* TypeAssertionExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 220 /* DeleteExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 223 /* AwaitExpression */: + case 216 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -12437,9 +12476,9 @@ ${lanes.join("\n")} } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return true; - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; default: return false; @@ -12450,7 +12489,7 @@ ${lanes.join("\n")} case 106 /* NullKeyword */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -12461,16 +12500,16 @@ ${lanes.join("\n")} } function isExpressionKind(kind) { switch (kind) { - case 226 /* ConditionalExpression */: - case 228 /* YieldExpression */: - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 229 /* SpreadElement */: - case 233 /* AsExpression */: - case 231 /* OmittedExpression */: - case 360 /* CommaListExpression */: - case 359 /* PartiallyEmittedExpression */: - case 237 /* SatisfiesExpression */: + case 227 /* ConditionalExpression */: + case 229 /* YieldExpression */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 230 /* SpreadElement */: + case 234 /* AsExpression */: + case 232 /* OmittedExpression */: + case 361 /* CommaListExpression */: + case 360 /* PartiallyEmittedExpression */: + case 238 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -12478,20 +12517,20 @@ ${lanes.join("\n")} } function isAssertionExpression(node) { const kind = node.kind; - return kind === 215 /* TypeAssertionExpression */ || kind === 233 /* AsExpression */; + return kind === 216 /* TypeAssertionExpression */ || kind === 234 /* AsExpression */; } function isNotEmittedOrPartiallyEmittedNode(node) { return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return true; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -12509,7 +12548,7 @@ ${lanes.join("\n")} return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); } function isForInOrOfStatement(node) { - return node.kind === 248 /* ForInStatement */ || node.kind === 249 /* ForOfStatement */; + return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -12522,89 +12561,89 @@ ${lanes.join("\n")} } function isModuleBody(node) { const kind = node.kind; - return kind === 267 /* ModuleBlock */ || kind === 266 /* ModuleDeclaration */ || kind === 80 /* Identifier */; + return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */ || kind === 80 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 267 /* ModuleBlock */ || kind === 266 /* ModuleDeclaration */; + return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 266 /* ModuleDeclaration */; + return kind === 80 /* Identifier */ || kind === 267 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 274 /* NamedImports */ || kind === 273 /* NamespaceImport */; + return kind === 275 /* NamedImports */ || kind === 274 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */ || node.kind === 265 /* EnumDeclaration */; + return node.kind === 267 /* ModuleDeclaration */ || node.kind === 266 /* EnumDeclaration */; } function canHaveSymbol(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 207 /* BindingElement */: - case 212 /* CallExpression */: - case 178 /* CallSignature */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 174 /* ClassStaticBlockDeclaration */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 211 /* ElementAccessExpression */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: - case 280 /* ExportSpecifier */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 208 /* BindingElement */: + case 213 /* CallExpression */: + case 179 /* CallSignature */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 175 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 212 /* ElementAccessExpression */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: + case 281 /* ExportSpecifier */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: case 80 /* Identifier */: - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: - case 323 /* JSDocFunctionType */: - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: - case 329 /* JSDocSignature */: - case 352 /* JSDocTypedefTag */: - case 328 /* JSDocTypeLiteral */: - case 290 /* JsxAttribute */: - case 291 /* JsxAttributes */: - case 292 /* JsxSpreadAttribute */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 201 /* NamedTupleMember */: - case 279 /* NamespaceExport */: - case 269 /* NamespaceExportDeclaration */: - case 273 /* NamespaceImport */: - case 213 /* NewExpression */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: + case 324 /* JSDocFunctionType */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 330 /* JSDocSignature */: + case 353 /* JSDocTypedefTag */: + case 329 /* JSDocTypeLiteral */: + case 291 /* JsxAttribute */: + case 292 /* JsxAttributes */: + case 293 /* JsxSpreadAttribute */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 202 /* NamedTupleMember */: + case 280 /* NamespaceExport */: + case 270 /* NamespaceExportDeclaration */: + case 274 /* NamespaceImport */: + case 214 /* NewExpression */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: - case 209 /* ObjectLiteralExpression */: - case 168 /* Parameter */: - case 210 /* PropertyAccessExpression */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 311 /* SourceFile */: - case 304 /* SpreadAssignment */: + case 210 /* ObjectLiteralExpression */: + case 169 /* Parameter */: + case 211 /* PropertyAccessExpression */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 312 /* SourceFile */: + case 305 /* SpreadAssignment */: case 11 /* StringLiteral */: - case 264 /* TypeAliasDeclaration */: - case 186 /* TypeLiteral */: - case 167 /* TypeParameter */: - case 259 /* VariableDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 187 /* TypeLiteral */: + case 168 /* TypeParameter */: + case 260 /* VariableDeclaration */: return true; default: return false; @@ -12612,53 +12651,53 @@ ${lanes.join("\n")} } function canHaveLocals(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 240 /* Block */: - case 178 /* CallSignature */: - case 268 /* CaseBlock */: - case 298 /* CatchClause */: - case 174 /* ClassStaticBlockDeclaration */: - case 193 /* ConditionalType */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: - case 180 /* IndexSignature */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 352 /* JSDocTypedefTag */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 177 /* SetAccessor */: - case 311 /* SourceFile */: - case 264 /* TypeAliasDeclaration */: + case 219 /* ArrowFunction */: + case 241 /* Block */: + case 179 /* CallSignature */: + case 269 /* CaseBlock */: + case 299 /* CatchClause */: + case 175 /* ClassStaticBlockDeclaration */: + case 194 /* ConditionalType */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: + case 181 /* IndexSignature */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 353 /* JSDocTypedefTag */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 178 /* SetAccessor */: + case 312 /* SourceFile */: + case 265 /* TypeAliasDeclaration */: return true; default: return false; } } function isDeclarationKind(kind) { - return kind === 218 /* ArrowFunction */ || kind === 207 /* BindingElement */ || kind === 262 /* ClassDeclaration */ || kind === 230 /* ClassExpression */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 175 /* Constructor */ || kind === 265 /* EnumDeclaration */ || kind === 305 /* EnumMember */ || kind === 280 /* ExportSpecifier */ || kind === 261 /* FunctionDeclaration */ || kind === 217 /* FunctionExpression */ || kind === 176 /* GetAccessor */ || kind === 272 /* ImportClause */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 275 /* ImportSpecifier */ || kind === 263 /* InterfaceDeclaration */ || kind === 290 /* JsxAttribute */ || kind === 173 /* MethodDeclaration */ || kind === 172 /* MethodSignature */ || kind === 266 /* ModuleDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 273 /* NamespaceImport */ || kind === 279 /* NamespaceExport */ || kind === 168 /* Parameter */ || kind === 302 /* PropertyAssignment */ || kind === 171 /* PropertyDeclaration */ || kind === 170 /* PropertySignature */ || kind === 177 /* SetAccessor */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 264 /* TypeAliasDeclaration */ || kind === 167 /* TypeParameter */ || kind === 259 /* VariableDeclaration */ || kind === 352 /* JSDocTypedefTag */ || kind === 344 /* JSDocCallbackTag */ || kind === 354 /* JSDocPropertyTag */; + return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 176 /* Constructor */ || kind === 266 /* EnumDeclaration */ || kind === 306 /* EnumMember */ || kind === 281 /* ExportSpecifier */ || kind === 262 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 273 /* ImportClause */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 276 /* ImportSpecifier */ || kind === 264 /* InterfaceDeclaration */ || kind === 291 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 267 /* ModuleDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 274 /* NamespaceImport */ || kind === 280 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 303 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 265 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 260 /* VariableDeclaration */ || kind === 353 /* JSDocTypedefTag */ || kind === 345 /* JSDocCallbackTag */ || kind === 355 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 261 /* FunctionDeclaration */ || kind === 281 /* MissingDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 269 /* NamespaceExportDeclaration */; + return kind === 262 /* FunctionDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 270 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 251 /* BreakStatement */ || kind === 250 /* ContinueStatement */ || kind === 258 /* DebuggerStatement */ || kind === 245 /* DoStatement */ || kind === 243 /* ExpressionStatement */ || kind === 241 /* EmptyStatement */ || kind === 248 /* ForInStatement */ || kind === 249 /* ForOfStatement */ || kind === 247 /* ForStatement */ || kind === 244 /* IfStatement */ || kind === 255 /* LabeledStatement */ || kind === 252 /* ReturnStatement */ || kind === 254 /* SwitchStatement */ || kind === 256 /* ThrowStatement */ || kind === 257 /* TryStatement */ || kind === 242 /* VariableStatement */ || kind === 246 /* WhileStatement */ || kind === 253 /* WithStatement */ || kind === 358 /* NotEmittedStatement */; + return kind === 252 /* BreakStatement */ || kind === 251 /* ContinueStatement */ || kind === 259 /* DebuggerStatement */ || kind === 246 /* DoStatement */ || kind === 244 /* ExpressionStatement */ || kind === 242 /* EmptyStatement */ || kind === 249 /* ForInStatement */ || kind === 250 /* ForOfStatement */ || kind === 248 /* ForStatement */ || kind === 245 /* IfStatement */ || kind === 256 /* LabeledStatement */ || kind === 253 /* ReturnStatement */ || kind === 255 /* SwitchStatement */ || kind === 257 /* ThrowStatement */ || kind === 258 /* TryStatement */ || kind === 243 /* VariableStatement */ || kind === 247 /* WhileStatement */ || kind === 254 /* WithStatement */ || kind === 359 /* NotEmittedStatement */; } function isDeclaration(node) { - if (node.kind === 167 /* TypeParameter */) { - return node.parent && node.parent.kind !== 351 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 168 /* TypeParameter */) { + return node.parent && node.parent.kind !== 352 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -12673,10 +12712,10 @@ ${lanes.join("\n")} return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 240 /* Block */) + if (node.kind !== 241 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 257 /* TryStatement */ || node.parent.kind === 298 /* CatchClause */) { + if (node.parent.kind === 258 /* TryStatement */ || node.parent.kind === 299 /* CatchClause */) { return false; } } @@ -12684,50 +12723,50 @@ ${lanes.join("\n")} } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 240 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 241 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 282 /* ExternalModuleReference */ || kind === 165 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 283 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 210 /* PropertyAccessExpression */ || kind === 294 /* JsxNamespacedName */; + return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 211 /* PropertyAccessExpression */ || kind === 295 /* JsxNamespacedName */; } function isJsxChild(node) { const kind = node.kind; - return kind === 283 /* JsxElement */ || kind === 293 /* JsxExpression */ || kind === 284 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 287 /* JsxFragment */; + return kind === 284 /* JsxElement */ || kind === 294 /* JsxExpression */ || kind === 285 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 288 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 290 /* JsxAttribute */ || kind === 292 /* JsxSpreadAttribute */; + return kind === 291 /* JsxAttribute */ || kind === 293 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 11 /* StringLiteral */ || kind === 293 /* JsxExpression */; + return kind === 11 /* StringLiteral */ || kind === 294 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 285 /* JsxOpeningElement */ || kind === 284 /* JsxSelfClosingElement */; + return kind === 286 /* JsxOpeningElement */ || kind === 285 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 295 /* CaseClause */ || kind === 296 /* DefaultClause */; + return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 315 /* FirstJSDocNode */ && node.kind <= 356 /* LastJSDocNode */; + return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 357 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 326 /* JSDoc */ || node.kind === 325 /* JSDocNamepathType */ || node.kind === 327 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 327 /* JSDoc */ || node.kind === 326 /* JSDocNamepathType */ || node.kind === 328 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 333 /* FirstJSDocTagNode */ && node.kind <= 356 /* LastJSDocTagNode */; + return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <= 357 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 177 /* SetAccessor */; + return node.kind === 178 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 176 /* GetAccessor */; + return node.kind === 177 /* GetAccessor */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) @@ -12743,22 +12782,22 @@ ${lanes.join("\n")} } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: - case 305 /* EnumMember */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: + case 306 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 290 /* JsxAttribute */ || node.kind === 292 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 291 /* JsxAttribute */ || node.kind === 293 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 182 /* TypeReference */ || node.kind === 232 /* ExpressionWithTypeArguments */; + return node.kind === 183 /* TypeReference */ || node.kind === 233 /* ExpressionWithTypeArguments */; } function guessIndentation(lines) { let indentation = MAX_SMI_X86; @@ -12785,7 +12824,7 @@ ${lanes.join("\n")} return node.kind === 11 /* StringLiteral */ || node.kind === 15 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 330 /* JSDocLink */ || node.kind === 331 /* JSDocLinkCode */ || node.kind === 332 /* JSDocLinkPlain */; + return node.kind === 331 /* JSDocLink */ || node.kind === 332 /* JSDocLinkCode */ || node.kind === 333 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -12793,7 +12832,7 @@ ${lanes.join("\n")} } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 324 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 325 /* JSDocVariadicType */; } var unchangedTextChangeRange, supportedLocaleDirectories, MAX_SMI_X86; var init_utilitiesPublic = __esm({ @@ -13015,19 +13054,19 @@ ${lanes.join("\n")} } function containsParseError(node) { aggregateChildData(node); - return (node.flags & 524288 /* ThisNodeOrAnySubNodesHasError */) !== 0; + return (node.flags & 1048576 /* ThisNodeOrAnySubNodesHasError */) !== 0; } function aggregateChildData(node) { - if (!(node.flags & 1048576 /* HasAggregatedChildData */)) { - const thisNodeOrAnySubNodesHasError = (node.flags & 131072 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); + if (!(node.flags & 2097152 /* HasAggregatedChildData */)) { + const thisNodeOrAnySubNodesHasError = (node.flags & 262144 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); if (thisNodeOrAnySubNodesHasError) { - node.flags |= 524288 /* ThisNodeOrAnySubNodesHasError */; + node.flags |= 1048576 /* ThisNodeOrAnySubNodesHasError */; } - node.flags |= 1048576 /* HasAggregatedChildData */; + node.flags |= 2097152 /* HasAggregatedChildData */; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 311 /* SourceFile */) { + while (node && node.kind !== 312 /* SourceFile */) { node = node.parent; } return node; @@ -13040,11 +13079,11 @@ ${lanes.join("\n")} } function isStatementWithLocals(node) { switch (node.kind) { - case 240 /* Block */: - case 268 /* CaseBlock */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return true; } return false; @@ -13203,7 +13242,7 @@ ${lanes.join("\n")} if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 357 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 358 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return skipTrivia( @@ -13718,11 +13757,11 @@ ${lanes.join("\n")} return getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); } function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 3 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclarationOrBindingElement(declaration); + return (getCombinedNodeFlags(declaration) & 7 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclarationOrBindingElement(declaration); } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 259 /* VariableDeclaration */ && node.parent.kind === 298 /* CatchClause */; + return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 11 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -13740,22 +13779,22 @@ ${lanes.join("\n")} return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 266 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 267 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 311 /* SourceFile */ || node.kind === 266 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 312 /* SourceFile */ || node.kind === 267 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { - return !!(module2.flags & 1024 /* GlobalAugmentation */); + return !!(module2.flags & 2048 /* GlobalAugmentation */); } function isExternalModuleAugmentation(node) { return isAmbientModule(node) && isModuleAugmentationExternal(node); } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return isExternalModule(node.parent); - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -13798,28 +13837,28 @@ ${lanes.join("\n")} return false; } function isAmbientPropertyDeclaration(node) { - return !!(node.flags & 16777216 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); + return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); } function isBlockScope(node, parentNode) { switch (node.kind) { - case 311 /* SourceFile */: - case 268 /* CaseBlock */: - case 298 /* CatchClause */: - case 266 /* ModuleDeclaration */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 171 /* PropertyDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: + case 312 /* SourceFile */: + case 269 /* CaseBlock */: + case 299 /* CatchClause */: + case 267 /* ModuleDeclaration */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 172 /* PropertyDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return true; - case 240 /* Block */: + case 241 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; @@ -13827,9 +13866,9 @@ ${lanes.join("\n")} function isDeclarationWithTypeParameters(node) { Debug.type(node); switch (node.kind) { - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: - case 329 /* JSDocSignature */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 330 /* JSDocSignature */: return true; default: assertType(node); @@ -13839,25 +13878,25 @@ ${lanes.join("\n")} function isDeclarationWithTypeParameterChildren(node) { Debug.type(node); switch (node.kind) { - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 323 /* JSDocFunctionType */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 351 /* JSDocTemplateTag */: - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 324 /* JSDocFunctionType */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 352 /* JSDocTemplateTag */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: assertType(node); @@ -13866,8 +13905,8 @@ ${lanes.join("\n")} } function isAnyImportSyntax(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: return true; default: return false; @@ -13878,15 +13917,15 @@ ${lanes.join("\n")} } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 242 /* VariableStatement */: - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 243 /* VariableStatement */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: return true; default: return false; @@ -13898,6 +13937,9 @@ ${lanes.join("\n")} function isAnyImportOrReExport(node) { return isAnyImportSyntax(node) || isExportDeclaration(node); } + function getEnclosingContainer(node) { + return findAncestor(node.parent, (n) => !!(getContainerFlags(n) & 1 /* IsContainer */)); + } function getEnclosingBlockScopeContainer(node) { return findAncestor(node.parent, (current) => isBlockScope(current, current.parent)); } @@ -13915,7 +13957,7 @@ ${lanes.join("\n")} return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 166 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a; @@ -13927,11 +13969,11 @@ ${lanes.join("\n")} case 9 /* NumericLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -13947,17 +13989,17 @@ ${lanes.join("\n")} case 81 /* PrivateIdentifier */: case 80 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 317 /* JSDocMemberName */: + case 318 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return entityNameToString(name.namespace) + ":" + entityNameToString(name.name); default: return Debug.assertNever(name); @@ -14063,7 +14105,7 @@ ${lanes.join("\n")} } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 240 /* Block */) { + if (node.body && node.body.kind === 241 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -14075,7 +14117,7 @@ ${lanes.join("\n")} function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 311 /* SourceFile */: { + case 312 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -14087,43 +14129,43 @@ ${lanes.join("\n")} } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 264 /* TypeAliasDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 273 /* NamespaceImport */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 265 /* TypeAliasDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 274 /* NamespaceImport */: errorNode = node.name; break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: { + case 296 /* CaseClause */: + case 297 /* DefaultClause */: { const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); } - case 252 /* ReturnStatement */: - case 228 /* YieldExpression */: { + case 253 /* ReturnStatement */: + case 229 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 237 /* SatisfiesExpression */: { + case 238 /* SatisfiesExpression */: { const pos2 = skipTrivia(sourceFile.text, node.expression.end); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 356 /* JSDocSatisfiesTag */: { + case 357 /* JSDocSatisfiesTag */: { const pos2 = skipTrivia(sourceFile.text, node.tagName.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } @@ -14155,17 +14197,23 @@ ${lanes.join("\n")} function isDeclarationReadonly(declaration) { return !!(getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); } + function isVarAwaitUsing(node) { + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 6 /* AwaitUsing */; + } + function isVarUsing(node) { + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 4 /* Using */; + } function isVarConst(node) { - return !!(getCombinedNodeFlags(node) & 2 /* Const */); + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 2 /* Const */; } function isLet(node) { - return !!(getCombinedNodeFlags(node) & 1 /* Let */); + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 1 /* Let */; } function isSuperCall(n) { - return n.kind === 212 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; + return n.kind === 213 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 212 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */; + return n.kind === 213 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */; } function isImportMeta(n) { return isMetaProperty(n) && n.keywordToken === 102 /* ImportKeyword */ && n.name.escapedText === "meta"; @@ -14174,7 +14222,7 @@ ${lanes.join("\n")} return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 243 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; + return node.kind === 244 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -14192,18 +14240,18 @@ ${lanes.join("\n")} return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 168 /* Parameter */ || node.kind === 167 /* TypeParameter */ || node.kind === 217 /* FunctionExpression */ || node.kind === 218 /* ArrowFunction */ || node.kind === 216 /* ParenthesizedExpression */ || node.kind === 259 /* VariableDeclaration */ || node.kind === 280 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 260 /* VariableDeclaration */ || node.kind === 281 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } function isPartOfTypeNode(node) { - if (181 /* FirstTypeNode */ <= node.kind && node.kind <= 204 /* LastTypeNode */) { + if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) { return true; } switch (node.kind) { case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 154 /* StringKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: @@ -14213,64 +14261,64 @@ ${lanes.join("\n")} case 146 /* NeverKeyword */: return true; case 116 /* VoidKeyword */: - return node.parent.kind !== 221 /* VoidExpression */; - case 232 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 222 /* VoidExpression */; + case 233 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 167 /* TypeParameter */: - return node.parent.kind === 199 /* MappedType */ || node.parent.kind === 194 /* InferType */; + case 168 /* TypeParameter */: + return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */; case 80 /* Identifier */: - if (node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 80 /* Identifier */ || node.kind === 165 /* QualifiedName */ || node.kind === 210 /* PropertyAccessExpression */, + node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 165 /* QualifiedName */: - case 210 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: case 110 /* ThisKeyword */: { const { parent: parent2 } = node; - if (parent2.kind === 185 /* TypeQuery */) { + if (parent2.kind === 186 /* TypeQuery */) { return false; } - if (parent2.kind === 204 /* ImportType */) { + if (parent2.kind === 205 /* ImportType */) { return !parent2.isTypeOf; } - if (181 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 204 /* LastTypeNode */) { + if (182 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 205 /* LastTypeNode */) { return true; } switch (parent2.kind) { - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isHeritageClause(parent2.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent2); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return node === parent2.constraint; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return node === parent2.constraint; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 168 /* Parameter */: - case 259 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 169 /* Parameter */: + case 260 /* VariableDeclaration */: return node === parent2.type; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return node === parent2.type; - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return node === parent2.type; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return node === parent2.type; - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: return contains(parent2.typeArguments, node); } } @@ -14290,23 +14338,23 @@ ${lanes.join("\n")} return traverse(body); function traverse(node) { switch (node.kind) { - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitor(node); - case 268 /* CaseBlock */: - case 240 /* Block */: - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 253 /* WithStatement */: - case 254 /* SwitchStatement */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 255 /* LabeledStatement */: - case 257 /* TryStatement */: - case 298 /* CatchClause */: + case 269 /* CaseBlock */: + case 241 /* Block */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 254 /* WithStatement */: + case 255 /* SwitchStatement */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 256 /* LabeledStatement */: + case 258 /* TryStatement */: + case 299 /* CatchClause */: return forEachChild(node, traverse); } } @@ -14315,21 +14363,21 @@ ${lanes.join("\n")} return traverse(body); function traverse(node) { switch (node.kind) { - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 265 /* EnumDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -14340,9 +14388,9 @@ ${lanes.join("\n")} } } function getRestParameterElementType(node) { - if (node && node.kind === 187 /* ArrayType */) { + if (node && node.kind === 188 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 182 /* TypeReference */) { + } else if (node && node.kind === 183 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -14350,26 +14398,26 @@ ${lanes.join("\n")} } function getMembersOfDeclaration(node) { switch (node.kind) { - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 186 /* TypeLiteral */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 187 /* TypeLiteral */: return node.members; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 207 /* BindingElement */: - case 305 /* EnumMember */: - case 168 /* Parameter */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 303 /* ShorthandPropertyAssignment */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 306 /* EnumMember */: + case 169 /* Parameter */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 304 /* ShorthandPropertyAssignment */: + case 260 /* VariableDeclaration */: return true; } } @@ -14379,7 +14427,7 @@ ${lanes.join("\n")} return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 260 /* VariableDeclarationList */ && node.parent.parent.kind === 242 /* VariableStatement */; + return node.parent.kind === 261 /* VariableDeclarationList */ && node.parent.parent.kind === 243 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -14396,13 +14444,13 @@ ${lanes.join("\n")} } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return true; } return false; @@ -14412,20 +14460,20 @@ ${lanes.join("\n")} if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 255 /* LabeledStatement */) { + if (node.statement.kind !== 256 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 240 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 241 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 173 /* MethodDeclaration */ && node.parent.kind === 209 /* ObjectLiteralExpression */; + return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 173 /* MethodDeclaration */ || node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */) && (node.parent.kind === 209 /* ObjectLiteralExpression */ || node.parent.kind === 230 /* ClassExpression */); + return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 231 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -14480,64 +14528,68 @@ ${lanes.join("\n")} function getContainingFunctionOrClassStaticBlock(node) { return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration); } + function getContainingClassExcludingClassDecorators(node) { + const decorator = findAncestor(node.parent, (n) => isClassLike(n) ? "quit" : isDecorator(n)); + return decorator && isClassLike(decorator.parent) ? getContainingClass(decorator.parent) : getContainingClass(decorator ?? node); + } function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) { - Debug.assert(node.kind !== 311 /* SourceFile */); + Debug.assert(node.kind !== 312 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) { return node; } node = node.parent.parent; break; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 266 /* ModuleDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 265 /* EnumDeclaration */: - case 311 /* SourceFile */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 267 /* ModuleDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 266 /* EnumDeclaration */: + case 312 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 171 /* PropertyDeclaration */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 172 /* PropertyDeclaration */: return true; - case 240 /* Block */: + case 241 /* Block */: switch (node.parent.kind) { - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -14569,9 +14621,9 @@ ${lanes.join("\n")} ); if (container) { switch (container.kind) { - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return container; } } @@ -14584,26 +14636,26 @@ ${lanes.join("\n")} return void 0; } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: node = node.parent; break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: return node; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -14613,14 +14665,14 @@ ${lanes.join("\n")} } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 217 /* FunctionExpression */ || func.kind === 218 /* ArrowFunction */) { + if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) { let prev = func; let parent2 = func.parent; - while (parent2.kind === 216 /* ParenthesizedExpression */) { + while (parent2.kind === 217 /* ParenthesizedExpression */) { prev = parent2; parent2 = parent2.parent; } - if (parent2.kind === 212 /* CallExpression */ && parent2.expression === prev) { + if (parent2.kind === 213 /* CallExpression */ && parent2.expression === prev) { return parent2; } } @@ -14630,11 +14682,11 @@ ${lanes.join("\n")} } function isSuperProperty(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a; @@ -14645,22 +14697,22 @@ ${lanes.join("\n")} } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 80 /* Identifier */: - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return node.tag; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -14671,20 +14723,20 @@ ${lanes.join("\n")} return false; } switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return true; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return !useLegacyDecorators; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2)); - case 168 /* Parameter */: + case 169 /* Parameter */: if (!useLegacyDecorators) return false; - return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 175 /* Constructor */ || parent2.kind === 173 /* MethodDeclaration */ || parent2.kind === 177 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 262 /* ClassDeclaration */; + return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 176 /* Constructor */ || parent2.kind === 174 /* MethodDeclaration */ || parent2.kind === 178 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 263 /* ClassDeclaration */; } return false; } @@ -14696,13 +14748,13 @@ ${lanes.join("\n")} } function childIsDecorated(useLegacyDecorators, node, parent2) { switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent2)); default: return false; @@ -14753,7 +14805,7 @@ ${lanes.join("\n")} } function isJSXTagName(node) { const { parent: parent2 } = node; - if (parent2.kind === 285 /* JsxOpeningElement */ || parent2.kind === 284 /* JsxSelfClosingElement */ || parent2.kind === 286 /* JsxClosingElement */) { + if (parent2.kind === 286 /* JsxOpeningElement */ || parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 287 /* JsxClosingElement */) { return parent2.tagName === node; } return false; @@ -14765,54 +14817,54 @@ ${lanes.join("\n")} case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: case 14 /* RegularExpressionLiteral */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 233 /* AsExpression */: - case 215 /* TypeAssertionExpression */: - case 237 /* SatisfiesExpression */: - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 220 /* TypeOfExpression */: - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: - case 225 /* BinaryExpression */: - case 226 /* ConditionalExpression */: - case 229 /* SpreadElement */: - case 227 /* TemplateExpression */: - case 231 /* OmittedExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: - case 228 /* YieldExpression */: - case 222 /* AwaitExpression */: - case 235 /* MetaProperty */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 234 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 238 /* SatisfiesExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 221 /* TypeOfExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 226 /* BinaryExpression */: + case 227 /* ConditionalExpression */: + case 230 /* SpreadElement */: + case 228 /* TemplateExpression */: + case 232 /* OmittedExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: + case 229 /* YieldExpression */: + case 223 /* AwaitExpression */: + case 236 /* MetaProperty */: return true; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); - case 165 /* QualifiedName */: - while (node.parent.kind === 165 /* QualifiedName */) { + case 166 /* QualifiedName */: + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 317 /* JSDocMemberName */: + return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 318 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); case 81 /* PrivateIdentifier */: return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 103 /* InKeyword */; case 80 /* Identifier */: - if (node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 9 /* NumericLiteral */: @@ -14828,64 +14880,64 @@ ${lanes.join("\n")} function isInExpressionContext(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 305 /* EnumMember */: - case 302 /* PropertyAssignment */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 306 /* EnumMember */: + case 303 /* PropertyAssignment */: + case 208 /* BindingElement */: return parent2.initializer === node; - case 243 /* ExpressionStatement */: - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 252 /* ReturnStatement */: - case 253 /* WithStatement */: - case 254 /* SwitchStatement */: - case 295 /* CaseClause */: - case 256 /* ThrowStatement */: + case 244 /* ExpressionStatement */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 253 /* ReturnStatement */: + case 254 /* WithStatement */: + case 255 /* SwitchStatement */: + case 296 /* CaseClause */: + case 257 /* ThrowStatement */: return parent2.expression === node; - case 247 /* ForStatement */: + case 248 /* ForStatement */: const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 260 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 260 /* VariableDeclarationList */ || forInStatement.expression === node; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInStatement.expression === node; + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return node === parent2.expression; - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return node === parent2.expression; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return node === parent2.expression; - case 169 /* Decorator */: - case 293 /* JsxExpression */: - case 292 /* JsxSpreadAttribute */: - case 304 /* SpreadAssignment */: + case 170 /* Decorator */: + case 294 /* JsxExpression */: + case 293 /* JsxSpreadAttribute */: + case 305 /* SpreadAssignment */: return true; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return parent2.expression === node && !isPartOfTypeNode(parent2); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return parent2.objectAssignmentInitializer === node; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return node === parent2.expression; default: return isExpressionNode(parent2); } } function isPartOfTypeQuery(node) { - while (node.kind === 165 /* QualifiedName */ || node.kind === 80 /* Identifier */) { + while (node.kind === 166 /* QualifiedName */ || node.kind === 80 /* Identifier */) { node = node.parent; } - return node.kind === 185 /* TypeQuery */; + return node.kind === 186 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 282 /* ExternalModuleReference */; + return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -14895,7 +14947,7 @@ ${lanes.join("\n")} return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 282 /* ExternalModuleReference */; + return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 283 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -14904,22 +14956,22 @@ ${lanes.join("\n")} return !isInJSFile(file); } function isInJSFile(node) { - return !!node && !!(node.flags & 262144 /* JavaScriptFile */); + return !!node && !!(node.flags & 524288 /* JavaScriptFile */); } function isInJsonFile(node) { - return !!node && !!(node.flags & 67108864 /* JsonFile */); + return !!node && !!(node.flags & 134217728 /* JsonFile */); } function isSourceFileNotJson(file) { return !isJsonSourceFile(file); } function isInJSDoc(node) { - return !!node && !!(node.flags & 8388608 /* JSDoc */); + return !!node && !!(node.flags & 16777216 /* JSDoc */); } function isJSDocIndexSignature(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 154 /* StringKeyword */ || node.typeArguments[0].kind === 150 /* NumberKeyword */); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 212 /* CallExpression */) { + if (callExpression.kind !== 213 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -14996,9 +15048,9 @@ ${lanes.join("\n")} function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 217 /* FunctionExpression */ || e.kind === 218 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 217 /* FunctionExpression */ || initializer.kind === 230 /* ClassExpression */ || initializer.kind === 218 /* ArrowFunction */) { + if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 231 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -15189,11 +15241,11 @@ ${lanes.join("\n")} return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 243 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 244 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; - if (!valueDeclaration || !(node.flags & 16777216 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 16777216 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) { + if (!valueDeclaration || !(node.flags & 33554432 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 33554432 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) { symbol.valueDeclaration = node; } } @@ -15202,29 +15254,29 @@ ${lanes.join("\n")} return false; } const decl = symbol.valueDeclaration; - return decl.kind === 261 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 262 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a, _b; switch (node.kind) { - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: return (_a = findAncestor(node.initializer, (node2) => isRequireCall( node2, /*requireStringLiteralLikeArgument*/ true ))) == null ? void 0 : _a.arguments[0]; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); - case 272 /* ImportClause */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 280 /* NamespaceExport */: return tryCast(node.parent.moduleSpecifier, isStringLiteralLike); - case 273 /* NamespaceImport */: - case 280 /* ExportSpecifier */: + case 274 /* NamespaceImport */: + case 281 /* ExportSpecifier */: return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); default: Debug.assertNever(node); @@ -15235,18 +15287,18 @@ ${lanes.join("\n")} } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: return node.parent; - case 282 /* ExternalModuleReference */: + case 283 /* ExternalModuleReference */: return node.parent.parent; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return isImportCall(node.parent) || isRequireCall( node.parent, /*requireStringLiteralLikeArgument*/ false ) ? node.parent : void 0; - case 200 /* LiteralType */: + case 201 /* LiteralType */: Debug.assert(isStringLiteral(node)); return tryCast(node.parent.parent, isImportTypeNode); default: @@ -15255,16 +15307,16 @@ ${lanes.join("\n")} } function getExternalModuleName(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: return node.moduleSpecifier; - case 270 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 282 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 204 /* ImportType */: + case 271 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 283 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 205 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return node.arguments[0]; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return node.name.kind === 11 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -15272,18 +15324,18 @@ ${lanes.join("\n")} } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return node; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 271 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 272 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -15300,13 +15352,13 @@ ${lanes.join("\n")} function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 168 /* Parameter */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 303 /* ShorthandPropertyAssignment */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 169 /* Parameter */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 304 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -15318,7 +15370,7 @@ ${lanes.join("\n")} return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 352 /* JSDocTypedefTag */ || node.kind === 344 /* JSDocCallbackTag */ || node.kind === 346 /* JSDocEnumTag */; + return node.kind === 353 /* JSDocTypedefTag */ || node.kind === 345 /* JSDocCallbackTag */ || node.kind === 347 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -15331,12 +15383,12 @@ ${lanes.join("\n")} } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return node.initializer; } } @@ -15344,26 +15396,26 @@ ${lanes.join("\n")} return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 266 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 267 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveFlowNode(node) { - if (node.kind >= 242 /* FirstStatement */ && node.kind <= 258 /* LastStatement */) { + if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */) { return true; } switch (node.kind) { case 80 /* Identifier */: case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 165 /* QualifiedName */: - case 235 /* MetaProperty */: - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: - case 207 /* BindingElement */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 166 /* QualifiedName */: + case 236 /* MetaProperty */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 208 /* BindingElement */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -15371,72 +15423,72 @@ ${lanes.join("\n")} } function canHaveJSDoc(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 240 /* Block */: - case 251 /* BreakStatement */: - case 178 /* CallSignature */: - case 295 /* CaseClause */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 174 /* ClassStaticBlockDeclaration */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 250 /* ContinueStatement */: - case 258 /* DebuggerStatement */: - case 245 /* DoStatement */: - case 211 /* ElementAccessExpression */: - case 241 /* EmptyStatement */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 241 /* Block */: + case 252 /* BreakStatement */: + case 179 /* CallSignature */: + case 296 /* CaseClause */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 175 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 251 /* ContinueStatement */: + case 259 /* DebuggerStatement */: + case 246 /* DoStatement */: + case 212 /* ElementAccessExpression */: + case 242 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: - case 280 /* ExportSpecifier */: - case 243 /* ExpressionStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: + case 281 /* ExportSpecifier */: + case 244 /* ExpressionStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: case 80 /* Identifier */: - case 244 /* IfStatement */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 255 /* LabeledStatement */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 201 /* NamedTupleMember */: - case 269 /* NamespaceExportDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 168 /* Parameter */: - case 216 /* ParenthesizedExpression */: - case 210 /* PropertyAccessExpression */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 252 /* ReturnStatement */: - case 239 /* SemicolonClassElement */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: - case 254 /* SwitchStatement */: - case 256 /* ThrowStatement */: - case 257 /* TryStatement */: - case 264 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: - case 259 /* VariableDeclaration */: - case 242 /* VariableStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: + case 245 /* IfStatement */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 256 /* LabeledStatement */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 202 /* NamedTupleMember */: + case 270 /* NamespaceExportDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 169 /* Parameter */: + case 217 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 253 /* ReturnStatement */: + case 240 /* SemicolonClassElement */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: + case 255 /* SwitchStatement */: + case 257 /* ThrowStatement */: + case 258 /* TryStatement */: + case 265 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 260 /* VariableDeclaration */: + case 243 /* VariableStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: return true; default: return false; @@ -15452,11 +15504,11 @@ ${lanes.join("\n")} if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -15476,7 +15528,7 @@ ${lanes.join("\n")} } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 302 /* PropertyAssignment */ || parent2.kind === 276 /* ExportAssignment */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 243 /* ExpressionStatement */ && node.kind === 210 /* PropertyAccessExpression */ || parent2.kind === 252 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { + if (parent2.kind === 303 /* PropertyAssignment */ || parent2.kind === 277 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { return parent2; } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */)) { return parent2.parent; @@ -15546,32 +15598,32 @@ ${lanes.join("\n")} let parent2 = node.parent; while (true) { switch (parent2.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const binaryOperator = parent2.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: const unaryOperator = parent2.operator; return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 216 /* ParenthesizedExpression */: - case 208 /* ArrayLiteralExpression */: - case 229 /* SpreadElement */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 209 /* ArrayLiteralExpression */: + case 230 /* SpreadElement */: + case 235 /* NonNullExpression */: node = parent2; break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: node = parent2.parent; break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { return 0 /* None */; } node = parent2.parent; break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (parent2.name === node) { return 0 /* None */; } @@ -15588,22 +15640,22 @@ ${lanes.join("\n")} } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 240 /* Block */: - case 242 /* VariableStatement */: - case 253 /* WithStatement */: - case 244 /* IfStatement */: - case 254 /* SwitchStatement */: - case 268 /* CaseBlock */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 255 /* LabeledStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 257 /* TryStatement */: - case 298 /* CatchClause */: + case 241 /* Block */: + case 243 /* VariableStatement */: + case 254 /* WithStatement */: + case 245 /* IfStatement */: + case 255 /* SwitchStatement */: + case 269 /* CaseBlock */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 256 /* LabeledStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 258 /* TryStatement */: + case 299 /* CatchClause */: return true; } return false; @@ -15618,14 +15670,14 @@ ${lanes.join("\n")} return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 195 /* ParenthesizedType */); + return walkUp(node, 196 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 216 /* ParenthesizedExpression */); + return walkUp(node, 217 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 195 /* ParenthesizedType */) { + while (node && node.kind === 196 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -15641,11 +15693,11 @@ ${lanes.join("\n")} return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 210 /* PropertyAccessExpression */ && node.kind !== 211 /* ElementAccessExpression */) { + if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 219 /* DeleteExpression */; + return node && node.kind === 220 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -15683,55 +15735,55 @@ ${lanes.join("\n")} } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent2 = node.parent; switch (parent2.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 305 /* EnumMember */: - case 302 /* PropertyAssignment */: - case 210 /* PropertyAccessExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 306 /* EnumMember */: + case 303 /* PropertyAssignment */: + case 211 /* PropertyAccessExpression */: return parent2.name === node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return parent2.right === node; - case 207 /* BindingElement */: - case 275 /* ImportSpecifier */: + case 208 /* BindingElement */: + case 276 /* ImportSpecifier */: return parent2.propertyName === node; - case 280 /* ExportSpecifier */: - case 290 /* JsxAttribute */: - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: + case 281 /* ExportSpecifier */: + case 291 /* JsxAttribute */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: return true; } return false; } function isAliasSymbolDeclaration(node) { - if (node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 269 /* NamespaceExportDeclaration */ || node.kind === 272 /* ImportClause */ && !!node.name || node.kind === 273 /* NamespaceImport */ || node.kind === 279 /* NamespaceExport */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 280 /* ExportSpecifier */ || node.kind === 276 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { + if (node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { return true; } return isInJSFile(node) && (isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isPropertyAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableExpression(node.parent.right)); } function getAliasDeclarationFromName(node) { switch (node.parent.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 273 /* NamespaceImport */: - case 280 /* ExportSpecifier */: - case 276 /* ExportAssignment */: - case 270 /* ImportEqualsDeclaration */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 274 /* NamespaceImport */: + case 281 /* ExportSpecifier */: + case 277 /* ExportAssignment */: + case 271 /* ImportEqualsDeclaration */: + case 280 /* NamespaceExport */: return node.parent; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 165 /* QualifiedName */); + } while (node.parent.kind === 166 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -15746,7 +15798,7 @@ ${lanes.join("\n")} return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 303 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 302 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 304 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 303 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -15797,7 +15849,7 @@ ${lanes.join("\n")} return void 0; } function isKeyword(token) { - return 83 /* FirstKeyword */ <= token && token <= 164 /* LastKeyword */; + return 83 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; } function isPunctuation(token) { return 19 /* FirstPunctuation */ <= token && token <= 79 /* LastPunctuation */; @@ -15806,7 +15858,7 @@ ${lanes.join("\n")} return isKeyword(token) || isPunctuation(token); } function isContextualKeyword(token) { - return 128 /* FirstContextualKeyword */ <= token && token <= 164 /* LastContextualKeyword */; + return 128 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); @@ -15835,13 +15887,13 @@ ${lanes.join("\n")} } let flags = 0 /* Normal */; switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -15854,10 +15906,10 @@ ${lanes.join("\n")} } function isAsyncFunction(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -15873,7 +15925,7 @@ ${lanes.join("\n")} return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 166 /* ComputedPropertyName */ || name.kind === 211 /* ElementAccessExpression */)) { + if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -15887,7 +15939,7 @@ ${lanes.join("\n")} case 11 /* StringLiteral */: case 9 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -15898,7 +15950,7 @@ ${lanes.join("\n")} return nameExpression.operand.text; } return void 0; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -15942,13 +15994,17 @@ ${lanes.join("\n")} function isAnonymousFunctionDefinition(node, cb) { node = skipOuterExpressions(node); switch (node.kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 231 /* ClassExpression */: + if (classHasDeclaredOrExplicitlyAssignedName(node)) { + return false; + } + break; + case 218 /* FunctionExpression */: if (node.name) { return false; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: break; default: return false; @@ -15957,19 +16013,19 @@ ${lanes.join("\n")} } function isNamedEvaluationSource(node) { switch (node.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return !isProtoSetter(node.name); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return !!node.objectAssignmentInitializer; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return isIdentifier(node.name) && !!node.initializer; - case 168 /* Parameter */: + case 169 /* Parameter */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return !!node.initializer; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 77 /* AmpersandAmpersandEqualsToken */: @@ -15978,7 +16034,7 @@ ${lanes.join("\n")} return isIdentifier(node.left); } break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return true; } return false; @@ -15987,18 +16043,18 @@ ${lanes.join("\n")} if (!isNamedEvaluationSource(node)) return false; switch (node.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb); - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isAnonymousFunctionDefinition(node.right, cb); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return isAnonymousFunctionDefinition(node.expression, cb); } } @@ -16007,17 +16063,17 @@ ${lanes.join("\n")} } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 168 /* Parameter */; + return root.kind === 169 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 207 /* BindingElement */) { + while (node.kind === 208 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 217 /* FunctionExpression */ || kind === 261 /* FunctionDeclaration */ || kind === 218 /* ArrowFunction */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 266 /* ModuleDeclaration */ || kind === 311 /* SourceFile */; + return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 262 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 267 /* ModuleDeclaration */ || kind === 312 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); @@ -16027,22 +16083,22 @@ ${lanes.join("\n")} } function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 213 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 213 /* NewExpression */: + case 214 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 223 /* PrefixUnaryExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 222 /* AwaitExpression */: - case 226 /* ConditionalExpression */: - case 228 /* YieldExpression */: + case 224 /* PrefixUnaryExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 223 /* AwaitExpression */: + case 227 /* ConditionalExpression */: + case 229 /* YieldExpression */: return 1 /* Right */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (operator) { case 43 /* AsteriskAsteriskToken */: case 64 /* EqualsToken */: @@ -16068,13 +16124,13 @@ ${lanes.join("\n")} } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 213 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 225 /* BinaryExpression */) { + if (expression.kind === 226 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 223 /* PrefixUnaryExpression */ || expression.kind === 224 /* PostfixUnaryExpression */) { + } else if (expression.kind === 224 /* PrefixUnaryExpression */ || expression.kind === 225 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -16082,15 +16138,15 @@ ${lanes.join("\n")} } function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return 0 /* Comma */; - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return 1 /* Spread */; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return 2 /* Yield */; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return 4 /* Conditional */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (operatorKind) { case 28 /* CommaToken */: return 0 /* Comma */; @@ -16114,27 +16170,27 @@ ${lanes.join("\n")} default: return getBinaryOperatorPrecedence(operatorKind); } - case 215 /* TypeAssertionExpression */: - case 234 /* NonNullExpression */: - case 223 /* PrefixUnaryExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 222 /* AwaitExpression */: + case 216 /* TypeAssertionExpression */: + case 235 /* NonNullExpression */: + case 224 /* PrefixUnaryExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 223 /* AwaitExpression */: return 16 /* Unary */; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return 17 /* Update */; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return 18 /* LeftHandSide */; - case 213 /* NewExpression */: + case 214 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 214 /* TaggedTemplateExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 235 /* MetaProperty */: + case 215 /* TaggedTemplateExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 236 /* MetaProperty */: return 19 /* Member */; - case 233 /* AsExpression */: - case 237 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 238 /* SatisfiesExpression */: return 11 /* Relational */; case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: @@ -16146,19 +16202,19 @@ ${lanes.join("\n")} case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 230 /* ClassExpression */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 231 /* ClassExpression */: case 14 /* RegularExpressionLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: - case 216 /* ParenthesizedExpression */: - case 231 /* OmittedExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: + case 228 /* TemplateExpression */: + case 217 /* ParenthesizedExpression */: + case 232 /* OmittedExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -16211,7 +16267,7 @@ ${lanes.join("\n")} function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return !!i.expression; case 12 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -16680,6 +16736,12 @@ ${lanes.join("\n")} function isThisIdentifier(node) { return !!node && node.kind === 80 /* Identifier */ && identifierIsThisKeyword(node); } + function isInTypeQuery(node) { + return !!findAncestor( + node, + (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit" + ); + } function isThisInTypeQuery(node) { if (!isThisIdentifier(node)) { return false; @@ -16687,7 +16749,7 @@ ${lanes.join("\n")} while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */; + return node.parent.kind === 186 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.escapedText === "this"; @@ -16699,9 +16761,9 @@ ${lanes.join("\n")} let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 176 /* GetAccessor */) { + if (accessor.kind === 177 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 177 /* SetAccessor */) { + } else if (accessor.kind === 178 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -16717,10 +16779,10 @@ ${lanes.join("\n")} } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 176 /* GetAccessor */ && !getAccessor) { + if (member.kind === 177 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 177 /* SetAccessor */ && !setAccessor) { + if (member.kind === 178 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -16752,7 +16814,7 @@ ${lanes.join("\n")} return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 326 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 327 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -16942,7 +17004,7 @@ ${lanes.join("\n")} return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 164 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -17001,7 +17063,7 @@ ${lanes.join("\n")} } function getSyntacticModifierFlagsNoCache(node) { let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */; - if (node.flags & 4 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { flags |= 1 /* Export */; } return flags; @@ -17041,13 +17103,13 @@ ${lanes.join("\n")} return 512 /* Async */; case 148 /* ReadonlyKeyword */: return 64 /* Readonly */; - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return 16384 /* Override */; case 103 /* InKeyword */: return 32768 /* In */; case 147 /* OutKeyword */: return 65536 /* Out */; - case 169 /* Decorator */: + case 170 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -17104,7 +17166,7 @@ ${lanes.join("\n")} true )) { const kind = node.left.kind; - return kind === 209 /* ObjectLiteralExpression */ || kind === 208 /* ArrayLiteralExpression */; + return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; } return false; } @@ -17118,12 +17180,12 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 80 /* Identifier */); return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 80 /* Identifier */); @@ -17131,7 +17193,7 @@ ${lanes.join("\n")} } } function isDottedName(node) { - return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 235 /* MetaProperty */ || node.kind === 210 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 216 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 236 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -17158,7 +17220,7 @@ ${lanes.join("\n")} return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; @@ -17167,10 +17229,10 @@ ${lanes.join("\n")} return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } function isEmptyObjectLiteral(expression) { - return expression.kind === 209 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 208 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -17436,8 +17498,8 @@ ${lanes.join("\n")} const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 265 /* EnumDeclaration */: - case 266 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -17490,24 +17552,24 @@ ${lanes.join("\n")} function accessKind(node) { const { parent: parent2 } = node; switch (parent2 == null ? void 0 : parent2.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return accessKind(parent2); - case 224 /* PostfixUnaryExpression */: - case 223 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const { operator } = parent2; return operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const { left, operatorToken } = parent2; return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 64 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 302 /* PropertyAssignment */: { + case 303 /* PropertyAssignment */: { const parentAccess = accessKind(parent2.parent); return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return accessKind(parent2); default: return 0 /* Read */; @@ -17620,16 +17682,16 @@ ${lanes.join("\n")} return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 181 /* FirstTypeNode */ && kind <= 204 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 232 /* ExpressionWithTypeArguments */ || kind === 318 /* JSDocAllType */ || kind === 319 /* JSDocUnknownType */ || kind === 320 /* JSDocNullableType */ || kind === 321 /* JSDocNonNullableType */ || kind === 322 /* JSDocOptionalType */ || kind === 323 /* JSDocFunctionType */ || kind === 324 /* JSDocVariadicType */; + return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 163 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 233 /* ExpressionWithTypeArguments */ || kind === 319 /* JSDocAllType */ || kind === 320 /* JSDocUnknownType */ || kind === 321 /* JSDocNullableType */ || kind === 322 /* JSDocNonNullableType */ || kind === 323 /* JSDocOptionalType */ || kind === 324 /* JSDocFunctionType */ || kind === 325 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 210 /* PropertyAccessExpression */ || node.kind === 211 /* ElementAccessExpression */; + return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 210 /* PropertyAccessExpression */) { + if (node.kind === 211 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 211 /* ElementAccessExpression */); + Debug.assert(node.kind === 212 /* ElementAccessExpression */); return node.argumentExpression; } function isBundleFileTextLike(section) { @@ -17642,7 +17704,7 @@ ${lanes.join("\n")} } } function isNamedImportsOrExports(node) { - return node.kind === 274 /* NamedImports */ || node.kind === 278 /* NamedExports */; + return node.kind === 275 /* NamedImports */ || node.kind === 279 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -17655,12 +17717,12 @@ ${lanes.join("\n")} return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 210 /* PropertyAccessExpression */) { + if (access.kind === 211 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 211 /* ElementAccessExpression */) { + } else if (access.kind === 212 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -17682,28 +17744,28 @@ ${lanes.join("\n")} function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: node = node.operand; continue; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: node = node.left; continue; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: node = node.condition; continue; - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: node = node.tag; continue; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 233 /* AsExpression */: - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: - case 234 /* NonNullExpression */: - case 359 /* PartiallyEmittedExpression */: - case 237 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 235 /* NonNullExpression */: + case 360 /* PartiallyEmittedExpression */: + case 238 /* SatisfiesExpression */: node = node.expression; continue; } @@ -18161,6 +18223,9 @@ ${lanes.join("\n")} function getUseDefineForClassFields(compilerOptions) { return compilerOptions.useDefineForClassFields === void 0 ? getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ : compilerOptions.useDefineForClassFields; } + function getEmitStandardClassFields(compilerOptions) { + return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */; + } function compilerOptionsAffectSemanticDiagnostics(newOptions, oldOptions) { return optionsHaveChanges(oldOptions, newOptions, semanticDiagnosticsOptionDeclarations); } @@ -18346,7 +18411,7 @@ ${lanes.join("\n")} function replaceWildcardCharacter(match, singleAsteriskRegexFragment) { return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match; } - function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { + function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) { path = normalizePath(path); currentDirectory = normalizePath(currentDirectory); const absolutePath = combinePaths(currentDirectory, path); @@ -18355,22 +18420,22 @@ ${lanes.join("\n")} includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"), excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"), - basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames) + basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2) }; } - function getRegexFromPattern(pattern, useCaseSensitiveFileNames) { - return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i"); + function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) { + return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i"); } - function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) { + function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) { path = normalizePath(path); currentDirectory = normalizePath(currentDirectory); - const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory); - const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames)); - const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames); - const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames); + const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory); + const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2)); + const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2); + const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2); const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]]; const visited = /* @__PURE__ */ new Map(); - const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames); + const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2); for (const basePath of patterns.basePaths) { visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); } @@ -18412,7 +18477,7 @@ ${lanes.join("\n")} } } } - function getBasePaths(path, includes, useCaseSensitiveFileNames) { + function getBasePaths(path, includes, useCaseSensitiveFileNames2) { const basePaths = [path]; if (includes) { const includeBasePaths = []; @@ -18420,9 +18485,9 @@ ${lanes.join("\n")} const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include)); includeBasePaths.push(getIncludeBasePath(absolute)); } - includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames)); + includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2)); for (const includeBasePath of includeBasePaths) { - if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames))) { + if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) { basePaths.push(includeBasePath); } } @@ -18781,39 +18846,39 @@ ${lanes.join("\n")} return success && result === 10 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); } function isValidTypeOnlyAliasUseSite(useSite) { - return !!(useSite.flags & 16777216 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); + return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); } function isShorthandPropertyNameUseSite(useSite) { return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 80 /* Identifier */ || node.kind === 210 /* PropertyAccessExpression */) { + while (node.kind === 80 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 263 /* InterfaceDeclaration */ || containerKind === 186 /* TypeLiteral */; + return containerKind === 264 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 80 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent2) => { switch (parent2.kind) { - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return true; - case 210 /* PropertyAccessExpression */: - case 232 /* ExpressionWithTypeArguments */: + case 211 /* PropertyAccessExpression */: + case 233 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 263 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 264 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -18925,20 +18990,20 @@ ${lanes.join("\n")} if (!node.parent) return void 0; switch (node.kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: const { parent: parent3 } = node; - return parent3.kind === 194 /* InferType */ ? void 0 : parent3.typeParameters; - case 168 /* Parameter */: + return parent3.kind === 195 /* InferType */ ? void 0 : parent3.typeParameters; + case 169 /* Parameter */: return node.parent.parameters; - case 203 /* TemplateLiteralTypeSpan */: + case 204 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return node.parent.templateSpans; - case 169 /* Decorator */: { + case 170 /* Decorator */: { const { parent: parent4 } = node; return canHaveDecorators(parent4) ? parent4.modifiers : void 0; } - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return node.parent.heritageClauses; } const { parent: parent2 } = node; @@ -18946,43 +19011,43 @@ ${lanes.join("\n")} return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent2.kind) { - case 186 /* TypeLiteral */: - case 263 /* InterfaceDeclaration */: + case 187 /* TypeLiteral */: + case 264 /* InterfaceDeclaration */: return isTypeElement(node) ? parent2.members : void 0; - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return parent2.types; - case 188 /* TupleType */: - case 208 /* ArrayLiteralExpression */: - case 360 /* CommaListExpression */: - case 274 /* NamedImports */: - case 278 /* NamedExports */: + case 189 /* TupleType */: + case 209 /* ArrayLiteralExpression */: + case 361 /* CommaListExpression */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: return parent2.elements; - case 209 /* ObjectLiteralExpression */: - case 291 /* JsxAttributes */: + case 210 /* ObjectLiteralExpression */: + case 292 /* JsxAttributes */: return parent2.properties; - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 283 /* JsxElement */: - case 287 /* JsxFragment */: + case 284 /* JsxElement */: + case 288 /* JsxFragment */: return isJsxChild(node) ? parent2.children : void 0; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent2.typeArguments : void 0; - case 240 /* Block */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 268 /* ModuleBlock */: return parent2.statements; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return parent2.clauses; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return isClassElement(node) ? parent2.members : void 0; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return isEnumMember(node) ? parent2.members : void 0; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return parent2.statements; } } @@ -18991,7 +19056,7 @@ ${lanes.join("\n")} if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 218 /* ArrowFunction */) { + if (node.kind !== 219 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -19004,14 +19069,14 @@ ${lanes.join("\n")} return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 259 /* VariableDeclaration */ && node.parent.kind === 298 /* CatchClause */; + return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 217 /* FunctionExpression */ || node.kind === 218 /* ArrowFunction */; + return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */; } function escapeSnippetText(text) { return text.replace(/\$/gm, () => "\\$"); @@ -19074,23 +19139,23 @@ ${lanes.join("\n")} } function getParameterTypeNode(parameter) { var _a; - return parameter.kind === 347 /* JSDocParameterTag */ ? (_a = parameter.typeExpression) == null ? void 0 : _a.type : parameter.type; + return parameter.kind === 348 /* JSDocParameterTag */ ? (_a = parameter.typeExpression) == null ? void 0 : _a.type : parameter.type; } function isTypeDeclaration(node) { switch (node.kind) { - case 167 /* TypeParameter */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 168 /* TypeParameter */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return true; - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.isTypeOnly; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -19104,7 +19169,7 @@ ${lanes.join("\n")} return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 322 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 323 /* JSDocOptionalType */; } function canUsePropertyAccess(name, languageVersion) { if (name.length === 0) { @@ -19119,17 +19184,17 @@ ${lanes.join("\n")} } function isJSDocOptionalParameter(node) { return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType - (node.type && node.type.kind === 322 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 322 /* JSDocOptionalType */)); + (node.type && node.type.kind === 323 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 323 /* JSDocOptionalType */)); } function isOptionalDeclaration(declaration) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !!declaration.questionToken; - case 168 /* Parameter */: + case 169 /* Parameter */: return !!declaration.questionToken || isJSDocOptionalParameter(declaration); - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: return isOptionalJSDocPropertyLikeTag(declaration); default: return false; @@ -19137,7 +19202,7 @@ ${lanes.join("\n")} } function isNonNullAccess(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && isNonNullExpression(node.expression); + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && isNonNullExpression(node.expression); } function isJSDocSatisfiesExpression(node) { return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); @@ -19157,7 +19222,7 @@ ${lanes.join("\n")} } function isJsxAttributeName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 294 /* JsxNamespacedName */; + return kind === 80 /* Identifier */ || kind === 295 /* JsxNamespacedName */; } function getEscapedTextOfJsxNamespacedName(node) { return `${node.namespace.escapedText}:${idText(node.name)}`; @@ -19168,6 +19233,18 @@ ${lanes.join("\n")} function intrinsicTagNameToString(node) { return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node); } + function isTypeUsableAsPropertyName(type) { + return !!(type.flags & 8576 /* StringOrNumberLiteralOrUnique */); + } + function getPropertyNameFromType(type) { + if (type.flags & 8192 /* UniqueESSymbol */) { + return type.escapedName; + } + if (type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { + return escapeLeadingUnderscores("" + type.value); + } + return Debug.fail(); + } var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries; var init_utilities = __esm({ "src/compiler/utilities.ts"() { @@ -19240,9 +19317,9 @@ ${lanes.join("\n")} return OperatorPrecedence2; })(OperatorPrecedence || {}); templateSubstitutionRegExp = /\$\{/g; - doubleQuoteEscapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - singleQuoteEscapedCharsRegExp = /[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - backtickQuoteEscapedCharsRegExp = /\r\n|[\\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; + doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; + singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; + backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; escapedCharsMap = new Map(Object.entries({ " ": "\\t", "\v": "\\v", @@ -19264,8 +19341,8 @@ ${lanes.join("\n")} // special case for CRLFs in backticks })); nonAsciiCharacters = /[^\u0000-\u007F]/g; - jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g; - jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g; + jsxDoubleQuoteEscapedCharsRegExp = /["\u0000-\u001f\u2028\u2029\u0085]/g; + jsxSingleQuoteEscapedCharsRegExp = /['\u0000-\u001f\u2028\u2029\u0085]/g; jsxEscapedCharsMap = new Map(Object.entries({ '"': """, "'": "'" @@ -19286,7 +19363,7 @@ ${lanes.join("\n")} getSourceMapSourceConstructor: () => SourceMapSource }; objectAllocatorPatchers = []; - reservedCharacterPattern = /[^\w\s\/]/g; + reservedCharacterPattern = /[^\w\s/]/g; wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`; @@ -19477,16 +19554,16 @@ ${lanes.join("\n")} return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(225 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(225 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(226 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 218 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 228 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 229 /* YieldExpression */) { return false; } return true; @@ -19520,7 +19597,7 @@ ${lanes.join("\n")} if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { + if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -19533,7 +19610,7 @@ ${lanes.join("\n")} } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 216 /* ParenthesizedExpression */) { + if (skipped.kind === 217 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -19559,7 +19636,7 @@ ${lanes.join("\n")} return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(226 /* ConditionalExpression */, 58 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(227 /* ConditionalExpression */, 58 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -19580,8 +19657,8 @@ ${lanes.join("\n")} /*stopAtCallExpressions*/ false ).kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: needsParens = true; } } @@ -19594,16 +19671,16 @@ ${lanes.join("\n")} true ); switch (leftmostExpr.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 213 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -19621,7 +19698,7 @@ ${lanes.join("\n")} function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(225 /* BinaryExpression */, 28 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, 28 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -19629,7 +19706,7 @@ ${lanes.join("\n")} if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 217 /* FunctionExpression */ || kind === 218 /* ArrowFunction */) { + if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -19644,7 +19721,7 @@ ${lanes.join("\n")} /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 209 /* ObjectLiteralExpression */ || leftmostExpressionKind === 217 /* FunctionExpression */) { + if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -19654,31 +19731,31 @@ ${lanes.join("\n")} body, /*stopAtCallExpressions*/ false - ).kind === 209 /* ObjectLiteralExpression */)) { + ).kind === 210 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 193 /* ConditionalType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 194 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -19688,8 +19765,8 @@ ${lanes.join("\n")} } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -19699,23 +19776,23 @@ ${lanes.join("\n")} } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 194 /* InferType */: - case 197 /* TypeOperator */: - case 185 /* TypeQuery */: + case 195 /* InferType */: + case 198 /* TypeOperator */: + case 186 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -19807,6 +19884,7 @@ ${lanes.join("\n")} return { convertToFunctionBlock, convertToFunctionExpression, + convertToClassExpression, convertToArrayAssignmentElement, convertToObjectAssignmentElement, convertToAssignmentPattern, @@ -19824,10 +19902,11 @@ ${lanes.join("\n")} return body; } function convertToFunctionExpression(node) { + var _a; if (!node.body) return Debug.fail(`Cannot convert a FunctionDeclaration without a body`); const updated = factory2.createFunctionExpression( - getModifiers(node), + (_a = getModifiers(node)) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), node.asteriskToken, node.name, node.typeParameters, @@ -19846,6 +19925,26 @@ ${lanes.join("\n")} } return updated; } + function convertToClassExpression(node) { + var _a; + const updated = factory2.createClassExpression( + (_a = node.modifiers) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), + node.name, + node.typeParameters, + node.heritageClauses, + node.members + ); + setOriginalNode(updated, node); + setTextRange(updated, node); + if (getStartsOnNewLine(node)) { + setStartsOnNewLine( + updated, + /*newLine*/ + true + ); + } + return updated; + } function convertToArrayAssignmentElement(element) { if (isBindingElement(element)) { if (element.dotDotDotToken) { @@ -19880,11 +19979,11 @@ ${lanes.join("\n")} } function convertToAssignmentPattern(node) { switch (node.kind) { - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 205 /* ObjectBindingPattern */: - case 209 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 210 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -19927,6 +20026,7 @@ ${lanes.join("\n")} nullNodeConverters = { convertToFunctionBlock: notImplemented, convertToFunctionExpression: notImplemented, + convertToClassExpression: notImplemented, convertToArrayAssignmentElement: notImplemented, convertToObjectAssignmentElement: notImplemented, convertToAssignmentPattern: notImplemented, @@ -20239,40 +20339,40 @@ ${lanes.join("\n")} updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(318 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(319 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(319 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(320 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(322 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(322 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(320 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(320 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(322 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(323 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(322 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(323 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(324 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(325 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(324 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(325 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(326 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(326 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -20312,82 +20412,82 @@ ${lanes.join("\n")} updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(348 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(349 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(349 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(350 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(339 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(339 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(340 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(340 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(341 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(341 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(342 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(342 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(343 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(343 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(344 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(344 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(355 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(356 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(355 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(356 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(357 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(357 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -20562,6 +20662,7 @@ ${lanes.join("\n")} createExportDefault, createExternalModuleExport, createTypeCheck, + createIsNotTypeCheck, createMethodCall, createGlobalMethodCall, createFunctionBindCall, @@ -20593,7 +20694,8 @@ ${lanes.join("\n")} ensureUseStrict, liftToBlock, mergeLexicalEnvironment, - updateModifiers + updateModifiers, + updateModifierLike }; forEach(nodeFactoryPatchers, (fn) => fn(factory2)); return factory2; @@ -20751,11 +20853,11 @@ ${lanes.join("\n")} } const node = createBaseIdentifier(escapeLeadingUnderscores(text)); if (hasExtendedUnicodeEscape) - node.flags |= 128 /* IdentifierHasExtendedUnicodeEscape */; + node.flags |= 256 /* IdentifierHasExtendedUnicodeEscape */; if (node.escapedText === "await") { node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */; } - if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) { + if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { node.transformFlags |= 1024 /* ContainsES2015 */; } return node; @@ -20850,7 +20952,7 @@ ${lanes.join("\n")} return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 164 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* LastToken */, "Invalid token"); Debug.assert(token <= 15 /* FirstTemplateToken */ || token >= 18 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 9 /* FirstLiteralToken */ || token >= 15 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 80 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); @@ -20860,6 +20962,9 @@ ${lanes.join("\n")} case 134 /* AsyncKeyword */: transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; break; + case 160 /* UsingKeyword */: + transformFlags = 4 /* ContainsESNext */; + break; case 125 /* PublicKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: @@ -20869,12 +20974,12 @@ ${lanes.join("\n")} case 87 /* ConstKeyword */: case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 146 /* NeverKeyword */: case 151 /* ObjectKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 154 /* StringKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: @@ -20942,7 +21047,7 @@ ${lanes.join("\n")} if (flags2 & 32 /* Static */) result.push(createModifier(126 /* StaticKeyword */)); if (flags2 & 16384 /* Override */) - result.push(createModifier(163 /* OverrideKeyword */)); + result.push(createModifier(164 /* OverrideKeyword */)); if (flags2 & 64 /* Readonly */) result.push(createModifier(148 /* ReadonlyKeyword */)); if (flags2 & 128 /* Accessor */) @@ -20956,7 +21061,7 @@ ${lanes.join("\n")} return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(165 /* QualifiedName */); + const node = createBaseNode(166 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -20967,7 +21072,7 @@ ${lanes.join("\n")} return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(166 /* ComputedPropertyName */); + const node = createBaseNode(167 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -20976,7 +21081,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(167 /* TypeParameter */); + const node = createBaseDeclaration(168 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -20990,7 +21095,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.default !== defaultType ? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node) : node; } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { - const node = createBaseDeclaration(168 /* Parameter */); + const node = createBaseDeclaration(169 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -21009,7 +21114,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(169 /* Decorator */); + const node = createBaseNode(170 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -21022,7 +21127,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(170 /* PropertySignature */); + const node = createBaseDeclaration(171 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -21042,14 +21147,14 @@ ${lanes.join("\n")} return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(171 /* PropertyDeclaration */); + const node = createBaseDeclaration(172 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.type = type; node.initializer = asInitializer(initializer); - const isAmbient = node.flags & 16777216 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; + const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; node.jsDoc = void 0; return node; @@ -21058,7 +21163,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(172 /* MethodSignature */); + const node = createBaseDeclaration(173 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -21076,7 +21181,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(173 /* MethodDeclaration */); + const node = createBaseDeclaration(174 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -21113,7 +21218,7 @@ ${lanes.join("\n")} return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(174 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(175 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -21134,7 +21239,7 @@ ${lanes.join("\n")} return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(175 /* Constructor */); + const node = createBaseDeclaration(176 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; @@ -21160,7 +21265,7 @@ ${lanes.join("\n")} return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(176 /* GetAccessor */); + const node = createBaseDeclaration(177 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -21191,7 +21296,7 @@ ${lanes.join("\n")} return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(177 /* SetAccessor */); + const node = createBaseDeclaration(178 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -21223,7 +21328,7 @@ ${lanes.join("\n")} return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(178 /* CallSignature */); + const node = createBaseDeclaration(179 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21238,7 +21343,7 @@ ${lanes.join("\n")} return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(179 /* ConstructSignature */); + const node = createBaseDeclaration(180 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21253,7 +21358,7 @@ ${lanes.join("\n")} return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(180 /* IndexSignature */); + const node = createBaseDeclaration(181 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -21268,7 +21373,7 @@ ${lanes.join("\n")} return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(203 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -21281,7 +21386,7 @@ ${lanes.join("\n")} return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(181 /* TypePredicate */); + const node = createBaseNode(182 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -21292,7 +21397,7 @@ ${lanes.join("\n")} return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(182 /* TypeReference */); + const node = createBaseNode(183 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21302,7 +21407,7 @@ ${lanes.join("\n")} return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(183 /* FunctionType */); + const node = createBaseDeclaration(184 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21327,7 +21432,7 @@ ${lanes.join("\n")} return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(184 /* ConstructorType */); + const node = createBaseDeclaration(185 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -21358,7 +21463,7 @@ ${lanes.join("\n")} return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(185 /* TypeQuery */); + const node = createBaseNode(186 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21368,7 +21473,7 @@ ${lanes.join("\n")} return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(186 /* TypeLiteral */); + const node = createBaseDeclaration(187 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21377,7 +21482,7 @@ ${lanes.join("\n")} return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(187 /* ArrayType */); + const node = createBaseNode(188 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21386,7 +21491,7 @@ ${lanes.join("\n")} return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(188 /* TupleType */); + const node = createBaseNode(189 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21395,7 +21500,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(201 /* NamedTupleMember */); + const node = createBaseDeclaration(202 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -21408,7 +21513,7 @@ ${lanes.join("\n")} return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(189 /* OptionalType */); + const node = createBaseNode(190 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21417,7 +21522,7 @@ ${lanes.join("\n")} return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(190 /* RestType */); + const node = createBaseNode(191 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21435,19 +21540,19 @@ ${lanes.join("\n")} return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(191 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(192 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(193 /* ConditionalType */); + const node = createBaseNode(194 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -21461,7 +21566,7 @@ ${lanes.join("\n")} return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(194 /* InferType */); + const node = createBaseNode(195 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21470,7 +21575,7 @@ ${lanes.join("\n")} return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(202 /* TemplateLiteralType */); + const node = createBaseNode(203 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21480,7 +21585,7 @@ ${lanes.join("\n")} return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(204 /* ImportType */); + const node = createBaseNode(205 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -21493,7 +21598,7 @@ ${lanes.join("\n")} return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(195 /* ParenthesizedType */); + const node = createBaseNode(196 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21502,12 +21607,12 @@ ${lanes.join("\n")} return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(196 /* ThisType */); + const node = createBaseNode(197 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(197 /* TypeOperator */); + const node = createBaseNode(198 /* TypeOperator */); node.operator = operator; node.type = operator === 148 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21517,7 +21622,7 @@ ${lanes.join("\n")} return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(198 /* IndexedAccessType */); + const node = createBaseNode(199 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -21527,7 +21632,7 @@ ${lanes.join("\n")} return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(199 /* MappedType */); + const node = createBaseDeclaration(200 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -21543,7 +21648,7 @@ ${lanes.join("\n")} return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(200 /* LiteralType */); + const node = createBaseNode(201 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21552,7 +21657,7 @@ ${lanes.join("\n")} return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(205 /* ObjectBindingPattern */); + const node = createBaseNode(206 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -21564,7 +21669,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(206 /* ArrayBindingPattern */); + const node = createBaseNode(207 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -21573,7 +21678,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(207 /* BindingElement */); + const node = createBaseDeclaration(208 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -21586,7 +21691,7 @@ ${lanes.join("\n")} return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(208 /* ArrayLiteralExpression */); + const node = createBaseNode(209 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -21598,7 +21703,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(209 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(210 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -21609,7 +21714,7 @@ ${lanes.join("\n")} return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(210 /* PropertyAccessExpression */); + const node = createBaseDeclaration(211 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -21650,16 +21755,16 @@ ${lanes.join("\n")} questionDotToken, asName(name) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updatePropertyAccessChain(node, expression, questionDotToken, name) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(211 /* ElementAccessExpression */); + const node = createBaseDeclaration(212 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -21700,16 +21805,16 @@ ${lanes.join("\n")} questionDotToken, asExpression(index) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(212 /* CallExpression */); + const node = createBaseDeclaration(213 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -21757,16 +21862,16 @@ ${lanes.join("\n")} asNodeArray(typeArguments), parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updateCallChain(node, expression, questionDotToken, typeArguments, argumentsArray) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(213 /* NewExpression */); + const node = createBaseDeclaration(214 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -21780,7 +21885,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(214 /* TaggedTemplateExpression */); + const node = createBaseNode(215 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -21801,7 +21906,7 @@ ${lanes.join("\n")} return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(215 /* TypeAssertionExpression */); + const node = createBaseNode(216 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -21811,7 +21916,7 @@ ${lanes.join("\n")} return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(216 /* ParenthesizedExpression */); + const node = createBaseNode(217 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -21821,7 +21926,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(217 /* FunctionExpression */); + const node = createBaseDeclaration(218 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -21846,7 +21951,7 @@ ${lanes.join("\n")} return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(218 /* ArrowFunction */); + const node = createBaseDeclaration(219 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -21868,7 +21973,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(219 /* DeleteExpression */); + const node = createBaseNode(220 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21877,7 +21982,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(220 /* TypeOfExpression */); + const node = createBaseNode(221 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21886,7 +21991,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(221 /* VoidExpression */); + const node = createBaseNode(222 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21895,7 +22000,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(222 /* AwaitExpression */); + const node = createBaseNode(223 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -21904,7 +22009,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(223 /* PrefixUnaryExpression */); + const node = createBaseNode(224 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -21917,7 +22022,7 @@ ${lanes.join("\n")} return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(224 /* PostfixUnaryExpression */); + const node = createBaseNode(225 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -21930,7 +22035,7 @@ ${lanes.join("\n")} return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(225 /* BinaryExpression */); + const node = createBaseDeclaration(226 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -21963,7 +22068,7 @@ ${lanes.join("\n")} return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(226 /* ConditionalExpression */); + const node = createBaseNode(227 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken ?? createToken(58 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -21976,7 +22081,7 @@ ${lanes.join("\n")} return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(227 /* TemplateExpression */); + const node = createBaseNode(228 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -22051,7 +22156,7 @@ ${lanes.join("\n")} } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(228 /* YieldExpression */); + const node = createBaseNode(229 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -22061,7 +22166,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(229 /* SpreadElement */); + const node = createBaseNode(230 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -22070,7 +22175,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(230 /* ClassExpression */); + const node = createBaseDeclaration(231 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22084,10 +22189,10 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(231 /* OmittedExpression */); + return createBaseNode(232 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(232 /* ExpressionWithTypeArguments */); + const node = createBaseNode(233 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -22101,7 +22206,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(233 /* AsExpression */); + const node = createBaseNode(234 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -22111,7 +22216,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(234 /* NonNullExpression */); + const node = createBaseNode(235 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -22127,7 +22232,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(237 /* SatisfiesExpression */); + const node = createBaseNode(238 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -22137,8 +22242,8 @@ ${lanes.join("\n")} return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(234 /* NonNullExpression */); - node.flags |= 32 /* OptionalChain */; + const node = createBaseNode(235 /* NonNullExpression */); + node.flags |= 64 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -22148,11 +22253,11 @@ ${lanes.join("\n")} return node; } function updateNonNullChain(node, expression) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(235 /* MetaProperty */); + const node = createBaseNode(236 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -22173,7 +22278,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(238 /* TemplateSpan */); + const node = createBaseNode(239 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -22183,12 +22288,12 @@ ${lanes.join("\n")} return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(239 /* SemicolonClassElement */); + const node = createBaseNode(240 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(240 /* Block */); + const node = createBaseNode(241 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -22201,7 +22306,7 @@ ${lanes.join("\n")} return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(242 /* VariableStatement */); + const node = createBaseNode(243 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -22216,12 +22321,12 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(241 /* EmptyStatement */); + const node = createBaseNode(242 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(243 /* ExpressionStatement */); + const node = createBaseNode(244 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -22232,7 +22337,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(244 /* IfStatement */); + const node = createBaseNode(245 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -22245,7 +22350,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(245 /* DoStatement */); + const node = createBaseNode(246 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -22257,7 +22362,7 @@ ${lanes.join("\n")} return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(246 /* WhileStatement */); + const node = createBaseNode(247 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -22269,7 +22374,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(247 /* ForStatement */); + const node = createBaseNode(248 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -22285,7 +22390,7 @@ ${lanes.join("\n")} return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(248 /* ForInStatement */); + const node = createBaseNode(249 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -22300,7 +22405,7 @@ ${lanes.join("\n")} return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(249 /* ForOfStatement */); + const node = createBaseNode(250 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -22318,7 +22423,7 @@ ${lanes.join("\n")} return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(250 /* ContinueStatement */); + const node = createBaseNode(251 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22329,7 +22434,7 @@ ${lanes.join("\n")} return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(251 /* BreakStatement */); + const node = createBaseNode(252 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22340,7 +22445,7 @@ ${lanes.join("\n")} return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(252 /* ReturnStatement */); + const node = createBaseNode(253 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22351,7 +22456,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(253 /* WithStatement */); + const node = createBaseNode(254 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -22363,7 +22468,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(254 /* SwitchStatement */); + const node = createBaseNode(255 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -22376,7 +22481,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(255 /* LabeledStatement */); + const node = createBaseNode(256 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -22388,7 +22493,7 @@ ${lanes.join("\n")} return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(256 /* ThrowStatement */); + const node = createBaseNode(257 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -22399,7 +22504,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(257 /* TryStatement */); + const node = createBaseNode(258 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -22412,13 +22517,13 @@ ${lanes.join("\n")} return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(258 /* DebuggerStatement */); + const node = createBaseNode(259 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { - const node = createBaseDeclaration(259 /* VariableDeclaration */); + const node = createBaseDeclaration(260 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -22431,20 +22536,23 @@ ${lanes.join("\n")} return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(260 /* VariableDeclarationList */); - node.flags |= flags2 & 3 /* BlockScoped */; + const node = createBaseNode(261 /* VariableDeclarationList */); + node.flags |= flags2 & 7 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - if (flags2 & 3 /* BlockScoped */) { + if (flags2 & 7 /* BlockScoped */) { node.transformFlags |= 1024 /* ContainsES2015 */ | 262144 /* ContainsBlockScopedBinding */; } + if (flags2 & 4 /* Using */) { + node.transformFlags |= 4 /* ContainsESNext */; + } return node; } function updateVariableDeclarationList(node, declarations) { return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(261 /* FunctionDeclaration */); + const node = createBaseDeclaration(262 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -22480,7 +22588,7 @@ ${lanes.join("\n")} return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(262 /* ClassDeclaration */); + const node = createBaseDeclaration(263 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22501,7 +22609,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(263 /* InterfaceDeclaration */); + const node = createBaseDeclaration(264 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22515,7 +22623,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(264 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(265 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22530,7 +22638,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(265 /* EnumDeclaration */); + const node = createBaseDeclaration(266 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -22543,9 +22651,9 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(266 /* ModuleDeclaration */); + const node = createBaseDeclaration(267 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); - node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); + node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); node.name = name; node.body = body; if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { @@ -22563,7 +22671,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(267 /* ModuleBlock */); + const node = createBaseNode(268 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -22573,7 +22681,7 @@ ${lanes.join("\n")} return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(268 /* CaseBlock */); + const node = createBaseNode(269 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -22584,7 +22692,7 @@ ${lanes.join("\n")} return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(269 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(270 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -22601,7 +22709,7 @@ ${lanes.join("\n")} return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(270 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(271 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -22618,7 +22726,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(271 /* ImportDeclaration */); + const node = createBaseNode(272 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -22632,7 +22740,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(272 /* ImportClause */); + const node = createBaseDeclaration(273 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -22647,7 +22755,7 @@ ${lanes.join("\n")} return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(299 /* AssertClause */); + const node = createBaseNode(300 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -22657,7 +22765,7 @@ ${lanes.join("\n")} return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(300 /* AssertEntry */); + const node = createBaseNode(301 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -22667,7 +22775,7 @@ ${lanes.join("\n")} return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(301 /* ImportTypeAssertionContainer */); + const node = createBaseNode(302 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -22676,7 +22784,7 @@ ${lanes.join("\n")} return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(273 /* NamespaceImport */); + const node = createBaseDeclaration(274 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22686,7 +22794,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(279 /* NamespaceExport */); + const node = createBaseDeclaration(280 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 32 /* ContainsES2020 */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22696,7 +22804,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(274 /* NamedImports */); + const node = createBaseNode(275 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22706,7 +22814,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(275 /* ImportSpecifier */); + const node = createBaseDeclaration(276 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -22718,7 +22826,7 @@ ${lanes.join("\n")} return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment2(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(276 /* ExportAssignment */); + const node = createBaseDeclaration(277 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -22736,7 +22844,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(277 /* ExportDeclaration */); + const node = createBaseDeclaration(278 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -22759,7 +22867,7 @@ ${lanes.join("\n")} return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(278 /* NamedExports */); + const node = createBaseNode(279 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22769,7 +22877,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(280 /* ExportSpecifier */); + const node = createBaseNode(281 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -22782,12 +22890,12 @@ ${lanes.join("\n")} return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(281 /* MissingDeclaration */); + const node = createBaseDeclaration(282 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(282 /* ExternalModuleReference */); + const node = createBaseNode(283 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22819,7 +22927,7 @@ ${lanes.join("\n")} return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(323 /* JSDocFunctionType */); + const node = createBaseDeclaration(324 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -22833,7 +22941,7 @@ ${lanes.join("\n")} return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(328 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(329 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -22842,7 +22950,7 @@ ${lanes.join("\n")} return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(315 /* JSDocTypeExpression */); + const node = createBaseNode(316 /* JSDocTypeExpression */); node.type = type; return node; } @@ -22850,7 +22958,7 @@ ${lanes.join("\n")} return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(329 /* JSDocSignature */); + const node = createBaseDeclaration(330 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -22879,7 +22987,7 @@ ${lanes.join("\n")} return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(351 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); + const node = createBaseJSDocTag(352 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -22888,7 +22996,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(352 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(353 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -22900,7 +23008,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(347 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(348 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -22911,7 +23019,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(354 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(355 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -22922,7 +23030,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(344 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(345 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -22934,7 +23042,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(345 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); + const node = createBaseJSDocTag(346 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -22942,7 +23050,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(334 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); + const node = createBaseJSDocTag(335 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); node.class = className; return node; } @@ -22950,12 +23058,12 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(335 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); + const node = createBaseJSDocTag(336 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(353 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); + const node = createBaseJSDocTag(354 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); node.name = name; return node; } @@ -22963,7 +23071,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(316 /* JSDocNameReference */); + const node = createBaseNode(317 /* JSDocNameReference */); node.name = name; return node; } @@ -22971,7 +23079,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(317 /* JSDocMemberName */); + const node = createBaseNode(318 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -22981,7 +23089,7 @@ ${lanes.join("\n")} return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(330 /* JSDocLink */); + const node = createBaseNode(331 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -22990,7 +23098,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(331 /* JSDocLinkCode */); + const node = createBaseNode(332 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -22999,7 +23107,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(332 /* JSDocLinkPlain */); + const node = createBaseNode(333 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -23026,14 +23134,14 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(333 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(334 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(346 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(346 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(347 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(347 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -23043,7 +23151,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(327 /* JSDocText */); + const node = createBaseNode(328 /* JSDocText */); node.text = text; return node; } @@ -23051,7 +23159,7 @@ ${lanes.join("\n")} return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(326 /* JSDoc */); + const node = createBaseNode(327 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -23060,7 +23168,7 @@ ${lanes.join("\n")} return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(283 /* JsxElement */); + const node = createBaseNode(284 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -23071,7 +23179,7 @@ ${lanes.join("\n")} return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(284 /* JsxSelfClosingElement */); + const node = createBaseNode(285 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -23085,7 +23193,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(285 /* JsxOpeningElement */); + const node = createBaseNode(286 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -23099,7 +23207,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(286 /* JsxClosingElement */); + const node = createBaseNode(287 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -23108,7 +23216,7 @@ ${lanes.join("\n")} return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(287 /* JsxFragment */); + const node = createBaseNode(288 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -23129,17 +23237,17 @@ ${lanes.join("\n")} return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(288 /* JsxOpeningFragment */); + const node = createBaseNode(289 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(289 /* JsxClosingFragment */); + const node = createBaseNode(290 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(290 /* JsxAttribute */); + const node = createBaseDeclaration(291 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -23149,7 +23257,7 @@ ${lanes.join("\n")} return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(291 /* JsxAttributes */); + const node = createBaseDeclaration(292 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -23158,7 +23266,7 @@ ${lanes.join("\n")} return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(292 /* JsxSpreadAttribute */); + const node = createBaseNode(293 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -23167,7 +23275,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(293 /* JsxExpression */); + const node = createBaseNode(294 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -23177,7 +23285,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createJsxNamespacedName(namespace, name) { - const node = createBaseNode(294 /* JsxNamespacedName */); + const node = createBaseNode(295 /* JsxNamespacedName */); node.namespace = namespace; node.name = name; node.transformFlags |= propagateChildFlags(node.namespace) | propagateChildFlags(node.name) | 2 /* ContainsJsx */; @@ -23187,7 +23295,7 @@ ${lanes.join("\n")} return node.namespace !== namespace || node.name !== name ? update(createJsxNamespacedName(namespace, name), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(295 /* CaseClause */); + const node = createBaseNode(296 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -23198,7 +23306,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(296 /* DefaultClause */); + const node = createBaseNode(297 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -23207,7 +23315,7 @@ ${lanes.join("\n")} return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(297 /* HeritageClause */); + const node = createBaseNode(298 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -23227,7 +23335,7 @@ ${lanes.join("\n")} return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(298 /* CatchClause */); + const node = createBaseNode(299 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -23239,7 +23347,7 @@ ${lanes.join("\n")} return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(302 /* PropertyAssignment */); + const node = createBaseDeclaration(303 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -23261,7 +23369,7 @@ ${lanes.join("\n")} return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(303 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(304 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -23285,7 +23393,7 @@ ${lanes.join("\n")} return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(304 /* SpreadAssignment */); + const node = createBaseDeclaration(305 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -23295,7 +23403,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(305 /* EnumMember */); + const node = createBaseDeclaration(306 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -23306,7 +23414,7 @@ ${lanes.join("\n")} return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(311 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -23376,7 +23484,7 @@ ${lanes.join("\n")} } function cloneRedirectedSourceFile(source) { const node = createRedirectedSourceFile(source.redirectInfo); - node.flags |= source.flags & ~8 /* Synthesized */; + node.flags |= source.flags & ~16 /* Synthesized */; node.fileName = source.fileName; node.path = source.path; node.resolvedPath = source.resolvedPath; @@ -23387,8 +23495,8 @@ ${lanes.join("\n")} return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(311 /* SourceFile */); - node.flags |= source.flags & ~8 /* Synthesized */; + const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); + node.flags |= source.flags & ~16 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { continue; @@ -23421,7 +23529,7 @@ ${lanes.join("\n")} return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(312 /* Bundle */); + const node = createBaseNode(313 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; @@ -23434,7 +23542,7 @@ ${lanes.join("\n")} return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(313 /* UnparsedSource */); + const node = createBaseNode(314 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -23451,48 +23559,48 @@ ${lanes.join("\n")} return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(306 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(307 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(307 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(308 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 309 /* UnparsedInternalText */ : 308 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 310 /* UnparsedInternalText */ : 309 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(310 /* UnparsedSyntheticReference */); + const node = createBaseNode(311 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(314 /* InputFiles */); + const node = createBaseNode(315 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(236 /* SyntheticExpression */); + const node = createBaseNode(237 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList3(children) { - const node = createBaseNode(357 /* SyntaxList */); + const node = createBaseNode(358 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(358 /* NotEmittedStatement */); + const node = createBaseNode(359 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(359 /* PartiallyEmittedExpression */); + const node = createBaseNode(360 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -23514,7 +23622,7 @@ ${lanes.join("\n")} return node; } function createCommaListExpression(elements) { - const node = createBaseNode(360 /* CommaListExpression */); + const node = createBaseNode(361 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -23523,7 +23631,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(361 /* SyntheticReferenceExpression */); + const node = createBaseNode(362 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -23534,7 +23642,7 @@ ${lanes.join("\n")} } function cloneGeneratedIdentifier(node) { const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); @@ -23542,7 +23650,7 @@ ${lanes.join("\n")} } function cloneIdentifier(node) { const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.jsDoc = node.jsDoc; clone2.flowNode = node.flowNode; clone2.symbol = node.symbol; @@ -23555,7 +23663,7 @@ ${lanes.join("\n")} } function cloneGeneratedPrivateIdentifier(node) { const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); @@ -23563,7 +23671,7 @@ ${lanes.join("\n")} } function clonePrivateIdentifier(node) { const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); return clone2; @@ -23588,7 +23696,7 @@ ${lanes.join("\n")} return clonePrivateIdentifier(node); } const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); for (const key in node) { @@ -23681,7 +23789,10 @@ ${lanes.join("\n")} ); } function createTypeCheck(value, tag) { - return tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + return tag === "null" ? factory2.createStrictEquality(value, createNull()) : tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + } + function createIsNotTypeCheck(value, tag) { + return tag === "null" ? factory2.createStrictInequality(value, createNull()) : tag === "undefined" ? factory2.createStrictInequality(value, createVoidZero()) : factory2.createStrictInequality(createTypeOfExpression(value), createStringLiteral(tag)); } function createMethodCall(object, methodName, argumentsList) { if (isCallChain(object)) { @@ -23756,17 +23867,17 @@ ${lanes.join("\n")} } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 233 /* AsExpression */: + case 234 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -23806,13 +23917,13 @@ ${lanes.join("\n")} case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: return false; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -24075,6 +24186,9 @@ ${lanes.join("\n")} } return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); } + function updateModifierLike(node, modifierArray) { + return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); + } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; } @@ -24123,43 +24237,43 @@ ${lanes.join("\n")} } function getDefaultTagNameForKind(kind) { switch (kind) { - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return "type"; - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: return "returns"; - case 349 /* JSDocThisTag */: + case 350 /* JSDocThisTag */: return "this"; - case 346 /* JSDocEnumTag */: + case 347 /* JSDocEnumTag */: return "enum"; - case 336 /* JSDocAuthorTag */: + case 337 /* JSDocAuthorTag */: return "author"; - case 338 /* JSDocClassTag */: + case 339 /* JSDocClassTag */: return "class"; - case 339 /* JSDocPublicTag */: + case 340 /* JSDocPublicTag */: return "public"; - case 340 /* JSDocPrivateTag */: + case 341 /* JSDocPrivateTag */: return "private"; - case 341 /* JSDocProtectedTag */: + case 342 /* JSDocProtectedTag */: return "protected"; - case 342 /* JSDocReadonlyTag */: + case 343 /* JSDocReadonlyTag */: return "readonly"; - case 343 /* JSDocOverrideTag */: + case 344 /* JSDocOverrideTag */: return "override"; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return "template"; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return "typedef"; - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return "param"; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return "prop"; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: return "callback"; - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return "overload"; - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return "augments"; - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -24241,77 +24355,77 @@ ${lanes.join("\n")} children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 181 /* FirstTypeNode */ && kind <= 204 /* LastTypeNode */) { + if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 208 /* ArrayLiteralExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 209 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 168 /* Parameter */: + case 169 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 175 /* Constructor */: + case 176 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 146 /* NeverKeyword */: case 154 /* StringKeyword */: case 151 /* ObjectKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: case 116 /* VoidKeyword */: - case 167 /* TypeParameter */: - case 170 /* PropertySignature */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 171 /* PropertySignature */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 298 /* CatchClause */: + case 299 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 215 /* TypeAssertionExpression */: - case 237 /* SatisfiesExpression */: - case 233 /* AsExpression */: - case 359 /* PartiallyEmittedExpression */: - case 216 /* ParenthesizedExpression */: + case 216 /* TypeAssertionExpression */: + case 238 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 360 /* PartiallyEmittedExpression */: + case 217 /* ParenthesizedExpression */: case 108 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; } } function makeSynthetic(node) { - node.flags |= 8 /* Synthesized */; + node.flags |= 16 /* Synthesized */; return node; } function createUnparsedSourceFile(textOrInputFiles, mapPathOrType, mapTextOrStripInternal) { @@ -24560,11 +24674,13 @@ ${lanes.join("\n")} return new (SourceMapSource2 || (SourceMapSource2 = objectAllocator.getSourceMapSourceConstructor()))(fileName, text, skipTrivia2); } function setOriginalNode(node, original) { - node.original = original; - if (original) { - const emitNode = original.emitNode; - if (emitNode) - node.emitNode = mergeEmitNode(emitNode, node.emitNode); + if (node.original !== original) { + node.original = original; + if (original) { + const emitNode = original.emitNode; + if (emitNode) + node.emitNode = mergeEmitNode(emitNode, node.emitNode); + } } return node; } @@ -24580,35 +24696,53 @@ ${lanes.join("\n")} constantValue, helpers, startsOnNewLine, - snippetElement + snippetElement, + classThis, + assignedName } = sourceEmitNode; if (!destEmitNode) destEmitNode = {}; - if (leadingComments) - destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); - if (trailingComments) - destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); - if (flags) + if (flags) { destEmitNode.flags = flags; - if (internalFlags) + } + if (internalFlags) { destEmitNode.internalFlags = internalFlags & ~8 /* Immutable */; - if (commentRange) + } + if (leadingComments) { + destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); + } + if (trailingComments) { + destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); + } + if (commentRange) { destEmitNode.commentRange = commentRange; - if (sourceMapRange) + } + if (sourceMapRange) { destEmitNode.sourceMapRange = sourceMapRange; - if (tokenSourceMapRanges) + } + if (tokenSourceMapRanges) { destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges); - if (constantValue !== void 0) + } + if (constantValue !== void 0) { destEmitNode.constantValue = constantValue; + } if (helpers) { for (const helper of helpers) { destEmitNode.helpers = appendIfUnique(destEmitNode.helpers, helper); } } - if (startsOnNewLine !== void 0) + if (startsOnNewLine !== void 0) { destEmitNode.startsOnNewLine = startsOnNewLine; - if (snippetElement !== void 0) + } + if (snippetElement !== void 0) { destEmitNode.snippetElement = snippetElement; + } + if (classThis) { + destEmitNode.classThis = classThis; + } + if (assignedName) { + destEmitNode.assignedName = assignedName; + } return destEmitNode; } function mergeTokenSourceMapRanges(sourceRanges, destRanges) { @@ -24651,7 +24785,7 @@ ${lanes.join("\n")} function getOrCreateEmitNode(node) { if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node))) ?? Debug.fail("Could not determine parsed source file."); @@ -24913,7 +25047,10 @@ ${lanes.join("\n")} // Class Fields Helpers createClassPrivateFieldGetHelper, createClassPrivateFieldSetHelper, - createClassPrivateFieldInHelper + createClassPrivateFieldInHelper, + // 'using' helpers + createAddDisposableResourceHelper, + createDisposeResourcesHelper }; function getUnscopedHelperName(name) { return setEmitFlags(factory2.createIdentifier(name), 8192 /* HelperName */ | 4 /* AdviseOnEmitNode */); @@ -24968,10 +25105,12 @@ ${lanes.join("\n")} ); } function createESDecorateClassContextObject(contextIn) { - return factory2.createObjectLiteralExpression([ + const properties = [ factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral("class")), - factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name) - ]); + factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name), + factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata) + ]; + return factory2.createObjectLiteralExpression(properties); } function createESDecorateClassElementAccessGetMethod(elementName) { const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name); @@ -25075,13 +25214,15 @@ ${lanes.join("\n")} return factory2.createObjectLiteralExpression(properties); } function createESDecorateClassElementContextObject(contextIn) { - return factory2.createObjectLiteralExpression([ + const properties = [ factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral(contextIn.kind)), factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name.computed ? contextIn.name.name : factory2.createStringLiteralFromNode(contextIn.name.name)), factory2.createPropertyAssignment(factory2.createIdentifier("static"), contextIn.static ? factory2.createTrue() : factory2.createFalse()), factory2.createPropertyAssignment(factory2.createIdentifier("private"), contextIn.private ? factory2.createTrue() : factory2.createFalse()), - factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)) - ]); + factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)), + factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata) + ]; + return factory2.createObjectLiteralExpression(properties); } function createESDecorateContextObject(contextIn) { return contextIn.kind === "class" ? createESDecorateClassContextObject(contextIn) : createESDecorateClassElementContextObject(contextIn); @@ -25392,6 +25533,24 @@ ${lanes.join("\n")} [state, receiver] ); } + function createAddDisposableResourceHelper(envBinding, value, async) { + context.requestEmitHelper(addDisposableResourceHelper); + return factory2.createCallExpression( + getUnscopedHelperName("__addDisposableResource"), + /*typeArguments*/ + void 0, + [envBinding, value, async ? factory2.createTrue() : factory2.createFalse()] + ); + } + function createDisposeResourcesHelper(envBinding) { + context.requestEmitHelper(disposeResourcesHelper); + return factory2.createCallExpression( + getUnscopedHelperName("__disposeResources"), + /*typeArguments*/ + void 0, + [envBinding] + ); + } } function compareEmitHelpers(x, y) { if (x === y) @@ -25444,13 +25603,15 @@ ${lanes.join("\n")} classPrivateFieldSetHelper, classPrivateFieldInHelper, createBindingHelper, - setModuleDefaultHelper + setModuleDefaultHelper, + addDisposableResourceHelper, + disposeResourcesHelper ], (helper) => helper.name)); } function isCallToHelper(firstSegment, helperName) { return isCallExpression(firstSegment) && isIdentifier(firstSegment.expression) && (getEmitFlags(firstSegment.expression) & 8192 /* HelperName */) !== 0 && firstSegment.expression.escapedText === helperName; } - var PrivateIdentifierKind, decorateHelper, metadataHelper, paramHelper, esDecorateHelper, runInitializersHelper, assignHelper, awaitHelper, asyncGeneratorHelper, asyncDelegator, asyncValues, restHelper, awaiterHelper, extendsHelper, templateObjectHelper, readHelper, spreadArrayHelper, propKeyHelper, setFunctionNameHelper, valuesHelper, generatorHelper, createBindingHelper, setModuleDefaultHelper, importStarHelper, importDefaultHelper, exportStarHelper, classPrivateFieldGetHelper, classPrivateFieldSetHelper, classPrivateFieldInHelper, allUnscopedEmitHelpers, asyncSuperHelper, advancedAsyncSuperHelper; + var PrivateIdentifierKind, decorateHelper, metadataHelper, paramHelper, esDecorateHelper, runInitializersHelper, assignHelper, awaitHelper, asyncGeneratorHelper, asyncDelegator, asyncValues, restHelper, awaiterHelper, extendsHelper, templateObjectHelper, readHelper, spreadArrayHelper, propKeyHelper, setFunctionNameHelper, valuesHelper, generatorHelper, createBindingHelper, setModuleDefaultHelper, importStarHelper, importDefaultHelper, exportStarHelper, classPrivateFieldGetHelper, classPrivateFieldSetHelper, classPrivateFieldInHelper, addDisposableResourceHelper, disposeResourcesHelper, allUnscopedEmitHelpers, asyncSuperHelper, advancedAsyncSuperHelper; var init_emitHelpers = __esm({ "src/compiler/factory/emitHelpers.ts"() { "use strict"; @@ -25882,6 +26043,63 @@ ${lanes.join("\n")} return typeof state === "function" ? receiver === state : state.has(receiver); };` }; + addDisposableResourceHelper = { + name: "typescript:addDisposableResource", + importName: "__addDisposableResource", + scoped: false, + text: ` + var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + };` + }; + disposeResourcesHelper = { + name: "typescript:disposeResources", + importName: "__disposeResources", + scoped: false, + text: ` + var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + });` + }; asyncSuperHelper = { name: "typescript:async-super", scoped: true, @@ -25989,7 +26207,7 @@ ${lanes.join("\n")} return node.kind === 128 /* AbstractKeyword */; } function isOverrideModifier(node) { - return node.kind === 163 /* OverrideKeyword */; + return node.kind === 164 /* OverrideKeyword */; } function isAccessorModifier(node) { return node.kind === 129 /* AccessorKeyword */; @@ -26004,577 +26222,577 @@ ${lanes.join("\n")} return node.kind === 84 /* CaseKeyword */; } function isQualifiedName(node) { - return node.kind === 165 /* QualifiedName */; + return node.kind === 166 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 166 /* ComputedPropertyName */; + return node.kind === 167 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 167 /* TypeParameter */; + return node.kind === 168 /* TypeParameter */; } function isParameter(node) { - return node.kind === 168 /* Parameter */; + return node.kind === 169 /* Parameter */; } function isDecorator(node) { - return node.kind === 169 /* Decorator */; + return node.kind === 170 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 170 /* PropertySignature */; + return node.kind === 171 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 171 /* PropertyDeclaration */; + return node.kind === 172 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 172 /* MethodSignature */; + return node.kind === 173 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 173 /* MethodDeclaration */; + return node.kind === 174 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 174 /* ClassStaticBlockDeclaration */; + return node.kind === 175 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 175 /* Constructor */; + return node.kind === 176 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 176 /* GetAccessor */; + return node.kind === 177 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 177 /* SetAccessor */; + return node.kind === 178 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 178 /* CallSignature */; + return node.kind === 179 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 179 /* ConstructSignature */; + return node.kind === 180 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 180 /* IndexSignature */; + return node.kind === 181 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 181 /* TypePredicate */; + return node.kind === 182 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 182 /* TypeReference */; + return node.kind === 183 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 183 /* FunctionType */; + return node.kind === 184 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 184 /* ConstructorType */; + return node.kind === 185 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 185 /* TypeQuery */; + return node.kind === 186 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 186 /* TypeLiteral */; + return node.kind === 187 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 187 /* ArrayType */; + return node.kind === 188 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 188 /* TupleType */; + return node.kind === 189 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 201 /* NamedTupleMember */; + return node.kind === 202 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 189 /* OptionalType */; + return node.kind === 190 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 190 /* RestType */; + return node.kind === 191 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 191 /* UnionType */; + return node.kind === 192 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 192 /* IntersectionType */; + return node.kind === 193 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 193 /* ConditionalType */; + return node.kind === 194 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 194 /* InferType */; + return node.kind === 195 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 195 /* ParenthesizedType */; + return node.kind === 196 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 196 /* ThisType */; + return node.kind === 197 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 197 /* TypeOperator */; + return node.kind === 198 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 198 /* IndexedAccessType */; + return node.kind === 199 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 199 /* MappedType */; + return node.kind === 200 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 200 /* LiteralType */; + return node.kind === 201 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 204 /* ImportType */; + return node.kind === 205 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 203 /* TemplateLiteralTypeSpan */; + return node.kind === 204 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 202 /* TemplateLiteralType */; + return node.kind === 203 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 205 /* ObjectBindingPattern */; + return node.kind === 206 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 206 /* ArrayBindingPattern */; + return node.kind === 207 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 207 /* BindingElement */; + return node.kind === 208 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 208 /* ArrayLiteralExpression */; + return node.kind === 209 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 209 /* ObjectLiteralExpression */; + return node.kind === 210 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 210 /* PropertyAccessExpression */; + return node.kind === 211 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 211 /* ElementAccessExpression */; + return node.kind === 212 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 212 /* CallExpression */; + return node.kind === 213 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 213 /* NewExpression */; + return node.kind === 214 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 214 /* TaggedTemplateExpression */; + return node.kind === 215 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 215 /* TypeAssertionExpression */; + return node.kind === 216 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 216 /* ParenthesizedExpression */; + return node.kind === 217 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 217 /* FunctionExpression */; + return node.kind === 218 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 218 /* ArrowFunction */; + return node.kind === 219 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 219 /* DeleteExpression */; + return node.kind === 220 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 220 /* TypeOfExpression */; + return node.kind === 221 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 221 /* VoidExpression */; + return node.kind === 222 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 222 /* AwaitExpression */; + return node.kind === 223 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 223 /* PrefixUnaryExpression */; + return node.kind === 224 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 224 /* PostfixUnaryExpression */; + return node.kind === 225 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 225 /* BinaryExpression */; + return node.kind === 226 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 226 /* ConditionalExpression */; + return node.kind === 227 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 227 /* TemplateExpression */; + return node.kind === 228 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 228 /* YieldExpression */; + return node.kind === 229 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 229 /* SpreadElement */; + return node.kind === 230 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 230 /* ClassExpression */; + return node.kind === 231 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 231 /* OmittedExpression */; + return node.kind === 232 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 232 /* ExpressionWithTypeArguments */; + return node.kind === 233 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 233 /* AsExpression */; + return node.kind === 234 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 237 /* SatisfiesExpression */; + return node.kind === 238 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 234 /* NonNullExpression */; + return node.kind === 235 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 235 /* MetaProperty */; + return node.kind === 236 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 236 /* SyntheticExpression */; + return node.kind === 237 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 359 /* PartiallyEmittedExpression */; + return node.kind === 360 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 360 /* CommaListExpression */; + return node.kind === 361 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 238 /* TemplateSpan */; + return node.kind === 239 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 239 /* SemicolonClassElement */; + return node.kind === 240 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 240 /* Block */; + return node.kind === 241 /* Block */; } function isVariableStatement(node) { - return node.kind === 242 /* VariableStatement */; + return node.kind === 243 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 241 /* EmptyStatement */; + return node.kind === 242 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 243 /* ExpressionStatement */; + return node.kind === 244 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 244 /* IfStatement */; + return node.kind === 245 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 245 /* DoStatement */; + return node.kind === 246 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 246 /* WhileStatement */; + return node.kind === 247 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 247 /* ForStatement */; + return node.kind === 248 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 248 /* ForInStatement */; + return node.kind === 249 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 249 /* ForOfStatement */; + return node.kind === 250 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 250 /* ContinueStatement */; + return node.kind === 251 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 251 /* BreakStatement */; + return node.kind === 252 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 252 /* ReturnStatement */; + return node.kind === 253 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 253 /* WithStatement */; + return node.kind === 254 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 254 /* SwitchStatement */; + return node.kind === 255 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 255 /* LabeledStatement */; + return node.kind === 256 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 256 /* ThrowStatement */; + return node.kind === 257 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 257 /* TryStatement */; + return node.kind === 258 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 258 /* DebuggerStatement */; + return node.kind === 259 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 259 /* VariableDeclaration */; + return node.kind === 260 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 260 /* VariableDeclarationList */; + return node.kind === 261 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 261 /* FunctionDeclaration */; + return node.kind === 262 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 262 /* ClassDeclaration */; + return node.kind === 263 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 263 /* InterfaceDeclaration */; + return node.kind === 264 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 264 /* TypeAliasDeclaration */; + return node.kind === 265 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 265 /* EnumDeclaration */; + return node.kind === 266 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */; + return node.kind === 267 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 267 /* ModuleBlock */; + return node.kind === 268 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 268 /* CaseBlock */; + return node.kind === 269 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 269 /* NamespaceExportDeclaration */; + return node.kind === 270 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */; + return node.kind === 271 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 271 /* ImportDeclaration */; + return node.kind === 272 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 272 /* ImportClause */; + return node.kind === 273 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 301 /* ImportTypeAssertionContainer */; + return node.kind === 302 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 299 /* AssertClause */; + return node.kind === 300 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 300 /* AssertEntry */; + return node.kind === 301 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 273 /* NamespaceImport */; + return node.kind === 274 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 279 /* NamespaceExport */; + return node.kind === 280 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 274 /* NamedImports */; + return node.kind === 275 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 275 /* ImportSpecifier */; + return node.kind === 276 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 276 /* ExportAssignment */; + return node.kind === 277 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 277 /* ExportDeclaration */; + return node.kind === 278 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 278 /* NamedExports */; + return node.kind === 279 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 280 /* ExportSpecifier */; + return node.kind === 281 /* ExportSpecifier */; } function isMissingDeclaration(node) { - return node.kind === 281 /* MissingDeclaration */; + return node.kind === 282 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 358 /* NotEmittedStatement */; + return node.kind === 359 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 361 /* SyntheticReferenceExpression */; + return node.kind === 362 /* SyntheticReferenceExpression */; } function isExternalModuleReference(node) { - return node.kind === 282 /* ExternalModuleReference */; + return node.kind === 283 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 283 /* JsxElement */; + return node.kind === 284 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 284 /* JsxSelfClosingElement */; + return node.kind === 285 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 285 /* JsxOpeningElement */; + return node.kind === 286 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 286 /* JsxClosingElement */; + return node.kind === 287 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 287 /* JsxFragment */; + return node.kind === 288 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 288 /* JsxOpeningFragment */; + return node.kind === 289 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 289 /* JsxClosingFragment */; + return node.kind === 290 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 290 /* JsxAttribute */; + return node.kind === 291 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 291 /* JsxAttributes */; + return node.kind === 292 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 292 /* JsxSpreadAttribute */; + return node.kind === 293 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 293 /* JsxExpression */; + return node.kind === 294 /* JsxExpression */; } function isJsxNamespacedName(node) { - return node.kind === 294 /* JsxNamespacedName */; + return node.kind === 295 /* JsxNamespacedName */; } function isCaseClause(node) { - return node.kind === 295 /* CaseClause */; + return node.kind === 296 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 296 /* DefaultClause */; + return node.kind === 297 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 297 /* HeritageClause */; + return node.kind === 298 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 298 /* CatchClause */; + return node.kind === 299 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 302 /* PropertyAssignment */; + return node.kind === 303 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 303 /* ShorthandPropertyAssignment */; + return node.kind === 304 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 304 /* SpreadAssignment */; + return node.kind === 305 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 305 /* EnumMember */; + return node.kind === 306 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 307 /* UnparsedPrepend */; + return node.kind === 308 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 311 /* SourceFile */; + return node.kind === 312 /* SourceFile */; } function isBundle(node) { - return node.kind === 312 /* Bundle */; + return node.kind === 313 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 313 /* UnparsedSource */; + return node.kind === 314 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 315 /* JSDocTypeExpression */; + return node.kind === 316 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 316 /* JSDocNameReference */; + return node.kind === 317 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 317 /* JSDocMemberName */; + return node.kind === 318 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 330 /* JSDocLink */; + return node.kind === 331 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 331 /* JSDocLinkCode */; + return node.kind === 332 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 332 /* JSDocLinkPlain */; + return node.kind === 333 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 318 /* JSDocAllType */; + return node.kind === 319 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 319 /* JSDocUnknownType */; + return node.kind === 320 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 320 /* JSDocNullableType */; + return node.kind === 321 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 321 /* JSDocNonNullableType */; + return node.kind === 322 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 322 /* JSDocOptionalType */; + return node.kind === 323 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 323 /* JSDocFunctionType */; + return node.kind === 324 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 324 /* JSDocVariadicType */; + return node.kind === 325 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 325 /* JSDocNamepathType */; + return node.kind === 326 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 326 /* JSDoc */; + return node.kind === 327 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 328 /* JSDocTypeLiteral */; + return node.kind === 329 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 329 /* JSDocSignature */; + return node.kind === 330 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 334 /* JSDocAugmentsTag */; + return node.kind === 335 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 336 /* JSDocAuthorTag */; + return node.kind === 337 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 338 /* JSDocClassTag */; + return node.kind === 339 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 344 /* JSDocCallbackTag */; + return node.kind === 345 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 339 /* JSDocPublicTag */; + return node.kind === 340 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 340 /* JSDocPrivateTag */; + return node.kind === 341 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 341 /* JSDocProtectedTag */; + return node.kind === 342 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 342 /* JSDocReadonlyTag */; + return node.kind === 343 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 343 /* JSDocOverrideTag */; + return node.kind === 344 /* JSDocOverrideTag */; } function isJSDocOverloadTag(node) { - return node.kind === 345 /* JSDocOverloadTag */; + return node.kind === 346 /* JSDocOverloadTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 337 /* JSDocDeprecatedTag */; + return node.kind === 338 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 353 /* JSDocSeeTag */; + return node.kind === 354 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 346 /* JSDocEnumTag */; + return node.kind === 347 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 347 /* JSDocParameterTag */; + return node.kind === 348 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 348 /* JSDocReturnTag */; + return node.kind === 349 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 349 /* JSDocThisTag */; + return node.kind === 350 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 350 /* JSDocTypeTag */; + return node.kind === 351 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 351 /* JSDocTemplateTag */; + return node.kind === 352 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 352 /* JSDocTypedefTag */; + return node.kind === 353 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 333 /* JSDocTag */; + return node.kind === 334 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 354 /* JSDocPropertyTag */; + return node.kind === 355 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 335 /* JSDocImplementsTag */; + return node.kind === 336 /* JSDocImplementsTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 356 /* JSDocSatisfiesTag */; + return node.kind === 357 /* JSDocSatisfiesTag */; } function isJSDocThrowsTag(node) { - return node.kind === 355 /* JSDocThrowsTag */; + return node.kind === 356 /* JSDocThrowsTag */; } function isSyntaxList(n) { - return n.kind === 357 /* SyntaxList */; + return n.kind === 358 /* SyntaxList */; } var init_nodeTests = __esm({ "src/compiler/factory/nodeTests.ts"() { @@ -26888,14 +27106,14 @@ ${lanes.join("\n")} Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -26948,7 +27166,7 @@ ${lanes.join("\n")} return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaExpression(node) { - return node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; + return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -26963,19 +27181,19 @@ ${lanes.join("\n")} } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 237 /* SatisfiesExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 238 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -27112,10 +27330,10 @@ ${lanes.join("\n")} const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 271 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 272 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 277 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 278 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -27178,11 +27396,11 @@ ${lanes.join("\n")} } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -27201,11 +27419,11 @@ ${lanes.join("\n")} } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 168 /* Parameter */: - case 207 /* BindingElement */: + case 169 /* Parameter */: + case 208 /* BindingElement */: return bindingElement.dotDotDotToken; - case 229 /* SpreadElement */: - case 304 /* SpreadAssignment */: + case 230 /* SpreadElement */: + case 305 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -27217,7 +27435,7 @@ ${lanes.join("\n")} } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 207 /* BindingElement */: + case 208 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -27226,7 +27444,7 @@ ${lanes.join("\n")} return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -27235,7 +27453,7 @@ ${lanes.join("\n")} return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -27252,11 +27470,11 @@ ${lanes.join("\n")} } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return name.elements; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return name.properties; } } @@ -27273,19 +27491,19 @@ ${lanes.join("\n")} } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 177 /* SetAccessor */; + return kind === 176 /* Constructor */ || kind === 178 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 261 /* FunctionDeclaration */ || kind === 175 /* Constructor */ || kind === 180 /* IndexSignature */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 281 /* MissingDeclaration */ || kind === 242 /* VariableStatement */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 276 /* ExportAssignment */; + return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 243 /* VariableStatement */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 174 /* ClassStaticBlockDeclaration */ || kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 281 /* MissingDeclaration */ || kind === 269 /* NamespaceExportDeclaration */; + return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 282 /* MissingDeclaration */ || kind === 270 /* NamespaceExportDeclaration */; } function isQuestionOrExclamationToken(node) { return isQuestionToken(node) || isExclamationToken(node); @@ -27452,7 +27670,7 @@ ${lanes.join("\n")} initializer ); } - function createAccessorPropertyGetRedirector(factory2, node, modifiers, name) { + function createAccessorPropertyGetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) { return factory2.createGetAccessorDeclaration( modifiers, name, @@ -27462,7 +27680,7 @@ ${lanes.join("\n")} factory2.createBlock([ factory2.createReturnStatement( factory2.createPropertyAccessExpression( - factory2.createThis(), + receiver, factory2.getGeneratedPrivateNameForNode( node.name, /*prefix*/ @@ -27474,7 +27692,7 @@ ${lanes.join("\n")} ]) ); } - function createAccessorPropertySetRedirector(factory2, node, modifiers, name) { + function createAccessorPropertySetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) { return factory2.createSetAccessorDeclaration( modifiers, name, @@ -27489,7 +27707,7 @@ ${lanes.join("\n")} factory2.createExpressionStatement( factory2.createAssignment( factory2.createPropertyAccessExpression( - factory2.createThis(), + receiver, factory2.getGeneratedPrivateNameForNode( node.name, /*prefix*/ @@ -27690,11 +27908,11 @@ ${lanes.join("\n")} } function canHaveModifiers(node) { const kind = node.kind; - return kind === 167 /* TypeParameter */ || kind === 168 /* Parameter */ || kind === 170 /* PropertySignature */ || kind === 171 /* PropertyDeclaration */ || kind === 172 /* MethodSignature */ || kind === 173 /* MethodDeclaration */ || kind === 175 /* Constructor */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 180 /* IndexSignature */ || kind === 184 /* ConstructorType */ || kind === 217 /* FunctionExpression */ || kind === 218 /* ArrowFunction */ || kind === 230 /* ClassExpression */ || kind === 242 /* VariableStatement */ || kind === 261 /* FunctionDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 277 /* ExportDeclaration */; + return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 231 /* ClassExpression */ || kind === 243 /* VariableStatement */ || kind === 262 /* FunctionDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 278 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 168 /* Parameter */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 230 /* ClassExpression */ || kind === 262 /* ClassDeclaration */; + return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 231 /* ClassExpression */ || kind === 263 /* ClassDeclaration */; } var init_utilitiesPublic2 = __esm({ "src/compiler/factory/utilitiesPublic.ts"() { @@ -27730,7 +27948,7 @@ ${lanes.join("\n")} return canHaveModifiers(node) && hasModifierOfKind(node, 95 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { - return sourceFile.flags & 4194304 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; + return sourceFile.flags & 8388608 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; } function walkTreeForImportMeta(node) { return isImportMeta2(node) ? node : forEachChild(node, walkTreeForImportMeta); @@ -27794,7 +28012,7 @@ ${lanes.join("\n")} return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 164 /* LastToken */) { + if (node === void 0 || node.kind <= 165 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -27829,7 +28047,7 @@ ${lanes.join("\n")} continue; return res; } - if (current.kind >= 165 /* FirstNode */) { + if (current.kind >= 166 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -27910,7 +28128,7 @@ ${lanes.join("\n")} } function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks = false) { const newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks); - newSourceFile.flags |= sourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */; + newSourceFile.flags |= sourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */; return newSourceFile; } function parseIsolatedJSDocComment(content, start, length2) { @@ -28131,7 +28349,7 @@ ${lanes.join("\n")} if (lhs.kind === 110 /* ThisKeyword */) { return true; } - if (lhs.kind === 294 /* JsxNamespacedName */) { + if (lhs.kind === 295 /* JsxNamespacedName */) { return lhs.namespace.escapedText === rhs.namespace.escapedText && lhs.name.escapedText === rhs.name.escapedText; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -28151,428 +28369,428 @@ ${lanes.join("\n")} }; parseNodeFactory = createNodeFactory(1 /* NoParenthesizerRules */, parseBaseNodeFactory); forEachChildTable = { - [165 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [167 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [168 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [303 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [304 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [304 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [305 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [168 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [169 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [171 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [172 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [170 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [171 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [302 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [303 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [259 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [260 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [207 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [180 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [184 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [183 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [178 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [179 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [173 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [172 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [175 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [176 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [177 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [261 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [262 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [217 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [218 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [174 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [182 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [181 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [185 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [186 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [187 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [188 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [191 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [192 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [193 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [194 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [204 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [301 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [195 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [197 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [199 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [200 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [201 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [205 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [206 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [208 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [209 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [210 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [211 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [212 /* CallExpression */]: forEachChildInCallOrNewExpression, - [213 /* NewExpression */]: forEachChildInCallOrNewExpression, - [214 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [213 /* CallExpression */]: forEachChildInCallOrNewExpression, + [214 /* NewExpression */]: forEachChildInCallOrNewExpression, + [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [215 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [216 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [219 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [220 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [220 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [221 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [222 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [223 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [224 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [228 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [229 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [222 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [223 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [224 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [225 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [225 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [226 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [233 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [234 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [234 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [235 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [237 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [238 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [235 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [236 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [226 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [227 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [229 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [230 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [240 /* Block */]: forEachChildInBlock, - [267 /* ModuleBlock */]: forEachChildInBlock, - [311 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [241 /* Block */]: forEachChildInBlock, + [268 /* ModuleBlock */]: forEachChildInBlock, + [312 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [242 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [243 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [260 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [261 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [243 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [244 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [244 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [245 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [245 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [246 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [246 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [247 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [247 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [248 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [248 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [249 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [249 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [250 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [250 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [251 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [252 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [251 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [252 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [253 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [253 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [254 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [254 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [255 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [268 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [269 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [295 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [296 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [296 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [297 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [255 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [256 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [256 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [257 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [257 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [258 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [298 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [299 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [169 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [262 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [230 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [263 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [263 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [231 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [264 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [264 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [265 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [265 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [266 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [305 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [306 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [266 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [267 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [270 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [271 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [271 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [272 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [299 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [300 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [269 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [273 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [274 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [279 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [280 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [274 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [278 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [277 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [275 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [280 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [276 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [277 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [227 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [228 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [238 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [239 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [202 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [203 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [166 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [297 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [298 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [232 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [233 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [282 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [283 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [281 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [360 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [361 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [283 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [287 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [288 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [284 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [285 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [291 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [285 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [286 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [292 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [290 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [291 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [292 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [293 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [293 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [294 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [286 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [287 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [294 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { + [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.namespace) || visitNode2(cbNode, node.name); }, - [189 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [190 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [315 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [320 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [322 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [316 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [322 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [323 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [325 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [324 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [326 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [327 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [353 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [354 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [316 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [317 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [317 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [318 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [347 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [354 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [336 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [348 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [355 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [337 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [335 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [336 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [334 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [335 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [351 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [352 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [352 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 315 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [353 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 316 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [344 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [345 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [348 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [350 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [349 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [356 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [355 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [345 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [329 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [349 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [351 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [350 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [347 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [357 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [356 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [346 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [330 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [330 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [331 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [332 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [328 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [331 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [332 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [333 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [329 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [333 /* JSDocTag */]: forEachChildInJSDocTag, - [338 /* JSDocClassTag */]: forEachChildInJSDocTag, - [339 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [340 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [341 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [342 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [337 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [343 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [359 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [334 /* JSDocTag */]: forEachChildInJSDocTag, + [339 /* JSDocClassTag */]: forEachChildInJSDocTag, + [340 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [341 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [342 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [343 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [338 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [344 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [360 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; ((Parser2) => { var scanner2 = createScanner( @@ -28580,7 +28798,7 @@ ${lanes.join("\n")} /*skipTrivia*/ true ); - var disallowInAndDecoratorContext = 4096 /* DisallowInContext */ | 16384 /* DecoratorContext */; + var disallowInAndDecoratorContext = 8192 /* DisallowInContext */ | 32768 /* DecoratorContext */; var NodeConstructor2; var TokenConstructor2; var IdentifierConstructor2; @@ -28825,10 +29043,10 @@ ${lanes.join("\n")} switch (scriptKind) { case 1 /* JS */: case 2 /* JSX */: - contextFlags = 262144 /* JavaScriptFile */; + contextFlags = 524288 /* JavaScriptFile */; break; case 6 /* JSON */: - contextFlags = 262144 /* JavaScriptFile */ | 67108864 /* JsonFile */; + contextFlags = 524288 /* JavaScriptFile */ | 134217728 /* JsonFile */; break; default: contextFlags = 0 /* None */; @@ -28860,13 +29078,14 @@ ${lanes.join("\n")} function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) { const isDeclarationFile = isDeclarationFileName(fileName); if (isDeclarationFile) { - contextFlags |= 16777216 /* Ambient */; + contextFlags |= 33554432 /* Ambient */; } sourceFlags = contextFlags; nextToken(); const statements = parseList(0 /* SourceElements */, parseStatement); Debug.assert(token() === 1 /* EndOfFileToken */); - const endOfFileToken = addJSDocComment(parseTokenNode()); + const endHasJSDoc = hasPrecedingJSDocComment(); + const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc); const sourceFile = createSourceFile2(fileName, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator2); processCommentPragmas(sourceFile, sourceText); processPragmasIntoFields(sourceFile, reportPragmaDiagnostic); @@ -28886,18 +29105,18 @@ ${lanes.join("\n")} parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic)); } } - function withJSDoc(node, hasJSDoc) { - return hasJSDoc ? addJSDocComment(node) : node; - } let hasDeprecatedTag = false; - function addJSDocComment(node) { + function withJSDoc(node, hasJSDoc) { + if (!hasJSDoc) { + return node; + } Debug.assert(!node.jsDoc); const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), (comment) => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos)); if (jsDoc.length) node.jsDoc = jsDoc; if (hasDeprecatedTag) { hasDeprecatedTag = false; - node.flags |= 268435456 /* Deprecated */; + node.flags |= 536870912 /* Deprecated */; } return node; } @@ -28922,7 +29141,7 @@ ${lanes.join("\n")} } speculationHelper(() => { const savedContextFlags = contextFlags; - contextFlags |= 32768 /* AwaitContext */; + contextFlags |= 65536 /* AwaitContext */; scanner2.resetTokenState(nextStatement.pos); nextToken(); while (token() !== 1 /* EndOfFileToken */) { @@ -28957,7 +29176,7 @@ ${lanes.join("\n")} syntaxCursor = savedSyntaxCursor; return factory2.updateSourceFile(sourceFile, setTextRange(factoryCreateNodeArray(statements), sourceFile.statements)); function containsPossibleTopLevelAwait(node) { - return !(node.flags & 32768 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); + return !(node.flags & 65536 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); } function findNextStatementWithAwait(statements2, start2) { for (let i = start2; i < statements2.length; i++) { @@ -29021,16 +29240,16 @@ ${lanes.join("\n")} } } function setDisallowInContext(val) { - setContextFlag(val, 4096 /* DisallowInContext */); + setContextFlag(val, 8192 /* DisallowInContext */); } function setYieldContext(val) { - setContextFlag(val, 8192 /* YieldContext */); + setContextFlag(val, 16384 /* YieldContext */); } function setDecoratorContext(val) { - setContextFlag(val, 16384 /* DecoratorContext */); + setContextFlag(val, 32768 /* DecoratorContext */); } function setAwaitContext(val) { - setContextFlag(val, 32768 /* AwaitContext */); + setContextFlag(val, 65536 /* AwaitContext */); } function doOutsideOfContext(context, func) { const contextFlagsToClear = context & contextFlags; @@ -29069,52 +29288,52 @@ ${lanes.join("\n")} return func(); } function allowInAnd(func) { - return doOutsideOfContext(4096 /* DisallowInContext */, func); + return doOutsideOfContext(8192 /* DisallowInContext */, func); } function disallowInAnd(func) { - return doInsideOfContext(4096 /* DisallowInContext */, func); + return doInsideOfContext(8192 /* DisallowInContext */, func); } function allowConditionalTypesAnd(func) { - return doOutsideOfContext(65536 /* DisallowConditionalTypesContext */, func); + return doOutsideOfContext(131072 /* DisallowConditionalTypesContext */, func); } function disallowConditionalTypesAnd(func) { - return doInsideOfContext(65536 /* DisallowConditionalTypesContext */, func); + return doInsideOfContext(131072 /* DisallowConditionalTypesContext */, func); } function doInYieldContext(func) { - return doInsideOfContext(8192 /* YieldContext */, func); + return doInsideOfContext(16384 /* YieldContext */, func); } function doInDecoratorContext(func) { - return doInsideOfContext(16384 /* DecoratorContext */, func); + return doInsideOfContext(32768 /* DecoratorContext */, func); } function doInAwaitContext(func) { - return doInsideOfContext(32768 /* AwaitContext */, func); + return doInsideOfContext(65536 /* AwaitContext */, func); } function doOutsideOfAwaitContext(func) { - return doOutsideOfContext(32768 /* AwaitContext */, func); + return doOutsideOfContext(65536 /* AwaitContext */, func); } function doInYieldAndAwaitContext(func) { - return doInsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + return doInsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); } function doOutsideOfYieldAndAwaitContext(func) { - return doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + return doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); } function inContext(flags) { return (contextFlags & flags) !== 0; } function inYieldContext() { - return inContext(8192 /* YieldContext */); + return inContext(16384 /* YieldContext */); } function inDisallowInContext() { - return inContext(4096 /* DisallowInContext */); + return inContext(8192 /* DisallowInContext */); } function inDisallowConditionalTypesContext() { - return inContext(65536 /* DisallowConditionalTypesContext */); + return inContext(131072 /* DisallowConditionalTypesContext */); } function inDecoratorContext() { - return inContext(16384 /* DecoratorContext */); + return inContext(32768 /* DecoratorContext */); } function inAwaitContext() { - return inContext(32768 /* AwaitContext */); + return inContext(65536 /* AwaitContext */); } function parseErrorAtCurrentToken(message, ...args) { return parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), message, ...args); @@ -29438,7 +29657,7 @@ ${lanes.join("\n")} } if (parseErrorBeforeNextFinishedNode) { parseErrorBeforeNextFinishedNode = false; - node.flags |= 131072 /* ThisNodeHasError */; + node.flags |= 262144 /* ThisNodeHasError */; } return node; } @@ -29467,7 +29686,7 @@ ${lanes.join("\n")} "", /*isSingleQuote*/ void 0 - ) : kind === 281 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 282 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -29684,6 +29903,9 @@ ${lanes.join("\n")} case 22 /* HeritageClauses */: return isHeritageClause2(); case 23 /* ImportOrExportSpecifiers */: + if (token() === 161 /* FromKeyword */ && lookAhead(nextTokenIsStringLiteral)) { + return false; + } return tokenIsIdentifierOrKeyword(token()); case 13 /* JsxAttributes */: return tokenIsIdentifierOrKeyword(token()) || token() === 19 /* OpenBraceToken */; @@ -29840,7 +30062,7 @@ ${lanes.join("\n")} if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { return void 0; } - const nodeContextFlags = node.flags & 50720768 /* ContextFlags */; + const nodeContextFlags = node.flags & 101441536 /* ContextFlags */; if (nodeContextFlags !== contextFlags) { return void 0; } @@ -29898,14 +30120,14 @@ ${lanes.join("\n")} function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 175 /* Constructor */: - case 180 /* IndexSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 239 /* SemicolonClassElement */: + case 176 /* Constructor */: + case 181 /* IndexSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 240 /* SemicolonClassElement */: return true; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 80 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -29916,8 +30138,8 @@ ${lanes.join("\n")} function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return true; } } @@ -29926,65 +30148,65 @@ ${lanes.join("\n")} function isReusableStatement(node) { if (node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 242 /* VariableStatement */: - case 240 /* Block */: - case 244 /* IfStatement */: - case 243 /* ExpressionStatement */: - case 256 /* ThrowStatement */: - case 252 /* ReturnStatement */: - case 254 /* SwitchStatement */: - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 241 /* EmptyStatement */: - case 257 /* TryStatement */: - case 255 /* LabeledStatement */: - case 245 /* DoStatement */: - case 258 /* DebuggerStatement */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 262 /* FunctionDeclaration */: + case 243 /* VariableStatement */: + case 241 /* Block */: + case 245 /* IfStatement */: + case 244 /* ExpressionStatement */: + case 257 /* ThrowStatement */: + case 253 /* ReturnStatement */: + case 255 /* SwitchStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 242 /* EmptyStatement */: + case 258 /* TryStatement */: + case 256 /* LabeledStatement */: + case 246 /* DoStatement */: + case 259 /* DebuggerStatement */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 305 /* EnumMember */; + return node.kind === 306 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 170 /* PropertySignature */: - case 178 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 171 /* PropertySignature */: + case 179 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 259 /* VariableDeclaration */) { + if (node.kind !== 260 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 168 /* Parameter */) { + if (node.kind !== 169 /* Parameter */) { return false; } const parameter = node; @@ -30042,6 +30264,9 @@ ${lanes.join("\n")} case 22 /* HeritageClauses */: return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_expected); case 23 /* ImportOrExportSpecifiers */: + if (token() === 161 /* FromKeyword */) { + return parseErrorAtCurrentToken(Diagnostics._0_expected, "}"); + } return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case 13 /* JsxAttributes */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); @@ -30321,14 +30546,14 @@ ${lanes.join("\n")} } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return nodeIsMissing(node.typeName); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: { + case 184 /* FunctionType */: + case 185 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -30620,7 +30845,7 @@ ${lanes.join("\n")} function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 179 /* ConstructSignature */) { + if (kind === 180 /* ConstructSignature */) { parseExpected(105 /* NewKeyword */); } const typeParameters = parseTypeParameters(); @@ -30631,7 +30856,7 @@ ${lanes.join("\n")} true ); parseTypeMemberSemicolon(); - const node = kind === 178 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -30716,10 +30941,10 @@ ${lanes.join("\n")} } function parseTypeMember() { if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { - return parseSignatureMember(178 /* CallSignature */); + return parseSignatureMember(179 /* CallSignature */); } if (token() === 105 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(179 /* ConstructSignature */); + return parseSignatureMember(180 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -30728,10 +30953,10 @@ ${lanes.join("\n")} false ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -30940,7 +31165,7 @@ ${lanes.join("\n")} return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos); } function parseImportType() { - sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); const isTypeOf = parseOptional(114 /* TypeOfKeyword */); parseExpected(102 /* ImportKeyword */); @@ -30965,7 +31190,7 @@ ${lanes.join("\n")} case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 155 /* SymbolKeyword */: case 136 /* BooleanKeyword */: case 157 /* UndefinedKeyword */: @@ -31031,7 +31256,7 @@ ${lanes.join("\n")} case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 148 /* ReadonlyKeyword */: case 155 /* SymbolKeyword */: @@ -31277,8 +31502,8 @@ ${lanes.join("\n")} return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); } function parseType() { - if (contextFlags & 40960 /* TypeExcludesFlags */) { - return doOutsideOfContext(40960 /* TypeExcludesFlags */, parseType); + if (contextFlags & 81920 /* TypeExcludesFlags */) { + return doOutsideOfContext(81920 /* TypeExcludesFlags */, parseType); } if (isStartOfFunctionTypeOrConstructorType()) { return parseFunctionOrConstructorType(); @@ -31399,12 +31624,14 @@ ${lanes.join("\n")} return arrowExpression; } const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); if (expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) { return parseSimpleArrowFunctionExpression( pos, expr, allowReturnTypeInArrowFunction, + hasJSDoc, /*asyncModifier*/ void 0 ); @@ -31450,7 +31677,7 @@ ${lanes.join("\n")} ), pos); } } - function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, asyncModifier) { + function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier) { Debug.assert(token() === 39 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); const parameter = factory2.createParameterDeclaration( /*modifiers*/ @@ -31483,7 +31710,7 @@ ${lanes.join("\n")} equalsGreaterThanToken, body ); - return addJSDocComment(finishNode(node, pos)); + return withJSDoc(finishNode(node, pos), hasJSDoc); } function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { const triState = isParenthesizedArrowFunctionExpression(); @@ -31611,9 +31838,10 @@ ${lanes.join("\n")} if (token() === 134 /* AsyncKeyword */) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const asyncModifier = parseModifiersForArrowFunction(); const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); - return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, asyncModifier); + return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier); } } return void 0; @@ -31667,7 +31895,7 @@ ${lanes.join("\n")} return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 195 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -31730,7 +31958,7 @@ ${lanes.join("\n")} return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 103 /* InKeyword */ || t === 164 /* OfKeyword */; + return t === 103 /* InKeyword */ || t === 165 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -31812,7 +32040,7 @@ ${lanes.join("\n")} if (token() === 43 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 215 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { Debug.assert(isKeywordOrPunctuation(unaryOperator)); @@ -31899,13 +32127,13 @@ ${lanes.join("\n")} let expression; if (token() === 102 /* ImportKeyword */) { if (lookAhead(nextTokenIsOpenParenOrLessThan)) { - sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; expression = parseTokenNode(); } else if (lookAhead(nextTokenIsDot)) { nextToken(); nextToken(); expression = finishNode(factory2.createMetaProperty(102 /* ImportKeyword */, parseIdentifierName()), pos); - sourceFlags |= 4194304 /* PossiblyContainsImportMeta */; + sourceFlags |= 8388608 /* PossiblyContainsImportMeta */; } else { expression = parseMemberExpressionOrHigher(); } @@ -31952,11 +32180,11 @@ ${lanes.join("\n")} const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 285 /* JsxOpeningElement */) { + if (opening.kind === 286 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 283 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -31980,10 +32208,10 @@ ${lanes.join("\n")} } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 288 /* JsxOpeningFragment */) { + } else if (opening.kind === 289 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 284 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 285 /* JsxSelfClosingElement */); result = opening; } if (!mustBeUnary && inExpressionContext && token() === 30 /* LessThanToken */) { @@ -32056,7 +32284,7 @@ ${lanes.join("\n")} if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 283 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -32075,7 +32303,7 @@ ${lanes.join("\n")} return finishNode(factory2.createJsxOpeningFragment(), pos); } const tagName = parseJsxElementName(); - const typeArguments = (contextFlags & 262144 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; + const typeArguments = (contextFlags & 524288 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; const attributes = parseJsxAttributes(); let node; if (token() === 32 /* GreaterThanToken */) { @@ -32253,17 +32481,17 @@ ${lanes.join("\n")} return token() === 29 /* QuestionDotToken */ && lookAhead(nextTokenIsIdentifierOrKeywordOrOpenBracketOrTemplate); } function tryReparseOptionalChain(node) { - if (node.flags & 32 /* OptionalChain */) { + if (node.flags & 64 /* OptionalChain */) { return true; } if (isNonNullExpression(node)) { let expr = node.expression; - while (isNonNullExpression(expr) && !(expr.flags & 32 /* OptionalChain */)) { + while (isNonNullExpression(expr) && !(expr.flags & 64 /* OptionalChain */)) { expr = expr.expression; } - if (expr.flags & 32 /* OptionalChain */) { + if (expr.flags & 64 /* OptionalChain */) { while (isNonNullExpression(node)) { - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node = node.expression; } return true; @@ -32329,7 +32557,7 @@ ${lanes.join("\n")} continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 232 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -32368,8 +32596,8 @@ ${lanes.join("\n")} true ) ); - if (questionDotToken || tag.flags & 32 /* OptionalChain */) { - tagExpression.flags |= 32 /* OptionalChain */; + if (questionDotToken || tag.flags & 64 /* OptionalChain */) { + tagExpression.flags |= 64 /* OptionalChain */; } tagExpression.questionDotToken = questionDotToken; return finishNode(tagExpression, pos); @@ -32392,7 +32620,7 @@ ${lanes.join("\n")} } } if (typeArguments || token() === 21 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32421,7 +32649,7 @@ ${lanes.join("\n")} return result; } function parseTypeArgumentsInExpression() { - if ((contextFlags & 262144 /* JavaScriptFile */) !== 0) { + if ((contextFlags & 524288 /* JavaScriptFile */) !== 0) { return void 0; } if (reScanLessThanToken() !== 30 /* LessThanToken */) { @@ -32553,10 +32781,10 @@ ${lanes.join("\n")} true ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -32650,7 +32878,7 @@ ${lanes.join("\n")} false ); let typeArguments; - if (expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (expression.kind === 233 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32760,7 +32988,7 @@ ${lanes.join("\n")} parseExpected(21 /* OpenParenToken */); let initializer; if (token() !== 27 /* SemicolonToken */) { - if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */) { + if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -32770,7 +32998,7 @@ ${lanes.join("\n")} } } let node; - if (awaitToken ? parseExpected(164 /* OfKeyword */) : parseOptional(164 /* OfKeyword */)) { + if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ true @@ -32794,10 +33022,10 @@ ${lanes.join("\n")} function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 251 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); + parseExpected(kind === 252 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 251 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 252 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -32816,7 +33044,7 @@ ${lanes.join("\n")} const openParenParsed = parseExpected(21 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition); - const statement = doInsideOfContext(33554432 /* InWithStatement */, parseStatement); + const statement = doInsideOfContext(67108864 /* InWithStatement */, parseStatement); return withJSDoc(finishNode(factory2.createWithStatement(expression, statement), pos), hasJSDoc); } function parseCaseClause() { @@ -32956,6 +33184,10 @@ ${lanes.join("\n")} case 86 /* ClassKeyword */: case 94 /* EnumKeyword */: return true; + case 160 /* UsingKeyword */: + return isUsingDeclaration(); + case 135 /* AwaitKeyword */: + return isAwaitUsingDeclaration(); case 120 /* InterfaceKeyword */: case 156 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); @@ -32970,12 +33202,16 @@ ${lanes.join("\n")} case 124 /* ProtectedKeyword */: case 125 /* PublicKeyword */: case 148 /* ReadonlyKeyword */: + const previousToken = token(); nextToken(); if (scanner2.hasPrecedingLineBreak()) { return false; } + if (previousToken === 138 /* DeclareKeyword */ && token() === 156 /* TypeKeyword */) { + return true; + } continue; - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: nextToken(); return token() === 19 /* OpenBraceToken */ || token() === 80 /* Identifier */ || token() === 95 /* ExportKeyword */; case 102 /* ImportKeyword */: @@ -33008,6 +33244,7 @@ ${lanes.join("\n")} case 19 /* OpenBraceToken */: case 115 /* VarKeyword */: case 121 /* LetKeyword */: + case 160 /* UsingKeyword */: case 100 /* FunctionKeyword */: case 86 /* ClassKeyword */: case 94 /* EnumKeyword */: @@ -33037,7 +33274,7 @@ ${lanes.join("\n")} case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: case 156 /* TypeKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: return true; case 129 /* AccessorKeyword */: case 125 /* PublicKeyword */: @@ -33057,6 +33294,36 @@ ${lanes.join("\n")} function isLetDeclaration() { return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuring); } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf() { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine( + /*disallowOf*/ + true + ); + } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf) { + nextToken(); + if (disallowOf && token() === 165 /* OfKeyword */) + return false; + return (isBindingIdentifier() || token() === 19 /* OpenBraceToken */) && !scanner2.hasPrecedingLineBreak(); + } + function isUsingDeclaration() { + return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); + } + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { + return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine( + /*disallowOf*/ + true + ); + } + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) { + if (nextToken() === 160 /* UsingKeyword */) { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); + } + return false; + } + function isAwaitUsingDeclaration() { + return lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine); + } function parseStatement() { switch (token()) { case 27 /* SemicolonToken */: @@ -33083,6 +33350,26 @@ ${lanes.join("\n")} ); } break; + case 135 /* AwaitKeyword */: + if (isAwaitUsingDeclaration()) { + return parseVariableStatement( + getNodePos(), + hasPrecedingJSDocComment(), + /*modifiers*/ + void 0 + ); + } + break; + case 160 /* UsingKeyword */: + if (isUsingDeclaration()) { + return parseVariableStatement( + getNodePos(), + hasPrecedingJSDocComment(), + /*modifiers*/ + void 0 + ); + } + break; case 100 /* FunctionKeyword */: return parseFunctionDeclaration( getNodePos(), @@ -33106,9 +33393,9 @@ ${lanes.join("\n")} case 99 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 88 /* ContinueKeyword */: - return parseBreakOrContinueStatement(250 /* ContinueStatement */); + return parseBreakOrContinueStatement(251 /* ContinueStatement */); case 83 /* BreakKeyword */: - return parseBreakOrContinueStatement(251 /* BreakStatement */); + return parseBreakOrContinueStatement(252 /* BreakStatement */); case 107 /* ReturnKeyword */: return parseReturnStatement(); case 118 /* WithKeyword */: @@ -33142,7 +33429,7 @@ ${lanes.join("\n")} case 129 /* AccessorKeyword */: case 126 /* StaticKeyword */: case 148 /* ReadonlyKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -33167,15 +33454,15 @@ ${lanes.join("\n")} return node; } for (const m of modifiers) { - m.flags |= 16777216 /* Ambient */; + m.flags |= 33554432 /* Ambient */; } - return doInsideOfContext(16777216 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); + return doInsideOfContext(33554432 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); } else { return parseDeclarationWorker(pos, hasJSDoc, modifiers); } } function tryReuseAmbientDeclaration(pos) { - return doInsideOfContext(16777216 /* Ambient */, () => { + return doInsideOfContext(33554432 /* Ambient */, () => { const node = currentNode(parsingContext, pos); if (node) { return consumeNode(node); @@ -33187,6 +33474,8 @@ ${lanes.join("\n")} case 115 /* VarKeyword */: case 121 /* LetKeyword */: case 87 /* ConstKeyword */: + case 160 /* UsingKeyword */: + case 135 /* AwaitKeyword */: return parseVariableStatement(pos, hasJSDoc, modifiersIn); case 100 /* FunctionKeyword */: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); @@ -33198,7 +33487,7 @@ ${lanes.join("\n")} return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); case 94 /* EnumKeyword */: return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); @@ -33218,7 +33507,7 @@ ${lanes.join("\n")} default: if (modifiersIn) { const missing = createMissingNode( - 281 /* MissingDeclaration */, + 282 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -33230,6 +33519,9 @@ ${lanes.join("\n")} return void 0; } } + function nextTokenIsStringLiteral() { + return nextToken() === 11 /* StringLiteral */; + } function nextTokenIsIdentifierOrStringLiteralOnSameLine() { nextToken(); return !scanner2.hasPrecedingLineBreak() && (isIdentifier2() || token() === 11 /* StringLiteral */); @@ -33282,14 +33574,14 @@ ${lanes.join("\n")} function parseObjectBindingPattern() { const pos = getNodePos(); parseExpected(19 /* OpenBraceToken */); - const elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); + const elements = allowInAnd(() => parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement)); parseExpected(20 /* CloseBraceToken */); return finishNode(factory2.createObjectBindingPattern(elements), pos); } function parseArrayBindingPattern() { const pos = getNodePos(); parseExpected(23 /* OpenBracketToken */); - const elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); + const elements = allowInAnd(() => parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement)); parseExpected(24 /* CloseBracketToken */); return finishNode(factory2.createArrayBindingPattern(elements), pos); } @@ -33336,12 +33628,20 @@ ${lanes.join("\n")} case 87 /* ConstKeyword */: flags |= 2 /* Const */; break; + case 160 /* UsingKeyword */: + flags |= 4 /* Using */; + break; + case 135 /* AwaitKeyword */: + Debug.assert(isAwaitUsingDeclaration()); + flags |= 6 /* AwaitUsing */; + nextToken(); + break; default: Debug.fail(); } nextToken(); let declarations; - if (token() === 164 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -33447,7 +33747,7 @@ ${lanes.join("\n")} function parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken) { const exclamationToken = !questionToken && !scanner2.hasPrecedingLineBreak() ? parseOptionalToken(54 /* ExclamationToken */) : void 0; const type = parseTypeAnnotation(); - const initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer); + const initializer = doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */ | 8192 /* DisallowInContext */, parseInitializer); parseSemicolonAfterPropertyName(name, type, initializer); const node = factory2.createPropertyDeclaration( modifiers, @@ -33487,7 +33787,7 @@ ${lanes.join("\n")} false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 176 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -33653,10 +33953,10 @@ ${lanes.join("\n")} return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); } if (token() === 137 /* ConstructorKeyword */ || token() === 11 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); @@ -33671,9 +33971,9 @@ ${lanes.join("\n")} const isAmbient = some(modifiers, isDeclareModifier); if (isAmbient) { for (const m of modifiers) { - m.flags |= 16777216 /* Ambient */; + m.flags |= 33554432 /* Ambient */; } - return doInsideOfContext(16777216 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); + return doInsideOfContext(33554432 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); } else { return parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers); } @@ -33704,10 +34004,10 @@ ${lanes.join("\n")} true ); if (token() === 86 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 230 /* ClassExpression */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 231 /* ClassExpression */); } const missing = createMissingNode( - 281 /* MissingDeclaration */, + 282 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -33722,11 +34022,11 @@ ${lanes.join("\n")} hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 230 /* ClassExpression */ + 231 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 262 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 263 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); @@ -33747,7 +34047,7 @@ ${lanes.join("\n")} members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 262 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 263 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { @@ -33773,7 +34073,7 @@ ${lanes.join("\n")} function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (expression.kind === 233 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -33799,6 +34099,9 @@ ${lanes.join("\n")} } function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { parseExpected(156 /* TypeKeyword */); + if (scanner2.hasPrecedingLineBreak()) { + parseErrorAtCurrentToken(Diagnostics.Line_break_not_permitted_here); + } const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(64 /* EqualsToken */); @@ -33839,7 +34142,7 @@ ${lanes.join("\n")} return finishNode(factory2.createModuleBlock(statements), pos); } function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) { - const namespaceFlag = flags & 16 /* Namespace */; + const namespaceFlag = flags & 32 /* Namespace */; const name = parseIdentifier(); const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration( getNodePos(), @@ -33847,7 +34150,7 @@ ${lanes.join("\n")} false, /*modifiers*/ void 0, - 4 /* NestedNamespace */ | namespaceFlag + 8 /* NestedNamespace */ | namespaceFlag ) : parseModuleBlock(); const node = factory2.createModuleDeclaration(modifiers, name, body, flags); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -33855,9 +34158,9 @@ ${lanes.join("\n")} function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; let name; - if (token() === 161 /* GlobalKeyword */) { + if (token() === 162 /* GlobalKeyword */) { name = parseIdentifier(); - flags |= 1024 /* GlobalAugmentation */; + flags |= 2048 /* GlobalAugmentation */; } else { name = parseLiteralNode(); name.text = internIdentifier(name.text); @@ -33873,10 +34176,10 @@ ${lanes.join("\n")} } function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; - if (token() === 161 /* GlobalKeyword */) { + if (token() === 162 /* GlobalKeyword */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); } else if (parseOptional(145 /* NamespaceKeyword */)) { - flags |= 16 /* Namespace */; + flags |= 32 /* Namespace */; } else { parseExpected(144 /* ModuleKeyword */); if (token() === 11 /* StringLiteral */) { @@ -33914,7 +34217,7 @@ ${lanes.join("\n")} identifier = parseIdentifier(); } let isTypeOnly = false; - if (token() !== 160 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { + if (token() !== 161 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { isTypeOnly = true; identifier = isIdentifier2() ? parseIdentifier() : void 0; } @@ -33926,7 +34229,7 @@ ${lanes.join("\n")} token() === 42 /* AsteriskToken */ || // import * token() === 19 /* OpenBraceToken */) { importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(160 /* FromKeyword */); + parseExpected(161 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); let assertClause; @@ -33991,7 +34294,7 @@ ${lanes.join("\n")} return token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */; } function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 28 /* CommaToken */ || token() === 160 /* FromKeyword */; + return token() === 28 /* CommaToken */ || token() === 161 /* FromKeyword */; } function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { parseExpected(64 /* EqualsToken */); @@ -34004,7 +34307,7 @@ ${lanes.join("\n")} function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(28 /* CommaToken */)) { - namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(274 /* NamedImports */); + namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(275 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -34040,15 +34343,15 @@ ${lanes.join("\n")} } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 274 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); + const node = kind === 275 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(280 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(281 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(275 /* ImportSpecifier */); + return parseImportOrExportSpecifier(276 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -34092,10 +34395,10 @@ ${lanes.join("\n")} parseExpected(130 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 275 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 276 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 275 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 276 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -34122,12 +34425,12 @@ ${lanes.join("\n")} if (parseOptional(130 /* AsKeyword */)) { exportClause = parseNamespaceExport(namespaceExportPos); } - parseExpected(160 /* FromKeyword */); + parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(278 /* NamedExports */); - if (token() === 160 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { - parseExpected(160 /* FromKeyword */); + exportClause = parseNamedImportsOrExports(279 /* NamedExports */); + if (token() === 161 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { + parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } } @@ -34232,7 +34535,7 @@ ${lanes.join("\n")} function parseJSDocTypeExpression(mayOmitBraces) { const pos = getNodePos(); const hasBrace = (mayOmitBraces ? parseOptional : parseExpected)(19 /* OpenBraceToken */); - const type = doInsideOfContext(8388608 /* JSDoc */, parseJSDocType); + const type = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); if (!mayOmitBraces || hasBrace) { parseExpectedJSDoc(20 /* CloseBraceToken */); } @@ -34271,7 +34574,7 @@ ${lanes.join("\n")} void 0, 1 /* JS */ ); - const jsDoc = doInsideOfContext(8388608 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); + const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); const sourceFile = { languageVariant: 0 /* Standard */, text: content }; const diagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); clearState(); @@ -34282,9 +34585,9 @@ ${lanes.join("\n")} const saveToken = currentToken; const saveParseDiagnosticsLength = parseDiagnostics.length; const saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; - const comment = doInsideOfContext(8388608 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); + const comment = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); setParent(comment, parent2); - if (contextFlags & 262144 /* JavaScriptFile */) { + if (contextFlags & 524288 /* JavaScriptFile */) { if (!jsDocDiagnostics) { jsDocDiagnostics = []; } @@ -34765,7 +35068,7 @@ ${lanes.join("\n")} switch (node.kind) { case 151 /* ObjectKeyword */: return true; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -34781,7 +35084,7 @@ ${lanes.join("\n")} typeExpression = tryParseTypeExpression(); } const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); - const nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent3); + const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent3); if (nestedTypeLiteral) { typeExpression = nestedTypeLiteral; isNameFirst = true; @@ -34795,14 +35098,14 @@ ${lanes.join("\n")} let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) { - if (child.kind === 347 /* JSDocParameterTag */ || child.kind === 354 /* JSDocPropertyTag */) { + if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) { children = append(children, child); - } else if (child.kind === 351 /* JSDocTemplateTag */) { + } else if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 187 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -34937,11 +35240,11 @@ ${lanes.join("\n")} let jsDocPropertyTags; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent3))) { - if (child.kind === 351 /* JSDocTemplateTag */) { + if (child.kind === 352 /* JSDocTemplateTag */) { break; } hasChildren = true; - if (child.kind === 350 /* JSDocTypeTag */) { + if (child.kind === 351 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -34956,7 +35259,7 @@ ${lanes.join("\n")} } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 187 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -34985,12 +35288,12 @@ ${lanes.join("\n")} void 0, typeNameOrNamespaceName, body, - nested ? 4 /* NestedNamespace */ : void 0 + nested ? 8 /* NestedNamespace */ : void 0 ); return finishNode(jsDocNamespaceNode, start2); } if (nested) { - typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */; + typeNameOrNamespaceName.flags |= 4096 /* IdentifierIsInJSDocNamespace */; } return typeNameOrNamespaceName; } @@ -34999,7 +35302,7 @@ ${lanes.join("\n")} let child; let parameters; while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent3))) { - if (child.kind === 351 /* JSDocTemplateTag */) { + if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); break; } @@ -35012,7 +35315,7 @@ ${lanes.join("\n")} const returnTag = tryParse(() => { if (parseOptionalJsdoc(60 /* AtToken */)) { const tag = parseTag(indent3); - if (tag && tag.kind === 348 /* JSDocReturnTag */) { + if (tag && tag.kind === 349 /* JSDocReturnTag */) { return tag; } } @@ -35067,7 +35370,7 @@ ${lanes.join("\n")} case 60 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent3); - if (child && (child.kind === 347 /* JSDocParameterTag */ || child.kind === 354 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -35132,7 +35435,7 @@ ${lanes.join("\n")} if (isBracketed) { skipWhitespace(); parseExpected(64 /* EqualsToken */); - defaultType = doInsideOfContext(8388608 /* JSDoc */, parseJSDocType); + defaultType = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); parseExpected(24 /* CloseBracketToken */); } if (nodeIsMissing(name)) { @@ -35582,7 +35885,7 @@ ${lanes.join("\n")} })(IncrementalParser || (IncrementalParser = {})); namedArgRegExCache = /* @__PURE__ */ new Map(); tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/im; - singleLinePragmaRegEx = /^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im; + singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im; } }); @@ -35968,7 +36271,7 @@ ${lanes.join("\n")} function convertConfigFileToObject(sourceFile, errors, jsonConversionNotifier) { var _a; const rootExpression = (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression; - if (rootExpression && rootExpression.kind !== 209 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -36020,7 +36323,7 @@ ${lanes.join("\n")} var _a; const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 302 /* PropertyAssignment */) { + if (element.kind !== 303 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -36065,15 +36368,15 @@ ${lanes.join("\n")} return valueExpression.text; case 9 /* NumericLiteral */: return Number(valueExpression.text); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: if (valueExpression.operator !== 41 /* MinusToken */ || valueExpression.operand.kind !== 9 /* NumericLiteral */) { break; } return -Number(valueExpression.operand.text); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: const objectLiteralExpression = valueExpression; return convertObjectLiteralExpressionToJson(objectLiteralExpression, option); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return convertArrayLiteralExpressionToJson( valueExpression.elements, option && option.element @@ -36456,8 +36759,8 @@ ${lanes.join("\n")} const fileName = configFileName || "tsconfig.json"; const diagnosticMessage = Diagnostics.The_files_list_in_config_file_0_is_empty; const nodeValue = forEachTsConfigPropArray(sourceFile, "files", (property) => property.initializer); - const error = createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnosticMessage, fileName); - errors.push(error); + const error2 = createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnosticMessage, fileName); + errors.push(error2); } else { createCompilerDiagnosticOnlyIfJson(Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json"); } @@ -36564,8 +36867,8 @@ ${lanes.join("\n")} } } } - function isErrorNoInputFiles(error) { - return error.code === Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code; + function isErrorNoInputFiles(error2) { + return error2.code === Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code; } function getErrorForNoInputFiles({ includeSpecs, excludeSpecs }, configFileName) { return createCompilerDiagnostic( @@ -36586,7 +36889,7 @@ ${lanes.join("\n")} if (shouldReportNoInputFiles(fileNames, canJsonReportNoInutFiles)) { configParseDiagnostics.push(getErrorForNoInputFiles(configFileSpecs, configFileName)); } else { - filterMutate(configParseDiagnostics, (error) => !isErrorNoInputFiles(error)); + filterMutate(configParseDiagnostics, (error2) => !isErrorNoInputFiles(error2)); } return existingErrors !== configParseDiagnostics.length; } @@ -36994,19 +37297,19 @@ ${lanes.join("\n")} const wildcardFiles = arrayFrom(wildcardFileMap.values()); return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values())); } - function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames, currentDirectory) { + function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) { const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec; if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs)) return false; basePath = normalizePath(basePath); - const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames); + const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2); if (validatedFilesSpec) { for (const fileName of validatedFilesSpec) { if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck) return false; } } - return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath); + return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath); } function invalidDotDotAfterRecursiveWildcard(s) { const wildcardIndex = startsWith(s, "**/") ? 0 : s.indexOf("/**/"); @@ -37016,17 +37319,17 @@ ${lanes.join("\n")} const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../"); return lastDotIndex > wildcardIndex; } - function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) { + function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) { return matchesExcludeWorker( pathToCheck, filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)), - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, currentDirectory ); } - function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) { + function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) { const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude"); - const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames); + const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2); if (!excludeRegex) return false; if (excludeRegex.test(pathToCheck)) @@ -37056,9 +37359,9 @@ ${lanes.join("\n")} return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec]; } } - function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames) { + function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames2) { const rawExcludeRegex = getRegularExpressionForWildcard(exclude, path, "exclude"); - const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i"); + const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? "" : "i"); const wildcardDirectories = {}; if (include !== void 0) { const recursiveKeys = []; @@ -37067,7 +37370,7 @@ ${lanes.join("\n")} if (excludeRegex && excludeRegex.test(spec)) { continue; } - const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames); + const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2); if (match) { const { key, flags } = match; const existingFlags = wildcardDirectories[key]; @@ -37082,7 +37385,7 @@ ${lanes.join("\n")} for (const key in wildcardDirectories) { if (hasProperty(wildcardDirectories, key)) { for (const recursiveKey of recursiveKeys) { - if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) { + if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames2)) { delete wildcardDirectories[key]; } } @@ -37091,20 +37394,20 @@ ${lanes.join("\n")} } return wildcardDirectories; } - function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames) { + function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) { const match = wildcardDirectoryPattern.exec(spec); if (match) { const questionWildcardIndex = spec.indexOf("?"); const starWildcardIndex = spec.indexOf("*"); const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator); return { - key: useCaseSensitiveFileNames ? match[0] : toFileNameLowerCase(match[0]), + key: useCaseSensitiveFileNames2 ? match[0] : toFileNameLowerCase(match[0]), flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */ }; } if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) { return { - key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : toFileNameLowerCase(spec)), + key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames2 ? spec : toFileNameLowerCase(spec)), flags: 1 /* Recursive */ }; } @@ -37254,6 +37557,7 @@ ${lanes.join("\n")} ["es2015.symbol", "lib.es2015.symbol.d.ts"], ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], ["es2016.array.include", "lib.es2016.array.include.d.ts"], + ["es2017.date", "lib.es2017.date.d.ts"], ["es2017.object", "lib.es2017.object.d.ts"], ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], ["es2017.string", "lib.es2017.string.d.ts"], @@ -37289,14 +37593,18 @@ ${lanes.join("\n")} ["es2022.string", "lib.es2022.string.d.ts"], ["es2022.regexp", "lib.es2022.regexp.d.ts"], ["es2023.array", "lib.es2023.array.d.ts"], + ["es2023.collection", "lib.es2023.collection.d.ts"], ["esnext.array", "lib.es2023.array.d.ts"], + ["esnext.collection", "lib.es2023.collection.d.ts"], ["esnext.symbol", "lib.es2019.symbol.d.ts"], ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], ["esnext.intl", "lib.esnext.intl.d.ts"], + ["esnext.disposable", "lib.esnext.disposable.d.ts"], ["esnext.bigint", "lib.es2020.bigint.d.ts"], ["esnext.string", "lib.es2022.string.d.ts"], ["esnext.promise", "lib.es2021.promise.d.ts"], ["esnext.weakref", "lib.es2021.weakref.d.ts"], + ["esnext.decorators", "lib.esnext.decorators.d.ts"], ["decorators", "lib.decorators.d.ts"], ["decorators.legacy", "lib.decorators.legacy.d.ts"] ]; @@ -37704,6 +38012,7 @@ ${lanes.join("\n")} { name: "checkJs", type: "boolean", + affectsModuleResolution: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, @@ -37930,7 +38239,7 @@ ${lanes.join("\n")} strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any, - defaultValueDescription: false + defaultValueDescription: Diagnostics.false_unless_strict_is_set }, { name: "alwaysStrict", @@ -38784,6 +39093,18 @@ ${lanes.join("\n")} result.push("JSON"); return result.join(", "); } + function extensionsToExtensionsArray(extensions) { + const result = []; + if (extensions & 1 /* TypeScript */) + result.push(...supportedTSImplementationExtensions); + if (extensions & 2 /* JavaScript */) + result.push(...supportedJSExtensionsFlat); + if (extensions & 4 /* Declaration */) + result.push(...supportedDeclarationExtensions); + if (extensions & 8 /* Json */) + result.push(".json" /* Json */); + return result; + } function resolvedTypeScriptOnly(resolved) { if (!resolved) { return void 0; @@ -38956,8 +39277,8 @@ ${lanes.join("\n")} return typeRoots; } function arePathsEqual(path1, path2, host) { - const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; - return comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0 /* EqualTo */; + const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; + return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */; } function getOriginalAndResolvedFileName(fileName, host, traceEnabled) { const resolvedFileName = realPath(fileName, host, traceEnabled); @@ -39260,7 +39581,7 @@ ${lanes.join("\n")} return str + "}"; } function getKeyForCompilerOptions(options, affectingOptionDeclarations) { - return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + (options.pathsBasePath ? `|${options.pathsBasePath}` : void 0); + return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + `|${options.pathsBasePath}`; } function createCacheWithRedirects(ownOptions) { const redirectsMap = /* @__PURE__ */ new Map(); @@ -40220,7 +40541,7 @@ ${lanes.join("\n")} arrayIsEqualTo ); for (const conditions of conditionSets) { - const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions }; + const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions, host }; const exportResolutions = loadEntrypointsFromExportMap( packageJsonInfo, packageJsonInfo.contents.packageJsonContent.exports, @@ -40252,23 +40573,42 @@ ${lanes.join("\n")} return entrypoints; function loadEntrypointsFromTargetExports(target) { var _a, _b; - if (typeof target === "string" && startsWith(target, "./") && target.indexOf("*") === -1) { - const partsAfterFirst = getPathComponents(target).slice(2); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { - return false; - } - const resolvedTarget = combinePaths(scope.packageDirectory, target); - const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); - const result = loadFileNameFromPackageJsonField( - extensions, - finalPath, - /*onlyRecordFailures*/ - false, - state - ); - if (result) { - entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path); - return true; + if (typeof target === "string" && startsWith(target, "./")) { + if (target.indexOf("*") >= 0 && state.host.readDirectory) { + if (target.indexOf("*") !== target.lastIndexOf("*")) { + return false; + } + state.host.readDirectory( + scope.packageDirectory, + extensionsToExtensionsArray(extensions), + /*excludes*/ + void 0, + [changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))] + ).forEach((entry) => { + entrypoints = appendIfUnique(entrypoints, { + path: entry, + ext: getAnyExtensionFromPath(entry), + resolvedUsingTsExtension: void 0 + }); + }); + } else { + const partsAfterFirst = getPathComponents(target).slice(2); + if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { + return false; + } + const resolvedTarget = combinePaths(scope.packageDirectory, target); + const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); + const result = loadFileNameFromPackageJsonField( + extensions, + finalPath, + /*onlyRecordFailures*/ + false, + state + ); + if (result) { + entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path); + return true; + } } } else if (Array.isArray(target)) { for (const t of target) { @@ -40477,6 +40817,9 @@ ${lanes.join("\n")} } const trailingParts = parts.slice(nameParts.length); const subpath = !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`; + if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) { + return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference); + } const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference); @@ -40824,13 +41167,10 @@ ${lanes.join("\n")} function combineDirectoryPath(root, dir) { return ensureTrailingDirectorySeparator(combinePaths(root, dir)); } - function useCaseSensitiveFileNames() { - return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); - } function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { var _a, _b, _c, _d; - if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames()) : true)) { - const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames }); + if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { + const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses = []; if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName)); @@ -40859,7 +41199,7 @@ ${lanes.join("\n")} for (const commonSourceDirGuess of commonSourceDirGuesses) { const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess); for (const candidateDir of candidateDirectories) { - if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) { + if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) { const pathFragment = finalPath.slice(candidateDir.length + 1); const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment); const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */]; @@ -40869,7 +41209,7 @@ ${lanes.join("\n")} for (const possibleExt of inputExts) { if (!extensionIsOk(extensions, possibleExt)) continue; - const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames()); + const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state)); if (state.host.fileExists(possibleInputWithInputExtension)) { return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField( extensions, @@ -40943,11 +41283,13 @@ ${lanes.join("\n")} const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); if (priorityExtensions) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, formatExtensions(priorityExtensions)); const result = lookup(priorityExtensions); if (result) return result; } if (secondaryExtensions && !typesScopeOnly) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0, formatExtensions(secondaryExtensions)); return lookup(secondaryExtensions); } function lookup(extensions2) { @@ -41283,6 +41625,9 @@ ${lanes.join("\n")} trace(state.host, diagnostic, ...args); } } + function useCaseSensitiveFileNames(state) { + return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); + } var typeScriptVersion, nodeModulesAtTypes, NodeResolutionFeatures, nodeModulesPathPart, mangledScopedPackageSeparator; var init_moduleNameResolver = __esm({ "src/compiler/moduleNameResolver.ts"() { @@ -41331,23 +41676,23 @@ ${lanes.join("\n")} } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 278 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 279 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -41361,7 +41706,7 @@ ${lanes.join("\n")} return state; } break; - case 267 /* ModuleBlock */: { + case 268 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -41380,10 +41725,10 @@ ${lanes.join("\n")} }); return state; } - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 80 /* Identifier */: - if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { return 0 /* NonInstantiated */; } } @@ -41413,6 +41758,9 @@ ${lanes.join("\n")} if (found === 1 /* Instantiated */) { return found; } + if (statement.kind === 271 /* ImportEqualsDeclaration */) { + found = 1 /* Instantiated */; + } } } if (found !== void 0) { @@ -41546,7 +41894,7 @@ ${lanes.join("\n")} } } function getDeclarationName(node) { - if (node.kind === 276 /* ExportAssignment */) { + if (node.kind === 277 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -41555,7 +41903,7 @@ ${lanes.join("\n")} const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -41580,31 +41928,31 @@ ${lanes.join("\n")} return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return "__constructor" /* Constructor */; - case 183 /* FunctionType */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: + case 184 /* FunctionType */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: return "__call" /* Call */; - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: return "__new" /* New */; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return "__index" /* Index */; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return "export=" /* ExportEquals */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); break; - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 168 /* Parameter */: - Debug.assert(node.parent.kind === 323 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 169 /* Parameter */: + Debug.assert(node.parent.kind === 324 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); const functionType = node.parent; const index = functionType.parameters.indexOf(node); return "arg" + index; @@ -41651,7 +41999,7 @@ ${lanes.join("\n")} messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 276 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 277 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -41690,7 +42038,7 @@ ${lanes.join("\n")} function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 280 /* ExportSpecifier */ || node.kind === 270 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { Debug.assertNode(container, canHaveLocals); @@ -41706,7 +42054,7 @@ ${lanes.join("\n")} } else { if (isJSDocTypeAlias(node)) Debug.assert(isInJSFile(node)); - if (!isAmbientModule(node) && (hasExportModifier || container.flags & 64 /* ExportContext */)) { + if (!isAmbientModule(node) && (hasExportModifier || container.flags & 128 /* ExportContext */)) { if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } @@ -41757,7 +42105,7 @@ ${lanes.join("\n")} const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 218 /* ArrowFunction */) { + if (node.kind !== 219 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -41779,35 +42127,35 @@ ${lanes.join("\n")} const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 174 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 175 /* Constructor */ || isInJSFile(node) && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; activeLabelList = void 0; hasExplicitReturn = false; bindChildren(node); - node.flags &= ~2816 /* ReachabilityAndEmitFlags */; + node.flags &= ~5632 /* ReachabilityAndEmitFlags */; if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && nodeIsPresent(node.body)) { - node.flags |= 256 /* HasImplicitReturn */; + node.flags |= 512 /* HasImplicitReturn */; if (hasExplicitReturn) - node.flags |= 512 /* HasExplicitReturn */; + node.flags |= 1024 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 175 /* Constructor */ || node.kind === 174 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */)) { + if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -41824,7 +42172,7 @@ ${lanes.join("\n")} seenThisKeyword = false; bindChildren(node); Debug.assertNotNode(node, isIdentifier); - node.flags = seenThisKeyword ? node.flags | 128 /* ContainsThis */ : node.flags & ~128 /* ContainsThis */; + node.flags = seenThisKeyword ? node.flags | 256 /* ContainsThis */ : node.flags & ~256 /* ContainsThis */; } else { bindChildren(node); } @@ -41833,8 +42181,8 @@ ${lanes.join("\n")} blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 261 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 261 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 262 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 262 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -41854,59 +42202,59 @@ ${lanes.join("\n")} inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 242 /* FirstStatement */ && node.kind <= 258 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: bindWhileStatement(node); break; - case 245 /* DoStatement */: + case 246 /* DoStatement */: bindDoStatement(node); break; - case 247 /* ForStatement */: + case 248 /* ForStatement */: bindForStatement(node); break; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 244 /* IfStatement */: + case 245 /* IfStatement */: bindIfStatement(node); break; - case 252 /* ReturnStatement */: - case 256 /* ThrowStatement */: + case 253 /* ReturnStatement */: + case 257 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: bindTryStatement(node); break; - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: bindSwitchStatement(node); break; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: bindCaseBlock(node); break; - case 295 /* CaseClause */: + case 296 /* CaseClause */: bindCaseClause(node); break; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: bindLabeledStatement(node); break; - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -41914,49 +42262,49 @@ ${lanes.join("\n")} } bindBinaryExpressionFlow(node); break; - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: bindCallExpressionFlow(node); break; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 311 /* SourceFile */: { + case 312 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 240 /* Block */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 268 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: bindBindingElementFlow(node); break; - case 168 /* Parameter */: + case 169 /* Parameter */: bindParameterFlow(node); break; - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: - case 302 /* PropertyAssignment */: - case 229 /* SpreadElement */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: + case 303 /* PropertyAssignment */: + case 230 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -41970,19 +42318,19 @@ ${lanes.join("\n")} case 80 /* Identifier */: case 81 /* PrivateIdentifier */: case 110 /* ThisKeyword */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return hasNarrowableArgument(expr); - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return expr.operator === 54 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -42001,7 +42349,7 @@ ${lanes.join("\n")} } } } - if (expr.expression.kind === 210 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -42032,9 +42380,9 @@ ${lanes.join("\n")} } function isNarrowableOperand(expr) { switch (expr.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 64 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -42107,21 +42455,21 @@ ${lanes.join("\n")} function isStatementCondition(node) { const parent3 = node.parent; switch (parent3.kind) { - case 244 /* IfStatement */: - case 246 /* WhileStatement */: - case 245 /* DoStatement */: + case 245 /* IfStatement */: + case 247 /* WhileStatement */: + case 246 /* DoStatement */: return parent3.expression === node; - case 247 /* ForStatement */: - case 226 /* ConditionalExpression */: + case 248 /* ForStatement */: + case 227 /* ConditionalExpression */: return parent3.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 216 /* ParenthesizedExpression */) { + if (node.kind === 217 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 223 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { + } else if (node.kind === 224 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { node = node.operand; } else { return isLogicalOrCoalescingBinaryExpression(node); @@ -42164,7 +42512,7 @@ ${lanes.join("\n")} } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 255 /* LabeledStatement */) { + while (label && node.parent.kind === 256 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -42215,12 +42563,12 @@ ${lanes.join("\n")} bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 249 /* ForOfStatement */) { + if (node.kind === 250 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 260 /* VariableDeclarationList */) { + if (node.initializer.kind !== 261 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -42242,7 +42590,7 @@ ${lanes.join("\n")} } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 252 /* ReturnStatement */) { + if (node.kind === 253 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -42259,7 +42607,7 @@ ${lanes.join("\n")} return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 251 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 252 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -42329,7 +42677,7 @@ ${lanes.join("\n")} preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 296 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 297 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -42372,7 +42720,7 @@ ${lanes.join("\n")} maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { const call = node; if (call.expression.kind !== 108 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); @@ -42398,7 +42746,7 @@ ${lanes.join("\n")} currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { + if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -42407,21 +42755,21 @@ ${lanes.join("\n")} function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 208 /* ArrayLiteralExpression */) { + } else if (node.kind === 209 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 229 /* SpreadElement */) { + if (e.kind === 230 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 209 /* ObjectLiteralExpression */) { + } else if (node.kind === 210 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 302 /* PropertyAssignment */) { + if (p.kind === 303 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 303 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 304 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 304 /* SpreadAssignment */) { + } else if (p.kind === 305 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -42552,7 +42900,7 @@ ${lanes.join("\n")} const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 64 /* EqualsToken */ && node.left.kind === 211 /* ElementAccessExpression */) { + if (operator === 64 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -42580,7 +42928,7 @@ ${lanes.join("\n")} } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 210 /* PropertyAccessExpression */) { + if (node.expression.kind === 211 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -42645,7 +42993,7 @@ ${lanes.join("\n")} } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 346 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 347 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive( node.fullName, @@ -42660,7 +43008,7 @@ ${lanes.join("\n")} function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 173 /* MethodDeclaration */) { + if (host && host.kind !== 174 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -42673,15 +43021,15 @@ ${lanes.join("\n")} } function bindOptionalChainRest(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -42728,7 +43076,7 @@ ${lanes.join("\n")} bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 217 /* FunctionExpression */ || expr.kind === 218 /* ArrowFunction */) { + if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -42739,7 +43087,7 @@ ${lanes.join("\n")} } } } - if (node.expression.kind === 210 /* PropertyAccessExpression */) { + if (node.expression.kind === 211 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -42754,39 +43102,39 @@ ${lanes.join("\n")} } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 311 /* SourceFile */: + case 312 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 209 /* ObjectLiteralExpression */: - case 263 /* InterfaceDeclaration */: - case 291 /* JsxAttributes */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 210 /* ObjectLiteralExpression */: + case 264 /* InterfaceDeclaration */: + case 292 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 329 /* JSDocSignature */: - case 180 /* IndexSignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 323 /* JSDocFunctionType */: - case 174 /* ClassStaticBlockDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 199 /* MappedType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 330 /* JSDocSignature */: + case 181 /* IndexSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 324 /* JSDocFunctionType */: + case 175 /* ClassStaticBlockDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 200 /* MappedType */: if (container.locals) Debug.assertNode(container, canHaveLocals); return declareSymbol( @@ -42817,10 +43165,10 @@ ${lanes.join("\n")} return !!body && body.statements.some((s) => isExportDeclaration(s) || isExportAssignment(s)); } function setExportContextFlag(node) { - if (node.flags & 16777216 /* Ambient */ && !hasExportDeclarations(node)) { - node.flags |= 64 /* ExportContext */; + if (node.flags & 33554432 /* Ambient */ && !hasExportDeclarations(node)) { + node.flags |= 128 /* ExportContext */; } else { - node.flags &= ~64 /* ExportContext */; + node.flags &= ~128 /* ExportContext */; } } function bindModuleDeclaration(node) { @@ -42888,10 +43236,10 @@ ${lanes.join("\n")} } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -42923,7 +43271,7 @@ ${lanes.join("\n")} const saveCurrentFlow = currentFlow; for (const typeAlias of delayedTypeAliases) { const host = typeAlias.parent.parent; - container = findAncestor(host.parent, (n) => !!(getContainerFlags(n) & 1 /* IsContainer */)) || file; + container = getEnclosingContainer(host) || file; blockScopeContainer = getEnclosingBlockScopeContainer(host) || file; currentFlow = initFlowNode({ flags: 2 /* Start */ }); parent2 = typeAlias; @@ -42981,7 +43329,7 @@ ${lanes.join("\n")} currentFlow = saveCurrentFlow; } function checkContextualIdentifier(node) { - if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) { + if (!file.parseDiagnostics.length && !(node.flags & 33554432 /* Ambient */) && !(node.flags & 16777216 /* JSDoc */) && !isIdentifierName(node)) { const originalKeywordKind = identifierToKeywordKind(node); if (originalKeywordKind === void 0) { return; @@ -42999,14 +43347,14 @@ ${lanes.join("\n")} Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, declarationNameToString(node) )); - } else if (node.flags & 32768 /* AwaitContext */) { + } else if (node.flags & 65536 /* AwaitContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node) )); } - } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { + } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 16384 /* YieldContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, @@ -43094,7 +43442,7 @@ ${lanes.join("\n")} } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 311 /* SourceFile */ && blockScopeContainer.kind !== 266 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 312 /* SourceFile */ && blockScopeContainer.kind !== 267 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -43156,7 +43504,7 @@ ${lanes.join("\n")} node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 164 /* LastToken */) { + if (node.kind > 165 /* LastToken */) { const saveParent = parent2; parent2 = node; const containerFlags = getContainerFlags(node); @@ -43213,7 +43561,7 @@ ${lanes.join("\n")} function bindWorker(node) { switch (node.kind) { case 80 /* Identifier */: - if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { let parentNode = node.parent; while (parentNode && !isJSDocTypeAlias(parentNode)) { parentNode = parentNode.parent; @@ -43222,23 +43570,23 @@ ${lanes.join("\n")} break; } case 110 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 303 /* ShorthandPropertyAssignment */)) { + if (currentFlow && (isExpression(node) || parent2.kind === 304 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: case 108 /* SuperKeyword */: node.flowNode = currentFlow; break; case 81 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -43257,7 +43605,7 @@ ${lanes.join("\n")} ); } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -43292,81 +43640,81 @@ ${lanes.join("\n")} Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return checkStrictModeCatchClause(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return checkStrictModeWithStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 196 /* ThisType */: + case 197 /* ThisType */: seenThisKeyword = true; return; - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return bindTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return bindParameter(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return bindPropertyWorker(node); - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 305 /* EnumMember */: + case 306 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return declareSymbolAndAddToSymbolTable( node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */ ); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 183 /* FunctionType */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 185 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 199 /* MappedType */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 200 /* MappedType */: return bindAnonymousTypeWorker(node); - case 338 /* JSDocClassTag */: + case 339 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return bindFunctionExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -43384,60 +43732,60 @@ ${lanes.join("\n")} bindCallExpression(node); } break; - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return bindJsxAttributes(node); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 270 /* ImportEqualsDeclaration */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 271 /* ImportEqualsDeclaration */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return bindImportClause(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return bindExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return bindExportAssignment(node); - case 311 /* SourceFile */: + case 312 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 240 /* Block */: + case 241 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 347 /* JSDocParameterTag */: - if (node.parent.kind === 329 /* JSDocSignature */) { + case 348 /* JSDocParameterTag */: + if (node.parent.kind === 330 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 328 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 329 /* JSDocTypeLiteral */) { break; } - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 322 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 323 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return bind(node.typeExpression); } } @@ -43589,8 +43937,8 @@ ${lanes.join("\n")} false ); switch (thisContainer.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 64 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -43608,12 +43956,12 @@ ${lanes.join("\n")} addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -43630,7 +43978,7 @@ ${lanes.join("\n")} ); } break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -43639,7 +43987,7 @@ ${lanes.join("\n")} declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */); } break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: break; default: Debug.failBadSyntaxKind(thisContainer); @@ -43667,7 +44015,7 @@ ${lanes.join("\n")} function bindSpecialPropertyDeclaration(node) { if (node.expression.kind === 110 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 311 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 312 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -43716,7 +44064,7 @@ ${lanes.join("\n")} } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 311 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 312 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces( namespaceSymbol, node.arguments[0], @@ -43830,7 +44178,7 @@ ${lanes.join("\n")} declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 311 /* SourceFile */ : propertyAccess.parent.parent.kind === 311 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 312 /* SourceFile */ : propertyAccess.parent.parent.kind === 312 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -43892,7 +44240,7 @@ ${lanes.join("\n")} } } function bindClassLikeDeclaration(node) { - if (node.kind === 262 /* ClassDeclaration */) { + if (node.kind === 263 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -43921,7 +44269,7 @@ ${lanes.join("\n")} checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 259 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -43934,10 +44282,10 @@ ${lanes.join("\n")} } } function bindParameter(node) { - if (node.kind === 347 /* JSDocParameterTag */ && container.kind !== 329 /* JSDocSignature */) { + if (node.kind === 348 /* JSDocParameterTag */ && container.kind !== 330 /* JSDocSignature */) { return; } - if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { + if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) { checkStrictModeEvalOrArguments(node, node.name); } if (isBindingPattern(node.name)) { @@ -43951,9 +44299,9 @@ ${lanes.join("\n")} } } function bindFunctionDeclaration(node) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */)) { + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) { if (isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + emitFlags |= 4096 /* HasAsyncFunctions */; } } checkStrictModeFunctionName(node); @@ -43965,9 +44313,9 @@ ${lanes.join("\n")} } } function bindFunctionExpression(node) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */)) { + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) { if (isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + emitFlags |= 4096 /* HasAsyncFunctions */; } } if (currentFlow) { @@ -43978,8 +44326,8 @@ ${lanes.join("\n")} return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); } function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */) && isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */) && isAsyncFunction(node)) { + emitFlags |= 4096 /* HasAsyncFunctions */; } if (currentFlow && isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { node.flowNode = currentFlow; @@ -44007,7 +44355,7 @@ ${lanes.join("\n")} } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 194 /* InferType */) { + } else if (node.parent.kind === 195 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { Debug.assertNode(container2, canHaveLocals); @@ -44038,14 +44386,14 @@ ${lanes.join("\n")} if (currentFlow === unreachableFlow) { const reportError = ( // report error on all statements except empty ones - isStatementButNotDeclaration(node) && node.kind !== 241 /* EmptyStatement */ || // report error on class declarations - node.kind === 262 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - node.kind === 266 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) + isStatementButNotDeclaration(node) && node.kind !== 242 /* EmptyStatement */ || // report error on class declarations + node.kind === 263 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + node.kind === 267 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) ); if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { - const isError = unreachableCodeIsError(options) && !(node.flags & 16777216 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 3 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer)); + const isError = unreachableCodeIsError(options) && !(node.flags & 33554432 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 7 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer)); eachUnreachableRange(node, (start, end) => errorOrSuggestionOnRange(isError, start, end, Diagnostics.Unreachable_code_detected)); } } @@ -44064,16 +44412,16 @@ ${lanes.join("\n")} } function isExecutableStatement(s) { return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && !isEnumDeclaration(s) && // `var x;` may declare a variable used above - !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & (1 /* Let */ | 2 /* Const */)) && s.declarationList.declarations.some((d) => !d.initializer)); + !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & 7 /* BlockScoped */) && s.declarationList.declarations.some((d) => !d.initializer)); } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -44108,54 +44456,54 @@ ${lanes.join("\n")} } function getContainerFlags(node) { switch (node.kind) { - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 291 /* JsxAttributes */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 292 /* JsxAttributes */: return 1 /* IsContainer */; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 199 /* MappedType */: - case 180 /* IndexSignature */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 200 /* MappedType */: + case 181 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: - case 323 /* JSDocFunctionType */: - case 183 /* FunctionType */: - case 179 /* ConstructSignature */: - case 184 /* ConstructorType */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: + case 324 /* JSDocFunctionType */: + case 184 /* FunctionType */: + case 180 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 175 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 298 /* CatchClause */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 268 /* CaseBlock */: + case 299 /* CatchClause */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 269 /* CaseBlock */: return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - case 240 /* Block */: + case 241 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; } return 0 /* None */; @@ -44173,7 +44521,7 @@ ${lanes.join("\n")} return (_d = (_c = container.symbol) == null ? void 0 : _c.exports) == null ? void 0 : _d.get(name); } } - var ModuleInstanceState, binder; + var ModuleInstanceState, ContainerFlags, binder; var init_binder = __esm({ "src/compiler/binder.ts"() { "use strict"; @@ -44185,6 +44533,18 @@ ${lanes.join("\n")} ModuleInstanceState2[ModuleInstanceState2["ConstEnumOnly"] = 2] = "ConstEnumOnly"; return ModuleInstanceState2; })(ModuleInstanceState || {}); + ContainerFlags = /* @__PURE__ */ ((ContainerFlags2) => { + ContainerFlags2[ContainerFlags2["None"] = 0] = "None"; + ContainerFlags2[ContainerFlags2["IsContainer"] = 1] = "IsContainer"; + ContainerFlags2[ContainerFlags2["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; + ContainerFlags2[ContainerFlags2["IsControlFlowContainer"] = 4] = "IsControlFlowContainer"; + ContainerFlags2[ContainerFlags2["IsFunctionLike"] = 8] = "IsFunctionLike"; + ContainerFlags2[ContainerFlags2["IsFunctionExpression"] = 16] = "IsFunctionExpression"; + ContainerFlags2[ContainerFlags2["HasLocals"] = 32] = "HasLocals"; + ContainerFlags2[ContainerFlags2["IsInterface"] = 64] = "IsInterface"; + ContainerFlags2[ContainerFlags2["IsObjectLiteralOrClassExpressionMethodOrAccessor"] = 128] = "IsObjectLiteralOrClassExpressionMethodOrAccessor"; + return ContainerFlags2; + })(ContainerFlags || {}); binder = /* @__PURE__ */ createBinder(); } }); @@ -44331,7 +44691,7 @@ ${lanes.join("\n")} symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 185 /* TypeQuery */) { + if (d.type && d.type.kind === 186 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -44746,7 +45106,7 @@ ${lanes.join("\n")} if (originalExportSymbol === d.symbol) return topNamespace.parent.parent; function getTopNamespace(namespaceDeclaration) { - while (namespaceDeclaration.flags & 4 /* NestedNamespace */) { + while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { namespaceDeclaration = namespaceDeclaration.parent; } return namespaceDeclaration; @@ -44776,7 +45136,9 @@ ${lanes.join("\n")} for (const { ending, value } of candidates) { if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) { const matchedStar = value.substring(prefix.length, value.length - suffix.length); - return pathIsRelative(matchedStar) ? void 0 : key.replace("*", matchedStar); + if (!pathIsRelative(matchedStar)) { + return key.replace("*", matchedStar); + } } } } else if (some(candidates, (c) => c.ending !== 0 /* Minimal */ && pattern === c.value) || some(candidates, (c) => c.ending === 0 /* Minimal */ && pattern === c.value && validateEnding(c))) { @@ -44848,7 +45210,7 @@ ${lanes.join("\n")} for (const key of getOwnKeys(exports)) { if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = exports[key]; - const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions); + const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode); if (result) { return result; } @@ -45163,6 +45525,7 @@ ${lanes.join("\n")} var moduleKind = getEmitModuleKind(compilerOptions); var legacyDecorators = !!compilerOptions.experimentalDecorators; var useDefineForClassFields = getUseDefineForClassFields(compilerOptions); + var emitStandardClassFields = getEmitStandardClassFields(compilerOptions); var allowSyntheticDefaultImports = getAllowSyntheticDefaultImports(compilerOptions); var strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks"); var strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes"); @@ -45190,6 +45553,10 @@ ${lanes.join("\n")} var isolatedModulesLikeFlagName = compilerOptions.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"; var canCollectSymbolAliasAccessabilityData = !compilerOptions.verbatimModuleSyntax || !!compilerOptions.importsNotUsedAsValues; var apparentArgumentCount; + var lastGetCombinedNodeFlagsNode; + var lastGetCombinedNodeFlagsResult = 0 /* None */; + var lastGetCombinedModifierFlagsNode; + var lastGetCombinedModifierFlagsResult = 0 /* None */; const checker = { getNodeCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.nodeCount, 0), getIdentifierCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.identifierCount, 0), @@ -45249,7 +45616,7 @@ ${lanes.join("\n")} return node ? getTypeFromTypeNode(node) : errorType; }, getParameterType: getTypeAtPosition, - getParameterIdentifierNameAtPosition, + getParameterIdentifierInfoAtPosition, getPromisedTypeOfPromise, getAwaitedType: (type) => getAwaitedType(type), getReturnTypeOfSignature, @@ -45367,13 +45734,24 @@ ${lanes.join("\n")} getTypeOfPropertyOfContextualType, getFullyQualifiedName, getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */), - getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray) => runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - 32 /* IsForStringLiteralArgumentCompletions */ - )), + getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) => { + if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) { + return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( + call, + candidatesOutArray, + /*argumentCount*/ + void 0, + checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ + )); + } + return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( + call, + candidatesOutArray, + /*argumentCount*/ + void 0, + checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ + )); + }, getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)), getExpandedParameters, hasEffectiveRestParameter, @@ -45547,7 +45925,7 @@ ${lanes.join("\n")} Debug.assert(!!(getNodeLinks(file).flags & 1 /* TypeChecked */)); diagnostics2 = addRange(diagnostics2, suggestionDiagnostics.getDiagnostics(file.fileName)); checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(file), (containingNode, kind, diag2) => { - if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 16777216 /* Ambient */))) { + if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) { (diagnostics2 || (diagnostics2 = [])).push({ ...diag2, category: 2 /* Suggestion */ }); } }); @@ -45573,14 +45951,19 @@ ${lanes.join("\n")} typeHasCallOrConstructSignatures }; function runWithoutResolvedSignatureCaching(node, fn) { - const containingCall = findAncestor(node, isCallLikeExpression); - const containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; - if (containingCall) { - getNodeLinks(containingCall).resolvedSignature = void 0; + const cachedSignatures = []; + while (node) { + if (isCallLikeExpression(node)) { + const nodeLinks2 = getNodeLinks(node); + const resolvedSignature = nodeLinks2.resolvedSignature; + cachedSignatures.push([nodeLinks2, resolvedSignature]); + nodeLinks2.resolvedSignature = void 0; + } + node = node.parent; } const result = fn(); - if (containingCall) { - getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + for (const [nodeLinks2, resolvedSignature] of cachedSignatures) { + nodeLinks2.resolvedSignature = resolvedSignature; } return result; } @@ -45886,7 +46269,7 @@ ${lanes.join("\n")} }; var amalgamatedDuplicates; var reverseMappedCache = /* @__PURE__ */ new Map(); - var inInferTypeForHomomorphicMappedType = false; + var homomorphicMappedTypeInferenceStack = []; var ambientModulesCache; var patternAmbientModules; var patternAmbientModuleAugmentations; @@ -45927,6 +46310,8 @@ ${lanes.join("\n")} var deferredGlobalImportMetaType; var deferredGlobalImportMetaExpressionType; var deferredGlobalImportCallOptionsType; + var deferredGlobalDisposableType; + var deferredGlobalAsyncDisposableType; var deferredGlobalExtractSymbol; var deferredGlobalOmitSymbol; var deferredGlobalAwaitedSymbol; @@ -46098,14 +46483,14 @@ ${lanes.join("\n")} } } function errorSkippedOn(key, location, message, ...args) { - const diagnostic = error(location, message, ...args); + const diagnostic = error2(location, message, ...args); diagnostic.skippedOn = key; return diagnostic; } function createError(location, message, ...args) { return location ? createDiagnosticForNode(location, message, ...args) : createCompilerDiagnostic(message, ...args); } - function error(location, message, ...args) { + function error2(location, message, ...args) { const diagnostic = createError(location, message, ...args); diagnostics.add(diagnostic); return diagnostic; @@ -46129,7 +46514,7 @@ ${lanes.join("\n")} addErrorOrSuggestion(isError, "message" in message ? createDiagnosticForNode(location, message, ...args) : createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(location), location, message)); } function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, ...args) { - const diagnostic = error(location, message, ...args); + const diagnostic = error2(location, message, ...args); if (maybeMissingAwait) { const related = createDiagnosticForNode(location, Diagnostics.Did_you_forget_to_use_await); addRelatedInfo(diagnostic, related); @@ -46155,7 +46540,7 @@ ${lanes.join("\n")} return !!symbol.valueDeclaration && isDeprecatedDeclaration2(symbol.valueDeclaration) || length(symbol.declarations) && every(symbol.declarations, isDeprecatedDeclaration2); } function isDeprecatedDeclaration2(declaration) { - return !!(getCombinedNodeFlags(declaration) & 268435456 /* Deprecated */); + return !!(getCombinedNodeFlagsCached(declaration) & 536870912 /* Deprecated */); } function addDeprecatedSuggestion(location, declarations, deprecatedEntity) { const diagnostic = createDiagnosticForNode(location, Diagnostics._0_is_deprecated, deprecatedEntity); @@ -46275,7 +46660,7 @@ ${lanes.join("\n")} } } else if (target.flags & 1024 /* NamespaceModule */) { if (target !== globalThisSymbol) { - error( + error2( source.declarations && getNameOfDeclaration(source.declarations[0]), Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target) @@ -46369,7 +46754,7 @@ ${lanes.join("\n")} if (isGlobalScopeAugmentation(moduleAugmentation)) { mergeSymbolTable(globals, moduleAugmentation.symbol.exports); } else { - const moduleNotFoundError = !(moduleName.parent.parent.flags & 16777216 /* Ambient */) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : void 0; + const moduleNotFoundError = !(moduleName.parent.parent.flags & 33554432 /* Ambient */) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : void 0; let mainModule = resolveExternalModuleNameWorker( moduleName, moduleName, @@ -46405,7 +46790,7 @@ ${lanes.join("\n")} mergeSymbol(mainModule, moduleAugmentation.symbol); } } else { - error(moduleName, Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, moduleName.text); + error2(moduleName, Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, moduleName.text); } } } @@ -46433,7 +46818,7 @@ ${lanes.join("\n")} return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 311 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 312 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function getSymbol2(symbols, name, meaning) { if (meaning) { @@ -46444,7 +46829,7 @@ ${lanes.join("\n")} return symbol; } if (symbol.flags & 2097152 /* Alias */) { - const targetFlags = getAllSymbolFlags(symbol); + const targetFlags = getSymbolFlags(symbol); if (targetFlags & meaning) { return symbol; } @@ -46467,7 +46852,7 @@ ${lanes.join("\n")} const useFile = getSourceFileOfNode(usage); const declContainer = getEnclosingBlockScopeContainer(declaration); if (declarationFile !== useFile) { - if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !outFile(compilerOptions) || isInTypeQuery(usage) || declaration.flags & 16777216 /* Ambient */) { + if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !outFile(compilerOptions) || isInTypeQuery(usage) || declaration.flags & 33554432 /* Ambient */) { return true; } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { @@ -46477,13 +46862,13 @@ ${lanes.join("\n")} return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 207 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 207 /* BindingElement */); + if (declaration.kind === 208 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 259 /* VariableDeclaration */), usage); - } else if (declaration.kind === 259 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 260 /* VariableDeclaration */), usage); + } else if (declaration.kind === 260 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -46495,21 +46880,21 @@ ${lanes.join("\n")} false ); } else if (isParameterPropertyDeclaration(declaration, declaration.parent)) { - return !(getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration)); + return !(emitStandardClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration)); } return true; } - if (usage.parent.kind === 280 /* ExportSpecifier */ || usage.parent.kind === 276 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 281 /* ExportSpecifier */ || usage.parent.kind === 277 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 276 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) { return true; } - if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { + if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { return true; } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { - if (getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ && useDefineForClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { + if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { return !isPropertyImmediatelyReferencedWithinDeclaration( declaration, usage, @@ -46523,9 +46908,9 @@ ${lanes.join("\n")} return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 242 /* VariableStatement */: - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: + case 243 /* VariableStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -46550,7 +46935,7 @@ ${lanes.join("\n")} const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 173 /* MethodDeclaration */) { + if (declaration2.kind === 174 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -46564,7 +46949,7 @@ ${lanes.join("\n")} } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 171 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -46583,15 +46968,15 @@ ${lanes.join("\n")} return "quit"; } switch (node.kind) { - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 240 /* Block */: + case 241 /* Block */: switch (node.parent.kind) { - case 176 /* GetAccessor */: - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: return true; default: return false; @@ -46621,19 +47006,19 @@ ${lanes.join("\n")} } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 175 /* Constructor */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: return false; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 302 /* PropertyAssignment */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 303 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasStaticModifier(node)) { - return target < 99 /* ESNext */ || !useDefineForClassFields; + return !emitStandardClassFields; } return requiresScopeChangeWorker(node.name); default: @@ -46672,7 +47057,7 @@ ${lanes.join("\n")} if (name === "const" && isConstAssertion(location)) { return void 0; } - if (isModuleDeclaration(location) && lastLocation && location.name === lastLocation) { + if (isModuleOrEnumDeclaration(location) && lastLocation && location.name === lastLocation) { lastLocation = location; location = location.parent; } @@ -46680,17 +47065,17 @@ ${lanes.join("\n")} if (result = lookup(location.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 326 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 168 /* Parameter */ || lastLocation.kind === 347 /* JSDocParameterTag */ || lastLocation.kind === 348 /* JSDocReturnTag */ || lastLocation.kind === 167 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 327 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 348 /* JSDocParameterTag */ || lastLocation.kind === 349 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 168 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 169 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 193 /* ConditionalType */) { + } else if (location.kind === 194 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -46702,13 +47087,13 @@ ${lanes.join("\n")} } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const moduleExports = ((_a = getSymbolOfDeclaration(location)) == null ? void 0 : _a.exports) || emptySymbols; - if (location.kind === 311 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 312 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 33554432 /* Ambient */ && !isGlobalScopeAugmentation(location)) { if (result = moduleExports.get("default" /* Default */)) { const localSymbol = getLocalSymbolForExportDefault(result); if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { @@ -46717,7 +47102,7 @@ ${lanes.join("\n")} result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 280 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 279 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 281 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 280 /* NamespaceExport */))) { break; } } @@ -46729,10 +47114,10 @@ ${lanes.join("\n")} } } break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { - if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 16777216 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { - error( + if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 33554432 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { + error2( errorLocation, Diagnostics.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead, unescapeLeadingUnderscores(name), @@ -46743,7 +47128,7 @@ ${lanes.join("\n")} break loop; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -46754,9 +47139,9 @@ ${lanes.join("\n")} } } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -46764,7 +47149,7 @@ ${lanes.join("\n")} } if (lastLocation && isStatic(lastLocation)) { if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.Static_members_cannot_reference_class_type_parameters); + error2(errorLocation, Diagnostics.Static_members_cannot_reference_class_type_parameters); } return void 0; } @@ -46778,43 +47163,43 @@ ${lanes.join("\n")} } } break; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: if (lastLocation === location.expression && location.parent.token === 96 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) { if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters); + error2(errorLocation, Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters); } return void 0; } } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 263 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 264 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); + error2(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); } return void 0; } } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -46827,37 +47212,37 @@ ${lanes.join("\n")} } } break; - case 169 /* Decorator */: - if (location.parent && location.parent.kind === 168 /* Parameter */) { + case 170 /* Decorator */: + if (location.parent && location.parent.kind === 169 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 262 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 263 /* ClassDeclaration */)) { location = location.parent; } break; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 194 /* InferType */: + case 195 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -46866,7 +47251,7 @@ ${lanes.join("\n")} } } break; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: if (lastLocation && lastLocation === location.propertyName && location.parent.parent.moduleSpecifier) { location = location.parent.parent.parent; } @@ -46904,8 +47289,8 @@ ${lanes.join("\n")} } } function checkAndReportErrorForInvalidInitializer() { - if (propertyWithInvalidInitializer && !(useDefineForClassFields && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */)) { - error( + if (propertyWithInvalidInitializer && !emitStandardClassFields) { + error2( errorLocation, errorLocation && propertyWithInvalidInitializer.type && textRangeContainsPositionInclusive(propertyWithInvalidInitializer.type, errorLocation.pos) ? Diagnostics.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor : Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, declarationNameToString(propertyWithInvalidInitializer.name), @@ -46918,14 +47303,14 @@ ${lanes.join("\n")} if (!result) { if (nameNotFoundMessage) { addLazyDiagnostic(() => { - if (!errorLocation || errorLocation.parent.kind !== 330 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 + if (!errorLocation || errorLocation.parent.kind !== 331 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 !checkAndReportErrorForInvalidInitializer() && !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingNamespaceAsTypeOrValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { let suggestion; let suggestedLib; if (nameArg) { suggestedLib = getSuggestedLibForNonExistentName(nameArg); if (suggestedLib) { - error(errorLocation, nameNotFoundMessage, diagnosticName(nameArg), suggestedLib); + error2(errorLocation, nameNotFoundMessage, diagnosticName(nameArg), suggestedLib); } } if (!suggestedLib && getSpellingSuggestions && suggestionCount < maximumSuggestionCount) { @@ -46954,7 +47339,7 @@ ${lanes.join("\n")} } } if (!suggestion && !suggestedLib && nameArg) { - error(errorLocation, nameNotFoundMessage, diagnosticName(nameArg)); + error2(errorLocation, nameNotFoundMessage, diagnosticName(nameArg)); } suggestionCount++; } @@ -46972,7 +47357,7 @@ ${lanes.join("\n")} checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } - if (result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(originalLocation.flags & 8388608 /* JSDoc */)) { + if (result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(originalLocation.flags & 16777216 /* JSDoc */)) { const merged = getMergedSymbol(result); if (length(merged.declarations) && every(merged.declarations, (d) => isNamespaceExportDeclaration(d) || isSourceFile(d) && !!d.symbol.globalExports)) { errorOrSuggestion(!compilerOptions.allowUmdGlobalAccess, errorLocation, Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, unescapeLeadingUnderscores(name)); @@ -46982,18 +47367,18 @@ ${lanes.join("\n")} const candidate = getMergedSymbol(getLateBoundSymbol(result)); const root = getRootDeclaration(associatedDeclarationForContainingInitializerOrBindingName); if (candidate === getSymbolOfDeclaration(associatedDeclarationForContainingInitializerOrBindingName)) { - error(errorLocation, Diagnostics.Parameter_0_cannot_reference_itself, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name)); + error2(errorLocation, Diagnostics.Parameter_0_cannot_reference_itself, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name)); } else if (candidate.valueDeclaration && candidate.valueDeclaration.pos > associatedDeclarationForContainingInitializerOrBindingName.pos && root.parent.locals && lookup(root.parent.locals, candidate.escapedName, meaning) === candidate) { - error(errorLocation, Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), declarationNameToString(errorLocation)); + error2(errorLocation, Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), declarationNameToString(errorLocation)); } } if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */); if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 279 /* NamespaceExport */ ? 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 message = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? 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 unescapedName = unescapeLeadingUnderscores(name); addTypeOnlyDeclarationRelatedInfo( - error(errorLocation, message, unescapedName), + error2(errorLocation, message, unescapedName), typeOnlyDeclaration, unescapedName ); @@ -47010,14 +47395,14 @@ ${lanes.join("\n")} diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 279 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 218 /* ArrowFunction */ && location.kind !== 217 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 171 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 219 /* ArrowFunction */ && location.kind !== 218 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 172 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -47029,12 +47414,12 @@ ${lanes.join("\n")} } function isSelfReferenceLocation(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 266 /* ModuleDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 267 /* ModuleDeclaration */: return true; default: return false; @@ -47046,7 +47431,7 @@ ${lanes.join("\n")} function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 167 /* TypeParameter */) { + if (decl.kind === 168 /* TypeParameter */) { const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent2 === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -47076,13 +47461,13 @@ ${lanes.join("\n")} } const constructorType = getTypeOfSymbol(classSymbol); if (getPropertyOfType(constructorType, name)) { - error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, diagnosticName(nameArg), symbolToString(classSymbol)); + error2(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, diagnosticName(nameArg), symbolToString(classSymbol)); return true; } if (location === container && !isStatic(location)) { const instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType; if (getPropertyOfType(instanceType, name)) { - error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, diagnosticName(nameArg)); + error2(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, diagnosticName(nameArg)); return true; } } @@ -47099,7 +47484,7 @@ ${lanes.join("\n")} /*ignoreErrors*/ true )) { - error(errorLocation, Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements, getTextOfNode(expression)); + error2(errorLocation, Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements, getTextOfNode(expression)); return true; } return false; @@ -47107,9 +47492,9 @@ ${lanes.join("\n")} function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -47138,7 +47523,7 @@ ${lanes.join("\n")} const propName = parent2.right.escapedText; const propType = getPropertyOfType(getDeclaredTypeOfSymbol(symbol), propName); if (propType) { - error( + error2( parent2, Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, unescapeLeadingUnderscores(name), @@ -47147,7 +47532,7 @@ ${lanes.join("\n")} return true; } } - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name)); return true; } } @@ -47167,7 +47552,7 @@ ${lanes.join("\n")} false )); if (symbol && !(symbol.flags & 1920 /* Namespace */)) { - error(errorLocation, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, unescapeLeadingUnderscores(name)); return true; } } @@ -47177,8 +47562,8 @@ ${lanes.join("\n")} return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 280 /* ExportSpecifier */) { - error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 281 /* ExportSpecifier */) { + error2(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } return false; @@ -47187,9 +47572,9 @@ ${lanes.join("\n")} if (meaning & 111551 /* Value */) { if (isPrimitiveTypeName(name)) { if (isExtendedByInterface(errorLocation)) { - error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name)); } else { - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name)); } return true; } @@ -47204,15 +47589,15 @@ ${lanes.join("\n")} /*isUse*/ false )); - const allFlags = symbol && getAllSymbolFlags(symbol); + const allFlags = symbol && getSymbolFlags(symbol); if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) { const rawName = unescapeLeadingUnderscores(name); if (isES2015OrLaterConstructorName(name)) { - error(errorLocation, Diagnostics._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, rawName); + error2(errorLocation, Diagnostics._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, rawName); } else if (maybeMappedType(errorLocation, symbol)) { - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === "K" ? "P" : "K"); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === "K" ? "P" : "K"); } else { - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName); } return true; } @@ -47268,7 +47653,7 @@ ${lanes.join("\n")} false )); if (symbol) { - error( + error2( errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_value, unescapeLeadingUnderscores(name) @@ -47288,7 +47673,7 @@ ${lanes.join("\n")} false )); if (symbol) { - error(errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_type, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_type, unescapeLeadingUnderscores(name)); return true; } } @@ -47301,19 +47686,19 @@ ${lanes.join("\n")} return; } const declaration = (_a = result.declarations) == null ? void 0 : _a.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 265 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 266 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); - if (!(declaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { + if (!(declaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { let diagnosticMessage; const declarationName = declarationNameToString(getNameOfDeclaration(declaration)); if (result.flags & 2 /* BlockScopedVariable */) { - diagnosticMessage = error(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationName); + diagnosticMessage = error2(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationName); } else if (result.flags & 32 /* Class */) { - diagnosticMessage = error(errorLocation, Diagnostics.Class_0_used_before_its_declaration, declarationName); + diagnosticMessage = error2(errorLocation, Diagnostics.Class_0_used_before_its_declaration, declarationName); } else if (result.flags & 256 /* RegularEnum */) { - diagnosticMessage = error(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); + diagnosticMessage = error2(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { addRelatedInfo( @@ -47328,13 +47713,13 @@ ${lanes.join("\n")} } function getAnyImportSyntax(node) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return node; - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.parent; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.parent; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -47344,7 +47729,7 @@ ${lanes.join("\n")} return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); } function isAliasSymbolDeclaration2(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 269 /* NamespaceExportDeclaration */ || node.kind === 272 /* ImportClause */ && !!node.name || node.kind === 273 /* NamespaceImport */ || node.kind === 279 /* NamespaceExport */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 280 /* ExportSpecifier */ || node.kind === 276 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 303 /* ShorthandPropertyAssignment */ || node.kind === 302 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 259 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 207 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 304 /* ShorthandPropertyAssignment */ || node.kind === 303 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 260 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -47355,7 +47740,7 @@ ${lanes.join("\n")} const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; } - if (isVariableDeclaration(node) || node.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 283 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -47384,11 +47769,11 @@ ${lanes.join("\n")} false ) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node)); - const isExport = typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */; + const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */; 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 = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; - const name = typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); - addRelatedInfo(error(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); + const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + addRelatedInfo(error2(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); } } function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) { @@ -47493,7 +47878,7 @@ ${lanes.join("\n")} const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; const exportEqualsSymbol = moduleSymbol.exports.get("export=" /* ExportEquals */); const exportAssignment = exportEqualsSymbol.valueDeclaration; - const err = error(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName); + const err = error2(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName); if (exportAssignment) { addRelatedInfo(err, createDiagnosticForNode( exportAssignment, @@ -47529,15 +47914,15 @@ ${lanes.join("\n")} } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.parent.moduleSpecifier; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -47546,14 +47931,14 @@ ${lanes.join("\n")} function reportNonDefaultExport(moduleSymbol, node) { var _a, _b, _c; if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has(node.symbol.escapedName)) { - error( + error2( node.name, Diagnostics.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead, symbolToString(moduleSymbol), symbolToString(node.symbol) ); } else { - const diagnostic = error(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); + const diagnostic = error2(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); const exportStar = (_b = moduleSymbol.exports) == null ? void 0 : _b.get("__export" /* ExportStar */); if (exportStar) { const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find((decl) => { @@ -47704,7 +48089,7 @@ ${lanes.join("\n")} const suggestion = getSuggestedSymbolForNonexistentModule(name, targetSymbol); if (suggestion !== void 0) { const suggestionName = symbolToString(suggestion); - const diagnostic = error(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); + const diagnostic = error2(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); if (suggestion.valueDeclaration) { addRelatedInfo( diagnostic, @@ -47713,7 +48098,7 @@ ${lanes.join("\n")} } } else { if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has("default" /* Default */)) { - error( + error2( name, Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, @@ -47731,10 +48116,10 @@ ${lanes.join("\n")} if (localSymbol) { const exportedEqualsSymbol = exports == null ? void 0 : exports.get("export=" /* ExportEquals */); if (exportedEqualsSymbol) { - getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) : error(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) : error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); } else { const exportedSymbol = exports ? find(symbolsToArray(exports), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0; - const diagnostic = exportedSymbol ? error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); + const diagnostic = exportedSymbol ? error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); if (localSymbol.declarations) { addRelatedInfo( diagnostic, @@ -47743,20 +48128,20 @@ ${lanes.join("\n")} } } } else { - error(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); } } function reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) { if (moduleKind >= 5 /* ES2015 */) { const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error(name, message, declarationName); + error2(name, message, declarationName); } else { if (isInJSFile(node)) { const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error(name, message, declarationName); + error2(name, message, declarationName); } else { const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import : Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error(name, message, declarationName, declarationName, moduleName); + error2(name, message, declarationName, declarationName, moduleName); } } } @@ -47870,26 +48255,26 @@ ${lanes.join("\n")} } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: - case 259 /* VariableDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 260 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 275 /* ImportSpecifier */: - case 207 /* BindingElement */: + case 276 /* ImportSpecifier */: + case 208 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 276 /* ExportAssignment */: - case 225 /* BinaryExpression */: + case 277 /* ExportAssignment */: + case 226 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return resolveEntityName( node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -47897,10 +48282,10 @@ ${lanes.join("\n")} true, dontRecursivelyResolve ); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -47926,7 +48311,7 @@ ${lanes.join("\n")} if (links.aliasTarget === resolvingSymbol) { links.aliasTarget = target || unknownSymbol; } else { - error(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); + error2(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); } } else if (links.aliasTarget === resolvingSymbol) { links.aliasTarget = unknownSymbol; @@ -47940,11 +48325,23 @@ ${lanes.join("\n")} } return void 0; } - function getAllSymbolFlags(symbol) { - let flags = symbol.flags; + function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) { + const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol); + const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration); + const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName( + typeOnlyDeclaration.moduleSpecifier, + typeOnlyDeclaration.moduleSpecifier, + /*ignoreErrors*/ + true + ) : resolveAlias(typeOnlyDeclaration.symbol)); + const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0; + let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags; let seenSymbols; while (symbol.flags & 2097152 /* Alias */) { - const target = resolveAlias(symbol); + const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol)); + if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) { + break; + } if (target === unknownSymbol) { return 67108863 /* All */; } @@ -48001,8 +48398,8 @@ ${lanes.join("\n")} return links.typeOnlyDeclaration || void 0; } if (links.typeOnlyDeclaration) { - const resolved = links.typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); - return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; + const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); + return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; } return void 0; } @@ -48013,7 +48410,11 @@ ${lanes.join("\n")} const symbol = getSymbolOfDeclaration(node); const target = resolveAlias(symbol); if (target) { - const markAlias = target === unknownSymbol || getAllSymbolFlags(target) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); + const markAlias = target === unknownSymbol || getSymbolFlags( + symbol, + /*excludeTypeOnlyMeanings*/ + true + ) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -48028,7 +48429,7 @@ ${lanes.join("\n")} if (!node) return Debug.fail(); if (isInternalModuleImportEqualsDeclaration(node)) { - if (getAllSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) { + if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) { checkExpressionCached(node.moduleReference); } } @@ -48044,7 +48445,7 @@ ${lanes.join("\n")} if (entityName.kind === 80 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 165 /* QualifiedName */) { + if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) { return resolveEntityName( entityName, 1920 /* Namespace */, @@ -48053,7 +48454,7 @@ ${lanes.join("\n")} dontResolveAlias ); } else { - Debug.assert(entityName.parent.kind === 270 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 271 /* ImportEqualsDeclaration */); return resolveEntityName( entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -48126,9 +48527,9 @@ ${lanes.join("\n")} if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 165 /* QualifiedName */ || name.kind === 210 /* PropertyAccessExpression */) { - const left = name.kind === 165 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 165 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 166 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) { + const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName( left, namespaceMeaning, @@ -48162,13 +48563,13 @@ ${lanes.join("\n")} const declarationName = declarationNameToString(right); const suggestionForNonexistentModule = getSuggestedSymbolForNonexistentModule(right, namespace); if (suggestionForNonexistentModule) { - error(right, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule)); + error2(right, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule)); return void 0; } const containingQualifiedName = isQualifiedName(name) && getContainingQualifiedNameNode(name); const canSuggestTypeof = globalObjectType && meaning & 788968 /* Type */ && containingQualifiedName && !isTypeOfExpression(containingQualifiedName.parent) && tryGetQualifiedNameAsValue(containingQualifiedName); if (canSuggestTypeof) { - error( + error2( containingQualifiedName, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, entityNameToString(containingQualifiedName) @@ -48178,7 +48579,7 @@ ${lanes.join("\n")} if (meaning & 1920 /* Namespace */ && isQualifiedName(name.parent)) { const exportedTypeSymbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(namespace), right.escapedText, 788968 /* Type */)); if (exportedTypeSymbol) { - error( + error2( name.parent.right, Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, symbolToString(exportedTypeSymbol), @@ -48187,7 +48588,7 @@ ${lanes.join("\n")} return void 0; } } - error(right, Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName); + error2(right, Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName); } return void 0; } @@ -48195,7 +48596,7 @@ ${lanes.join("\n")} Debug.assertNever(name, "Unknown entity name kind."); } Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 276 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 277 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly( getAliasDeclarationFromName(name), symbol, @@ -48225,7 +48626,7 @@ ${lanes.join("\n")} } } function getAssignmentDeclarationLocation(node) { - const typeAlias = findAncestor(node, (node2) => !(isJSDocNode(node2) || node2.flags & 8388608 /* JSDoc */) ? "quit" : isJSDocTypeAlias(node2)); + const typeAlias = findAncestor(node, (node2) => !(isJSDocNode(node2) || node2.flags & 16777216 /* JSDoc */) ? "quit" : isJSDocTypeAlias(node2)); if (typeAlias) { return; } @@ -48288,11 +48689,11 @@ ${lanes.join("\n")} return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0; } function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i; + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; if (startsWith(moduleReference, "@types/")) { const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1; const withoutAtTypePrefix = removePrefix(moduleReference, "@types/"); - error(errorNode, diag2, withoutAtTypePrefix, moduleReference); + error2(errorNode, diag2, withoutAtTypePrefix, moduleReference); } const ambientModule = tryFindAmbientModule( moduleReference, @@ -48311,20 +48712,23 @@ ${lanes.join("\n")} const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (resolutionDiagnostic) { - error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); + error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) { const importOrExport = ((_g = findAncestor(location, isImportDeclaration)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); if (importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) { - error( + error2( errorNode, Diagnostics.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead, getSuggestedImportSource(Debug.checkDefined(tryExtractTSExtension(moduleReference))) ); } } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); - error(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); + const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { + const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); + error2(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); + } } if (sourceFile.symbol) { if (resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) { @@ -48341,10 +48745,10 @@ ${lanes.join("\n")} if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) { const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration); const overrideClauseHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); - const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_h = overrideClauseHost.assertions) == null ? void 0 : _h.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; + const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_i = overrideClauseHost.assertions) == null ? void 0 : _i.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) { if (findAncestor(location, isImportEqualsDeclaration)) { - error(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); + error2(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); } else { let diagnosticDetails; const ext = tryGetExtensionFromPath2(currentSourceFile.fileName); @@ -48396,7 +48800,7 @@ ${lanes.join("\n")} return getMergedSymbol(sourceFile.symbol); } if (moduleNotFoundError) { - error(errorNode, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); + error2(errorNode, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); } return void 0; } @@ -48413,7 +48817,7 @@ ${lanes.join("\n")} if (resolvedModule && !resolutionExtensionIsTSOrJson(resolvedModule.extension) && resolutionDiagnostic === void 0 || resolutionDiagnostic === Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type) { if (isForAugmentation) { const diag2 = Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented; - error(errorNode, diag2, moduleReference, resolvedModule.resolvedFileName); + error2(errorNode, diag2, moduleReference, resolvedModule.resolvedFileName); } else { errorOnImplicitAnyModule( /*isError*/ @@ -48431,31 +48835,31 @@ ${lanes.join("\n")} if (resolvedModule) { const redirect = host.getProjectReferenceRedirect(resolvedModule.resolvedFileName); if (redirect) { - error(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName); + error2(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName); return void 0; } } if (resolutionDiagnostic) { - error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); + error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } else { const isExtensionlessRelativePathImport = pathIsRelative(moduleReference) && !hasExtension(moduleReference); const resolutionIsNode16OrNext = moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */; if (!getResolveJsonModule(compilerOptions) && fileExtensionIs(moduleReference, ".json" /* Json */) && moduleResolutionKind !== 1 /* Classic */ && hasJsonModuleEmitEnabled(compilerOptions)) { - error(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference); + error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference); } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) { const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path)); - const suggestedExt = (_i = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _i[1]; + const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1]; if (suggestedExt) { - error( + error2( errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt ); } else { - error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); + error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); } } else { - error(errorNode, moduleNotFoundError, moduleReference); + error2(errorNode, moduleNotFoundError, moduleReference); } } } @@ -48519,9 +48923,9 @@ ${lanes.join("\n")} var _a; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 311 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 312 /* SourceFile */)) { const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; - error(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); + error2(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); return symbol; } const referenceParent = referencingLocation.parent; @@ -48876,12 +49280,12 @@ ${lanes.join("\n")} return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol); } function symbolIsValue(symbol, includeTypeOnlyMembers) { - return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getAllSymbolFlags(symbol) & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol))); + return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */); } function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 175 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -48905,7 +49309,7 @@ ${lanes.join("\n")} function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) { const type = createType(kind); type.intrinsicName = intrinsicName; - type.objectFlags = objectFlags; + type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */; return type; } function createObjectType(objectFlags, symbol) { @@ -48999,11 +49403,11 @@ ${lanes.join("\n")} } } switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const sym = getSymbolOfDeclaration(location); if (result = callback( (sym == null ? void 0 : sym.exports) || emptySymbols, @@ -49016,9 +49420,9 @@ ${lanes.join("\n")} return result; } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: let table; (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -49096,7 +49500,7 @@ ${lanes.join("\n")} return [symbol]; } const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => { - if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 280 /* ExportSpecifier */))) { + if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -49141,9 +49545,9 @@ ${lanes.join("\n")} if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 280 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; - const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; + const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { qualify = true; return true; @@ -49156,10 +49560,10 @@ ${lanes.join("\n")} if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: continue; default: return false; @@ -49295,10 +49699,10 @@ ${lanes.join("\n")} return node && getSymbolOfDeclaration(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -49346,9 +49750,9 @@ ${lanes.join("\n")} } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 185 /* TypeQuery */ || entityName.parent.kind === 232 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 166 /* ComputedPropertyName */) { + if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 165 /* QualifiedName */ || entityName.kind === 210 /* PropertyAccessExpression */ || entityName.parent.kind === 270 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -49414,7 +49818,7 @@ ${lanes.join("\n")} return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 311 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 312 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode( 4 /* Unspecified */, @@ -49431,9 +49835,9 @@ ${lanes.join("\n")} function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 184 /* ConstructorType */ : 183 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 179 /* ConstructSignature */ : 178 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -49535,7 +49939,7 @@ ${lanes.join("\n")} return symbolToExpression(symbol, context, meaning); } function withContext(enclosingDeclaration, flags, tracker, cb) { - Debug.assert(enclosingDeclaration === void 0 || (enclosingDeclaration.flags & 8 /* Synthesized */) === 0); + Debug.assert(enclosingDeclaration === void 0 || (enclosingDeclaration.flags & 16 /* Synthesized */) === 0); const moduleResolverHost = (tracker == null ? void 0 : tracker.trackSymbol) ? tracker.moduleResolverHost : flags & 134217728 /* DoNotIncludeSymbolChain */ ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : void 0; const context = { enclosingDeclaration, @@ -49607,7 +50011,7 @@ ${lanes.join("\n")} } if (type.flags & 64 /* BigInt */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(162 /* BigIntKeyword */); + return factory.createKeywordTypeNode(163 /* BigIntKeyword */); } if (type.flags & 16 /* Boolean */ && !type.aliasSymbol) { context.approximateLength += 7; @@ -49880,11 +50284,13 @@ ${lanes.join("\n")} return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2); } function createMappedTypeNodeFromType(type2) { + var _a2; Debug.assert(!!(type2.flags & 524288 /* Object */)); const readonlyToken = type2.declaration.readonlyToken ? factory.createToken(type2.declaration.readonlyToken.kind) : void 0; const questionToken = type2.declaration.questionToken ? factory.createToken(type2.declaration.questionToken.kind) : void 0; let appropriateConstraintTypeNode; let newTypeVariable; + const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type2) && !(getModifiersTypeFromMappedType(type2).flags & 2 /* Unknown */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && !(getConstraintTypeFromMappedType(type2).flags & 262144 /* TypeParameter */ && ((_a2 = getConstraintOfTypeParameter(getConstraintTypeFromMappedType(type2))) == null ? void 0 : _a2.flags) & 4194304 /* Index */); if (isMappedTypeWithKeyofConstraintDeclaration(type2)) { if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) { const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); @@ -49892,6 +50298,11 @@ ${lanes.join("\n")} newTypeVariable = factory.createTypeReferenceNode(name); } appropriateConstraintTypeNode = factory.createTypeOperatorNode(143 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); + } else if (needsModifierPreservingWrapper) { + const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); + const name = typeParameterToName(newParam, context); + newTypeVariable = factory.createTypeReferenceNode(name); + appropriateConstraintTypeNode = newTypeVariable; } else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context); } @@ -49922,6 +50333,18 @@ ${lanes.join("\n")} result, factory.createKeywordTypeNode(146 /* NeverKeyword */) ); + } else if (needsModifierPreservingWrapper) { + return factory.createConditionalTypeNode( + typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context), + factory.createInferTypeNode(factory.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + factory.cloneNode(newTypeVariable.typeName), + factory.createTypeOperatorNode(143 /* KeyOfKeyword */, typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)) + )), + result, + factory.createKeywordTypeNode(146 /* NeverKeyword */) + ); } return result; } @@ -49973,7 +50396,7 @@ ${lanes.join("\n")} const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method some(symbol.declarations, (declaration) => isStatic(declaration)); const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol - forEach(symbol.declarations, (declaration) => declaration.parent.kind === 311 /* SourceFile */ || declaration.parent.kind === 267 /* ModuleBlock */)); + forEach(symbol.declarations, (declaration) => declaration.parent.kind === 312 /* SourceFile */ || declaration.parent.kind === 268 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && // it is type of the symbol uses itself recursively (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); @@ -50056,12 +50479,12 @@ ${lanes.join("\n")} } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 183 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context); return signatureNode; } } @@ -50101,19 +50524,18 @@ ${lanes.join("\n")} const arity = getTypeReferenceArity(type2); const tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, arity), context); if (tupleConstituentNodes) { - if (type2.target.labeledElementDeclarations) { - for (let i = 0; i < tupleConstituentNodes.length; i++) { - const flags = type2.target.elementFlags[i]; + const { labeledElementDeclarations } = type2.target; + for (let i = 0; i < tupleConstituentNodes.length; i++) { + const flags = type2.target.elementFlags[i]; + const labeledElementDeclaration = labeledElementDeclarations == null ? void 0 : labeledElementDeclarations[i]; + if (labeledElementDeclaration) { tupleConstituentNodes[i] = factory.createNamedTupleMember( flags & 12 /* Variable */ ? factory.createToken(26 /* DotDotDotToken */) : void 0, - factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(type2.target.labeledElementDeclarations[i]))), + factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(labeledElementDeclaration))), flags & 2 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i] ); - } - } else { - for (let i = 0; i < Math.min(arity, tupleConstituentNodes.length); i++) { - const flags = type2.target.elementFlags[i]; + } else { tupleConstituentNodes[i] = flags & 12 /* Variable */ ? factory.createRestTypeNode(flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]) : flags & 2 /* Optional */ ? factory.createOptionalTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]; } } @@ -50247,12 +50669,12 @@ ${lanes.join("\n")} } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 178 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -50336,39 +50758,41 @@ ${lanes.join("\n")} if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); for (const signature of signatures) { - const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 172 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } + if (signatures.length || !optionalToken) { + return; + } + } + let propertyTypeNode; + if (shouldUsePlaceholderForProperty(propertySymbol, context)) { + propertyTypeNode = createElidedInformationPlaceholder(context); } else { - let propertyTypeNode; - if (shouldUsePlaceholderForProperty(propertySymbol, context)) { - propertyTypeNode = createElidedInformationPlaceholder(context); - } else { - if (propertyIsReverseMapped) { - context.reverseMappedStack || (context.reverseMappedStack = []); - context.reverseMappedStack.push(propertySymbol); - } - propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */); - if (propertyIsReverseMapped) { - context.reverseMappedStack.pop(); - } + if (propertyIsReverseMapped) { + context.reverseMappedStack || (context.reverseMappedStack = []); + context.reverseMappedStack.push(propertySymbol); } - const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0; - if (modifiers) { - context.approximateLength += 9; + propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */); + if (propertyIsReverseMapped) { + context.reverseMappedStack.pop(); } - const propertySignature = factory.createPropertySignature( - modifiers, - propertyName, - optionalToken, - propertyTypeNode - ); - typeElements.push(preserveCommentsOn(propertySignature)); } + const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0; + if (modifiers) { + context.approximateLength += 9; + } + const propertySignature = factory.createPropertySignature( + modifiers, + propertyName, + optionalToken, + propertyTypeNode + ); + typeElements.push(preserveCommentsOn(propertySignature)); function preserveCommentsOn(node) { var _a2; - if (some(propertySymbol.declarations, (d) => d.kind === 354 /* JSDocPropertyTag */)) { - const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 354 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) { + const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */); const commentText = getTextOfJSDocComment(d.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -50474,6 +50898,7 @@ ${lanes.join("\n")} ); } function signatureToSignatureDeclarationHelper(signature, kind, context, options) { + var _a; const suppressAny = context.flags & 256 /* SuppressAnyReturnType */; if (suppressAny) context.flags &= ~256 /* SuppressAnyReturnType */; @@ -50523,7 +50948,7 @@ ${lanes.join("\n")} } } } - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 175 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); + const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context); if (thisParameter) { parameters.unshift(thisParameter); @@ -50544,11 +50969,11 @@ ${lanes.join("\n")} } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 184 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 178 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 179 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 172 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodDeclaration */ ? factory.createMethodDeclaration( + const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -50560,25 +50985,25 @@ ${lanes.join("\n")} returnTypeNode, /*body*/ void 0 - ) : kind === 175 /* Constructor */ ? factory.createConstructorDeclaration( + ) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration( modifiers, parameters, /*body*/ void 0 - ) : kind === 176 /* GetAccessor */ ? factory.createGetAccessorDeclaration( + ) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration( modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), parameters, returnTypeNode, /*body*/ void 0 - ) : kind === 177 /* SetAccessor */ ? factory.createSetAccessorDeclaration( + ) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration( modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), parameters, /*body*/ void 0 - ) : kind === 180 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 323 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 183 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 184 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 261 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( + ) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 324 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 262 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -50588,7 +51013,7 @@ ${lanes.join("\n")} returnTypeNode, /*body*/ void 0 - ) : kind === 217 /* FunctionExpression */ ? factory.createFunctionExpression( + ) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression( modifiers, /*asteriskToken*/ void 0, @@ -50597,7 +51022,7 @@ ${lanes.join("\n")} parameters, returnTypeNode, factory.createBlock([]) - ) : kind === 218 /* ArrowFunction */ ? factory.createArrowFunction( + ) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction( modifiers, typeParameters, parameters, @@ -50609,6 +51034,20 @@ ${lanes.join("\n")} if (typeArguments) { node.typeArguments = factory.createNodeArray(typeArguments); } + if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) { + const comment = getTextOfNode( + signature.declaration.parent.parent, + /*includeTrivia*/ + true + ).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n"); + addSyntheticLeadingComment( + node, + 3 /* MultiLineCommentTrivia */, + comment, + /*hasTrailingNewLine*/ + true + ); + } cleanup == null ? void 0 : cleanup(); return node; } @@ -50647,9 +51086,9 @@ ${lanes.join("\n")} return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 168 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 347 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -50659,7 +51098,7 @@ ${lanes.join("\n")} const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(26 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 165 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -50839,11 +51278,11 @@ ${lanes.join("\n")} return top; } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { - let file = getDeclarationOfKind(symbol, 311 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 312 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 311 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 312 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -51323,7 +51762,7 @@ ${lanes.join("\n")} } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 325 /* JSDocNamepathType */) { + if (isJSDocAllType(node) || node.kind === 326 /* JSDocNamepathType */) { return factory.createKeywordTypeNode(133 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { @@ -51487,13 +51926,13 @@ ${lanes.join("\n")} function symbolTableToDeclarationStatements(symbolTable, context, bundled) { const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, - 173 /* MethodDeclaration */, + 174 /* MethodDeclaration */, /*useAccessors*/ true ); const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol( (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), - 172 /* MethodSignature */, + 173 /* MethodSignature */, /*useAccessors*/ false ); @@ -51762,7 +52201,7 @@ ${lanes.join("\n")} if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags); } else { - const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstVariable(symbol) ? 2 /* Const */ : 1 /* Let */; + const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol); let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d)); if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) { @@ -51908,7 +52347,7 @@ ${lanes.join("\n")} if (additionalModifierFlags & 1 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { newModifierFlags |= 1 /* Export */; } - if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 16777216 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { + if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { newModifierFlags |= 2 /* Ambient */; } if (additionalModifierFlags & 1024 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { @@ -51952,8 +52391,8 @@ ${lanes.join("\n")} const baseTypes = getBaseTypes(interfaceType); const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0; const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType)); - const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 178 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 179 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 179 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(96 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( @@ -51970,7 +52409,7 @@ ${lanes.join("\n")} return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */)); } function isTypeOnlyNamespace(symbol) { - return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */)); + return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */)); } function serializeModule(symbol, symbolName2, modifierFlags) { const members = getNamespaceMembersForSerialization(symbol); @@ -52018,7 +52457,7 @@ ${lanes.join("\n")} void 0, factory.createIdentifier(localName), nsBody, - 16 /* Namespace */ + 32 /* Namespace */ ), 0 /* None */); } } @@ -52035,7 +52474,7 @@ ${lanes.join("\n")} function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 261 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 262 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); addResult(setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags); } if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) { @@ -52075,7 +52514,7 @@ ${lanes.join("\n")} void 0, factory.createIdentifier(localName), factory.createModuleBlock([]), - 16 /* Namespace */ + 32 /* Namespace */ ); setParent(fakespace, enclosingDeclaration); fakespace.locals = createSymbolTable(props); @@ -52219,7 +52658,7 @@ ${lanes.join("\n")} [], /*body*/ void 0 - )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 175 /* Constructor */); + )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -52271,8 +52710,8 @@ ${lanes.join("\n")} const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 207 /* BindingElement */: - if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 259 /* VariableDeclaration */) { + case 208 /* BindingElement */: + if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -52298,15 +52737,15 @@ ${lanes.join("\n")} } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); break; - case 303 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 225 /* BinaryExpression */) { + case 304 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 226 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -52329,7 +52768,7 @@ ${lanes.join("\n")} ), modifierFlags); break; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) { serializeMaybeAliasAssignment(symbol); break; @@ -52350,10 +52789,10 @@ ${lanes.join("\n")} ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 272 /* ImportClause */: { + case 273 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52371,7 +52810,7 @@ ${lanes.join("\n")} ), 0 /* None */); break; } - case 273 /* NamespaceImport */: { + case 274 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52389,7 +52828,7 @@ ${lanes.join("\n")} ), 0 /* None */); break; } - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: addResult(factory.createExportDeclaration( /*modifiers*/ void 0, @@ -52399,7 +52838,7 @@ ${lanes.join("\n")} factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 275 /* ImportSpecifier */: { + case 276 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52424,7 +52863,7 @@ ${lanes.join("\n")} ), 0 /* None */); break; } - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -52432,12 +52871,12 @@ ${lanes.join("\n")} specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 225 /* BinaryExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 226 /* BinaryExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -52544,7 +52983,7 @@ ${lanes.join("\n")} void 0, serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled) ) - ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 266 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) + ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) ); addResult( statement, @@ -52917,10 +53356,10 @@ ${lanes.join("\n")} return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 267 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 268 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 311 /* SourceFile */ || isAmbientModule(location); + return location.kind === 312 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -52968,17 +53407,17 @@ ${lanes.join("\n")} if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 259 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 260 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 230 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 231 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -52995,66 +53434,66 @@ ${lanes.join("\n")} return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: - case 346 /* JSDocEnumTag */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 347 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 261 /* FunctionDeclaration */: - case 265 /* EnumDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 262 /* FunctionDeclaration */: + case 266 /* EnumDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 270 /* ImportEqualsDeclaration */ && parent2.kind !== 311 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlagsCached(node) & 1 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent2.kind !== 312 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 175 /* Constructor */: - case 179 /* ConstructSignature */: - case 178 /* CallSignature */: - case 180 /* IndexSignature */: - case 168 /* Parameter */: - case 267 /* ModuleBlock */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 186 /* TypeLiteral */: - case 182 /* TypeReference */: - case 187 /* ArrayType */: - case 188 /* TupleType */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: + case 176 /* Constructor */: + case 180 /* ConstructSignature */: + case 179 /* CallSignature */: + case 181 /* IndexSignature */: + case 169 /* Parameter */: + case 268 /* ModuleBlock */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 187 /* TypeLiteral */: + case 183 /* TypeReference */: + case 188 /* ArrayType */: + case 189 /* TupleType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: return false; - case 167 /* TypeParameter */: - case 311 /* SourceFile */: - case 269 /* NamespaceExportDeclaration */: + case 168 /* TypeParameter */: + case 312 /* SourceFile */: + case 270 /* NamespaceExportDeclaration */: return true; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return false; default: return false; @@ -53063,7 +53502,7 @@ ${lanes.join("\n")} } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 276 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 277 /* ExportAssignment */) { exportSymbol = resolveName( node, node.escapedText, @@ -53074,7 +53513,7 @@ ${lanes.join("\n")} /*isUse*/ false ); - } else if (node.parent.kind === 280 /* ExportSpecifier */) { + } else if (node.parent.kind === 281 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -53178,12 +53617,12 @@ ${lanes.join("\n")} function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 259 /* VariableDeclaration */: - case 260 /* VariableDeclarationList */: - case 275 /* ImportSpecifier */: - case 274 /* NamedImports */: - case 273 /* NamespaceImport */: - case 272 /* ImportClause */: + case 260 /* VariableDeclaration */: + case 261 /* VariableDeclarationList */: + case 276 /* ImportSpecifier */: + case 275 /* NamedImports */: + case 274 /* NamespaceImport */: + case 273 /* ImportClause */: return false; default: return true; @@ -53202,6 +53641,17 @@ ${lanes.join("\n")} var _a; return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType; } + function getTypeOfPropertyOrIndexSignatureOfType(type, name) { + var _a; + let propType; + return getTypeOfPropertyOfType(type, name) || (propType = (_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) && addOptionality( + propType, + /*isProperty*/ + true, + /*isOptional*/ + true + ); + } function isTypeAny(type) { return type && (type.flags & 1 /* Any */) !== 0; } @@ -53301,23 +53751,23 @@ ${lanes.join("\n")} function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return ancestor.initializer; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent2 = node.parent; - if (node.kind === 207 /* BindingElement */ && parent2.kind === 205 /* ObjectBindingPattern */) { + if (node.kind === 208 /* BindingElement */ && parent2.kind === 206 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 302 /* PropertyAssignment */ || node.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent2.elements.indexOf(node); @@ -53336,17 +53786,17 @@ ${lanes.join("\n")} return parentType; } const pattern = declaration.parent; - if (strictNullChecks && declaration.flags & 16777216 /* Ambient */ && isParameterDeclaration(declaration)) { + if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isParameterDeclaration(declaration)) { parentType = getNonNullableType(parentType); } else if (strictNullChecks && pattern.parent.initializer && !(getTypeFacts(getTypeOfInitializer(pattern.parent.initializer)) & 65536 /* EQUndefined */)) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 205 /* ObjectBindingPattern */) { + if (pattern.kind === 206 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { - error(declaration, Diagnostics.Rest_types_may_only_be_created_from_object_types); + error2(declaration, Diagnostics.Rest_types_may_only_be_created_from_object_types); return errorType; } const literalMembers = []; @@ -53406,13 +53856,13 @@ ${lanes.join("\n")} /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 208 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, isProperty = false, isOptional = true) { return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type; } function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) { - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression( declaration.parent.parent.expression, /*checkMode*/ @@ -53420,7 +53870,7 @@ ${lanes.join("\n")} ))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -53439,8 +53889,8 @@ ${lanes.join("\n")} if (declaredType) { return addOptionality(declaredType, isProperty, isOptional); } - if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlags(declaration) & 1 /* Export */) && !(declaration.flags & 16777216 /* Ambient */)) { - if (!(getCombinedNodeFlags(declaration) & 2 /* Const */) && (!declaration.initializer || isNullOrUndefined3(declaration.initializer))) { + if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 1 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { + if (!(getCombinedNodeFlagsCached(declaration) & 6 /* Constant */) && (!declaration.initializer || isNullOrUndefined3(declaration.initializer))) { return autoType; } if (declaration.initializer && isEmptyArrayLiteral2(declaration.initializer)) { @@ -53449,8 +53899,8 @@ ${lanes.join("\n")} } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 177 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 176 /* GetAccessor */); + if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 177 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -53524,7 +53974,7 @@ ${lanes.join("\n")} const links = getSymbolLinks(symbol); if (links.isConstructorDeclaredProperty === void 0) { links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 211 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( /*declaredType*/ void 0, declaration, @@ -53552,7 +54002,7 @@ ${lanes.join("\n")} /*includeClassComputedPropertyName*/ false ); - if (container && (container.kind === 175 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -53579,7 +54029,7 @@ ${lanes.join("\n")} reference.flowNode = staticBlock.returnFlowNode; const flowType = getFlowTypeOfProperty(reference, symbol); if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) { - error(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); + error2(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); } if (everyType(flowType, isNullableType)) { continue; @@ -53595,7 +54045,7 @@ ${lanes.join("\n")} reference.flowNode = constructor.returnFlowNode; const flowType = getFlowTypeOfProperty(reference, symbol); if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) { - error(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); + error2(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); } return everyType(flowType, isNullableType) ? void 0 : convertAutoToAny(flowType); } @@ -53667,7 +54117,7 @@ ${lanes.join("\n")} false, definedInMethod && !definedInConstructor )); - if (symbol.valueDeclaration && filterType(widened, (t) => !!(t.flags & ~98304 /* Nullable */)) === neverType) { + if (symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && filterType(widened, (t) => !!(t.flags & ~98304 /* Nullable */)) === neverType) { reportImplicitAny(symbol.valueDeclaration, anyType); return anyType; } @@ -53770,11 +54220,11 @@ ${lanes.join("\n")} const unescapedName = unescapeLeadingUnderscores(s.escapedName); const exportedMemberName = ((_a = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a.name) || exportedMember.valueDeclaration; addRelatedInfo( - error(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName), + error2(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName), createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here, unescapedName) ); addRelatedInfo( - error(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName), + error2(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName), createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here, unescapedName) ); } @@ -53832,7 +54282,7 @@ ${lanes.join("\n")} /*includeClassComputedPropertyName*/ false ); - return thisContainer.kind === 175 /* Constructor */ || thisContainer.kind === 261 /* FunctionDeclaration */ || thisContainer.kind === 217 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 262 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -53906,7 +54356,7 @@ ${lanes.join("\n")} function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 207 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -53922,7 +54372,7 @@ ${lanes.join("\n")} return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 205 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration( @@ -53963,7 +54413,7 @@ ${lanes.join("\n")} } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 168 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -54037,7 +54487,7 @@ ${lanes.join("\n")} return reportCircularityError(symbol); } let type; - if (declaration.kind === 276 /* ExportAssignment */) { + if (declaration.kind === 277 /* ExportAssignment */) { type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) { type = getWidenedTypeForAssignmentDeclaration(symbol); @@ -54078,13 +54528,13 @@ ${lanes.join("\n")} function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -54109,9 +54559,9 @@ ${lanes.join("\n")} if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 176 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration( accessor, /*reportErrors*/ @@ -54129,13 +54579,13 @@ ${lanes.join("\n")} } if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(getter)) { - error(getter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(getter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } else if (getAnnotatedAccessorTypeNode(setter)) { - error(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } else if (getAnnotatedAccessorTypeNode(accessor)) { - error(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } else if (getter && noImplicitAny) { - error(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); + error2(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } type = anyType; } @@ -54149,11 +54599,11 @@ ${lanes.join("\n")} if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { - error(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } writeType = anyType; } @@ -54189,7 +54639,7 @@ ${lanes.join("\n")} const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 225 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 225 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 226 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 226 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -54231,7 +54681,7 @@ ${lanes.join("\n")} true ); const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0); - links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getAllSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; + links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; } return links.type; } @@ -54246,15 +54696,15 @@ ${lanes.join("\n")} function reportCircularityError(symbol) { const declaration = symbol.valueDeclaration; if (getEffectiveTypeAnnotationNode(declaration)) { - error( + error2( symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol) ); return errorType; } - if (noImplicitAny && (declaration.kind !== 168 /* Parameter */ || declaration.initializer)) { - error( + if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { + error2( symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol) @@ -54367,43 +54817,43 @@ ${lanes.join("\n")} return void 0; } switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 323 /* JSDocFunctionType */: - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 264 /* TypeAliasDeclaration */: - case 351 /* JSDocTemplateTag */: - case 352 /* JSDocTypedefTag */: - case 346 /* JSDocEnumTag */: - case 344 /* JSDocCallbackTag */: - case 199 /* MappedType */: - case 193 /* ConditionalType */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 324 /* JSDocFunctionType */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 265 /* TypeAliasDeclaration */: + case 352 /* JSDocTemplateTag */: + case 353 /* JSDocTypedefTag */: + case 347 /* JSDocEnumTag */: + case 345 /* JSDocCallbackTag */: + case 200 /* MappedType */: + case 194 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 199 /* MappedType */) { + if (node.kind === 200 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))); - } else if (node.kind === 193 /* ConditionalType */) { + } else if (node.kind === 194 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */ || node.kind === 263 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; + const thisType = includeThisTypes && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || node.kind === 264 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 326 /* JSDoc */: { + case 327 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -54413,14 +54863,14 @@ ${lanes.join("\n")} function getOuterTypeParametersOfClassOrInterface(symbol) { var _a; const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a = symbol.declarations) == null ? void 0 : _a.find((decl) => { - if (decl.kind === 263 /* InterfaceDeclaration */) { + if (decl.kind === 264 /* InterfaceDeclaration */) { return true; } - if (decl.kind !== 259 /* VariableDeclaration */) { + if (decl.kind !== 260 /* VariableDeclaration */) { return false; } const initializer = decl.initializer; - return !!initializer && (initializer.kind === 217 /* FunctionExpression */ || initializer.kind === 218 /* ArrowFunction */); + return !!initializer && (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 219 /* ArrowFunction */); }); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); @@ -54431,7 +54881,7 @@ ${lanes.join("\n")} } let result; for (const node of symbol.declarations) { - if (node.kind === 263 /* InterfaceDeclaration */ || node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -54499,11 +54949,11 @@ ${lanes.join("\n")} resolveStructuredTypeMembers(baseConstructorType); } if (!popTypeResolution()) { - error(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol)); + error2(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol)); return type.resolvedBaseConstructorType = errorType; } if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) { - const err = error(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType)); + const err = error2(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType)); if (baseConstructorType.flags & 262144 /* TypeParameter */) { const constraint = getConstraintFromTypeParameter(baseConstructorType); let ctorReturn = unknownType; @@ -54545,7 +54995,7 @@ ${lanes.join("\n")} return resolvedImplementsTypes; } function reportCircularBaseType(node, type) { - error(node, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( + error2(node, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( type, /*enclosingDeclaration*/ void 0, @@ -54569,7 +55019,7 @@ ${lanes.join("\n")} } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 262 /* ClassDeclaration */ || declaration.kind === 263 /* InterfaceDeclaration */) { + if (declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 264 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -54599,7 +55049,7 @@ ${lanes.join("\n")} } else { const constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments, baseTypeNode); if (!constructors.length) { - error(baseTypeNode.expression, Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); + error2(baseTypeNode.expression, Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); return type.resolvedBaseTypes = emptyArray; } baseType = getReturnTypeOfSignature(constructors[0]); @@ -54619,7 +55069,7 @@ ${lanes.join("\n")} return type.resolvedBaseTypes = emptyArray; } if (type === reducedBaseType || hasBaseType(reducedBaseType, type)) { - error( + error2( type.symbol.valueDeclaration, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( @@ -54658,7 +55108,7 @@ ${lanes.join("\n")} type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 263 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 264 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -54673,7 +55123,7 @@ ${lanes.join("\n")} reportCircularBaseType(declaration, type); } } else { - error(node, Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members); + error2(node, Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members); } } } @@ -54686,8 +55136,8 @@ ${lanes.join("\n")} return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 263 /* InterfaceDeclaration */) { - if (declaration.flags & 128 /* ContainsThis */) { + if (declaration.kind === 264 /* InterfaceDeclaration */) { + if (declaration.flags & 256 /* ContainsThis */) { return false; } const baseTypeNodes = getInterfaceBaseTypeNodes(declaration); @@ -54758,10 +55208,10 @@ ${lanes.join("\n")} } } else { type = errorType; - if (declaration.kind === 346 /* JSDocEnumTag */) { - error(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + if (declaration.kind === 347 /* JSDocEnumTag */) { + error2(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } else { - error(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + error2(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } } links.declaredType = type; @@ -54777,7 +55227,7 @@ ${lanes.join("\n")} const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 265 /* EnumDeclaration */) { + if (declaration.kind === 266 /* EnumDeclaration */) { for (const member of declaration.members) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); @@ -54862,18 +55312,18 @@ ${lanes.join("\n")} case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: case 151 /* ObjectKeyword */: case 116 /* VoidKeyword */: case 157 /* UndefinedKeyword */: case 146 /* NeverKeyword */: - case 200 /* LiteralType */: + case 201 /* LiteralType */: return true; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return isThislessType(node.elementType); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -54889,21 +55339,21 @@ ${lanes.join("\n")} function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 175 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); } function isThisless(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { const declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -54946,9 +55396,6 @@ ${lanes.join("\n")} } return type; } - function isTypeUsableAsPropertyName(type) { - return !!(type.flags & 8576 /* StringOrNumberLiteralOrUnique */); - } function isLateBindableName(node) { if (!isComputedPropertyName(node) && !isElementAccessExpression(node)) { return false; @@ -54969,15 +55416,6 @@ ${lanes.join("\n")} function isNonBindableDynamicName(node) { return isDynamicName(node) && !isLateBindableName(node); } - function getPropertyNameFromType(type) { - if (type.flags & 8192 /* UniqueESSymbol */) { - return type.escapedName; - } - if (type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { - return escapeLeadingUnderscores("" + type.value); - } - return Debug.fail(); - } function addDeclarationToLateBoundSymbol(symbol, member, symbolFlags) { Debug.assert(!!(getCheckFlags(symbol) & 4096 /* Late */), "Expected a late-bound symbol."); symbol.flags |= symbolFlags; @@ -55010,8 +55448,8 @@ ${lanes.join("\n")} if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) { const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations; const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName); - forEach(declarations, (declaration) => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name)); - error(declName || decl, Diagnostics.Duplicate_property_0, name); + forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name)); + error2(declName || decl, Diagnostics.Duplicate_property_0, name); lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */); } lateSymbol.links.nameType = type; @@ -55027,6 +55465,7 @@ ${lanes.join("\n")} return links.resolvedSymbol; } function getResolvedMembersOrExportsOfSymbol(symbol, resolutionKind) { + var _a, _b, _c; const links = getSymbolLinks(symbol); if (!links[resolutionKind]) { const isStatic2 = resolutionKind === "resolvedExports" /* resolvedExports */; @@ -55045,7 +55484,7 @@ ${lanes.join("\n")} } } } - const assignments = symbol.assignmentDeclarationMembers; + const assignments = (((_a = symbol.valueDeclaration) == null ? void 0 : _a.kind) === 219 /* ArrowFunction */ || ((_b = symbol.valueDeclaration) == null ? void 0 : _b.kind) === 218 /* FunctionExpression */) && ((_c = getSymbolOfNode(symbol.valueDeclaration.parent)) == null ? void 0 : _c.assignmentDeclarationMembers) || symbol.assignmentDeclarationMembers; if (assignments) { const decls = arrayFrom(assignments.values()); for (const member of decls) { @@ -55174,7 +55613,7 @@ ${lanes.join("\n")} /*resolvedTypePredicate*/ void 0, sig.minArgumentCount, - sig.flags & 39 /* PropagatingFlags */ + sig.flags & 167 /* PropagatingFlags */ ); result.target = sig.target; result.mapper = sig.mapper; @@ -55212,17 +55651,18 @@ ${lanes.join("\n")} function getExpandedParameters(sig, skipUnionExpanding) { if (signatureHasRestParameter(sig)) { const restIndex = sig.parameters.length - 1; + const restName = sig.parameters[restIndex].escapedName; const restType = getTypeOfSymbol(sig.parameters[restIndex]); if (isTupleType(restType)) { - return [expandSignatureParametersWithTupleMembers(restType, restIndex)]; + return [expandSignatureParametersWithTupleMembers(restType, restIndex, restName)]; } else if (!skipUnionExpanding && restType.flags & 1048576 /* Union */ && every(restType.types, isTupleType)) { - return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex)); + return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex, restName)); } } return [sig.parameters]; - function expandSignatureParametersWithTupleMembers(restType, restIndex) { - const elementTypes = getElementTypes(restType); - const associatedNames = getUniqAssociatedNamesFromTupleType(restType); + function expandSignatureParametersWithTupleMembers(restType, restIndex, restName) { + const elementTypes = getTypeArguments(restType); + const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restName); const restParams = map(elementTypes, (t, i) => { const name = associatedNames && associatedNames[i] ? associatedNames[i] : getParameterNameAtPosition(sig, restIndex + i, restType); const flags = restType.target.elementFlags[i]; @@ -55233,10 +55673,10 @@ ${lanes.join("\n")} }); return concatenate(sig.parameters.slice(0, restIndex), restParams); } - function getUniqAssociatedNamesFromTupleType(type) { + function getUniqAssociatedNamesFromTupleType(type, restName) { const associatedNamesMap = /* @__PURE__ */ new Map(); - return map(type.target.labeledElementDeclarations, (labeledElement) => { - const name = getTupleElementLabel(labeledElement); + return map(type.target.labeledElementDeclarations, (labeledElement, i) => { + const name = getTupleElementLabel(labeledElement, i, restName); const prevCounter = associatedNamesMap.get(name); if (prevCounter === void 0) { associatedNamesMap.set(name, 1); @@ -55474,7 +55914,7 @@ ${lanes.join("\n")} /*resolvedTypePredicate*/ void 0, minArgCount, - (left.flags | right.flags) & 39 /* PropagatingFlags */ + (left.flags | right.flags) & 167 /* PropagatingFlags */ ); result.compositeKind = 1048576 /* Union */; result.compositeSignatures = concatenate(left.compositeKind !== 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); @@ -55622,20 +56062,17 @@ ${lanes.join("\n")} setStructuredTypeMembers(type, members2, callSignatures, constructSignatures, indexInfos2); return; } - let members = emptySymbols; + let members = getExportsOfSymbol(symbol); let indexInfos; - if (symbol.exports) { - members = getExportsOfSymbol(symbol); - if (symbol === globalThisSymbol) { - const varsOnly = /* @__PURE__ */ new Map(); - members.forEach((p) => { - var _a; - if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) { - varsOnly.set(p.escapedName, p); - } - }); - members = varsOnly; - } + if (symbol === globalThisSymbol) { + const varsOnly = /* @__PURE__ */ new Map(); + members.forEach((p) => { + var _a; + if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) { + varsOnly.set(p.escapedName, p); + } + }); + members = varsOnly; } let baseConstructorIndexInfo; setStructuredTypeMembers(type, members, emptyArray, emptyArray, emptyArray); @@ -55684,7 +56121,7 @@ ${lanes.join("\n")} /*resolvedTypePredicate*/ void 0, sig.minArgumentCount, - sig.flags & 39 /* PropagatingFlags */ + sig.flags & 167 /* PropagatingFlags */ ) : void 0 )); } @@ -55851,7 +56288,7 @@ ${lanes.join("\n")} true ) : symbol.links.checkFlags & 524288 /* StripOptional */ ? removeMissingOrUndefinedType(propType) : propType; if (!popTypeResolution()) { - error(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType)); + error2(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType)); type = errorType; } symbol.links.type = type; @@ -55880,7 +56317,7 @@ ${lanes.join("\n")} } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 197 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; + return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -56035,9 +56472,9 @@ ${lanes.join("\n")} function getConstraintOfTypeParameter(typeParameter) { return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0; } - function isConstTypeVariable(type) { + function isConstTypeVariable(type, depth = 0) { var _a; - return !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, isConstTypeVariable) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type)) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0)); + return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); } function getConstraintOfIndexedAccess(type) { return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0; @@ -56177,7 +56614,7 @@ ${lanes.join("\n")} if (t.flags & 262144 /* TypeParameter */) { const errorNode = getConstraintDeclaration(t); if (errorNode) { - const diagnostic = error(errorNode, Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(t)); + const diagnostic = error2(errorNode, Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(t)); if (currentNode && !isNodeDescendantOf(errorNode, currentNode) && !isNodeDescendantOf(currentNode, errorNode)) { addRelatedInfo(diagnostic, createDiagnosticForNode(currentNode, Diagnostics.Circularity_originates_in_type_at_this_location)); } @@ -56594,7 +57031,35 @@ ${lanes.join("\n")} return emptyArray; } function getSignaturesOfType(type, kind) { - return getSignaturesOfStructuredType(getReducedApparentType(type), kind); + const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind); + if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) { + if (type.arrayFallbackSignatures) { + return type.arrayFallbackSignatures; + } + let memberName; + if (everyType(type, (t) => { + var _a; + return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName); + })) { + const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper)); + const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent))); + return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind); + } + type.arrayFallbackSignatures = result; + } + return result; + } + function isArrayOrTupleSymbol(symbol) { + if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) { + return false; + } + return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); + } + function isReadonlyArraySymbol(symbol) { + if (!symbol || !globalReadonlyArrayType.symbol) { + return false; + } + return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); } function findIndexInfo(indexInfos, keyType) { return find(indexInfos, (info) => info.keyType === keyType); @@ -56773,7 +57238,7 @@ ${lanes.join("\n")} } else { parameters.push(paramSymbol); } - if (type && type.kind === 200 /* LiteralType */) { + if (type && type.kind === 201 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -56781,8 +57246,8 @@ ${lanes.join("\n")} minArgumentCount = parameters.length; } } - if ((declaration.kind === 176 /* GetAccessor */ || declaration.kind === 177 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 176 /* GetAccessor */ ? 177 /* SetAccessor */ : 176 /* GetAccessor */; + if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { + const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); @@ -56873,15 +57338,15 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - return node.name.kind === 166 /* ComputedPropertyName */ && traverse(node.name); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name); + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return traverse(node.expression); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -56968,7 +57433,7 @@ ${lanes.join("\n")} function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 196 /* ThisType */ ? createTypePredicate( + return parameterName.kind === 197 /* ThisType */ ? createTypePredicate( node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, /*parameterName*/ void 0, @@ -57000,14 +57465,14 @@ ${lanes.join("\n")} if (signature.declaration) { const typeNode = getEffectiveReturnTypeNode(signature.declaration); if (typeNode) { - error(typeNode, Diagnostics.Return_type_annotation_circularly_references_itself); + error2(typeNode, Diagnostics.Return_type_annotation_circularly_references_itself); } else if (noImplicitAny) { const declaration = signature.declaration; const name = getNameOfDeclaration(declaration); if (name) { - error(name, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, declarationNameToString(name)); + error2(name, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, declarationNameToString(name)); } else { - error(declaration, Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); + error2(declaration, Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); } } } @@ -57018,7 +57483,7 @@ ${lanes.join("\n")} return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 175 /* Constructor */) { + if (declaration.kind === 176 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } const typeNode = getEffectiveReturnTypeNode(declaration); @@ -57034,12 +57499,12 @@ ${lanes.join("\n")} if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 176 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 177 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 178 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -57048,7 +57513,7 @@ ${lanes.join("\n")} return getReturnTypeOfTypeTag(declaration); } function isResolvingReturnTypeOfSignature(signature) { - return !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0; + return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0; } function getRestTypeOfSignature(signature) { return tryGetRestTypeOfSignature(signature) || anyType; @@ -57142,7 +57607,7 @@ ${lanes.join("\n")} var _a; if (!signature.isolatedSignatureType) { const kind = (_a = signature.declaration) == null ? void 0 : _a.kind; - const isConstructor = kind === void 0 || kind === 175 /* Constructor */ || kind === 179 /* ConstructSignature */ || kind === 184 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -57201,9 +57666,9 @@ ${lanes.join("\n")} let inferences; if ((_a = typeParameter.symbol) == null ? void 0 : _a.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 194 /* InferType */) { + if (declaration.parent.kind === 195 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 182 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference); if (typeParameters) { @@ -57221,13 +57686,13 @@ ${lanes.join("\n")} } } } - } else if (grandParent.kind === 168 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 190 /* RestType */ || grandParent.kind === 201 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 203 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 167 /* TypeParameter */ && grandParent.parent.kind === 199 /* MappedType */) { + } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 199 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 193 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 199 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -57252,7 +57717,7 @@ ${lanes.join("\n")} } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 199 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -57261,7 +57726,7 @@ ${lanes.join("\n")} return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 167 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -57346,12 +57811,12 @@ ${lanes.join("\n")} return ((_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 182 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 187 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray; - error( + error2( type.node || currentNode, type.target.symbol ? Diagnostics.Type_arguments_for_0_circularly_reference_themselves : Diagnostics.Tuple_type_arguments_circularly_reference_themselves, type.target.symbol && symbolToString(type.target.symbol) @@ -57380,12 +57845,12 @@ ${lanes.join("\n")} void 0, 2 /* WriteArrayAsGenericType */ ); - error(node, diag2, typeStr, minTypeArgumentCount, typeParameters.length); + error2(node, diag2, typeStr, minTypeArgumentCount, typeParameters.length); if (!isJs) { return errorType; } } - if (node.kind === 182 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference( type, node, @@ -57436,7 +57901,7 @@ ${lanes.join("\n")} const numTypeArguments = length(node.typeArguments); const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters); if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) { - error( + error2( node, minTypeArgumentCount === typeParameters.length ? Diagnostics.Generic_type_0_requires_1_type_argument_s : Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, symbolToString(symbol), @@ -57476,9 +57941,9 @@ ${lanes.join("\n")} } function getTypeReferenceName(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -57490,10 +57955,10 @@ ${lanes.join("\n")} return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 165 /* QualifiedName */ ? name.right : name.kind === 210 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 165 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 210 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -57545,7 +58010,7 @@ ${lanes.join("\n")} const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 204 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -57573,7 +58038,7 @@ ${lanes.join("\n")} return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 188 /* TupleType */ && node.elements.length === 1; + return node.kind === 189 /* TupleType */ && node.elements.length === 1; } function getImpliedConstraint(type, checkNode, extendsNode) { return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0; @@ -57581,17 +58046,17 @@ ${lanes.join("\n")} function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 326 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 327 /* JSDoc */) { const parent2 = node.parent; - if (parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 169 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 193 /* ConditionalType */ && node === parent2.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 194 /* ConditionalType */ && node === parent2.trueType) { const constraint = getImpliedConstraint(type, parent2.checkType, parent2.extendsType); if (constraint) { constraints = append(constraints, constraint); } - } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 199 /* MappedType */ && node === parent2.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && node === parent2.type) { const mappedType = getTypeFromTypeNode(parent2); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -57608,11 +58073,11 @@ ${lanes.join("\n")} return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 182 /* TypeReference */ || node.kind === 204 /* ImportType */); + return !!(node.flags & 16777216 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { - error(node, Diagnostics.Type_0_is_not_generic, symbol ? symbolToString(symbol) : node.typeName ? declarationNameToString(node.typeName) : anon); + error2(node, Diagnostics.Type_0_is_not_generic, symbol ? symbolToString(symbol) : node.typeName ? declarationNameToString(node.typeName) : anon); return false; } return true; @@ -57731,9 +58196,9 @@ ${lanes.join("\n")} if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: return declaration; } } @@ -57744,11 +58209,11 @@ ${lanes.join("\n")} } const type = getDeclaredTypeOfSymbol(symbol); if (!(type.flags & 524288 /* Object */)) { - error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbolName(symbol)); + error2(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbolName(symbol)); return arity ? emptyGenericType : emptyObjectType; } if (length(type.typeParameters) !== arity) { - error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); + error2(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); return arity ? emptyGenericType : emptyObjectType; } return type; @@ -57765,7 +58230,7 @@ ${lanes.join("\n")} getDeclaredTypeOfSymbol(symbol); if (length(getSymbolLinks(symbol).typeParameters) !== arity) { const decl = symbol.declarations && find(symbol.declarations, isTypeAliasDeclaration); - error(decl, Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); + error2(decl, Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); return void 0; } } @@ -57961,6 +58426,22 @@ ${lanes.join("\n")} reportErrors2 )) || emptyGenericType; } + function getGlobalDisposableType(reportErrors2) { + return deferredGlobalDisposableType || (deferredGlobalDisposableType = getGlobalType( + "Disposable", + /*arity*/ + 0, + reportErrors2 + )) || emptyObjectType; + } + function getGlobalAsyncDisposableType(reportErrors2) { + return deferredGlobalAsyncDisposableType || (deferredGlobalAsyncDisposableType = getGlobalType( + "AsyncDisposable", + /*arity*/ + 0, + reportErrors2 + )) || emptyObjectType; + } function getGlobalTypeOrUndefined(name, arity = 0) { const symbol = getGlobalSymbol( name, @@ -58106,11 +58587,11 @@ ${lanes.join("\n")} } function getTupleElementFlags(node) { switch (node.kind) { - case 189 /* OptionalType */: + case 190 /* OptionalType */: return 2 /* Optional */; - case 190 /* RestType */: + case 191 /* RestType */: return getRestTypeElementFlags(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -58126,60 +58607,57 @@ ${lanes.join("\n")} return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 201 /* NamedTupleMember */); - return getTupleTargetType( - elementFlags, - readonly, - /*associatedNames*/ - missingName ? void 0 : node.elements - ); + return getTupleTargetType(elementFlags, readonly, map(node.elements, memberIfLabeledElementDeclaration)); + } + function memberIfLabeledElementDeclaration(member) { + return isNamedTupleMember(member) || isParameter(member) ? member : void 0; } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 187 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 188 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent2 = node.parent; switch (parent2.kind) { - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: - case 182 /* TypeReference */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 198 /* IndexedAccessType */: - case 193 /* ConditionalType */: - case 197 /* TypeOperator */: - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: + case 183 /* TypeReference */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 199 /* IndexedAccessType */: + case 194 /* ConditionalType */: + case 198 /* TypeOperator */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return isResolvedByTypeAlias(parent2); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return true; - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 195 /* ParenthesizedType */: - case 189 /* OptionalType */: - case 201 /* NamedTupleMember */: - case 322 /* JSDocOptionalType */: - case 320 /* JSDocNullableType */: - case 321 /* JSDocNonNullableType */: - case 315 /* JSDocTypeExpression */: + case 196 /* ParenthesizedType */: + case 190 /* OptionalType */: + case 202 /* NamedTupleMember */: + case 323 /* JSDocOptionalType */: + case 321 /* JSDocNullableType */: + case 322 /* JSDocNonNullableType */: + case 316 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 190 /* RestType */: - return node.type.kind !== 187 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 191 /* RestType */: + return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 192 /* UnionType */: + case 193 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -58190,15 +58668,15 @@ ${lanes.join("\n")} const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 188 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 188 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( + } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( target, node, /*mapper*/ void 0 ); } else { - const elementTypes = node.kind === 187 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } @@ -58207,7 +58685,7 @@ ${lanes.join("\n")} function isReadonlyTypeOperator(node) { return isTypeOperatorNode(node) && node.operator === 148 /* ReadonlyKeyword */; } - function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations) { + function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations = []) { const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, (_) => 1 /* Required */), readonly, namedMemberDeclarations); return tupleTarget === emptyGenericType ? emptyObjectType : elementTypes.length ? createNormalizedTypeReference(tupleTarget, elementTypes) : tupleTarget; } @@ -58215,7 +58693,8 @@ ${lanes.join("\n")} if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) { return readonly ? globalReadonlyArrayType : globalArrayType; } - const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (namedMemberDeclarations && namedMemberDeclarations.length ? "," + map(namedMemberDeclarations, getNodeId).join(",") : ""); + const memberIds = mapDefined(namedMemberDeclarations, (node) => node ? getNodeId(node) : void 0); + const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : ""); let type = tupleTypes.get(key); if (!type) { tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations)); @@ -58297,7 +58776,7 @@ ${lanes.join("\n")} } const expandedTypes = []; const expandedFlags = []; - let expandedDeclarations = []; + const expandedDeclarations = []; let lastRequiredIndex = -1; let firstRestIndex = -1; let lastOptionalOrRestIndex = -1; @@ -58310,7 +58789,7 @@ ${lanes.join("\n")} } else if (isTupleType(type)) { const elements = getElementTypes(type); if (elements.length + expandedTypes.length >= 1e4) { - error(currentNode, isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent); + error2(currentNode, isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent); return errorType; } forEach(elements, (t, n) => { @@ -58335,7 +58814,7 @@ ${lanes.join("\n")} )); expandedTypes.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedFlags.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); - expandedDeclarations == null ? void 0 : expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); + expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); } const tupleTarget = getTupleTargetType(expandedFlags, target.readonly, expandedDeclarations); return tupleTarget === emptyGenericType ? emptyObjectType : expandedFlags.length ? createTypeReference(tupleTarget, expandedTypes) : tupleTarget; @@ -58355,11 +58834,7 @@ ${lanes.join("\n")} true ) : type); expandedFlags.push(flags); - if (expandedDeclarations && declaration) { - expandedDeclarations.push(declaration); - } else { - expandedDeclarations = void 0; - } + expandedDeclarations.push(declaration); } } function sliceTupleType(type, index, endSkipCount = 0) { @@ -58386,6 +58861,9 @@ ${lanes.join("\n")} function getEndElementCount(type, flags) { return type.elementFlags.length - findLastIndex(type.elementFlags, (f) => !(f & flags)) - 1; } + function getTotalFixedElementCount(type) { + return type.fixedLength + getEndElementCount(type, 3 /* Fixed */); + } function getElementTypes(type) { const typeArguments = getTypeArguments(type); const arity = getTypeReferenceArity(type); @@ -58475,7 +58953,7 @@ ${lanes.join("\n")} const estimatedCount = count / (len - i) * len; if (estimatedCount > 1e6) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "removeSubtypes_DepthLimit", { typeIds: types.map((t) => t.id) }); - error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); + error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); return void 0; } } @@ -58884,7 +59362,7 @@ ${lanes.join("\n")} const size = getCrossProductUnionSize(types); if (size >= 1e5) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkCrossProductUnion_DepthLimit", { typeIds: types.map((t) => t.id), size }); - error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); + error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); return false; } return true; @@ -59236,12 +59714,12 @@ ${lanes.join("\n")} if (isCallLikeExpression(parent2)) { return isCallOrNewExpression(parent2) && isIdentifier(node) && hasMatchingArgument(parent2, node); } - return every(symbol.declarations, (d) => !isFunctionLike(d) || !!(getCombinedNodeFlags(d) & 268435456 /* Deprecated */)); + return every(symbol.declarations, (d) => !isFunctionLike(d) || isDeprecatedDeclaration2(d)); } return true; } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { - const accessExpression = accessNode && accessNode.kind === 211 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -59256,7 +59734,7 @@ ${lanes.join("\n")} if (accessExpression) { markPropertyAsReferenced(prop, accessExpression, isSelfTypeAccess(accessExpression.expression, objectType.symbol)); if (isAssignmentToReadonlyEntity(accessExpression, prop, getAssignmentTargetKind(accessExpression))) { - error(accessExpression.argumentExpression, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(prop)); + error2(accessExpression.argumentExpression, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(prop)); return void 0; } if (accessFlags & 8 /* CacheSymbol */) { @@ -59275,10 +59753,10 @@ ${lanes.join("\n")} const indexNode = getIndexNodeForAccessExpression(accessNode); if (isTupleType(objectType)) { if (index < 0) { - error(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); + error2(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); return undefinedType; } - error( + error2( indexNode, Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), @@ -59286,15 +59764,12 @@ ${lanes.join("\n")} unescapeLeadingUnderscores(propName) ); } else { - error(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); + error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); } } if (index >= 0) { errorIfWritingToReadonlyIndex(getIndexInfoOfType(objectType, numberType)); - return mapType(objectType, (t) => { - const restType = getRestTypeOfTupleType(t) || undefinedType; - return accessFlags & 1 /* IncludeUndefined */ ? getUnionType([restType, missingType]) : restType; - }); + return getTupleElementTypeOutOfStartCount(objectType, index, accessFlags & 1 /* IncludeUndefined */ ? missingType : void 0); } } } @@ -59306,13 +59781,13 @@ ${lanes.join("\n")} if (indexInfo) { if (accessFlags & 2 /* NoIndexSignatures */ && indexInfo.keyType !== numberType) { if (accessExpression) { - error(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); + error2(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); } return void 0; } if (accessNode && indexInfo.keyType === stringType && !isTypeAssignableToKind(indexType, 4 /* String */ | 8 /* Number */)) { const indexNode = getIndexNodeForAccessExpression(accessNode); - error(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); + error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); return accessFlags & 1 /* IncludeUndefined */ ? getUnionType([indexInfo.type, missingType]) : indexInfo.type; } errorIfWritingToReadonlyIndex(indexInfo); @@ -59340,23 +59815,23 @@ ${lanes.join("\n")} } } if (objectType.symbol === globalThisSymbol && propName !== void 0 && globalThisSymbol.exports.has(propName) && globalThisSymbol.exports.get(propName).flags & 418 /* BlockScoped */) { - error(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); + error2(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); } else if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !(accessFlags & 128 /* SuppressNoImplicitAnyError */)) { if (propName !== void 0 && typeHasStaticProperty(propName, objectType)) { const typeName = typeToString(objectType); - error(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "[" + getTextOfNode(accessExpression.argumentExpression) + "]"); + error2(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "[" + getTextOfNode(accessExpression.argumentExpression) + "]"); } else if (getIndexTypeOfType(objectType, numberType)) { - error(accessExpression.argumentExpression, Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number); + error2(accessExpression.argumentExpression, Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number); } else { let suggestion; if (propName !== void 0 && (suggestion = getSuggestionForNonexistentProperty(propName, objectType))) { if (suggestion !== void 0) { - error(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(objectType), suggestion); + error2(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(objectType), suggestion); } } else { const suggestion2 = getSuggestionForNonexistentIndexSignature(objectType, accessExpression, indexType); if (suggestion2 !== void 0) { - error(accessExpression, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, typeToString(objectType), suggestion2); + error2(accessExpression, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, typeToString(objectType), suggestion2); } else { let errorInfo; if (indexType.flags & 1024 /* EnumLiteral */) { @@ -59421,11 +59896,11 @@ ${lanes.join("\n")} if (accessNode) { const indexNode = getIndexNodeForAccessExpression(accessNode); if (indexType.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { - error(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType)); + error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType)); } else if (indexType.flags & (4 /* String */ | 8 /* Number */)) { - error(indexNode, Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType)); + error2(indexNode, Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType)); } else { - error(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); + error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); } } if (isTypeAny(indexType)) { @@ -59434,12 +59909,12 @@ ${lanes.join("\n")} return void 0; function errorIfWritingToReadonlyIndex(indexInfo) { if (indexInfo && indexInfo.isReadonly && accessExpression && (isAssignmentTarget(accessExpression) || isDeleteTarget(accessExpression))) { - error(accessExpression, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); + error2(accessExpression, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 211 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 198 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 166 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { if (type.flags & 2097152 /* Intersection */) { @@ -59579,7 +60054,7 @@ ${lanes.join("\n")} } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 198 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)) || isGenericReducibleType(objectType))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target)) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target))) || isGenericReducibleType(objectType))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -59659,7 +60134,7 @@ ${lanes.join("\n")} let tailCount = 0; while (true) { if (tailCount === 1e3) { - error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); + error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper); @@ -59684,9 +60159,9 @@ ${lanes.join("\n")} ); if (freshMapper) { const freshCombinedMapper = combineTypeMappers(mapper, freshMapper); - for (const p of freshParams) { - if (root.inferTypeParameters.indexOf(p) === -1) { - p.mapper = freshCombinedMapper; + for (let i = 0; i < freshParams.length; i++) { + if (freshParams[i] !== root.inferTypeParameters[i]) { + freshParams[i].mapper = freshCombinedMapper; } } } @@ -59837,11 +60312,11 @@ ${lanes.join("\n")} const links = getNodeLinks(node); if (!links.resolvedType) { if (!isLiteralImportTypeNode(node)) { - error(node.argument, Diagnostics.String_literal_expected); + error2(node.argument, Diagnostics.String_literal_expected); links.resolvedSymbol = unknownSymbol; return links.resolvedType = errorType; } - const targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 8388608 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */; + const targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 16777216 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */; const innerModuleSymbol = resolveExternalModuleName(node, node.argument.literal); if (!innerModuleSymbol) { links.resolvedSymbol = unknownSymbol; @@ -59871,7 +60346,7 @@ ${lanes.join("\n")} const symbolFromModule = node.isTypeOf ? void 0 : getSymbol2(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning); const next = symbolFromModule ?? symbolFromVariable; if (!next) { - error(current, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), declarationNameToString(current)); + error2(current, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), declarationNameToString(current)); return links.resolvedType = errorType; } getNodeLinks(current).resolvedSymbol = next; @@ -59884,7 +60359,7 @@ ${lanes.join("\n")} links.resolvedType = resolveImportSymbolType(node, links, moduleSymbol, targetMeaning); } else { const errorMessage = targetMeaning === 111551 /* Value */ ? Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0; - error(node, errorMessage, node.argument.literal.text); + error2(node, errorMessage, node.argument.literal.text); links.resolvedSymbol = unknownSymbol; links.resolvedType = errorType; } @@ -60147,7 +60622,7 @@ ${lanes.join("\n")} false ); const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 263 /* InterfaceDeclaration */)) { + if (parent2 && (isClassLike(parent2) || parent2.kind === 264 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent2)).thisType; } @@ -60155,14 +60630,14 @@ ${lanes.join("\n")} if (parent2 && isObjectLiteralExpression(parent2) && isBinaryExpression(parent2.parent) && getAssignmentDeclarationKind(parent2.parent) === 6 /* Prototype */) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent2.parent.left).parent).thisType; } - const host2 = node.flags & 8388608 /* JSDoc */ ? getHostSignatureFromJSDoc(node) : void 0; + const host2 = node.flags & 16777216 /* JSDoc */ ? getHostSignatureFromJSDoc(node) : void 0; if (host2 && isFunctionExpression(host2) && isBinaryExpression(host2.parent) && getAssignmentDeclarationKind(host2.parent) === 3 /* PrototypeProperty */) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(host2.parent.left).parent).thisType; } if (isJSConstructor(container) && isNodeDescendantOf(node, container.body)) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(container)).thisType; } - error(node, Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface); + error2(node, Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface); return errorType; } function getTypeFromThisTypeNode(node) { @@ -60177,17 +60652,17 @@ ${lanes.join("\n")} } function getArrayElementTypeNode(node) { switch (node.kind) { - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 188 /* TupleType */: + case 189 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 190 /* RestType */ || node.kind === 201 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return node.elementType; } return void 0; @@ -60207,8 +60682,8 @@ ${lanes.join("\n")} function getTypeFromTypeNodeWorker(node) { switch (node.kind) { case 133 /* AnyKeyword */: - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: return anyType; case 159 /* UnknownKeyword */: return unknownType; @@ -60216,7 +60691,7 @@ ${lanes.join("\n")} return stringType; case 150 /* NumberKeyword */: return numberType; - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: return bigintType; case 136 /* BooleanKeyword */: return booleanType; @@ -60231,69 +60706,69 @@ ${lanes.join("\n")} case 146 /* NeverKeyword */: return neverType; case 151 /* ObjectKeyword */: - return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; + return node.flags & 524288 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; case 141 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 196 /* ThisType */: + case 197 /* ThisType */: case 110 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return getTypeFromTypeReference(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 189 /* OptionalType */: + case 190 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 191 /* UnionType */: + case 192 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 195 /* ParenthesizedType */: - case 321 /* JSDocNonNullableType */: - case 315 /* JSDocTypeExpression */: + case 196 /* ParenthesizedType */: + case 322 /* JSDocNonNullableType */: + case 316 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 190 /* RestType */: + case 191 /* RestType */: return getTypeFromRestTypeNode(node); - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 194 /* InferType */: + case 195 /* InferType */: return getTypeFromInferTypeNode(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return getTypeFromImportTypeNode(node); case 80 /* Identifier */: - case 165 /* QualifiedName */: - case 210 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -60429,7 +60904,7 @@ ${lanes.join("\n")} /*resolvedTypePredicate*/ void 0, signature.minArgumentCount, - signature.flags & 39 /* PropagatingFlags */ + signature.flags & 167 /* PropagatingFlags */ ); result.target = signature; result.mapper = mapper; @@ -60491,26 +60966,31 @@ ${lanes.join("\n")} if (!result) { const newMapper = createTypeMapper(typeParameters, typeArguments); result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); - if (result.flags & 138117121 /* ObjectFlagsType */ && !(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { + target.instantiations.set(id, result); + const resultObjectFlags = getObjectFlags(result); + if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables); - if (!(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { - result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0); + if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) { + if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) { + result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0); + } else { + result.objectFlags |= !resultCouldContainTypeVariables ? 524288 /* CouldContainTypeVariablesComputed */ : 0; + } } } - target.instantiations.set(id, result); } return result; } return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 182 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 204 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); } function isTypeParameterPossiblyReferenced(tp, node) { if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { const container = tp.symbol.declarations[0].parent; for (let n = node; n !== container; n = n.parent) { - if (!n || n.kind === 240 /* Block */ || n.kind === 193 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 241 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -60519,17 +60999,17 @@ ${lanes.join("\n")} return true; function containsReference(node2) { switch (node2.kind) { - case 196 /* ThisType */: + case 197 /* ThisType */: return !!tp.isThisType; case 80 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); if (!isThisIdentifier(firstIdentifier)) { const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; - const tpScope = tpDeclaration.kind === 167 /* TypeParameter */ ? tpDeclaration.parent : ( + const tpScope = tpDeclaration.kind === 168 /* TypeParameter */ ? tpDeclaration.parent : ( // Type parameter is a regular type parameter, e.g. foo tp.isThisType ? tpDeclaration : ( // Type parameter is the this type, and its declaration is the class declaration. @@ -60541,8 +61021,8 @@ ${lanes.join("\n")} } } return true; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -60592,6 +61072,9 @@ ${lanes.join("\n")} const elementFlags = tupleType.target.elementFlags; const elementTypes = map(getElementTypes(tupleType), (t, i) => { const singleton = elementFlags[i] & 8 /* Variadic */ ? t : elementFlags[i] & 4 /* Rest */ ? createArrayType(t) : createTupleType([t], [elementFlags[i]]); + if (singleton === typeVariable) { + return mappedType; + } return instantiateMappedType(mappedType, prependTypeMapping(typeVariable, singleton, mapper)); }); const newReadonly = getModifiedReadonlyState(tupleType.target.readonly, getMappedTypeModifiers(mappedType)); @@ -60679,7 +61162,7 @@ ${lanes.join("\n")} } if (instantiationDepth === 100 || instantiationCount >= 5e6) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "instantiateType_DepthLimit", { typeId: type.id, instantiationDepth, instantiationCount }); - error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); + error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } totalInstantiationCount++; @@ -60795,32 +61278,32 @@ ${lanes.join("\n")} return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 290 /* JsxAttribute */: { + case 291 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 293 /* JsxExpression */: { + case 294 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -60834,7 +61317,7 @@ ${lanes.join("\n")} if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) { return false; } - if (node.body.kind !== 240 /* Block */) { + if (node.body.kind !== 241 /* Block */) { return isContextSensitive(node.body); } return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression)); @@ -60929,23 +61412,27 @@ ${lanes.join("\n")} return true; } switch (node.kind) { - case 293 /* JsxExpression */: - case 216 /* ParenthesizedExpression */: + case 234 /* AsExpression */: + if (!isConstAssertion(node)) { + break; + } + case 294 /* JsxExpression */: + case 217 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 28 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -61245,16 +61732,16 @@ ${lanes.join("\n")} } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return { errorNode: child, innerExpression: child.expression, nameType }; case 12 /* JsxText */: if (child.containsOnlyTriviaWhiteSpaces) { break; } return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() }; - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -61295,7 +61782,7 @@ ${lanes.join("\n")} result = elaborateIterableOrArrayLikeTargetElementwise(children, realSource, arrayLikeTargetParts, relation, containingMessageChain, errorOutputContainer) || result; } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) { result = true; - const diag2 = error( + const diag2 = error2( containingElement.openingElement.tagName, Diagnostics.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided, childrenPropName, @@ -61323,7 +61810,7 @@ ${lanes.join("\n")} } } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) { result = true; - const diag2 = error( + const diag2 = error2( containingElement.openingElement.tagName, Diagnostics.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided, childrenPropName, @@ -61404,13 +61891,13 @@ ${lanes.join("\n")} continue; } switch (prop.kind) { - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: - case 173 /* MethodDeclaration */: - case 303 /* ShorthandPropertyAssignment */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: + case 174 /* MethodDeclaration */: + case 304 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; break; default: @@ -61485,7 +61972,7 @@ ${lanes.join("\n")} void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 173 /* MethodDeclaration */ && kind !== 172 /* MethodSignature */ && kind !== 175 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -61804,6 +62291,7 @@ ${lanes.join("\n")} let errorInfo; let relatedInfo; let maybeKeys; + let maybeKeysSet; let sourceStack; let targetStack; let maybeCount = 0; @@ -61828,7 +62316,7 @@ ${lanes.join("\n")} } if (overflow) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth }); - const diag2 = error(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); + const diag2 = error2(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); if (errorOutputContainer) { (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); } @@ -62673,9 +63161,13 @@ ${lanes.join("\n")} } if (!maybeKeys) { maybeKeys = []; + maybeKeysSet = /* @__PURE__ */ new Set(); sourceStack = []; targetStack = []; } else { + if (maybeKeysSet.has(id)) { + return 3 /* Maybe */; + } const broadestEquivalentId = id.startsWith("*") ? getRelationKey( source2, target2, @@ -62684,10 +63176,8 @@ ${lanes.join("\n")} /*ignoreConstraints*/ true ) : void 0; - for (let i = 0; i < maybeCount; i++) { - if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) { - return 3 /* Maybe */; - } + if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) { + return 3 /* Maybe */; } if (sourceDepth === 100 || targetDepth === 100) { overflow = true; @@ -62696,6 +63186,7 @@ ${lanes.join("\n")} } const maybeStart = maybeCount; maybeKeys[maybeCount] = id; + maybeKeysSet.add(id); maybeCount++; const saveExpandingFlags = expandingFlags; if (recursionFlags & 1 /* Source */) { @@ -62748,17 +63239,34 @@ ${lanes.join("\n")} if (result2) { if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) { if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) { - for (let i = maybeStart; i < maybeCount; i++) { - relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); - } + resetMaybeStack( + /*markAllAsSucceeded*/ + true + ); + } else { + resetMaybeStack( + /*markAllAsSucceeded*/ + false + ); } - maybeCount = maybeStart; } } else { relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags); - maybeCount = maybeStart; + resetMaybeStack( + /*markAllAsSucceeded*/ + false + ); } return result2; + function resetMaybeStack(markAllAsSucceeded) { + for (let i = maybeStart; i < maybeCount; i++) { + maybeKeysSet.delete(maybeKeys[i]); + if (markAllAsSucceeded) { + relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); + } + } + maybeCount = maybeStart; + } } function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) { const saveErrorInfo = captureErrorCalculationState(); @@ -63170,26 +63678,6 @@ ${lanes.join("\n")} )) { return result2; } - if (sourceFlags & 8388608 /* IndexedAccess */) { - const indexType = source2.indexType; - if (indexType.flags & 4194304 /* Index */) { - const unresolvedIndexConstraint = getBaseConstraintOfType(indexType.type); - const indexConstraint = unresolvedIndexConstraint && unresolvedIndexConstraint !== noConstraintType ? getIndexType(unresolvedIndexConstraint) : keyofConstraintType; - const constraint2 = getIndexedAccessType(source2.objectType, indexConstraint); - if (result2 = isRelatedTo( - constraint2, - target2, - 1 /* Source */, - /*reportErrors*/ - false, - /*headMessage*/ - void 0, - intersectionState - )) { - return result2; - } - } - } if (isMappedTypeGenericIndexedAccess(source2)) { const indexConstraint = getConstraintOfType(source2.indexType); if (indexConstraint) { @@ -63875,7 +64363,7 @@ ${lanes.join("\n")} const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 175 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 175 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString( signature, /*enclosingDeclaration*/ @@ -64161,7 +64649,7 @@ ${lanes.join("\n")} let matched = false; for (let i = 0; i < types.length; i++) { if (include[i]) { - const targetType = getTypeOfPropertyOfType(types[i], propertyName); + const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName); if (targetType && related(getDiscriminatingType(), targetType)) { matched = true; } else { @@ -64175,7 +64663,7 @@ ${lanes.join("\n")} } } } - const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])) : target; + const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i]), 0 /* None */) : target; return filtered.flags & 131072 /* Never */ ? target : filtered; } function isWeakType(type) { @@ -64379,7 +64867,7 @@ ${lanes.join("\n")} } function getRecursionIdentity(type) { if (type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { - if (getObjectFlags(type) && 4 /* Reference */ && type.node) { + if (getObjectFlags(type) & 4 /* Reference */ && type.node) { return type.node; } if (type.symbol && !(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) { @@ -64560,7 +65048,7 @@ ${lanes.join("\n")} const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 210 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) { return void 0; } } @@ -64586,7 +65074,8 @@ ${lanes.join("\n")} return !!elementType && isEmptyLiteralType(elementType); } function isTupleLikeType(type) { - return isTupleType(type) || !!getPropertyOfType(type, "0"); + let lengthType; + return isTupleType(type) || !!getPropertyOfType(type, "0") || isArrayLikeType(type) && !!(lengthType = getTypeOfPropertyOfType(type, "length")) && everyType(lengthType, (t) => !!(t.flags & 256 /* NumberLiteral */)); } function isArrayOrTupleLikeType(type) { return isArrayLikeType(type) || isTupleLikeType(type); @@ -64597,17 +65086,7 @@ ${lanes.join("\n")} return propType; } if (everyType(type, isTupleType)) { - return mapType(type, (t) => { - const tupleType = t; - const restType = getRestTypeOfTupleType(tupleType); - if (!restType) { - return undefinedType; - } - if (compilerOptions.noUncheckedIndexedAccess && index >= tupleType.target.fixedLength + getEndElementCount(tupleType.target, 3 /* Fixed */)) { - return getUnionType([restType, undefinedType]); - } - return restType; - }); + return getTupleElementTypeOutOfStartCount(type, index, compilerOptions.noUncheckedIndexedAccess ? undefinedType : void 0); } return void 0; } @@ -64675,6 +65154,19 @@ ${lanes.join("\n")} function getRestTypeOfTupleType(type) { return getElementTypeOfSliceOfTupleType(type, type.target.fixedLength); } + function getTupleElementTypeOutOfStartCount(type, index, undefinedOrMissingType2) { + return mapType(type, (t) => { + const tupleType = t; + const restType = getRestTypeOfTupleType(tupleType); + if (!restType) { + return undefinedType; + } + if (undefinedOrMissingType2 && index >= getTotalFixedElementCount(tupleType.target)) { + return getUnionType([restType, undefinedOrMissingType2]); + } + return restType; + }); + } function getRestArrayTypeOfTupleType(type) { const restType = getRestTypeOfTupleType(type); return restType && createArrayType(restType); @@ -64943,7 +65435,7 @@ ${lanes.join("\n")} const t = getTypeOfSymbol(p); if (getObjectFlags(t) & 65536 /* ContainsWideningType */) { if (!reportWideningErrorsInType(t)) { - error(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); + error2(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); } errorReported = true; } @@ -64959,12 +65451,12 @@ ${lanes.join("\n")} } let diagnostic; switch (declaration.kind) { - case 225 /* BinaryExpression */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 226 /* BinaryExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 168 /* Parameter */: + case 169 /* Parameter */: const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); @@ -64986,40 +65478,40 @@ ${lanes.join("\n")} } diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 323 /* JSDocFunctionType */: - error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); + case 324 /* JSDocFunctionType */: + error2(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 329 /* JSDocSignature */: + case 330 /* JSDocSignature */: if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) { - error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); + error2(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); } return; - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (noImplicitAny && !declaration.name) { if (wideningKind === 3 /* GeneratorYield */) { - error(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); + error2(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); } else { - error(declaration, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); + error2(declaration, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); } return; } diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; - case 199 /* MappedType */: + case 200 /* MappedType */: if (noImplicitAny) { - error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); + error2(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } return; default: @@ -65114,7 +65606,7 @@ ${lanes.join("\n")} function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 173 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); + const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -65166,8 +65658,8 @@ ${lanes.join("\n")} } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 264 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 311 /* SourceFile */ ? true : n.kind === 266 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 265 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 312 /* SourceFile */ ? true : n.kind === 267 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -65209,17 +65701,18 @@ ${lanes.join("\n")} ); } function inferTypeForHomomorphicMappedType(source, target, constraint) { - if (inInferTypeForHomomorphicMappedType) { - return void 0; + const cacheKey = source.id + "," + target.id + "," + constraint.id; + if (reverseMappedCache.has(cacheKey)) { + return reverseMappedCache.get(cacheKey); } - const key = source.id + "," + target.id + "," + constraint.id; - if (reverseMappedCache.has(key)) { - return reverseMappedCache.get(key); + const recursionKey = source.id + "," + (target.target || target).id; + if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) { + return void 0; } - inInferTypeForHomomorphicMappedType = true; + homomorphicMappedTypeInferenceStack.push(recursionKey); const type = createReverseMappedType(source, target, constraint); - inInferTypeForHomomorphicMappedType = false; - reverseMappedCache.set(key, type); + homomorphicMappedTypeInferenceStack.pop(); + reverseMappedCache.set(cacheKey, type); return type; } function isPartiallyInferableType(type) { @@ -65992,7 +66485,7 @@ ${lanes.join("\n")} if (!(source.flags & 64 /* IsNonInferrable */)) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 173 /* MethodDeclaration */ || kind === 172 /* MethodSignature */ || kind === 175 /* Constructor */; + bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; } @@ -66092,7 +66585,7 @@ ${lanes.join("\n")} const constraint = getConstraintOfTypeParameter(inference.typeParameter); if (constraint) { const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper); - if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { + if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; } } @@ -66150,7 +66643,7 @@ ${lanes.join("\n")} return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer; } else { return Diagnostics.Cannot_find_name_0; @@ -66173,14 +66666,8 @@ ${lanes.join("\n")} } return links.resolvedSymbol; } - function isInTypeQuery(node) { - return !!findAncestor( - node, - (n) => n.kind === 185 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 165 /* QualifiedName */ ? false : "quit" - ); - } function isInAmbientOrTypeNode(node) { - return !!(node.flags & 16777216 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n))); + return !!(node.flags & 33554432 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n))); } function getFlowCacheKey(node, declaredType, initialType, flowContainer) { switch (node.kind) { @@ -66191,41 +66678,41 @@ ${lanes.join("\n")} } case 110 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 235 /* MetaProperty */: - return target.kind === 235 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 236 /* MetaProperty */: + return target.kind === 236 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 80 /* Identifier */: case 81 /* PrivateIdentifier */: return isThisInTypeQuery(source) ? target.kind === 110 /* ThisKeyword */ : target.kind === 80 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); @@ -66233,17 +66720,17 @@ ${lanes.join("\n")} return target.kind === 110 /* ThisKeyword */; case 108 /* SuperKeyword */: return target.kind === 108 /* SuperKeyword */; - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const sourcePropertyName = getAccessedPropertyName(source); const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0; return sourcePropertyName !== void 0 && targetPropertyName !== void 0 && targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -66277,7 +66764,7 @@ ${lanes.join("\n")} /*ignoreErrors*/ true ); - if (!symbol || !(isConstVariable(symbol) || symbol.flags & 8 /* EnumMember */)) + if (!symbol || !(isConstantVariable(symbol) || symbol.flags & 8 /* EnumMember */)) return void 0; const declaration = symbol.valueDeclaration; if (declaration === void 0) @@ -66396,7 +66883,7 @@ ${lanes.join("\n")} } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 302 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 303 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -66411,7 +66898,7 @@ ${lanes.join("\n")} } } } - if (expression.expression.kind === 210 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -66583,11 +67070,11 @@ ${lanes.join("\n")} ) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 208 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 302 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 303 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 225 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 249 /* ForOfStatement */ && parent2.parent.initializer === parent2; + return parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 250 /* ForOfStatement */ && parent2.parent.initializer === parent2; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -66604,21 +67091,21 @@ ${lanes.join("\n")} function getAssignedType(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return stringType; - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return checkRightHandSideOfForOf(parent2) || errorType; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent2); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return undefinedType; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent2); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent2); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent2); } return errorType; @@ -66626,7 +67113,7 @@ ${lanes.join("\n")} function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 205 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); return getTypeWithDefault(type, node.initializer); } function getTypeOfInitializer(node) { @@ -66637,25 +67124,25 @@ ${lanes.join("\n")} if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 248 /* ForInStatement */) { + if (node.parent.parent.kind === 249 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 249 /* ForOfStatement */) { + if (node.parent.parent.kind === 250 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 259 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 260 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 259 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 207 /* BindingElement */ && node.parent.kind === 225 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 260 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 226 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 76 /* BarBarEqualsToken */: @@ -66670,10 +67157,10 @@ ${lanes.join("\n")} } function getReferenceRoot(node) { const { parent: parent2 } = node; - return parent2.kind === 216 /* ParenthesizedExpression */ || parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */ && parent2.left === node || parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 28 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; + return parent2.kind === 217 /* ParenthesizedExpression */ || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */ && parent2.left === node || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 28 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -66689,12 +67176,12 @@ ${lanes.join("\n")} return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 295 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 295 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 296 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -66852,8 +67339,8 @@ ${lanes.join("\n")} function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 212 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 211 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 225 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 64 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); + const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 213 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isElementAssignment = parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 64 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); return isLengthPushOrUnshift || isElementAssignment; } function isDeclarationWithExplicitTypeAnnotation(node) { @@ -66876,7 +67363,7 @@ ${lanes.join("\n")} if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName( statement.expression, @@ -66901,7 +67388,7 @@ ${lanes.join("\n")} } } function getTypeOfDottedName(node, diagnostic) { - if (!(node.flags & 33554432 /* InWithStatement */)) { + if (!(node.flags & 67108864 /* InWithStatement */)) { switch (node.kind) { case 80 /* Identifier */: const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node)); @@ -66910,7 +67397,7 @@ ${lanes.join("\n")} return getExplicitThisType(node); case 108 /* SuperKeyword */: return checkSuperExpression(node); - case 210 /* PropertyAccessExpression */: { + case 211 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -66927,7 +67414,7 @@ ${lanes.join("\n")} } return void 0; } - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -66937,7 +67424,7 @@ ${lanes.join("\n")} let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 243 /* ExpressionStatement */) { + if (node.parent.kind === 244 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ @@ -66991,7 +67478,7 @@ ${lanes.join("\n")} /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 97 /* FalseKeyword */ || node.kind === 225 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + return node.kind === 97 /* FalseKeyword */ || node.kind === 226 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { @@ -67110,14 +67597,16 @@ ${lanes.join("\n")} } function isConstantReference(node) { switch (node.kind) { + case 110 /* ThisKeyword */: + return true; case 80 /* Identifier */: if (!isThisInTypeQuery(node)) { const symbol = getResolvedSymbol(node); - return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); + return isConstantVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } break; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -67137,7 +67626,7 @@ ${lanes.join("\n")} const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode)); sharedFlowCount = sharedFlowStart; const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType); - if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 234 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 235 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -67206,7 +67695,7 @@ ${lanes.join("\n")} target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 210 /* PropertyAccessExpression */ && reference.kind !== 211 /* ElementAccessExpression */ && reference.kind !== 110 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && !(reference.kind === 110 /* ThisKeyword */ && container.kind !== 219 /* ArrowFunction */)) { flow = container.flowNode; continue; } @@ -67225,7 +67714,7 @@ ${lanes.join("\n")} } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -67253,15 +67742,15 @@ ${lanes.join("\n")} if (!isReachableFlowNode(flow)) { return unreachableNeverType; } - if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { + if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConstLike(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 217 /* FunctionExpression */ || init.kind === 218 /* ArrowFunction */)) { + if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 248 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 249 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -67275,7 +67764,7 @@ ${lanes.join("\n")} if (node.kind === 97 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 225 /* BinaryExpression */) { + if (node.kind === 226 /* BinaryExpression */) { if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -67315,13 +67804,13 @@ ${lanes.join("\n")} function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 212 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { const flowType = getTypeAtFlowNode(flow.antecedent); const type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { let evolvedType2 = type; - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -67358,7 +67847,7 @@ ${lanes.join("\n")} let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 220 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -67370,7 +67859,7 @@ ${lanes.join("\n")} flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 220 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 221 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -67515,7 +68004,7 @@ ${lanes.join("\n")} } } else if (isIdentifier(expr)) { const symbol = getResolvedSymbol(expr); - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; if (isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isAccessExpression(declaration.initializer) && isMatchingReference(reference, declaration.initializer.expression)) { return declaration.initializer; @@ -67633,10 +68122,10 @@ ${lanes.join("\n")} const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 220 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 220 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -67674,12 +68163,15 @@ ${lanes.join("\n")} return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue); } const target = getReferenceCandidate(expr.right); - const leftType = getTypeOfExpression(expr.left); - if (leftType.flags & 8576 /* StringOrNumberLiteralOrUnique */) { - if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) { + if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target)) { + const leftType = getTypeOfExpression(expr.left); + if (isTypeUsableAsPropertyName(leftType) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) { return getTypeWithFacts(type, assumeTrue ? 524288 /* NEUndefined */ : 65536 /* EQUndefined */); } - if (isMatchingReference(reference, target)) { + } + if (isMatchingReference(reference, target)) { + const leftType = getTypeOfExpression(expr.left); + if (isTypeUsableAsPropertyName(leftType)) { return narrowTypeByInKeyword(type, leftType, assumeTrue); } } @@ -67895,7 +68387,7 @@ ${lanes.join("\n")} if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -68059,7 +68551,7 @@ ${lanes.join("\n")} case 80 /* Identifier */: if (!isMatchingReference(reference, expr) && inlineLevel < 5) { const symbol = getResolvedSymbol(expr); - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isConstantReference(reference)) { inlineLevel++; @@ -68071,17 +68563,17 @@ ${lanes.join("\n")} } case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: if (expr.operator === 54 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -68107,7 +68599,7 @@ ${lanes.join("\n")} location = location.parent; } if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) { - const type = getTypeOfExpression(location); + const type = removeOptionalTypeMarker(getTypeOfExpression(location)); if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) { return type; } @@ -68119,7 +68611,7 @@ ${lanes.join("\n")} return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 267 /* ModuleBlock */ || node2.kind === 311 /* SourceFile */ || node2.kind === 171 /* PropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -68127,8 +68619,8 @@ ${lanes.join("\n")} } const parent2 = getRootDeclaration(symbol.valueDeclaration).parent; const links = getNodeLinks(parent2); - if (!(links.flags & 524288 /* AssignmentsMarked */)) { - links.flags |= 524288 /* AssignmentsMarked */; + if (!(links.flags & 131072 /* AssignmentsMarked */)) { + links.flags |= 131072 /* AssignmentsMarked */; if (!hasParentWithAssignmentsMarked(parent2)) { markNodeAssignments(parent2); } @@ -68136,7 +68628,7 @@ ${lanes.join("\n")} return symbol.isAssigned || false; } function hasParentWithAssignmentsMarked(node) { - return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 524288 /* AssignmentsMarked */)); + return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */)); } function markNodeAssignments(node) { if (node.kind === 80 /* Identifier */) { @@ -68150,8 +68642,8 @@ ${lanes.join("\n")} forEachChild(node, markNodeAssignments); } } - function isConstVariable(symbol) { - return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */) !== 0; + function isConstantVariable(symbol) { + return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */) !== 0; } function parameterInitializerContainsUndefined(declaration) { const links = getNodeLinks(declaration); @@ -68170,12 +68662,12 @@ ${lanes.join("\n")} return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 168 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { const parent2 = node.parent; - return parent2.kind === 210 /* PropertyAccessExpression */ || parent2.kind === 165 /* QualifiedName */ || parent2.kind === 212 /* CallExpression */ && parent2.expression === node || parent2.kind === 211 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); + return parent2.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 166 /* QualifiedName */ || parent2.kind === 213 /* CallExpression */ && parent2.expression === node || parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); } function isGenericTypeWithUnionConstraint(type) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */)); @@ -68218,9 +68710,13 @@ ${lanes.join("\n")} symbol, /*excludes*/ 111551 /* Value */ - ) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */)) { + ) && !isInTypeQuery(location)) { const target = resolveAlias(symbol); - if (getAllSymbolFlags(target) & (111551 /* Value */ | 1048576 /* ExportValue */)) { + if (getSymbolFlags( + symbol, + /*excludeTypeOnlyMeanings*/ + true + ) & (111551 /* Value */ | 1048576 /* ExportValue */)) { if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) { markAliasSymbolAsReferenced(symbol); } else { @@ -68236,14 +68732,14 @@ ${lanes.join("\n")} if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent2 = declaration.parent.parent; - if (parent2.kind === 259 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || parent2.kind === 169 /* Parameter */) { const links = getNodeLinks(parent2); - if (!(links.flags & 16777216 /* InCheckIdentifier */)) { - links.flags |= 16777216 /* InCheckIdentifier */; + if (!(links.flags & 4194304 /* InCheckIdentifier */)) { + links.flags |= 4194304 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); - links.flags &= ~16777216 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 168 /* Parameter */ && isSymbolAssigned(symbol))) { + links.flags &= ~4194304 /* InCheckIdentifier */; + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference( pattern, @@ -68295,15 +68791,15 @@ ${lanes.join("\n")} } if (symbol === argumentsSymbol) { if (isInPropertyInitializerOrClassStaticBlock(node)) { - error(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers); + error2(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers); return errorType; } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 218 /* ArrowFunction */) { - error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); + if (container.kind === 219 /* ArrowFunction */) { + error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (hasSyntacticModifier(container, 512 /* Async */)) { - error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); + error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); } } getNodeLinks(container).flags |= 512 /* CaptureArguments */; @@ -68319,17 +68815,7 @@ ${lanes.join("\n")} } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 262 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { - let container = getContainingClass(node); - while (container !== void 0) { - if (container === declaration && container.name !== node) { - getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; - getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */; - break; - } - container = getContainingClass(container); - } - } else if (declaration.kind === 230 /* ClassExpression */) { + if (isClassLike(declaration) && declaration.name !== node) { let container = getThisContainer( node, /*includeArrowFunctions*/ @@ -68337,14 +68823,7 @@ ${lanes.join("\n")} /*includeClassComputedPropertyName*/ false ); - while (container.kind !== 311 /* SourceFile */) { - if (container.parent === declaration) { - if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { - getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; - getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */; - } - break; - } + while (container.kind !== 312 /* SourceFile */ && container.parent !== declaration) { container = getThisContainer( container, /*includeArrowFunctions*/ @@ -68353,6 +68832,11 @@ ${lanes.join("\n")} false ); } + if (container.kind !== 312 /* SourceFile */) { + getNodeLinks(declaration).flags |= 262144 /* ContainsConstructorReference */; + getNodeLinks(container).flags |= 262144 /* ContainsConstructorReference */; + getNodeLinks(node).flags |= 536870912 /* ConstructorReference */; + } } } checkNestedBlockScopedBinding(node, symbol); @@ -68361,14 +68845,14 @@ ${lanes.join("\n")} if (assignmentKind) { if (!(localOrExportSymbol.flags & 3 /* Variable */) && !(isInJSFile(node) && localOrExportSymbol.flags & 512 /* ValueModule */)) { const assignmentError = localOrExportSymbol.flags & 384 /* Enum */ ? Diagnostics.Cannot_assign_to_0_because_it_is_an_enum : localOrExportSymbol.flags & 32 /* Class */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_class : localOrExportSymbol.flags & 1536 /* Module */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_namespace : localOrExportSymbol.flags & 16 /* Function */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_function : localOrExportSymbol.flags & 2097152 /* Alias */ ? Diagnostics.Cannot_assign_to_0_because_it_is_an_import : Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable; - error(node, assignmentError, symbolToString(symbol)); + error2(node, assignmentError, symbolToString(symbol)); return errorType; } if (isReadonlySymbol(localOrExportSymbol)) { if (localOrExportSymbol.flags & 3 /* Variable */) { - error(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_constant, symbolToString(symbol)); + error2(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_constant, symbolToString(symbol)); } else { - error(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(symbol)); + error2(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(symbol)); } return errorType; } @@ -68387,30 +68871,30 @@ ${lanes.join("\n")} return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 168 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 169 /* Parameter */; const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); const isModuleExports = symbol.flags & 134217728 /* ModuleExports */; const typeIsAutomatic = type === autoType || type === autoArrayType; - const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 234 /* NonNullExpression */; - while (flowContainer !== declarationContainer && (flowContainer.kind === 217 /* FunctionExpression */ || flowContainer.kind === 218 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 235 /* NonNullExpression */; + while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } - const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 280 /* ExportSpecifier */) || node.parent.kind === 234 /* NonNullExpression */ || declaration.kind === 259 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; + const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */; const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type); const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer); if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) { if (flowType === autoType || flowType === autoArrayType) { if (noImplicitAny) { - error(getNameOfDeclaration(declaration), Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType)); - error(node, Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); + error2(getNameOfDeclaration(declaration), Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType)); + error2(node, Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); } return convertAutoToAny(flowType); } } else if (!assumeInitialized && !containsUndefinedType(type) && containsUndefinedType(flowType)) { - error(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + error2(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); return type; } return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; @@ -68452,7 +68936,7 @@ ${lanes.join("\n")} )); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 298 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 299 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -68462,7 +68946,7 @@ ${lanes.join("\n")} if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 260 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -68481,9 +68965,9 @@ ${lanes.join("\n")} } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 260 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { - getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */; + getNodeLinks(symbol.valueDeclaration).flags |= 65536 /* NeedsLoopOutParameter */; } } getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */; @@ -68498,13 +68982,13 @@ ${lanes.join("\n")} } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 216 /* ParenthesizedExpression */) { + while (current.parent.kind === 217 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 223 /* PrefixUnaryExpression */ || current.parent.kind === 224 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 224 /* PrefixUnaryExpression */ || current.parent.kind === 225 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; } @@ -68515,7 +68999,7 @@ ${lanes.join("\n")} } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 171 /* PropertyDeclaration */ || container.kind === 175 /* Constructor */) { + if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -68540,13 +69024,13 @@ ${lanes.join("\n")} /*noCacheCheck*/ false )) { - error(node, diagnosticMessage); + error2(node, diagnosticMessage); } } } function checkThisInStaticClassFieldInitializerInDecoratedClass(thisExpression, container) { if (isPropertyDeclaration(container) && hasStaticModifier(container) && legacyDecorators && container.initializer && textRangeContainsPositionInclusive(container.initializer, thisExpression.pos) && hasDecorators(container.parent)) { - error(thisExpression, Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class); + error2(thisExpression, Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class); } } function checkThisExpression(node) { @@ -68560,11 +69044,11 @@ ${lanes.join("\n")} ); let capturedByArrowFunction = false; let thisInComputedPropertyName = false; - if (container.kind === 175 /* Constructor */) { + if (container.kind === 176 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } while (true) { - if (container.kind === 218 /* ArrowFunction */) { + if (container.kind === 219 /* ArrowFunction */) { container = getThisContainer( container, /*includeArrowFunctions*/ @@ -68573,7 +69057,7 @@ ${lanes.join("\n")} ); capturedByArrowFunction = true; } - if (container.kind === 166 /* ComputedPropertyName */) { + if (container.kind === 167 /* ComputedPropertyName */) { container = getThisContainer( container, !capturedByArrowFunction, @@ -68587,18 +69071,18 @@ ${lanes.join("\n")} } checkThisInStaticClassFieldInitializerInDecoratedClass(node, container); if (thisInComputedPropertyName) { - error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); + error2(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); } else { switch (container.kind) { - case 266 /* ModuleDeclaration */: - error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); + case 267 /* ModuleDeclaration */: + error2(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 265 /* EnumDeclaration */: - error(node, Diagnostics.this_cannot_be_referenced_in_current_location); + case 266 /* EnumDeclaration */: + error2(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 175 /* Constructor */: + case 176 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { - error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); + error2(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; } @@ -68615,9 +69099,9 @@ ${lanes.join("\n")} if (noImplicitThis) { const globalThisType2 = getTypeOfSymbol(globalThisSymbol); if (type === globalThisType2 && capturedByArrowFunction) { - error(node, Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this); + error2(node, Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this); } else if (!type) { - const diag2 = error(node, Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation); + const diag2 = error2(node, Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation); if (!isSourceFile(container)) { const outsideThis = tryGetThisTypeAt(container); if (outsideThis && outsideThis !== globalThisType2) { @@ -68690,36 +69174,33 @@ ${lanes.join("\n")} } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 217 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 173 /* MethodDeclaration */ && container.parent.kind === 209 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 217 /* FunctionExpression */ && container.parent.kind === 302 /* PropertyAssignment */ && container.parent.parent.kind === 209 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 303 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 217 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { + } else if (container.kind === 218 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.parent.arguments[0].expression; } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.arguments[0].expression; } } function getTypeForThisExpressionFromJSDoc(node) { - const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 323 /* JSDocFunctionType */) { - const jsDocFunctionType = jsdocType; - if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].name && jsDocFunctionType.parameters[0].name.escapedText === "this" /* This */) { - return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); - } - } const thisTag = getJSDocThisTag(node); if (thisTag && thisTag.typeExpression) { return getTypeFromTypeNode(thisTag.typeExpression); } + const signature = getSignatureOfTypeTag(node); + if (signature) { + return getThisTypeOfSignature(signature); + } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 168 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 212 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer( node, /*stopOnFunctions*/ @@ -68729,7 +69210,7 @@ ${lanes.join("\n")} let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 218 /* ArrowFunction */) { + while (container && container.kind === 219 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer( @@ -68744,19 +69225,19 @@ ${lanes.join("\n")} } let nodeCheckFlag = 0; if (!container || !isLegalUsageOfSuperExpression(container)) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 166 /* ComputedPropertyName */); - if (current && current.kind === 166 /* ComputedPropertyName */) { - error(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 167 /* ComputedPropertyName */); + if (current && current.kind === 167 /* ComputedPropertyName */) { + error2(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression2) { - error(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 209 /* ObjectLiteralExpression */)) { - error(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); + error2(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 210 /* ObjectLiteralExpression */)) { + error2(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { - error(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); + error2(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); } return errorType; } - if (!isCallExpression2 && immediateContainer.kind === 175 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 176 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if (isStatic(container) || isCallExpression2) { @@ -68764,7 +69245,7 @@ ${lanes.join("\n")} if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) { forEachEnclosingBlockScopeContainer(node.parent, (current) => { if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) { - getNodeLinks(current).flags |= 8388608 /* ContainsSuperPropertyInStaticInitializer */; + getNodeLinks(current).flags |= 2097152 /* ContainsSuperPropertyInStaticInitializer */; } }); } @@ -68772,7 +69253,7 @@ ${lanes.join("\n")} nodeCheckFlag = 16 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 173 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -68782,9 +69263,9 @@ ${lanes.join("\n")} if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 209 /* ObjectLiteralExpression */) { + if (container.parent.kind === 210 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { - error(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); + error2(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return errorType; } else { return anyType; @@ -68792,7 +69273,7 @@ ${lanes.join("\n")} } const classLikeDeclaration = container.parent; if (!getClassExtendsHeritageElement(classLikeDeclaration)) { - error(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class); + error2(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class); return errorType; } const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration)); @@ -68800,20 +69281,20 @@ ${lanes.join("\n")} if (!baseClassType) { return errorType; } - if (container.kind === 175 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { - error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); + if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + error2(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType); function isLegalUsageOfSuperExpression(container2) { if (isCallExpression2) { - return container2.kind === 175 /* Constructor */; + return container2.kind === 176 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 209 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 173 /* MethodDeclaration */ || container2.kind === 172 /* MethodSignature */ || container2.kind === 176 /* GetAccessor */ || container2.kind === 177 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 174 /* ClassStaticBlockDeclaration */; + return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 173 /* MethodDeclaration */ || container2.kind === 172 /* MethodSignature */ || container2.kind === 176 /* GetAccessor */ || container2.kind === 177 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 170 /* PropertySignature */ || container2.kind === 175 /* Constructor */; + return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 176 /* Constructor */; } } } @@ -68821,7 +69302,7 @@ ${lanes.join("\n")} } } function getContainingObjectLiteral(func) { - return (func.kind === 173 /* MethodDeclaration */ || func.kind === 176 /* GetAccessor */ || func.kind === 177 /* SetAccessor */) && func.parent.kind === 209 /* ObjectLiteralExpression */ ? func.parent : func.kind === 217 /* FunctionExpression */ && func.parent.kind === 302 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 303 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -68831,8 +69312,27 @@ ${lanes.join("\n")} return t.flags & 2097152 /* Intersection */ ? forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t); }); } + function getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType) { + let literal = containingLiteral; + let type = contextualType; + while (type) { + const thisType = getThisTypeFromContextualType(type); + if (thisType) { + return thisType; + } + if (literal.parent.kind !== 303 /* PropertyAssignment */) { + break; + } + literal = literal.parent.parent; + type = getApparentTypeOfContextualType( + literal, + /*contextFlags*/ + void 0 + ); + } + } function getContextualThisParameterType(func) { - if (func.kind === 218 /* ArrowFunction */) { + if (func.kind === 219 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -68853,27 +69353,14 @@ ${lanes.join("\n")} /*contextFlags*/ void 0 ); - let literal = containingLiteral; - let type = contextualType; - while (type) { - const thisType = getThisTypeFromContextualType(type); - if (thisType) { - return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); - } - if (literal.parent.kind !== 302 /* PropertyAssignment */) { - break; - } - literal = literal.parent.parent; - type = getApparentTypeOfContextualType( - literal, - /*contextFlags*/ - void 0 - ); + const thisType = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); + if (thisType) { + return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */) { + if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -68928,11 +69415,11 @@ ${lanes.join("\n")} return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 168 /* Parameter */: + case 169 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -68941,10 +69428,10 @@ ${lanes.join("\n")} function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 207 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent2.name.kind === 206 /* ArrayBindingPattern */) { + if (parent2.name.kind === 207 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -69094,7 +69581,7 @@ ${lanes.join("\n")} return signature ? getOrCreateTypeFromSignature(signature) : void 0; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 214 /* TaggedTemplateExpression */) { + if (template.parent.kind === 215 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -69312,7 +69799,7 @@ ${lanes.join("\n")} } function getContextualTypeForObjectLiteralMethod(node, contextFlags) { Debug.assert(isObjectLiteralMethod(node)); - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } return getContextualTypeForObjectLiteralElement(node, contextFlags); @@ -69448,16 +69935,17 @@ ${lanes.join("\n")} case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: + case 228 /* TemplateExpression */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 80 /* Identifier */: case 157 /* UndefinedKeyword */: return true; - case 210 /* PropertyAccessExpression */: - case 216 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 217 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -69467,7 +69955,7 @@ ${lanes.join("\n")} contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 302 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 303 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -69487,7 +69975,7 @@ ${lanes.join("\n")} contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 290 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 291 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -69552,7 +70040,7 @@ ${lanes.join("\n")} } function getContextualType2(node, contextFlags) { var _a; - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } const index = findContextualNode( @@ -69565,47 +70053,47 @@ ${lanes.join("\n")} } const { parent: parent2 } = node; switch (parent2.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 208 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 218 /* ArrowFunction */: - case 252 /* ReturnStatement */: + case 219 /* ArrowFunction */: + case 253 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return getContextualTypeForYieldOperand(parent2, contextFlags); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: return getContextualTypeForArgument(parent2, node); - case 169 /* Decorator */: + case 170 /* Decorator */: return getContextualTypeForDecorator(parent2); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return isConstTypeReference(parent2.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(parent2.type); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return getContextualType2(parent2.parent, contextFlags); - case 208 /* ArrayLiteralExpression */: { + case 209 /* ArrayLiteralExpression */: { const arrayLiteral = parent2; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); const elementIndex = indexOfNode(arrayLiteral.elements, node); const spreadIndices = (_a = getNodeLinks(arrayLiteral)).spreadIndices ?? (_a.spreadIndices = getSpreadIndices(arrayLiteral.elements)); return getContextualTypeForElementExpression(type, elementIndex, arrayLiteral.elements.length, spreadIndices.first, spreadIndices.last); } - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 238 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 227 /* TemplateExpression */); + case 239 /* TemplateSpan */: + Debug.assert(parent2.parent.kind === 228 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 216 /* ParenthesizedExpression */: { + case 217 /* ParenthesizedExpression */: { if (isInJSFile(parent2)) { if (isJSDocSatisfiesExpression(parent2)) { return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2)); @@ -69617,19 +70105,19 @@ ${lanes.join("\n")} } return getContextualType2(parent2, contextFlags); } - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return getContextualType2(parent2, contextFlags); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return getTypeFromTypeNode(parent2.type); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent2); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return getContextualTypeForJsxExpression(parent2, contextFlags); - case 290 /* JsxAttribute */: - case 292 /* JsxSpreadAttribute */: + case 291 /* JsxAttribute */: + case 293 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent2, contextFlags); } return void 0; @@ -69756,7 +70244,7 @@ ${lanes.join("\n")} let attributesType = forcedLookupLocation === void 0 ? getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType) : forcedLookupLocation === "" ? getReturnTypeOfSignature(sig) : getJsxPropsTypeForSignatureFromMember(sig, forcedLookupLocation); if (!attributesType) { if (!!forcedLookupLocation && !!length(context.attributes.properties)) { - error(context, Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, unescapeLeadingUnderscores(forcedLookupLocation)); + error2(context, Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, unescapeLeadingUnderscores(forcedLookupLocation)); } return unknownType; } @@ -69858,7 +70346,7 @@ ${lanes.join("\n")} /*resolvedTypePredicate*/ void 0, minArgCount, - (left.flags | right.flags) & 39 /* PropagatingFlags */ + (left.flags | right.flags) & 167 /* PropagatingFlags */ ); result.compositeKind = 2097152 /* Intersection */; result.compositeSignatures = concatenate(left.compositeKind === 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); @@ -69889,7 +70377,7 @@ ${lanes.join("\n")} return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -69940,7 +70428,11 @@ ${lanes.join("\n")} return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 207 /* BindingElement */ && !!node.initializer || node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; + return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; + } + function isSpreadIntoCallOrNew(node) { + const parent2 = walkUpParenthesizedExpressions(node.parent); + return isSpreadElement(parent2) && isCallOrNewExpression(parent2.parent); } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -69949,18 +70441,17 @@ ${lanes.join("\n")} const elementFlags = []; pushCachedContextualType(node); const inDestructuringPattern = isAssignmentTarget(node); - const isSpreadIntoCallOrNew = isSpreadElement(node.parent) && isCallOrNewExpression(node.parent.parent); - const inConstContext = isSpreadIntoCallOrNew || isConstContext(node); + const inConstContext = isConstContext(node); const contextualType = getApparentTypeOfContextualType( node, /*contextFlags*/ void 0 ); - const inTupleContext = isSpreadIntoCallOrNew || !!contextualType && someType(contextualType, isTupleLikeType); + const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, isTupleLikeType); let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 229 /* SpreadElement */) { + if (e.kind === 230 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -69984,7 +70475,7 @@ ${lanes.join("\n")} elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 231 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 232 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(undefinedOrMissingType); elementFlags.push(2 /* Optional */); @@ -70031,7 +70522,7 @@ ${lanes.join("\n")} } function isNumericName(name) { switch (name.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return isNumericComputedName(name); case 80 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -70048,7 +70539,7 @@ ${lanes.join("\n")} function checkComputedPropertyName(node) { const links = getNodeLinks(node.expression); if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 176 /* GetAccessor */ && node.parent.kind !== 177 /* SetAccessor */) { + if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -70062,7 +70553,7 @@ ${lanes.join("\n")} } } if (links.resolvedType.flags & 98304 /* Nullable */ || !isTypeAssignableToKind(links.resolvedType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */) && !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) { - error(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); + error2(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); } } return links.resolvedType; @@ -70117,7 +70608,7 @@ ${lanes.join("\n")} /*contextFlags*/ void 0 ); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 205 /* ObjectBindingPattern */ || contextualType.pattern.kind === 209 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -70136,13 +70627,13 @@ ${lanes.join("\n")} let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfDeclaration(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 166 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 302 /* PropertyAssignment */ || memberDecl.kind === 303 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 302 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( + const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 303 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. // we don't want to say "could not find 'a'". - memberDecl.kind === 303 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) + memberDecl.kind === 304 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) ); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); @@ -70160,7 +70651,7 @@ ${lanes.join("\n")} prop.links.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 302 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 303 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 303 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -70169,7 +70660,7 @@ ${lanes.join("\n")} if (impliedProp) { prop.flags |= impliedProp.flags & 16777216 /* Optional */; } else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, stringType)) { - error( + error2( memberDecl.name, Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), @@ -70186,13 +70677,13 @@ ${lanes.join("\n")} prop.links.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 302 /* PropertyAssignment */ || memberDecl.kind === 173 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 302 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 303 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } - } else if (memberDecl.kind === 304 /* SpreadAssignment */) { + } else if (memberDecl.kind === 305 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -70216,12 +70707,12 @@ ${lanes.join("\n")} } spread = getSpreadType(spread, mergedType, node.symbol, objectFlags, inConstContext); } else { - error(memberDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types); + error2(memberDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types); spread = errorType; } continue; } else { - Debug.assert(memberDecl.kind === 176 /* GetAccessor */ || memberDecl.kind === 177 /* SetAccessor */); + Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -70246,17 +70737,17 @@ ${lanes.join("\n")} if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 259 /* VariableDeclaration */ || n.kind === 225 /* BinaryExpression */ || n.kind === 168 /* Parameter */ + (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 304 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 304 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 305 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { - error( + error2( prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value ); @@ -70331,7 +70822,7 @@ ${lanes.join("\n")} checkJsxOpeningLikeElementOrOpeningFragment(node.openingFragment); const nodeSourceFile = getSourceFileOfNode(node); if (getJSXTransformEnabled(compilerOptions) && (compilerOptions.jsxFactory || nodeSourceFile.pragmas.has("jsx")) && !compilerOptions.jsxFragmentFactory && !nodeSourceFile.pragmas.has("jsxfrag")) { - error(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments); + error2(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments); } checkJsxChildren(node); return getJsxElementTypeAt(node) || anyType; @@ -70387,7 +70878,7 @@ ${lanes.join("\n")} addIntraExpressionInferenceSite(inferenceContext, inferenceNode, exprType); } } else { - Debug.assert(attributeDecl.kind === 292 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 293 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType( spread, @@ -70416,7 +70907,7 @@ ${lanes.join("\n")} checkSpreadPropOverrides(exprType, allAttributesTable, attributeDecl); } } else { - error(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types); + error2(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types); typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType; } } @@ -70433,12 +70924,12 @@ ${lanes.join("\n")} ); } } - const parent2 = openingLikeElement.parent.kind === 283 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { if (explicitlySpecifyChildrenAttribute) { - error(attributes, Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, unescapeLeadingUnderscores(jsxChildrenPropertyName)); + error2(attributes, Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, unescapeLeadingUnderscores(jsxChildrenPropertyName)); } const contextualType2 = getApparentTypeOfContextualType( openingLikeElement.attributes, @@ -70492,7 +70983,7 @@ ${lanes.join("\n")} if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 293 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 294 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -70505,7 +70996,7 @@ ${lanes.join("\n")} if (!(right.flags & 16777216 /* Optional */)) { const left = props.get(right.escapedName); if (left) { - const diagnostic = error(left.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(left.escapedName)); + const diagnostic = error2(left.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(left.escapedName)); addRelatedInfo(diagnostic, createDiagnosticForNode(spread, Diagnostics.This_spread_always_overwrites_this_property)); } } @@ -70537,11 +71028,11 @@ ${lanes.join("\n")} links.jsxFlags |= 2 /* IntrinsicIndexedElement */; return links.resolvedSymbol = intrinsicElementsType.symbol; } - error(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements); + error2(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements); return links.resolvedSymbol = unknownSymbol; } else { if (noImplicitAny) { - error(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, unescapeLeadingUnderscores(JsxNames.IntrinsicElements)); + error2(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, unescapeLeadingUnderscores(JsxNames.IntrinsicElements)); } return links.resolvedSymbol = unknownSymbol; } @@ -70624,7 +71115,7 @@ ${lanes.join("\n")} } else if (propertiesOfJsxElementAttribPropInterface.length === 1) { return propertiesOfJsxElementAttribPropInterface[0].escapedName; } else if (propertiesOfJsxElementAttribPropInterface.length > 1 && jsxElementAttribPropInterfaceSym.declarations) { - error(jsxElementAttribPropInterfaceSym.declarations[0], Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, unescapeLeadingUnderscores(nameOfAttribPropContainer)); + error2(jsxElementAttribPropInterfaceSym.declarations[0], Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, unescapeLeadingUnderscores(nameOfAttribPropContainer)); } } return void 0; @@ -70647,7 +71138,7 @@ ${lanes.join("\n")} } else if (elementType.flags & 128 /* StringLiteral */) { const intrinsicType = getIntrinsicAttributesTypeFromStringLiteralType(elementType, caller); if (!intrinsicType) { - error(caller, Diagnostics.Property_0_does_not_exist_on_type_1, elementType.value, "JSX." + JsxNames.IntrinsicElements); + error2(caller, Diagnostics.Property_0_does_not_exist_on_type_1, elementType.value, "JSX." + JsxNames.IntrinsicElements); return emptyArray; } else { const fakeSignature = createSignatureForJSXIntrinsic(caller, intrinsicType); @@ -70773,11 +71264,11 @@ ${lanes.join("\n")} } function checkJsxPreconditions(errorNode) { if ((compilerOptions.jsx || 0 /* None */) === 0 /* None */) { - error(errorNode, Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided); + error2(errorNode, Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided); } if (getJsxElementTypeAt(errorNode) === void 0) { if (noImplicitAny) { - error(errorNode, Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist); + error2(errorNode, Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist); } } } @@ -70869,7 +71360,7 @@ ${lanes.join("\n")} if (node.expression) { const type = checkExpression(node.expression, checkMode); if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) { - error(node, Diagnostics.JSX_spread_child_must_be_an_array_type); + error2(node, Diagnostics.JSX_spread_child_must_be_an_array_type); } return type; } else { @@ -70877,7 +71368,7 @@ ${lanes.join("\n")} } } function getDeclarationNodeFlagsFromSymbol(s) { - return s.valueDeclaration ? getCombinedNodeFlags(s.valueDeclaration) : 0; + return s.valueDeclaration ? getCombinedNodeFlagsCached(s.valueDeclaration) : 0; } function isPrototypeProperty(symbol) { if (symbol.flags & 8192 /* Method */ || getCheckFlags(symbol) & 4 /* SyntheticMethod */) { @@ -70889,7 +71380,7 @@ ${lanes.join("\n")} } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 165 /* QualifiedName */ ? node.right : node.kind === 204 /* ImportType */ ? node : node.kind === 207 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -70898,14 +71389,14 @@ ${lanes.join("\n")} if (languageVersion < 2 /* ES2015 */) { if (symbolHasNonMethodDeclaration(prop)) { if (errorNode) { - error(errorNode, Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); + error2(errorNode, Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); } return false; } } if (flags & 256 /* Abstract */) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), @@ -70919,7 +71410,7 @@ ${lanes.join("\n")} const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), @@ -70936,7 +71427,7 @@ ${lanes.join("\n")} const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (!isNodeWithinClass(location, declaringClassDeclaration)) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), @@ -70959,7 +71450,7 @@ ${lanes.join("\n")} enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing); if (flags & 32 /* Static */ || !enclosingClass) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), @@ -70977,7 +71468,7 @@ ${lanes.join("\n")} } if (!containingType || !hasBaseType(containingType, enclosingClass)) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, symbolToString(prop), @@ -71025,28 +71516,28 @@ ${lanes.join("\n")} function reportObjectPossiblyNullOrUndefinedError(node, facts) { const nodeText2 = isEntityNameExpression(node) ? entityNameToString(node) : void 0; if (node.kind === 106 /* NullKeyword */) { - error(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); + error2(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); return; } if (nodeText2 !== void 0 && nodeText2.length < 100) { if (isIdentifier(node) && nodeText2 === "undefined") { - error(node, Diagnostics.The_value_0_cannot_be_used_here, "undefined"); + error2(node, Diagnostics.The_value_0_cannot_be_used_here, "undefined"); return; } - error( + error2( node, facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics._0_is_possibly_null_or_undefined : Diagnostics._0_is_possibly_undefined : Diagnostics._0_is_possibly_null, nodeText2 ); } else { - error( + error2( node, facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics.Object_is_possibly_null_or_undefined : Diagnostics.Object_is_possibly_undefined : Diagnostics.Object_is_possibly_null ); } } function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) { - error( + error2( node, facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : Diagnostics.Cannot_invoke_an_object_which_is_possibly_null ); @@ -71056,11 +71547,11 @@ ${lanes.join("\n")} if (isEntityNameExpression(node)) { const nodeText2 = entityNameToString(node); if (nodeText2.length < 100) { - error(node, Diagnostics._0_is_of_type_unknown, nodeText2); + error2(node, Diagnostics._0_is_of_type_unknown, nodeText2); return errorType; } } - error(node, Diagnostics.Object_is_of_type_unknown); + error2(node, Diagnostics.Object_is_of_type_unknown); return errorType; } const facts = getTypeFacts(type); @@ -71080,20 +71571,20 @@ ${lanes.join("\n")} if (isEntityNameExpression(node)) { const nodeText2 = entityNameToString(node); if (isIdentifier(node) && nodeText2 === "undefined") { - error(node, Diagnostics.The_value_0_cannot_be_used_here, nodeText2); + error2(node, Diagnostics.The_value_0_cannot_be_used_here, nodeText2); return nonNullType; } if (nodeText2.length < 100) { - error(node, Diagnostics._0_is_possibly_undefined, nodeText2); + error2(node, Diagnostics._0_is_possibly_undefined, nodeText2); return nonNullType; } } - error(node, Diagnostics.Object_is_possibly_undefined); + error2(node, Diagnostics.Object_is_possibly_undefined); } return nonNullType; } function checkPropertyAccessExpression(node, checkMode, writeOnly) { - return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); + return node.flags & 64 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); } function checkPropertyAccessChain(node, checkMode) { const leftType = checkExpression(node.expression); @@ -71105,13 +71596,13 @@ ${lanes.join("\n")} return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 216 /* ParenthesizedExpression */) { + while (node.parent.kind === 217 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; } function lookupSymbolForPrivateIdentifierDeclaration(propName, location) { - for (let containingClass = getContainingClass(location); !!containingClass; containingClass = getContainingClass(containingClass)) { + for (let containingClass = getContainingClassExcludingClassDecorators(location); !!containingClass; containingClass = getContainingClass(containingClass)) { const { symbol } = containingClass; const name = getSymbolNameForPrivateIdentifier(symbol, propName); const prop = symbol.members && symbol.members.get(name) || symbol.exports && symbol.exports.get(name); @@ -71183,7 +71674,7 @@ ${lanes.join("\n")} const lexicalClass = getContainingClass(lexicalValueDecl); Debug.assert(!!lexicalClass); if (findAncestor(lexicalClass, (n) => typeClass === n)) { - const diagnostic = error( + const diagnostic = error2( right, Diagnostics.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling, diagName, @@ -71205,7 +71696,7 @@ ${lanes.join("\n")} return true; } } - error( + error2( right, Diagnostics.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier, diagName, @@ -71247,18 +71738,24 @@ ${lanes.join("\n")} if (lexicallyScopedSymbol) { return isErrorType(apparentType) ? errorType : apparentType; } - if (!getContainingClass(right)) { + if (getContainingClassExcludingClassDecorators(right) === void 0) { grammarErrorOnNode(right, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); return anyType; } } - prop = lexicallyScopedSymbol ? getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol) : void 0; - if (!prop && checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { - return errorType; + prop = lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol); + if (prop === void 0) { + if (checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { + return errorType; + } + const containingClass = getContainingClassExcludingClassDecorators(right); + if (containingClass && isPlainJsFile(getSourceFileOfNode(containingClass), compilerOptions.checkJs)) { + grammarErrorOnNode(right, Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class, idText(right)); + } } else { - const isSetonlyAccessor = prop && prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); + const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); if (isSetonlyAccessor && assignmentKind !== 1 /* Definite */) { - error(node, Diagnostics.Private_accessor_was_defined_without_a_getter); + error2(node, Diagnostics.Private_accessor_was_defined_without_a_getter); } } } else { @@ -71274,10 +71771,10 @@ ${lanes.join("\n")} /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ - node.kind === 165 /* QualifiedName */ + node.kind === 166 /* QualifiedName */ ); } - if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 305 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 306 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -71295,9 +71792,9 @@ ${lanes.join("\n")} } if (leftType.symbol === globalThisSymbol) { if (globalThisSymbol.exports.has(right.escapedText) && globalThisSymbol.exports.get(right.escapedText).flags & 418 /* BlockScoped */) { - error(right, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(right.escapedText), typeToString(leftType)); + error2(right, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(right.escapedText), typeToString(leftType)); } else if (noImplicitAny) { - error(right, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature, typeToString(leftType)); + error2(right, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature, typeToString(leftType)); } return anyType; } @@ -71307,13 +71804,13 @@ ${lanes.join("\n")} return errorType; } if (indexInfo.isReadonly && (isAssignmentTarget(node) || isDeleteTarget(node))) { - error(node, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(apparentType)); + error2(node, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(apparentType)); } propType = compilerOptions.noUncheckedIndexedAccess && !isAssignmentTarget(node) ? getUnionType([indexInfo.type, missingType]) : indexInfo.type; if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression(node)) { - error(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText)); + error2(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText)); } - if (indexInfo.declaration && getCombinedNodeFlags(indexInfo.declaration) & 268435456 /* Deprecated */) { + if (indexInfo.declaration && isDeprecatedDeclaration2(indexInfo.declaration)) { addDeprecatedSuggestion(right, [indexInfo.declaration], right.escapedText); } } else { @@ -71326,7 +71823,7 @@ ${lanes.join("\n")} getNodeLinks(node).resolvedSymbol = prop; checkPropertyAccessibility(node, left.kind === 108 /* SuperKeyword */, isWriteAccess(node), apparentType, prop); if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) { - error(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); + error2(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); return errorType; } propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writeOnly || isWriteOnlyAccess(node) ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); @@ -71361,7 +71858,7 @@ ${lanes.join("\n")} if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 175 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 33554432 /* Ambient */)) { assumeUninitialized = true; } } @@ -71371,7 +71868,7 @@ ${lanes.join("\n")} } const flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType); if (assumeUninitialized && !containsUndefinedType(propType) && containsUndefinedType(flowType)) { - error(errorNode, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop)); + error2(errorNode, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop)); return propType; } return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; @@ -71383,10 +71880,10 @@ ${lanes.join("\n")} } let diagnosticMessage; const declarationName = idText(right); - if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlags(valueDeclaration) & 32 /* Static */) && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { - diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); - } else if (valueDeclaration.kind === 262 /* ClassDeclaration */ && node.parent.kind !== 182 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { - diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); + if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { + diagnosticMessage = error2(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); + } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + diagnosticMessage = error2(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { addRelatedInfo( @@ -71398,25 +71895,25 @@ ${lanes.join("\n")} function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return true; - case 302 /* PropertyAssignment */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 304 /* SpreadAssignment */: - case 166 /* ComputedPropertyName */: - case 238 /* TemplateSpan */: - case 293 /* JsxExpression */: - case 290 /* JsxAttribute */: - case 291 /* JsxAttributes */: - case 292 /* JsxSpreadAttribute */: - case 285 /* JsxOpeningElement */: - case 232 /* ExpressionWithTypeArguments */: - case 297 /* HeritageClause */: + case 303 /* PropertyAssignment */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 305 /* SpreadAssignment */: + case 167 /* ComputedPropertyName */: + case 239 /* TemplateSpan */: + case 294 /* JsxExpression */: + case 291 /* JsxAttribute */: + case 292 /* JsxAttributes */: + case 293 /* JsxSpreadAttribute */: + case 286 /* JsxOpeningElement */: + case 233 /* ExpressionWithTypeArguments */: + case 298 /* HeritageClause */: return false; - case 218 /* ArrowFunction */: - case 243 /* ExpressionStatement */: + case 219 /* ArrowFunction */: + case 244 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -71661,9 +72158,9 @@ ${lanes.join("\n")} } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return isValidPropertyAccessWithType(node, node.expression.kind === 108 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -71671,7 +72168,7 @@ ${lanes.join("\n")} propertyName, getWidenedType(checkExpression(node.left)) ); - case 204 /* ImportType */: + case 205 /* ImportType */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -71684,7 +72181,7 @@ ${lanes.join("\n")} function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 210 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, + node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, /*isWrite*/ false, type, @@ -71717,7 +72214,7 @@ ${lanes.join("\n")} } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 260 /* VariableDeclarationList */) { + if (initializer.kind === 261 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfDeclaration(variable); @@ -71738,7 +72235,7 @@ ${lanes.join("\n")} let child = expr; let node = expr.parent; while (node) { - if (node.kind === 248 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 249 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -71749,7 +72246,7 @@ ${lanes.join("\n")} return false; } function checkIndexedAccess(node, checkMode) { - return node.flags & 32 /* OptionalChain */ ? checkElementAccessChain(node, checkMode) : checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode); + return node.flags & 64 /* OptionalChain */ ? checkElementAccessChain(node, checkMode) : checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode); } function checkElementAccessChain(node, checkMode) { const exprType = checkExpression(node.expression); @@ -71764,7 +72261,7 @@ ${lanes.join("\n")} return objectType; } if (isConstEnumObjectType(objectType) && !isStringLiteralLike(indexExpression)) { - error(indexExpression, Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); + error2(indexExpression, Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); return errorType; } const effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType; @@ -71779,11 +72276,11 @@ ${lanes.join("\n")} if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 169 /* Decorator */) { + } else if (node.kind !== 170 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -71828,7 +72325,7 @@ ${lanes.join("\n")} } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 229 /* SpreadElement */ || arg.kind === 236 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 230 /* SpreadElement */ || arg.kind === 237 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -71844,9 +72341,9 @@ ${lanes.join("\n")} let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 227 /* TemplateExpression */) { + if (node.template.kind === 228 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -71854,7 +72351,7 @@ ${lanes.join("\n")} Debug.assert(templateLiteral.kind === 15 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 169 /* Decorator */) { + } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -71865,7 +72362,7 @@ ${lanes.join("\n")} effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 213 /* NewExpression */); + Debug.assert(node.kind === 214 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -71961,7 +72458,7 @@ ${lanes.join("\n")} if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 169 /* Decorator */) { + if (node.kind !== 170 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -71998,7 +72495,7 @@ ${lanes.join("\n")} } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 231 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 232 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -72026,11 +72523,11 @@ ${lanes.join("\n")} if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 236 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); + const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); if (isArrayLikeType(spreadType)) { return getMutableArrayOrTupleType(spreadType); } - return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 229 /* SpreadElement */ ? arg.expression : arg), inConstContext); + return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext); } } const types = []; @@ -72039,12 +72536,12 @@ ${lanes.join("\n")} for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 236 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 229 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { @@ -72054,7 +72551,7 @@ ${lanes.join("\n")} types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 236 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -72114,8 +72611,9 @@ ${lanes.join("\n")} void 0, checkMode ); + const checkAttributesType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(attributesType) : attributesType; return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate( - attributesType, + checkAttributesType, paramType, relation, reportErrors2 ? node.tagName : void 0, @@ -72231,7 +72729,7 @@ ${lanes.join("\n")} const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 231 /* OmittedExpression */) { + if (arg.kind !== 232 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType( arg, @@ -72289,7 +72787,7 @@ ${lanes.join("\n")} } } function getThisArgumentOfCall(node) { - const expression = node.kind === 212 /* CallExpression */ ? node.expression : node.kind === 214 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -72304,17 +72802,17 @@ ${lanes.join("\n")} return result; } function getEffectiveCallArguments(node) { - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 227 /* TemplateExpression */) { + if (template.kind === 228 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 169 /* Decorator */) { + if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -72326,7 +72824,7 @@ ${lanes.join("\n")} const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 229 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 230 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getElementTypes(spreadType), (t, i2) => { var _a; @@ -72365,16 +72863,16 @@ ${lanes.join("\n")} } function getLegacyDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return 1; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 168 /* Parameter */: + case 169 /* Parameter */: return 3; default: return Debug.fail(); @@ -72470,7 +72968,7 @@ ${lanes.join("\n")} if (isVoidPromiseError && isInJSFile(node)) { return getDiagnosticForCallNode(node, Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments); } - const error2 = isDecorator(node) ? hasRestParameter2 ? Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 : Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 : hasRestParameter2 ? Diagnostics.Expected_at_least_0_arguments_but_got_1 : isVoidPromiseError ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : Diagnostics.Expected_0_arguments_but_got_1; + const error3 = isDecorator(node) ? hasRestParameter2 ? Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 : Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 : hasRestParameter2 ? Diagnostics.Expected_at_least_0_arguments_but_got_1 : isVoidPromiseError ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : Diagnostics.Expected_0_arguments_but_got_1; if (min2 < args.length && args.length < max) { if (headMessage) { let chain = chainDiagnosticMessages( @@ -72491,14 +72989,14 @@ ${lanes.join("\n")} let chain = chainDiagnosticMessages( /*details*/ void 0, - error2, + error3, parameterRange, args.length ); chain = chainDiagnosticMessages(chain, headMessage); diagnostic = getDiagnosticForCallNode(node, chain); } else { - diagnostic = getDiagnosticForCallNode(node, error2, parameterRange, args.length); + diagnostic = getDiagnosticForCallNode(node, error3, parameterRange, args.length); } const parameter = (_a = closestSignature == null ? void 0 : closestSignature.declaration) == null ? void 0 : _a.parameters[closestSignature.thisParameter ? args.length + 1 : args.length]; if (parameter) { @@ -72519,14 +73017,14 @@ ${lanes.join("\n")} let chain = chainDiagnosticMessages( /*details*/ void 0, - error2, + error3, parameterRange, args.length ); chain = chainDiagnosticMessages(chain, headMessage); return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), errorSpan, chain); } - return createDiagnosticForNodeArray(getSourceFileOfNode(node), errorSpan, error2, parameterRange, args.length); + return createDiagnosticForNodeArray(getSourceFileOfNode(node), errorSpan, error3, parameterRange, args.length); } } function getTypeArgumentArityError(node, signatures, typeArguments, headMessage) { @@ -72588,8 +73086,8 @@ ${lanes.join("\n")} return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) { - const isTaggedTemplate = node.kind === 214 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 169 /* Decorator */; + const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; @@ -72601,21 +73099,15 @@ ${lanes.join("\n")} } const candidates = candidatesOutArray || []; reorderCandidates(signatures, candidates, callChainFlags); - if (!candidates.length) { - if (reportErrors2) { - diagnostics.add(getDiagnosticForCallNode(node, Diagnostics.Call_target_does_not_contain_any_signatures)); - } - return resolveErrorCall(node); - } + Debug.assert(candidates.length, "Revert #54442 and add a testcase with whatever triggered this"); const args = getEffectiveCallArguments(node); const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters; let argCheckMode = !isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? 4 /* SkipContextSensitive */ : 0 /* Normal */; - argCheckMode |= checkMode & 32 /* IsForStringLiteralArgumentCompletions */; let candidatesForArgumentError; let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 212 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -72834,7 +73326,7 @@ ${lanes.join("\n")} continue; } if (argCheckMode) { - argCheckMode = checkMode & 32 /* IsForStringLiteralArgumentCompletions */; + argCheckMode = 0 /* Normal */; if (inferenceContext) { const typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext); checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext.inferredTypeParameters); @@ -72883,7 +73375,7 @@ ${lanes.join("\n")} parameters.push(createCombinedSymbolFromTypes(symbols, mapDefined(candidates, (candidate) => tryGetTypeAtPosition(candidate, i)))); } const restParameterSymbols = mapDefined(candidates, (c) => signatureHasRestParameter(c) ? last(c.parameters) : void 0); - let flags = 0 /* None */; + let flags = 128 /* IsSignatureCandidateForOverloadFailure */; if (restParameterSymbols.length !== 0) { const type = createArrayType(getUnionType(mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); @@ -73008,13 +73500,13 @@ ${lanes.join("\n")} const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length; if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) { if (!isErrorType(funcType) && node.typeArguments) { - error(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); + error2(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); } return resolveUntypedCall(node); } if (!callSignatures.length) { if (numConstructSignatures) { - error(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); + error2(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); } else { let relatedInformation; if (node.arguments.length === 1) { @@ -73037,7 +73529,7 @@ ${lanes.join("\n")} return resolvingSignature; } if (callSignatures.some((sig) => isInJSFile(sig.declaration) && !!getJSDocClassTag(sig.declaration))) { - error(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); + error2(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); return resolveErrorCall(node); } return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags); @@ -73052,7 +73544,7 @@ ${lanes.join("\n")} if (node.arguments && languageVersion < 1 /* ES5 */) { const spreadIndex = getSpreadArgumentIndex(node.arguments); if (spreadIndex >= 0) { - error(node.arguments[spreadIndex], Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher); + error2(node.arguments[spreadIndex], Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher); } } let expressionType = checkNonNullExpression(node.expression); @@ -73065,7 +73557,7 @@ ${lanes.join("\n")} } if (isTypeAny(expressionType)) { if (node.typeArguments) { - error(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); + error2(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); } return resolveUntypedCall(node); } @@ -73075,12 +73567,12 @@ ${lanes.join("\n")} return resolveErrorCall(node); } if (someSignature(constructSignatures, (signature) => !!(signature.flags & 4 /* Abstract */))) { - error(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); + error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } const valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol); if (valueDecl && hasSyntacticModifier(valueDecl, 256 /* Abstract */)) { - error(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); + error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0 /* None */); @@ -73090,10 +73582,10 @@ ${lanes.join("\n")} const signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); if (!noImplicitAny) { if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) { - error(node, Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); + error2(node, Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); } if (getThisTypeOfSignature(signature) === voidType) { - error(node, Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void); + error2(node, Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void); } } return signature; @@ -73143,7 +73635,7 @@ ${lanes.join("\n")} } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 175 /* Constructor */) { + if (!modifiers || declaration.kind !== 176 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -73157,10 +73649,10 @@ ${lanes.join("\n")} } } if (modifiers & 8 /* Private */) { - error(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); + error2(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } if (modifiers & 16 /* Protected */) { - error(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); + error2(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } return false; } @@ -73290,16 +73782,16 @@ ${lanes.join("\n")} } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 168 /* Parameter */: + case 169 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; default: return Debug.fail(); @@ -73322,7 +73814,7 @@ ${lanes.join("\n")} /*includeTrivia*/ false ); - error(node, Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, nodeStr); + error2(node, Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, nodeStr); return resolveErrorCall(node); } const headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); @@ -73412,7 +73904,7 @@ ${lanes.join("\n")} return resolveUntypedCall(node); } if (signatures.length === 0) { - error(node.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node.tagName)); + error2(node.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node.tagName)); return resolveErrorCall(node); } return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); @@ -73422,16 +73914,16 @@ ${lanes.join("\n")} } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 169 /* Decorator */: + case 170 /* Decorator */: return resolveDecorator(node, candidatesOutArray, checkMode); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); @@ -73507,7 +73999,7 @@ ${lanes.join("\n")} let name; let decl; if (isVariableDeclaration(node.parent) && node.parent.initializer === node) { - if (!isInJSFile(node) && !(isVarConst(node.parent) && isFunctionLikeDeclaration(node))) { + if (!isInJSFile(node) && !(isVarConstLike(node.parent) && isFunctionLikeDeclaration(node))) { return void 0; } name = node.parent.name; @@ -73544,7 +74036,7 @@ ${lanes.join("\n")} return false; } let parent2 = node.parent; - while (parent2 && parent2.kind === 210 /* PropertyAccessExpression */) { + while (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { parent2 = parent2.parent; } if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 64 /* EqualsToken */) { @@ -73568,11 +74060,11 @@ ${lanes.join("\n")} if (node.expression.kind === 108 /* SuperKeyword */) { return voidType; } - if (node.kind === 213 /* NewExpression */) { + if (node.kind === 214 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 175 /* Constructor */ && declaration.kind !== 179 /* ConstructSignature */ && declaration.kind !== 184 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 175 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 176 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { - error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); + error2(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } return anyType; } @@ -73584,11 +74076,11 @@ ${lanes.join("\n")} if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 212 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 243 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 244 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { if (!isDottedName(node.expression)) { - error(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); + error2(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); } else if (!getEffectsSignature(node)) { - const diagnostic = error(node.expression, Diagnostics.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation); + const diagnostic = error2(node.expression, Diagnostics.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation); getTypeOfDottedName(node.expression, diagnostic); } } @@ -73607,7 +74099,9 @@ ${lanes.join("\n")} return returnType; } function checkDeprecatedSignature(signature, node) { - if (signature.declaration && signature.declaration.flags & 268435456 /* Deprecated */) { + if (signature.flags & 128 /* IsSignatureCandidateForOverloadFailure */) + return; + if (signature.declaration && signature.declaration.flags & 536870912 /* Deprecated */) { const suggestionNode = getDeprecatedSuggestionNode(node); const name = tryGetPropertyAccessOrIdentifierToString(getInvokedExpression(node)); addDeprecatedSuggestionWithSignature(suggestionNode, signature.declaration, name, signatureToString(signature)); @@ -73616,20 +74110,20 @@ ${lanes.join("\n")} function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 212 /* CallExpression */: - case 169 /* Decorator */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 170 /* Decorator */: + case 214 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return node.argumentExpression; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.name; - case 182 /* TypeReference */: + case 183 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -73677,7 +74171,7 @@ ${lanes.join("\n")} checkExpressionCached(node.arguments[i]); } if (specifierType.flags & 32768 /* Undefined */ || specifierType.flags & 65536 /* Null */ || !isTypeAssignableTo(specifierType, stringType)) { - error(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); + error2(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); } if (optionsType) { const importCallOptionsType = getGlobalImportCallOptionsType( @@ -73789,10 +74283,10 @@ ${lanes.join("\n")} if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 261 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 259 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 262 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 260 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); - return !!decl && !!(decl.flags & 16777216 /* Ambient */); + return !!decl && !!(decl.flags & 33554432 /* Ambient */); } return false; } @@ -73807,7 +74301,7 @@ ${lanes.join("\n")} return getReturnTypeOfSignature(signature); } function checkAssertion(node, checkMode) { - if (node.kind === 215 /* TypeAssertionExpression */) { + if (node.kind === 216 /* TypeAssertionExpression */) { const file = getSourceFileOfNode(node); if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) { grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); @@ -73823,18 +74317,18 @@ ${lanes.join("\n")} case 10 /* BigIntLiteral */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 227 /* TemplateExpression */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 228 /* TemplateExpression */: return true; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const op = node.operator; const arg = node.operand; return op === 41 /* MinusToken */ && (arg.kind === 9 /* NumericLiteral */ || arg.kind === 10 /* BigIntLiteral */) || op === 40 /* PlusToken */ && arg.kind === 9 /* NumericLiteral */; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = skipParentheses(node.expression); const symbol = isEntityNameExpression(expr) ? resolveEntityName( expr, @@ -73851,7 +74345,7 @@ ${lanes.join("\n")} const exprType = checkExpression(expression, checkMode); if (isConstTypeReference(type)) { if (!isValidConstAssertionArgument(expression)) { - error(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals); + error2(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals); } return getRegularTypeOfLiteralType(exprType); } @@ -73865,12 +74359,12 @@ ${lanes.join("\n")} let type; let expression; switch (node.kind) { - case 233 /* AsExpression */: - case 215 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 216 /* TypeAssertionExpression */: type = node.type; expression = node.expression; break; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: type = getJSDocTypeAssertionType(node); expression = node.expression; break; @@ -73904,18 +74398,18 @@ ${lanes.join("\n")} return propagateOptionalTypeMarker(getNonNullableType(nonOptionalType), node, nonOptionalType !== leftType); } function checkNonNullAssertion(node) { - return node.flags & 32 /* OptionalChain */ ? checkNonNullChain(node) : getNonNullableType(checkExpression(node.expression)); + return node.flags & 64 /* OptionalChain */ ? checkNonNullChain(node) : getNonNullableType(checkExpression(node.expression)); } function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); forEach(node.typeArguments, checkSourceElement); - if (node.kind === 232 /* ExpressionWithTypeArguments */) { + if (node.kind === 233 /* ExpressionWithTypeArguments */) { const parent2 = walkUpParenthesizedExpressions(node.parent); - if (parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent2.right)) { - error(node, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); + if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent2.right)) { + error2(node, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); } } - const exprType = node.kind === 232 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 233 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); return getInstantiationExpressionType(exprType, node); } function getInstantiationExpressionType(exprType, node) { @@ -73999,7 +74493,7 @@ ${lanes.join("\n")} if (isErrorType(targetType)) { return targetType; } - const errorNode = findAncestor(target.parent, (n) => n.kind === 237 /* SatisfiesExpression */ || n.kind === 356 /* JSDocSatisfiesTag */); + const errorNode = findAncestor(target.parent, (n) => n.kind === 238 /* SatisfiesExpression */ || n.kind === 357 /* JSDocSatisfiesTag */); checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1); return exprType; } @@ -74027,9 +74521,9 @@ ${lanes.join("\n")} function checkNewTargetMetaProperty(node) { const container = getNewTargetContainer(node); if (!container) { - error(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); + error2(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return errorType; - } else if (container.kind === 175 /* Constructor */) { + } else if (container.kind === 176 /* Constructor */) { const symbol = getSymbolOfDeclaration(container.parent); return getTypeOfSymbol(symbol); } else { @@ -74040,13 +74534,13 @@ ${lanes.join("\n")} function checkImportMetaProperty(node) { if (moduleKind === 100 /* Node16 */ || moduleKind === 199 /* NodeNext */) { if (getSourceFileOfNode(node).impliedNodeFormat !== 99 /* ESNext */) { - error(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output); + error2(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output); } } else if (moduleKind < 6 /* ES2020 */ && moduleKind !== 4 /* System */) { - error(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); + error2(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); } const file = getSourceFileOfNode(node); - Debug.assert(!!(file.flags & 4194304 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); + Debug.assert(!!(file.flags & 8388608 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType; } function getTypeOfParameter(symbol) { @@ -74059,7 +74553,10 @@ ${lanes.join("\n")} } return type; } - function getTupleElementLabel(d) { + function getTupleElementLabel(d, index, restParameterName = "arg") { + if (!d) { + return `${restParameterName}_${index}`; + } Debug.assert(isIdentifier(d.name)); return d.name.escapedText; } @@ -74073,22 +74570,28 @@ ${lanes.join("\n")} if (isTupleType(restType)) { const associatedNames = restType.target.labeledElementDeclarations; const index = pos - paramCount; - return associatedNames && getTupleElementLabel(associatedNames[index]) || restParameter.escapedName + "_" + index; + return getTupleElementLabel(associatedNames == null ? void 0 : associatedNames[index], index, restParameter.escapedName); } return restParameter.escapedName; } - function getParameterIdentifierNameAtPosition(signature, pos) { + function getParameterIdentifierInfoAtPosition(signature, pos) { var _a; - if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 323 /* JSDocFunctionType */) { + if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 324 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { const param = signature.parameters[pos]; - return isParameterDeclarationWithIdentifierName(param) ? [param.escapedName, false] : void 0; + const paramIdent = getParameterDeclarationIdentifier(param); + return paramIdent ? { + parameter: paramIdent, + parameterName: param.escapedName, + isRestParameter: false + } : void 0; } const restParameter = signature.parameters[paramCount] || unknownSymbol; - if (!isParameterDeclarationWithIdentifierName(restParameter)) { + const restIdent = getParameterDeclarationIdentifier(restParameter); + if (!restIdent) { return void 0; } const restType = getTypeOfSymbol(restParameter); @@ -74097,21 +74600,22 @@ ${lanes.join("\n")} const index = pos - paramCount; const associatedName = associatedNames == null ? void 0 : associatedNames[index]; const isRestTupleElement = !!(associatedName == null ? void 0 : associatedName.dotDotDotToken); - return associatedName ? [ - getTupleElementLabel(associatedName), - isRestTupleElement - ] : void 0; + if (associatedName) { + Debug.assert(isIdentifier(associatedName.name)); + return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement }; + } + return void 0; } if (pos === paramCount) { - return [restParameter.escapedName, true]; + return { parameter: restIdent, parameterName: restParameter.escapedName, isRestParameter: true }; } return void 0; } - function isParameterDeclarationWithIdentifierName(symbol) { - return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); + function getParameterDeclarationIdentifier(symbol) { + return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name) && symbol.valueDeclaration.name; } function isValidDeclarationForTupleLabel(d) { - return d.kind === 201 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -74447,17 +74951,17 @@ ${lanes.join("\n")} if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const contextType = createClassDecoratorContextType(targetType); links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType); break; } - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74469,7 +74973,7 @@ ${lanes.join("\n")} links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); break; } - case 171 /* PropertyDeclaration */: { + case 172 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74491,8 +74995,8 @@ ${lanes.join("\n")} if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const targetParam = createParameter("target", targetType); @@ -74506,7 +75010,7 @@ ${lanes.join("\n")} ); break; } - case 168 /* Parameter */: { + case 169 /* Parameter */: { const node = parent2; if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { break; @@ -74532,10 +75036,10 @@ ${lanes.join("\n")} ); break; } - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: { + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74600,13 +75104,13 @@ ${lanes.join("\n")} function createPromiseReturnType(func, promisedType) { const promiseType = createPromiseType(promisedType); if (promiseType === unknownType) { - error(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); + error2(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); return errorType; } else if (!getGlobalPromiseConstructorSymbol( /*reportErrors*/ true )) { - error(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); + error2(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } return promiseType; } @@ -74630,7 +75134,7 @@ ${lanes.join("\n")} let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 240 /* Block */) { + if (func.body.kind !== 241 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType( @@ -74813,7 +75317,7 @@ ${lanes.join("\n")} return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 220 /* TypeOfExpression */) { + if (node.expression.kind === 221 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -74846,7 +75350,7 @@ ${lanes.join("\n")} forEachReturnStatement(func.body, (returnStatement) => { const expr = returnStatement.expression; if (expr) { - if (expr.kind === 212 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { + if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { hasReturnOfTypeNever = true; return; } @@ -74878,11 +75382,11 @@ ${lanes.join("\n")} } function mayReturnNever(func) { switch (func.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; - case 173 /* MethodDeclaration */: - return func.parent.kind === 209 /* ObjectLiteralExpression */; + case 174 /* MethodDeclaration */: + return func.parent.kind === 210 /* ObjectLiteralExpression */; default: return false; } @@ -74896,17 +75400,17 @@ ${lanes.join("\n")} if (type && (maybeTypeOfKind(type, 16384 /* Void */) || type.flags & (1 /* Any */ | 32768 /* Undefined */))) { return; } - if (func.kind === 172 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 240 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 241 /* Block */ || !functionHasImplicitReturn(func)) { return; } - const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; + const hasExplicitReturn = func.flags & 1024 /* HasExplicitReturn */; const errorNode = getEffectiveReturnTypeNode(func) || func; if (type && type.flags & 131072 /* Never */) { - error(errorNode, Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point); + error2(errorNode, Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point); } else if (type && !hasExplicitReturn) { - error(errorNode, Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value); + error2(errorNode, Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value); } else if (type && strictNullChecks && !isTypeAssignableTo(undefinedType, type)) { - error(errorNode, Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); + error2(errorNode, Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); } else if (compilerOptions.noImplicitReturns) { if (!type) { if (!hasExplicitReturn) { @@ -74917,12 +75421,12 @@ ${lanes.join("\n")} return; } } - error(errorNode, Diagnostics.Not_all_code_paths_return_a_value); + error2(errorNode, Diagnostics.Not_all_code_paths_return_a_value); } } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -74958,7 +75462,7 @@ ${lanes.join("\n")} return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 217 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -75007,7 +75511,7 @@ ${lanes.join("\n")} } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -75015,7 +75519,7 @@ ${lanes.join("\n")} if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 240 /* Block */) { + if (node.body.kind === 241 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -75077,7 +75581,7 @@ ${lanes.join("\n")} return !setProp; } function isReadonlySymbol(symbol) { - return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); + return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); } function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) { var _a, _b; @@ -75087,7 +75591,7 @@ ${lanes.join("\n")} if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 110 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 175 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -75108,7 +75612,7 @@ ${lanes.join("\n")} const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 273 /* NamespaceImport */; + return !!declaration && declaration.kind === 274 /* NamespaceImport */; } } } @@ -75117,11 +75621,11 @@ ${lanes.join("\n")} function checkReferenceExpression(expr, invalidReferenceMessage, invalidOptionalChainMessage) { const node = skipOuterExpressions(expr, 6 /* Assertions */ | 1 /* Parentheses */); if (node.kind !== 80 /* Identifier */ && !isAccessExpression(node)) { - error(expr, invalidReferenceMessage); + error2(expr, invalidReferenceMessage); return false; } - if (node.flags & 32 /* OptionalChain */) { - error(expr, invalidOptionalChainMessage); + if (node.flags & 64 /* OptionalChain */) { + error2(expr, invalidOptionalChainMessage); return false; } return true; @@ -75130,17 +75634,17 @@ ${lanes.join("\n")} checkExpression(node.expression); const expr = skipParentheses(node.expression); if (!isAccessExpression(expr)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); return booleanType; } if (isPropertyAccessExpression(expr) && isPrivateIdentifier(expr.name)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_private_identifier); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_private_identifier); } const links = getNodeLinks(expr); const symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol); if (symbol) { if (isReadonlySymbol(symbol)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property); } checkDeleteExpressionMustBeOptional(expr, symbol); } @@ -75149,7 +75653,7 @@ ${lanes.join("\n")} function checkDeleteExpressionMustBeOptional(expr, symbol) { const type = getTypeOfSymbol(symbol); if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : getTypeFacts(type) & 16777216 /* IsUndefined */)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional); } } function checkTypeOfExpression(node) { @@ -75160,24 +75664,24 @@ ${lanes.join("\n")} checkExpression(node.expression); return undefinedWideningType; } - function checkAwaitExpressionGrammar(node) { + function checkAwaitGrammar(node) { + let hasError = false; const container = getContainingFunctionOrClassStaticBlock(node); if (container && isClassStaticBlockDeclaration(container)) { - error(node, Diagnostics.Await_expression_cannot_be_used_inside_a_class_static_block); - } else if (!(node.flags & 32768 /* AwaitContext */)) { + const message = isAwaitExpression(node) ? Diagnostics.await_expression_cannot_be_used_inside_a_class_static_block : Diagnostics.await_using_statements_cannot_be_used_inside_a_class_static_block; + error2(node, message); + hasError = true; + } else if (!(node.flags & 65536 /* AwaitContext */)) { if (isInTopLevelContext(node)) { const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { let span; if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - const diagnostic = createFileDiagnostic( - sourceFile, - span.start, - span.length, - Diagnostics.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 - ); + const message = isAwaitExpression(node) ? Diagnostics.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 : Diagnostics.await_using_statements_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; + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); diagnostics.add(diagnostic); + hasError = true; } switch (moduleKind) { case 100 /* Node16 */: @@ -75187,6 +75691,7 @@ ${lanes.join("\n")} diagnostics.add( createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) ); + hasError = true; break; } case 7 /* ES2022 */: @@ -75197,14 +75702,9 @@ ${lanes.join("\n")} } default: span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - diagnostics.add( - createFileDiagnostic( - sourceFile, - span.start, - span.length, - Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher - ) - ); + const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher : Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher; + diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message)); + hasError = true; break; } } @@ -75212,21 +75712,25 @@ ${lanes.join("\n")} const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); - const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); - if (container && container.kind !== 175 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + const message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules; + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); + if (container && container.kind !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } diagnostics.add(diagnostic); + hasError = true; } } } - if (isInParameterInitializerBeforeContainingFunction(node)) { - error(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer); + if (isAwaitExpression(node) && isInParameterInitializerBeforeContainingFunction(node)) { + error2(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer); + hasError = true; } + return hasError; } function checkAwaitExpression(node) { - addLazyDiagnostic(() => checkAwaitExpressionGrammar(node)); + addLazyDiagnostic(() => checkAwaitGrammar(node)); const operandType = checkExpression(node.expression); const awaitedType = checkAwaitedType( operandType, @@ -75272,11 +75776,11 @@ ${lanes.join("\n")} case 55 /* TildeToken */: checkNonNullType(operandType, node.operand); if (maybeTypeOfKindConsideringBaseConstraint(operandType, 12288 /* ESSymbolLike */)) { - error(node.operand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(node.operator)); + error2(node.operand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(node.operator)); } if (node.operator === 40 /* PlusToken */) { if (maybeTypeOfKindConsideringBaseConstraint(operandType, 2112 /* BigIntLike */)) { - error(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType))); + error2(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType))); } return numberType; } @@ -75372,10 +75876,10 @@ ${lanes.join("\n")} return silentNeverType; } if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { - error(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); + error2(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { - error(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); + error2(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); } return booleanType; } @@ -75404,7 +75908,7 @@ ${lanes.join("\n")} } if (checkTypeAssignableTo(checkNonNullType(rightType, right), nonPrimitiveType, right)) { if (hasEmptyObjectIntersection(rightType)) { - error(right, Diagnostics.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, typeToString(rightType)); + error2(right, Diagnostics.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, typeToString(rightType)); } } return booleanType; @@ -75422,7 +75926,7 @@ ${lanes.join("\n")} function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 302 /* PropertyAssignment */ || property.kind === 303 /* ShorthandPropertyAssignment */) { + if (property.kind === 303 /* PropertyAssignment */ || property.kind === 304 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -75443,10 +75947,10 @@ ${lanes.join("\n")} } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 303 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 304 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 304 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 305 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { - error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); + error2(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { if (languageVersion < 99 /* ESNext */) { checkExternalEmitHelpers(property, 4 /* Rest */); @@ -75464,7 +75968,7 @@ ${lanes.join("\n")} return checkDestructuringAssignment(property.expression, type); } } else { - error(property, Diagnostics.Property_assignment_expected); + error2(property, Diagnostics.Property_assignment_expected); } } function checkArrayLiteralAssignment(node, sourceType, checkMode) { @@ -75476,7 +75980,7 @@ ${lanes.join("\n")} let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 229 /* SpreadElement */) { + if (node.elements[i].kind === 230 /* SpreadElement */) { type = inBoundsType = inBoundsType ?? (checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType); } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -75486,8 +75990,8 @@ ${lanes.join("\n")} function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 231 /* OmittedExpression */) { - if (element.kind !== 229 /* SpreadElement */) { + if (element.kind !== 232 /* OmittedExpression */) { + if (element.kind !== 230 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -75499,11 +76003,11 @@ ${lanes.join("\n")} return checkDestructuringAssignment(element, elementType, checkMode); } if (elementIndex < elements.length - 1) { - error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); + error2(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 225 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { - error(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); + if (restExpression.kind === 226 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { + error2(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); } else { checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); const type = everyType(sourceType, isTupleType) ? mapType(sourceType, (t) => sliceTupleType(t, elementIndex)) : createArrayType(elementType); @@ -75515,7 +76019,7 @@ ${lanes.join("\n")} } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 303 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -75527,26 +76031,26 @@ ${lanes.join("\n")} } else { target = exprOrAssignment; } - if (target.kind === 225 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { + if (target.kind === 226 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 209 /* ObjectLiteralExpression */) { + if (target.kind === 210 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 208 /* ArrayLiteralExpression */) { + if (target.kind === 209 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { const targetType = checkExpression(target, checkMode); - const error2 = target.parent.kind === 304 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; - const optionalError = target.parent.kind === 304 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; - if (checkReferenceExpression(target, error2, optionalError)) { + const error3 = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; + const optionalError = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + if (checkReferenceExpression(target, error3, optionalError)) { checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target); } if (isPrivateIdentifierPropertyAccessExpression(target)) { @@ -75560,8 +76064,8 @@ ${lanes.join("\n")} case 80 /* Identifier */: case 11 /* StringLiteral */: case 14 /* RegularExpressionLiteral */: - case 214 /* TaggedTemplateExpression */: - case 227 /* TemplateExpression */: + case 215 /* TaggedTemplateExpression */: + case 228 /* TemplateExpression */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: @@ -75569,25 +76073,25 @@ ${lanes.join("\n")} case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 157 /* UndefinedKeyword */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 220 /* TypeOfExpression */: - case 234 /* NonNullExpression */: - case 284 /* JsxSelfClosingElement */: - case 283 /* JsxElement */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 221 /* TypeOfExpression */: + case 235 /* NonNullExpression */: + case 285 /* JsxSelfClosingElement */: + case 284 /* JsxElement */: return true; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: switch (node.operator) { case 54 /* ExclamationToken */: case 40 /* PlusToken */: @@ -75596,9 +76100,9 @@ ${lanes.join("\n")} return true; } return false; - case 221 /* VoidExpression */: - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 222 /* VoidExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: default: return false; } @@ -75642,7 +76146,7 @@ ${lanes.join("\n")} } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (node.left.kind === 209 /* ObjectLiteralExpression */ || node.left.kind === 208 /* ArrayLiteralExpression */)) { + if (operator === 64 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) { state.skip = true; setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 110 /* ThisKeyword */)); return state; @@ -75667,7 +76171,7 @@ ${lanes.join("\n")} const operator = operatorToken.kind; if (isLogicalOrCoalescingBinaryOperator(operator)) { let parent2 = node.parent; - while (parent2.kind === 216 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { + while (parent2.kind === 217 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { parent2 = parent2.parent; } if (operator === 56 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) { @@ -75691,7 +76195,7 @@ ${lanes.join("\n")} Debug.assertIsDefined(leftType); const rightType = getLastResult(state); Debug.assertIsDefined(rightType); - result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node); + result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, state.checkMode, node); } state.skip = false; setLeftType( @@ -75743,7 +76247,7 @@ ${lanes.join("\n")} } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (left.kind === 209 /* ObjectLiteralExpression */ || left.kind === 208 /* ArrayLiteralExpression */)) { + if (operator === 64 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 110 /* ThisKeyword */); } let leftType; @@ -75753,9 +76257,9 @@ ${lanes.join("\n")} leftType = checkExpression(left, checkMode); } const rightType = checkExpression(right, checkMode); - return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode); } - function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode) { + function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode) { const operator = operatorToken.kind; switch (operator) { case 42 /* AsteriskToken */: @@ -75787,7 +76291,7 @@ ${lanes.join("\n")} rightType = checkNonNullType(rightType, right); let suggestedOperator; if (leftType.flags & 528 /* BooleanLike */ && rightType.flags & 528 /* BooleanLike */ && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== void 0) { - error(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator)); + error2(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator)); return numberType; } else { const leftOk = checkArithmeticOperandType( @@ -75817,7 +76321,7 @@ ${lanes.join("\n")} case 43 /* AsteriskAsteriskToken */: case 68 /* AsteriskAsteriskEqualsToken */: if (languageVersion < 3 /* ES2016 */) { - error(errorNode, Diagnostics.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later); + error2(errorNode, Diagnostics.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later); } } resultType2 = bigintType; @@ -75912,12 +76416,15 @@ ${lanes.join("\n")} case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - if (isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) { - const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; - error(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); + if (!(checkMode && checkMode & 128 /* TypeOnly */)) { + if ((isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && // only report for === and !== in JS, not == or != + (!isInJSFile(left) || (operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */))) { + const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; + error2(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); + } + checkNaNEquality(errorNode, operator, left, right); + reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); } - checkNaNEquality(errorNode, operator, left, right); - reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); return booleanType; case 104 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); @@ -75970,7 +76477,7 @@ ${lanes.join("\n")} return textSpanContainsPosition(diag2, start); }); if (!isInDiag2657) - error(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); + error2(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); } return rightType; default: @@ -76004,13 +76511,13 @@ ${lanes.join("\n")} } } function isIndirectCall(node) { - return node.parent.kind === 216 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 214 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + return node.parent.kind === 217 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 215 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval"); } function checkForDisallowedESSymbolOperand(operator2) { const offendingSymbolOperand = maybeTypeOfKindConsideringBaseConstraint(leftType, 12288 /* ESSymbolLike */) ? left : maybeTypeOfKindConsideringBaseConstraint(rightType, 12288 /* ESSymbolLike */) ? right : void 0; if (offendingSymbolOperand) { - error(offendingSymbolOperand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(operator2)); + error2(offendingSymbolOperand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(operator2)); return false; } return true; @@ -76036,7 +76543,7 @@ ${lanes.join("\n")} } function checkAssignmentOperatorWorker() { let assigneeType = leftType; - if (isCompoundAssignment(operatorToken.kind) && left.kind === 210 /* PropertyAccessExpression */) { + if (isCompoundAssignment(operatorToken.kind) && left.kind === 211 /* PropertyAccessExpression */) { assigneeType = checkPropertyAccessExpression( left, /*checkMode*/ @@ -76131,7 +76638,7 @@ ${lanes.join("\n")} const isLeftNaN = isGlobalNaN(skipParentheses(left2)); const isRightNaN = isGlobalNaN(skipParentheses(right2)); if (isLeftNaN || isRightNaN) { - const err = error( + const err = error2( errorNode2, Diagnostics.This_condition_will_always_return_0, tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */) @@ -76212,23 +76719,23 @@ ${lanes.join("\n")} void 0 ); if (!contextualType || isTypeAny(contextualType)) { - error(node, Diagnostics.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation); + error2(node, Diagnostics.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation); } } }); } return type; function checkYieldExpressionGrammar() { - if (!(node.flags & 8192 /* YieldContext */)) { + if (!(node.flags & 16384 /* YieldContext */)) { grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { - error(node, Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer); + error2(node, Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer); } } } function checkConditionalExpression(node, checkMode) { - const type = checkTruthinessExpression(node.condition); + const type = checkTruthinessExpression(node.condition, checkMode); checkTestingKnownTruthyCallableOrAwaitableType(node.condition, type, node.whenTrue); const type1 = checkExpression(node.whenTrue, checkMode); const type2 = checkExpression(node.whenFalse, checkMode); @@ -76244,16 +76751,20 @@ ${lanes.join("\n")} for (const span of node.templateSpans) { const type = checkExpression(span.expression); if (maybeTypeOfKindConsideringBaseConstraint(type, 12288 /* ESSymbolLike */)) { - error(span.expression, Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String); + error2(span.expression, Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String); } texts.push(span.literal.text); types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType); } - return isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType2( + if (isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType2( node, /*contextFlags*/ void 0 - ) || unknownType, isTemplateLiteralContextualType) ? getTemplateLiteralType(texts, types) : stringType; + ) || unknownType, isTemplateLiteralContextualType)) { + return getTemplateLiteralType(texts, types); + } + const evaluated = node.parent.kind !== 215 /* TaggedTemplateExpression */ && evaluateTemplateExpression(node); + return evaluated ? getFreshTypeOfLiteralType(getStringLiteralType(evaluated)) : stringType; } function isTemplateLiteralContextualType(type) { return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */)); @@ -76309,7 +76820,7 @@ ${lanes.join("\n")} /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 215 /* TypeAssertionExpression */ || node.kind === 233 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 234 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); @@ -76326,7 +76837,7 @@ ${lanes.join("\n")} void 0, checkMode || 0 /* Normal */ ) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 206 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; } function padTupleType(type, pattern) { const patternElements = pattern.elements; @@ -76334,7 +76845,7 @@ ${lanes.join("\n")} const elementFlags = type.target.elementFlags.slice(); for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) { const e = patternElements[i]; - if (i < patternElements.length - 1 || !(e.kind === 207 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 208 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement( e, /*includePatternInType*/ @@ -76351,7 +76862,7 @@ ${lanes.join("\n")} return createTupleType(elementTypes, elementFlags, type.target.readonly); } function widenTypeInferredFromInitializer(declaration, type) { - const widened = getCombinedNodeFlags(declaration) & 2 /* Const */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); + const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); if (isInJSFile(declaration)) { if (isEmptyLiteralType(widened)) { reportImplicitAny(declaration, anyType); @@ -76395,14 +76906,14 @@ ${lanes.join("\n")} )); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -76558,18 +77069,18 @@ ${lanes.join("\n")} if (quickType) { return quickType; } - if (node.flags & 134217728 /* TypeCached */ && flowTypeCache) { + if (node.flags & 268435456 /* TypeCached */ && flowTypeCache) { const cachedType = flowTypeCache[getNodeId(node)]; if (cachedType) { return cachedType; } } const startInvocationCount = flowInvocationCount; - const type = checkExpression(node); + const type = checkExpression(node, 128 /* TypeOnly */); if (flowInvocationCount !== startInvocationCount) { const cache = flowTypeCache || (flowTypeCache = []); cache[getNodeId(node)] = type; - setNodeFlags(node, node.flags | 134217728 /* TypeCached */); + setNodeFlags(node, node.flags | 268435456 /* TypeCached */); } return type; } @@ -76634,15 +77145,15 @@ ${lanes.join("\n")} return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 211 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 165 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 185 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 280 /* ExportSpecifier */; + const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 281 /* ExportSpecifier */; if (!ok) { - error(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); + error2(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } if (getIsolatedModules(compilerOptions)) { Debug.assert(!!(type.symbol.flags & 128 /* ConstEnum */)); const constEnumDeclaration = type.symbol.valueDeclaration; - if (constEnumDeclaration.flags & 16777216 /* Ambient */) { - error(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); + if (constEnumDeclaration.flags & 33554432 /* Ambient */ && !isValidTypeOnlyAliasUseSite(node)) { + error2(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); } } } @@ -76661,9 +77172,9 @@ ${lanes.join("\n")} const kind = node.kind; if (cancellationToken) { switch (kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -76680,7 +77191,7 @@ ${lanes.join("\n")} return nullWideningType; case 15 /* NoSubstitutionTemplateLiteral */: case 11 /* StringLiteral */: - return hasSkipDirectInferenceFlag(node) ? anyType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -76694,81 +77205,81 @@ ${lanes.join("\n")} return trueType; case 97 /* FalseKeyword */: return falseType; - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return checkTemplateExpression(node); case 14 /* RegularExpressionLiteral */: return globalRegExpType; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (node.expression.kind === 102 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 213 /* NewExpression */: + case 214 /* NewExpression */: return checkCallExpression(node, checkMode); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return checkClassExpression(node); - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return checkAssertion(node, checkMode); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return checkNonNullAssertion(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return checkMetaProperty(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return checkDeleteExpression(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return checkVoidExpression(node); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return checkAwaitExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 231 /* OmittedExpression */: + case 232 /* OmittedExpression */: return undefinedWideningType; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return checkYieldExpression(node); - case 236 /* SyntheticExpression */: + case 237 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return checkJsxElement(node, checkMode); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return checkJsxFragment(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -76783,7 +77294,7 @@ ${lanes.join("\n")} const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node)); getBaseConstraintOfType(typeParameter); if (!hasNonCircularTypeParameterDefault(typeParameter)) { - error(node.default, Diagnostics.Type_parameter_0_has_a_circular_default, typeToString(typeParameter)); + error2(node.default, Diagnostics.Type_parameter_0_has_a_circular_default, typeToString(typeParameter)); } const constraintType = getConstraintOfTypeParameter(typeParameter); const defaultType = getDefaultFromTypeParameter(typeParameter); @@ -76801,7 +77312,7 @@ ${lanes.join("\n")} if (modifiers) { const symbol = getSymbolOfDeclaration(node.parent); if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) { - error(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); + error2(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); } else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) { (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) }); const source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck); @@ -76820,38 +77331,38 @@ ${lanes.join("\n")} checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 175 /* Constructor */ && nodeIsPresent(func.body))) { - error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); + if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { + error2(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 175 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { - error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); + if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + error2(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } if (!node.initializer && isOptionalDeclaration(node) && isBindingPattern(node.name) && func.body) { - error(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); + error2(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); } if (node.name && isIdentifier(node.name) && (node.name.escapedText === "this" || node.name.escapedText === "new")) { if (func.parameters.indexOf(node) !== 0) { - error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); + error2(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 175 /* Constructor */ || func.kind === 179 /* ConstructSignature */ || func.kind === 184 /* ConstructorType */) { - error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); + if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) { + error2(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 218 /* ArrowFunction */) { - error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); + if (func.kind === 219 /* ArrowFunction */) { + error2(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 176 /* GetAccessor */ || func.kind === 177 /* SetAccessor */) { - error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); + if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) { + error2(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } if (node.dotDotDotToken && !isBindingPattern(node.name) && !isTypeAssignableTo(getReducedType(getTypeOfSymbol(node.symbol)), anyReadonlyArrayType)) { - error(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type); + error2(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type); } } function checkTypePredicate(node) { const parent2 = getTypePredicateParent(node); if (!parent2) { - error(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + error2(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); return; } const signature = getSignatureFromDeclaration(parent2); @@ -76866,7 +77377,7 @@ ${lanes.join("\n")} } else { if (typePredicate.parameterIndex >= 0) { if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { - error(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); + error2(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { if (typePredicate.type) { const leadingError = () => chainDiagnosticMessages( @@ -76893,20 +77404,20 @@ ${lanes.join("\n")} } } if (!hasReportedError) { - error(node.parameterName, Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); + error2(node.parameterName, Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); } } } } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 218 /* ArrowFunction */: - case 178 /* CallSignature */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 219 /* ArrowFunction */: + case 179 /* CallSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: const parent2 = node.parent; if (node === parent2.type) { return parent2; @@ -76920,13 +77431,13 @@ ${lanes.join("\n")} } const name = element.name; if (name.kind === 80 /* Identifier */ && name.escapedText === predicateVariableName) { - error( + error2( predicateVariableNode, Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName ); return true; - } else if (name.kind === 206 /* ArrayBindingPattern */ || name.kind === 205 /* ObjectBindingPattern */) { + } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -76938,9 +77449,9 @@ ${lanes.join("\n")} } } function checkSignatureDeclaration(node) { - if (node.kind === 180 /* IndexSignature */) { + if (node.kind === 181 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 183 /* FunctionType */ || node.kind === 261 /* FunctionDeclaration */ || node.kind === 184 /* ConstructorType */ || node.kind === 178 /* CallSignature */ || node.kind === 175 /* Constructor */ || node.kind === 179 /* ConstructSignature */) { + } else if (node.kind === 184 /* FunctionType */ || node.kind === 262 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -76964,35 +77475,46 @@ ${lanes.join("\n")} addLazyDiagnostic(checkSignatureDeclarationDiagnostics); function checkSignatureDeclarationDiagnostics() { checkCollisionWithArgumentsInGeneratedCode(node); - const returnTypeNode = getEffectiveReturnTypeNode(node); + let returnTypeNode = getEffectiveReturnTypeNode(node); + let returnTypeErrorLocation = returnTypeNode; + if (isInJSFile(node)) { + const typeTag = getJSDocTypeTag(node); + if (typeTag && typeTag.typeExpression && isTypeReferenceNode(typeTag.typeExpression.type)) { + const signature = getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression)); + if (signature && signature.declaration) { + returnTypeNode = getEffectiveReturnTypeNode(signature.declaration); + returnTypeErrorLocation = typeTag.typeExpression.type; + } + } + } if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 179 /* ConstructSignature */: - error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); + case 180 /* ConstructSignature */: + error2(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 178 /* CallSignature */: - error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); + case 179 /* CallSignature */: + error2(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } } - if (returnTypeNode) { + if (returnTypeNode && returnTypeErrorLocation) { const functionFlags2 = getFunctionFlags(node); if ((functionFlags2 & (4 /* Invalid */ | 1 /* Generator */)) === 1 /* Generator */) { const returnType = getTypeFromTypeNode(returnTypeNode); if (returnType === voidType) { - error(returnTypeNode, Diagnostics.A_generator_cannot_have_a_void_type_annotation); + error2(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation); } else { const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType; const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType; const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType; const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */)); - checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeNode); + checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation); } } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) { - checkAsyncFunctionReturnType(node, returnTypeNode); + checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation); } } - if (node.kind !== 180 /* IndexSignature */ && node.kind !== 323 /* JSDocFunctionType */) { + if (node.kind !== 181 /* IndexSignature */ && node.kind !== 324 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -77002,7 +77524,7 @@ ${lanes.join("\n")} const staticNames = /* @__PURE__ */ new Map(); const privateIdentifiers = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 175 /* Constructor */) { + if (member.kind === 176 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -77020,16 +77542,16 @@ ${lanes.join("\n")} const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -77040,16 +77562,16 @@ ${lanes.join("\n")} const prev = names.get(name); if (prev) { if ((prev & 16 /* PrivateStatic */) !== (meaning & 16 /* PrivateStatic */)) { - error(location, Diagnostics.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, getTextOfNode(location)); + error2(location, Diagnostics.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, getTextOfNode(location)); } else { const prevIsMethod = !!(prev & 8 /* Method */); const isMethod = !!(meaning & 8 /* Method */); if (prevIsMethod || isMethod) { if (prevIsMethod !== isMethod) { - error(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); + error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); } } else if (prev & meaning & ~16 /* PrivateStatic */) { - error(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); + error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); } else { names.set(name, prev | meaning); } @@ -77070,10 +77592,13 @@ ${lanes.join("\n")} case "length": case "caller": case "arguments": + if (useDefineForClassFields) { + break; + } case "prototype": const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1; const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node)); - error(memberNameNode, message, memberName, className); + error2(memberNameNode, message, memberName, className); break; } } @@ -77082,7 +77607,7 @@ ${lanes.join("\n")} function checkObjectTypeForDuplicateDeclarations(node) { const names = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 170 /* PropertySignature */) { + if (member.kind === 171 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -77097,8 +77622,8 @@ ${lanes.join("\n")} continue; } if (names.get(memberName)) { - error(getNameOfDeclaration(member.symbol.valueDeclaration), Diagnostics.Duplicate_identifier_0, memberName); - error(member.name, Diagnostics.Duplicate_identifier_0, memberName); + error2(getNameOfDeclaration(member.symbol.valueDeclaration), Diagnostics.Duplicate_identifier_0, memberName); + error2(member.name, Diagnostics.Duplicate_identifier_0, memberName); } else { names.set(memberName, true); } @@ -77106,7 +77631,7 @@ ${lanes.join("\n")} } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 263 /* InterfaceDeclaration */) { + if (node.kind === 264 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfDeclaration(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -77130,7 +77655,7 @@ ${lanes.join("\n")} indexSignatureMap.forEach((entry) => { if (entry.declarations.length > 1) { for (const declaration of entry.declarations) { - error(declaration, Diagnostics.Duplicate_index_signature_for_type_0, typeToString(entry.type)); + error2(declaration, Diagnostics.Duplicate_index_signature_for_type_0, typeToString(entry.type)); } } }); @@ -77141,13 +77666,13 @@ ${lanes.join("\n")} checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* PropertyDeclaration */ && node.initializer) { - error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { + error2(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } function checkPropertySignature(node) { if (isPrivateIdentifier(node.name)) { - error(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + error2(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); } return checkPropertyDeclaration(node); } @@ -77155,21 +77680,21 @@ ${lanes.join("\n")} if (!checkGrammarMethod(node)) checkGrammarComputedPropertyName(node.name); if (isMethodDeclaration(node) && node.asteriskToken && isIdentifier(node.name) && idText(node.name) === "constructor") { - error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); + error2(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 173 /* MethodDeclaration */ && node.body) { - error(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + error2(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { - error(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + error2(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); } setNodeLinksForPrivateIdentifierScope(node); } function setNodeLinksForPrivateIdentifierScope(node) { if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) { for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) { - getNodeLinks(lexicalScope).flags |= 4194304 /* ContainsClassWithPrivateIdentifiers */; + getNodeLinks(lexicalScope).flags |= 1048576 /* ContainsClassWithPrivateIdentifiers */; } if (isClassExpression(node.parent)) { const enclosingIterationStatement = getEnclosingIterationStatement(node.parent); @@ -77203,7 +77728,7 @@ ${lanes.join("\n")} if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 171 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -77213,12 +77738,12 @@ ${lanes.join("\n")} const superCall = findFirstSuperCall(node.body); if (superCall) { if (classExtendsNull) { - error(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); + error2(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); } - const superCallShouldBeRootLevel = (getEmitScriptTarget(compilerOptions) !== 99 /* ESNext */ || !useDefineForClassFields) && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); + const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); if (superCallShouldBeRootLevel) { if (!superCallIsRootLevelInConstructor(superCall, node.body)) { - error(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); + error2(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); } else { let superCallStatement; for (const statement of node.body.statements) { @@ -77231,12 +77756,12 @@ ${lanes.join("\n")} } } if (superCallStatement === void 0) { - error(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers); + error2(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers); } } } } else if (!classExtendsNull) { - error(node, Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); + error2(node, Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); } } } @@ -77256,7 +77781,7 @@ ${lanes.join("\n")} } function checkAccessorDeclaration(node) { if (isIdentifier(node.name) && idText(node.name) === "constructor" && isClassLike(node.parent)) { - error(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); + error2(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); } addLazyDiagnostic(checkAccessorDeclarationDiagnostics); checkSourceElement(node.body); @@ -77266,36 +77791,36 @@ ${lanes.join("\n")} checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 176 /* GetAccessor */) { - if (!(node.flags & 16777216 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 256 /* HasImplicitReturn */) { - if (!(node.flags & 512 /* HasExplicitReturn */)) { - error(node.name, Diagnostics.A_get_accessor_must_return_a_value); + if (node.kind === 177 /* GetAccessor */) { + if (!(node.flags & 33554432 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 512 /* HasImplicitReturn */) { + if (!(node.flags & 1024 /* HasExplicitReturn */)) { + error2(node.name, Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfDeclaration(node); - const getter = getDeclarationOfKind(symbol, 176 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); const setterFlags = getEffectiveModifierFlags(setter); if ((getterFlags & 256 /* Abstract */) !== (setterFlags & 256 /* Abstract */)) { - error(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); - error(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); + error2(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); + error2(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); } if (getterFlags & 16 /* Protected */ && !(setterFlags & (16 /* Protected */ | 8 /* Private */)) || getterFlags & 8 /* Private */ && !(setterFlags & 8 /* Private */)) { - error(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); - error(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); + error2(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); + error2(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); } } } const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node)); - if (node.kind === 176 /* GetAccessor */) { + if (node.kind === 177 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -77356,7 +77881,7 @@ ${lanes.join("\n")} } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 182 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { + if (node.kind === 183 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { const sourceFile = getSourceFileOfNode(node); if (scanTokenAtPosition(sourceFile, node.typeName.end) === 25 /* DotToken */) { grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); @@ -77378,7 +77903,7 @@ ${lanes.join("\n")} } const symbol = getNodeLinks(node).resolvedSymbol; if (symbol) { - if (some(symbol.declarations, (d) => isTypeDeclaration(d) && !!(d.flags & 268435456 /* Deprecated */))) { + if (some(symbol.declarations, (d) => isTypeDeclaration(d) && !!(d.flags & 536870912 /* Deprecated */))) { addDeprecatedSuggestion( getDeprecatedSuggestionNode(node), symbol.declarations, @@ -77418,17 +77943,12 @@ ${lanes.join("\n")} const elementTypes = node.elements; let seenOptionalElement = false; let seenRestElement = false; - const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 201 /* NamedTupleMember */ && hasNamedElement) { - grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); - break; - } const flags = getTupleElementFlags(e); if (flags & 8 /* Variadic */) { const type = getTypeFromTypeNode(e.type); if (!isArrayLikeType(type)) { - error(e, Diagnostics.A_rest_element_type_must_be_an_array_type); + error2(e, Diagnostics.A_rest_element_type_must_be_an_array_type); break; } if (isArrayType(type) || isTupleType(type) && type.target.combinedFlags & 4 /* Rest */) { @@ -77465,8 +77985,8 @@ ${lanes.join("\n")} const objectType = type.objectType; const indexType = type.indexType; if (isTypeAssignableTo(indexType, getIndexType(objectType, 0 /* None */))) { - if (accessNode.kind === 211 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { - error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); + if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + error2(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } return type; } @@ -77479,12 +77999,12 @@ ${lanes.join("\n")} if (propertyName) { const propertySymbol = forEachType(apparentObjectType, (t) => getPropertyOfType(t, propertyName)); if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 24 /* NonPublicAccessibilityModifier */) { - error(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName)); + error2(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName)); return errorType; } } } - error(accessNode, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType)); + error2(accessNode, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType)); return errorType; } function checkIndexedAccessType(node) { @@ -77526,7 +78046,7 @@ ${lanes.join("\n")} forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 193 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -77536,11 +78056,11 @@ ${lanes.join("\n")} if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 167 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { - error(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_constraints, name); + error2(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_constraints, name); } } } @@ -77574,22 +78094,23 @@ ${lanes.join("\n")} if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 189 /* OptionalType */) { + if (node.type.kind === 190 /* OptionalType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type); } - if (node.type.kind === 190 /* RestType */) { + if (node.type.kind === 191 /* RestType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type); } checkSourceElement(node.type); getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 16777216 /* Ambient */); + return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { - let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 263 /* InterfaceDeclaration */ && n.parent.kind !== 262 /* ClassDeclaration */ && n.parent.kind !== 230 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { - if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { + let flags = getCombinedModifierFlagsCached(n); + if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) { + const container = getEnclosingContainer(n); + if (container && container.flags & 128 /* ExportContext */ && !(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } flags |= 2 /* Ambient */; @@ -77611,13 +78132,13 @@ ${lanes.join("\n")} forEach(overloads, (o) => { const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags; if (deviation & 1 /* Export */) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); } else if (deviation & 2 /* Ambient */) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); } else if (deviation & (8 /* Private */ | 16 /* Protected */)) { - error(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); + error2(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); } else if (deviation & 256 /* Abstract */) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); } }); } @@ -77628,7 +78149,7 @@ ${lanes.join("\n")} forEach(overloads, (o) => { const deviation = hasQuestionToken(o) !== canonicalHasQuestionToken; if (deviation) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_optional_or_required); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_optional_or_required); } }); } @@ -77664,27 +78185,27 @@ ${lanes.join("\n")} (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || // Both are computed property names isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) && isTypeIdenticalTo(checkComputedPropertyName(node.name), checkComputedPropertyName(subsequentName)) || // Both are literal property names that are the same. isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); if (reportError) { const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; - error(errorNode2, diagnostic); + error2(errorNode2, diagnostic); } return; } if (nodeIsPresent(subsequentNode.body)) { - error(errorNode2, Diagnostics.Function_implementation_name_must_be_0, declarationNameToString(node.name)); + error2(errorNode2, Diagnostics.Function_implementation_name_must_be_0, declarationNameToString(node.name)); return; } } } const errorNode = node.name || node; if (isConstructor) { - error(errorNode, Diagnostics.Constructor_implementation_is_missing); + error2(errorNode, Diagnostics.Constructor_implementation_is_missing); } else { if (hasSyntacticModifier(node, 256 /* Abstract */)) { - error(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive); + error2(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive); } else { - error(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); + error2(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); } } } @@ -77695,15 +78216,15 @@ ${lanes.join("\n")} if (declarations) { for (const current of declarations) { const node = current; - const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 263 /* InterfaceDeclaration */ || node.parent.kind === 186 /* TypeLiteral */) || inAmbientContext; + const inAmbientContext = node.flags & 33554432 /* Ambient */; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 264 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 261 /* FunctionDeclaration */ || node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */ || node.kind === 175 /* Constructor */) { + if (node.kind === 262 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -77747,21 +78268,21 @@ ${lanes.join("\n")} } if (multipleConstructorImplementation) { forEach(functionDeclarations, (declaration) => { - error(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed); + error2(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed); }); } if (duplicateFunctionDeclaration) { forEach(functionDeclarations, (declaration) => { - error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_function_implementation); + error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_function_implementation); }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 262 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 263 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 262 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 261 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 263 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 262 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; if (diagnostic) { addRelatedInfo( - error(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), + error2(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), ...relatedDiagnostics ); } @@ -77782,7 +78303,7 @@ ${lanes.join("\n")} if (!isImplementationCompatibleWithOverload(bodySignature, signature)) { const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration; addRelatedInfo( - error(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature), + error2(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature), createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here) ); break; @@ -77829,54 +78350,54 @@ ${lanes.join("\n")} const declarationSpaces = getDeclarationSpaces(d); const name = getNameOfDeclaration(d); if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) { - error(name, Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, declarationNameToString(name)); + error2(name, Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, declarationNameToString(name)); } else if (declarationSpaces & commonDeclarationSpacesForExportsAndLocals) { - error(name, Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, declarationNameToString(name)); + error2(name, Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, declarationNameToString(name)); } } } function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return 2 /* ExportType */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 276 /* ExportAssignment */: - case 225 /* BinaryExpression */: + case 277 /* ExportAssignment */: + case 226 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 270 /* ImportEqualsDeclaration */: - case 273 /* NamespaceImport */: - case 272 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 274 /* NamespaceImport */: + case 273 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfDeclaration(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: - case 261 /* FunctionDeclaration */: - case 275 /* ImportSpecifier */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 262 /* FunctionDeclaration */: + case 276 /* ImportSpecifier */: case 80 /* Identifier */: return 1 /* ExportValue */; - case 172 /* MethodSignature */: - case 170 /* PropertySignature */: + case 173 /* MethodSignature */: + case 171 /* PropertySignature */: return 2 /* ExportType */; default: return Debug.failBadSyntaxKind(d); @@ -77911,7 +78432,7 @@ ${lanes.join("\n")} const thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0 /* Call */) : emptyArray; if (thenSignatures.length === 0) { if (errorNode) { - error(errorNode, Diagnostics.A_promise_must_have_a_then_method); + error2(errorNode, Diagnostics.A_promise_must_have_a_then_method); } return void 0; } @@ -77931,7 +78452,7 @@ ${lanes.join("\n")} thisTypeForErrorOut.value = thisTypeForError; } if (errorNode) { - error(errorNode, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForError)); + error2(errorNode, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForError)); } return void 0; } @@ -77942,7 +78463,7 @@ ${lanes.join("\n")} const onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0 /* Call */); if (onfulfilledParameterSignatures.length === 0) { if (errorNode) { - error(errorNode, Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback); + error2(errorNode, Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback); } return void 0; } @@ -78023,7 +78544,7 @@ ${lanes.join("\n")} if (type.flags & 1048576 /* Union */) { if (awaitedTypeStack.lastIndexOf(type.id) >= 0) { if (errorNode) { - error(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); + error2(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); } return void 0; } @@ -78046,7 +78567,7 @@ ${lanes.join("\n")} if (promisedType) { if (type.id === promisedType.id || awaitedTypeStack.lastIndexOf(promisedType.id) >= 0) { if (errorNode) { - error(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); + error2(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); } return void 0; } @@ -78072,7 +78593,7 @@ ${lanes.join("\n")} } return typeAsAwaitable.awaitedTypeOfType = type; } - function checkAsyncFunctionReturnType(node, returnTypeNode) { + function checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation) { const returnType = getTypeFromTypeNode(returnTypeNode); if (languageVersion >= 2 /* ES2015 */) { if (isErrorType(returnType)) { @@ -78083,7 +78604,7 @@ ${lanes.join("\n")} true ); if (globalPromiseType !== emptyGenericType && !isReferenceToType2(returnType, globalPromiseType)) { - error(returnTypeNode, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); + reportErrorForInvalidReturnType(Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, returnTypeNode, returnTypeErrorLocation, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); return; } } else { @@ -78093,7 +78614,7 @@ ${lanes.join("\n")} } const promiseConstructorName = getEntityNameFromTypeNode(returnTypeNode); if (promiseConstructorName === void 0) { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, typeToString(returnType)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, typeToString(returnType)); return; } const promiseConstructorSymbol = resolveEntityName( @@ -78108,9 +78629,9 @@ ${lanes.join("\n")} /*reportErrors*/ false )) { - error(returnTypeNode, Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); + error2(returnTypeErrorLocation, Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } else { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); } return; } @@ -78119,21 +78640,22 @@ ${lanes.join("\n")} true ); if (globalPromiseConstructorLikeType === emptyObjectType) { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); return; } - if (!checkTypeAssignableTo( - promiseConstructorType, - globalPromiseConstructorLikeType, - returnTypeNode, - Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value - )) { + const headMessage = Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value; + const errorInfo = () => returnTypeNode === returnTypeErrorLocation ? void 0 : chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type + ); + if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeErrorLocation, headMessage, errorInfo)) { return; } const rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); const collidingSymbol = getSymbol2(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { - error( + error2( collidingSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, idText(rootName), @@ -78149,6 +78671,14 @@ ${lanes.join("\n")} node, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member ); + function reportErrorForInvalidReturnType(message, returnTypeNode2, returnTypeErrorLocation2, typeName) { + if (returnTypeNode2 === returnTypeErrorLocation2) { + error2(returnTypeErrorLocation2, message, typeName); + } else { + const diag2 = error2(returnTypeErrorLocation2, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); + addRelatedInfo(diag2, createDiagnosticForNode(returnTypeNode2, message, typeName)); + } + } } function checkDecorator(node) { const signature = getResolvedSignature(node); @@ -78163,21 +78693,21 @@ ${lanes.join("\n")} let headMessage; const expectedReturnType = decoratorSignature.resolvedReturnType; switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!legacyDecorators) { headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; } - case 168 /* Parameter */: + case 169 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; default: @@ -78246,7 +78776,7 @@ ${lanes.join("\n")} if (canCollectSymbolAliasAccessabilityData && symbolIsValue(rootSymbol) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) && !getTypeOnlyAliasDeclaration(rootSymbol)) { markAliasSymbolAsReferenced(rootSymbol); } else if (forDecoratorMetadata && getIsolatedModules(compilerOptions) && getEmitModuleKind(compilerOptions) >= 5 /* ES2015 */ && !symbolIsValue(rootSymbol) && !some(rootSymbol.declarations, isTypeOnlyImportOrExportDeclaration)) { - const diag2 = error(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled); + const diag2 = error2(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled); const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration2); if (aliasDeclaration) { addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName))); @@ -78267,15 +78797,15 @@ ${lanes.join("\n")} function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 192 /* IntersectionType */: - case 191 /* UnionType */: + case 193 /* IntersectionType */: + case 192 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; } } @@ -78283,13 +78813,13 @@ ${lanes.join("\n")} function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 195 /* ParenthesizedType */ || typeNode.kind === 201 /* NamedTupleMember */) { + while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) { typeNode = typeNode.type; } if (typeNode.kind === 146 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 200 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -78320,7 +78850,7 @@ ${lanes.join("\n")} } if (legacyDecorators) { checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } } else if (languageVersion < 99 /* ESNext */) { @@ -78346,7 +78876,7 @@ ${lanes.join("\n")} if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -78354,27 +78884,28 @@ ${lanes.join("\n")} } } break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - const otherKind = node.kind === 176 /* GetAccessor */ ? 177 /* SetAccessor */ : 176 /* GetAccessor */; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 168 /* Parameter */: + case 169 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } + markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(containingSignature)); break; } } @@ -78394,7 +78925,7 @@ ${lanes.join("\n")} } function checkJSDocTypeAliasTag(node) { if (!node.typeExpression) { - error(node.name, Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags); + error2(node.name, Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags); } if (node.name) { checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); @@ -78419,7 +78950,7 @@ ${lanes.join("\n")} if (length(tags) > 1) { for (let i = 1; i < length(tags); i++) { const tagName = tags[i].tagName; - error(tagName, Diagnostics._0_tag_already_specified, idText(tagName)); + error2(tagName, Diagnostics._0_tag_already_specified, idText(tagName)); } } } @@ -78451,40 +78982,40 @@ ${lanes.join("\n")} function checkJSDocImplementsTag(node) { const classLike = getEffectiveJSDocHost(node); if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { - error(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); + error2(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); } } function checkJSDocAugmentsTag(node) { const classLike = getEffectiveJSDocHost(node); if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { - error(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); + error2(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); return; } const augmentsTags = getJSDocTags(classLike).filter(isJSDocAugmentsTag); Debug.assert(augmentsTags.length > 0); if (augmentsTags.length > 1) { - error(augmentsTags[1], Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); + error2(augmentsTags[1], Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); } const name = getIdentifierFromEntityNameExpression(node.class.expression); const extend2 = getClassExtendsHeritageElement(classLike); if (extend2) { const className = getIdentifierFromEntityNameExpression(extend2.expression); if (className && name.escapedText !== className.escapedText) { - error(name, Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause, idText(node.tagName), idText(name), idText(className)); + error2(name, Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause, idText(node.tagName), idText(name), idText(className)); } } } function checkJSDocAccessibilityModifiers(node) { const host2 = getJSDocHost(node); if (host2 && isPrivateIdentifierClassElementDeclaration(host2)) { - error(node, Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + error2(node, Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); } } function getIdentifierFromEntityNameExpression(node) { switch (node.kind) { case 80 /* Identifier */: return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -78495,7 +79026,7 @@ ${lanes.join("\n")} checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -78503,7 +79034,7 @@ ${lanes.join("\n")} const localSymbol = node.localSymbol || symbol; const firstDeclaration = (_a = localSymbol.declarations) == null ? void 0 : _a.find( // Get first non javascript function declaration - (declaration) => declaration.kind === node.kind && !(declaration.flags & 262144 /* JavaScriptFile */) + (declaration) => declaration.kind === node.kind && !(declaration.flags & 524288 /* JavaScriptFile */) ); if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(localSymbol); @@ -78512,14 +79043,14 @@ ${lanes.join("\n")} checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 172 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); if (isInJSFile(node)) { const typeTag = getJSDocTypeTag(node); if (typeTag && typeTag.typeExpression && !getContextualCallSignature(getTypeFromTypeNode(typeTag.typeExpression), node)) { - error(typeTag.typeExpression.type, Diagnostics.The_type_of_a_function_declaration_must_match_the_function_s_signature); + error2(typeTag.typeExpression.type, Diagnostics.The_type_of_a_function_declaration_must_match_the_function_s_signature); } } function checkFunctionOrMethodDeclarationDiagnostics() { @@ -78548,42 +79079,42 @@ ${lanes.join("\n")} function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 311 /* SourceFile */: - case 266 /* ModuleDeclaration */: - case 240 /* Block */: - case 268 /* CaseBlock */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 312 /* SourceFile */: + case 267 /* ModuleDeclaration */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 175 /* Constructor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 194 /* InferType */: + case 195 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -78602,28 +79133,28 @@ ${lanes.join("\n")} function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 173 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - if (member.kind === 177 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfDeclaration(member); - if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 16777216 /* Ambient */)) { + if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 175 /* Constructor */: + case 176 /* Constructor */: for (const parameter of member.parameters) { if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } break; - case 180 /* IndexSignature */: - case 239 /* SemicolonClassElement */: - case 174 /* ClassStaticBlockDeclaration */: + case 181 /* IndexSignature */: + case 240 /* SemicolonClassElement */: + case 175 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -78647,7 +79178,7 @@ ${lanes.join("\n")} continue; const name = idText(typeParameter.name); const { parent: parent2 } = typeParameter; - if (parent2.kind !== 194 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { + if (parent2.kind !== 195 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { const sourceFile = getSourceFileOfNode(parent2); const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); @@ -78705,7 +79236,11 @@ ${lanes.join("\n")} addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId); } } else if (isVariableDeclaration(declaration)) { - addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); + const blockScopeKind = getCombinedNodeFlagsCached(declaration) & 7 /* BlockScoped */; + const name = getNameOfDeclaration(declaration); + if (blockScopeKind !== 4 /* Using */ && blockScopeKind !== 6 /* AwaitUsing */ || !name || !isIdentifierThatStartsWithUnderscore(name)) { + addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); + } } else { const parameter = local.valueDeclaration && tryGetRootParameterDeclaration(local.valueDeclaration); const name = local.valueDeclaration && getNameOfDeclaration(local.valueDeclaration); @@ -78726,7 +79261,7 @@ ${lanes.join("\n")} }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 273 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 274 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); } else { @@ -78737,7 +79272,7 @@ ${lanes.join("\n")} unusedDestructures.forEach(([bindingPattern, bindingElements]) => { const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */; if (bindingPattern.elements.length === bindingElements.length) { - if (bindingElements.length === 1 && bindingPattern.parent.kind === 259 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 260 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 260 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 261 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); @@ -78750,7 +79285,7 @@ ${lanes.join("\n")} }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 242 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -78779,21 +79314,21 @@ ${lanes.join("\n")} switch (name.kind) { case 80 /* Identifier */: return idText(name); - case 206 /* ArrayBindingPattern */: - case 205 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 272 /* ImportClause */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 273 /* NamespaceImport */; + return node.kind === 273 /* ImportClause */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 274 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 272 /* ImportClause */ ? decl : decl.kind === 273 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 273 /* ImportClause */ ? decl : decl.kind === 274 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 240 /* Block */) { + if (node.kind === 241 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -78808,7 +79343,7 @@ ${lanes.join("\n")} } } function checkCollisionWithArgumentsInGeneratedCode(node) { - if (languageVersion >= 2 /* ES2015 */ || !hasRestParameter(node) || node.flags & 16777216 /* Ambient */ || nodeIsMissing(node.body)) { + if (languageVersion >= 2 /* ES2015 */ || !hasRestParameter(node) || node.flags & 33554432 /* Ambient */ || nodeIsMissing(node.body)) { return; } forEach(node.parameters, (p) => { @@ -78821,10 +79356,10 @@ ${lanes.join("\n")} if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */ || node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */ || node.kind === 302 /* PropertyAssignment */) { + if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 303 /* PropertyAssignment */) { return false; } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return false; } if (isImportClause(node) || isImportEqualsDeclaration(node) || isImportSpecifier(node)) { @@ -78843,9 +79378,9 @@ ${lanes.join("\n")} if (getNodeCheckFlags(current) & 4 /* CaptureThis */) { const isDeclaration2 = node.kind !== 80 /* Identifier */; if (isDeclaration2) { - error(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); + error2(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } else { - error(node, Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference); + error2(node, Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference); } return true; } @@ -78857,9 +79392,9 @@ ${lanes.join("\n")} if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) { const isDeclaration2 = node.kind !== 80 /* Identifier */; if (isDeclaration2) { - error(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); + error2(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); } else { - error(node, Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference); + error2(node, Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference); } return true; } @@ -78877,7 +79412,7 @@ ${lanes.join("\n")} return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { + if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { errorSkippedOn( "noEmit", name, @@ -78895,7 +79430,7 @@ ${lanes.join("\n")} return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { + if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 4096 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -78912,7 +79447,7 @@ ${lanes.join("\n")} } function checkWeakMapSetCollision(node) { const enclosingBlockScope = getEnclosingBlockScopeContainer(node); - if (getNodeCheckFlags(enclosingBlockScope) & 4194304 /* ContainsClassWithPrivateIdentifiers */) { + if (getNodeCheckFlags(enclosingBlockScope) & 1048576 /* ContainsClassWithPrivateIdentifiers */) { Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier"); errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText); } @@ -78926,18 +79461,18 @@ ${lanes.join("\n")} let hasCollision = false; if (isClassExpression(node)) { for (const member of node.members) { - if (getNodeCheckFlags(member) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (getNodeCheckFlags(member) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; break; } } } else if (isFunctionExpression(node)) { - if (getNodeCheckFlags(node) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (getNodeCheckFlags(node) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; } } else { const container = getEnclosingBlockScopeContainer(node); - if (container && getNodeCheckFlags(container) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (container && getNodeCheckFlags(container) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; } } @@ -78961,7 +79496,7 @@ ${lanes.join("\n")} recordPotentialCollisionWithReflectInGeneratedCode(node, name); if (isClassLike(node)) { checkTypeNameIsReserved(name, Diagnostics.Class_name_cannot_be_0); - if (!(node.flags & 16777216 /* Ambient */)) { + if (!(node.flags & 33554432 /* Ambient */)) { checkClassNameCollisionWithObject(name); } } else if (isEnumDeclaration(node)) { @@ -78969,10 +79504,7 @@ ${lanes.join("\n")} } } function checkVarDeclaredNamesNotShadowed(node) { - if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { - return; - } - if (node.kind === 259 /* VariableDeclaration */ && !node.initializer) { + if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } const symbol = getSymbolOfDeclaration(node); @@ -78991,13 +79523,13 @@ ${lanes.join("\n")} false ); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { - if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 260 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 242 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 240 /* Block */ && isFunctionLike(container.parent) || container.kind === 267 /* ModuleBlock */ || container.kind === 266 /* ModuleDeclaration */ || container.kind === 311 /* SourceFile */); + if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 7 /* BlockScoped */) { + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 261 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 243 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 241 /* Block */ && isFunctionLike(container.parent) || container.kind === 268 /* ModuleBlock */ || container.kind === 267 /* ModuleDeclaration */ || container.kind === 312 /* SourceFile */); if (!namesShareScope) { const name = symbolToString(localDeclarationSymbol); - error(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); + error2(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); } } } @@ -79015,7 +79547,7 @@ ${lanes.join("\n")} if (!node.name) { return; } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -79029,7 +79561,7 @@ ${lanes.join("\n")} if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 166 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; @@ -79062,20 +79594,20 @@ ${lanes.join("\n")} } } if (isBindingPattern(node.name)) { - if (node.name.kind === 206 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); } if (isParameter(node) && node.initializer && nodeIsMissing(getContainingFunction(node).body)) { - error(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); + error2(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } if (isBindingPattern(node.name)) { if (isInAmbientOrTypeNode(node)) { return; } - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 248 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 249 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -79107,20 +79639,45 @@ ${lanes.join("\n")} const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); if (initializer) { const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a = symbol.exports) == null ? void 0 : _a.size); - if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 248 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 249 /* ForInStatement */) { + const initializerType = checkExpressionCached(initializer); checkTypeAssignableToAndOptionallyElaborate( - checkExpressionCached(initializer), + initializerType, type, node, initializer, /*headMessage*/ void 0 ); + const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */; + if (blockScopeKind === 6 /* AwaitUsing */) { + const globalAsyncDisposableType = getGlobalAsyncDisposableType( + /*reportErrors*/ + true + ); + const globalDisposableType = getGlobalDisposableType( + /*reportErrors*/ + true + ); + if (globalAsyncDisposableType !== emptyObjectType && globalDisposableType !== emptyObjectType) { + const optionalDisposableType = getUnionType([globalAsyncDisposableType, globalDisposableType, nullType, undefinedType]); + checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); + } + } else if (blockScopeKind === 4 /* Using */) { + const globalDisposableType = getGlobalDisposableType( + /*reportErrors*/ + true + ); + if (globalDisposableType !== emptyObjectType) { + const optionalDisposableType = getUnionType([globalDisposableType, nullType, undefinedType]); + checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); + } + } } } if (symbol.declarations && symbol.declarations.length > 1) { if (some(symbol.declarations, (d) => d !== node && isVariableLike(d) && !areDeclarationFlagsIdentical(d, node))) { - error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); + error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } } else { @@ -79139,12 +79696,12 @@ ${lanes.join("\n")} ); } if (symbol.valueDeclaration && !areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) { - error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); + error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */) { + if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -79152,9 +79709,9 @@ ${lanes.join("\n")} } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 171 /* PropertyDeclaration */ || nextDeclaration.kind === 170 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; + const message = nextDeclaration.kind === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; const declName = declarationNameToString(nextDeclarationName); - const err = error( + const err = error2( nextDeclarationName, message, declName, @@ -79169,7 +79726,7 @@ ${lanes.join("\n")} } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 168 /* Parameter */ && right.kind === 259 /* VariableDeclaration */ || left.kind === 259 /* VariableDeclaration */ && right.kind === 168 /* Parameter */) { + if (left.kind === 169 /* Parameter */ && right.kind === 260 /* VariableDeclaration */ || left.kind === 260 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -79189,10 +79746,17 @@ ${lanes.join("\n")} checkGrammarBindingElement(node); return checkVariableLikeDeclaration(node); } + function checkVariableDeclarationList(node) { + const blockScopeKind = getCombinedNodeFlags(node) & 7 /* BlockScoped */; + if (blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */) { + checkExternalEmitHelpers(node, 33554432 /* AddDisposableResourceAndDisposeResources */); + } + forEach(node.declarations, checkSourceElement); + } function checkVariableStatement(node) { if (!checkGrammarModifiers(node) && !checkGrammarVariableDeclarationList(node.declarationList)) - checkGrammarForDisallowedLetOrConstStatement(node); - forEach(node.declarationList.declarations, checkSourceElement); + checkGrammarForDisallowedBlockScopedVariableStatement(node); + checkVariableDeclarationList(node.declarationList); } function checkExpressionStatement(node) { checkGrammarStatementInAmbientContext(node); @@ -79203,8 +79767,8 @@ ${lanes.join("\n")} const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 241 /* EmptyStatement */) { - error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); + if (node.thenStatement.kind === 242 /* EmptyStatement */) { + error2(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); } @@ -79254,7 +79818,7 @@ ${lanes.join("\n")} getTypeNameForErrorDisplay(type) ); } else { - error(location, Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead); + error2(location, Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead); } } } @@ -79320,7 +79884,7 @@ ${lanes.join("\n")} } function checkTruthinessOfType(type, node) { if (type.flags & 16384 /* Void */) { - error(node, Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); + error2(node, Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); } return type; } @@ -79329,13 +79893,13 @@ ${lanes.join("\n")} } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 260 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 261 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 260 /* VariableDeclarationList */) { - forEach(node.initializer.declarations, checkVariableDeclaration); + if (node.initializer.kind === 261 /* VariableDeclarationList */) { + checkVariableDeclarationList(node.initializer); } else { checkExpression(node.initializer); } @@ -79354,7 +79918,7 @@ ${lanes.join("\n")} const container = getContainingFunctionOrClassStaticBlock(node); if (node.awaitModifier) { if (container && isClassStaticBlockDeclaration(container)) { - grammarErrorOnNode(node.awaitModifier, Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block); + grammarErrorOnNode(node.awaitModifier, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block); } else { const functionFlags = getFunctionFlags(container); if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < 99 /* ESNext */) { @@ -79364,12 +79928,12 @@ ${lanes.join("\n")} } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 260 /* VariableDeclarationList */) { - checkForInOrForOfVariableDeclaration(node); + if (node.initializer.kind === 261 /* VariableDeclarationList */) { + checkVariableDeclarationList(node.initializer); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 208 /* ArrayLiteralExpression */ || varExpr.kind === 209 /* ObjectLiteralExpression */) { + if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -79391,19 +79955,19 @@ ${lanes.join("\n")} function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 260 /* VariableDeclarationList */) { + if (node.initializer.kind === 261 /* VariableDeclarationList */) { const variable = node.initializer.declarations[0]; if (variable && isBindingPattern(variable.name)) { - error(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); + error2(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } - checkForInOrForOfVariableDeclaration(node); + checkVariableDeclarationList(node.initializer); } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 208 /* ArrayLiteralExpression */ || varExpr.kind === 209 /* ObjectLiteralExpression */) { - error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); + if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { - error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); + error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); } else { checkReferenceExpression( varExpr, @@ -79413,20 +79977,13 @@ ${lanes.join("\n")} } } if (rightType === neverType || !isTypeAssignableToKind(rightType, 67108864 /* NonPrimitive */ | 58982400 /* InstantiableNonPrimitive */)) { - error(node.expression, Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType)); + error2(node.expression, Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType)); } checkSourceElement(node.statement); if (node.locals) { registerForUnusedIdentifiersCheck(node); } } - function checkForInOrForOfVariableDeclaration(iterationStatement) { - const variableDeclarationList = iterationStatement.initializer; - if (variableDeclarationList.declarations.length >= 1) { - const decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); - } - } function checkRightHandSideOfForOf(statement) { const use = statement.awaitModifier ? 15 /* ForAwaitOf */ : 13 /* ForOf */; return checkIteratedTypeOrElementType(use, checkNonNullExpression(statement.expression), undefinedType, statement.expression); @@ -79484,7 +80041,7 @@ ${lanes.join("\n")} if (hasStringConstituent) { if (languageVersion < 1 /* ES5 */) { if (errorNode) { - error(errorNode, Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); + error2(errorNode, Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); reportedError = true; } } @@ -79944,7 +80501,7 @@ ${lanes.join("\n")} errorOutputContainer.errors ?? (errorOutputContainer.errors = []); errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, diagnostic, methodName)); } else { - error(errorNode, diagnostic, methodName); + error2(errorNode, diagnostic, methodName); } } return methodName === "next" ? noIterationTypes : void 0; @@ -79999,7 +80556,7 @@ ${lanes.join("\n")} errorOutputContainer.errors ?? (errorOutputContainer.errors = []); errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, resolver.mustHaveAValueDiagnostic, methodName)); } else { - error(errorNode, resolver.mustHaveAValueDiagnostic, methodName); + error2(errorNode, resolver.mustHaveAValueDiagnostic, methodName); } } yieldType = anyType; @@ -80083,13 +80640,13 @@ ${lanes.join("\n")} const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 177 /* SetAccessor */) { + if (container.kind === 178 /* SetAccessor */) { if (node.expression) { - error(node, Diagnostics.Setters_cannot_return_a_value); + error2(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 175 /* Constructor */) { + } else if (container.kind === 176 /* Constructor */) { if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) { - error(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); + error2(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } } else if (getReturnTypeFromAnnotation(container)) { const unwrappedReturnType = unwrapReturnType(returnType, functionFlags) ?? returnType; @@ -80104,13 +80661,13 @@ ${lanes.join("\n")} checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 175 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { - error(node, Diagnostics.Not_all_code_paths_return_a_value); + } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { + error2(node, Diagnostics.Not_all_code_paths_return_a_value); } } function checkWithStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.flags & 32768 /* AwaitContext */) { + if (node.flags & 65536 /* AwaitContext */) { grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block); } } @@ -80128,7 +80685,7 @@ ${lanes.join("\n")} let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 296 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 297 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -80136,12 +80693,12 @@ ${lanes.join("\n")} hasDuplicateDefaultClause = true; } } - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) { - error(clause, Diagnostics.Fallthrough_case_in_switch); + error2(clause, Diagnostics.Fallthrough_case_in_switch); } function createLazyCaseClauseDiagnostics(clause2) { return () => { @@ -80168,7 +80725,7 @@ ${lanes.join("\n")} if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 255 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 256 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -80258,8 +80815,8 @@ ${lanes.join("\n")} return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 263 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 225 /* BinaryExpression */ || name && name.kind === 166 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 226 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -80283,7 +80840,7 @@ ${lanes.join("\n")} function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 263 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -80291,7 +80848,7 @@ ${lanes.join("\n")} const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; const errorNode = localCheckDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getIndexInfoOfType(base, checkInfo.keyType) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); if (errorNode && !isTypeAssignableTo(checkInfo.type, info.type)) { - error( + error2( errorNode, Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, typeToString(checkInfo.keyType), @@ -80314,12 +80871,12 @@ ${lanes.join("\n")} case "symbol": case "void": case "object": - error(name, message, name.escapedText); + error2(name, message, name.escapedText); } } function checkClassNameCollisionWithObject(name) { if (languageVersion >= 1 /* ES5 */ && name.escapedText === "Object" && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(name).impliedNodeFormat === 1 /* CommonJS */)) { - error(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]); + error2(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]); } } function checkUnmatchedJSDocParameters(node) { @@ -80342,7 +80899,7 @@ ${lanes.join("\n")} const lastJSDocParamIndex = jsdocParameters.length - 1; const lastJSDocParam = jsdocParameters[lastJSDocParamIndex]; if (isJs && lastJSDocParam && isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression && lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !excludedParameters.has(lastJSDocParamIndex) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) { - error(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name)); + error2(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name)); } } else { forEach(jsdocParameters, ({ name, isNameFirst }, index) => { @@ -80351,7 +80908,7 @@ ${lanes.join("\n")} } if (isQualifiedName(name)) { if (isJs) { - error(name, Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, entityNameToString(name), entityNameToString(name.left)); + error2(name, Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, entityNameToString(name), entityNameToString(name.left)); } } else { if (!isNameFirst) { @@ -80376,11 +80933,11 @@ ${lanes.join("\n")} seenDefault = true; checkTypeParametersNotReferenced(node.default, typeParameterDeclarations, i); } else if (seenDefault) { - error(node, Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters); + error2(node, Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters); } for (let j = 0; j < i; j++) { if (typeParameterDeclarations[j].symbol === node.symbol) { - error(node.name, Diagnostics.Duplicate_identifier_0, declarationNameToString(node.name)); + error2(node.name, Diagnostics.Duplicate_identifier_0, declarationNameToString(node.name)); } } }; @@ -80389,12 +80946,12 @@ ${lanes.join("\n")} function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 182 /* TypeReference */) { + if (node.kind === 183 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { if (type.symbol === getSymbolOfDeclaration(typeParameters[i])) { - error(node, Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters); + error2(node, Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters); } } } @@ -80417,7 +80974,7 @@ ${lanes.join("\n")} if (!areTypeParametersIdentical(declarations, type.localTypeParameters, getEffectiveTypeParameterDeclarations)) { const name = symbolToString(symbol); for (const declaration of declarations) { - error(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name); + error2(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name); } } } @@ -80459,7 +81016,7 @@ ${lanes.join("\n")} node ); const willTransformPrivateElementsOrClassStaticBlocks = languageVersion <= 9 /* ES2022 */; - const willTransformInitializers = !useDefineForClassFields || languageVersion < 9 /* ES2022 */; + const willTransformInitializers = !emitStandardClassFields; if (willTransformStaticElementsOfDecoratedClass || willTransformPrivateElementsOrClassStaticBlocks) { for (const member of node.members) { if (willTransformStaticElementsOfDecoratedClass && classElementOrClassElementParameterIsDecorated( @@ -80540,7 +81097,7 @@ ${lanes.join("\n")} checkTypeParameterListsIdentical(symbol); checkFunctionOrConstructorSymbol(symbol); checkClassForDuplicateDeclarations(node); - const nodeInAmbientContext = !!(node.flags & 16777216 /* Ambient */); + const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); if (!nodeInAmbientContext) { checkClassForStaticPropertyNameConflicts(node); } @@ -80588,18 +81145,18 @@ ${lanes.join("\n")} } if (baseConstructorType.flags & 8650752 /* TypeVariable */) { if (!isMixinConstructorType(staticType)) { - error(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any); + error2(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any); } else { const constructSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 256 /* Abstract */)) { - error(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract); + error2(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract); } } } if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32 /* Class */) && !(baseConstructorType.flags & 8650752 /* TypeVariable */)) { const constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); if (forEach(constructors, (sig) => !isJSConstructor(sig.declaration) && !isTypeIdenticalTo(getReturnTypeOfSignature(sig), baseType))) { - error(baseTypeNode.expression, Diagnostics.Base_constructors_must_all_have_the_same_return_type); + error2(baseTypeNode.expression, Diagnostics.Base_constructors_must_all_have_the_same_return_type); } } checkKindsOfPropertyMemberOverrides(type, baseType); @@ -80611,7 +81168,7 @@ ${lanes.join("\n")} if (implementedTypeNodes) { for (const typeRefNode of implementedTypeNodes) { if (!isEntityNameExpression(typeRefNode.expression) || isOptionalChain(typeRefNode.expression)) { - error(typeRefNode.expression, Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments); + error2(typeRefNode.expression, Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments); } checkTypeReferenceNode(typeRefNode); addLazyDiagnostic(createImplementsDiagnostics(typeRefNode)); @@ -80644,7 +81201,7 @@ ${lanes.join("\n")} issueMemberSpecificError(node, typeWithThis, baseWithThis, genericDiag); } } else { - error(typeRefNode, Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members); + error2(typeRefNode, Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members); } } }; @@ -80711,7 +81268,7 @@ ${lanes.join("\n")} } function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, memberName, errorNode) { const isJs = isInJSFile(node); - const nodeInAmbientContext = !!(node.flags & 16777216 /* Ambient */); + const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) { const memberEscapedName = escapeLeadingUnderscores(memberName); const thisType = memberIsStatic ? staticType : typeWithThis; @@ -80722,12 +81279,12 @@ ${lanes.join("\n")} if (prop && !baseProp && memberHasOverrideModifier) { if (errorNode) { const suggestion = getSuggestedSymbolForNonexistentClassMember(memberName, baseType); - suggestion ? error( + suggestion ? error2( errorNode, isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, baseClassName, symbolToString(suggestion) - ) : error( + ) : error2( errorNode, isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, baseClassName @@ -80742,12 +81299,12 @@ ${lanes.join("\n")} if (!baseHasAbstract) { if (errorNode) { const diag2 = memberIsParameterProperty ? isJs ? Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 : isJs ? Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0; - error(errorNode, diag2, baseClassName); + error2(errorNode, diag2, baseClassName); } return 1 /* NeedsOverride */; } else if (memberHasAbstractModifier && baseHasAbstract) { if (errorNode) { - error(errorNode, Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, baseClassName); + error2(errorNode, Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, baseClassName); } return 1 /* NeedsOverride */; } @@ -80755,7 +81312,7 @@ ${lanes.join("\n")} } else if (memberHasOverrideModifier) { if (errorNode) { const className = typeToString(type); - error( + error2( errorNode, isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, className @@ -80808,7 +81365,7 @@ ${lanes.join("\n")} if (declaration && hasEffectiveModifier(declaration, 8 /* Private */)) { const typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); if (!isNodeWithinClass(node, typeClassDeclaration)) { - error(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); + error2(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); } } } @@ -80845,7 +81402,7 @@ ${lanes.join("\n")} return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 262 /* ClassDeclaration */ || d.kind === 263 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a, _b, _c, _d; @@ -80877,14 +81434,14 @@ ${lanes.join("\n")} } } if (!inheritedAbstractMemberNotImplementedError) { - inheritedAbstractMemberNotImplementedError = error( + inheritedAbstractMemberNotImplementedError = error2( derivedClassDecl, Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1, typeToString(type), typeToString(baseType) ); } - if (derivedClassDecl.kind === 230 /* ClassExpression */) { + if (derivedClassDecl.kind === 231 /* ClassExpression */) { addRelatedInfo( inheritedAbstractMemberNotImplementedError, createDiagnosticForNode( @@ -80923,15 +81480,15 @@ ${lanes.join("\n")} const overriddenInstanceAccessor = basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */; if (overriddenInstanceProperty || overriddenInstanceAccessor) { const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; - error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); + error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { - const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 171 /* PropertyDeclaration */ && !d.initializer); - if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) { + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer); + if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { const errorMessage2 = Diagnostics.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; - error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType)); + error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType)); } } } @@ -80948,7 +81505,7 @@ ${lanes.join("\n")} } else { errorMessage = Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function; } - error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); + error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); } } } @@ -81013,7 +81570,7 @@ ${lanes.join("\n")} return ok; } function checkPropertyInitialization(node) { - if (!strictNullChecks || !strictPropertyInitialization || node.flags & 16777216 /* Ambient */) { + if (!strictNullChecks || !strictPropertyInitialization || node.flags & 33554432 /* Ambient */) { return; } const constructor = findConstructorDeclaration(node); @@ -81027,7 +81584,7 @@ ${lanes.join("\n")} const type = getTypeOfSymbol(getSymbolOfDeclaration(member)); if (!(type.flags & 3 /* AnyOrUnknown */ || containsUndefinedType(type))) { if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) { - error(member.name, Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, declarationNameToString(propName)); + error2(member.name, Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, declarationNameToString(propName)); } } } @@ -81035,7 +81592,7 @@ ${lanes.join("\n")} } } function isPropertyWithoutInitializer(node) { - return node.kind === 171 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -81069,7 +81626,7 @@ ${lanes.join("\n")} checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfDeclaration(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 263 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 264 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -81084,7 +81641,7 @@ ${lanes.join("\n")} }); forEach(getInterfaceBaseTypeNodes(node), (heritageElement) => { if (!isEntityNameExpression(heritageElement.expression) || isOptionalChain(heritageElement.expression)) { - error(heritageElement.expression, Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments); + error2(heritageElement.expression, Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments); } checkTypeReferenceNode(heritageElement); }); @@ -81101,7 +81658,7 @@ ${lanes.join("\n")} checkTypeParameters(node.typeParameters); if (node.type.kind === 141 /* IntrinsicKeyword */) { if (!intrinsicTypeKinds.has(node.name.escapedText) || length(node.typeParameters) !== 1) { - error(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); + error2(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); } } else { checkSourceElement(node.type); @@ -81122,23 +81679,23 @@ ${lanes.join("\n")} } function computeMemberValue(member, autoValue) { if (isComputedNonLiteralName(member.name)) { - error(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums); + error2(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums); } else { const text = getTextOfPropertyName(member.name); if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) { - error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); + error2(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); } } if (member.initializer) { return computeConstantValue(member); } - if (member.parent.flags & 16777216 /* Ambient */ && !isEnumConst(member.parent)) { + if (member.parent.flags & 33554432 /* Ambient */ && !isEnumConst(member.parent)) { return void 0; } if (autoValue !== void 0) { return autoValue; } - error(member.name, Diagnostics.Enum_member_must_have_initializer); + error2(member.name, Diagnostics.Enum_member_must_have_initializer); return void 0; } function computeConstantValue(member) { @@ -81147,12 +81704,12 @@ ${lanes.join("\n")} const value = evaluate(initializer, member); if (value !== void 0) { if (isConstEnum && typeof value === "number" && !isFinite(value)) { - error(initializer, isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); + error2(initializer, isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); } } else if (isConstEnum) { - error(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); - } else if (member.parent.flags & 16777216 /* Ambient */) { - error(initializer, Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression); + error2(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); + } else if (member.parent.flags & 33554432 /* Ambient */) { + error2(initializer, Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression); } else { checkTypeAssignableTo(checkExpression(initializer), numberType, initializer, Diagnostics.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values); } @@ -81160,7 +81717,7 @@ ${lanes.join("\n")} } function evaluate(expr, location) { switch (expr.kind) { - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const value = evaluate(expr.operand, location); if (typeof value === "number") { switch (expr.operator) { @@ -81173,7 +81730,7 @@ ${lanes.join("\n")} } } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const left = evaluate(expr.left, location); const right = evaluate(expr.right, location); if (typeof left === "number" && typeof right === "number") { @@ -81210,18 +81767,30 @@ ${lanes.join("\n")} case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return expr.text; - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return evaluateTemplateExpression(expr, location); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return evaluate(expr.expression, location); - case 80 /* Identifier */: - if (isInfinityOrNaNString(expr.escapedText)) { - return +expr.escapedText; + case 80 /* Identifier */: { + const identifier = expr; + if (isInfinityOrNaNString(identifier.escapedText) && resolveEntityName( + identifier, + 111551 /* Value */, + /*ignoreErrors*/ + true + ) === getGlobalSymbol( + identifier.escapedText, + 111551 /* Value */, + /*diagnostic*/ + void 0 + )) { + return +identifier.escapedText; } - case 210 /* PropertyAccessExpression */: + } + case 211 /* PropertyAccessExpression */: if (isEntityNameExpression(expr)) { const symbol = resolveEntityName( expr, @@ -81231,18 +81800,18 @@ ${lanes.join("\n")} ); if (symbol) { if (symbol.flags & 8 /* EnumMember */) { - return evaluateEnumMember(expr, symbol, location); + return location ? evaluateEnumMember(expr, symbol, location) : getEnumMemberValue(symbol.valueDeclaration); } - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; - if (declaration && !declaration.type && declaration.initializer && declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location)) { + if (declaration && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { return evaluate(declaration.initializer, declaration); } } } } break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const root = expr.expression; if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { const rootSymbol = resolveEntityName( @@ -81255,7 +81824,7 @@ ${lanes.join("\n")} const name = escapeLeadingUnderscores(expr.argumentExpression.text); const member = rootSymbol.exports.get(name); if (member) { - return evaluateEnumMember(expr, member, location); + return location ? evaluateEnumMember(expr, member, location) : getEnumMemberValue(member.valueDeclaration); } } } @@ -81266,11 +81835,11 @@ ${lanes.join("\n")} function evaluateEnumMember(expr, symbol, location) { const declaration = symbol.valueDeclaration; if (!declaration || declaration === location) { - error(expr, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(symbol)); + error2(expr, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(symbol)); return void 0; } if (!isBlockScopedNameDeclaredBeforeUse(declaration, location)) { - error(expr, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums); + error2(expr, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums); return 0; } return getEnumMemberValue(declaration); @@ -81303,13 +81872,13 @@ ${lanes.join("\n")} const enumIsConst = isEnumConst(node); forEach(enumSymbol.declarations, (decl) => { if (isEnumDeclaration(decl) && isEnumConst(decl) !== enumIsConst) { - error(getNameOfDeclaration(decl), Diagnostics.Enum_declarations_must_all_be_const_or_non_const); + error2(getNameOfDeclaration(decl), Diagnostics.Enum_declarations_must_all_be_const_or_non_const); } }); } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 265 /* EnumDeclaration */) { + if (declaration.kind !== 266 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -81319,7 +81888,7 @@ ${lanes.join("\n")} const firstEnumMember = enumDeclaration.members[0]; if (!firstEnumMember.initializer) { if (seenEnumMissingInitialInitializer) { - error(firstEnumMember.name, Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element); + error2(firstEnumMember.name, Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element); } else { seenEnumMissingInitialInitializer = true; } @@ -81329,7 +81898,7 @@ ${lanes.join("\n")} } function checkEnumMember(node) { if (isPrivateIdentifier(node.name)) { - error(node, Diagnostics.An_enum_member_cannot_be_named_with_a_private_identifier); + error2(node, Diagnostics.An_enum_member_cannot_be_named_with_a_private_identifier); } if (node.initializer) { checkExpression(node.initializer); @@ -81339,7 +81908,7 @@ ${lanes.join("\n")} const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 262 /* ClassDeclaration */ || declaration.kind === 261 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 262 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 33554432 /* Ambient */)) { return declaration; } } @@ -81368,9 +81937,9 @@ ${lanes.join("\n")} function checkModuleDeclarationDiagnostics() { var _a, _b; const isGlobalAugmentation = isGlobalScopeAugmentation(node); - const inAmbientContext = node.flags & 16777216 /* Ambient */; + const inAmbientContext = node.flags & 33554432 /* Ambient */; if (isGlobalAugmentation && !inAmbientContext) { - error(node.name, Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); + error2(node.name, Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); } const isAmbientExternalModule = isAmbientModule(node); const contextErrorMessage = isAmbientExternalModule ? Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : Diagnostics.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module; @@ -81389,26 +81958,26 @@ ${lanes.join("\n")} const symbol = getSymbolOfDeclaration(node); if (symbol.flags & 512 /* ValueModule */ && !inAmbientContext && isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions))) { if (getIsolatedModules(compilerOptions) && !getSourceFileOfNode(node).externalModuleIndicator) { - error(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName); + error2(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName); } if (((_a = symbol.declarations) == null ? void 0 : _a.length) > 1) { const firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (firstNonAmbientClassOrFunc) { if (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc)) { - error(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); + error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); } else if (node.pos < firstNonAmbientClassOrFunc.pos) { - error(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); + error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - const mergedClass = getDeclarationOfKind(symbol, 262 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 263 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; } } - if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 311 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 95 /* ExportKeyword */); if (exportModifier) { - error(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + error2(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } } @@ -81422,15 +81991,15 @@ ${lanes.join("\n")} } } else if (isGlobalSourceFile(node.parent)) { if (isGlobalAugmentation) { - error(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + error2(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); } else if (isExternalModuleNameRelative(getTextOfIdentifierOrLiteral(node.name))) { - error(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + error2(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); } } else { if (isGlobalAugmentation) { - error(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + error2(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); } else { - error(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + error2(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); } } } @@ -81438,21 +82007,21 @@ ${lanes.join("\n")} } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 207 /* BindingElement */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 260 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -81460,12 +82029,12 @@ ${lanes.join("\n")} } break; } - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 261 /* FunctionDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 262 /* FunctionDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -81476,12 +82045,12 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 80 /* Identifier */); return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -81497,17 +82066,17 @@ ${lanes.join("\n")} return false; } if (!isStringLiteral(moduleName)) { - error(moduleName, Diagnostics.String_literal_expected); + error2(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 267 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 311 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 277 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule) { + error2(moduleName, node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { if (!isTopLevelInExternalModuleAugmentation(node)) { - error(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); + error2(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); return false; } } @@ -81516,7 +82085,7 @@ ${lanes.join("\n")} for (const clause of node.assertClause.elements) { if (!isStringLiteral(clause.value)) { hasError = true; - error(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions); + error2(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions); } } return !hasError; @@ -81531,9 +82100,9 @@ ${lanes.join("\n")} symbol = getMergedSymbol(symbol.exportSymbol || symbol); if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) { const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node; - Debug.assert(node.kind !== 279 /* NamespaceExport */); - if (node.kind === 280 /* ExportSpecifier */) { - const diag2 = error(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); + Debug.assert(node.kind !== 280 /* NamespaceExport */); + if (node.kind === 281 /* ExportSpecifier */) { + const diag2 = error2(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); const alreadyExportedSymbol = (_b = (_a = getSourceFileOfNode(node).symbol) == null ? void 0 : _a.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText); if (alreadyExportedSymbol === target) { const exportingDeclaration = (_c = alreadyExportedSymbol.declarations) == null ? void 0 : _c.find(isJSDocNode); @@ -81546,11 +82115,11 @@ ${lanes.join("\n")} } } } else { - Debug.assert(node.kind !== 259 /* VariableDeclaration */); + Debug.assert(node.kind !== 260 /* VariableDeclaration */); const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)); const moduleSpecifier = (importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) ?? "..."; const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName); - error( + error2( errorNode, Diagnostics._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation, importedIdentifier, @@ -81559,47 +82128,47 @@ ${lanes.join("\n")} } return; } - const targetFlags = getAllSymbolFlags(target); + const targetFlags = getSymbolFlags(target); const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (targetFlags & excludedMeanings) { - const message = node.kind === 280 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; - error(node, message, symbolToString(symbol)); + const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + error2(node, message, symbolToString(symbol)); } - if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { + if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */)) { const typeOnlyAlias = getTypeOnlyAliasDeclaration(symbol); const isType = !(targetFlags & 111551 /* Value */); if (isType || typeOnlyAlias) { switch (node.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 270 /* ImportEqualsDeclaration */: { + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 271 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports || compilerOptions.verbatimModuleSyntax) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? compilerOptions.verbatimModuleSyntax ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled : compilerOptions.verbatimModuleSyntax ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled; - const name = idText(node.kind === 275 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 276 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( - error(node, message, name), + error2(node, message, name), isType ? void 0 : typeOnlyAlias, name ); } - if (isType && node.kind === 270 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { - error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); + if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + error2(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; } - case 280 /* ExportSpecifier */: { + case 281 /* ExportSpecifier */: { if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const name = idText(node.propertyName || node.name); - const diagnostic = isType ? error(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); + const diagnostic = isType ? error2(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error2(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); addTypeOnlyDeclarationRelatedInfo(diagnostic, isType ? void 0 : typeOnlyAlias, name); break; } } } } - if (compilerOptions.verbatimModuleSyntax && node.kind !== 270 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { - error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + if (compilerOptions.verbatimModuleSyntax && node.kind !== 271 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } if (isImportSpecifier(node)) { @@ -81641,7 +82210,7 @@ ${lanes.join("\n")} function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 275 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 276 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -81688,7 +82257,7 @@ ${lanes.join("\n")} checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -81714,14 +82283,14 @@ ${lanes.join("\n")} if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 282 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfDeclaration(node)); if (target !== unknownSymbol) { - const targetFlags = getAllSymbolFlags(target); + const targetFlags = getSymbolFlags(target); if (targetFlags & 111551 /* Value */) { const moduleName = getFirstIdentifier(node.moduleReference); if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { - error(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName)); + error2(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName)); } } if (targetFlags & 788968 /* Type */) { @@ -81732,7 +82301,7 @@ ${lanes.join("\n")} grammarErrorOnNode(node, Diagnostics.An_import_alias_cannot_use_import_type); } } else { - if (moduleKind >= 5 /* ES2015 */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 16777216 /* Ambient */)) { + if (moduleKind >= 5 /* ES2015 */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 33554432 /* Ambient */)) { grammarErrorOnNode(node, Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead); } } @@ -81752,15 +82321,15 @@ ${lanes.join("\n")} if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 267 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 267 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 311 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { - error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); + const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 268 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 33554432 /* Ambient */; + if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + error2(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { const moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) { - error(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); + error2(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); } else if (node.exportClause) { checkAliasSymbol(node.exportClause); } @@ -81779,13 +82348,13 @@ ${lanes.join("\n")} } function checkGrammarExportDeclaration(node) { var _a; - if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 278 /* NamedExports */) { + if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 279 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 311 /* SourceFile */ || node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 266 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 312 /* SourceFile */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 267 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -81821,7 +82390,7 @@ ${lanes.join("\n")} } for (const statement of sourceFile.statements) { if (canConvertImportDeclarationToTypeOnly(statement) || canConvertImportEqualsDeclarationToTypeOnly(statement)) { - error( + error2( statement, Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error ); @@ -81851,13 +82420,13 @@ ${lanes.join("\n")} true ); if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || symbol.declarations && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { - error(exportedName, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, idText(exportedName)); + error2(exportedName, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, idText(exportedName)); } else { if (!node.isTypeOnly && !node.parent.parent.isTypeOnly) { markExportAsReferenced(node); } const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol); - if (!target || getAllSymbolFlags(target) & 111551 /* Value */) { + if (!target || getSymbolFlags(target) & 111551 /* Value */) { checkExpressionCached(node.propertyName || node.name); } } @@ -81872,12 +82441,12 @@ ${lanes.join("\n")} if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 311 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 266 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { - error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); + error2(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { - error(node, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + error2(node, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); } return; } @@ -81888,7 +82457,7 @@ ${lanes.join("\n")} if (typeAnnotationNode) { checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression); } - const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */); + const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */); if (node.expression.kind === 80 /* Identifier */) { const id = node.expression; const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName( @@ -81902,17 +82471,17 @@ ${lanes.join("\n")} )); if (sym) { markAliasReferenced(sym, id); - if (getAllSymbolFlags(sym) & 111551 /* Value */) { + if (getSymbolFlags(sym) & 111551 /* Value */) { checkExpressionCached(id); - if (!isIllegalExportDefaultInCJS && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) { - error( + if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) { + error2( id, node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : Diagnostics.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration, idText(id) ); } - } else if (!isIllegalExportDefaultInCJS && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax) { - error( + } else if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax) { + error2( id, node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type : Diagnostics.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type, idText(id) @@ -81932,16 +82501,16 @@ ${lanes.join("\n")} checkExpressionCached(node.expression); } if (isIllegalExportDefaultInCJS) { - error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } checkExternalModuleExports(container); - if (node.flags & 16777216 /* Ambient */ && !isEntityNameExpression(node.expression)) { + if (node.flags & 33554432 /* Ambient */ && !isEntityNameExpression(node.expression)) { grammarErrorOnNode(node.expression, Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context); } if (node.isExportEquals) { - if (moduleKind >= 5 /* ES2015 */ && (node.flags & 16777216 /* Ambient */ && getSourceFileOfNode(node).impliedNodeFormat === 99 /* ESNext */ || !(node.flags & 16777216 /* Ambient */) && getSourceFileOfNode(node).impliedNodeFormat !== 1 /* CommonJS */)) { + if (moduleKind >= 5 /* ES2015 */ && (node.flags & 33554432 /* Ambient */ && getSourceFileOfNode(node).impliedNodeFormat === 99 /* ESNext */ || !(node.flags & 33554432 /* Ambient */) && getSourceFileOfNode(node).impliedNodeFormat !== 1 /* CommonJS */)) { grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead); - } else if (moduleKind === 4 /* System */ && !(node.flags & 16777216 /* Ambient */)) { + } else if (moduleKind === 4 /* System */ && !(node.flags & 33554432 /* Ambient */)) { grammarErrorOnNode(node, Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system); } } @@ -81957,7 +82526,7 @@ ${lanes.join("\n")} if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { const declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; if (declaration && !isTopLevelInExternalModuleAugmentation(declaration) && !isInJSFile(declaration)) { - error(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + error2(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); } } const exports = getExportsOfModule(moduleSymbol); @@ -82014,182 +82583,182 @@ ${lanes.join("\n")} const kind = node.kind; if (cancellationToken) { switch (kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 242 /* FirstStatement */ && kind <= 258 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 243 /* FirstStatement */ && kind <= 259 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return checkTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return checkParameter(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checkPropertySignature(node); - case 184 /* ConstructorType */: - case 183 /* FunctionType */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 185 /* ConstructorType */: + case 184 /* FunctionType */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return checkSignatureDeclaration(node); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return checkMethodDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return checkConstructorDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return checkAccessorDeclaration(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return checkTypeReferenceNode(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return checkTypePredicate(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return checkTypeQuery(node); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return checkTypeLiteral(node); - case 187 /* ArrayType */: + case 188 /* ArrayType */: return checkArrayType(node); - case 188 /* TupleType */: + case 189 /* TupleType */: return checkTupleType(node); - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 195 /* ParenthesizedType */: - case 189 /* OptionalType */: - case 190 /* RestType */: + case 196 /* ParenthesizedType */: + case 190 /* OptionalType */: + case 191 /* RestType */: return checkSourceElement(node.type); - case 196 /* ThisType */: + case 197 /* ThisType */: return checkThisType(node); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return checkTypeOperator(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return checkConditionalType(node); - case 194 /* InferType */: + case 195 /* InferType */: return checkInferType(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return checkImportType(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 330 /* JSDocLink */: - case 331 /* JSDocLinkCode */: - case 332 /* JSDocLinkPlain */: + case 331 /* JSDocLink */: + case 332 /* JSDocLinkCode */: + case 333 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 321 /* JSDocNonNullableType */: - case 320 /* JSDocNullableType */: - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: - case 328 /* JSDocTypeLiteral */: + case 322 /* JSDocNonNullableType */: + case 321 /* JSDocNullableType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: + case 329 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 315 /* JSDocTypeExpression */: + case 316 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 339 /* JSDocPublicTag */: - case 341 /* JSDocProtectedTag */: - case 340 /* JSDocPrivateTag */: + case 340 /* JSDocPublicTag */: + case 342 /* JSDocProtectedTag */: + case 341 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 356 /* JSDocSatisfiesTag */: + case 357 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return checkMappedType(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 240 /* Block */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 268 /* ModuleBlock */: return checkBlock(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return checkVariableStatement(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return checkExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return checkIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return checkDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return checkWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return checkForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return checkForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return checkForOfStatement(node); - case 250 /* ContinueStatement */: - case 251 /* BreakStatement */: + case 251 /* ContinueStatement */: + case 252 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return checkReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return checkWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return checkSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return checkLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return checkThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return checkTryStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return checkBindingElement(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return checkClassDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return checkImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return checkExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return checkExportAssignment(node); - case 241 /* EmptyStatement */: - case 258 /* DebuggerStatement */: + case 242 /* EmptyStatement */: + case 259 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -82223,16 +82792,16 @@ ${lanes.join("\n")} const { parent: parent2 } = node; if (isParameter(parent2) && isJSDocFunctionType(parent2.parent)) { if (last(parent2.parent.parameters) !== parent2) { - error(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); + error2(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); } return; } if (!isJSDocTypeExpression(parent2)) { - error(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); + error2(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); } const paramTag = node.parent.parent; if (!isJSDocParameterTag(paramTag)) { - error(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); + error2(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); return; } const param = getParameterSymbolFromJSDoc(paramTag); @@ -82241,7 +82810,7 @@ ${lanes.join("\n")} } const host2 = getHostSignatureFromJSDoc(paramTag); if (!host2 || last(host2.parameters).symbol !== param) { - error(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); + error2(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); } } function getTypeFromJSDocVariadicType(node) { @@ -82288,38 +82857,38 @@ ${lanes.join("\n")} currentNode = node; instantiationCount = 0; switch (node.kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 285 /* JsxOpeningElement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 286 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 283 /* JsxElement */: + case 284 /* JsxElement */: checkJsxElementDeferred(node); break; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: - case 216 /* ParenthesizedExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 217 /* ParenthesizedExpression */: checkAssertionDeferred(node); } currentNode = saveCurrentNode; @@ -82377,7 +82946,7 @@ ${lanes.join("\n")} addLazyDiagnostic(() => { if (!node.isDeclarationFile && (compilerOptions.noUnusedLocals || compilerOptions.noUnusedParameters)) { checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(node), (containingNode, kind, diag2) => { - if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 16777216 /* Ambient */))) { + if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) { diagnostics.add(diag2); } }); @@ -82456,7 +83025,7 @@ ${lanes.join("\n")} return diagnostics.getGlobalDiagnostics(); } function getSymbolsInScope(location, meaning) { - if (location.flags & 33554432 /* InWithStatement */) { + if (location.flags & 67108864 /* InWithStatement */) { return []; } const symbols = createSymbolTable(); @@ -82470,27 +83039,27 @@ ${lanes.join("\n")} copySymbols(location.locals, meaning); } switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalModule(location)) break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */); break; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */); } break; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -82523,7 +83092,7 @@ ${lanes.join("\n")} function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 280 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 279 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) { copySymbol(symbol, meaning2); } }); @@ -82534,16 +83103,16 @@ ${lanes.join("\n")} return name.kind === 80 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 182 /* TypeReference */; + return node.parent.kind === 183 /* TypeReference */; } function isInNameOfExpressionWithTypeArguments(node) { - while (node.parent.kind === 210 /* PropertyAccessExpression */) { + while (node.parent.kind === 211 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 232 /* ExpressionWithTypeArguments */; + return node.parent.kind === 233 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -82569,13 +83138,13 @@ ${lanes.join("\n")} return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 165 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 270 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 271 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 276 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 277 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -82601,7 +83170,7 @@ ${lanes.join("\n")} node = parent2; parent2 = parent2.parent; } - if (parent2 && parent2.kind === 204 /* ImportType */ && parent2.qualifier === node) { + if (parent2 && parent2.kind === 205 /* ImportType */ && parent2.qualifier === node) { return parent2; } return void 0; @@ -82623,7 +83192,7 @@ ${lanes.join("\n")} /*contextFlags*/ void 0 ); - const type = contextualType && getThisTypeFromContextualType(contextualType); + const type = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); return type && !isTypeAny(type); } } @@ -82633,7 +83202,7 @@ ${lanes.join("\n")} if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 210 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name) && !isThisPropertyAndThisTyped(name.parent)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -82641,7 +83210,7 @@ ${lanes.join("\n")} } } } - if (name.parent.kind === 276 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 277 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, /*all meanings*/ @@ -82653,7 +83222,7 @@ ${lanes.join("\n")} return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 270 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 271 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals( name, @@ -82674,7 +83243,7 @@ ${lanes.join("\n")} } if (isInNameOfExpressionWithTypeArguments(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 232 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 233 /* ExpressionWithTypeArguments */) { meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -82693,10 +83262,10 @@ ${lanes.join("\n")} return entityNameSymbol; } } - if (name.parent.kind === 347 /* JSDocParameterTag */) { + if (name.parent.kind === 348 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 167 /* TypeParameter */ && name.parent.parent.kind === 351 /* JSDocTemplateTag */) { + if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 352 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -82749,12 +83318,12 @@ ${lanes.join("\n")} return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 210 /* PropertyAccessExpression */ || name.kind === 165 /* QualifiedName */) { + } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 210 /* PropertyAccessExpression */) { + if (name.kind === 211 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -82794,7 +83363,7 @@ ${lanes.join("\n")} return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 182 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName( name, meaning, @@ -82805,7 +83374,7 @@ ${lanes.join("\n")} ); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 181 /* TypePredicate */) { + if (name.parent.kind === 182 /* TypePredicate */) { return resolveEntityName( name, /*meaning*/ @@ -82846,7 +83415,7 @@ ${lanes.join("\n")} } const { parent: parent2 } = node; const grandParent = parent2.parent; - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } if (isDeclarationNameOrImportPropertyName(node)) { @@ -82858,7 +83427,7 @@ ${lanes.join("\n")} if (node.kind === 80 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 207 /* BindingElement */ && grandParent.kind === 205 /* ObjectBindingPattern */ && node === parent2.propertyName) { + } else if (parent2.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent2.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { @@ -82877,8 +83446,8 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: case 81 /* PrivateIdentifier */: - case 210 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } @@ -82899,19 +83468,19 @@ ${lanes.join("\n")} if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 196 /* ThisType */: + case 197 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; case 108 /* SuperKeyword */: return checkExpression(node).symbol; case 137 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 175 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) { return constructorDeclaration.parent.symbol; } return void 0; case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 271 /* ImportDeclaration */ || node.parent.kind === 277 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 272 /* ImportDeclaration */ || node.parent.kind === 278 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( node.parent, /*requireStringLiteralLikeArgument*/ false @@ -82929,16 +83498,16 @@ ${lanes.join("\n")} case 39 /* EqualsGreaterThanToken */: case 86 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 204 /* ImportType */: + case 205 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; case 95 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; case 102 /* ImportKeyword */: case 105 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return checkExpression(node).symbol; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) { const symbol = getIntrinsicTagSymbol(node.parent); return symbol === unknownSymbol ? void 0 : symbol; @@ -82957,7 +83526,7 @@ ${lanes.join("\n")} return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 303 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 304 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); } return void 0; @@ -82973,7 +83542,7 @@ ${lanes.join("\n")} if (isSourceFile(node) && !isExternalModule(node)) { return errorType; } - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return errorType; } const classDecl = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); @@ -83037,16 +83606,16 @@ ${lanes.join("\n")} return errorType; } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 209 /* ObjectLiteralExpression */ || expr.kind === 208 /* ArrayLiteralExpression */); - if (expr.parent.kind === 249 /* ForOfStatement */) { + Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */); + if (expr.parent.kind === 250 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 225 /* BinaryExpression */) { + if (expr.parent.kind === 226 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 302 /* PropertyAssignment */) { + if (expr.parent.kind === 303 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -83079,7 +83648,7 @@ ${lanes.join("\n")} case 9 /* NumericLiteral */: case 11 /* StringLiteral */: return getStringLiteralType(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -83149,7 +83718,7 @@ ${lanes.join("\n")} return symbolLinks2.exportsSomeValue; function isValue(s) { s = resolveSymbol(s); - return s && !!(getAllSymbolFlags(s) & 111551 /* Value */); + return s && !!(getSymbolFlags(s) & 111551 /* Value */); } } function isNameOfModuleOrEnumDeclaration(node) { @@ -83174,7 +83743,7 @@ ${lanes.join("\n")} } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 311 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 312 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -83204,7 +83773,7 @@ ${lanes.join("\n")} return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 298 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 299 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -83232,7 +83801,7 @@ ${lanes.join("\n")} /*lookInLabeledStatements*/ false ); - const inLoopBodyBlock = container.kind === 240 /* Block */ && isIterationStatement( + const inLoopBodyBlock = container.kind === 241 /* Block */ && isIterationStatement( container.parent, /*lookInLabeledStatements*/ false @@ -83272,31 +83841,35 @@ ${lanes.join("\n")} function isValueAliasDeclaration(node) { Debug.assert(canCollectSymbolAliasAccessabilityData); switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfDeclaration(node)); - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: const symbol = getSymbolOfDeclaration(node); - return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 277 /* ExportDeclaration */: + return !!symbol && isAliasResolvedToValue( + symbol, + /*excludeTypeOnlyValues*/ + true + ); + case 278 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfDeclaration(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 311 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 312 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node)); return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference); } - function isAliasResolvedToValue(symbol) { + function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) { if (!symbol) { return false; } @@ -83304,7 +83877,12 @@ ${lanes.join("\n")} if (target === unknownSymbol) { return true; } - return !!((getAllSymbolFlags(target) ?? -1) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target)); + return !!(getSymbolFlags( + symbol, + excludeTypeOnlyValues, + /*excludeLocalMeanings*/ + true + ) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target)); } function isConstEnumOrConstEnumOnlyModule(s) { return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; @@ -83318,7 +83896,7 @@ ${lanes.join("\n")} return true; } const target = getSymbolLinks(symbol).aliasTarget; - if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getAllSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { + if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { return true; } } @@ -83380,15 +83958,15 @@ ${lanes.join("\n")} } function canHaveConstantValue(node) { switch (node.kind) { - case 305 /* EnumMember */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 306 /* EnumMember */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 305 /* EnumMember */) { + if (node.kind === 306 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -83588,24 +84166,24 @@ ${lanes.join("\n")} if (symbol) { return filter(getExportSymbolOfValueSymbolIfExported(symbol).declarations, (declaration) => { switch (declaration.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 305 /* EnumMember */: - case 209 /* ObjectLiteralExpression */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 265 /* EnumDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 266 /* ModuleDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 306 /* EnumMember */: + case 210 /* ObjectLiteralExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 266 /* EnumDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 267 /* ModuleDeclaration */: return true; } return false; @@ -83616,7 +84194,7 @@ ${lanes.join("\n")} return void 0; } function isLiteralConstDeclaration(node) { - if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { + if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node)) { return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } return false; @@ -83734,12 +84312,12 @@ ${lanes.join("\n")} getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 177 /* SetAccessor */ ? 176 /* GetAccessor */ : 177 /* SetAccessor */; + const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 177 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 176 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -83760,7 +84338,7 @@ ${lanes.join("\n")} }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 311 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 312 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfDeclaration(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -83795,18 +84373,18 @@ ${lanes.join("\n")} return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 232 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 297 /* HeritageClause */; + return node.parent && node.parent.kind === 233 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 298 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 80 /* Identifier */ && isInTypeQuery(node) || node.kind === 210 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 80 /* Identifier */ && isInTypeQuery(node) || node.kind === 211 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -83849,7 +84427,7 @@ ${lanes.join("\n")} break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 311 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 312 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -83874,7 +84452,7 @@ ${lanes.join("\n")} } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 266 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 267 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker( specifier, specifier, @@ -83884,7 +84462,7 @@ ${lanes.join("\n")} if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 311 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 312 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -84066,11 +84644,11 @@ ${lanes.join("\n")} function checkExternalEmitHelpers(location, helpers) { if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) { const sourceFile = getSourceFileOfNode(location); - if (isEffectiveExternalModule(sourceFile, compilerOptions) && !(location.flags & 16777216 /* Ambient */)) { + if (isEffectiveExternalModule(sourceFile, compilerOptions) && !(location.flags & 33554432 /* Ambient */)) { const helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { const uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (let helper = 1 /* FirstEmitHelper */; helper <= 16777216 /* LastEmitHelper */; helper <<= 1) { + for (let helper = 1 /* FirstEmitHelper */; helper <= 33554432 /* LastEmitHelper */; helper <<= 1) { if (uncheckedHelpers & helper) { for (const name of getHelperNames(helper)) { if (requestedExternalEmitHelperNames.has(name)) @@ -84078,18 +84656,18 @@ ${lanes.join("\n")} requestedExternalEmitHelperNames.add(name); const symbol = resolveSymbol(getSymbol2(getExportsOfModule(helpersModule), escapeLeadingUnderscores(name), 111551 /* Value */)); if (!symbol) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name); } else if (helper & 524288 /* ClassPrivateFieldGet */) { if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 3)) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 4); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 4); } } else if (helper & 1048576 /* ClassPrivateFieldSet */) { if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 4)) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 5); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 5); } } else if (helper & 1024 /* SpreadArray */) { if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 2)) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 3); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 3); } } } @@ -84152,6 +84730,8 @@ ${lanes.join("\n")} return ["__setFunctionName"]; case 16777216 /* PropKey */: return ["__propKey"]; + case 33554432 /* AddDisposableResourceAndDisposeResources */: + return ["__addDisposableResource", "__disposeResources"]; default: return Debug.fail("Unrecognized helper"); } @@ -84170,6 +84750,7 @@ ${lanes.join("\n")} if (isParameter(node) && parameterIsThisKeyword(node)) { return grammarErrorOnFirstToken(node, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters); } + const blockScopeKind = isVariableStatement(node) ? node.declarationList.flags & 7 /* BlockScoped */ : 0 /* None */; let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator; let flags = 0 /* None */; let sawExportBeforeDecorators = false; @@ -84177,12 +84758,12 @@ ${lanes.join("\n")} for (const modifier of node.modifiers) { if (isDecorator(modifier)) { if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - if (node.kind === 173 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { + if (node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); } - } else if (legacyDecorators && (node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */)) { + } else if (legacyDecorators && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */)) { const accessors = getAllAccessorDeclarations(node.parent.members, node); if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -84196,7 +84777,7 @@ ${lanes.join("\n")} const sourceFile = getSourceFileOfNode(modifier); if (!hasParseDiagnostics(sourceFile)) { addRelatedInfo( - error(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), + error2(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), createDiagnosticForNode(firstDecorator, Diagnostics.Decorator_used_before_export_here) ); return true; @@ -84212,29 +84793,29 @@ ${lanes.join("\n")} firstDecorator ?? (firstDecorator = modifier); } else { if (modifier.kind !== 148 /* ReadonlyKeyword */) { - if (node.kind === 170 /* PropertySignature */ || node.kind === 172 /* MethodSignature */) { + if (node.kind === 171 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 180 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); } } if (modifier.kind !== 103 /* InKeyword */ && modifier.kind !== 147 /* OutKeyword */ && modifier.kind !== 87 /* ConstKeyword */) { - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { case 87 /* ConstKeyword */: - if (node.kind !== 265 /* EnumDeclaration */ && node.kind !== 167 /* TypeParameter */) { + if (node.kind !== 266 /* EnumDeclaration */ && node.kind !== 168 /* TypeParameter */) { return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(87 /* ConstKeyword */)); } const parent2 = node.parent; - if (node.kind === 167 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { + if (node.kind === 168 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind)); } break; - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: if (flags & 16384 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); } else if (flags & 2 /* Ambient */) { @@ -84265,7 +84846,7 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); } else if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); - } else if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { if (modifier.kind === 123 /* PrivateKeyword */) { @@ -84287,9 +84868,9 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); - } else if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); @@ -84306,7 +84887,7 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); } else if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); - } else if (node.kind !== 171 /* PropertyDeclaration */) { + } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; @@ -84314,7 +84895,7 @@ ${lanes.join("\n")} case 148 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 180 /* IndexSignature */ && node.kind !== 168 /* Parameter */) { + } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); @@ -84322,8 +84903,8 @@ ${lanes.join("\n")} flags |= 64 /* Readonly */; break; case 95 /* ExportKeyword */: - if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 264 /* TypeAliasDeclaration */ && node.kind !== 263 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later - node.kind !== 266 /* ModuleDeclaration */ && node.parent.kind === 311 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later + node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } if (flags & 1 /* Export */) { @@ -84336,15 +84917,23 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "export"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); } flags |= 1 /* Export */; break; case 90 /* DefaultKeyword */: - const container = node.parent.kind === 311 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 266 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); } else if (!(flags & 1 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); } else if (sawExportBeforeDecorators) { @@ -84361,9 +84950,13 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 267 /* ModuleBlock */) { + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "declare"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "declare"); + } else if (node.parent.flags & 33554432 /* Ambient */ && node.parent.kind === 268 /* ModuleBlock */) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); @@ -84377,12 +84970,12 @@ ${lanes.join("\n")} if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 262 /* ClassDeclaration */ && node.kind !== 184 /* ConstructorType */) { - if (node.kind !== 173 /* MethodDeclaration */ && node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 176 /* GetAccessor */ && node.kind !== 177 /* SetAccessor */) { + if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { + if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 262 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { - const message = node.kind === 171 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; + if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; return grammarErrorOnNode(modifier, message); } if (flags & 32 /* Static */) { @@ -84409,9 +85002,9 @@ ${lanes.join("\n")} case 134 /* AsyncKeyword */: if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); - } else if (flags & 2 /* Ambient */ || node.parent.flags & 16777216 /* Ambient */) { + } else if (flags & 2 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -84424,7 +85017,7 @@ ${lanes.join("\n")} case 147 /* OutKeyword */: const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 167 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + if (node.kind !== 168 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); } if (flags & inOutFlag) { @@ -84438,7 +85031,7 @@ ${lanes.join("\n")} } } } - if (node.kind === 175 /* Constructor */) { + if (node.kind === 176 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -84449,11 +85042,11 @@ ${lanes.join("\n")} return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 271 /* ImportDeclaration */ || node.kind === 270 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -84473,46 +85066,47 @@ ${lanes.join("\n")} } function findFirstIllegalModifier(node) { switch (node.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 266 /* ModuleDeclaration */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 267 /* ModuleDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return void 0; - case 174 /* ClassStaticBlockDeclaration */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 269 /* NamespaceExportDeclaration */: - case 281 /* MissingDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 270 /* NamespaceExportDeclaration */: + case 282 /* MissingDeclaration */: return find(node.modifiers, isModifier); default: - if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return void 0; } switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return findFirstModifierExcept(node, 134 /* AsyncKeyword */); - case 262 /* ClassDeclaration */: - case 184 /* ConstructorType */: + case 263 /* ClassDeclaration */: + case 185 /* ConstructorType */: return findFirstModifierExcept(node, 128 /* AbstractKeyword */); - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 242 /* VariableStatement */: - case 264 /* TypeAliasDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return find(node.modifiers, isModifier); - case 265 /* EnumDeclaration */: + case 243 /* VariableStatement */: + return node.declarationList.flags & 4 /* Using */ ? findFirstModifierExcept(node, 135 /* AwaitKeyword */) : find(node.modifiers, isModifier); + case 266 /* EnumDeclaration */: return findFirstModifierExcept(node, 87 /* ConstKeyword */); default: Debug.assertNever(node); @@ -84528,10 +85122,10 @@ ${lanes.join("\n")} } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -84559,7 +85153,7 @@ ${lanes.join("\n")} if (i !== parameterCount - 1) { return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); } - if (!(parameter.flags & 16777216 /* Ambient */)) { + if (!(parameter.flags & 33554432 /* Ambient */)) { checkGrammarForDisallowedTrailingComma(parameters, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); } if (parameter.questionToken) { @@ -84589,12 +85183,12 @@ ${lanes.join("\n")} if (length(nonSimpleParameters)) { forEach(nonSimpleParameters, (parameter) => { addRelatedInfo( - error(parameter, Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive), + error2(parameter, Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive), createDiagnosticForNode(useStrictDirective, Diagnostics.use_strict_directive_used_here) ); }); const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here) : createDiagnosticForNode(parameter, Diagnostics.and_here)); - addRelatedInfo(error(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2); + addRelatedInfo(error2(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2); return true; } } @@ -84676,7 +85270,7 @@ ${lanes.join("\n")} return checkGrammarForDisallowedTrailingComma(typeArguments) || checkGrammarForAtLeastOneTypeArgument(node, typeArguments); } function checkGrammarTaggedTemplateChain(node) { - if (node.questionDotToken || node.flags & 32 /* OptionalChain */) { + if (node.questionDotToken || node.flags & 64 /* OptionalChain */) { return grammarErrorOnNode(node.template, Diagnostics.Tagged_template_expressions_are_not_permitted_in_an_optional_chain); } return false; @@ -84744,11 +85338,11 @@ ${lanes.join("\n")} return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 225 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { + if (computedPropertyName.expression.kind === 226 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } return false; @@ -84756,9 +85350,9 @@ ${lanes.join("\n")} function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */ || node.kind === 173 /* MethodDeclaration */ + node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */ ); - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } if (!node.body) { @@ -84775,7 +85369,7 @@ ${lanes.join("\n")} function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = /* @__PURE__ */ new Map(); for (const prop of node.properties) { - if (prop.kind === 304 /* SpreadAssignment */) { + if (prop.kind === 305 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -84785,10 +85379,10 @@ ${lanes.join("\n")} continue; } const name = prop.name; - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 303 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 304 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { grammarErrorOnNode(prop.equalsToken, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern); } if (name.kind === 81 /* PrivateIdentifier */) { @@ -84796,7 +85390,7 @@ ${lanes.join("\n")} } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 173 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -84809,8 +85403,8 @@ ${lanes.join("\n")} } let currentKind; switch (prop.kind) { - case 303 /* ShorthandPropertyAssignment */: - case 302 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 9 /* NumericLiteral */) { @@ -84818,13 +85412,13 @@ ${lanes.join("\n")} } currentKind = 4 /* PropertyAssignment */; break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -84861,7 +85455,7 @@ ${lanes.join("\n")} checkGrammarTypeArguments(node, node.typeArguments); const seen = /* @__PURE__ */ new Map(); for (const attr of node.attributes.properties) { - if (attr.kind === 292 /* JsxSpreadAttribute */) { + if (attr.kind === 293 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -84871,7 +85465,7 @@ ${lanes.join("\n")} } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 293 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 294 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -84893,8 +85487,8 @@ ${lanes.join("\n")} if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 249 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { - if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { + if (forInOrOfStatement.kind === 250 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (!(forInOrOfStatement.flags & 65536 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { if (!hasParseDiagnostics(sourceFile)) { @@ -84933,7 +85527,7 @@ ${lanes.join("\n")} if (!hasParseDiagnostics(sourceFile)) { const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); const func = getContainingFunction(forInOrOfStatement); - if (func && func.kind !== 175 /* Constructor */) { + if (func && func.kind !== 176 /* Constructor */) { Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); @@ -84945,11 +85539,11 @@ ${lanes.join("\n")} return false; } } - if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 32768 /* AwaitContext */) && isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { + if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 65536 /* AwaitContext */) && isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 260 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 261 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -84957,16 +85551,16 @@ ${lanes.join("\n")} return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } const firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); } } @@ -84974,7 +85568,7 @@ ${lanes.join("\n")} return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 186 /* TypeLiteral */ && accessor.parent.kind !== 263 /* InterfaceDeclaration */) { + if (!(accessor.flags & 33554432 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 264 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -84989,7 +85583,7 @@ ${lanes.join("\n")} if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 186 /* TypeLiteral */ || accessor.parent.kind === 263 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -84999,10 +85593,10 @@ ${lanes.join("\n")} if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 176 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 177 /* SetAccessor */) { + if (accessor.kind === 178 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -85020,10 +85614,10 @@ ${lanes.join("\n")} return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 176 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 176 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } @@ -85040,7 +85634,7 @@ ${lanes.join("\n")} } } switch (parent2.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: const decl = parent2; if (decl.name.kind !== 80 /* Identifier */) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); @@ -85052,12 +85646,12 @@ ${lanes.join("\n")} return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(parent2) || !hasEffectiveReadonlyModifier(parent2)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); } break; - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (!hasSyntacticModifier(parent2, 64 /* Readonly */)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } @@ -85066,7 +85660,7 @@ ${lanes.join("\n")} return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } } else if (node.operator === 148 /* ReadonlyKeyword */) { - if (node.type.kind !== 187 /* ArrayType */ && node.type.kind !== 188 /* TupleType */) { + if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) { return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(155 /* SymbolKeyword */)); } } @@ -85080,8 +85674,8 @@ ${lanes.join("\n")} if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 173 /* MethodDeclaration */) { - if (node.parent.kind === 209 /* ObjectLiteralExpression */) { + if (node.kind === 174 /* MethodDeclaration */) { + if (node.parent.kind === 210 /* ObjectLiteralExpression */) { if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 134 /* AsyncKeyword */)) { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) { @@ -85100,14 +85694,14 @@ ${lanes.join("\n")} if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) { return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.kind === 173 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 174 /* MethodDeclaration */ && !node.body) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } - } else if (node.parent.kind === 263 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.parent.kind === 186 /* TypeLiteral */) { + } else if (node.parent.kind === 187 /* TypeLiteral */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } } @@ -85118,9 +85712,9 @@ ${lanes.join("\n")} return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 250 /* ContinueStatement */ && !isIterationStatement( + const isMisplacedContinueLabel = node.kind === 251 /* ContinueStatement */ && !isIterationStatement( current.statement, /*lookInLabeledStatements*/ true @@ -85131,8 +85725,8 @@ ${lanes.join("\n")} return false; } break; - case 254 /* SwitchStatement */: - if (node.kind === 251 /* BreakStatement */ && !node.label) { + case 255 /* SwitchStatement */: + if (node.kind === 252 /* BreakStatement */ && !node.label) { return false; } break; @@ -85149,10 +85743,10 @@ ${lanes.join("\n")} current = current.parent; } if (node.label) { - const message = node.kind === 251 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - const message = node.kind === 251 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } } @@ -85172,10 +85766,10 @@ ${lanes.join("\n")} } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 223 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 223 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; + return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -85186,7 +85780,7 @@ ${lanes.join("\n")} const initializer = node.initializer; if (initializer) { const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 112 /* TrueKeyword */ || initializer.kind === 97 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); - const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node); + const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { return grammarErrorOnNode(initializer, Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); @@ -85197,27 +85791,41 @@ ${lanes.join("\n")} } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 248 /* ForInStatement */ && node.parent.parent.kind !== 249 /* ForOfStatement */) { - if (node.flags & 16777216 /* Ambient */) { + const nodeFlags = getCombinedNodeFlagsCached(node); + const blockScopeKind = nodeFlags & 7 /* BlockScoped */; + if (isBindingPattern(node.name)) { + switch (blockScopeKind) { + case 6 /* AwaitUsing */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "await using"); + case 4 /* Using */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "using"); + } + } + if (node.parent.parent.kind !== 249 /* ForInStatement */ && node.parent.parent.kind !== 250 /* ForOfStatement */) { + if (nodeFlags & 33554432 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { if (isBindingPattern(node.name) && !isBindingPattern(node.parent)) { return grammarErrorOnNode(node, Diagnostics.A_destructuring_declaration_must_have_an_initializer); } - if (isVarConst(node)) { - return grammarErrorOnNode(node, Diagnostics.const_declarations_must_be_initialized); + switch (blockScopeKind) { + case 6 /* AwaitUsing */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "await using"); + case 4 /* Using */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "using"); + case 2 /* Const */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "const"); } } } - if (node.exclamationToken && (node.parent.parent.kind !== 242 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 243 /* VariableStatement */ || !node.type || node.initializer || nodeFlags & 33554432 /* Ambient */)) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } - if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 16777216 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { + if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { checkESModuleMarker(node.name); } - const checkLetConstNames = isLet(node) || isVarConst(node); - return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name); + return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name); } function checkESModuleMarker(name) { if (name.kind === 80 /* Identifier */) { @@ -85257,29 +85865,39 @@ ${lanes.join("\n")} if (!declarationList.declarations.length) { return grammarErrorAtPos(declarationList, declarations.pos, declarations.end - declarations.pos, Diagnostics.Variable_declaration_list_cannot_be_empty); } + const blockScopeFlags = declarationList.flags & 7 /* BlockScoped */; + if ((blockScopeFlags === 4 /* Using */ || blockScopeFlags === 6 /* AwaitUsing */) && isForInStatement(declarationList.parent)) { + return grammarErrorOnNode( + declarationList, + blockScopeFlags === 4 /* Using */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration + ); + } + if (blockScopeFlags === 6 /* AwaitUsing */) { + return checkAwaitGrammar(declarationList); + } return false; } function allowLetAndConstDeclarations(parent2) { switch (parent2.kind) { - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return false; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return allowLetAndConstDeclarations(parent2.parent); } return true; } - function checkGrammarForDisallowedLetOrConstStatement(node) { + function checkGrammarForDisallowedBlockScopedVariableStatement(node) { if (!allowLetAndConstDeclarations(node.parent)) { - if (isLet(node.declarationList)) { - return grammarErrorOnNode(node, Diagnostics.let_declarations_can_only_be_declared_inside_a_block); - } else if (isVarConst(node.declarationList)) { - return grammarErrorOnNode(node, Diagnostics.const_declarations_can_only_be_declared_inside_a_block); + const blockScopeKind = getCombinedNodeFlagsCached(node.declarationList) & 7 /* BlockScoped */; + if (blockScopeKind) { + const keyword = blockScopeKind === 1 /* Let */ ? "let" : blockScopeKind === 2 /* Const */ ? "const" : blockScopeKind === 4 /* Using */ ? "using" : blockScopeKind === 6 /* AwaitUsing */ ? "await using" : Debug.fail("Unknown BlockScope flag"); + return grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword); } } } @@ -85368,7 +85986,7 @@ ${lanes.join("\n")} if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 263 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } @@ -85385,23 +86003,23 @@ ${lanes.join("\n")} return grammarErrorOnNode(node.initializer, Diagnostics.A_type_literal_property_cannot_have_an_initializer); } } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { checkAmbientInitializer(node); } - if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & 16777216 /* Ambient */ || isStatic(node) || hasAbstractModifier(node))) { + if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & 33554432 /* Ambient */ || isStatic(node) || hasAbstractModifier(node))) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 263 /* InterfaceDeclaration */ || node.kind === 264 /* TypeAliasDeclaration */ || node.kind === 271 /* ImportDeclaration */ || node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 277 /* ExportDeclaration */ || node.kind === 276 /* ExportAssignment */ || node.kind === 269 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (const decl of file.statements) { - if (isDeclaration(decl) || decl.kind === 242 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 243 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -85410,15 +86028,15 @@ ${lanes.join("\n")} return false; } function checkGrammarSourceFile(node) { - return !!(node.flags & 16777216 /* Ambient */) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); + return !!(node.flags & 33554432 /* Ambient */) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); } function checkGrammarStatementInAmbientContext(node) { - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { const links = getNodeLinks(node); if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 240 /* Block */ || node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + if (node.parent.kind === 241 /* Block */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -85487,7 +86105,7 @@ ${lanes.join("\n")} if (node.isTypeOnly && node.name && node.namedBindings) { return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); } - if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 274 /* NamedImports */) { + if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -85497,7 +86115,7 @@ ${lanes.join("\n")} if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 275 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + specifier.kind === 276 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement ); } }); @@ -85611,17 +86229,37 @@ ${lanes.join("\n")} const name = getPropertyNameForPropertyNameNode(node); return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0; } + function getCombinedModifierFlagsCached(node) { + if (lastGetCombinedModifierFlagsNode === node) { + return lastGetCombinedModifierFlagsResult; + } + lastGetCombinedModifierFlagsNode = node; + lastGetCombinedModifierFlagsResult = getCombinedModifierFlags(node); + return lastGetCombinedModifierFlagsResult; + } + function getCombinedNodeFlagsCached(node) { + if (lastGetCombinedNodeFlagsNode === node) { + return lastGetCombinedNodeFlagsResult; + } + lastGetCombinedNodeFlagsNode = node; + lastGetCombinedNodeFlagsResult = getCombinedNodeFlags(node); + return lastGetCombinedNodeFlagsResult; + } + function isVarConstLike(node) { + const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */; + return blockScopeKind === 2 /* Const */ || blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */; + } } function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 261 /* FunctionDeclaration */ && declaration.kind !== 173 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 262 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -85772,6 +86410,7 @@ ${lanes.join("\n")} CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; CheckMode3[CheckMode3["IsForStringLiteralArgumentCompletions"] = 32] = "IsForStringLiteralArgumentCompletions"; CheckMode3[CheckMode3["RestBindingElement"] = 64] = "RestBindingElement"; + CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly"; return CheckMode3; })(CheckMode || {}); SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => { @@ -85805,13 +86444,13 @@ ${lanes.join("\n")} JsxNames2.IntrinsicClassAttributes = "IntrinsicClassAttributes"; JsxNames2.LibraryManagedAttributes = "LibraryManagedAttributes"; })(JsxNames || (JsxNames = {})); - SymbolTrackerImpl = class { + SymbolTrackerImpl = class _SymbolTrackerImpl { constructor(context, tracker, moduleResolverHost) { this.moduleResolverHost = void 0; this.inner = void 0; this.disableTrackSymbol = false; var _a; - while (tracker instanceof SymbolTrackerImpl) { + while (tracker instanceof _SymbolTrackerImpl) { tracker = tracker.inner; } this.inner = tracker; @@ -86180,21 +86819,21 @@ ${lanes.join("\n")} "use strict"; init_ts2(); visitEachChildTable = { - [165 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [166 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [167 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86203,7 +86842,7 @@ ${lanes.join("\n")} nodeVisitor(node.default, visitor, isTypeNode) ); }, - [168 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86214,14 +86853,14 @@ ${lanes.join("\n")} nodeVisitor(node.initializer, visitor, isExpression) ); }, - [169 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [170 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86230,7 +86869,7 @@ ${lanes.join("\n")} nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertyDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86241,7 +86880,7 @@ ${lanes.join("\n")} nodeVisitor(node.initializer, visitor, isExpression) ); }, - [172 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86252,7 +86891,7 @@ ${lanes.join("\n")} nodeVisitor(node.type, visitor, isTypeNode) ); }, - [173 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86265,7 +86904,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86273,7 +86912,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86283,7 +86922,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86292,7 +86931,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [174 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -86300,7 +86939,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [178 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -86308,7 +86947,7 @@ ${lanes.join("\n")} nodeVisitor(node.type, visitor, isTypeNode) ); }, - [179 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -86316,7 +86955,7 @@ ${lanes.join("\n")} nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86325,7 +86964,7 @@ ${lanes.join("\n")} ); }, // Types - [181 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -86333,14 +86972,14 @@ ${lanes.join("\n")} nodeVisitor(node.type, visitor, isTypeNode) ); }, - [182 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [183 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -86348,7 +86987,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [184 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86357,56 +86996,56 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [185 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [186 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [187 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [188 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [189 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [190 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [191 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [192 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -86415,13 +87054,13 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [194 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [204 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -86431,14 +87070,14 @@ ${lanes.join("\n")} node.isTypeOf ); }, - [301 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [201 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -86447,26 +87086,26 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [195 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [197 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [198 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [199 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -86477,20 +87116,20 @@ ${lanes.join("\n")} nodesVisitor(node.members, visitor, isTypeElement) ); }, - [200 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [202 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [203 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -86498,19 +87137,19 @@ ${lanes.join("\n")} ); }, // Binding patterns - [205 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [206 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [207 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -86520,19 +87159,19 @@ ${lanes.join("\n")} ); }, // Expression - [208 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [209 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [210 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86544,7 +87183,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [211 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86556,7 +87195,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [212 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86570,7 +87209,7 @@ ${lanes.join("\n")} nodesVisitor(node.arguments, visitor, isExpression) ); }, - [213 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86578,7 +87217,7 @@ ${lanes.join("\n")} nodesVisitor(node.arguments, visitor, isExpression) ); }, - [214 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -86586,20 +87225,20 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [215 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [216 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [217 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86611,7 +87250,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [218 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86622,43 +87261,43 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [220 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [220 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [222 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [223 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [224 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [225 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [226 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -86666,7 +87305,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [226 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -86676,27 +87315,27 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [227 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [228 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [229 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [229 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [230 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [230 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86706,28 +87345,28 @@ ${lanes.join("\n")} nodesVisitor(node.members, visitor, isClassElement) ); }, - [232 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [233 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [237 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [238 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [234 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [235 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -86736,14 +87375,14 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [235 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [238 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86751,26 +87390,26 @@ ${lanes.join("\n")} ); }, // Element - [240 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [241 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [242 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [243 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [243 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [244 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86778,21 +87417,21 @@ ${lanes.join("\n")} nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [245 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [246 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [247 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -86801,7 +87440,7 @@ ${lanes.join("\n")} visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -86809,7 +87448,7 @@ ${lanes.join("\n")} visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [250 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -86818,52 +87457,52 @@ ${lanes.join("\n")} visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [251 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [252 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [253 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [254 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [255 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [256 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [257 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -86871,7 +87510,7 @@ ${lanes.join("\n")} nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [259 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [260 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -86880,13 +87519,13 @@ ${lanes.join("\n")} nodeVisitor(node.initializer, visitor, isExpression) ); }, - [260 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [261 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [261 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [262 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86898,7 +87537,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [262 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [263 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86908,7 +87547,7 @@ ${lanes.join("\n")} nodesVisitor(node.members, visitor, isClassElement) ); }, - [263 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86918,7 +87557,7 @@ ${lanes.join("\n")} nodesVisitor(node.members, visitor, isTypeElement) ); }, - [264 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86927,7 +87566,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [265 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86935,7 +87574,7 @@ ${lanes.join("\n")} nodesVisitor(node.members, visitor, isEnumMember) ); }, - [266 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86943,25 +87582,25 @@ ${lanes.join("\n")} nodeVisitor(node.body, visitor, isModuleBody) ); }, - [267 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [268 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [268 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [269 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [269 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [270 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [270 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86970,7 +87609,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [271 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86979,21 +87618,21 @@ ${lanes.join("\n")} nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [299 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [300 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [272 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -87001,25 +87640,25 @@ ${lanes.join("\n")} nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [273 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [279 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [280 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [274 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [275 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [275 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -87027,14 +87666,14 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [276 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [277 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -87044,13 +87683,13 @@ ${lanes.join("\n")} nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [278 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [280 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -87059,14 +87698,14 @@ ${lanes.join("\n")} ); }, // Module references - [282 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [283 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -87074,7 +87713,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [284 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -87082,7 +87721,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [285 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -87090,20 +87729,20 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [286 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [294 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxNamespacedName( node, Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [287 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [288 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -87111,52 +87750,52 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [290 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isJsxAttributeName)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [291 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [292 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [292 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [293 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [295 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [296 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [297 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [297 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [298 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -87164,28 +87803,28 @@ ${lanes.join("\n")} ); }, // Property assignments - [302 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [303 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [304 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [305 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [305 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -87193,20 +87832,20 @@ ${lanes.join("\n")} ); }, // Top-level nodes - [311 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [312 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [359 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [360 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [360 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [361 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -87499,13 +88138,13 @@ ${lanes.join("\n")} let sourceLine = 0; let sourceCharacter = 0; let nameIndex = 0; - let error; + let error2; return { get pos() { return pos; }, get error() { - return error; + return error2; }, get state() { return captureMapping( @@ -87590,8 +88229,8 @@ ${lanes.join("\n")} return { value: void 0, done: true }; } function setError(message) { - if (error === void 0) { - error = message; + if (error2 === void 0) { + error2 = message; } } function setErrorAndStopIterating(message) { @@ -87599,7 +88238,7 @@ ${lanes.join("\n")} return stopIterating(); } function hasReportedError() { - return error !== void 0; + return error2 !== void 0; } function isSourceMappingSegmentEnd() { return pos === mappings.length || mappings.charCodeAt(pos) === 44 /* comma */ || mappings.charCodeAt(pos) === 59 /* semicolon */; @@ -87807,7 +88446,7 @@ ${lanes.join("\n")} function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 311 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 312 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -87837,9 +88476,11 @@ ${lanes.join("\n")} function getImportNeedsImportDefaultHelper(node) { return !getImportNeedsImportStarHelper(node) && (isDefaultImport(node) || !!node.importClause && isNamedImports(node.importClause.namedBindings) && containsDefaultReference(node.importClause.namedBindings)); } - function collectExternalModuleInfo(context, sourceFile, resolver, compilerOptions) { + function collectExternalModuleInfo(context, sourceFile) { + const resolver = context.getEmitResolver(); + const compilerOptions = context.getCompilerOptions(); const externalImports = []; - const exportSpecifiers = createMultiMap(); + const exportSpecifiers = new IdentifierNameMultiMap(); const exportedBindings = []; const uniqueExports = /* @__PURE__ */ new Map(); let exportedNames; @@ -87850,7 +88491,7 @@ ${lanes.join("\n")} let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -87859,12 +88500,12 @@ ${lanes.join("\n")} hasImportDefault = true; } break; - case 270 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 282 /* ExternalModuleReference */) { + case 271 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 283 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -87887,19 +88528,19 @@ ${lanes.join("\n")} addExportedNamesForExportDeclaration(node); } break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings); } } break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -87916,7 +88557,7 @@ ${lanes.join("\n")} } } break; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -87945,7 +88586,7 @@ ${lanes.join("\n")} if (!uniqueExports.get(idText(specifier.name))) { const name = specifier.propertyName || specifier.name; if (!node.moduleSpecifier) { - exportSpecifiers.add(idText(name), specifier); + exportSpecifiers.add(name, specifier); } const decl = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); if (decl) { @@ -88035,14 +88676,23 @@ ${lanes.join("\n")} const expression = skipParentheses(statement.expression); return isSuperCall(expression) ? expression : void 0; } - function findSuperStatementIndex(statements, indexAfterLastPrologueStatement) { - for (let i = indexAfterLastPrologueStatement; i < statements.length; i += 1) { + function findSuperStatementIndexPathWorker(statements, start, indices) { + for (let i = start; i < statements.length; i += 1) { const statement = statements[i]; if (getSuperCallFromStatement(statement)) { - return i; + indices.unshift(i); + return true; + } else if (isTryStatement(statement) && findSuperStatementIndexPathWorker(statement.tryBlock.statements, 0, indices)) { + indices.unshift(i); + return true; } } - return -1; + return false; + } + function findSuperStatementIndexPath(statements, start) { + const indices = []; + findSuperStatementIndexPathWorker(statements, start, indices); + return indices; } function getProperties(node, requireInitializer, isStatic2) { return filter(node.members, (m) => isInitializedOrStaticProperty(m, requireInitializer, isStatic2)); @@ -88060,7 +88710,7 @@ ${lanes.join("\n")} return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 171 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -88097,15 +88747,15 @@ ${lanes.join("\n")} } function getAllDecoratorsOfClassElement(member, parent2, useLegacyDecorators) { switch (member.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (!useLegacyDecorators) { return getAllDecoratorsOfMethod(member); } return getAllDecoratorsOfAccessors(member, parent2); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -88177,10 +88827,90 @@ ${lanes.join("\n")} function accessPrivateIdentifier(env, name) { return walkUpLexicalEnvironments(env, (env2) => getPrivateIdentifier(env2.privateEnv, name)); } + var IdentifierNameMap, IdentifierNameMultiMap; var init_utilities3 = __esm({ "src/compiler/transformers/utilities.ts"() { "use strict"; init_ts2(); + IdentifierNameMap = class _IdentifierNameMap { + constructor() { + this._map = /* @__PURE__ */ new Map(); + } + get size() { + return this._map.size; + } + has(key) { + return this._map.has(_IdentifierNameMap.toKey(key)); + } + get(key) { + return this._map.get(_IdentifierNameMap.toKey(key)); + } + set(key, value) { + this._map.set(_IdentifierNameMap.toKey(key), value); + return this; + } + delete(key) { + var _a; + return ((_a = this._map) == null ? void 0 : _a.delete(_IdentifierNameMap.toKey(key))) ?? false; + } + clear() { + this._map.clear(); + } + values() { + return this._map.values(); + } + static toKey(name) { + if (isGeneratedPrivateIdentifier(name) || isGeneratedIdentifier(name)) { + const autoGenerate = name.emitNode.autoGenerate; + if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) { + const node = getNodeForGeneratedName(name); + const baseName = isMemberName(node) && node !== name ? _IdentifierNameMap.toKey(node) : `(generated@${getNodeId(node)})`; + return formatGeneratedName( + /*privateName*/ + false, + autoGenerate.prefix, + baseName, + autoGenerate.suffix, + _IdentifierNameMap.toKey + ); + } else { + const baseName = `(auto@${autoGenerate.id})`; + return formatGeneratedName( + /*privateName*/ + false, + autoGenerate.prefix, + baseName, + autoGenerate.suffix, + _IdentifierNameMap.toKey + ); + } + } + if (isPrivateIdentifier(name)) { + return idText(name).slice(1); + } + return idText(name); + } + }; + IdentifierNameMultiMap = class extends IdentifierNameMap { + add(key, value) { + let values = this.get(key); + if (values) { + values.push(value); + } else { + this.set(key, values = [value]); + } + return values; + } + remove(key, value) { + const values = this.get(key); + if (values) { + unorderedRemoveItem(values, value); + if (!values.length) { + this.delete(key); + } + } + } + }; } }); @@ -88652,6 +89382,287 @@ ${lanes.join("\n")} } }); + // src/compiler/transformers/classThis.ts + function createClassThisAssignmentBlock(factory2, classThis, thisExpression = factory2.createThis()) { + const expression = factory2.createAssignment(classThis, thisExpression); + const statement = factory2.createExpressionStatement(expression); + const body = factory2.createBlock( + [statement], + /*multiLine*/ + false + ); + const block = factory2.createClassStaticBlockDeclaration(body); + getOrCreateEmitNode(block).classThis = classThis; + return block; + } + function isClassThisAssignmentBlock(node) { + var _a; + if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { + return false; + } + const statement = node.body.statements[0]; + return isExpressionStatement(statement) && isAssignmentExpression( + statement.expression, + /*excludeCompoundAssignment*/ + true + ) && isIdentifier(statement.expression.left) && ((_a = node.emitNode) == null ? void 0 : _a.classThis) === statement.expression.left && statement.expression.right.kind === 110 /* ThisKeyword */; + } + function classHasClassThisAssignment(node) { + var _a; + return !!((_a = node.emitNode) == null ? void 0 : _a.classThis) && some(node.members, isClassThisAssignmentBlock); + } + function injectClassThisAssignmentIfMissing(factory2, node, classThis, thisExpression) { + if (classHasClassThisAssignment(node)) { + return node; + } + const staticBlock = createClassThisAssignmentBlock(factory2, classThis, thisExpression); + if (node.name) { + setSourceMapRange(staticBlock.body.statements[0], node.name); + } + const members = factory2.createNodeArray([staticBlock, ...node.members]); + setTextRange(members, node.members); + const updatedNode = isClassDeclaration(node) ? factory2.updateClassDeclaration( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ) : factory2.updateClassExpression( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ); + getOrCreateEmitNode(updatedNode).classThis = classThis; + return updatedNode; + } + var init_classThis = __esm({ + "src/compiler/transformers/classThis.ts"() { + "use strict"; + init_ts2(); + } + }); + + // src/compiler/transformers/namedEvaluation.ts + function getAssignedNameOfIdentifier(factory2, name, expression) { + const original = getOriginalNode(skipOuterExpressions(expression)); + if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 1024 /* Default */)) { + return factory2.createStringLiteral("default"); + } + return factory2.createStringLiteralFromNode(name); + } + function getAssignedNameOfPropertyName(context, name, assignedNameText) { + const { factory: factory2 } = context; + if (assignedNameText !== void 0) { + const assignedName2 = factory2.createStringLiteral(assignedNameText); + return { assignedName: assignedName2, name }; + } + if (isPropertyNameLiteral(name) || isPrivateIdentifier(name)) { + const assignedName2 = factory2.createStringLiteralFromNode(name); + return { assignedName: assignedName2, name }; + } + if (isPropertyNameLiteral(name.expression) && !isIdentifier(name.expression)) { + const assignedName2 = factory2.createStringLiteralFromNode(name.expression); + return { assignedName: assignedName2, name }; + } + const assignedName = factory2.getGeneratedNameForNode(name); + context.hoistVariableDeclaration(assignedName); + const key = context.getEmitHelperFactory().createPropKeyHelper(name.expression); + const assignment = factory2.createAssignment(assignedName, key); + const updatedName = factory2.updateComputedPropertyName(name, assignment); + return { assignedName, name: updatedName }; + } + function createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression = context.factory.createThis()) { + const { factory: factory2 } = context; + const expression = context.getEmitHelperFactory().createSetFunctionNameHelper(thisExpression, assignedName); + const statement = factory2.createExpressionStatement(expression); + const body = factory2.createBlock( + [statement], + /*multiLine*/ + false + ); + const block = factory2.createClassStaticBlockDeclaration(body); + getOrCreateEmitNode(block).assignedName = assignedName; + return block; + } + function isClassNamedEvaluationHelperBlock(node) { + var _a; + if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { + return false; + } + const statement = node.body.statements[0]; + return isExpressionStatement(statement) && isCallToHelper(statement.expression, "___setFunctionName") && statement.expression.arguments.length >= 2 && statement.expression.arguments[1] === ((_a = node.emitNode) == null ? void 0 : _a.assignedName); + } + function classHasExplicitlyAssignedName(node) { + var _a; + return !!((_a = node.emitNode) == null ? void 0 : _a.assignedName) && some(node.members, isClassNamedEvaluationHelperBlock); + } + function classHasDeclaredOrExplicitlyAssignedName(node) { + return !!node.name || classHasExplicitlyAssignedName(node); + } + function injectClassNamedEvaluationHelperBlockIfMissing(context, node, assignedName, thisExpression) { + if (classHasExplicitlyAssignedName(node)) { + return node; + } + const { factory: factory2 } = context; + const namedEvaluationBlock = createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression); + if (node.name) { + setSourceMapRange(namedEvaluationBlock.body.statements[0], node.name); + } + const insertionIndex = findIndex(node.members, isClassThisAssignmentBlock) + 1; + const leading = node.members.slice(0, insertionIndex); + const trailing = node.members.slice(insertionIndex); + const members = factory2.createNodeArray([...leading, namedEvaluationBlock, ...trailing]); + setTextRange(members, node.members); + node = isClassDeclaration(node) ? factory2.updateClassDeclaration( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ) : factory2.updateClassExpression( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ); + getOrCreateEmitNode(node).assignedName = assignedName; + return node; + } + function finishTransformNamedEvaluation(context, expression, assignedName, ignoreEmptyStringLiteral) { + if (ignoreEmptyStringLiteral && isStringLiteral(assignedName) && isEmptyStringLiteral(assignedName)) { + return expression; + } + const { factory: factory2 } = context; + const innerExpression = skipOuterExpressions(expression); + const updatedExpression = isClassExpression(innerExpression) ? cast(injectClassNamedEvaluationHelperBlockIfMissing(context, innerExpression, assignedName), isClassExpression) : context.getEmitHelperFactory().createSetFunctionNameHelper(innerExpression, assignedName); + return factory2.restoreOuterExpressions(expression, updatedExpression); + } + function transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updatePropertyAssignment( + node, + name, + initializer + ); + } + function transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.objectAssignmentInitializer); + const objectAssignmentInitializer = finishTransformNamedEvaluation(context, node.objectAssignmentInitializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateShorthandPropertyAssignment( + node, + node.name, + objectAssignmentInitializer + ); + } + function transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateVariableDeclaration( + node, + node.name, + node.exclamationToken, + node.type, + initializer + ); + } + function transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateParameterDeclaration( + node, + node.modifiers, + node.dotDotDotToken, + node.name, + node.questionToken, + node.type, + initializer + ); + } + function transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateBindingElement( + node, + node.dotDotDotToken, + node.propertyName, + node.name, + initializer + ); + } + function transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updatePropertyDeclaration( + node, + node.modifiers, + name, + node.questionToken ?? node.exclamationToken, + node.type, + initializer + ); + } + function transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.left, node.right); + const right = finishTransformNamedEvaluation(context, node.right, assignedName, ignoreEmptyStringLiteral); + return factory2.updateBinaryExpression( + node, + node.left, + node.operatorToken, + right + ); + } + function transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : factory2.createStringLiteral(node.isExportEquals ? "" : "default"); + const expression = finishTransformNamedEvaluation(context, node.expression, assignedName, ignoreEmptyStringLiteral); + return factory2.updateExportAssignment( + node, + node.modifiers, + expression + ); + } + function transformNamedEvaluation(context, node, ignoreEmptyStringLiteral, assignedName) { + switch (node.kind) { + case 303 /* PropertyAssignment */: + return transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedName); + case 304 /* ShorthandPropertyAssignment */: + return transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedName); + case 260 /* VariableDeclaration */: + return transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 169 /* Parameter */: + return transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 208 /* BindingElement */: + return transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedName); + case 172 /* PropertyDeclaration */: + return transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 226 /* BinaryExpression */: + return transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedName); + case 277 /* ExportAssignment */: + return transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedName); + } + } + var init_namedEvaluation = __esm({ + "src/compiler/transformers/namedEvaluation.ts"() { + "use strict"; + init_ts2(); + } + }); + // src/compiler/transformers/taggedTemplate.ts function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) { const tag = visitNode(node.tag, visitor, isExpression); @@ -88750,8 +89761,8 @@ ${lanes.join("\n")} const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -88762,14 +89773,14 @@ ${lanes.join("\n")} let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 312 /* Bundle */) { + if (node.kind === 313 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 314 /* InputFiles */) { + if (prepend.kind === 315 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -88800,22 +89811,22 @@ ${lanes.join("\n")} } function onBeforeVisitNode(node) { switch (node.kind) { - case 311 /* SourceFile */: - case 268 /* CaseBlock */: - case 267 /* ModuleBlock */: - case 240 /* Block */: + case 312 /* SourceFile */: + case 269 /* CaseBlock */: + case 268 /* ModuleBlock */: + case 241 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 262 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -88834,10 +89845,10 @@ ${lanes.join("\n")} } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -88852,13 +89863,13 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -88868,7 +89879,7 @@ ${lanes.join("\n")} return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 277 /* ExportDeclaration */ || node.kind === 271 /* ImportDeclaration */ || node.kind === 272 /* ImportClause */ || node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -88880,21 +89891,21 @@ ${lanes.join("\n")} } function classElementVisitorWorker(node, parent2) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructor(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent2); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return node; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -88905,15 +89916,15 @@ ${lanes.join("\n")} } function objectLiteralElementVisitorWorker(node, parent2) { switch (node.kind) { - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return visitor(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); default: return Debug.failBadSyntaxKind(node); @@ -88947,19 +89958,19 @@ ${lanes.join("\n")} case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: case 128 /* AbstractKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 87 /* ConstKeyword */: case 138 /* DeclareKeyword */: case 148 /* ReadonlyKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: - case 187 /* ArrayType */: - case 188 /* TupleType */: - case 189 /* OptionalType */: - case 190 /* RestType */: - case 186 /* TypeLiteral */: - case 181 /* TypePredicate */: - case 167 /* TypeParameter */: + case 188 /* ArrayType */: + case 189 /* TupleType */: + case 190 /* OptionalType */: + case 191 /* RestType */: + case 187 /* TypeLiteral */: + case 182 /* TypePredicate */: + case 168 /* TypeParameter */: case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 136 /* BooleanKeyword */: @@ -88968,80 +89979,80 @@ ${lanes.join("\n")} case 146 /* NeverKeyword */: case 116 /* VoidKeyword */: case 155 /* SymbolKeyword */: - case 184 /* ConstructorType */: - case 183 /* FunctionType */: - case 185 /* TypeQuery */: - case 182 /* TypeReference */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 193 /* ConditionalType */: - case 195 /* ParenthesizedType */: - case 196 /* ThisType */: - case 197 /* TypeOperator */: - case 198 /* IndexedAccessType */: - case 199 /* MappedType */: - case 200 /* LiteralType */: - case 180 /* IndexSignature */: + case 185 /* ConstructorType */: + case 184 /* FunctionType */: + case 186 /* TypeQuery */: + case 183 /* TypeReference */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 194 /* ConditionalType */: + case 196 /* ParenthesizedType */: + case 197 /* ThisType */: + case 198 /* TypeOperator */: + case 199 /* IndexedAccessType */: + case 200 /* MappedType */: + case 201 /* LiteralType */: + case 181 /* IndexSignature */: return void 0; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return void 0; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return visitHeritageClause(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return visitArrowFunction(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return visitAssertionExpression(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return visitNonNullExpression(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -89151,25 +90162,25 @@ ${lanes.join("\n")} insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); const iife = factory2.createImmediatelyInvokedArrowFunction(statements); setInternalEmitFlags(iife, 1 /* TypeScriptClassWrapper */); - const modifiers2 = facts & 16 /* IsNamedExternalExport */ ? factory2.createModifiersFromModifierFlags(1 /* Export */) : void 0; + const varDecl = factory2.createVariableDeclaration( + factory2.getLocalName( + node, + /*allowComments*/ + false, + /*allowSourceMaps*/ + false + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + iife + ); + setOriginalNode(varDecl, node); const varStatement = factory2.createVariableStatement( - modifiers2, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - false - ), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - iife - ) - ], 1 /* Let */) + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([varDecl], 1 /* Let */) ); setOriginalNode(varStatement, node); setCommentRange(varStatement, node); @@ -89198,10 +90209,10 @@ ${lanes.join("\n")} )) ]; } - if (facts & 16 /* IsNamedExternalExport */ && !promoteToIIFE) { + if (facts & 16 /* IsNamedExternalExport */) { return [ statement, - factory2.createExternalModuleExport(factory2.getLocalName( + factory2.createExternalModuleExport(factory2.getDeclarationName( node, /*allowComments*/ false, @@ -89365,19 +90376,19 @@ ${lanes.join("\n")} } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 171 /* PropertyDeclaration */; + return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 173 /* MethodDeclaration */; + return node.kind === 174 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; } return false; @@ -89426,7 +90437,7 @@ ${lanes.join("\n")} return !nodeIsMissing(node.body); } function visitPropertyDeclaration(node, parent2) { - const isAmbient = node.flags & 16777216 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); + const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); if (isAmbient && !(legacyDecorators && hasDecorators(node))) { return void 0; } @@ -89468,6 +90479,35 @@ ${lanes.join("\n")} transformConstructorBody(node.body, node) ); } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } function transformConstructorBody(body, constructor) { const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor)); if (!some(parametersWithPropertyAssignments)) { @@ -89482,25 +90522,22 @@ ${lanes.join("\n")} false, visitor ); - const superStatementIndex = findSuperStatementIndex(body.statements, prologueStatementCount); - if (superStatementIndex >= 0) { - addRange( + const superPath = findSuperStatementIndexPath(body.statements, prologueStatementCount); + const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment); + if (superPath.length) { + transformConstructorBodyWorker( statements, - visitNodes2(body.statements, visitor, isStatement, prologueStatementCount, superStatementIndex + 1 - prologueStatementCount) + body.statements, + prologueStatementCount, + superPath, + /*superPathDepth*/ + 0, + parameterPropertyAssignments ); - } - const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment); - if (superStatementIndex >= 0) { - addRange(statements, parameterPropertyAssignments); } else { - statements = [ - ...statements.slice(0, prologueStatementCount), - ...parameterPropertyAssignments, - ...statements.slice(prologueStatementCount) - ]; + addRange(statements, parameterPropertyAssignments); + addRange(statements, visitNodes2(body.statements, visitor, isStatement, prologueStatementCount)); } - const start = superStatementIndex >= 0 ? superStatementIndex + 1 : prologueStatementCount; - addRange(statements, visitNodes2(body.statements, visitor, isStatement, start)); statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); const block = factory2.createBlock( setTextRange(factory2.createNodeArray(statements), body.statements), @@ -89996,7 +91033,7 @@ ${lanes.join("\n")} /*allowSourceMaps*/ true )); - const varFlags = currentLexicalScope.kind === 311 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; + const varFlags = currentLexicalScope.kind === 312 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; const statement = factory2.createVariableStatement( visitNodes2(node.modifiers, modifierVisitor, isModifier), factory2.createVariableDeclarationList([varDecl], varFlags) @@ -90007,7 +91044,7 @@ ${lanes.join("\n")} setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 265 /* EnumDeclaration */) { + if (node.kind === 266 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -90115,7 +91152,7 @@ ${lanes.join("\n")} let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 267 /* ModuleBlock */) { + if (node.body.kind === 268 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -90146,13 +91183,13 @@ ${lanes.join("\n")} true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 267 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 268 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 266 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -90187,7 +91224,7 @@ ${lanes.join("\n")} ) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 273 /* NamespaceImport */) { + if (node.kind === 274 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.verbatimModuleSyntax || compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -90385,15 +91422,15 @@ ${lanes.join("\n")} if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(266 /* ModuleDeclaration */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(267 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 266 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 267 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 265 /* EnumDeclaration */; + return getOriginalNode(node).kind === 266 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -90438,9 +91475,9 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -90455,8 +91492,8 @@ ${lanes.join("\n")} /*prefixLocals*/ false ); - if (container && container.kind !== 311 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 266 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 265 /* EnumDeclaration */; + if (container && container.kind !== 312 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 267 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 266 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -90481,7 +91518,7 @@ ${lanes.join("\n")} const constantValue = tryGetConstEnumValue(node); if (constantValue !== void 0) { setConstantValue(node, constantValue); - const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : factory2.createNumericLiteral(constantValue); + const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue); if (!compilerOptions.removeComments) { const originalNode = getOriginalNode(node, isAccessExpression); addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `); @@ -90544,8 +91581,9 @@ ${lanes.join("\n")} let pendingStatements; let lexicalEnvironment; const lexicalEnvironmentMap = /* @__PURE__ */ new Map(); + const noSubstitution = /* @__PURE__ */ new Set(); let currentClassContainer; - let currentStaticPropertyDeclarationOrStaticBlock; + let currentClassElement; let shouldSubstituteThisWithClassThis = false; let previousShouldSubstituteThisWithClassThis = false; return chainBundle(context, transformSourceFile); @@ -90577,76 +91615,77 @@ ${lanes.join("\n")} switch (node.kind) { case 129 /* AccessorKeyword */: return Debug.fail("Use `modifierVisitor` instead."); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: - return visitClassExpression( - node, - /*referencedName*/ - void 0 - ); - case 174 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: + case 231 /* ClassExpression */: + return visitClassExpression(node); + case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: return Debug.fail("Use `classElementVisitor` instead."); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return visitBindingElement(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); case 81 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ + case 110 /* ThisKeyword */: + return visitThisExpression(node); + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + return setCurrentClassElementAnd( + /*classElement*/ void 0, fallbackVisitor, node ); + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { + return setCurrentClassElementAnd( + node, + fallbackVisitor, + node + ); } default: return fallbackVisitor(node); @@ -90655,56 +91694,32 @@ ${lanes.join("\n")} function fallbackVisitor(node) { return visitEachChild(node, visitor, context); } - function namedEvaluationVisitor(node, referencedName) { - switch (node.kind) { - case 359 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 216 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 230 /* ClassExpression */: - return visitClassExpression(node, referencedName); - default: - return visitor(node); - } - } function discardedValueVisitor(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - true, - /*referencedName*/ - void 0 + true ); default: return visitor(node); @@ -90712,9 +91727,9 @@ ${lanes.join("\n")} } function heritageClauseVisitor(node) { switch (node.kind) { - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -90722,8 +91737,8 @@ ${lanes.join("\n")} } function assignmentTargetVisitor(node) { switch (node.kind) { - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -90731,29 +91746,35 @@ ${lanes.join("\n")} } function classElementVisitor(node) { switch (node.kind) { - case 175 /* Constructor */: - return visitConstructorDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ - void 0, + case 176 /* Constructor */: + return setCurrentClassElementAnd( + node, + visitConstructorDeclaration, + node + ); + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + return setCurrentClassElementAnd( + node, visitMethodOrAccessorDeclaration, node ); - case 171 /* PropertyDeclaration */: - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ - void 0, + case 172 /* PropertyDeclaration */: + return setCurrentClassElementAnd( + node, visitPropertyDeclaration, node ); - case 174 /* ClassStaticBlockDeclaration */: - return visitClassStaticBlockDeclaration(node); - case 166 /* ComputedPropertyName */: + case 175 /* ClassStaticBlockDeclaration */: + return setCurrentClassElementAnd( + node, + visitClassStaticBlockDeclaration, + node + ); + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return node; default: return isModifierLike(node) ? modifierVisitor(node) : visitor(node); @@ -90761,7 +91782,7 @@ ${lanes.join("\n")} } function propertyNameVisitor(node) { switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); default: return visitor(node); @@ -90769,10 +91790,10 @@ ${lanes.join("\n")} } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -90801,9 +91822,7 @@ ${lanes.join("\n")} } function visitPropertyAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updatePropertyAssignment(node, name, initializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } @@ -90815,71 +91834,33 @@ ${lanes.join("\n")} pendingStatements = savedPendingStatements; return statement; } - function getAssignedNameOfIdentifier(name, initializer) { - const originalClass = getOriginalNode(initializer, isClassLike); - return originalClass && !originalClass.name && hasSyntacticModifier(originalClass, 1024 /* Default */) ? factory2.createStringLiteral("default") : factory2.createStringLiteralFromNode(name); - } function visitVariableDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateVariableDeclaration( - node, - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitParameterDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitBindingElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const propertyName = visitNode(node.propertyName, visitor, isPropertyName); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBindingElement( - node, - /*dotDotDotToken*/ - void 0, - propertyName, - name, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitExportAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = factory2.createStringLiteral(node.isExportEquals ? "" : "default"); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const expression = visitNode(node.expression, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateExportAssignment(node, modifiers, expression); + node = transformNamedEvaluation( + context, + node, + /*ignoreEmptyStringLiteral*/ + true, + node.isExportEquals ? "" : "default" + ); } return visitEachChild(node, visitor, context); } @@ -90944,12 +91925,15 @@ ${lanes.join("\n")} } return void 0; } - function setCurrentStaticPropertyDeclarationOrStaticBlockAnd(current, visitor2, arg) { - const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; - currentStaticPropertyDeclarationOrStaticBlock = current; - const result = visitor2(arg); - currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock; - return result; + function setCurrentClassElementAnd(classElement, visitor2, arg) { + if (classElement !== currentClassElement) { + const savedCurrentClassElement = currentClassElement; + currentClassElement = classElement; + const result = visitor2(arg); + currentClassElement = savedCurrentClassElement; + return result; + } + return visitor2(arg); } function getHoistedFunctionName(node) { Debug.assert(isPrivateIdentifier(node.name)); @@ -90967,6 +91951,11 @@ ${lanes.join("\n")} } } } + function getClassThis() { + const lex = getClassLexicalEnvironment(); + const classThis = lex.classThis ?? lex.classConstructor ?? (currentClassContainer == null ? void 0 : currentClassContainer.name); + return Debug.checkDefined(classThis); + } function transformAutoAccessor(node) { const commentRange = getCommentRange(node); const sourceMapRange = getSourceMapRange(node); @@ -90993,11 +91982,13 @@ ${lanes.join("\n")} setOriginalNode(backingField, node); setEmitFlags(backingField, 3072 /* NoComments */); setSourceMapRange(backingField, sourceMapRange); - const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName); + const receiver = isStatic(node) ? getClassThis() : factory2.createThis(); + const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName, receiver); setOriginalNode(getter, node); setCommentRange(getter, commentRange); setSourceMapRange(getter, sourceMapRange); - const setter = createAccessorPropertySetRedirector(factory2, node, modifiers, setterName); + const setterModifiers = factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers)); + const setter = createAccessorPropertySetRedirector(factory2, node, setterModifiers, setterName, receiver); setOriginalNode(setter, node); setEmitFlags(setter, 3072 /* NoComments */); setSourceMapRange(setter, sourceMapRange); @@ -91036,17 +92027,7 @@ ${lanes.join("\n")} ); } if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - return factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - name, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, (child) => namedEvaluationVisitor(child, referencedName), isExpression) - ); + node = transformNamedEvaluation(context, node); } return factory2.updatePropertyDeclaration( node, @@ -91064,9 +92045,7 @@ ${lanes.join("\n")} const expr = getPropertyNameExpressionIfNeeded( node.name, /*shouldHoist*/ - !!node.initializer || useDefineForClassFields, - /*captureReferencedName*/ - isNamedEvaluation(node, isAnonymousClassNeedingAssignedName) + !!node.initializer || useDefineForClassFields ); if (expr) { getPendingExpressions().push(...flattenCommaList(expr)); @@ -91111,8 +92090,21 @@ ${lanes.join("\n")} } return transformFieldInitializer(node); } + function shouldForceDynamicThis() { + return !!currentClassElement && hasStaticModifier(currentClassElement) && isAccessor(currentClassElement) && isAutoAccessorPropertyDeclaration(getOriginalNode(currentClassElement)); + } + function ensureDynamicThisIfNeeded(node) { + if (shouldForceDynamicThis()) { + const innerExpression = skipOuterExpressions(node); + if (innerExpression.kind === 110 /* ThisKeyword */) { + noSubstitution.add(innerExpression); + } + } + } function createPrivateIdentifierAccess(info, receiver) { - return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression)); + receiver = visitNode(receiver, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); + return createPrivateIdentifierAccessHelper(info, receiver); } function createPrivateIdentifierAccessHelper(info, receiver) { setCommentRange(receiver, moveRangePos(receiver, -1)); @@ -91157,7 +92149,7 @@ ${lanes.join("\n")} ); } } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && isIdentifier(node.name) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isIdentifier(node.name) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -91176,7 +92168,7 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitElementAccessExpression(node) { - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -91201,6 +92193,7 @@ ${lanes.join("\n")} let info; if (info = accessPrivateIdentifier2(operand.name)) { const receiver = visitNode(operand.expression, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); let expression = createPrivateIdentifierAccess(info, readExpression); const temp = isPrefixUnaryExpression(node) || discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); @@ -91219,7 +92212,7 @@ ${lanes.join("\n")} } return expression; } - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(operand) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(operand) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { const expression = visitInvalidSuperProperty(operand); @@ -91276,6 +92269,9 @@ ${lanes.join("\n")} } function createCopiableReceiverExpr(receiver) { const clone2 = nodeIsSynthesized(receiver) ? receiver : factory2.cloneNode(receiver); + if (receiver.kind === 110 /* ThisKeyword */ && noSubstitution.has(receiver)) { + noSubstitution.add(clone2); + } if (isSimpleInlineableExpression(receiver)) { return { readExpression: clone2, initializeExpression: void 0 }; } @@ -91306,7 +92302,7 @@ ${lanes.join("\n")} [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)] ); } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.expression) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { const invocation = factory2.createFunctionCallCall( visitNode(node.expression, visitor, isExpression), lexicalEnvironment.data.classConstructor, @@ -91335,7 +92331,7 @@ ${lanes.join("\n")} visitNode(node.template, visitor, isTemplateLiteral) ); } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.tag) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { const invocation = factory2.createFunctionBindCall( visitNode(node.tag, visitor, isExpression), lexicalEnvironment.data.classConstructor, @@ -91358,30 +92354,40 @@ ${lanes.join("\n")} lexicalEnvironmentMap.set(getOriginalNode(node), lexicalEnvironment); } if (shouldTransformPrivateElementsOrClassStaticBlocks) { + if (isClassThisAssignmentBlock(node)) { + const result = visitNode(node.body.statements[0].expression, visitor, isExpression); + if (isAssignmentExpression( + result, + /*excludeCompoundAssignment*/ + true + ) && result.left === result.right) { + return void 0; + } + return result; + } + if (isClassNamedEvaluationHelperBlock(node)) { + return visitNode(node.body.statements[0].expression, visitor, isExpression); + } startLexicalEnvironment(); - let statements = setCurrentStaticPropertyDeclarationOrStaticBlockAnd( + let statements = setCurrentClassElementAnd( node, (statements2) => visitNodes2(statements2, visitor, isStatement), node.body.statements ); statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); const iife = factory2.createImmediatelyInvokedArrowFunction(statements); + setOriginalNode(skipParentheses(iife.expression), node); + addEmitFlags(skipParentheses(iife.expression), 4 /* AdviseOnEmitNode */); setOriginalNode(iife, node); setTextRange(iife, node); - addEmitFlags(iife, 4 /* AdviseOnEmitNode */); return iife; } } function isAnonymousClassNeedingAssignedName(node) { if (isClassExpression(node) && !node.name) { const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - const classStaticBlock = find(staticPropertiesOrClassStaticBlocks, isClassStaticBlockDeclaration); - if (classStaticBlock) { - for (const statement of classStaticBlock.body.statements) { - if (isExpressionStatement(statement) && isCallToHelper(statement.expression, "___setFunctionName")) { - return false; - } - } + if (some(staticPropertiesOrClassStaticBlocks, isClassNamedEvaluationHelperBlock)) { + return false; } const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || !!(getInternalEmitFlags(node) && 32 /* TransformPrivateStaticElements */)) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2)); return hasTransformableStatics; @@ -91404,10 +92410,8 @@ ${lanes.join("\n")} } if (isAssignmentExpression(node)) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const left2 = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left2, node.operatorToken, right); + node = transformNamedEvaluation(context, node); + Debug.assertNode(node, isAssignmentExpression); } const left = skipOuterExpressions(node.left, 8 /* PartiallyEmittedExpressions */ | 1 /* Parentheses */); if (isPrivateIdentifierPropertyAccessExpression(left)) { @@ -91421,7 +92425,7 @@ ${lanes.join("\n")} node ); } - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.left) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.left) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return factory2.updateBinaryExpression( @@ -91486,36 +92490,15 @@ ${lanes.join("\n")} const elements = discarded ? visitCommaListElements(node.elements, discardedValueVisitor) : visitCommaListElements(node.elements, visitor, discardedValueVisitor); return factory2.updateCommaListExpression(node, elements); } - function visitParenthesizedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitParenthesizedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updateParenthesizedExpression(node, expression); } - function visitPartiallyEmittedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; - const expression = visitNode(node.expression, visitorFunc, isExpression); - return factory2.updatePartiallyEmittedExpression(node, expression); - } - function visitReferencedPropertyName(node) { - if (isPropertyNameLiteral(node) || isPrivateIdentifier(node)) { - const referencedName2 = factory2.createStringLiteralFromNode(node); - const name2 = visitNode(node, visitor, isPropertyName); - return { referencedName: referencedName2, name: name2 }; - } - if (isPropertyNameLiteral(node.expression) && !isIdentifier(node.expression)) { - const referencedName2 = factory2.createStringLiteralFromNode(node.expression); - const name2 = visitNode(node, visitor, isPropertyName); - return { referencedName: referencedName2, name: name2 }; - } - const referencedName = factory2.createTempVariable(hoistVariableDeclaration); - const key = emitHelpers().createPropKeyHelper(visitNode(node.expression, visitor, isExpression)); - const assignment = factory2.createAssignment(referencedName, key); - const name = factory2.updateComputedPropertyName(node, injectPendingExpressions(assignment)); - return { referencedName, name }; - } function createPrivateIdentifierAssignment(info, receiver, right, operator) { receiver = visitNode(receiver, visitor, isExpression); right = visitNode(right, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); if (isCompoundAssignment(operator)) { const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); receiver = initializeExpression || readExpression; @@ -91562,11 +92545,15 @@ ${lanes.join("\n")} return filter(node.members, isNonStaticMethodOrAccessorWithPrivateName); } function getClassFacts(node) { + var _a; let facts = 0 /* None */; const original = getOriginalNode(node); if (isClassDeclaration(original) && classOrConstructorParameterIsDecorated(legacyDecorators, original)) { facts |= 1 /* ClassWasDecorated */; } + if (shouldTransformPrivateElementsOrClassStaticBlocks && (classHasClassThisAssignment(node) || classHasExplicitlyAssignedName(node))) { + facts |= 2 /* NeedsClassConstructorReference */; + } let containsPublicInstanceFields = false; let containsInitializedPublicInstanceFields = false; let containsInstancePrivateElements = false; @@ -91575,6 +92562,8 @@ ${lanes.join("\n")} if (isStatic(member)) { if (member.name && (isPrivateIdentifier(member.name) || isAutoAccessorPropertyDeclaration(member)) && shouldTransformPrivateElementsOrClassStaticBlocks) { facts |= 2 /* NeedsClassConstructorReference */; + } else if (isAutoAccessorPropertyDeclaration(member) && shouldTransformAutoAccessors === -1 /* True */ && !node.name && !((_a = node.emitNode) == null ? void 0 : _a.classThis)) { + facts |= 2 /* NeedsClassConstructorReference */; } if (isPropertyDeclaration(member) || isClassStaticBlockDeclaration(member)) { if (shouldTransformThisInStaticInitializers && member.transformFlags & 16384 /* ContainsLexicalThis */) { @@ -91595,6 +92584,9 @@ ${lanes.join("\n")} containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member)); } else if (isPrivateIdentifierClassElementDeclaration(member)) { containsInstancePrivateElements = true; + if (resolver.getNodeCheckFlags(member) & 262144 /* ContainsConstructorReference */) { + facts |= 2 /* NeedsClassConstructorReference */; + } } else if (isPropertyDeclaration(member)) { containsPublicInstanceFields = true; containsInitializedPublicInstanceFields || (containsInitializedPublicInstanceFields = !!member.initializer); @@ -91629,7 +92621,8 @@ ${lanes.join("\n")} } return visitEachChild(node, visitor, context); } - function visitInNewClassLexicalEnvironment(node, referencedName, visitor2) { + function visitInNewClassLexicalEnvironment(node, visitor2) { + var _a; const savedCurrentClassContainer = currentClassContainer; const savedPendingExpressions = pendingExpressions; const savedLexicalEnvironment = lexicalEnvironment; @@ -91641,6 +92634,15 @@ ${lanes.join("\n")} const name = getNameOfDeclaration(node); if (name && isIdentifier(name)) { getPrivateIdentifierEnvironment().data.className = name; + } else if ((_a = node.emitNode) == null ? void 0 : _a.assignedName) { + if (isStringLiteral(node.emitNode.assignedName)) { + if (node.emitNode.assignedName.textSourceNode && isIdentifier(node.emitNode.assignedName.textSourceNode)) { + getPrivateIdentifierEnvironment().data.className = node.emitNode.assignedName.textSourceNode; + } else if (isIdentifierText(node.emitNode.assignedName.text, languageVersion)) { + const prefixName = factory2.createIdentifier(node.emitNode.assignedName.text); + getPrivateIdentifierEnvironment().data.className = prefixName; + } + } } } if (shouldTransformPrivateElementsOrClassStaticBlocks) { @@ -91659,7 +92661,7 @@ ${lanes.join("\n")} if (facts & 8 /* NeedsSubstitutionForThisInClassStaticField */) { enableSubstitutionForClassStaticThisOrSuperReference(); } - const result = visitor2(node, facts, referencedName); + const result = visitor2(node, facts); endClassLexicalEnvironment(); Debug.assert(lexicalEnvironment === savedLexicalEnvironment); currentClassContainer = savedCurrentClassContainer; @@ -91667,12 +92669,7 @@ ${lanes.join("\n")} return result; } function visitClassDeclaration(node) { - return visitInNewClassLexicalEnvironment( - node, - /*referencedName*/ - void 0, - visitClassDeclarationInNewClassLexicalEnvironment - ); + return visitInNewClassLexicalEnvironment(node, visitClassDeclarationInNewClassLexicalEnvironment); } function visitClassDeclarationInNewClassLexicalEnvironment(node, facts) { var _a, _b; @@ -91690,10 +92687,11 @@ ${lanes.join("\n")} getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp); pendingClassReferenceAssignment = factory2.createAssignment(temp, factory2.getInternalName(node)); } - if ((_b = node.emitNode) == null ? void 0 : _b.classThis) { - getClassLexicalEnvironment().classThis = node.emitNode.classThis; - } } + if ((_b = node.emitNode) == null ? void 0 : _b.classThis) { + getClassLexicalEnvironment().classThis = node.emitNode.classThis; + } + const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */; const isExport = hasSyntacticModifier(node, 1 /* Export */); const isDefault = hasSyntacticModifier(node, 1024 /* Default */); let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); @@ -91728,6 +92726,11 @@ ${lanes.join("\n")} ) )); } + const alias = getClassLexicalEnvironment().classConstructor; + if (isClassWithConstructorReference && alias) { + enableSubstitutionForClassAliases(); + classAliases[getOriginalNodeId(node)] = alias; + } const classDecl = factory2.updateClassDeclaration( node, modifiers, @@ -91743,24 +92746,27 @@ ${lanes.join("\n")} } return statements; } - function visitClassExpression(node, referencedName) { - return visitInNewClassLexicalEnvironment(node, referencedName, visitClassExpressionInNewClassLexicalEnvironment); + function visitClassExpression(node) { + return visitInNewClassLexicalEnvironment(node, visitClassExpressionInNewClassLexicalEnvironment); } - function visitClassExpressionInNewClassLexicalEnvironment(node, facts, referencedName) { - var _a, _b, _c, _d; + function visitClassExpressionInNewClassLexicalEnvironment(node, facts) { + var _a, _b, _c; const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */); const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */; + const classCheckFlags = resolver.getNodeCheckFlags(node); + const isClassWithConstructorReference = classCheckFlags & 262144 /* ContainsConstructorReference */; let temp; function createClassTempVar() { var _a2; if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a2 = node.emitNode) == null ? void 0 : _a2.classThis)) { return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis; } - const classCheckFlags = resolver.getNodeCheckFlags(node); - const isClassWithConstructorReference2 = classCheckFlags & 1048576 /* ClassWithConstructorReference */; const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */; - const temp2 = factory2.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference2); + const temp2 = factory2.createTempVariable( + requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, + /*reservedInNestedScopes*/ + true + ); getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp2); return temp2; } @@ -91773,7 +92779,7 @@ ${lanes.join("\n")} const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause); const { members, prologue } = transformClassMembers(node); - let classExpression = factory2.updateClassExpression( + const classExpression = factory2.updateClassExpression( node, modifiers, node.name, @@ -91787,41 +92793,18 @@ ${lanes.join("\n")} expressions.push(prologue); } const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2)); - if (hasTransformableStatics || some(pendingExpressions) || referencedName) { + if (hasTransformableStatics || some(pendingExpressions)) { if (isDecoratedClassDeclaration) { Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); if (some(pendingExpressions)) { addRange(pendingStatements, map(pendingExpressions, factory2.createExpressionStatement)); } - if (referencedName) { - if (shouldTransformPrivateElementsOrClassStaticBlocks) { - const setNameExpression = emitHelpers().createSetFunctionNameHelper(temp ?? ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node), referencedName); - pendingStatements.push(factory2.createExpressionStatement(setNameExpression)); - } else { - const setNameExpression = emitHelpers().createSetFunctionNameHelper(factory2.createThis(), referencedName); - classExpression = factory2.updateClassExpression( - classExpression, - classExpression.modifiers, - classExpression.name, - classExpression.typeParameters, - classExpression.heritageClauses, - [ - factory2.createClassStaticBlockDeclaration( - factory2.createBlock([ - factory2.createExpressionStatement(setNameExpression) - ]) - ), - ...classExpression.members - ] - ); - } - } if (some(staticPropertiesOrClassStaticBlocks)) { - addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_c = node.emitNode) == null ? void 0 : _c.classThis) ?? factory2.getInternalName(node)); + addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node)); } if (temp) { expressions.push(factory2.createAssignment(temp, classExpression)); - } else if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_d = node.emitNode) == null ? void 0 : _d.classThis)) { + } else if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_c = node.emitNode) == null ? void 0 : _c.classThis)) { expressions.push(factory2.createAssignment(node.emitNode.classThis, classExpression)); } else { expressions.push(classExpression); @@ -91836,9 +92819,6 @@ ${lanes.join("\n")} } expressions.push(factory2.createAssignment(temp, classExpression)); addRange(expressions, pendingExpressions); - if (referencedName) { - expressions.push(emitHelpers().createSetFunctionNameHelper(temp, referencedName)); - } addRange(expressions, generateInitializedPropertyExpressionsOrClassStaticBlock(staticPropertiesOrClassStaticBlocks, temp)); expressions.push(factory2.cloneNode(temp)); } @@ -91857,6 +92837,13 @@ ${lanes.join("\n")} } return void 0; } + function visitThisExpression(node) { + if (shouldTransformThisInStaticInitializers && currentClassElement && isClassStaticBlockDeclaration(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + const { classThis, classConstructor } = lexicalEnvironment.data; + return classThis ?? classConstructor ?? node; + } + return node; + } function transformClassMembers(node) { const shouldTransformPrivateStaticElementsInClass = !!(getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */); if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformPrivateStaticElementsInFile) { @@ -91936,9 +92923,14 @@ ${lanes.join("\n")} } if (syntheticConstructor || syntheticStaticBlock) { let membersArray; + const classThisAssignmentBlock = find(members, isClassThisAssignmentBlock); + const classNamedEvaluationHelperBlock = find(members, isClassNamedEvaluationHelperBlock); + membersArray = append(membersArray, classThisAssignmentBlock); + membersArray = append(membersArray, classNamedEvaluationHelperBlock); membersArray = append(membersArray, syntheticConstructor); membersArray = append(membersArray, syntheticStaticBlock); - membersArray = addRange(membersArray, members); + const remainingMembers = classThisAssignmentBlock || classNamedEvaluationHelperBlock ? filter(members, (member) => member !== classThisAssignmentBlock && member !== classNamedEvaluationHelperBlock) : members; + membersArray = addRange(membersArray, remainingMembers); members = setTextRange( factory2.createNodeArray(membersArray), /*location*/ @@ -91999,8 +92991,46 @@ ${lanes.join("\n")} ) ); } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements, constructor) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + statementOffset = superStatementIndex + 1; + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements, + constructor + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + while (statementOffset < statementsIn.length) { + const statement = statementsIn[statementOffset]; + if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { + statementOffset++; + } else { + break; + } + } + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset)); + } function transformConstructorBody(node, constructor, isDerivedClass) { - var _a; const instanceProperties = getProperties( node, /*requireInitializer*/ @@ -92024,68 +93054,65 @@ ${lanes.join("\n")} } resumeLexicalEnvironment(); const needsSyntheticConstructor = !constructor && isDerivedClass; - let indexOfFirstStatementAfterSuperAndPrologue = 0; - let prologueStatementCount = 0; - let superStatementIndex = -1; + let statementOffset = 0; let statements = []; - if ((_a = constructor == null ? void 0 : constructor.body) == null ? void 0 : _a.statements) { - prologueStatementCount = factory2.copyPrologue( + const initializerStatements = []; + const receiver = factory2.createThis(); + addInstanceMethodStatements(initializerStatements, privateMethodsAndAccessors, receiver); + if (constructor) { + const parameterProperties = filter(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); + const nonParameterProperties = filter(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); + addPropertyOrClassStaticBlockStatements(initializerStatements, parameterProperties, receiver); + addPropertyOrClassStaticBlockStatements(initializerStatements, nonParameterProperties, receiver); + } else { + addPropertyOrClassStaticBlockStatements(initializerStatements, properties, receiver); + } + if (constructor == null ? void 0 : constructor.body) { + statementOffset = factory2.copyPrologue( constructor.body.statements, statements, /*ensureUseStrict*/ false, visitor ); - superStatementIndex = findSuperStatementIndex(constructor.body.statements, prologueStatementCount); - if (superStatementIndex >= 0) { - indexOfFirstStatementAfterSuperAndPrologue = superStatementIndex + 1; - statements = [ - ...statements.slice(0, prologueStatementCount), - ...visitNodes2(constructor.body.statements, visitor, isStatement, prologueStatementCount, indexOfFirstStatementAfterSuperAndPrologue - prologueStatementCount), - ...statements.slice(prologueStatementCount) - ]; - } else if (prologueStatementCount >= 0) { - indexOfFirstStatementAfterSuperAndPrologue = prologueStatementCount; - } - } - if (needsSyntheticConstructor) { - statements.push( - factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createSuper(), - /*typeArguments*/ - void 0, - [factory2.createSpreadElement(factory2.createIdentifier("arguments"))] - ) - ) - ); - } - let parameterPropertyDeclarationCount = 0; - if (constructor == null ? void 0 : constructor.body) { - for (let i = indexOfFirstStatementAfterSuperAndPrologue; i < constructor.body.statements.length; i++) { - const statement = constructor.body.statements[i]; - if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { - parameterPropertyDeclarationCount++; - } else { - break; + const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, statementOffset); + if (superStatementIndices.length) { + transformConstructorBodyWorker( + statements, + constructor.body.statements, + statementOffset, + superStatementIndices, + /*superPathDepth*/ + 0, + initializerStatements, + constructor + ); + } else { + while (statementOffset < constructor.body.statements.length) { + const statement = constructor.body.statements[statementOffset]; + if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { + statementOffset++; + } else { + break; + } } + addRange(statements, initializerStatements); + addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, statementOffset)); } - if (parameterPropertyDeclarationCount > 0) { - indexOfFirstStatementAfterSuperAndPrologue += parameterPropertyDeclarationCount; - } - } - const receiver = factory2.createThis(); - addInstanceMethodStatements(statements, privateMethodsAndAccessors, receiver); - if (constructor) { - const parameterProperties = filter(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - const nonParameterProperties = filter(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - addPropertyOrClassStaticBlockStatements(statements, parameterProperties, receiver); - addPropertyOrClassStaticBlockStatements(statements, nonParameterProperties, receiver); } else { - addPropertyOrClassStaticBlockStatements(statements, properties, receiver); - } - if (constructor) { - addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, indexOfFirstStatementAfterSuperAndPrologue)); + if (needsSyntheticConstructor) { + statements.push( + factory2.createExpressionStatement( + factory2.createCallExpression( + factory2.createSuper(), + /*typeArguments*/ + void 0, + [factory2.createSpreadElement(factory2.createIdentifier("arguments"))] + ) + ) + ); + } + addRange(statements, initializerStatements); } statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); if (statements.length === 0 && !constructor) { @@ -92118,7 +93145,7 @@ ${lanes.join("\n")} } } function transformPropertyOrClassStaticBlock(property, receiver) { - const expression = isClassStaticBlockDeclaration(property) ? transformClassStaticBlockDeclaration(property) : transformProperty(property, receiver); + const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : transformProperty(property, receiver); if (!expression) { return void 0; } @@ -92143,7 +93170,12 @@ ${lanes.join("\n")} function generateInitializedPropertyExpressionsOrClassStaticBlock(propertiesOrClassStaticBlocks, receiver) { const expressions = []; for (const property of propertiesOrClassStaticBlocks) { - const expression = isClassStaticBlockDeclaration(property) ? transformClassStaticBlockDeclaration(property) : transformProperty(property, receiver); + const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : setCurrentClassElementAnd( + property, + () => transformProperty(property, receiver), + /*arg*/ + void 0 + ); if (!expression) { continue; } @@ -92158,7 +93190,7 @@ ${lanes.join("\n")} } function transformProperty(property, receiver) { var _a; - const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; + const savedCurrentClassElement = currentClassElement; const transformed = transformPropertyWorker(property, receiver); if (transformed && hasStaticModifier(property) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.facts)) { setOriginalNode(transformed, property); @@ -92166,26 +93198,18 @@ ${lanes.join("\n")} setSourceMapRange(transformed, getSourceMapRange(property.name)); lexicalEnvironmentMap.set(getOriginalNode(property), lexicalEnvironment); } - currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock; + currentClassElement = savedCurrentClassElement; return transformed; } function transformPropertyWorker(property, receiver) { const emitAssignment = !useDefineForClassFields; - let referencedName; if (isNamedEvaluation(property, isAnonymousClassNeedingAssignedName)) { - if (isPropertyNameLiteral(property.name) || isPrivateIdentifier(property.name)) { - referencedName = factory2.createStringLiteralFromNode(property.name); - } else if (isPropertyNameLiteral(property.name.expression) && !isIdentifier(property.name.expression)) { - referencedName = factory2.createStringLiteralFromNode(property.name.expression); - } else { - referencedName = factory2.getGeneratedNameForNode(property.name); - } + property = transformNamedEvaluation(context, property); } const propertyName = hasAccessorModifier(property) ? factory2.getGeneratedPrivateNameForNode(property.name) : isComputedPropertyName(property.name) && !isSimpleInlineableExpression(property.name.expression) ? factory2.updateComputedPropertyName(property.name, factory2.getGeneratedNameForNode(property.name)) : property.name; if (hasStaticModifier(property)) { - currentStaticPropertyDeclarationOrStaticBlock = property; + currentClassElement = property; } - const initializerVisitor = referencedName ? (child) => namedEvaluationVisitor(child, referencedName) : visitor; if (isPrivateIdentifier(propertyName) && shouldTransformClassElementToWeakMap(property)) { const privateIdentifierInfo = accessPrivateIdentifier2(propertyName); if (privateIdentifierInfo) { @@ -92194,14 +93218,14 @@ ${lanes.join("\n")} return createPrivateInstanceFieldInitializer( factory2, receiver, - visitNode(property.initializer, initializerVisitor, isExpression), + visitNode(property.initializer, visitor, isExpression), privateIdentifierInfo.brandCheckIdentifier ); } else { return createPrivateStaticFieldInitializer( factory2, privateIdentifierInfo.variableName, - visitNode(property.initializer, initializerVisitor, isExpression) + visitNode(property.initializer, visitor, isExpression) ); } } else { @@ -92218,7 +93242,7 @@ ${lanes.join("\n")} if (hasSyntacticModifier(propertyOriginalNode, 256 /* Abstract */)) { return void 0; } - let initializer = visitNode(property.initializer, initializerVisitor, isExpression); + let initializer = visitNode(property.initializer, visitor, isExpression); if (isParameterPropertyDeclaration(propertyOriginalNode, propertyOriginalNode.parent) && isIdentifier(propertyName)) { const localName = factory2.cloneNode(propertyName); if (initializer) { @@ -92263,14 +93287,14 @@ ${lanes.join("\n")} if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(261 /* FunctionDeclaration */); - context.enableEmitNotification(217 /* FunctionExpression */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(171 /* PropertyDeclaration */); - context.enableEmitNotification(166 /* ComputedPropertyName */); + context.enableEmitNotification(262 /* FunctionDeclaration */); + context.enableEmitNotification(218 /* FunctionExpression */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(172 /* PropertyDeclaration */); + context.enableEmitNotification(167 /* ComputedPropertyName */); } } function addInstanceMethodStatements(statements, methods, receiver) { @@ -92296,10 +93320,10 @@ ${lanes.join("\n")} visitNode(node.argumentExpression, visitor, isExpression) ); } - function getPropertyNameExpressionIfNeeded(name, shouldHoist, captureReferencedName) { + function getPropertyNameExpressionIfNeeded(name, shouldHoist) { if (isComputedPropertyName(name)) { const cacheAssignment = findComputedPropertyNameCacheAssignment(name); - let expression = visitNode(name.expression, visitor, isExpression); + const expression = visitNode(name.expression, visitor, isExpression); const innerExpression = skipPartiallyEmittedExpressions(expression); const inlinable = isSimpleInlineableExpression(innerExpression); const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left); @@ -92310,9 +93334,6 @@ ${lanes.join("\n")} } else { hoistVariableDeclaration(generatedName); } - if (captureReferencedName) { - expression = emitHelpers().createPropKeyHelper(expression); - } return factory2.createAssignment(generatedName, expression); } return inlinable || isIdentifier(innerExpression) ? void 0 : expression; @@ -92508,7 +93529,7 @@ ${lanes.join("\n")} } if (isPrivateIdentifierPropertyAccessExpression(node)) { return wrapPrivateIdentifierForDestructuringTarget(node); - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -92535,10 +93556,7 @@ ${lanes.join("\n")} } function visitAssignmentElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const left = visitDestructuringAssignmentTarget(node.left); - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); + node = transformNamedEvaluation(context, node); } if (isAssignmentExpression( node, @@ -92585,9 +93603,7 @@ ${lanes.join("\n")} } function visitShorthandAssignmentProperty(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.objectAssignmentInitializer); - const objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateShorthandPropertyAssignment(node, node.name, objectAssignmentInitializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } @@ -92637,16 +93653,16 @@ ${lanes.join("\n")} return; } switch (node.kind) { - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) { break; } - case 261 /* FunctionDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: { + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { const savedLexicalEnvironment = lexicalEnvironment; const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; lexicalEnvironment = void 0; @@ -92658,7 +93674,7 @@ ${lanes.join("\n")} lexicalEnvironment = savedLexicalEnvironment; return; } - case 166 /* ComputedPropertyName */: { + case 167 /* ComputedPropertyName */: { const savedLexicalEnvironment = lexicalEnvironment; const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; @@ -92688,11 +93704,8 @@ ${lanes.join("\n")} return node; } function substituteThisExpression(node) { - if (enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */ && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */ && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) && !noSubstitution.has(node)) { const { facts, classConstructor, classThis } = lexicalEnvironment.data; - if (facts & 1 /* ClassWasDecorated */ && legacyDecorators) { - return factory2.createParenthesizedExpression(factory2.createVoidZero()); - } const substituteThis = shouldSubstituteThisWithClassThis ? classThis ?? classConstructor : classConstructor; if (substituteThis) { return setTextRange( @@ -92703,6 +93716,9 @@ ${lanes.join("\n")} node ); } + if (facts & 1 /* ClassWasDecorated */ && legacyDecorators) { + return factory2.createParenthesizedExpression(factory2.createVoidZero()); + } } return node; } @@ -92711,7 +93727,7 @@ ${lanes.join("\n")} } function trySubstituteClassAlias(node) { if (enabledSubstitutions & 1 /* ClassAliases */) { - if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) { + if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) { const declaration = resolver.getReferencedValueDeclaration(node); if (declaration) { const classAlias = classAliases[declaration.id]; @@ -92757,6 +93773,12 @@ ${lanes.join("\n")} function isPrivateIdentifierInExpression(node) { return isPrivateIdentifier(node.left) && node.operatorToken.kind === 103 /* InKeyword */; } + function isStaticPropertyDeclaration2(node) { + return isPropertyDeclaration(node) && hasStaticModifier(node); + } + function isStaticPropertyDeclarationOrClassStaticBlock(node) { + return isClassStaticBlockDeclaration(node) || isStaticPropertyDeclaration2(node); + } var init_classFields = __esm({ "src/compiler/transformers/classFields.ts"() { "use strict"; @@ -92798,15 +93820,15 @@ ${lanes.join("\n")} } function serializeTypeOfNode(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: return serializeTypeNode(node.type); - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 173 /* MethodDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 174 /* MethodDeclaration */: return factory2.createIdentifier("Function"); default: return factory2.createVoidZero(); @@ -92833,7 +93855,7 @@ ${lanes.join("\n")} return factory2.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 176 /* GetAccessor */) { + if (container && node.kind === 177 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -92859,72 +93881,72 @@ ${lanes.join("\n")} case 157 /* UndefinedKeyword */: case 146 /* NeverKeyword */: return factory2.createVoidZero(); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return factory2.createIdentifier("Function"); - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return factory2.createIdentifier("Array"); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean"); case 136 /* BooleanKeyword */: return factory2.createIdentifier("Boolean"); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: case 154 /* StringKeyword */: return factory2.createIdentifier("String"); case 151 /* ObjectKeyword */: return factory2.createIdentifier("Object"); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); case 150 /* NumberKeyword */: return factory2.createIdentifier("Number"); - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); case 155 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return serializeTypeReferenceNode(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ true ); - case 191 /* UnionType */: + case 192 /* UnionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ false ); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return serializeUnionOrIntersectionConstituents( [node.trueType, node.falseType], /*isIntersection*/ false ); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: if (node.operator === 148 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 185 /* TypeQuery */: - case 198 /* IndexedAccessType */: - case 199 /* MappedType */: - case 186 /* TypeLiteral */: + case 186 /* TypeQuery */: + case 199 /* IndexedAccessType */: + case 200 /* MappedType */: + case 187 /* TypeLiteral */: case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: - case 196 /* ThisType */: - case 204 /* ImportType */: + case 197 /* ThisType */: + case 205 /* ImportType */: break; - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: - case 323 /* JSDocFunctionType */: - case 324 /* JSDocVariadicType */: - case 325 /* JSDocNamepathType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: + case 324 /* JSDocFunctionType */: + case 325 /* JSDocVariadicType */: + case 326 /* JSDocNamepathType */: break; - case 320 /* JSDocNullableType */: - case 321 /* JSDocNonNullableType */: - case 322 /* JSDocOptionalType */: + case 321 /* JSDocNullableType */: + case 322 /* JSDocNonNullableType */: + case 323 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -92936,7 +93958,7 @@ ${lanes.join("\n")} case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return factory2.createIdentifier("String"); - case 223 /* PrefixUnaryExpression */: { + case 224 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 9 /* NumericLiteral */: @@ -93095,7 +94117,7 @@ ${lanes.join("\n")} name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -93151,23 +94173,23 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructorDeclaration(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -93307,39 +94329,36 @@ ${lanes.join("\n")} ); setOriginalNode(classExpression, node); setTextRange(classExpression, location); + const varInitializer = classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression; const varDecl = factory2.createVariableDeclaration( declName, /*exclamationToken*/ void 0, /*type*/ void 0, - classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression + varInitializer ); setOriginalNode(varDecl, node); - let varModifiers; - if (isExport && !isDefault) { - varModifiers = factory2.createModifiersFromModifierFlags(1 /* Export */); - } - const statement = factory2.createVariableStatement( - varModifiers, - factory2.createVariableDeclarationList([ - varDecl - ], 1 /* Let */) + const varDeclList = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); + const varStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + varDeclList ); - setOriginalNode(statement, node); - setTextRange(statement, location); - setCommentRange(statement, node); - const statements = [statement]; + setOriginalNode(varStatement, node); + setTextRange(varStatement, location); + setCommentRange(varStatement, node); + const statements = [varStatement]; addRange(statements, decorationStatements); addConstructorDecorationStatement(statements, node); - if (isExport && isDefault) { - statements.push(factory2.createExportAssignment( - /*modifiers*/ - void 0, - /*isExportEquals*/ - false, - declName - )); + if (isExport) { + if (isDefault) { + const exportStatement = factory2.createExportDefault(declName); + statements.push(exportStatement); + } else { + const exportStatement = factory2.createExternalModuleExport(factory2.getDeclarationName(node)); + statements.push(exportStatement); + } } return statements; } @@ -93406,7 +94425,7 @@ ${lanes.join("\n")} ), node); } function visitPropertyDeclaration(node) { - if (node.flags & 16777216 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { + if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { return void 0; } return finishClassElement(factory2.updatePropertyDeclaration( @@ -93574,7 +94593,7 @@ ${lanes.join("\n")} } } function getClassAliasIfNeeded(node) { - if (resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */) { + if (resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */) { enableSubstitutionForClassAliases(); const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default"); classAliases[getOriginalNodeId(node)] = classAlias; @@ -93607,7 +94626,7 @@ ${lanes.join("\n")} } function trySubstituteClassAlias(node) { if (classAliases) { - if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) { + if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) { const declaration = resolver.getReferencedValueDeclaration(node); if (declaration) { const classAlias = classAliases[declaration.id]; @@ -93639,8 +94658,7 @@ ${lanes.join("\n")} endLexicalEnvironment, hoistVariableDeclaration } = context; - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); + const languageVersion = getEmitScriptTarget(context.getCompilerOptions()); let top; let classInfo; let classThis; @@ -93752,86 +94770,78 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return Debug.fail("Use `modifierVisitor` instead."); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: - return visitClassExpression( - node, - /*referencedName*/ - void 0 - ); - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: + case 231 /* ClassExpression */: + return visitClassExpression(node); + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return Debug.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return visitBindingElement(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); case 110 /* ThisKeyword */: return visitThisExpression(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ false ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: { + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: { enterOther(); const result = visitEachChild(node, fallbackVisitor, context); exitOther(); @@ -93843,7 +94853,7 @@ ${lanes.join("\n")} } function fallbackVisitor(node) { switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; default: return visitor(node); @@ -93851,7 +94861,7 @@ ${lanes.join("\n")} } function modifierVisitor(node) { switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; default: return node; @@ -93859,72 +94869,48 @@ ${lanes.join("\n")} } function classElementVisitor(node) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructorDeclaration(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); default: return visitor(node); } } - function namedEvaluationVisitor(node, referencedName) { - switch (node.kind) { - case 359 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 216 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 230 /* ClassExpression */: - return visitClassExpression(node, referencedName); - default: - return visitor(node); - } - } function discardedValueVisitor(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - true, - /*referencedName*/ - void 0 + true ); default: return visitor(node); @@ -93962,6 +94948,7 @@ ${lanes.join("\n")} ); } function createClassInfo(node) { + const metadataReference = factory2.createUniqueName("_metadata", 16 /* Optimistic */ | 32 /* FileLevel */); let instanceExtraInitializersName; let staticExtraInitializersName; let hasStaticInitializers = false; @@ -93975,13 +94962,15 @@ ${lanes.join("\n")} node )) { if (hasStaticModifier(member)) { - staticExtraInitializersName ?? (staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */)); + staticExtraInitializersName ?? (staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); } else { - instanceExtraInitializersName ?? (instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */)); + instanceExtraInitializersName ?? (instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); } } if (isClassStaticBlockDeclaration(member)) { - hasStaticInitializers = true; + if (!isClassNamedEvaluationHelperBlock(member)) { + hasStaticInitializers = true; + } } else if (isPropertyDeclaration(member)) { if (hasStaticModifier(member)) { hasStaticInitializers || (hasStaticInitializers = !!member.initializer || hasDecorators(member)); @@ -93998,6 +94987,7 @@ ${lanes.join("\n")} } return { class: node, + metadataReference, instanceExtraInitializersName, staticExtraInitializersName, hasStaticInitializers, @@ -94005,19 +94995,15 @@ ${lanes.join("\n")} hasStaticPrivateClassElements }; } - function containsLexicalSuperInStaticInitializer(node) { - for (const member of node.members) { - if (isClassStaticBlockDeclaration(member) || isPropertyDeclaration(member) && hasStaticModifier(member)) { - if (member.transformFlags & 134217728 /* ContainsLexicalSuper */) { - return true; - } - } - } - return false; - } - function transformClassLike(node, className) { - var _a; + function transformClassLike(node) { startLexicalEnvironment(); + if (!classHasDeclaredOrExplicitlyAssignedName(node) && classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + node + )) { + node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, factory2.createStringLiteral("")); + } const classReference = factory2.getLocalName( node, /*allowComments*/ @@ -94036,10 +95022,11 @@ ${lanes.join("\n")} let shouldTransformPrivateStaticElementsInClass = false; const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(node)); if (classDecorators) { - classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */); - classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */); - classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */); - classInfo2.classThis = factory2.createUniqueName("_classThis", 16 /* Optimistic */); + classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */); + const needsUniqueClassThis = some(node.members, (member) => (isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)); + classInfo2.classThis = factory2.createUniqueName("_classThis", needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */); classDefinitionStatements.push( createLet(classInfo2.classDecoratorsName, factory2.createArrayLiteralExpression(classDecorators)), createLet(classInfo2.classDescriptorName), @@ -94051,34 +95038,26 @@ ${lanes.join("\n")} shouldTransformPrivateStaticElementsInFile = true; } } - if (classDecorators && containsLexicalSuperInStaticInitializer(node)) { - const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); - const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); - const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); - if (extendsExpression) { - classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */); - const unwrapped = skipOuterExpressions(extendsExpression); - const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; - classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression)); - const updatedExtendsElement = factory2.updateExpressionWithTypeArguments( - extendsElement, - classInfo2.classSuper, - /*typeArguments*/ - void 0 - ); - const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]); - heritageClauses = factory2.createNodeArray([updatedExtendsClause]); - } - } else { - heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); + const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); + const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); + const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); + if (extendsExpression) { + classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */ | 32 /* FileLevel */); + const unwrapped = skipOuterExpressions(extendsExpression); + const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; + classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression)); + const updatedExtendsElement = factory2.updateExpressionWithTypeArguments( + extendsElement, + classInfo2.classSuper, + /*typeArguments*/ + void 0 + ); + const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]); + heritageClauses = factory2.createNodeArray([updatedExtendsClause]); } const renamedClassThis = classInfo2.classThis ?? factory2.createThis(); - const needsSetNameHelper = !((_a = getOriginalNode(node, isClassLike)) == null ? void 0 : _a.name) && (classDecorators || !isStringLiteral(className) || !isEmptyStringLiteral(className)); - if (needsSetNameHelper) { - const setNameExpr = emitHelpers().createSetFunctionNameHelper(factory2.createThis(), className); - leadingBlockStatements = append(leadingBlockStatements, factory2.createExpressionStatement(setNameExpr)); - } enterClass(classInfo2); + leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo2.metadataReference, classInfo2.classSuper)); let members = visitNodes2(node.members, classElementVisitor, isClassElement); if (pendingExpressions) { let outerThis; @@ -94176,15 +95155,15 @@ ${lanes.join("\n")} leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.nonStaticFieldDecorationStatements); if (classInfo2.classDescriptorName && classInfo2.classDecoratorsName && classInfo2.classExtraInitializersName && classInfo2.classThis) { leadingBlockStatements ?? (leadingBlockStatements = []); - const valueProperty = factory2.createPropertyAssignment("value", factory2.createThis()); + const valueProperty = factory2.createPropertyAssignment("value", renamedClassThis); const classDescriptor = factory2.createObjectLiteralExpression([valueProperty]); const classDescriptorAssignment = factory2.createAssignment(classInfo2.classDescriptorName, classDescriptor); - const classNameReference = factory2.createPropertyAccessExpression(factory2.createThis(), "name"); + const classNameReference = factory2.createPropertyAccessExpression(renamedClassThis, "name"); const esDecorateHelper2 = emitHelpers().createESDecorateHelper( factory2.createNull(), classDescriptorAssignment, classInfo2.classDecoratorsName, - { kind: "class", name: classNameReference }, + { kind: "class", name: classNameReference, metadata: classInfo2.metadataReference }, factory2.createNull(), classInfo2.classExtraInitializersName ); @@ -94196,6 +95175,7 @@ ${lanes.join("\n")} const classReferenceAssignment = factory2.createAssignment(classReference, classThisAssignment); leadingBlockStatements.push(factory2.createExpressionStatement(classReferenceAssignment)); } + leadingBlockStatements.push(createSymbolMetadata(renamedClassThis, classInfo2.metadataReference)); if (classInfo2.staticExtraInitializersName) { const runStaticInitializersHelper = emitHelpers().createRunInitializersHelper(renamedClassThis, classInfo2.staticExtraInitializersName); const runStaticInitializersStatement = factory2.createExpressionStatement(runStaticInitializersHelper); @@ -94212,32 +95192,35 @@ ${lanes.join("\n")} addRange(leadingBlockStatements, trailingBlockStatements); trailingBlockStatements = void 0; } - let newMembers = members; - if (leadingBlockStatements) { - const leadingStaticBlockBody = factory2.createBlock( - leadingBlockStatements, - /*multiLine*/ - true - ); - const leadingStaticBlock = factory2.createClassStaticBlockDeclaration(leadingStaticBlockBody); - if (shouldTransformPrivateStaticElementsInClass) { - setInternalEmitFlags(leadingStaticBlock, 32 /* TransformPrivateStaticElements */); - } - newMembers = [leadingStaticBlock, ...newMembers]; - } - if (syntheticConstructor) { - newMembers = [...newMembers, syntheticConstructor]; - } - if (trailingBlockStatements) { - const trailingStaticBlockBody = factory2.createBlock( - trailingBlockStatements, - /*multiLine*/ - true - ); - const trailingStaticBlock = factory2.createClassStaticBlockDeclaration(trailingStaticBlockBody); - newMembers = [...newMembers, trailingStaticBlock]; + const leadingStaticBlock = leadingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock( + leadingBlockStatements, + /*multiLine*/ + true + )); + if (leadingStaticBlock && shouldTransformPrivateStaticElementsInClass) { + setInternalEmitFlags(leadingStaticBlock, 32 /* TransformPrivateStaticElements */); } - if (newMembers !== members) { + const trailingStaticBlock = trailingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock( + trailingBlockStatements, + /*multiLine*/ + true + )); + if (leadingStaticBlock || syntheticConstructor || trailingStaticBlock) { + const newMembers = []; + const existingNamedEvaluationHelperBlockIndex = members.findIndex(isClassNamedEvaluationHelperBlock); + if (leadingStaticBlock) { + addRange(newMembers, members, 0, existingNamedEvaluationHelperBlockIndex + 1); + newMembers.push(leadingStaticBlock); + addRange(newMembers, members, existingNamedEvaluationHelperBlockIndex + 1); + } else { + addRange(newMembers, members); + } + if (syntheticConstructor) { + newMembers.push(syntheticConstructor); + } + if (trailingStaticBlock) { + newMembers.push(trailingStaticBlock); + } members = setTextRange(factory2.createNodeArray(newMembers), members); } const lexicalEnvironment = endLexicalEnvironment(); @@ -94253,6 +95236,9 @@ ${lanes.join("\n")} heritageClauses, members ); + if (classInfo2.classThis) { + classExpression = injectClassThisAssignmentIfMissing(factory2, classExpression, classInfo2.classThis); + } const classReferenceDeclaration = factory2.createVariableDeclaration( classReference, /*exclamationToken*/ @@ -94292,7 +95278,6 @@ ${lanes.join("\n")} } } setOriginalNode(classExpression, node); - getOrCreateEmitNode(classExpression).classThis = classInfo2.classThis; return factory2.createImmediatelyInvokedArrowFunction(factory2.mergeLexicalEnvironment(classDefinitionStatements, lexicalEnvironment)); } function isDecoratedClassLike(node) { @@ -94308,26 +95293,51 @@ ${lanes.join("\n")} } function visitClassDeclaration(node) { if (isDecoratedClassLike(node)) { - if (hasSyntacticModifier(node, 1 /* Export */) && hasSyntacticModifier(node, 1024 /* Default */)) { - const originalClass = getOriginalNode(node, isClassLike) ?? node; - const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); - const iife = transformClassLike(node, className); - const statement = factory2.createExportDefault(iife); - setOriginalNode(statement, node); - setCommentRange(statement, getCommentRange(node)); - setSourceMapRange(statement, moveRangePastDecorators(node)); - return statement; + const statements = []; + const originalClass = getOriginalNode(node, isClassLike) ?? node; + const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); + const isExport = hasSyntacticModifier(node, 1 /* Export */); + const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + if (!node.name) { + node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className); + } + if (isExport && isDefault) { + const iife = transformClassLike(node); + if (node.name) { + const varDecl = factory2.createVariableDeclaration( + factory2.getLocalName(node), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + iife + ); + setOriginalNode(varDecl, node); + const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); + const varStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + varDecls + ); + statements.push(varStatement); + const exportStatement = factory2.createExportDefault(factory2.getDeclarationName(node)); + setOriginalNode(exportStatement, node); + setCommentRange(exportStatement, getCommentRange(node)); + setSourceMapRange(exportStatement, moveRangePastDecorators(node)); + statements.push(exportStatement); + } else { + const exportStatement = factory2.createExportDefault(iife); + setOriginalNode(exportStatement, node); + setCommentRange(exportStatement, getCommentRange(node)); + setSourceMapRange(exportStatement, moveRangePastDecorators(node)); + statements.push(exportStatement); + } } else { Debug.assertIsDefined(node.name, "A class declaration that is not a default export must have a name."); - const iife = transformClassLike(node, factory2.createStringLiteralFromNode(node.name)); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const declName = languageVersion <= 2 /* ES2015 */ ? factory2.getInternalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ) : factory2.getLocalName( + const iife = transformClassLike(node); + const modifierVisitorNoExport = isExport ? (node2) => isExportModifier(node2) ? void 0 : modifierVisitor(node2) : modifierVisitor; + const modifiers = visitNodes2(node.modifiers, modifierVisitorNoExport, isModifier); + const declName = factory2.getLocalName( node, /*allowComments*/ false, @@ -94344,11 +95354,17 @@ ${lanes.join("\n")} ); setOriginalNode(varDecl, node); const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); - const statement = factory2.createVariableStatement(modifiers, varDecls); - setOriginalNode(statement, node); - setCommentRange(statement, getCommentRange(node)); - return statement; + const varStatement = factory2.createVariableStatement(modifiers, varDecls); + setOriginalNode(varStatement, node); + setCommentRange(varStatement, getCommentRange(node)); + statements.push(varStatement); + if (isExport) { + const exportStatement = factory2.createExternalModuleExport(declName); + setOriginalNode(exportStatement, node); + statements.push(exportStatement); + } } + return singleOrMany(statements); } else { const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); @@ -94369,10 +95385,9 @@ ${lanes.join("\n")} ); } } - function visitClassExpression(node, referencedName) { + function visitClassExpression(node) { if (isDecoratedClassLike(node)) { - const className = node.name ? factory2.createStringLiteralFromNode(node.name) : referencedName ?? factory2.createStringLiteral(""); - const iife = transformClassLike(node, className); + const iife = transformClassLike(node); setOriginalNode(iife, node); return iife; } else { @@ -94409,6 +95424,35 @@ ${lanes.join("\n")} return statements; } } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } function visitConstructorDeclaration(node) { enterClassElement(node); const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); @@ -94425,11 +95469,9 @@ ${lanes.join("\n")} false, visitor ); - const superStatementIndex = findSuperStatementIndex(node.body.statements, nonPrologueStart); - if (superStatementIndex >= 0) { - addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, nonPrologueStart, superStatementIndex + 1 - nonPrologueStart)); - addRange(statements, initializerStatements); - addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, superStatementIndex + 1)); + const superStatementIndices = findSuperStatementIndexPath(node.body.statements, nonPrologueStart); + if (superStatementIndices.length > 0) { + transformConstructorBodyWorker(statements, node.body.statements, nonPrologueStart, superStatementIndices, 0, initializerStatements); } else { addRange(statements, initializerStatements); addRange(statements, visitNodes2(node.body.statements, visitor, isStatement)); @@ -94454,7 +95496,7 @@ ${lanes.join("\n")} } return updated; } - function partialTransformClassElement(member, useNamedEvaluation, classInfo2, createDescriptor) { + function partialTransformClassElement(member, classInfo2, createDescriptor) { let referencedName; let name; let initializersName; @@ -94463,11 +95505,7 @@ ${lanes.join("\n")} if (!classInfo2) { const modifiers2 = visitNodes2(member.modifiers, modifierVisitor, isModifier); enterName(); - if (useNamedEvaluation) { - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - } else { - name = visitPropertyName(member.name); - } + name = visitPropertyName(member.name); exitName(); return { modifiers: modifiers2, referencedName, name, initializersName, descriptorName, thisArg }; } @@ -94516,9 +95554,10 @@ ${lanes.join("\n")} get: isPropertyDeclaration(member) || isGetAccessorDeclaration(member) || isMethodDeclaration(member), // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ... set: isPropertyDeclaration(member) || isSetAccessorDeclaration(member) - } + }, + metadata: classInfo2.metadataReference }; - const extraInitializers = isStatic(member) ? classInfo2.staticExtraInitializersName ?? (classInfo2.staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */)) : classInfo2.instanceExtraInitializersName ?? (classInfo2.instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */)); + const extraInitializers = isStatic(member) ? classInfo2.staticExtraInitializersName ?? (classInfo2.staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)) : classInfo2.instanceExtraInitializersName ?? (classInfo2.instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); if (isMethodOrAccessor(member)) { let descriptor; if (isPrivateIdentifierClassElementDeclaration(member) && createDescriptor) { @@ -94560,11 +95599,7 @@ ${lanes.join("\n")} } if (name === void 0) { enterName(); - if (useNamedEvaluation) { - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - } else { - name = visitPropertyName(member.name); - } + name = visitPropertyName(member.name); exitName(); } if (!some(modifiers) && (isMethodDeclaration(member) || isPropertyDeclaration(member))) { @@ -94574,13 +95609,7 @@ ${lanes.join("\n")} } function visitMethodDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createMethodDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createMethodDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createMethodDescriptorForwarder(modifiers, name, descriptorName), node); @@ -94606,13 +95635,7 @@ ${lanes.join("\n")} } function visitGetAccessorDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createGetAccessorDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createGetAccessorDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createGetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); @@ -94633,13 +95656,7 @@ ${lanes.join("\n")} } function visitSetAccessorDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createSetAccessorDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createSetAccessorDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createSetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); @@ -94652,19 +95669,31 @@ ${lanes.join("\n")} } function visitClassStaticBlockDeclaration(node) { enterClassElement(node); - if (classInfo) - classInfo.hasStaticInitializers = true; - const result = visitEachChild(node, visitor, context); + let result; + if (isClassNamedEvaluationHelperBlock(node)) { + result = visitEachChild(node, visitor, context); + } else if (isClassThisAssignmentBlock(node)) { + const savedClassThis = classThis; + classThis = void 0; + result = visitEachChild(node, visitor, context); + classThis = savedClassThis; + } else { + if (classInfo) + classInfo.hasStaticInitializers = true; + result = visitEachChild(node, visitor, context); + } exitClassElement(); return result; } function visitPropertyDeclaration(node) { + if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); + } enterClassElement(node); Debug.assert(!isAmbientPropertyDeclaration(node), "Not yet implemented."); - const useNamedEvaluation = isNamedEvaluation(node, isAnonymousClassNeedingAssignedName); - const { modifiers, name, referencedName, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, useNamedEvaluation, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : void 0); + const { modifiers, name, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : void 0); startLexicalEnvironment(); - let initializer = referencedName ? visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression) : visitNode(node.initializer, visitor, isExpression); + let initializer = visitNode(node.initializer, visitor, isExpression); if (initializersName) { initializer = emitHelpers().createRunInitializersHelper( thisArg ?? factory2.createThis(), @@ -94794,38 +95823,21 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitParameterDeclaration(node) { - let updated; if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - updated = factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - initializer - ); - } else { - updated = factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - node.dotDotDotToken, - visitNode(node.name, visitor, isBindingName), - /*questionToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } + const updated = factory2.updateParameterDeclaration( + node, + /*modifiers*/ + void 0, + node.dotDotDotToken, + visitNode(node.name, visitor, isBindingName), + /*questionToken*/ + void 0, + /*type*/ + void 0, + visitNode(node.initializer, visitor, isExpression) + ); if (updated !== node) { setCommentRange(updated, node); setTextRange(updated, moveRangePastModifiers(node)); @@ -94837,6 +95849,14 @@ ${lanes.join("\n")} function isAnonymousClassNeedingAssignedName(node) { return isClassExpression(node) && !node.name && isDecoratedClassLike(node); } + function canIgnoreEmptyStringLiteralInAssignedName(node) { + const innerExpression = skipOuterExpressions(node); + return isClassExpression(innerExpression) && !innerExpression.name && !classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + innerExpression + ); + } function visitForStatement(node) { return factory2.updateForStatement( node, @@ -94857,10 +95877,8 @@ ${lanes.join("\n")} } if (isAssignmentExpression(node)) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const left = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); + return visitEachChild(node, visitor, context); } if (isSuperProperty(node.left) && classThis && classSuper) { let setterName = isElementAccessExpression(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0; @@ -94980,43 +95998,19 @@ ${lanes.join("\n")} } function visitPropertyAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updatePropertyAssignment(node, name, initializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } function visitVariableDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateVariableDeclaration( - node, - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } function visitBindingElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const propertyName = visitNode(node.propertyName, visitor, isPropertyName); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBindingElement( - node, - /*dotDotDotToken*/ - void 0, - propertyName, - name, - initializer - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } @@ -95053,14 +96047,11 @@ ${lanes.join("\n")} /*excludeCompoundAssignment*/ true )) { - const assignmentTarget = visitDestructuringAssignmentTarget(node.left); - let initializer; if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - initializer = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - } else { - initializer = visitNode(node.right, visitor, isExpression); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); } + const assignmentTarget = visitDestructuringAssignmentTarget(node.left); + const initializer = visitNode(node.right, visitor, isExpression); return factory2.updateBinaryExpression(node, assignmentTarget, node.operatorToken, initializer); } else { return visitDestructuringAssignmentTarget(node); @@ -95099,10 +96090,7 @@ ${lanes.join("\n")} } function visitShorthandAssignmentProperty(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.objectAssignmentInitializer); - const name = visitNode(node.name, visitor, isIdentifier); - const objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.objectAssignmentInitializer)); } return visitEachChild(node, visitor, context); } @@ -95134,20 +96122,17 @@ ${lanes.join("\n")} } function visitExportAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const referencedName = factory2.createStringLiteral(node.isExportEquals ? "" : "default"); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const expression = visitNode(node.expression, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updateExportAssignment(node, modifiers, expression); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.expression)); } return visitEachChild(node, visitor, context); } - function visitParenthesizedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitParenthesizedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updateParenthesizedExpression(node, expression); } - function visitPartiallyEmittedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitPartiallyEmittedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updatePartiallyEmittedExpression(node, expression); } @@ -95175,6 +96160,17 @@ ${lanes.join("\n")} function transformDecorator(decorator) { const expression = visitNode(decorator.expression, visitor, isExpression); setEmitFlags(expression, 3072 /* NoComments */); + const innerExpression = skipOuterExpressions(expression); + if (isAccessExpression(innerExpression)) { + const { target, thisArg } = factory2.createCallBinding( + expression, + hoistVariableDeclaration, + languageVersion, + /*cacheIdentifiers*/ + true + ); + return factory2.restoreOuterExpressions(expression, factory2.createFunctionBindCall(target, thisArg, [])); + } return expression; } function createDescriptorMethod(original, name, modifiers, asteriskToken, kind, parameters, body) { @@ -95360,9 +96356,59 @@ ${lanes.join("\n")} ]) ); } - function getAssignedNameOfIdentifier(name, initializer) { - const originalClass = getOriginalNode(initializer, isClassLike); - return originalClass && !originalClass.name && hasSyntacticModifier(originalClass, 1024 /* Default */) ? factory2.createStringLiteral("default") : factory2.createStringLiteralFromNode(name); + function createMetadata(name, classSuper2) { + const varDecl = factory2.createVariableDeclaration( + name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + factory2.createConditionalExpression( + factory2.createLogicalAnd( + factory2.createTypeCheck(factory2.createIdentifier("Symbol"), "function"), + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata") + ), + factory2.createToken(58 /* QuestionToken */), + factory2.createCallExpression( + factory2.createPropertyAccessExpression(factory2.createIdentifier("Object"), "create"), + /*typeArguments*/ + void 0, + [classSuper2 ? createSymbolMetadataReference(classSuper2) : factory2.createNull()] + ), + factory2.createToken(59 /* ColonToken */), + factory2.createVoidZero() + ) + ); + return factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([varDecl], 2 /* Const */) + ); + } + function createSymbolMetadata(target, value) { + const defineProperty = factory2.createObjectDefinePropertyCall( + target, + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata"), + factory2.createPropertyDescriptor( + { configurable: true, writable: true, enumerable: true, value }, + /*singleLine*/ + true + ) + ); + return setEmitFlags( + factory2.createIfStatement(value, factory2.createExpressionStatement(defineProperty)), + 1 /* SingleLine */ + ); + } + function createSymbolMetadataReference(classSuper2) { + return factory2.createBinaryExpression( + factory2.createElementAccessExpression( + classSuper2, + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata") + ), + 61 /* QuestionQuestionToken */, + factory2.createNull() + ); } } var init_esDecorators = __esm({ @@ -95446,34 +96492,34 @@ ${lanes.join("\n")} switch (node.kind) { case 134 /* AsyncKeyword */: return void 0; - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return visitAwaitExpression(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 175 /* Constructor */: + case 176 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -95482,27 +96528,27 @@ ${lanes.join("\n")} function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 240 /* Block */: - case 254 /* SwitchStatement */: - case 268 /* CaseBlock */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 257 /* TryStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 244 /* IfStatement */: - case 253 /* WithStatement */: - case 255 /* LabeledStatement */: + case 241 /* Block */: + case 255 /* SwitchStatement */: + case 269 /* CaseBlock */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 258 /* TryStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 245 /* IfStatement */: + case 254 /* WithStatement */: + case 256 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -95695,7 +96741,7 @@ ${lanes.join("\n")} } } function isVariableDeclarationListWithCollidingName(node) { - return !!node && isVariableDeclarationList(node) && !(node.flags & 3 /* BlockScoped */) && node.declarations.some(collidesWithParameterName); + return !!node && isVariableDeclarationList(node) && !(node.flags & 7 /* BlockScoped */) && node.declarations.some(collidesWithParameterName); } function visitVariableDeclarationListWithCollidingNames(node, hasReceiver) { hoistVariableDeclarationList(node); @@ -95779,7 +96825,7 @@ ${lanes.join("\n")} const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 218 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 219 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = /* @__PURE__ */ new Set(); @@ -95878,15 +96924,15 @@ ${lanes.join("\n")} function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); - context.enableEmitNotification(262 /* ClassDeclaration */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(242 /* VariableStatement */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableEmitNotification(263 /* ClassDeclaration */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(243 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -95917,11 +96963,11 @@ ${lanes.join("\n")} } function substituteExpression(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -95965,7 +97011,7 @@ ${lanes.join("\n")} } function isSuperContainer(node) { const kind = node.kind; - return kind === 262 /* ClassDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -96211,119 +97257,119 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return visitAwaitExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 248 /* ForInStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 249 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return visitVoidExpression(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -96408,7 +97454,7 @@ ${lanes.join("\n")} function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 249 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 250 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -96419,7 +97465,7 @@ ${lanes.join("\n")} let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 304 /* SpreadAssignment */) { + if (e.kind === 305 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -96427,7 +97473,7 @@ ${lanes.join("\n")} const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 302 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -96438,7 +97484,7 @@ ${lanes.join("\n")} function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 209 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -97207,15 +98253,15 @@ ${lanes.join("\n")} function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); - context.enableEmitNotification(262 /* ClassDeclaration */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(242 /* VariableStatement */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableEmitNotification(263 /* ClassDeclaration */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(243 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -97246,11 +98292,11 @@ ${lanes.join("\n")} } function substituteExpression(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -97294,7 +98340,7 @@ ${lanes.join("\n")} } function isSuperContainer(node) { const kind = node.kind; - return kind === 262 /* ClassDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -97345,7 +98391,7 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -97390,7 +98436,7 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 212 /* CallExpression */: { + case 213 /* CallExpression */: { const updated = visitNonOptionalCallExpression( node, /*captureThisArg*/ @@ -97399,8 +98445,8 @@ ${lanes.join("\n")} Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression( node, @@ -97413,12 +98459,12 @@ ${lanes.join("\n")} return updated; } return visitEachChild(node, visitor, context); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (node.operatorToken.kind === 61 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -97456,7 +98502,7 @@ ${lanes.join("\n")} thisArg = expression; } } - expression = node.kind === 210 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -97492,12 +98538,12 @@ ${lanes.join("\n")} } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -97523,8 +98569,8 @@ ${lanes.join("\n")} for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -97533,9 +98579,9 @@ ${lanes.join("\n")} thisArg = rightExpression; } } - rightExpression = segment.kind === 210 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -97718,22 +98764,636 @@ ${lanes.join("\n")} // src/compiler/transformers/esnext.ts function transformESNext(context) { + const { + factory: factory2, + getEmitHelperFactory: emitHelpers, + hoistVariableDeclaration, + startLexicalEnvironment, + endLexicalEnvironment + } = context; + let exportBindings; + let exportVars; + let defaultExportBinding; + let exportEqualsBinding; return chainBundle(context, transformSourceFile); function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } - return visitEachChild(node, visitor, context); + const visited = visitNode(node, visitor, isSourceFile); + addEmitHelpers(visited, context.readEmitHelpers()); + exportVars = void 0; + exportBindings = void 0; + defaultExportBinding = void 0; + return visited; } function visitor(node) { if ((node.transformFlags & 4 /* ContainsESNext */) === 0) { return node; } switch (node.kind) { + case 312 /* SourceFile */: + return visitSourceFile(node); + case 241 /* Block */: + return visitBlock(node); + case 248 /* ForStatement */: + return visitForStatement(node); + case 250 /* ForOfStatement */: + return visitForOfStatement(node); + case 255 /* SwitchStatement */: + return visitSwitchStatement(node); default: return visitEachChild(node, visitor, context); } } + function visitSourceFile(node) { + const usingKind = getUsingKindOfStatements(node.statements); + if (usingKind) { + startLexicalEnvironment(); + exportBindings = new IdentifierNameMap(); + exportVars = []; + const prologueCount = countPrologueStatements(node.statements); + const topLevelStatements = []; + addRange(topLevelStatements, visitArray(node.statements, visitor, isStatement, 0, prologueCount)); + let pos = prologueCount; + while (pos < node.statements.length) { + const statement = node.statements[pos]; + if (getUsingKind(statement) !== 0 /* None */) { + if (pos > prologueCount) { + addRange(topLevelStatements, visitNodes2(node.statements, visitor, isStatement, prologueCount, pos - prologueCount)); + } + break; + } + pos++; + } + Debug.assert(pos < node.statements.length, "Should have encountered at least one 'using' statement."); + const envBinding = createEnvBinding(); + const bodyStatements = transformUsingDeclarations(node.statements, pos, node.statements.length, envBinding, topLevelStatements); + if (exportBindings.size) { + append(topLevelStatements, factory2.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory2.createNamedExports(arrayFrom(exportBindings.values())) + )); + } + addRange(topLevelStatements, endLexicalEnvironment()); + if (exportVars.length) { + topLevelStatements.push(factory2.createVariableStatement( + factory2.createModifiersFromModifierFlags(1 /* Export */), + factory2.createVariableDeclarationList( + exportVars, + 1 /* Let */ + ) + )); + } + addRange(topLevelStatements, createDownlevelUsingStatements(bodyStatements, envBinding, usingKind === 2 /* Async */)); + if (exportEqualsBinding) { + topLevelStatements.push(factory2.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + true, + exportEqualsBinding + )); + } + return factory2.updateSourceFile(node, topLevelStatements); + } + return visitEachChild(node, visitor, context); + } + function visitBlock(node) { + const usingKind = getUsingKindOfStatements(node.statements); + if (usingKind) { + const prologueCount = countPrologueStatements(node.statements); + const envBinding = createEnvBinding(); + return factory2.updateBlock( + node, + [ + ...visitArray(node.statements, visitor, isStatement, 0, prologueCount), + ...createDownlevelUsingStatements( + transformUsingDeclarations( + node.statements, + prologueCount, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ), + envBinding, + usingKind === 2 /* Async */ + ) + ] + ); + } + return visitEachChild(node, visitor, context); + } + function visitForStatement(node) { + if (node.initializer && isUsingVariableDeclarationList(node.initializer)) { + return visitNode( + factory2.createBlock([ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + node.initializer + ), + factory2.updateForStatement( + node, + /*initializer*/ + void 0, + node.condition, + node.incrementor, + node.statement + ) + ]), + visitor, + isStatement + ); + } + return visitEachChild(node, visitor, context); + } + function visitForOfStatement(node) { + if (isUsingVariableDeclarationList(node.initializer)) { + const forInitializer = node.initializer; + Debug.assertNode(forInitializer, isUsingVariableDeclarationList); + Debug.assert(forInitializer.declarations.length === 1, "ForInitializer may only have one declaration"); + const forDecl = forInitializer.declarations[0]; + Debug.assert(!forDecl.initializer, "ForInitializer may not have an initializer"); + const isAwaitUsing = getUsingKindOfVariableDeclarationList(forInitializer) === 2 /* Async */; + const temp = factory2.getGeneratedNameForNode(forDecl.name); + const usingVar = factory2.updateVariableDeclaration( + forDecl, + forDecl.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + temp + ); + const usingVarList = factory2.createVariableDeclarationList([usingVar], isAwaitUsing ? 6 /* AwaitUsing */ : 4 /* Using */); + const usingVarStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + usingVarList + ); + return visitNode( + factory2.updateForOfStatement( + node, + node.awaitModifier, + factory2.createVariableDeclarationList([ + factory2.createVariableDeclaration(temp) + ], 2 /* Const */), + node.expression, + isBlock(node.statement) ? factory2.updateBlock(node.statement, [ + usingVarStatement, + ...node.statement.statements + ]) : factory2.createBlock( + [ + usingVarStatement, + node.statement + ], + /*multiLine*/ + true + ) + ), + visitor, + isStatement + ); + } + return visitEachChild(node, visitor, context); + } + function visitCaseOrDefaultClause(node, envBinding) { + if (getUsingKindOfStatements(node.statements) !== 0 /* None */) { + if (isCaseClause(node)) { + return factory2.updateCaseClause( + node, + visitNode(node.expression, visitor, isExpression), + transformUsingDeclarations( + node.statements, + /*start*/ + 0, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ) + ); + } else { + return factory2.updateDefaultClause( + node, + transformUsingDeclarations( + node.statements, + /*start*/ + 0, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ) + ); + } + } + return visitEachChild(node, visitor, context); + } + function visitSwitchStatement(node) { + const usingKind = getUsingKindOfCaseOrDefaultClauses(node.caseBlock.clauses); + if (usingKind) { + const envBinding = createEnvBinding(); + return createDownlevelUsingStatements( + [ + factory2.updateSwitchStatement( + node, + visitNode(node.expression, visitor, isExpression), + factory2.updateCaseBlock( + node.caseBlock, + node.caseBlock.clauses.map((clause) => visitCaseOrDefaultClause(clause, envBinding)) + ) + ) + ], + envBinding, + usingKind === 2 /* Async */ + ); + } + return visitEachChild(node, visitor, context); + } + function transformUsingDeclarations(statementsIn, start, end, envBinding, topLevelStatements) { + const statements = []; + for (let i = start; i < end; i++) { + const statement = statementsIn[i]; + const usingKind = getUsingKind(statement); + if (usingKind) { + Debug.assertNode(statement, isVariableStatement); + const declarations = []; + for (let declaration of statement.declarationList.declarations) { + if (!isIdentifier(declaration.name)) { + declarations.length = 0; + break; + } + if (isNamedEvaluation(declaration)) { + declaration = transformNamedEvaluation(context, declaration); + } + const initializer = visitNode(declaration.initializer, visitor, isExpression) ?? factory2.createVoidZero(); + declarations.push(factory2.updateVariableDeclaration( + declaration, + declaration.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + emitHelpers().createAddDisposableResourceHelper( + envBinding, + initializer, + usingKind === 2 /* Async */ + ) + )); + } + if (declarations.length) { + const varList = factory2.createVariableDeclarationList(declarations, 2 /* Const */); + setOriginalNode(varList, statement.declarationList); + setTextRange(varList, statement.declarationList); + hoistOrAppendNode(factory2.updateVariableStatement( + statement, + /*modifiers*/ + void 0, + varList + )); + continue; + } + } + const result = visitor(statement); + if (isArray(result)) { + result.forEach(hoistOrAppendNode); + } else if (result) { + hoistOrAppendNode(result); + } + } + return statements; + function hoistOrAppendNode(node) { + Debug.assertNode(node, isStatement); + append(statements, hoist(node)); + } + function hoist(node) { + if (!topLevelStatements) + return node; + switch (node.kind) { + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 262 /* FunctionDeclaration */: + return hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements); + case 277 /* ExportAssignment */: + return hoistExportAssignment(node); + case 263 /* ClassDeclaration */: + return hoistClassDeclaration(node); + case 243 /* VariableStatement */: + return hoistVariableStatement(node); + } + return node; + } + } + function hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements) { + topLevelStatements.push(node); + return void 0; + } + function hoistExportAssignment(node) { + return node.isExportEquals ? hoistExportEquals(node) : hoistExportDefault(node); + } + function hoistExportDefault(node) { + if (defaultExportBinding) { + return node; + } + defaultExportBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistBindingIdentifier( + defaultExportBinding, + /*isExport*/ + true, + "default", + node + ); + let expression = node.expression; + let innerExpression = skipOuterExpressions(expression); + if (isNamedEvaluation(innerExpression)) { + innerExpression = transformNamedEvaluation( + context, + innerExpression, + /*ignoreEmptyStringLiteral*/ + false, + "default" + ); + expression = factory2.restoreOuterExpressions(expression, innerExpression); + } + const assignment = factory2.createAssignment(defaultExportBinding, expression); + return factory2.createExpressionStatement(assignment); + } + function hoistExportEquals(node) { + if (exportEqualsBinding) { + return node; + } + exportEqualsBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistVariableDeclaration(exportEqualsBinding); + const assignment = factory2.createAssignment(exportEqualsBinding, node.expression); + return factory2.createExpressionStatement(assignment); + } + function hoistClassDeclaration(node) { + if (!node.name && defaultExportBinding) { + return node; + } + const isExported2 = hasSyntacticModifier(node, 1 /* Export */); + const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + let expression = factory2.converters.convertToClassExpression(node); + if (node.name) { + hoistBindingIdentifier( + factory2.getLocalName(node), + isExported2 && !isDefault, + /*exportAlias*/ + void 0, + node + ); + expression = factory2.createAssignment(factory2.getDeclarationName(node), expression); + if (isNamedEvaluation(expression)) { + expression = transformNamedEvaluation( + context, + expression, + /*ignoreEmptyStringLiteral*/ + false + ); + } + setOriginalNode(expression, node); + setSourceMapRange(expression, node); + setCommentRange(expression, node); + } + if (isDefault && !defaultExportBinding) { + defaultExportBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistBindingIdentifier( + defaultExportBinding, + /*isExport*/ + true, + "default", + node + ); + expression = factory2.createAssignment(defaultExportBinding, expression); + if (isNamedEvaluation(expression)) { + expression = transformNamedEvaluation( + context, + expression, + /*ignoreEmptyStringLiteral*/ + false, + "default" + ); + } + setOriginalNode(expression, node); + } + return factory2.createExpressionStatement(expression); + } + function hoistVariableStatement(node) { + let expressions; + const isExported2 = hasSyntacticModifier(node, 1 /* Export */); + for (const variable of node.declarationList.declarations) { + hoistBindingElement(variable, isExported2, variable); + if (variable.initializer) { + expressions = append(expressions, hoistInitializedVariable(variable)); + } + } + if (expressions) { + const statement = factory2.createExpressionStatement(factory2.inlineExpressions(expressions)); + setOriginalNode(statement, node); + setCommentRange(statement, node); + setSourceMapRange(statement, node); + return statement; + } + return void 0; + } + function hoistInitializedVariable(node) { + Debug.assertIsDefined(node.initializer); + let target; + if (isIdentifier(node.name)) { + target = factory2.cloneNode(node.name); + setEmitFlags(target, getEmitFlags(target) & ~(32768 /* LocalName */ | 16384 /* ExportName */ | 65536 /* InternalName */)); + } else { + target = factory2.converters.convertToAssignmentPattern(node.name); + } + const assignment = factory2.createAssignment(target, node.initializer); + setOriginalNode(assignment, node); + setCommentRange(assignment, node); + setSourceMapRange(assignment, node); + return assignment; + } + function hoistBindingElement(node, isExportedDeclaration, original) { + if (isBindingPattern(node.name)) { + for (const element of node.name.elements) { + if (!isOmittedExpression(element)) { + hoistBindingElement(element, isExportedDeclaration, original); + } + } + } else { + hoistBindingIdentifier( + node.name, + isExportedDeclaration, + /*exportAlias*/ + void 0, + original + ); + } + } + function hoistBindingIdentifier(node, isExport, exportAlias, original) { + const name = isGeneratedIdentifier(node) ? node : factory2.cloneNode(node); + if (isExport) { + if (exportAlias === void 0 && !isLocalName(name)) { + const varDecl = factory2.createVariableDeclaration(name); + if (original) { + setOriginalNode(varDecl, original); + } + exportVars.push(varDecl); + return; + } + const localName = exportAlias !== void 0 ? name : void 0; + const exportName = exportAlias !== void 0 ? exportAlias : name; + const specifier = factory2.createExportSpecifier( + /*isTypeOnly*/ + false, + localName, + exportName + ); + if (original) { + setOriginalNode(specifier, original); + } + exportBindings.set(name, specifier); + } + hoistVariableDeclaration(name); + } + function createEnvBinding() { + return factory2.createUniqueName("env"); + } + function createDownlevelUsingStatements(bodyStatements, envBinding, async) { + const statements = []; + const envObject = factory2.createObjectLiteralExpression([ + factory2.createPropertyAssignment("stack", factory2.createArrayLiteralExpression()), + factory2.createPropertyAssignment("error", factory2.createVoidZero()), + factory2.createPropertyAssignment("hasError", factory2.createFalse()) + ]); + const envVar = factory2.createVariableDeclaration( + envBinding, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + envObject + ); + const envVarList = factory2.createVariableDeclarationList([envVar], 2 /* Const */); + const envVarStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + envVarList + ); + statements.push(envVarStatement); + const tryBlock = factory2.createBlock( + bodyStatements, + /*multiLine*/ + true + ); + const bodyCatchBinding = factory2.createUniqueName("e"); + const catchClause = factory2.createCatchClause( + bodyCatchBinding, + factory2.createBlock( + [ + factory2.createExpressionStatement( + factory2.createAssignment( + factory2.createPropertyAccessExpression(envBinding, "error"), + bodyCatchBinding + ) + ), + factory2.createExpressionStatement( + factory2.createAssignment( + factory2.createPropertyAccessExpression(envBinding, "hasError"), + factory2.createTrue() + ) + ) + ], + /*multiLine*/ + true + ) + ); + let finallyBlock; + if (async) { + const result = factory2.createUniqueName("result"); + finallyBlock = factory2.createBlock( + [ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([ + factory2.createVariableDeclaration( + result, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + emitHelpers().createDisposeResourcesHelper(envBinding) + ) + ], 2 /* Const */) + ), + factory2.createIfStatement(result, factory2.createExpressionStatement(factory2.createAwaitExpression(result))) + ], + /*multiLine*/ + true + ); + } else { + finallyBlock = factory2.createBlock( + [ + factory2.createExpressionStatement( + emitHelpers().createDisposeResourcesHelper(envBinding) + ) + ], + /*multiLine*/ + true + ); + } + const tryStatement = factory2.createTryStatement(tryBlock, catchClause, finallyBlock); + statements.push(tryStatement); + return statements; + } + } + function countPrologueStatements(statements) { + for (let i = 0; i < statements.length; i++) { + if (!isPrologueDirective(statements[i]) && !isCustomPrologue(statements[i])) { + return i; + } + } + return 0; + } + function isUsingVariableDeclarationList(node) { + return isVariableDeclarationList(node) && getUsingKindOfVariableDeclarationList(node) !== 0 /* None */; + } + function getUsingKindOfVariableDeclarationList(node) { + return (node.flags & 7 /* BlockScoped */) === 6 /* AwaitUsing */ ? 2 /* Async */ : (node.flags & 7 /* BlockScoped */) === 4 /* Using */ ? 1 /* Sync */ : 0 /* None */; + } + function getUsingKindOfVariableStatement(node) { + return getUsingKindOfVariableDeclarationList(node.declarationList); + } + function getUsingKind(statement) { + return isVariableStatement(statement) ? getUsingKindOfVariableStatement(statement) : 0 /* None */; + } + function getUsingKindOfStatements(statements) { + let result = 0 /* None */; + for (const statement of statements) { + const usingKind = getUsingKind(statement); + if (usingKind === 2 /* Async */) + return 2 /* Async */; + if (usingKind > result) + result = usingKind; + } + return result; + } + function getUsingKindOfCaseOrDefaultClauses(clauses) { + let result = 0 /* None */; + for (const clause of clauses) { + const usingKind = getUsingKindOfStatements(clause.statements); + if (usingKind === 2 /* Async */) + return 2 /* Async */; + if (usingKind > result) + result = usingKind; + } + return result; } var init_esnext = __esm({ "src/compiler/transformers/esnext.ts"() { @@ -97893,25 +99553,25 @@ ${lanes.join("\n")} } function visitorWorker(node) { switch (node.kind) { - case 283 /* JsxElement */: + case 284 /* JsxElement */: return visitJsxElement( node, /*isChild*/ false ); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ false ); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ false ); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -97921,21 +99581,21 @@ ${lanes.join("\n")} switch (node.kind) { case 12 /* JsxText */: return visitJsxText(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return visitJsxExpression(node); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return visitJsxElement( node, /*isChild*/ true ); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ true ); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ @@ -98143,10 +99803,10 @@ ${lanes.join("\n")} for (const prop of attr.expression.properties) { if (isSpreadAssignment(prop)) { finishObjectLiteralIfNeeded(); - expressions.push(prop.expression); + expressions.push(Debug.checkDefined(visitNode(prop.expression, visitor, isExpression))); continue; } - properties.push(prop); + properties.push(Debug.checkDefined(visitNode(prop, visitor))); } continue; } @@ -98185,7 +99845,7 @@ ${lanes.join("\n")} const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 293 /* JsxExpression */) { + if (node.kind === 294 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -98259,7 +99919,7 @@ ${lanes.join("\n")} return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 283 /* JsxElement */) { + if (node.kind === 284 /* JsxElement */) { return getTagName(node.openingElement); } else { const tagName = node.tagName; @@ -98566,7 +100226,7 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -98700,7 +100360,7 @@ ${lanes.join("\n")} hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 252 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -98767,85 +100427,85 @@ ${lanes.join("\n")} switch (node.kind) { case 126 /* StaticKeyword */: return void 0; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return visitArrowFunction(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); case 80 /* Identifier */: return visitIdentifier(node); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock( node, /*isFunctionBody*/ false ); - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return visitDoOrWhileStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 15 /* NoSubstitutionTemplateLiteral */: case 16 /* TemplateHead */: @@ -98856,13 +100516,13 @@ ${lanes.join("\n")} return visitStringLiteral(node); case 9 /* NumericLiteral */: return visitNumericLiteral(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return visitTemplateExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return visitSpreadElement(node); case 108 /* SuperKeyword */: return visitSuperKeyword( @@ -98871,18 +100531,18 @@ ${lanes.join("\n")} ); case 110 /* ThisKeyword */: return visitThisKeyword(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return visitMetaProperty(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return visitAccessorDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -98980,7 +100640,7 @@ ${lanes.join("\n")} return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments")); } } - if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) { + if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { return setOriginalNode(setTextRange( factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), node @@ -98990,13 +100650,13 @@ ${lanes.join("\n")} } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 251 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 252 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump; if (!canUseBreakOrContinue) { let labelMarker; const label = node.label; if (!label) { - if (node.kind === 251 /* BreakStatement */) { + if (node.kind === 252 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -99004,7 +100664,7 @@ ${lanes.join("\n")} labelMarker = "continue"; } } else { - if (node.kind === 251 /* BreakStatement */) { + if (node.kind === 252 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump( convertedLoopState, @@ -99210,6 +100870,104 @@ ${lanes.join("\n")} setEmitFlags(block, 3072 /* NoComments */); return block; } + function transformConstructorBodyWorker(prologueOut, statementsOut, statementsIn, statementOffset, superPath, superPathDepth, constructor, isDerivedClass, hasSynthesizedSuper, isFirstStatement) { + let mayReplaceThis = false; + const superStatementIndex = superPathDepth < superPath.length ? superPath[superPathDepth] : -1; + const leadingStatementsEnd = superStatementIndex >= 0 ? superStatementIndex : statementsIn.length; + if (isFirstStatement && superStatementIndex >= 0) { + let firstMaterialIndex = statementOffset; + while (isFirstStatement && firstMaterialIndex < superStatementIndex) { + const statement = constructor.body.statements[firstMaterialIndex]; + if (!isUninitializedVariableStatement(statement) && !isUsingDeclarationStateVariableStatement(statement)) + break; + firstMaterialIndex++; + } + isFirstStatement = superStatementIndex === firstMaterialIndex; + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, leadingStatementsEnd - statementOffset)); + const superStatement = superStatementIndex >= 0 ? statementsIn[superStatementIndex] : void 0; + if (superStatement && isTryStatement(superStatement)) { + const tryBlockStatements = []; + mayReplaceThis = transformConstructorBodyWorker( + prologueOut, + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + constructor, + isDerivedClass, + hasSynthesizedSuper, + isFirstStatement + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + const superCall = superStatement && getSuperCallFromStatement(superStatement); + let superCallExpression; + if (hasSynthesizedSuper) { + superCallExpression = createDefaultSuperCallOrThis(); + hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + } else if (superCall) { + superCallExpression = visitSuperCallInBody(superCall); + hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + } + if (isDerivedClass || superCallExpression) { + if (superCallExpression && superStatementIndex === statementsIn.length - 1 && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { + const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); + const returnStatement = factory2.createReturnStatement(superCallExpression); + setCommentRange(returnStatement, getCommentRange(superCall2)); + setEmitFlags(superCall2, 3072 /* NoComments */); + statementsOut.push(returnStatement); + return false; + } else { + if (isFirstStatement) { + insertCaptureThisForNode(statementsOut, constructor, superCallExpression || createActualThis()); + } else { + insertCaptureThisForNode(prologueOut, constructor, createActualThis()); + if (superCallExpression) { + addSuperThisCaptureThisForNode(statementsOut, superCallExpression); + } + } + mayReplaceThis = true; + } + } else { + insertCaptureThisForNodeIfNeeded(prologueOut, constructor); + } + } + if (superStatementIndex >= 0) { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } + return mayReplaceThis; + } + function isUninitializedVariableStatement(node) { + return isVariableStatement(node) && every(node.declarationList.declarations, (decl) => isIdentifier(decl.name) && !decl.initializer); + } + function isUsingDeclarationStateVariableStatement(node) { + if (!isVariableStatement(node) || node.declarationList.declarations.length !== 1) + return false; + const varDecl = node.declarationList.declarations[0]; + if (!isIdentifier(varDecl.name) || !varDecl.initializer) + return false; + const initializer = varDecl.initializer; + if (!isObjectLiteralExpression(initializer) || initializer.properties.length !== 3) + return false; + const [stackProp, errorProp, hasErrorProp] = initializer.properties; + if (!isPropertyAssignment(stackProp) || !isIdentifier(stackProp.name) || idText(stackProp.name) !== "stack" || !isArrayLiteralExpression(stackProp.initializer)) + return false; + if (!isPropertyAssignment(errorProp) || !isIdentifier(errorProp.name) || idText(errorProp.name) !== "error" || !isVoidExpression(errorProp.initializer) || !isNumericLiteral(errorProp.initializer.expression)) + return false; + if (!isPropertyAssignment(hasErrorProp) || !isIdentifier(hasErrorProp.name) || idText(hasErrorProp.name) !== "hasError" || hasErrorProp.initializer.kind !== 97 /* FalseKeyword */) + return false; + return true; + } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */; if (!constructor) @@ -99217,82 +100975,43 @@ ${lanes.join("\n")} const prologue = []; const statements = []; resumeLexicalEnvironment(); - const existingPrologue = takeWhile(constructor.body.statements, isPrologueDirective); - const { superCall, superStatementIndex } = findSuperCallAndStatementIndex(constructor.body.statements, existingPrologue); - const postSuperStatementsStart = superStatementIndex === -1 ? existingPrologue.length : superStatementIndex + 1; - let statementOffset = postSuperStatementsStart; - if (!hasSynthesizedSuper) - statementOffset = factory2.copyStandardPrologue( - constructor.body.statements, - prologue, - statementOffset, - /*ensureUseStrict*/ - false - ); - if (!hasSynthesizedSuper) - statementOffset = factory2.copyCustomPrologue( - constructor.body.statements, - statements, - statementOffset, - visitor, - /*filter*/ - void 0 - ); - let superCallExpression; - if (hasSynthesizedSuper) { - superCallExpression = createDefaultSuperCallOrThis(); - } else if (superCall) { - superCallExpression = visitSuperCallInBody(superCall); - } - if (superCallExpression) { + const standardPrologueEnd = factory2.copyStandardPrologue( + constructor.body.statements, + prologue, + /*statementOffset*/ + 0 + ); + const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, standardPrologueEnd); + if (hasSynthesizedSuper || superStatementIndices.length > 0) { hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; } - addDefaultValueAssignmentsIfNeeded2(prologue, constructor); - addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); - addRange(statements, visitNodes2( - constructor.body.statements, - visitor, - isStatement, - /*start*/ - statementOffset - )); - factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded( + const mayReplaceThis = transformConstructorBodyWorker( prologue, + statements, + constructor.body.statements, + standardPrologueEnd, + superStatementIndices, + /*superPathDepth*/ + 0, constructor, - /*copyOnWrite*/ - false + isDerivedClass, + hasSynthesizedSuper, + /*isFirstStatement*/ + true + // NOTE: this will be recalculated inside of transformConstructorBodyWorker ); - if (isDerivedClass || superCallExpression) { - if (superCallExpression && postSuperStatementsStart === constructor.body.statements.length && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { - const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); - const returnStatement = factory2.createReturnStatement(superCallExpression); - setCommentRange(returnStatement, getCommentRange(superCall2)); - setEmitFlags(superCall2, 3072 /* NoComments */); - statements.push(returnStatement); - } else { - if (superStatementIndex <= existingPrologue.length) { - insertCaptureThisForNode(statements, constructor, superCallExpression || createActualThis()); - } else { - insertCaptureThisForNode(prologue, constructor, createActualThis()); - if (superCallExpression) { - insertSuperThisCaptureThisForNode(statements, superCallExpression); - } - } - if (!isSufficientlyCoveredByReturnStatements(constructor.body)) { - statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); - } - } - } else { - insertCaptureThisForNodeIfNeeded(prologue, constructor); + addDefaultValueAssignmentsIfNeeded2(prologue, constructor); + addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); + insertCaptureNewTargetIfNeeded(prologue, constructor); + factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); + if (mayReplaceThis && !isSufficientlyCoveredByReturnStatements(constructor.body)) { + statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); } const body = factory2.createBlock( setTextRange( factory2.createNodeArray( [ - ...existingPrologue, ...prologue, - ...superStatementIndex <= existingPrologue.length ? emptyArray : visitNodes2(constructor.body.statements, visitor, isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length), ...statements ] ), @@ -99305,29 +101024,15 @@ ${lanes.join("\n")} setTextRange(body, constructor.body); return body; } - function findSuperCallAndStatementIndex(originalBodyStatements, existingPrologue) { - for (let i = existingPrologue.length; i < originalBodyStatements.length; i += 1) { - const superCall = getSuperCallFromStatement(originalBodyStatements[i]); - if (superCall) { - return { - superCall, - superStatementIndex: i - }; - } - } - return { - superStatementIndex: -1 - }; - } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 252 /* ReturnStatement */) { + if (statement.kind === 253 /* ReturnStatement */) { return true; - } else if (statement.kind === 244 /* IfStatement */) { + } else if (statement.kind === 245 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 240 /* Block */) { + } else if (statement.kind === 241 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -99601,13 +101306,13 @@ ${lanes.join("\n")} return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 218 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } return false; } - function insertSuperThisCaptureThisForNode(statements, superExpression) { + function addSuperThisCaptureThisForNode(statements, superExpression) { enableSubstitutionsForCapturedThis(); const assignSuperExpression = factory2.createExpressionStatement( factory2.createBinaryExpression( @@ -99616,7 +101321,7 @@ ${lanes.join("\n")} superExpression ) ); - insertStatementAfterCustomPrologue(statements, assignSuperExpression); + statements.push(assignSuperExpression); setCommentRange(assignSuperExpression, getOriginalNode(superExpression).parent); } function insertCaptureThisForNode(statements, node, initializer) { @@ -99639,25 +101344,25 @@ ${lanes.join("\n")} setSourceMapRange(captureThisStatement, node); insertStatementAfterCustomPrologue(statements, captureThisStatement); } - function insertCaptureNewTargetIfNeeded(statements, node, copyOnWrite) { + function insertCaptureNewTargetIfNeeded(statements, node) { if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return statements; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 175 /* Constructor */: + case 176 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), "constructor" ); break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), @@ -99696,9 +101401,6 @@ ${lanes.join("\n")} ]) ); setEmitFlags(captureNewTargetStatement, 3072 /* NoComments */ | 2097152 /* CustomPrologue */); - if (copyOnWrite) { - statements = statements.slice(); - } insertStatementAfterCustomPrologue(statements, captureNewTargetStatement); } return statements; @@ -99706,21 +101408,21 @@ ${lanes.join("\n")} function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 175 /* Constructor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -99927,7 +101629,7 @@ ${lanes.join("\n")} const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -99988,7 +101690,7 @@ ${lanes.join("\n")} multiLine = true; } } else { - Debug.assert(node.kind === 218 /* ArrowFunction */); + Debug.assert(node.kind === 219 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -100007,12 +101709,7 @@ ${lanes.join("\n")} closeBraceLocation = body; } factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded( - prologue, - node, - /*copyOnWrite*/ - false - ); + insertCaptureNewTargetIfNeeded(prologue, node); insertCaptureThisForNodeIfNeeded(prologue, node); if (some(prologue)) { multiLine = true; @@ -100090,7 +101787,7 @@ ${lanes.join("\n")} function visitVariableStatement(node) { const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); let updated; - if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { + if (convertedLoopState && (node.declarationList.flags & 7 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { let assignments; for (const decl of node.declarationList.declarations) { hoistVariableDeclarationDeclaredInConvertedLoop(convertedLoopState, decl); @@ -100122,8 +101819,8 @@ ${lanes.join("\n")} return updated; } function visitVariableDeclarationList(node) { - if (node.flags & 3 /* BlockScoped */ || node.transformFlags & 524288 /* ContainsBindingPattern */) { - if (node.flags & 3 /* BlockScoped */) { + if (node.flags & 7 /* BlockScoped */ || node.transformFlags & 524288 /* ContainsBindingPattern */) { + if (node.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration); @@ -100214,14 +101911,14 @@ ${lanes.join("\n")} } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -100277,7 +101974,7 @@ ${lanes.join("\n")} const statements = []; const initializer = node.initializer; if (isVariableDeclarationList(initializer)) { - if (node.initializer.flags & 3 /* BlockScoped */) { + if (node.initializer.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } const firstOriginalDeclaration = firstOrUndefined(initializer.declarations); @@ -100571,7 +102268,7 @@ ${lanes.join("\n")} let numInitialProperties = -1, hasComputed = false; for (let i = 0; i < properties.length; i++) { const property = properties[i]; - if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 166 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -100693,15 +102390,15 @@ ${lanes.join("\n")} } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -100753,18 +102450,18 @@ ${lanes.join("\n")} function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 260 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 261 /* VariableDeclarationList */) { loopInitializer = initializer; } break; } const loopParameters = []; const loopOutParameters = []; - if (loopInitializer && getCombinedNodeFlags(loopInitializer) & 3 /* BlockScoped */) { + if (loopInitializer && getCombinedNodeFlags(loopInitializer) & 7 /* BlockScoped */) { const hasCapturedBindingsInForHead = shouldConvertInitializerOfForStatement(node) || shouldConvertConditionOfForStatement(node) || shouldConvertIncrementorOfForStatement(node); for (const decl of loopInitializer.declarations) { processLoopVariableDeclaration(node, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForHead); @@ -101172,10 +102869,10 @@ ${lanes.join("\n")} name )); const checkFlags = resolver.getNodeCheckFlags(decl); - if (checkFlags & 262144 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) { + if (checkFlags & 65536 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) { const outParamName = factory2.createUniqueName("out_" + idText(name)); let flags = 0 /* None */; - if (checkFlags & 262144 /* NeedsLoopOutParameter */) { + if (checkFlags & 65536 /* NeedsLoopOutParameter */) { flags |= 1 /* Body */; } if (isForStatement(container)) { @@ -101196,20 +102893,20 @@ ${lanes.join("\n")} for (let i = start; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -101335,7 +103032,7 @@ ${lanes.join("\n")} let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (node.kind === 176 /* GetAccessor */) { + if (node.kind === 177 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -101699,13 +103396,13 @@ ${lanes.join("\n")} if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(218 /* ArrowFunction */); - context.enableEmitNotification(217 /* FunctionExpression */); - context.enableEmitNotification(261 /* FunctionDeclaration */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(219 /* ArrowFunction */); + context.enableEmitNotification(218 /* FunctionExpression */); + context.enableEmitNotification(262 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -101729,10 +103426,10 @@ ${lanes.join("\n")} } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 260 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -101789,11 +103486,11 @@ ${lanes.join("\n")} return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 243 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 244 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 212 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; @@ -101801,7 +103498,7 @@ ${lanes.join("\n")} return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 229 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 230 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -101824,24 +103521,24 @@ ${lanes.join("\n")} if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(285 /* JsxOpeningElement */); - context.enableEmitNotification(286 /* JsxClosingElement */); - context.enableEmitNotification(284 /* JsxSelfClosingElement */); + context.enableEmitNotification(286 /* JsxOpeningElement */); + context.enableEmitNotification(287 /* JsxClosingElement */); + context.enableEmitNotification(285 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(302 /* PropertyAssignment */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(303 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: + case 285 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -101973,13 +103670,13 @@ ${lanes.join("\n")} } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -101987,24 +103684,24 @@ ${lanes.join("\n")} } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return visitAccessorDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return visitBreakStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return visitContinueStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -102018,23 +103715,23 @@ ${lanes.join("\n")} } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return visitConditionalExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -102042,9 +103739,9 @@ ${lanes.join("\n")} } function visitGenerator(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -102229,14 +103926,14 @@ ${lanes.join("\n")} if (containsYield(right)) { let target; switch (left.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), left.name ); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), @@ -102569,35 +104266,35 @@ ${lanes.join("\n")} } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 240 /* Block */: + case 241 /* Block */: return transformAndEmitBlock(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return transformAndEmitIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return transformAndEmitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return transformAndEmitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return transformAndEmitWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -102949,7 +104646,7 @@ ${lanes.join("\n")} for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 296 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 297 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -102959,7 +104656,7 @@ ${lanes.join("\n")} let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -103932,12 +105629,12 @@ ${lanes.join("\n")} const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(214 /* TaggedTemplateExpression */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(215 /* TaggedTemplateExpression */); context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(225 /* BinaryExpression */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(226 /* BinaryExpression */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(312 /* SourceFile */); const moduleInfoMap = []; let currentSourceFile; let currentModuleInfo; @@ -103949,7 +105646,7 @@ ${lanes.join("\n")} return node; } currentSourceFile = node; - currentModuleInfo = collectExternalModuleInfo(context, node, resolver, compilerOptions); + currentModuleInfo = collectExternalModuleInfo(context, node); moduleInfoMap[getOriginalNodeId(node)] = currentModuleInfo; const transformModule2 = getTransformModuleDelegate(moduleKind); const updated = transformModule2(node); @@ -104349,63 +106046,59 @@ ${lanes.join("\n")} } function topLevelVisitor(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: - return visitImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: - return visitExportDeclaration(node); - case 276 /* ExportAssignment */: - return visitExportAssignment(node); - case 261 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: - return visitClassDeclaration(node); + case 272 /* ImportDeclaration */: + return visitTopLevelImportDeclaration(node); + case 271 /* ImportEqualsDeclaration */: + return visitTopLevelImportEqualsDeclaration(node); + case 278 /* ExportDeclaration */: + return visitTopLevelExportDeclaration(node); + case 277 /* ExportAssignment */: + return visitTopLevelExportAssignment(node); default: return topLevelNestedVisitor(node); } } function topLevelNestedVisitor(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return visitWithStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return visitIfStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return visitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return visitDefaultClause(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return visitTryStatement(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock(node); default: return visitor(node); @@ -104416,30 +106109,30 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -104462,24 +106155,24 @@ ${lanes.join("\n")} if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -104507,7 +106200,7 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitForStatement(node, isTopLevel) { - if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -104548,7 +106241,7 @@ ${lanes.join("\n")} ); } function visitForInStatement(node) { - if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -104576,7 +106269,7 @@ ${lanes.join("\n")} ); } function visitForOfStatement(node) { - if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -104956,7 +106649,7 @@ ${lanes.join("\n")} } return innerExpr; } - function visitImportDeclaration(node) { + function visitTopLevelImportDeclaration(node) { let statements; const namespaceDeclaration = getNamespaceDeclarationNode(node); if (moduleKind !== 2 /* AMD */) { @@ -105065,7 +106758,7 @@ ${lanes.join("\n")} args ); } - function visitImportEqualsDeclaration(node) { + function visitTopLevelImportEqualsDeclaration(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); let statements; if (moduleKind !== 2 /* AMD */) { @@ -105133,7 +106826,7 @@ ${lanes.join("\n")} statements = appendExportsOfImportEqualsDeclaration(statements, node); return singleOrMany(statements); } - function visitExportDeclaration(node) { + function visitTopLevelExportDeclaration(node) { if (!node.moduleSpecifier) { return void 0; } @@ -105235,7 +106928,7 @@ ${lanes.join("\n")} ); } } - function visitExportAssignment(node) { + function visitTopLevelExportAssignment(node) { if (node.isExportEquals) { return void 0; } @@ -105439,19 +107132,21 @@ ${lanes.join("\n")} if (!importClause) { return statements; } + const seen = new IdentifierNameMap(); if (importClause.name) { - statements = appendExportsOfDeclaration(statements, importClause); + statements = appendExportsOfDeclaration(statements, seen, importClause); } const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: - statements = appendExportsOfDeclaration(statements, namedBindings); + case 274 /* NamespaceImport */: + statements = appendExportsOfDeclaration(statements, seen, namedBindings); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration( statements, + seen, importBinding, /*liveBinding*/ true @@ -105466,7 +107161,7 @@ ${lanes.join("\n")} if (currentModuleInfo.exportEquals) { return statements; } - return appendExportsOfDeclaration(statements, decl); + return appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); } function appendExportsOfVariableStatement(statements, node) { return appendExportsOfVariableDeclarationList( @@ -105496,7 +107191,7 @@ ${lanes.join("\n")} } } } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer || isForInOrOfInitializer)) { - statements = appendExportsOfDeclaration(statements, decl); + statements = appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); } return statements; } @@ -105504,10 +107199,12 @@ ${lanes.join("\n")} if (currentModuleInfo.exportEquals) { return statements; } + const seen = new IdentifierNameMap(); if (hasSyntacticModifier(decl, 1 /* Export */)) { const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); statements = appendExportStatement( statements, + seen, exportName, factory2.getLocalName(decl), /*location*/ @@ -105515,17 +107212,18 @@ ${lanes.join("\n")} ); } if (decl.name) { - statements = appendExportsOfDeclaration(statements, decl); + statements = appendExportsOfDeclaration(statements, seen, decl); } return statements; } - function appendExportsOfDeclaration(statements, decl, liveBinding) { + function appendExportsOfDeclaration(statements, seen, decl, liveBinding) { const name = factory2.getDeclarationName(decl); - const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(idText(name)); + const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { statements = appendExportStatement( statements, + seen, exportSpecifier.name, name, /*location*/ @@ -105538,8 +107236,11 @@ ${lanes.join("\n")} } return statements; } - function appendExportStatement(statements, exportName, expression, location, allowComments, liveBinding) { - statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); + function appendExportStatement(statements, seen, exportName, expression, location, allowComments, liveBinding) { + if (!seen.has(exportName)) { + seen.set(exportName, true); + statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); + } return statements; } function createUnderscoreUnderscoreESModule() { @@ -105634,7 +107335,7 @@ ${lanes.join("\n")} return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -105672,11 +107373,11 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -105729,7 +107430,7 @@ ${lanes.join("\n")} return node; } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 311 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 312 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -105766,7 +107467,7 @@ ${lanes.join("\n")} return node; } function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && !isGeneratedIdentifier(node.left) && !isLocalName(node.left)) { + if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { let expression = node; @@ -105805,6 +107506,15 @@ ${lanes.join("\n")} return arrayFrom(bindingsSet); } } + } else if (isFileLevelReservedGeneratedIdentifier(name)) { + const exportSpecifiers = currentModuleInfo == null ? void 0 : currentModuleInfo.exportSpecifiers.get(name); + if (exportSpecifiers) { + const exportedNames = []; + for (const exportSpecifier of exportSpecifiers) { + exportedNames.push(exportSpecifier.name); + } + return exportedNames; + } } } } @@ -105838,10 +107548,10 @@ ${lanes.join("\n")} context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableSubstitution(225 /* BinaryExpression */); - context.enableSubstitution(235 /* MetaProperty */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableSubstitution(226 /* BinaryExpression */); + context.enableSubstitution(236 /* MetaProperty */); + context.enableEmitNotification(312 /* SourceFile */); const moduleInfoMap = []; const exportFunctionsMap = []; const noSubstitutionMap = []; @@ -105861,7 +107571,7 @@ ${lanes.join("\n")} const id = getOriginalNodeId(node); currentSourceFile = node; enclosingBlockScopedContainer = node; - moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node, resolver, compilerOptions); + moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node); exportFunction = factory2.createUniqueName("exports"); exportFunctionsMap[id] = exportFunction; contextObject = contextObjectMap[id] = factory2.createUniqueName("context"); @@ -106028,7 +107738,7 @@ ${lanes.join("\n")} if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 277 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 278 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -106176,11 +107886,11 @@ ${lanes.join("\n")} for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -106203,7 +107913,7 @@ ${lanes.join("\n")} ); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -106298,13 +108008,13 @@ ${lanes.join("\n")} } function topLevelVisitor(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return visitExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -106401,18 +108111,43 @@ ${lanes.join("\n")} if (!shouldHoistVariableDeclarationList(node.declarationList)) { return visitNode(node, visitor, isStatement); } - let expressions; - const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); - for (const variable of node.declarationList.declarations) { - if (variable.initializer) { - expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); - } else { - hoistBindingElement(variable); - } - } let statements; - if (expressions) { - statements = append(statements, setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node)); + if (isVarUsing(node.declarationList) || isVarAwaitUsing(node.declarationList)) { + const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifierLike); + const declarations = []; + for (const variable of node.declarationList.declarations) { + declarations.push(factory2.updateVariableDeclaration( + variable, + factory2.getGeneratedNameForNode(variable.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + transformInitializedVariable( + variable, + /*isExportedDeclaration*/ + false + ) + )); + } + const declarationList = factory2.updateVariableDeclarationList( + node.declarationList, + declarations + ); + statements = append(statements, factory2.updateVariableStatement(node, modifiers, declarationList)); + } else { + let expressions; + const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); + for (const variable of node.declarationList.declarations) { + if (variable.initializer) { + expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); + } else { + hoistBindingElement(variable); + } + } + if (expressions) { + statements = append(statements, setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node)); + } } statements = appendExportsOfVariableStatement( statements, @@ -106434,7 +108169,7 @@ ${lanes.join("\n")} } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 311 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 312 /* SourceFile */ || (getOriginalNode(node).flags & 7 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -106484,10 +108219,10 @@ ${lanes.join("\n")} const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -106553,7 +108288,7 @@ ${lanes.join("\n")} return statements; } const name = factory2.getDeclarationName(decl); - const exportSpecifiers = moduleInfo.exportSpecifiers.get(idText(name)); + const exportSpecifiers = moduleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { if (exportSpecifier.name.escapedText !== excludeName) { @@ -106587,45 +108322,45 @@ ${lanes.join("\n")} } function topLevelNestedVisitor(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return visitWithStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return visitIfStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return visitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return visitDefaultClause(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return visitTryStatement(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock(node); default: return visitor(node); @@ -106779,30 +108514,30 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -106875,7 +108610,7 @@ ${lanes.join("\n")} return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 311 /* SourceFile */; + return container !== void 0 && container.kind === 312 /* SourceFile */; } else { return false; } @@ -106919,7 +108654,7 @@ ${lanes.join("\n")} return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -106953,7 +108688,7 @@ ${lanes.join("\n")} } function substituteUnspecified(node) { switch (node.kind) { - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -106997,9 +108732,9 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return substituteBinaryExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -107040,7 +108775,7 @@ ${lanes.join("\n")} return node; } function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && !isGeneratedIdentifier(node.left) && !isLocalName(node.left)) { + if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { let expression = node; @@ -107067,10 +108802,19 @@ ${lanes.join("\n")} /*prefixLocals*/ false ); - if (exportContainer && exportContainer.kind === 311 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 312 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); + } else if (isGeneratedIdentifier(name) && isFileLevelReservedGeneratedIdentifier(name)) { + const exportSpecifiers = moduleInfo == null ? void 0 : moduleInfo.exportSpecifiers.get(name); + if (exportSpecifiers) { + const exportedNames2 = []; + for (const exportSpecifier of exportSpecifiers) { + exportedNames2.push(exportSpecifier.name); + } + return exportedNames2; + } } return exportedNames; } @@ -107123,7 +108867,7 @@ ${lanes.join("\n")} const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(311 /* SourceFile */); + context.enableEmitNotification(312 /* SourceFile */); context.enableSubstitution(80 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -107171,11 +108915,11 @@ ${lanes.join("\n")} } function visitor(node) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -107386,8 +109130,8 @@ ${lanes.join("\n")} const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(311 /* SourceFile */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(312 /* SourceFile */); + context.enableEmitNotification(312 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -107430,7 +109174,7 @@ ${lanes.join("\n")} return result; } function transformSourceFileOrBundle(node) { - return node.kind === 311 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 312 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -107466,7 +109210,7 @@ ${lanes.join("\n")} function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -107483,7 +109227,7 @@ ${lanes.join("\n")} function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; @@ -107514,12 +109258,12 @@ ${lanes.join("\n")} return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`); } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 210 /* PropertyAccessExpression */ || node.kind === 211 /* ElementAccessExpression */ || node.kind === 225 /* BinaryExpression */ || node.kind === 170 /* PropertySignature */ || node.kind === 168 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */ || node.kind === 168 /* Parameter */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -107536,7 +109280,7 @@ ${lanes.join("\n")} } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 177 /* SetAccessor */) { + if (node.kind === 178 /* SetAccessor */) { if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1; } else { @@ -107558,26 +109302,26 @@ ${lanes.join("\n")} function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 178 /* CallSignature */: + case 179 /* CallSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -107598,29 +109342,29 @@ ${lanes.join("\n")} } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 179 /* ConstructSignature */: - case 184 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 185 /* ConstructorType */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 178 /* CallSignature */: + case 179 /* CallSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node.parent)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 261 /* FunctionDeclaration */: - case 183 /* FunctionType */: + case 262 /* FunctionDeclaration */: + case 184 /* FunctionType */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1; default: return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`); @@ -107629,40 +109373,40 @@ ${lanes.join("\n")} function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 199 /* MappedType */: + case 200 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 178 /* CallSignature */: + case 179 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node.parent)) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 183 /* FunctionType */: - case 261 /* FunctionDeclaration */: + case 184 /* FunctionType */: + case 262 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 194 /* InferType */: + case 195 /* InferType */: diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; break; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -107730,7 +109474,7 @@ ${lanes.join("\n")} } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 168 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -107961,10 +109705,10 @@ ${lanes.join("\n")} return result; } function transformRoot(node) { - if (node.kind === 311 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 312 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 312 /* Bundle */) { + if (node.kind === 313 /* Bundle */) { isBundledEmit = true; refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); @@ -108031,7 +109775,7 @@ ${lanes.join("\n")} ); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 314 /* InputFiles */) { + if (prepend.kind === 315 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -108199,14 +109943,14 @@ ${lanes.join("\n")} if (name.kind === 80 /* Identifier */) { return name; } else { - if (name.kind === 206 /* ArrayBindingPattern */) { + if (name.kind === 207 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 231 /* OmittedExpression */) { + if (elem.kind === 232 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { @@ -108270,14 +110014,14 @@ ${lanes.join("\n")} if (shouldPrintWithInitializer(node)) { return; } - const shouldUseResolverType = node.kind === 168 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 169 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } if (!getParseTreeNode(node)) { return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */); } - if (node.kind === 177 /* SetAccessor */) { + if (node.kind === 178 /* SetAccessor */) { return factory2.createKeywordTypeNode(133 /* AnyKeyword */); } errorNameNode = node.name; @@ -108286,10 +110030,10 @@ ${lanes.join("\n")} oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 168 /* Parameter */ || node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */) { + if (node.kind === 169 /* Parameter */ || node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */) { if (isPropertySignature(node) || !node.initializer) return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); @@ -108306,21 +110050,21 @@ ${lanes.join("\n")} function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: return !resolver.isDeclarationVisible(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: return false; - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -108408,7 +110152,7 @@ ${lanes.join("\n")} function rewriteModuleSpecifier(parent2, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 266 /* ModuleDeclaration */ && parent2.kind !== 204 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 267 /* ModuleDeclaration */ && parent2.kind !== 205 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); @@ -108427,7 +110171,7 @@ ${lanes.join("\n")} function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 283 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -108464,7 +110208,7 @@ ${lanes.join("\n")} void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 @@ -108567,7 +110311,7 @@ ${lanes.join("\n")} const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 186 /* TypeLiteral */ || input.kind === 199 /* MappedType */) && input.parent.kind !== 264 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -108595,26 +110339,26 @@ ${lanes.join("\n")} } if (isProcessedComponent(input)) { switch (input.kind) { - case 232 /* ExpressionWithTypeArguments */: { + case 233 /* ExpressionWithTypeArguments */: { if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) { checkEntityNameVisibility(input.expression, enclosingDeclaration); } const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); } - case 182 /* TypeReference */: { + case 183 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 175 /* Constructor */: { + case 176 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( /*modifiers*/ ensureModifiers(input), @@ -108624,7 +110368,7 @@ ${lanes.join("\n")} ); return cleanup(ctor); } - case 173 /* MethodDeclaration */: { + case 174 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108645,7 +110389,7 @@ ${lanes.join("\n")} ); return cleanup(sig); } - case 176 /* GetAccessor */: { + case 177 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108663,7 +110407,7 @@ ${lanes.join("\n")} void 0 )); } - case 177 /* SetAccessor */: { + case 178 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108679,7 +110423,7 @@ ${lanes.join("\n")} void 0 )); } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108694,7 +110438,7 @@ ${lanes.join("\n")} ensureType(input, input.type), ensureNoInitializer(input) )); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108708,7 +110452,7 @@ ${lanes.join("\n")} input.questionToken, ensureType(input, input.type) )); - case 172 /* MethodSignature */: { + case 173 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108725,7 +110469,7 @@ ${lanes.join("\n")} ensureType(input, input.type) )); } - case 178 /* CallSignature */: { + case 179 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -108733,7 +110477,7 @@ ${lanes.join("\n")} ensureType(input, input.type) )); } - case 180 /* IndexSignature */: { + case 181 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), @@ -108741,7 +110485,7 @@ ${lanes.join("\n")} visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(133 /* AnyKeyword */) )); } - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -108756,7 +110500,7 @@ ${lanes.join("\n")} ensureNoInitializer(input) )); } - case 167 /* TypeParameter */: { + case 168 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration( input, @@ -108770,7 +110514,7 @@ ${lanes.join("\n")} } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 193 /* ConditionalType */: { + case 194 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); const oldEnclosingDecl = enclosingDeclaration; @@ -108784,13 +110528,13 @@ ${lanes.join("\n")} Debug.assert(falseType); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 183 /* FunctionType */: { + case 184 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 184 /* ConstructorType */: { + case 185 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 204 /* ImportType */: { + case 205 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -108830,7 +110574,7 @@ ${lanes.join("\n")} } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 173 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -108839,7 +110583,7 @@ ${lanes.join("\n")} if (shouldStripInternal(input)) return; switch (input.kind) { - case 277 /* ExportDeclaration */: { + case 278 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -108853,7 +110597,7 @@ ${lanes.join("\n")} getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -108894,6 +110638,21 @@ ${lanes.join("\n")} const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (258047 /* All */ ^ 1 /* Export */)); return factory2.updateModifiers(statement, modifiers); } + function updateModuleDeclarationAndKeyword(node, modifiers, name, body) { + const updated = factory2.updateModuleDeclaration(node, modifiers, name, body); + if (isAmbientModule(updated) || updated.flags & 32 /* Namespace */) { + return updated; + } + const fixed = factory2.createModuleDeclaration( + updated.modifiers, + updated.name, + updated.body, + updated.flags | 32 /* Namespace */ + ); + setOriginalNode(fixed, updated); + setTextRange(fixed, updated); + return fixed; + } function transformTopLevelDeclaration(input) { if (lateMarkedStatements) { while (orderedRemoveItem(lateMarkedStatements, input)) @@ -108902,10 +110661,10 @@ ${lanes.join("\n")} if (shouldStripInternal(input)) return; switch (input.kind) { - case 270 /* ImportEqualsDeclaration */: { + case 271 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 271 /* ImportDeclaration */: { + case 272 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -108925,7 +110684,7 @@ ${lanes.join("\n")} } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 264 /* TypeAliasDeclaration */: { + case 265 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -108937,7 +110696,7 @@ ${lanes.join("\n")} needsDeclare = previousNeedsDeclare; return clean2; } - case 263 /* InterfaceDeclaration */: { + case 264 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -108947,7 +110706,7 @@ ${lanes.join("\n")} visitNodes2(input.members, visitDeclarationSubtree, isTypeElement) )); } - case 261 /* FunctionDeclaration */: { + case 262 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -108967,7 +110726,7 @@ ${lanes.join("\n")} void 0, clean2.name || factory2.createIdentifier("_default"), factory2.createModuleBlock([]), - 16 /* Namespace */ + 32 /* Namespace */ ); setParent(fakespace, enclosingDeclaration); fakespace.locals = createSymbolTable(props); @@ -109017,7 +110776,7 @@ ${lanes.join("\n")} })) )); } - const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 16 /* Namespace */); + const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 32 /* Namespace */); if (!hasEffectiveModifier(clean2, 1024 /* Default */)) { return [clean2, namespaceDecl]; } @@ -109056,17 +110815,17 @@ ${lanes.join("\n")} return clean2; } } - case 266 /* ModuleDeclaration */: { + case 267 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 267 /* ModuleBlock */) { + if (inner && inner.kind === 268 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; needsScopeFixMarker = false; const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement); let lateStatements = transformAndReplaceLatePaintedStatements(statements); - if (input.flags & 16777216 /* Ambient */) { + if (input.flags & 33554432 /* Ambient */) { needsScopeFixMarker = false; } if (!isGlobalScopeAugmentation(input) && !hasScopeMarker2(lateStatements) && !resultHasScopeMarker) { @@ -109081,7 +110840,7 @@ ${lanes.join("\n")} needsScopeFixMarker = oldNeedsScopeFix; resultHasScopeMarker = oldHasScopeFix; const mods = ensureModifiers(input); - return cleanup(factory2.updateModuleDeclaration( + return cleanup(updateModuleDeclarationAndKeyword( input, mods, isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, @@ -109095,7 +110854,7 @@ ${lanes.join("\n")} const id = getOriginalNodeId(inner); const body = lateStatementReplacementMap.get(id); lateStatementReplacementMap.delete(id); - return cleanup(factory2.updateModuleDeclaration( + return cleanup(updateModuleDeclarationAndKeyword( input, mods, input.name, @@ -109103,7 +110862,7 @@ ${lanes.join("\n")} )); } } - case 262 /* ClassDeclaration */: { + case 263 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -109219,10 +110978,10 @@ ${lanes.join("\n")} )); } } - case 242 /* VariableStatement */: { + case 243 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 265 /* EnumDeclaration */: { + case 266 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -109239,7 +110998,7 @@ ${lanes.join("\n")} if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 266 /* ModuleDeclaration */) { + if (input.kind === 267 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -109256,13 +111015,23 @@ ${lanes.join("\n")} const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration); if (!length(nodes)) return; - return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes)); + const modifiers = factory2.createNodeArray(ensureModifiers(input)); + let declList; + if (isVarUsing(input.declarationList) || isVarAwaitUsing(input.declarationList)) { + declList = factory2.createVariableDeclarationList(nodes, 2 /* Const */); + setOriginalNode(declList, input.declarationList); + setTextRange(declList, input.declarationList); + setCommentRange(declList, input.declarationList); + } else { + declList = factory2.updateVariableDeclarationList(input.declarationList, nodes); + } + return factory2.updateVariableStatement(input, modifiers, declList); } function recreateBindingPattern(d) { return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 231 /* OmittedExpression */) { + if (e.kind === 232 /* OmittedExpression */) { return; } if (e.name) { @@ -109322,7 +111091,7 @@ ${lanes.join("\n")} function ensureModifierFlags(node) { let mask2 = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; - const parentIsFile = node.parent.kind === 311 /* SourceFile */; + const parentIsFile = node.parent.kind === 312 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask2 ^= 2 /* Ambient */; additions = 0 /* None */; @@ -109348,7 +111117,7 @@ ${lanes.join("\n")} } } function isAlwaysType(node) { - if (node.kind === 263 /* InterfaceDeclaration */) { + if (node.kind === 264 /* InterfaceDeclaration */) { return true; } return false; @@ -109368,57 +111137,57 @@ ${lanes.join("\n")} } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 176 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 177 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 168 /* Parameter */: - case 259 /* VariableDeclaration */: + case 169 /* Parameter */: + case 260 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 242 /* VariableStatement */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 243 /* VariableStatement */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 179 /* ConstructSignature */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 180 /* IndexSignature */: - case 259 /* VariableDeclaration */: - case 167 /* TypeParameter */: - case 232 /* ExpressionWithTypeArguments */: - case 182 /* TypeReference */: - case 193 /* ConditionalType */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 204 /* ImportType */: + case 180 /* ConstructSignature */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 181 /* IndexSignature */: + case 260 /* VariableDeclaration */: + case 168 /* TypeParameter */: + case 233 /* ExpressionWithTypeArguments */: + case 183 /* TypeReference */: + case 194 /* ConditionalType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 205 /* ImportType */: return true; } return false; @@ -109467,16 +111236,17 @@ ${lanes.join("\n")} transformers.push(transformTypeScript); if (compilerOptions.experimentalDecorators) { transformers.push(transformLegacyDecorators); - } else if (languageVersion < 99 /* ESNext */ || !useDefineForClassFields) { - transformers.push(transformESDecorators); } - transformers.push(transformClassFields); if (getJSXTransformEnabled(compilerOptions)) { transformers.push(transformJsx); } if (languageVersion < 99 /* ESNext */) { transformers.push(transformESNext); } + if (!compilerOptions.experimentalDecorators && (languageVersion < 99 /* ESNext */ || !useDefineForClassFields)) { + transformers.push(transformESDecorators); + } + transformers.push(transformClassFields); if (languageVersion < 8 /* ES2021 */) { transformers.push(transformES2021); } @@ -109535,7 +111305,7 @@ ${lanes.join("\n")} } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a, _b; - const enabledSyntaxKindFeatures = new Array(362 /* Count */); + const enabledSyntaxKindFeatures = new Array(363 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -109614,7 +111384,7 @@ ${lanes.join("\n")} state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 311 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 312 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); (_b = tracing) == null ? void 0 : _b.pop(); } @@ -109942,7 +111712,7 @@ ${lanes.join("\n")} } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 312 /* Bundle */) { + if (sourceFile.kind === 313 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -110334,8 +112104,8 @@ ${lanes.join("\n")} } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, mapOptions) { const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 312 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 311 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 313 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 312 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -110397,7 +112167,7 @@ ${lanes.join("\n")} writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 311 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 312 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -110717,11 +112487,11 @@ ${lanes.join("\n")} break; } switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return printFile(node); - case 312 /* Bundle */: + case 313 /* Bundle */: return printBundle(node); - case 313 /* UnparsedSource */: + case 314 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -111100,301 +112870,301 @@ ${lanes.join("\n")} return emitIdentifier(node); case 81 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return emitQualifiedName(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return emitTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return emitParameter(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return emitDecorator(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return emitPropertySignature(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 172 /* MethodSignature */: + case 173 /* MethodSignature */: return emitMethodSignature(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return emitConstructor(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return emitAccessorDeclaration(node); - case 178 /* CallSignature */: + case 179 /* CallSignature */: return emitCallSignature(node); - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return emitConstructSignature(node); - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return emitIndexSignature(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return emitTypePredicate(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return emitTypeReference(node); - case 183 /* FunctionType */: + case 184 /* FunctionType */: return emitFunctionType(node); - case 184 /* ConstructorType */: + case 185 /* ConstructorType */: return emitConstructorType(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return emitTypeQuery(node); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return emitTypeLiteral(node); - case 187 /* ArrayType */: + case 188 /* ArrayType */: return emitArrayType(node); - case 188 /* TupleType */: + case 189 /* TupleType */: return emitTupleType(node); - case 189 /* OptionalType */: + case 190 /* OptionalType */: return emitOptionalType(node); - case 191 /* UnionType */: + case 192 /* UnionType */: return emitUnionType(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return emitIntersectionType(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return emitConditionalType(node); - case 194 /* InferType */: + case 195 /* InferType */: return emitInferType(node); - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return emitParenthesizedType(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 196 /* ThisType */: + case 197 /* ThisType */: return emitThisType(); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return emitTypeOperator(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return emitMappedType(node); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return emitLiteralType(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return emitTemplateType(node); - case 203 /* TemplateLiteralTypeSpan */: + case 204 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return emitImportTypeNode(node); - case 205 /* ObjectBindingPattern */: + case 206 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return emitBindingElement(node); - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return emitTemplateSpan(node); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 240 /* Block */: + case 241 /* Block */: return emitBlock(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return emitVariableStatement(node); - case 241 /* EmptyStatement */: + case 242 /* EmptyStatement */: return emitEmptyStatement( /*isEmbeddedStatement*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return emitExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return emitIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return emitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return emitWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return emitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return emitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return emitForOfStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return emitContinueStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return emitBreakStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return emitReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return emitWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return emitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return emitLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return emitThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return emitTryStatement(node); - case 258 /* DebuggerStatement */: + case 259 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return emitClassDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return emitModuleBlock(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return emitCaseBlock(node); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return emitImportDeclaration(node); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return emitImportClause(node); - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return emitNamespaceImport(node); - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return emitNamespaceExport(node); - case 274 /* NamedImports */: + case 275 /* NamedImports */: return emitNamedImports(node); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return emitImportSpecifier(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return emitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return emitExportDeclaration(node); - case 278 /* NamedExports */: + case 279 /* NamedExports */: return emitNamedExports(node); - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return emitExportSpecifier(node); - case 299 /* AssertClause */: + case 300 /* AssertClause */: return emitAssertClause(node); - case 300 /* AssertEntry */: + case 301 /* AssertEntry */: return emitAssertEntry(node); - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return; - case 282 /* ExternalModuleReference */: + case 283 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 12 /* JsxText */: return emitJsxText(node); - case 285 /* JsxOpeningElement */: - case 288 /* JsxOpeningFragment */: + case 286 /* JsxOpeningElement */: + case 289 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 286 /* JsxClosingElement */: - case 289 /* JsxClosingFragment */: + case 287 /* JsxClosingElement */: + case 290 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return emitJsxAttribute(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return emitJsxAttributes(node); - case 292 /* JsxSpreadAttribute */: + case 293 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return emitJsxExpression(node); - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return emitJsxNamespacedName(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return emitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return emitDefaultClause(node); - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return emitHeritageClause(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return emitCatchClause(node); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 305 /* EnumMember */: + case 306 /* EnumMember */: return emitEnumMember(node); - case 306 /* UnparsedPrologue */: + case 307 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 313 /* UnparsedSource */: - case 307 /* UnparsedPrepend */: + case 314 /* UnparsedSource */: + case 308 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 308 /* UnparsedText */: - case 309 /* UnparsedInternalText */: + case 309 /* UnparsedText */: + case 310 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 310 /* UnparsedSyntheticReference */: + case 311 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 311 /* SourceFile */: + case 312 /* SourceFile */: return emitSourceFile(node); - case 312 /* Bundle */: + case 313 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 314 /* InputFiles */: + case 315 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 315 /* JSDocTypeExpression */: + case 316 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 316 /* JSDocNameReference */: + case 317 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 318 /* JSDocAllType */: + case 319 /* JSDocAllType */: return writePunctuation("*"); - case 319 /* JSDocUnknownType */: + case 320 /* JSDocUnknownType */: return writePunctuation("?"); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 321 /* JSDocNonNullableType */: + case 322 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 190 /* RestType */: - case 324 /* JSDocVariadicType */: + case 191 /* RestType */: + case 325 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 325 /* JSDocNamepathType */: + case 326 /* JSDocNamepathType */: return; - case 326 /* JSDoc */: + case 327 /* JSDoc */: return emitJSDoc(node); - case 328 /* JSDocTypeLiteral */: + case 329 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 329 /* JSDocSignature */: + case 330 /* JSDocSignature */: return emitJSDocSignature(node); - case 333 /* JSDocTag */: - case 338 /* JSDocClassTag */: - case 343 /* JSDocOverrideTag */: + case 334 /* JSDocTag */: + case 339 /* JSDocClassTag */: + case 344 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 334 /* JSDocAugmentsTag */: - case 335 /* JSDocImplementsTag */: + case 335 /* JSDocAugmentsTag */: + case 336 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 336 /* JSDocAuthorTag */: - case 337 /* JSDocDeprecatedTag */: + case 337 /* JSDocAuthorTag */: + case 338 /* JSDocDeprecatedTag */: return; - case 339 /* JSDocPublicTag */: - case 340 /* JSDocPrivateTag */: - case 341 /* JSDocProtectedTag */: - case 342 /* JSDocReadonlyTag */: + case 340 /* JSDocPublicTag */: + case 341 /* JSDocPrivateTag */: + case 342 /* JSDocProtectedTag */: + case 343 /* JSDocReadonlyTag */: return; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return emitJSDocOverloadTag(node); - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 346 /* JSDocEnumTag */: - case 348 /* JSDocReturnTag */: - case 349 /* JSDocThisTag */: - case 350 /* JSDocTypeTag */: - case 355 /* JSDocThrowsTag */: - case 356 /* JSDocSatisfiesTag */: + case 347 /* JSDocEnumTag */: + case 349 /* JSDocReturnTag */: + case 350 /* JSDocThisTag */: + case 351 /* JSDocTypeTag */: + case 356 /* JSDocThrowsTag */: + case 357 /* JSDocSatisfiesTag */: return emitJSDocSimpleTypedTag(node); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 353 /* JSDocSeeTag */: + case 354 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 358 /* NotEmittedStatement */: + case 359 /* NotEmittedStatement */: return; } if (isExpression(node)) { @@ -111427,83 +113197,83 @@ ${lanes.join("\n")} return emitIdentifier(node); case 81 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return emitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return emitNewExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return emitFunctionExpression(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return emitArrowFunction(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return emitDeleteExpression(node); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return emitVoidExpression(node); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return emitAwaitExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return emitBinaryExpression(node); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return emitConditionalExpression(node); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return emitTemplateExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return emitYieldExpression(node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return emitSpreadElement(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return emitClassExpression(node); - case 231 /* OmittedExpression */: + case 232 /* OmittedExpression */: return; - case 233 /* AsExpression */: + case 234 /* AsExpression */: return emitAsExpression(node); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return emitNonNullExpression(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return emitMetaProperty(node); - case 236 /* SyntheticExpression */: + case 237 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return; - case 283 /* JsxElement */: + case 284 /* JsxElement */: return emitJsxElement(node); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return emitJsxFragment(node); - case 357 /* SyntaxList */: + case 358 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 358 /* NotEmittedStatement */: + case 359 /* NotEmittedStatement */: return; - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return emitCommaList(node); - case 361 /* SyntheticReferenceExpression */: + case 362 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -111549,7 +113319,7 @@ ${lanes.join("\n")} } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 312 /* Bundle */ ? node : void 0; + const bundle = node.kind === 313 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -111624,7 +113394,7 @@ ${lanes.join("\n")} updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 308 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 309 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -111660,7 +113430,7 @@ ${lanes.join("\n")} } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 241 /* EmptyStatement */, + node.kind === 242 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -111732,7 +113502,7 @@ ${lanes.join("\n")} emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 323 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 324 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -111808,7 +113578,7 @@ ${lanes.join("\n")} /*allowDecorators*/ true ); - const token = node.kind === 176 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; + const token = node.kind === 177 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; emitTokenWithComment(token, pos, writeKeyword, node); writeSpace(); emit(node.name); @@ -112162,7 +113932,7 @@ ${lanes.join("\n")} return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */)); } else if (isAccessExpression(expression)) { const constantValue = getConstantValue(expression); - return typeof constantValue === "number" && isFinite(constantValue) && Math.floor(constantValue) === constantValue; + return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue; } } function emitElementAccessExpression(node) { @@ -112273,7 +114043,7 @@ ${lanes.join("\n")} } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 223 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); + return operand.kind === 224 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary); @@ -112532,7 +114302,7 @@ ${lanes.join("\n")} if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); emitTokenWithComment(93 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 244 /* IfStatement */) { + if (node.elseStatement.kind === 245 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -112599,7 +114369,7 @@ ${lanes.join("\n")} emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(164 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -112607,7 +114377,7 @@ ${lanes.join("\n")} } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 260 /* VariableDeclarationList */) { + if (node.kind === 261 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -112643,7 +114413,7 @@ ${lanes.join("\n")} } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 293 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */; emitTrailingCommentsOfPosition( pos, /*prefixSpace*/ @@ -112755,7 +114525,14 @@ ${lanes.join("\n")} emitInitializer(node.initializer, ((_a = node.type) == null ? void 0 : _a.end) ?? ((_c = (_b = node.name.emitNode) == null ? void 0 : _b.typeNode) == null ? void 0 : _c.end) ?? node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma); } function emitVariableDeclarationList(node) { - writeKeyword(isLet(node) ? "let" : isVarConst(node) ? "const" : "var"); + if (isVarAwaitUsing(node)) { + writeKeyword("await"); + writeSpace(); + writeKeyword("using"); + } else { + const head = isLet(node) ? "let" : isVarConst(node) ? "const" : isVarUsing(node) ? "using" : "var"; + writeKeyword(head); + } writeSpace(); emitList(node, node.declarations, 528 /* VariableDeclarationList */); } @@ -112964,8 +114741,8 @@ ${lanes.join("\n")} /*allowDecorators*/ false ); - if (~node.flags & 1024 /* GlobalAugmentation */) { - writeKeyword(node.flags & 16 /* Namespace */ ? "namespace" : "module"); + if (~node.flags & 2048 /* GlobalAugmentation */) { + writeKeyword(node.flags & 32 /* Namespace */ ? "namespace" : "module"); writeSpace(); } emit(node.name); @@ -113041,7 +114818,7 @@ ${lanes.join("\n")} if (node.importClause) { emit(node.importClause); writeSpace(); - emitTokenWithComment(160 /* FromKeyword */, node.importClause.end, writeKeyword, node); + emitTokenWithComment(161 /* FromKeyword */, node.importClause.end, writeKeyword, node); writeSpace(); } emitExpression(node.moduleSpecifier); @@ -113108,7 +114885,7 @@ ${lanes.join("\n")} if (node.moduleSpecifier) { writeSpace(); const fromPos = node.exportClause ? node.exportClause.end : nextPos; - emitTokenWithComment(160 /* FromKeyword */, fromPos, writeKeyword, node); + emitTokenWithComment(161 /* FromKeyword */, fromPos, writeKeyword, node); writeSpace(); emitExpression(node.moduleSpecifier); } @@ -113363,7 +115140,7 @@ ${lanes.join("\n")} } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 350 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 351 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -113407,7 +115184,7 @@ ${lanes.join("\n")} function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 315 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 316 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -113425,7 +115202,7 @@ ${lanes.join("\n")} emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 328 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 329 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -114308,7 +116085,7 @@ ${lanes.join("\n")} return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 216 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -114395,84 +116172,84 @@ ${lanes.join("\n")} if (!node) return; switch (node.kind) { - case 240 /* Block */: + case 241 /* Block */: forEach(node.statements, generateNames); break; - case 255 /* LabeledStatement */: - case 253 /* WithStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 256 /* LabeledStatement */: + case 254 /* WithStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: generateNames(node.statement); break; - case 244 /* IfStatement */: + case 245 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 298 /* CatchClause */: + case 299 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: generateNames(node.declarationList); break; - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: generateNames(node.importClause); break; - case 272 /* ImportClause */: + case 273 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: forEach(node.elements, generateNames); break; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -114481,12 +116258,12 @@ ${lanes.join("\n")} if (!node) return; switch (node.kind) { - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -114744,16 +116521,16 @@ ${lanes.join("\n")} prefix, suffix ); - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: { + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: { Debug.assert(!prefix && !suffix && !privateName); const name = node.name; if (name && !isGeneratedIdentifier(name)) { @@ -114768,17 +116545,17 @@ ${lanes.join("\n")} } return generateNameForExportDefault(); } - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return makeTempVariableName( 0 /* Auto */, /*reservedInNestedScopes*/ @@ -114872,7 +116649,7 @@ ${lanes.join("\n")} emitLeadingComments( pos, /*isEmittedNode*/ - node.kind !== 358 /* NotEmittedStatement */ + node.kind !== 359 /* NotEmittedStatement */ ); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) { @@ -114880,7 +116657,7 @@ ${lanes.join("\n")} } if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 260 /* VariableDeclarationList */) { + if (node.kind === 261 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -114896,7 +116673,7 @@ ${lanes.join("\n")} containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 358 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 359 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -115168,7 +116945,7 @@ ${lanes.join("\n")} } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 128 /* NoNestedSourceMaps */) { @@ -115183,7 +116960,7 @@ ${lanes.join("\n")} if (emitFlags & 128 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -115350,14 +117127,14 @@ ${lanes.join("\n")} }); // src/compiler/watchUtilities.ts - function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames) { + function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) { if (!host.getDirectories || !host.readDirectory) { return void 0; } const cachedReadDirectoryResult = /* @__PURE__ */ new Map(); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); return { - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, fileExists, readFile: (path, encoding) => host.readFile(path, encoding), directoryExists: host.directoryExists && directoryExists, @@ -115479,7 +117256,7 @@ ${lanes.join("\n")} const rootResult = tryReadDirectory2(rootDir, rootDirPath); let rootSymLinkResult; if (rootResult !== void 0) { - return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath); + return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath); } return host.readDirectory(rootDir, extensions, excludes, includes, depth); function getFileSystemEntries(dir) { @@ -115674,7 +117451,7 @@ ${lanes.join("\n")} program, extraFileExtensions, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 }) { @@ -115690,7 +117467,7 @@ ${lanes.join("\n")} writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`); return true; } - if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) { + if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) { writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`); return true; } @@ -115747,7 +117524,7 @@ ${lanes.join("\n")} function createExcludeHandlingAddWatch(key) { return (file, cb, flags, options, detailInfo1, detailInfo2) => { var _a; - return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call( + return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call( /*thisArgs*/ void 0, file, @@ -115759,7 +117536,7 @@ ${lanes.join("\n")} ) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2); }; } - function useCaseSensitiveFileNames() { + function useCaseSensitiveFileNames2() { return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames(); } function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) { @@ -117260,13 +119037,13 @@ ${lanes.join("\n")} sourceFileOptions, /*onError*/ void 0, - shouldCreateNewSourceFile || sourceFileOptions.impliedNodeFormat !== oldSourceFile.impliedNodeFormat + shouldCreateNewSourceFile ) : host.getSourceFile( oldSourceFile.fileName, sourceFileOptions, /*onError*/ void 0, - shouldCreateNewSourceFile || sourceFileOptions.impliedNodeFormat !== oldSourceFile.impliedNodeFormat + shouldCreateNewSourceFile ); if (!newSourceFile) { return 0 /* Not */; @@ -117317,7 +119094,7 @@ ${lanes.join("\n")} structureIsReused = 1 /* SafeModules */; } else if (!arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) { structureIsReused = 1 /* SafeModules */; - } else if ((oldSourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */) !== (newSourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */)) { + } else if ((oldSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */) !== (newSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */)) { structureIsReused = 1 /* SafeModules */; } else if (!arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) { structureIsReused = 1 /* SafeModules */; @@ -117708,89 +119485,97 @@ ${lanes.join("\n")} return diagnostics; function walk(node, parent2) { switch (parent2.kind) { - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: if (parent2.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 259 /* VariableDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 260 /* VariableDeclaration */: if (parent2.type === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); return "skip"; } } switch (node.kind) { - case 272 /* ImportClause */: + case 273 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? "import...type" : "export...type")); return "skip"; } break; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: const heritageClause = node; if (heritageClause.token === 119 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: const interfaceKeyword = tokenToString(120 /* InterfaceKeyword */); Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); return "skip"; - case 266 /* ModuleDeclaration */: - const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */); + case 267 /* ModuleDeclaration */: + const moduleKeyword = node.flags & 32 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */); Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); return "skip"; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 265 /* EnumDeclaration */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + if (!node.body) { + diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Signature_declarations_can_only_be_used_in_TypeScript_files)); + return "skip"; + } + return; + case 266 /* EnumDeclaration */: const enumKeyword = Debug.checkDefined(tokenToString(94 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); return "skip"; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 233 /* AsExpression */: + case 234 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: Debug.fail(); } } @@ -117825,26 +119610,26 @@ ${lanes.join("\n")} } } switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: if (nodes === parent2.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 242 /* VariableStatement */); + checkModifiers(parent2.modifiers, parent2.kind === 243 /* VariableStatement */); return "skip"; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (nodes === parent2.modifiers) { for (const modifier of nodes) { if (isModifier(modifier) && modifier.kind !== 126 /* StaticKeyword */ && modifier.kind !== 129 /* AccessorKeyword */) { @@ -117854,18 +119639,18 @@ ${lanes.join("\n")} return "skip"; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (nodes === parent2.modifiers && some(nodes, isModifier)) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: - case 214 /* TaggedTemplateExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 215 /* TaggedTemplateExpression */: if (nodes === parent2.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -117886,7 +119671,7 @@ ${lanes.join("\n")} case 148 /* ReadonlyKeyword */: case 138 /* DeclareKeyword */: case 128 /* AbstractKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); @@ -117984,8 +119769,8 @@ ${lanes.join("\n")} addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */); setParent(externalHelpersModuleReference, importDecl); setParent(importDecl, file); - externalHelpersModuleReference.flags &= ~8 /* Synthesized */; - importDecl.flags &= ~8 /* Synthesized */; + externalHelpersModuleReference.flags &= ~16 /* Synthesized */; + importDecl.flags &= ~16 /* Synthesized */; return externalHelpersModuleReference; } function collectExternalModuleReferences(file) { @@ -118014,7 +119799,7 @@ ${lanes.join("\n")} ); } const shouldProcessRequires = isJavaScriptFile && shouldResolveJsRequire(options); - if (file.flags & 2097152 /* PossiblyContainsDynamicImport */ || shouldProcessRequires) { + if (file.flags & 4194304 /* PossiblyContainsDynamicImport */ || shouldProcessRequires) { collectDynamicImportOrRequireCalls(file); } file.imports = imports || emptyArray; @@ -118222,7 +120007,7 @@ ${lanes.join("\n")} return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 }; } function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) { - var _a2, _b2; + var _a2; const path = toPath3(fileName); if (useSourceOfProjectReferenceRedirect) { let source = getSourceOfProjectReferenceRedirect(path); @@ -118301,7 +120086,7 @@ ${lanes.join("\n")} Diagnostics.Cannot_read_file_0_Colon_1, [fileName, hostErrorMessage] ), - shouldCreateNewSourceFile || ((_a2 = oldProgram == null ? void 0 : oldProgram.getSourceFileByPath(toPath3(fileName))) == null ? void 0 : _a2.impliedNodeFormat) !== sourceFileOptions.impliedNodeFormat + shouldCreateNewSourceFile ); if (packageId) { const packageIdKey = packageIdToString(packageId); @@ -118326,7 +120111,7 @@ ${lanes.join("\n")} file.path = path; file.resolvedPath = toPath3(fileName); file.originalFileName = originalFileName; - file.packageJsonLocations = ((_b2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _b2.length) ? sourceFileOptions.packageJsonLocations : void 0; + file.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0; file.packageJsonScope = sourceFileOptions.packageJsonScope; addFileIncludeReason(file, reason); if (host.useCaseSensitiveFileNames()) { @@ -118636,7 +120421,7 @@ ${lanes.join("\n")} currentNodeModulesDepth++; } const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth; - const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index]) || !(file.imports[index].flags & 8388608 /* JSDoc */)); + const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index]) || !(file.imports[index].flags & 16777216 /* JSDoc */)); if (elideImport) { modulesWithElidedImports.set(file.path, true); } else if (shouldAddFile) { @@ -118995,6 +120780,13 @@ ${lanes.join("\n")} if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind)) { createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later, "bundler"); } + if (ModuleKind[moduleKind] && (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) && !(3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) { + const moduleKindName = ModuleKind[moduleKind]; + createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleKindName, moduleKindName); + } else if (ModuleResolutionKind[moduleResolution] && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */) && !(100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */)) { + const moduleResolutionName = ModuleResolutionKind[moduleResolution]; + createOptionValueDiagnostic("module", Diagnostics.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, moduleResolutionName, moduleResolutionName); + } if (!options.noEmit && !options.suppressOutputPathCheck) { const emitHost = getEmitHost(); const emitFilesSeen = /* @__PURE__ */ new Set(); @@ -119684,6 +121476,9 @@ ${lanes.join("\n")} return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: (f) => directoryStructureHost.readFile(f), + directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists), + getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories), + realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(), getCurrentDirectory: () => host.getCurrentDirectory(), onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined, @@ -119860,7 +121655,7 @@ ${lanes.join("\n")} Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code, Diagnostics.Duplicate_label_0.code, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, - Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block.code, + Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code, @@ -119890,14 +121685,17 @@ ${lanes.join("\n")} Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind.code, Diagnostics._0_modifier_cannot_be_used_here.code, Diagnostics._0_modifier_must_precede_1_modifier.code, - Diagnostics.const_declarations_can_only_be_declared_inside_a_block.code, - Diagnostics.const_declarations_must_be_initialized.code, + Diagnostics._0_declarations_can_only_be_declared_inside_a_block.code, + Diagnostics._0_declarations_must_be_initialized.code, Diagnostics.extends_clause_already_seen.code, - Diagnostics.let_declarations_can_only_be_declared_inside_a_block.code, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code, Diagnostics.Class_constructor_may_not_be_a_generator.code, Diagnostics.Class_constructor_may_not_be_an_accessor.code, - Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code + Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class.code, + // Type errors + Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code ]); emitSkippedWithNoDiagnostics = { diagnostics: emptyArray, sourceMaps: void 0, emittedFiles: void 0, emitSkipped: true }; } @@ -122733,17 +124531,17 @@ ${lanes.join("\n")} function getWatchErrorSummaryDiagnosticMessage(errorCount) { return errorCount === 1 ? Diagnostics.Found_1_error_Watching_for_file_changes : Diagnostics.Found_0_errors_Watching_for_file_changes; } - function prettyPathForFileError(error, cwd) { - const line = formatColorAndReset(":" + error.line, "\x1B[90m" /* Grey */); - if (pathIsAbsolute(error.fileName) && pathIsAbsolute(cwd)) { + function prettyPathForFileError(error2, cwd) { + const line = formatColorAndReset(":" + error2.line, "\x1B[90m" /* Grey */); + if (pathIsAbsolute(error2.fileName) && pathIsAbsolute(cwd)) { return getRelativePathFromDirectory( cwd, - error.fileName, + error2.fileName, /*ignoreCase*/ false ) + line; } - return error.fileName + line; + return error2.fileName + line; } function getErrorSummaryText(errorCount, filesInError, newLine, host) { if (errorCount === 0) @@ -122876,12 +124674,12 @@ ${lanes.join("\n")} return true; const isJsonFile = fileExtensionIs(fileName, ".json" /* Json */); const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory())); - const useCaseSensitiveFileNames = program.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames(); return find((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => { if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */)) return false; const pattern = getPatternFromSpec(includeSpec, basePath, "files"); - return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames).test(fileName); + return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName); }); } function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) { @@ -123085,7 +124883,7 @@ ${lanes.join("\n")} return result; } function createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) { - const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames(); const compilerHost = { getSourceFile: createGetSourceFile( (fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding), @@ -123101,8 +124899,8 @@ ${lanes.join("\n")} (path) => host.directoryExists(path) ), getCurrentDirectory: memoize(() => host.getCurrentDirectory()), - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, - getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames), + useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, + getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2), getNewLine: () => getNewLineCharacter(getCompilerOptions()), fileExists: (f) => host.fileExists(f), readFile: (f) => host.readFile(f), @@ -123383,7 +125181,7 @@ ${lanes.join("\n")} const sourceFilesCache = /* @__PURE__ */ new Map(); let missingFilePathsRequestedForRelease; let hasChangedCompilerOptions = false; - const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames(); const currentDirectory = host.getCurrentDirectory(); const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host; let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host; @@ -123391,7 +125189,7 @@ ${lanes.join("\n")} let configFileParsingDiagnostics; let canConfigFileJsonReportNoInputFiles = false; let hasChangedConfigFileParsingErrors = false; - const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames); + const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2); const directoryStructureHost = cachedDirectoryStructureHost || host; const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost); let newLine = updateNewLine(); @@ -123409,8 +125207,8 @@ ${lanes.join("\n")} Debug.assert(compilerOptions); Debug.assert(rootFileNames); const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); - writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); + writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`); let configFileWatcher; if (configFileName) { configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile); @@ -123519,7 +125317,6 @@ ${lanes.join("\n")} if (hasChangedCompilerOptions) { newLine = updateNewLine(); if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) { - debugger; resolutionCache.onChangesAffectModuleResolution(); } } @@ -123624,7 +125421,8 @@ ${lanes.join("\n")} if (isFileMissingOnHost(hostSourceFile)) { return void 0; } - if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile)) { + const impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : void 0; + if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile) || hostSourceFile.sourceFile.impliedNodeFormat !== impliedNodeFormat) { const sourceFile = getNewSourceFile(fileName, languageVersionOrOptions, onError); if (hostSourceFile) { if (sourceFile) { @@ -123915,7 +125713,7 @@ ${lanes.join("\n")} options: compilerOptions, program: getCurrentBuilderProgram() || rootFileNames, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 })) @@ -124005,7 +125803,7 @@ ${lanes.join("\n")} options: config.parsedCommandLine.options, program: config.parsedCommandLine.fileNames, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 })) @@ -126125,6 +127923,8 @@ ${lanes.join("\n")} init_sourcemap(); init_utilities3(); init_destructuring(); + init_classThis(); + init_namedEvaluation(); init_taggedTemplate(); init_ts(); init_classFields(); @@ -126766,6 +128566,8 @@ ${lanes.join("\n")} ScriptElementKind2["enumMemberElement"] = "enum member"; ScriptElementKind2["variableElement"] = "var"; ScriptElementKind2["localVariableElement"] = "local var"; + ScriptElementKind2["variableUsingElement"] = "using"; + ScriptElementKind2["variableAwaitUsingElement"] = "await using"; ScriptElementKind2["functionElement"] = "function"; ScriptElementKind2["localFunctionElement"] = "local function"; ScriptElementKind2["memberFunctionElement"] = "method"; @@ -126879,36 +128681,36 @@ ${lanes.join("\n")} // src/services/utilities.ts function getMeaningFromDeclaration(node) { switch (node.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 298 /* CatchClause */: - case 290 /* JsxAttribute */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 299 /* CatchClause */: + case 291 /* JsxAttribute */: return 1 /* Value */; - case 167 /* TypeParameter */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 186 /* TypeLiteral */: + case 168 /* TypeParameter */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 187 /* TypeLiteral */: return 2 /* Type */; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 305 /* EnumMember */: - case 262 /* ClassDeclaration */: + case 306 /* EnumMember */: + case 263 /* ClassDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -126916,15 +128718,15 @@ ${lanes.join("\n")} } else { return 4 /* Namespace */; } - case 265 /* EnumDeclaration */: - case 274 /* NamedImports */: - case 275 /* ImportSpecifier */: - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 266 /* EnumDeclaration */: + case 275 /* NamedImports */: + case 276 /* ImportSpecifier */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: return 7 /* All */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 7 /* All */; @@ -126932,7 +128734,7 @@ ${lanes.join("\n")} function getMeaningFromLocation(node) { node = getAdjustedReferenceLocation(node); const parent2 = node.parent; - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return 1 /* Value */; } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7 /* All */; @@ -126956,11 +128758,11 @@ ${lanes.join("\n")} } } function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 165 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 270 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; + const name = node.kind === 166 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; + return name && name.parent.kind === 271 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; } function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -126971,26 +128773,26 @@ ${lanes.join("\n")} function isQualifiedNameNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 165 /* QualifiedName */) { - while (root.parent && root.parent.kind === 165 /* QualifiedName */) { + if (root.parent.kind === 166 /* QualifiedName */) { + while (root.parent && root.parent.kind === 166 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 182 /* TypeReference */ && !isLastClause; + return root.parent.kind === 183 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 210 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 210 /* PropertyAccessExpression */) { + if (root.parent.kind === 211 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 211 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 232 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 297 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 233 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 298 /* HeritageClause */) { const decl = root.parent.parent.parent; - return decl.kind === 262 /* ClassDeclaration */ && root.parent.parent.token === 119 /* ImplementsKeyword */ || decl.kind === 263 /* InterfaceDeclaration */ && root.parent.parent.token === 96 /* ExtendsKeyword */; + return decl.kind === 263 /* ClassDeclaration */ && root.parent.parent.token === 119 /* ImplementsKeyword */ || decl.kind === 264 /* InterfaceDeclaration */ && root.parent.parent.token === 96 /* ExtendsKeyword */; } return false; } @@ -127001,15 +128803,15 @@ ${lanes.join("\n")} switch (node.kind) { case 110 /* ThisKeyword */: return !isExpressionNode(node); - case 196 /* ThisType */: + case 197 /* ThisType */: return true; } switch (node.parent.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return true; - case 204 /* ImportType */: + case 205 /* ImportType */: return !node.parent.isTypeOf; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isPartOfTypeNode(node.parent); } return false; @@ -127056,7 +128858,7 @@ ${lanes.join("\n")} } function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 255 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { + if (referenceNode.kind === 256 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -127106,22 +128908,22 @@ ${lanes.join("\n")} } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 302 /* PropertyAssignment */: - case 305 /* EnumMember */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 266 /* ModuleDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 303 /* PropertyAssignment */: + case 306 /* EnumMember */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 267 /* ModuleDeclaration */: return getNameOfDeclaration(node.parent) === node; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return true; - case 200 /* LiteralType */: - return node.parent.parent.kind === 198 /* IndexedAccessType */; + case 201 /* LiteralType */: + return node.parent.parent.kind === 199 /* IndexedAccessType */; default: return false; } @@ -127139,83 +128941,83 @@ ${lanes.join("\n")} return void 0; } switch (node.kind) { - case 311 /* SourceFile */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 266 /* ModuleDeclaration */: + case 312 /* SourceFile */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: return node; } } } function getNodeKind(node) { switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return "module" /* moduleElement */; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return "class" /* classElement */; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; - case 264 /* TypeAliasDeclaration */: - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: + case 265 /* TypeAliasDeclaration */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: return "type" /* typeElement */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return "enum" /* enumElement */; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return "function" /* functionElement */; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return "getter" /* memberGetAccessorElement */; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return "setter" /* memberSetAccessorElement */; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return "method" /* memberFunctionElement */; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: const { initializer } = node; return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return "property" /* memberVariableElement */; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return "index" /* indexSignatureElement */; - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return "construct" /* constructSignatureElement */; - case 178 /* CallSignature */: + case 179 /* CallSignature */: return "call" /* callSignatureElement */; - case 175 /* Constructor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: return "constructor" /* constructorImplementationElement */; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return "type parameter" /* typeParameterElement */; - case 305 /* EnumMember */: + case 306 /* EnumMember */: return "enum member" /* enumMemberElement */; - case 168 /* Parameter */: + case 169 /* Parameter */: return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: - case 273 /* NamespaceImport */: - case 279 /* NamespaceExport */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: + case 274 /* NamespaceImport */: + case 280 /* NamespaceExport */: return "alias" /* alias */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const kind = getAssignmentDeclarationKind(node); const { right } = node; switch (kind) { @@ -127243,7 +129045,7 @@ ${lanes.join("\n")} } case 80 /* Identifier */: return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: const scriptKind = getNodeKind(node.expression); return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: @@ -127258,7 +129060,7 @@ ${lanes.join("\n")} case 110 /* ThisKeyword */: return true; case 80 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 168 /* Parameter */; + return identifierIsThisKeyword(node) && node.parent.kind === 169 /* Parameter */; default: return false; } @@ -127306,41 +129108,41 @@ ${lanes.join("\n")} return false; } switch (n.kind) { - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 205 /* ObjectBindingPattern */: - case 186 /* TypeLiteral */: - case 240 /* Block */: - case 267 /* ModuleBlock */: - case 268 /* CaseBlock */: - case 274 /* NamedImports */: - case 278 /* NamedExports */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 187 /* TypeLiteral */: + case 241 /* Block */: + case 268 /* ModuleBlock */: + case 269 /* CaseBlock */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: return nodeEndsWith(n, 20 /* CloseBraceToken */, sourceFile); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 213 /* NewExpression */: + case 214 /* NewExpression */: if (!n.arguments) { return true; } - case 212 /* CallExpression */: - case 216 /* ParenthesizedExpression */: - case 195 /* ParenthesizedType */: + case 213 /* CallExpression */: + case 217 /* ParenthesizedExpression */: + case 196 /* ParenthesizedType */: return nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 179 /* ConstructSignature */: - case 178 /* CallSignature */: - case 218 /* ArrowFunction */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 180 /* ConstructSignature */: + case 179 /* CallSignature */: + case 219 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -127348,60 +129150,60 @@ ${lanes.join("\n")} return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 22 /* CloseParenToken */, sourceFile); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return !!n.body && isCompletedNode(n.body, sourceFile); - case 244 /* IfStatement */: + case 245 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 27 /* SemicolonToken */, sourceFile); - case 208 /* ArrayLiteralExpression */: - case 206 /* ArrayBindingPattern */: - case 211 /* ElementAccessExpression */: - case 166 /* ComputedPropertyName */: - case 188 /* TupleType */: + case 209 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 212 /* ElementAccessExpression */: + case 167 /* ComputedPropertyName */: + case 189 /* TupleType */: return nodeEndsWith(n, 24 /* CloseBracketToken */, sourceFile); - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 24 /* CloseBracketToken */, sourceFile); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return false; - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 246 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 247 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return hasChildOfKind(n, 117 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 220 /* TypeOfExpression */: - case 219 /* DeleteExpression */: - case 221 /* VoidExpression */: - case 228 /* YieldExpression */: - case 229 /* SpreadElement */: + case 221 /* TypeOfExpression */: + case 220 /* DeleteExpression */: + case 222 /* VoidExpression */: + case 229 /* YieldExpression */: + case 230 /* SpreadElement */: const unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: const lastSpan = lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return nodeIsPresent(n.literal); - case 277 /* ExportDeclaration */: - case 271 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: return nodeIsPresent(n.moduleSpecifier); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -127492,7 +129294,7 @@ ${lanes.join("\n")} return lastTypeNode; } function getContextualTypeFromParentOrAncestorTypeNode(node, checker) { - if (node.flags & (8388608 /* JSDoc */ & ~262144 /* JavaScriptFile */)) + if (node.flags & (16777216 /* JSDoc */ & ~524288 /* JavaScriptFile */)) return void 0; const contextualType = getContextualTypeFromParent(node, checker); if (contextualType) @@ -127503,13 +129305,13 @@ ${lanes.join("\n")} function getAdjustedLocationForDeclaration(node, forRename) { if (!forRename) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return getAdjustedLocationForClass(node); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return getAdjustedLocationForFunction(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return node; } } @@ -127618,7 +129420,7 @@ ${lanes.join("\n")} if (node.kind === 149 /* RequireKeyword */ && isExternalModuleReference(parent2)) { return parent2.expression; } - if (node.kind === 160 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { + if (node.kind === 161 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { return parent2.moduleSpecifier; } if ((node.kind === 96 /* ExtendsKeyword */ || node.kind === 119 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) { @@ -127659,7 +129461,7 @@ ${lanes.join("\n")} if (node.kind === 130 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 103 /* InKeyword */ && isForInStatement(parent2) || node.kind === 164 /* OfKeyword */ && isForOfStatement(parent2)) { + if (node.kind === 103 /* InKeyword */ && isForInStatement(parent2) || node.kind === 165 /* OfKeyword */ && isForOfStatement(parent2)) { return skipOuterExpressions(parent2.expression); } } @@ -127852,7 +129654,7 @@ ${lanes.join("\n")} } } } - Debug.assert(startNode2 !== void 0 || n.kind === 311 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); + Debug.assert(startNode2 !== void 0 || n.kind === 312 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); const candidate = findRightmostChildNodeWithTokens( children, /*exclusiveStartPosition*/ @@ -127887,7 +129689,7 @@ ${lanes.join("\n")} for (let i = exclusiveStartPosition - 1; i >= 0; i--) { const child = children[i]; if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 12 /* JsxText */ || parentKind === 284 /* JsxSelfClosingElement */)) { + if (i === 0 && (parentKind === 12 /* JsxText */ || parentKind === 285 /* JsxSelfClosingElement */)) { Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); } } else if (nodeHasTokens(children[i], sourceFile)) { @@ -127919,13 +129721,13 @@ ${lanes.join("\n")} if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 12 /* JsxText */) { return true; } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 293 /* JsxExpression */) { + if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 294 /* JsxExpression */) { return true; } - if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 293 /* JsxExpression */) { + if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 294 /* JsxExpression */) { return true; } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 286 /* JsxClosingElement */) { + if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 287 /* JsxClosingElement */) { return true; } return false; @@ -127953,9 +129755,9 @@ ${lanes.join("\n")} function isInsideJsxElement(sourceFile, position) { function isInsideJsxElementTraversal(node) { while (node) { - if (node.kind >= 284 /* JsxSelfClosingElement */ && node.kind <= 293 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) { + if (node.kind >= 285 /* JsxSelfClosingElement */ && node.kind <= 294 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) { node = node.parent; - } else if (node.kind === 283 /* JsxElement */) { + } else if (node.kind === 284 /* JsxElement */) { if (position > node.getStart(sourceFile)) return true; node = node.parent; @@ -128125,17 +129927,17 @@ ${lanes.join("\n")} result.push("export" /* exportedModifier */); if (flags & 8192 /* Deprecated */) result.push("deprecated" /* deprecatedModifier */); - if (node.flags & 16777216 /* Ambient */) + if (node.flags & 33554432 /* Ambient */) result.push("declare" /* ambientModifier */); - if (node.kind === 276 /* ExportAssignment */) + if (node.kind === 277 /* ExportAssignment */) result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 182 /* TypeReference */ || node.kind === 212 /* CallExpression */) { + if (node.kind === 183 /* TypeReference */ || node.kind === 213 /* CallExpression */) { return node.typeArguments; } - if (isFunctionLike(node) || node.kind === 262 /* ClassDeclaration */ || node.kind === 263 /* InterfaceDeclaration */) { + if (isFunctionLike(node) || node.kind === 263 /* ClassDeclaration */ || node.kind === 264 /* InterfaceDeclaration */) { return node.typeParameters; } return void 0; @@ -128177,14 +129979,14 @@ ${lanes.join("\n")} return result; } function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 208 /* ArrayLiteralExpression */ || node.kind === 209 /* ObjectLiteralExpression */) { - if (node.parent.kind === 225 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) { + if (node.kind === 209 /* ArrayLiteralExpression */ || node.kind === 210 /* ObjectLiteralExpression */) { + if (node.parent.kind === 226 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) { return true; } - if (node.parent.kind === 249 /* ForOfStatement */ && node.parent.initializer === node) { + if (node.parent.kind === 250 /* ForOfStatement */ && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 302 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 303 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -128282,7 +130084,7 @@ ${lanes.join("\n")} return type.isTypeParameter() ? type.getConstraint() || type : type; } function getNameFromPropertyName(name) { - return name.kind === 166 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); + return name.kind === 167 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); } function programContainsModules(program) { return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!(s.externalModuleIndicator || s.commonJsModuleIndicator)); @@ -128404,7 +130206,7 @@ ${lanes.join("\n")} } function insertImports(changes, sourceFile, imports, blankLineBetween, preferences) { const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 242 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; + const importKindPredicate = decl.kind === 243 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; const existingImportStatements = filter(sourceFile.statements, importKindPredicate); let sortKind = isArray(imports) ? ts_OrganizeImports_exports.detectImportDeclarationSorting(imports, preferences) : 3 /* Both */; const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); @@ -128974,13 +130776,13 @@ ${lanes.join("\n")} function getContextualTypeFromParent(node, checker, contextFlags) { const parent2 = walkUpParenthesizedExpressions(node.parent); switch (parent2.kind) { - case 213 /* NewExpression */: + case 214 /* NewExpression */: return checker.getContextualType(parent2, contextFlags); - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const { left, operatorToken, right } = parent2; return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node, contextFlags); } - case 295 /* CaseClause */: + case 296 /* CaseClause */: return getSwitchedType(parent2, checker); default: return checker.getContextualType(node, contextFlags); @@ -129006,8 +130808,8 @@ ${lanes.join("\n")} switch (node.kind) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: - case 214 /* TaggedTemplateExpression */: + case 228 /* TemplateExpression */: + case 215 /* TaggedTemplateExpression */: return true; default: return false; @@ -129042,16 +130844,16 @@ ${lanes.join("\n")} return typeIsAccessible ? res : void 0; } function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 178 /* CallSignature */ || kind === 179 /* ConstructSignature */ || kind === 180 /* IndexSignature */ || kind === 170 /* PropertySignature */ || kind === 172 /* MethodSignature */; + return kind === 179 /* CallSignature */ || kind === 180 /* ConstructSignature */ || kind === 181 /* IndexSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */; } function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 261 /* FunctionDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 266 /* ModuleDeclaration */; + return kind === 267 /* ModuleDeclaration */; } function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 242 /* VariableStatement */ || kind === 243 /* ExpressionStatement */ || kind === 245 /* DoStatement */ || kind === 250 /* ContinueStatement */ || kind === 251 /* BreakStatement */ || kind === 252 /* ReturnStatement */ || kind === 256 /* ThrowStatement */ || kind === 258 /* DebuggerStatement */ || kind === 171 /* PropertyDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 276 /* ExportAssignment */; + return kind === 243 /* VariableStatement */ || kind === 244 /* ExpressionStatement */ || kind === 246 /* DoStatement */ || kind === 251 /* ContinueStatement */ || kind === 252 /* BreakStatement */ || kind === 253 /* ReturnStatement */ || kind === 257 /* ThrowStatement */ || kind === 259 /* DebuggerStatement */ || kind === 172 /* PropertyDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 277 /* ExportAssignment */; } function nodeIsASICandidate(node, sourceFile) { const lastToken = node.getLastToken(sourceFile); @@ -129075,7 +130877,7 @@ ${lanes.join("\n")} } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { return false; } - if (node.kind === 245 /* DoStatement */) { + if (node.kind === 246 /* DoStatement */) { return true; } const topNode = findAncestor(node, (ancestor) => !ancestor.parent); @@ -129453,13 +131255,16 @@ ${lanes.join("\n")} return !(symbol.flags & 33554432 /* Transient */) && (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */); } function getDefaultLikeExportNameFromDeclaration(symbol) { - return firstDefined( - symbol.declarations, - (d) => { - var _a, _b; - return isExportAssignment(d) ? (_a = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a.text : (_b = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _b.text; + return firstDefined(symbol.declarations, (d) => { + var _a, _b, _c; + if (isExportAssignment(d)) { + return (_a = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a.text; } - ); + if (isExportSpecifier(d) && d.symbol.flags === 2097152 /* Alias */) { + return (_b = tryCast(d.propertyName, isIdentifier)) == null ? void 0 : _b.text; + } + return (_c = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _c.text; + }); } function getSymbolParentOrFail(symbol) { var _a; @@ -129639,7 +131444,7 @@ ${lanes.join("\n")} typeKeywords = [ 133 /* AnyKeyword */, 131 /* AssertsKeyword */, - 162 /* BigIntKeyword */, + 163 /* BigIntKeyword */, 136 /* BooleanKeyword */, 97 /* FalseKeyword */, 140 /* InferKeyword */, @@ -129899,10 +131704,10 @@ ${lanes.join("\n")} } function forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) { var _a, _b; - const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host); + const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); const excludePatterns = preferences.autoImportFileExcludePatterns && mapDefined(preferences.autoImportFileExcludePatterns, (spec) => { const pattern = getPatternFromSpec(spec, "", "exclude"); - return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames) : void 0; + return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0; }); forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, (module2, file) => cb( module2, @@ -130437,13 +132242,13 @@ ${lanes.join("\n")} } function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -130659,49 +132464,49 @@ ${lanes.join("\n")} pos = tag.tagName.end; let commentStart = tag.tagName.end; switch (tag.kind) { - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: const param = tag; processJSDocParameterTag(param); commentStart = param.isNameFirst && ((_a = param.typeExpression) == null ? void 0 : _a.end) || param.name.end; break; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: const prop = tag; commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; break; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; commentStart = tag.typeParameters.end; break; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 315 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; + commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 316 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; break; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: commentStart = tag.typeExpression.end; break; - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = tag.typeExpression.end; break; - case 349 /* JSDocThisTag */: - case 346 /* JSDocEnumTag */: + case 350 /* JSDocThisTag */: + case 347 /* JSDocEnumTag */: commentStart = tag.typeExpression.end; break; - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; break; - case 353 /* JSDocSeeTag */: + case 354 /* JSDocSeeTag */: commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; break; - case 334 /* JSDocAugmentsTag */: - case 335 /* JSDocImplementsTag */: + case 335 /* JSDocAugmentsTag */: + case 336 /* JSDocImplementsTag */: commentStart = tag.class.end; break; - case 355 /* JSDocThrowsTag */: + case 356 /* JSDocThrowsTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_h = tag.typeExpression) == null ? void 0 : _h.end) || commentStart; @@ -130846,22 +132651,22 @@ ${lanes.join("\n")} } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 286 /* JsxClosingElement */: + case 287 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -130882,11 +132687,11 @@ ${lanes.join("\n")} if (token) { const parent2 = token.parent; if (tokenKind === 64 /* EqualsToken */) { - if (parent2.kind === 259 /* VariableDeclaration */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 168 /* Parameter */ || parent2.kind === 290 /* JsxAttribute */) { + if (parent2.kind === 260 /* VariableDeclaration */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 169 /* Parameter */ || parent2.kind === 291 /* JsxAttribute */) { return 5 /* operator */; } } - if (parent2.kind === 225 /* BinaryExpression */ || parent2.kind === 223 /* PrefixUnaryExpression */ || parent2.kind === 224 /* PostfixUnaryExpression */ || parent2.kind === 226 /* ConditionalExpression */) { + if (parent2.kind === 226 /* BinaryExpression */ || parent2.kind === 224 /* PrefixUnaryExpression */ || parent2.kind === 225 /* PostfixUnaryExpression */ || parent2.kind === 227 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -130896,7 +132701,7 @@ ${lanes.join("\n")} } else if (tokenKind === 10 /* BigIntLiteral */) { return 25 /* bigintLiteral */; } else if (tokenKind === 11 /* StringLiteral */) { - return token && token.parent.kind === 290 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 291 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 14 /* RegularExpressionLiteral */) { return 6 /* stringLiteral */; } else if (isTemplateLiteralKind(tokenKind)) { @@ -130906,32 +132711,32 @@ ${lanes.join("\n")} } else if (tokenKind === 80 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 168 /* Parameter */: + case 169 /* Parameter */: if (token.parent.name === token) { return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -131116,7 +132921,7 @@ ${lanes.join("\n")} let child = throwStatement; while (child.parent) { const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 311 /* SourceFile */) { + if (isFunctionBlock(parent2) || parent2.kind === 312 /* SourceFile */) { return parent2; } if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { @@ -131146,15 +132951,15 @@ ${lanes.join("\n")} function getBreakOrContinueOwner(statement) { return findAncestor(statement, (node) => { switch (node.kind) { - case 254 /* SwitchStatement */: - if (statement.kind === 250 /* ContinueStatement */) { + case 255 /* SwitchStatement */: + if (statement.kind === 251 /* ContinueStatement */) { return false; } - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 246 /* WhileStatement */: - case 245 /* DoStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 247 /* WhileStatement */: + case 246 /* DoStatement */: return !statement.label || isLabeledBy(node, statement.label.escapedText); default: return isFunctionLike(node) && "quit"; @@ -131167,24 +132972,24 @@ ${lanes.join("\n")} function getNodesToSearchForModifier(declaration, modifierFlag) { const container = declaration.parent; switch (container.kind) { - case 267 /* ModuleBlock */: - case 311 /* SourceFile */: - case 240 /* Block */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 268 /* ModuleBlock */: + case 312 /* SourceFile */: + case 241 /* Block */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; } - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 186 /* TypeLiteral */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 187 /* TypeLiteral */: const nodes = container.members; if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); @@ -131195,7 +133000,7 @@ ${lanes.join("\n")} return [...nodes, container]; } return nodes; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return void 0; default: Debug.assertNever(container, "Invalid container kind."); @@ -131211,7 +133016,7 @@ ${lanes.join("\n")} function getLoopBreakContinueOccurrences(loopNode) { const keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 99 /* ForKeyword */, 117 /* WhileKeyword */, 92 /* DoKeyword */)) { - if (loopNode.kind === 245 /* DoStatement */) { + if (loopNode.kind === 246 /* DoStatement */) { const loopTokens = loopNode.getChildren(); for (let i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 117 /* WhileKeyword */)) { @@ -131231,13 +133036,13 @@ ${lanes.join("\n")} const owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -131398,12 +133203,12 @@ ${lanes.join("\n")} function isDocumentRegistryEntry(entry) { return !!entry.sourceFile; } - function createDocumentRegistry(useCaseSensitiveFileNames, currentDirectory) { - return createDocumentRegistryInternal(useCaseSensitiveFileNames, currentDirectory); + function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) { + return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory); } - function createDocumentRegistryInternal(useCaseSensitiveFileNames, currentDirectory = "", externalCache) { + function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) { const buckets = /* @__PURE__ */ new Map(); - const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); + const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2); function reportStats() { const bucketInfoArray = arrayFrom(buckets.keys()).filter((name) => name && name.charAt(0) === "_").map((name) => { const entries = buckets.get(name); @@ -131584,13 +133389,6 @@ ${lanes.join("\n")} } } } - function getLanguageServiceRefCounts(path, scriptKind) { - return arrayFrom(buckets.entries(), ([key, bucket]) => { - const bucketEntry = bucket.get(path); - const entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind); - return [key, entry && entry.languageServiceRefCount]; - }); - } return { acquireDocument, acquireDocumentWithKey, @@ -131598,9 +133396,10 @@ ${lanes.join("\n")} updateDocumentWithKey, releaseDocument, releaseDocumentWithKey, - getLanguageServiceRefCounts, + getKeyForCompilationSettings, + getDocumentRegistryBucketKeyWithMode, reportStats, - getKeyForCompilationSettings + getBuckets: () => buckets }; } function getKeyForCompilationSettings(settings) { @@ -131618,12 +133417,12 @@ ${lanes.join("\n")} // src/services/getEditsForFileRename.ts function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) { - const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const oldToNew = getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper); const newToOld = getPathUpdater(newFileOrDirPath, oldFileOrDirPath, getCanonicalFileName, sourceMapper); return ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => { - updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames); + updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames2); updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName); }); } @@ -131645,7 +133444,7 @@ ${lanes.join("\n")} const rel = getRelativePathFromFile(a0, b0, getCanonicalFileName); return combinePathsSafe(getDirectoryPath(a1), rel); } - function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames) { + function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames2) { const { configFile } = program.getCompilerOptions(); if (!configFile) return; @@ -131669,10 +133468,10 @@ ${lanes.join("\n")} /*excludes*/ [], includes, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, currentDirectory ); - if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { + if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(newFileOrDirPath)) { changeTracker.insertNodeAfter(configFile, last(property.initializer.elements), factory.createStringLiteral(relativePath(newFileOrDirPath))); } return; @@ -131720,7 +133519,7 @@ ${lanes.join("\n")} configDir, path, /*ignoreCase*/ - !useCaseSensitiveFileNames + !useCaseSensitiveFileNames2 ); } } @@ -132267,7 +134066,7 @@ ${lanes.join("\n")} if (token === 156 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); - return token2 !== 160 /* FromKeyword */ && (token2 === 42 /* AsteriskToken */ || token2 === 19 /* OpenBraceToken */ || token2 === 80 /* Identifier */ || isKeyword(token2)); + return token2 !== 161 /* FromKeyword */ && (token2 === 42 /* AsteriskToken */ || token2 === 19 /* OpenBraceToken */ || token2 === 80 /* Identifier */ || isKeyword(token2)); }); if (skipTypeKeyword) { token = nextToken(); @@ -132275,7 +134074,7 @@ ${lanes.join("\n")} } if (token === 80 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -132301,7 +134100,7 @@ ${lanes.join("\n")} } if (token === 20 /* CloseBraceToken */) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -132314,7 +134113,7 @@ ${lanes.join("\n")} token = nextToken(); if (token === 80 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -132349,7 +134148,7 @@ ${lanes.join("\n")} } if (token === 20 /* CloseBraceToken */) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -132358,7 +134157,7 @@ ${lanes.join("\n")} } } else if (token === 42 /* AsteriskToken */) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -132672,7 +134471,7 @@ ${lanes.join("\n")} "src/services/sourcemaps.ts"() { "use strict"; init_ts4(); - base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/; + base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/; } }); @@ -132720,8 +134519,8 @@ ${lanes.join("\n")} diags.push(createDiagnosticForNode(init, Diagnostics.require_call_may_be_converted_to_an_import)); } } - const jsdocTypedefNode = ts_codefix_exports.getJSDocTypedefNode(node); - if (jsdocTypedefNode) { + const jsdocTypedefNodes = ts_codefix_exports.getJSDocTypedefNodes(node); + for (const jsdocTypedefNode of jsdocTypedefNodes) { diags.push(createDiagnosticForNode(jsdocTypedefNode, Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type)); } if (ts_codefix_exports.parameterShouldGetTypeFromJSDoc(node)) { @@ -132737,13 +134536,13 @@ ${lanes.join("\n")} function containsTopLevelCommonjs(sourceFile) { return sourceFile.statements.some((statement) => { switch (statement.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall( propertyAccessLeftHandSide(decl.initializer), /*requireStringLiteralLikeArgument*/ true )); - case 243 /* ExpressionStatement */: { + case 244 /* ExpressionStatement */: { const { expression } = statement; if (!isBinaryExpression(expression)) return isRequireCall( @@ -132764,10 +134563,10 @@ ${lanes.join("\n")} } function importNameForConvertToDefaultImport(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 273 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 270 /* ImportEqualsDeclaration */: + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 274 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; + case 271 /* ImportEqualsDeclaration */: return node.name; default: return void 0; @@ -132831,18 +134630,18 @@ ${lanes.join("\n")} } function isFixablePromiseArgument(arg, checker) { switch (arg.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: const functionFlags = getFunctionFlags(arg); if (functionFlags & 1 /* Generator */) { return false; } - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); case 106 /* NullKeyword */: return true; case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: { + case 211 /* PropertyAccessExpression */: { const symbol = checker.getSymbolAtLocation(arg); if (!symbol) { return false; @@ -132876,10 +134675,10 @@ ${lanes.join("\n")} } function canBeConvertedToAsync(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: return false; @@ -133062,9 +134861,9 @@ ${lanes.join("\n")} } function shouldKeepItem(declaration, checker) { switch (declaration.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 270 /* ImportEqualsDeclaration */: + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 271 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); return importer.escapedName !== imported.escapedName; @@ -133074,7 +134873,7 @@ ${lanes.join("\n")} } function tryAddSingleDeclarationName(declaration, containers) { const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 166 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); + return !!name && (pushLiteral(name, containers) || name.kind === 167 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); } function tryAddComputedPropertyName(expression, containers) { return pushLiteral(expression, containers) || isPropertyAccessExpression(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers); @@ -133085,7 +134884,7 @@ ${lanes.join("\n")} function getContainers(declaration) { const containers = []; const name = getNameOfDeclaration(declaration); - if (name && name.kind === 166 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { + if (name && name.kind === 167 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { return emptyArray; } containers.shift(); @@ -133258,7 +135057,7 @@ ${lanes.join("\n")} } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 225 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + return !hasDynamicName(node) || node.kind !== 226 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -133266,7 +135065,7 @@ ${lanes.join("\n")} return; } switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: const ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (const param of ctr.parameters) { @@ -133275,32 +135074,32 @@ ${lanes.join("\n")} } } break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 173 /* MethodSignature */: if (hasNavigationBarName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasNavigationBarName(node)) { addNodeWithRecursiveInitializer(node); } break; - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (hasNavigationBarName(node)) { addLeafNode(node); } break; - case 272 /* ImportClause */: + case 273 /* ImportClause */: const importClause = node; if (importClause.name) { addLeafNode(importClause.name); } const { namedBindings } = importClause; if (namedBindings) { - if (namedBindings.kind === 273 /* NamespaceImport */) { + if (namedBindings.kind === 274 /* NamespaceImport */) { addLeafNode(namedBindings); } else { for (const element of namedBindings.elements) { @@ -133309,16 +135108,16 @@ ${lanes.join("\n")} } } break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: addNodeWithRecursiveChild(node, node.name); break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: const { expression } = node; isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: - case 259 /* VariableDeclaration */: { + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: + case 260 /* VariableDeclaration */: { const child = node; if (isBindingPattern(child.name)) { addChildrenRecursively(child.name); @@ -133327,18 +135126,18 @@ ${lanes.join("\n")} } break; } - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: const nameNode = node.name; if (nameNode && isIdentifier(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); break; - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: startNode(node); for (const member of node.members) { if (!isComputedProperty(member)) { @@ -133347,19 +135146,19 @@ ${lanes.join("\n")} } endNode(); break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: startNode(node); for (const member of node.members) { addChildrenRecursively(member); } endNode(); break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const expression2 = node.expression; const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; if (child) { @@ -133371,16 +135170,16 @@ ${lanes.join("\n")} } break; } - case 280 /* ExportSpecifier */: - case 270 /* ImportEqualsDeclaration */: - case 180 /* IndexSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 264 /* TypeAliasDeclaration */: + case 281 /* ExportSpecifier */: + case 271 /* ImportEqualsDeclaration */: + case 181 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 265 /* TypeAliasDeclaration */: addLeafNode(node); break; - case 212 /* CallExpression */: - case 225 /* BinaryExpression */: { + case 213 /* CallExpression */: + case 226 /* BinaryExpression */: { const special = getAssignmentDeclarationKind(node); switch (special) { case 1 /* ExportsProperty */: @@ -133590,19 +135389,19 @@ ${lanes.join("\n")} return false; } switch (a.kind) { - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return isStatic(a) === isStatic(b); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); default: return true; } } function isSynthesized(node) { - return !!(node.flags & 8 /* Synthesized */); + return !!(node.flags & 16 /* Synthesized */); } function isOwnChild(n, parent2) { const par = isModuleBlock(n.parent) ? n.parent.parent : n.parent; @@ -133612,7 +135411,7 @@ ${lanes.join("\n")} if (!a.body || !b.body) { return a.body === b.body; } - return a.body.kind === b.body.kind && (a.body.kind !== 266 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); + return a.body.kind === b.body.kind && (a.body.kind !== 267 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); } function merge(target, source) { target.additionalNodes = target.additionalNodes || []; @@ -133633,7 +135432,7 @@ ${lanes.join("\n")} return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); } function tryGetName(node) { - if (node.kind === 266 /* ModuleDeclaration */) { + if (node.kind === 267 /* ModuleDeclaration */) { return getModuleName(node); } const declName = getNameOfDeclaration(node); @@ -133642,16 +135441,16 @@ ${lanes.join("\n")} return propertyName && unescapeLeadingUnderscores(propertyName); } switch (node.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 230 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 231 /* ClassExpression */: return getFunctionOrClassName(node); default: return void 0; } } function getItemName(node, name) { - if (node.kind === 266 /* ModuleDeclaration */) { + if (node.kind === 267 /* ModuleDeclaration */) { return cleanText(getModuleName(node)); } if (name) { @@ -133661,27 +135460,27 @@ ${lanes.join("\n")} } } switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: if (getSyntacticModifierFlags(node) & 1024 /* Default */) { return "default"; } return getFunctionOrClassName(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return "constructor"; - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return "new()"; - case 178 /* CallSignature */: + case 179 /* CallSignature */: return "()"; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return "[]"; default: return ""; @@ -133706,19 +135505,19 @@ ${lanes.join("\n")} return true; } switch (navigationBarNodeKind(item)) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 265 /* EnumDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 311 /* SourceFile */: - case 264 /* TypeAliasDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 266 /* EnumDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 312 /* SourceFile */: + case 265 /* TypeAliasDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: return true; - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -133728,10 +135527,10 @@ ${lanes.join("\n")} return false; } switch (navigationBarNodeKind(item2.parent)) { - case 267 /* ModuleBlock */: - case 311 /* SourceFile */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: + case 268 /* ModuleBlock */: + case 312 /* SourceFile */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: return true; default: return false; @@ -133790,7 +135589,7 @@ ${lanes.join("\n")} } function getFullyQualifiedModuleName(moduleDeclaration) { const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 266 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } @@ -133800,13 +135599,13 @@ ${lanes.join("\n")} return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 166 /* ComputedPropertyName */; + return !member.name || member.name.kind === 167 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 311 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); + return node.kind === 312 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); } function getModifiers2(node) { - if (node.parent && node.parent.kind === 259 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 260 /* VariableDeclaration */) { node = node.parent; } return getNodeModifiers(node); @@ -133851,9 +135650,9 @@ ${lanes.join("\n")} } function isFunctionOrClassExpression(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: return true; default: return false; @@ -133911,8 +135710,8 @@ ${lanes.join("\n")} return context.cancellationToken && context.cancellationToken.isCancellationRequested() || !((_a = refactor.kinds) == null ? void 0 : _a.some((kind) => refactorKindBeginsWith(kind, context.kind))) ? void 0 : refactor.getAvailableActions(context, includeInteractiveActions); })); } - function getEditsForRefactor(context, refactorName13, actionName2, interactiveRefactorArguments) { - const refactor = refactors.get(refactorName13); + function getEditsForRefactor(context, refactorName14, actionName2, interactiveRefactorArguments) { + const refactor = refactors.get(refactorName14); return refactor && refactor.getEditsForAction(context, actionName2, interactiveRefactorArguments); } var refactors; @@ -133943,18 +135742,18 @@ ${lanes.join("\n")} } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 266 /* ModuleDeclaration */: { + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 267 /* ModuleDeclaration */: { const node = exportNode; if (!node.name) return void 0; return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; } - case 242 /* VariableStatement */: { + case 243 /* VariableStatement */: { const vs = exportNode; if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { return void 0; @@ -133965,7 +135764,7 @@ ${lanes.join("\n")} Debug.assert(!wasDefault, "Can't have a default flag here"); return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; } - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const node = exportNode; if (node.isExportEquals) return void 0; @@ -133997,20 +135796,20 @@ ${lanes.join("\n")} } else { const exportKeyword = Debug.checkDefined(findModifier(exportNode, 95 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(90 /* DefaultKeyword */)); break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: const decl = first(exportNode.declarationList.declarations); if (!ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile) && !decl.type) { changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(decl.initializer, "Initializer was previously known to be present"))); break; } - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 266 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 267 /* ModuleDeclaration */: changes.deleteModifier(exportingSourceFile, exportKeyword); changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); break; @@ -134036,23 +135835,23 @@ ${lanes.join("\n")} function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { const { parent: parent2 } = ref; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); break; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: { + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: { const spec = parent2; changes.replaceNode(importingSourceFile, spec, makeImportSpecifier(exportName, spec.name.text)); break; } - case 272 /* ImportClause */: { + case 273 /* ImportClause */: { const clause = parent2; Debug.assert(clause.name === ref, "Import clause name should match provided ref"); const spec = makeImportSpecifier(exportName, ref.text); const { namedBindings } = clause; if (!namedBindings) { changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec])); - } else if (namedBindings.kind === 273 /* NamespaceImport */) { + } else if (namedBindings.kind === 274 /* NamespaceImport */) { changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) }); const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1 /* Double */; const newImport = makeImport( @@ -134069,7 +135868,7 @@ ${lanes.join("\n")} } break; } - case 204 /* ImportType */: + case 205 /* ImportType */: const importTypeNode = parent2; changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; @@ -134080,10 +135879,10 @@ ${lanes.join("\n")} function changeNamedToDefaultImport(importingSourceFile, ref, changes) { const parent2 = ref.parent; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); break; - case 275 /* ImportSpecifier */: { + case 276 /* ImportSpecifier */: { const defaultImport = factory.createIdentifier(parent2.name.text); if (parent2.parent.elements.length === 1) { changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); @@ -134093,7 +135892,7 @@ ${lanes.join("\n")} } break; } - case 280 /* ExportSpecifier */: { + case 281 /* ExportSpecifier */: { changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); break; } @@ -134136,12 +135935,12 @@ ${lanes.join("\n")} refactorName = "Convert export"; defaultToNamedAction = { name: "Convert default export to named export", - description: Diagnostics.Convert_default_export_to_named_export.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), kind: "refactor.rewrite.export.named" }; namedToDefaultAction = { name: "Convert named export to default export", - description: Diagnostics.Convert_named_export_to_default_export.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_export_to_default_export), kind: "refactor.rewrite.export.default" }; registerRefactor(refactorName, { @@ -134159,7 +135958,7 @@ ${lanes.join("\n")} } if (context.preferences.provideRefactorNotApplicableReason) { return [ - { name: refactorName, description: Diagnostics.Convert_default_export_to_named_export.message, actions: [ + { name: refactorName, description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), actions: [ { ...defaultToNamedAction, notApplicableReason: info.error }, { ...namedToDefaultAction, notApplicableReason: info.error } ] } @@ -134197,7 +135996,7 @@ ${lanes.join("\n")} if (!importClause.namedBindings) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; } - if (importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { return { convertTo: 0 /* Named */, import: importClause.namedBindings }; } const shouldUseDefault = getShouldUseDefault(context.program, importClause); @@ -134361,17 +136160,17 @@ ${lanes.join("\n")} actions = { [0 /* Named */]: { name: "Convert namespace import to named imports", - description: Diagnostics.Convert_namespace_import_to_named_imports.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_namespace_import_to_named_imports), kind: "refactor.rewrite.import.named" }, [2 /* Namespace */]: { name: "Convert named imports to namespace import", - description: Diagnostics.Convert_named_imports_to_namespace_import.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_namespace_import), kind: "refactor.rewrite.import.namespace" }, [1 /* Default */]: { name: "Convert named imports to default import", - description: Diagnostics.Convert_named_imports_to_default_import.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_default_import), kind: "refactor.rewrite.import.default" } }; @@ -134718,6 +136517,158 @@ ${lanes.join("\n")} } }); + // src/services/refactors/inlineVariable.ts + function getInliningInfo(file, startPosition, tryWithReferenceToken, program) { + var _a, _b; + const checker = program.getTypeChecker(); + const token = getTouchingPropertyName(file, startPosition); + const parent2 = token.parent; + if (!isIdentifier(token)) { + return void 0; + } + if (isInitializedVariable(parent2) && isVariableDeclarationInVariableStatement(parent2) && isIdentifier(parent2.name)) { + if (((_a = checker.getMergedSymbol(parent2.symbol).declarations) == null ? void 0 : _a.length) !== 1) { + return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; + } + if (isDeclarationExported(parent2)) { + return void 0; + } + const references = getReferenceNodes(parent2, checker, file); + return references && { references, declaration: parent2, replacement: parent2.initializer }; + } + if (tryWithReferenceToken) { + let definition = checker.resolveName( + token.text, + token, + 111551 /* Value */, + /*excludeGlobals*/ + false + ); + definition = definition && checker.getMergedSymbol(definition); + if (((_b = definition == null ? void 0 : definition.declarations) == null ? void 0 : _b.length) !== 1) { + return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; + } + const declaration = definition.declarations[0]; + if (!isInitializedVariable(declaration) || !isVariableDeclarationInVariableStatement(declaration) || !isIdentifier(declaration.name)) { + return void 0; + } + if (isDeclarationExported(declaration)) { + return void 0; + } + const references = getReferenceNodes(declaration, checker, file); + return references && { references, declaration, replacement: declaration.initializer }; + } + return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_variable_to_inline) }; + } + function isDeclarationExported(declaration) { + const variableStatement = cast(declaration.parent.parent, isVariableStatement); + return some(variableStatement.modifiers, isExportModifier); + } + function getReferenceNodes(declaration, checker, file) { + const references = []; + const cannotInline = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(declaration.name, checker, file, (ref) => { + if (ts_FindAllReferences_exports.isWriteAccessForReference(ref)) { + return true; + } + if (isExportSpecifier(ref.parent) || isExportAssignment(ref.parent)) { + return true; + } + if (isTypeQueryNode(ref.parent)) { + return true; + } + if (textRangeContainsPositionInclusive(declaration, ref.pos)) { + return true; + } + references.push(ref); + }); + return references.length === 0 || cannotInline ? void 0 : references; + } + function getReplacementExpression(reference, replacement) { + replacement = getSynthesizedDeepClone(replacement); + const { parent: parent2 } = reference; + if (isExpression(parent2) && (getExpressionPrecedence(replacement) < getExpressionPrecedence(parent2) || needsParentheses(parent2))) { + return factory.createParenthesizedExpression(replacement); + } + if (isFunctionLike(replacement) && (isCallLikeExpression(parent2) || isPropertyAccessExpression(parent2))) { + return factory.createParenthesizedExpression(replacement); + } + if (isPropertyAccessExpression(parent2) && (isNumericLiteral(replacement) || isObjectLiteralExpression(replacement))) { + return factory.createParenthesizedExpression(replacement); + } + return replacement; + } + var refactorName4, refactorDescription, inlineVariableAction; + var init_inlineVariable = __esm({ + "src/services/refactors/inlineVariable.ts"() { + "use strict"; + init_ts4(); + init_ts_refactor(); + refactorName4 = "Inline variable"; + refactorDescription = getLocaleSpecificMessage(Diagnostics.Inline_variable); + inlineVariableAction = { + name: refactorName4, + description: refactorDescription, + kind: "refactor.inline.variable" + }; + registerRefactor(refactorName4, { + kinds: [inlineVariableAction.kind], + getAvailableActions(context) { + const { + file, + program, + preferences, + startPosition, + triggerReason + } = context; + const info = getInliningInfo(file, startPosition, triggerReason === "invoked", program); + if (!info) { + return emptyArray; + } + if (!ts_refactor_exports.isRefactorErrorInfo(info)) { + return [{ + name: refactorName4, + description: refactorDescription, + actions: [inlineVariableAction] + }]; + } + if (preferences.provideRefactorNotApplicableReason) { + return [{ + name: refactorName4, + description: refactorDescription, + actions: [{ + ...inlineVariableAction, + notApplicableReason: info.error + }] + }]; + } + return emptyArray; + }, + getEditsForAction(context, actionName2) { + Debug.assert(actionName2 === refactorName4, "Unexpected refactor invoked"); + const { file, program, startPosition } = context; + const info = getInliningInfo( + file, + startPosition, + /*tryWithReferenceToken*/ + true, + program + ); + if (!info || ts_refactor_exports.isRefactorErrorInfo(info)) { + return void 0; + } + const { references, declaration, replacement } = info; + const edits = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => { + for (const node of references) { + tracker.replaceNode(file, node, getReplacementExpression(node, replacement)); + } + tracker.delete(file, declaration); + }); + return { edits }; + } + }); + } + }); + // src/services/refactors/moveToNewFile.ts function doChange3(oldFile, program, toMove, changes, host, preferences, context) { const checker = program.getTypeChecker(); @@ -134799,29 +136750,29 @@ ${lanes.join("\n")} append(copiedOldImports, makeImportOrRequire(oldFile, oldFileDefault, oldFileNamedImports, getBaseFileName(oldFile.fileName), program, host, useEsModuleSyntax, quotePreference)); return copiedOldImports; } - var refactorName4, description, moveToNewFileAction; + var refactorName5, description, moveToNewFileAction; var init_moveToNewFile = __esm({ "src/services/refactors/moveToNewFile.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName4 = "Move to a new file"; + refactorName5 = "Move to a new file"; description = getLocaleSpecificMessage(Diagnostics.Move_to_a_new_file); moveToNewFileAction = { - name: refactorName4, + name: refactorName5, description, kind: "refactor.move.newFile" }; - registerRefactor(refactorName4, { + registerRefactor(refactorName5, { kinds: [moveToNewFileAction.kind], getAvailableActions: function getRefactorActionsToMoveToNewFile(context) { const statements = getStatementsToMove(context); if (context.preferences.allowTextChangesInNewFiles && statements) { - return [{ name: refactorName4, description, actions: [moveToNewFileAction] }]; + return [{ name: refactorName5, description, actions: [moveToNewFileAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName4, + name: refactorName5, description, actions: [{ ...moveToNewFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] }]; @@ -134829,7 +136780,7 @@ ${lanes.join("\n")} return emptyArray; }, getEditsForAction: function getRefactorEditsToMoveToNewFile(context, actionName2) { - Debug.assert(actionName2 === refactorName4, "Wrong refactor invoked"); + Debug.assert(actionName2 === refactorName5, "Wrong refactor invoked"); const statements = Debug.checkDefined(getStatementsToMove(context)); const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange3(context.file, context.program, statements, t, context.host, context.preferences, context)); return { edits, renameFilename: void 0, renameLocation: void 0 }; @@ -134839,6 +136790,9 @@ ${lanes.join("\n")} }); // src/services/refactors/moveToFile.ts + function error(notApplicableReason) { + return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason }; + } function doChange4(context, oldFile, targetFile, program, toMove, changes, host, preferences) { const checker = program.getTypeChecker(); const usage = getUsageInfo(oldFile, toMove.all, checker); @@ -134879,7 +136833,7 @@ ${lanes.join("\n")} const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromTargetFile, useEsModuleSyntax); if (typeof targetFile !== "string") { if (targetFile.statements.length > 0) { - changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], body); + moveStatementsToTargetFile(changes, program, body, targetFile, toMove); } else { changes.insertNodesAtEndOfFile( targetFile, @@ -134900,7 +136854,7 @@ ${lanes.join("\n")} } } if (importAdder) { - importAdder.writeFixes(changes); + importAdder.writeFixes(changes, quotePreference); } if (imports.length && body.length) { return [ @@ -135030,11 +136984,11 @@ ${lanes.join("\n")} } function getNamespaceLikeImport(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 273 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 274 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; + case 271 /* ImportEqualsDeclaration */: return node.name; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return tryCast(node.name, isIdentifier); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); @@ -135070,7 +137024,7 @@ ${lanes.join("\n")} const newNamespaceId = factory.createIdentifier(newNamespaceName); const newModuleString = makeStringLiteral(newModuleSpecifier, quotePreference); switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return factory.createImportDeclaration( /*modifiers*/ void 0, @@ -135085,7 +137039,7 @@ ${lanes.join("\n")} /*assertClause*/ void 0 ); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return factory.createImportEqualsDeclaration( /*modifiers*/ void 0, @@ -135094,7 +137048,7 @@ ${lanes.join("\n")} newNamespaceId, factory.createExternalModuleReference(newModuleString) ); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return factory.createVariableDeclaration( newNamespaceId, /*exclamationToken*/ @@ -135116,7 +137070,7 @@ ${lanes.join("\n")} ); } function moduleSpecifierFromImport(i) { - return i.kind === 271 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 270 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; + return i.kind === 272 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 271 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { if (isImportDeclaration(statement)) { @@ -135214,15 +137168,15 @@ ${lanes.join("\n")} } function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { switch (importDecl.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused); break; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (isUnused(importDecl.name)) { changes.delete(sourceFile, importDecl); } break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused); break; default: @@ -135234,7 +137188,7 @@ ${lanes.join("\n")} return; const { name, namedBindings } = importDecl.importClause; const defaultUnused = !name || isUnused(name); - const namedBindingsUnused = !namedBindings || (namedBindings.kind === 273 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); + const namedBindingsUnused = !namedBindings || (namedBindings.kind === 274 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); if (defaultUnused && namedBindingsUnused) { changes.delete(sourceFile, importDecl); } else { @@ -135254,7 +137208,7 @@ ${lanes.join("\n")} void 0 ) ); - } else if (namedBindings.kind === 274 /* NamedImports */) { + } else if (namedBindings.kind === 275 /* NamedImports */) { for (const element of namedBindings.elements) { if (isUnused(element.name)) changes.delete(sourceFile, element); @@ -135282,9 +137236,9 @@ ${lanes.join("\n")} } } break; - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: break; - case 205 /* ObjectBindingPattern */: + case 206 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { changes.delete( sourceFile, @@ -135310,24 +137264,24 @@ ${lanes.join("\n")} function addEs6Export(d) { const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(95 /* ExportKeyword */)], getModifiers(d)) : void 0; switch (d.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const decorators = canHaveDecorators(d) ? getDecorators(d) : void 0; return factory.updateClassDeclaration(d, concatenate(decorators, modifiers), d.name, d.typeParameters, d.heritageClauses, d.members); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return Debug.fail(); default: return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); @@ -135347,18 +137301,18 @@ ${lanes.join("\n")} } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: return [decl.name.text]; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 271 /* ImportEqualsDeclaration */: return emptyArray; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return Debug.fail("Can't export an ExpressionStatement"); default: return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); @@ -135366,7 +137320,7 @@ ${lanes.join("\n")} } function filterImport(i, moduleSpecifier, keep) { switch (i.kind) { - case 271 /* ImportDeclaration */: { + case 272 /* ImportDeclaration */: { const clause = i.importClause; if (!clause) return void 0; @@ -135381,9 +137335,9 @@ ${lanes.join("\n")} void 0 ) : void 0; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return keep(i.name) ? i : void 0; - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { const name = filterBindingName(i.name, keep); return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; } @@ -135392,7 +137346,7 @@ ${lanes.join("\n")} } } function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 273 /* NamespaceImport */) { + if (namedBindings.kind === 274 /* NamespaceImport */) { return keep(namedBindings.name) ? namedBindings : void 0; } else { const newElements = namedBindings.elements.filter((e) => keep(e.name)); @@ -135403,9 +137357,9 @@ ${lanes.join("\n")} switch (name.kind) { case 80 /* Identifier */: return keep(name) ? name : void 0; - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: return name; - case 205 /* ObjectBindingPattern */: { + case 206 /* ObjectBindingPattern */: { const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } @@ -135416,9 +137370,9 @@ ${lanes.join("\n")} } function getTopLevelDeclarationStatement(d) { switch (d.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return d.parent.parent; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getTopLevelDeclarationStatement( cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) ); @@ -135466,21 +137420,25 @@ ${lanes.join("\n")} const { file } = context; const range = createTextRangeFromSpan(getRefactorContextSpan(context)); const { statements } = file; - const startNodeIndex = findIndex(statements, (s) => s.end > range.pos); + let startNodeIndex = findIndex(statements, (s) => s.end > range.pos); if (startNodeIndex === -1) return void 0; const startStatement = statements[startNodeIndex]; - if (isNamedDeclaration(startStatement) && startStatement.name && rangeContainsRange(startStatement.name, range)) { - return { toMove: [statements[startNodeIndex]], afterLast: statements[startNodeIndex + 1] }; + const overloadRangeToMove = getOverloadRangeToMove(file, startStatement); + if (overloadRangeToMove) { + startNodeIndex = overloadRangeToMove.start; + } + let endNodeIndex = findIndex(statements, (s) => s.end >= range.end, startNodeIndex); + if (endNodeIndex !== -1 && range.end <= statements[endNodeIndex].getStart()) { + endNodeIndex--; + } + const endingOverloadRangeToMove = getOverloadRangeToMove(file, statements[endNodeIndex]); + if (endingOverloadRangeToMove) { + endNodeIndex = endingOverloadRangeToMove.end; } - if (range.pos > startStatement.getStart(file)) - return void 0; - const afterEndNodeIndex = findIndex(statements, (s) => s.end > range.end, startNodeIndex); - if (afterEndNodeIndex !== -1 && (afterEndNodeIndex === 0 || statements[afterEndNodeIndex].getStart(file) < range.end)) - return void 0; return { - toMove: statements.slice(startNodeIndex, afterEndNodeIndex === -1 ? statements.length : afterEndNodeIndex), - afterLast: afterEndNodeIndex === -1 ? void 0 : statements[afterEndNodeIndex] + toMove: statements.slice(startNodeIndex, endNodeIndex === -1 ? statements.length : endNodeIndex + 1), + afterLast: endNodeIndex === -1 ? void 0 : statements[endNodeIndex + 1] }; } function getStatementsToMove(context) { @@ -135502,11 +137460,11 @@ ${lanes.join("\n")} } function isPureImport(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return true; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return !hasSyntacticModifier(node, 1 /* Export */); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall( d.initializer, /*requireStringLiteralLikeArgument*/ @@ -135599,17 +137557,17 @@ ${lanes.join("\n")} } function forEachTopLevelDeclaration(statement, cb) { switch (statement.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 271 /* ImportEqualsDeclaration */: return cb(statement); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 243 /* ExpressionStatement */: { + case 244 /* ExpressionStatement */: { const { expression } = statement; return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; } @@ -135617,14 +137575,14 @@ ${lanes.join("\n")} } function isInImport(decl) { switch (decl.kind) { - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: return true; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return isVariableDeclarationInImport(decl); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); default: return false; @@ -135647,8 +137605,8 @@ ${lanes.join("\n")} switch (name.kind) { case 80 /* Identifier */: return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 206 /* ArrayBindingPattern */: - case 205 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); default: return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); @@ -135656,18 +137614,94 @@ ${lanes.join("\n")} } function isNonVariableTopLevelDeclaration(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 271 /* ImportEqualsDeclaration */: return true; default: return false; } } + function moveStatementsToTargetFile(changes, program, statements, targetFile, toMove) { + var _a; + const removedExports = /* @__PURE__ */ new Set(); + const targetExports = (_a = targetFile.symbol) == null ? void 0 : _a.exports; + if (targetExports) { + const checker = program.getTypeChecker(); + const targetToSourceExports = /* @__PURE__ */ new Map(); + for (const node of toMove.all) { + if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 1 /* Export */)) { + forEachTopLevelDeclaration(node, (declaration) => { + var _a2; + const targetDeclarations = canHaveSymbol(declaration) ? (_a2 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a2.declarations : void 0; + const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0); + if (exportDeclaration && exportDeclaration.moduleSpecifier) { + targetToSourceExports.set( + exportDeclaration, + (targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration) + ); + } + }); + } + } + for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) { + if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) { + const elements = exportDeclaration.exportClause.elements; + const updatedElements = filter(elements, (elem) => find(skipAlias(elem.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0); + if (length(updatedElements) === 0) { + changes.deleteNode(targetFile, exportDeclaration); + removedExports.add(exportDeclaration); + continue; + } + if (length(updatedElements) < length(elements)) { + changes.replaceNode( + targetFile, + exportDeclaration, + factory.updateExportDeclaration( + exportDeclaration, + exportDeclaration.modifiers, + exportDeclaration.isTypeOnly, + factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), + exportDeclaration.moduleSpecifier, + exportDeclaration.assertClause + ) + ); + } + } + } + } + const lastReExport = findLast(targetFile.statements, (n) => isExportDeclaration(n) && !!n.moduleSpecifier && !removedExports.has(n)); + if (lastReExport) { + changes.insertNodesBefore( + targetFile, + lastReExport, + statements, + /*blankLineBetween*/ + true + ); + } else { + changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], statements); + } + } + function getOverloadRangeToMove(sourceFile, statement) { + if (isFunctionLikeDeclaration(statement)) { + const declarations = statement.symbol.declarations; + if (declarations === void 0 || length(declarations) <= 1 || !contains(declarations, statement)) { + return void 0; + } + const firstDecl = declarations[0]; + const lastDecl = declarations[length(declarations) - 1]; + const statementsToMove = mapDefined(declarations, (d) => getSourceFileOfNode(d) === sourceFile && isStatement(d) ? d : void 0); + const end = findIndex(sourceFile.statements, (s) => s.end >= lastDecl.end); + const start = findIndex(sourceFile.statements, (s) => s.end >= firstDecl.end); + return { toMove: statementsToMove, start, end }; + } + return void 0; + } var refactorNameForMoveToFile, description2, moveToFileAction; var init_moveToFile = __esm({ "src/services/refactors/moveToFile.ts"() { @@ -135704,13 +137738,17 @@ ${lanes.join("\n")} getEditsForAction: function getRefactorEditsToMoveToFile(context, actionName2, interactiveRefactorArguments) { Debug.assert(actionName2 === refactorNameForMoveToFile, "Wrong refactor invoked"); const statements = Debug.checkDefined(getStatementsToMove(context)); + const { host, program } = context; Debug.assert(interactiveRefactorArguments, "No interactive refactor arguments available"); const targetFile = interactiveRefactorArguments.targetFile; if (hasJSFileExtension(targetFile) || hasTSFileExtension(targetFile)) { + if (host.fileExists(targetFile) && program.getSourceFile(targetFile) === void 0) { + return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_statements_to_the_selected_file)); + } const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences)); return { edits, renameFilename: void 0, renameLocation: void 0 }; } - return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid) }; + return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid)); } }); } @@ -135723,8 +137761,8 @@ ${lanes.join("\n")} if (!info) return emptyArray; return [{ - name: refactorName5, - description: refactorDescription, + name: refactorName6, + description: refactorDescription2, actions: [functionOverloadAction] }]; } @@ -135737,7 +137775,7 @@ ${lanes.join("\n")} const lastDeclaration = signatureDecls[signatureDecls.length - 1]; let updated = lastDeclaration; switch (lastDeclaration.kind) { - case 172 /* MethodSignature */: { + case 173 /* MethodSignature */: { updated = factory.updateMethodSignature( lastDeclaration, lastDeclaration.modifiers, @@ -135749,7 +137787,7 @@ ${lanes.join("\n")} ); break; } - case 173 /* MethodDeclaration */: { + case 174 /* MethodDeclaration */: { updated = factory.updateMethodDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -135763,7 +137801,7 @@ ${lanes.join("\n")} ); break; } - case 178 /* CallSignature */: { + case 179 /* CallSignature */: { updated = factory.updateCallSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -135772,7 +137810,7 @@ ${lanes.join("\n")} ); break; } - case 175 /* Constructor */: { + case 176 /* Constructor */: { updated = factory.updateConstructorDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -135781,7 +137819,7 @@ ${lanes.join("\n")} ); break; } - case 179 /* ConstructSignature */: { + case 180 /* ConstructSignature */: { updated = factory.updateConstructSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -135790,7 +137828,7 @@ ${lanes.join("\n")} ); break; } - case 261 /* FunctionDeclaration */: { + case 262 /* FunctionDeclaration */: { updated = factory.updateFunctionDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -135863,12 +137901,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConvertableSignatureDeclaration(d) { switch (d.kind) { - case 172 /* MethodSignature */: - case 173 /* MethodDeclaration */: - case 178 /* CallSignature */: - case 175 /* Constructor */: - case 179 /* ConstructSignature */: - case 261 /* FunctionDeclaration */: + case 173 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 179 /* CallSignature */: + case 176 /* Constructor */: + case 180 /* ConstructSignature */: + case 262 /* FunctionDeclaration */: return true; } return false; @@ -135915,20 +137953,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return signatureDecls; } - var refactorName5, refactorDescription, functionOverloadAction; + var refactorName6, refactorDescription2, functionOverloadAction; var init_convertOverloadListToSingleSignature = __esm({ "src/services/refactors/convertOverloadListToSingleSignature.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName5 = "Convert overload list to single signature"; - refactorDescription = Diagnostics.Convert_overload_list_to_single_signature.message; + refactorName6 = "Convert overload list to single signature"; + refactorDescription2 = getLocaleSpecificMessage(Diagnostics.Convert_overload_list_to_single_signature); functionOverloadAction = { - name: refactorName5, - description: refactorDescription, + name: refactorName6, + description: refactorDescription2, kind: "refactor.rewrite.function.overloadList" }; - registerRefactor(refactorName5, { + registerRefactor(refactorName6, { kinds: [functionOverloadAction.kind], getEditsForAction: getRefactorEditsToConvertOverloadsToOneSignature, getAvailableActions: getRefactorActionsToConvertOverloadsToOneSignature @@ -135944,8 +137982,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return emptyArray; if (!isRefactorErrorInfo(info)) { return [{ - name: refactorName6, - description: refactorDescription2, + name: refactorName7, + description: refactorDescription3, actions: [ info.addBraces ? addBracesAction : removeBracesAction ] @@ -135953,8 +137991,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName6, - description: refactorDescription2, + name: refactorName7, + description: refactorDescription3, actions: [ { ...addBracesAction, notApplicableReason: info.error }, { ...removeBracesAction, notApplicableReason: info.error } @@ -136045,25 +138083,25 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return void 0; } - var refactorName6, refactorDescription2, addBracesAction, removeBracesAction; + var refactorName7, refactorDescription3, addBracesAction, removeBracesAction; var init_addOrRemoveBracesToArrowFunction = __esm({ "src/services/refactors/addOrRemoveBracesToArrowFunction.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName6 = "Add or remove braces in an arrow function"; - refactorDescription2 = Diagnostics.Add_or_remove_braces_in_an_arrow_function.message; + refactorName7 = "Add or remove braces in an arrow function"; + refactorDescription3 = getLocaleSpecificMessage(Diagnostics.Add_or_remove_braces_in_an_arrow_function); addBracesAction = { name: "Add braces to arrow function", - description: Diagnostics.Add_braces_to_arrow_function.message, + description: getLocaleSpecificMessage(Diagnostics.Add_braces_to_arrow_function), kind: "refactor.rewrite.arrow.braces.add" }; removeBracesAction = { name: "Remove braces from arrow function", - description: Diagnostics.Remove_braces_from_arrow_function.message, + description: getLocaleSpecificMessage(Diagnostics.Remove_braces_from_arrow_function), kind: "refactor.rewrite.arrow.braces.remove" }; - registerRefactor(refactorName6, { + registerRefactor(refactorName7, { kinds: [removeBracesAction.kind], getEditsForAction: getRefactorEditsToRemoveFunctionBraces, getAvailableActions: getRefactorActionsToRemoveFunctionBraces @@ -136091,32 +138129,32 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const possibleActions = []; const errors = []; if (refactorKindBeginsWith(toNamedFunctionAction.kind, kind)) { - const error = selectedVariableDeclaration || isArrowFunction(func) && isVariableDeclaration(func.parent) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function); - if (error) { - errors.push({ ...toNamedFunctionAction, notApplicableReason: error }); + const error2 = selectedVariableDeclaration || isArrowFunction(func) && isVariableDeclaration(func.parent) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function); + if (error2) { + errors.push({ ...toNamedFunctionAction, notApplicableReason: error2 }); } else { possibleActions.push(toNamedFunctionAction); } } if (refactorKindBeginsWith(toAnonymousFunctionAction.kind, kind)) { - const error = !selectedVariableDeclaration && isArrowFunction(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function); - if (error) { - errors.push({ ...toAnonymousFunctionAction, notApplicableReason: error }); + const error2 = !selectedVariableDeclaration && isArrowFunction(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function); + if (error2) { + errors.push({ ...toAnonymousFunctionAction, notApplicableReason: error2 }); } else { possibleActions.push(toAnonymousFunctionAction); } } if (refactorKindBeginsWith(toArrowFunctionAction.kind, kind)) { - const error = isFunctionExpression(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function); - if (error) { - errors.push({ ...toArrowFunctionAction, notApplicableReason: error }); + const error2 = isFunctionExpression(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function); + if (error2) { + errors.push({ ...toArrowFunctionAction, notApplicableReason: error2 }); } else { possibleActions.push(toArrowFunctionAction); } } return [{ - name: refactorName7, - description: refactorDescription3, + name: refactorName8, + description: refactorDescription4, actions: possibleActions.length === 0 && context.preferences.provideRefactorNotApplicableReason ? errors : possibleActions }]; } @@ -136276,14 +138314,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isFunctionReferencedInFile(sourceFile, typeChecker, node) { return !!node.name && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(node.name, typeChecker, sourceFile); } - var refactorName7, refactorDescription3, toAnonymousFunctionAction, toNamedFunctionAction, toArrowFunctionAction; + var refactorName8, refactorDescription4, toAnonymousFunctionAction, toNamedFunctionAction, toArrowFunctionAction; var init_convertArrowFunctionOrFunctionExpression = __esm({ "src/services/refactors/convertArrowFunctionOrFunctionExpression.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName7 = "Convert arrow function or function expression"; - refactorDescription3 = getLocaleSpecificMessage(Diagnostics.Convert_arrow_function_or_function_expression); + refactorName8 = "Convert arrow function or function expression"; + refactorDescription4 = getLocaleSpecificMessage(Diagnostics.Convert_arrow_function_or_function_expression); toAnonymousFunctionAction = { name: "Convert to anonymous function", description: getLocaleSpecificMessage(Diagnostics.Convert_to_anonymous_function), @@ -136299,7 +138337,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} description: getLocaleSpecificMessage(Diagnostics.Convert_to_arrow_function), kind: "refactor.rewrite.function.arrow" }; - registerRefactor(refactorName7, { + registerRefactor(refactorName8, { kinds: [ toAnonymousFunctionAction.kind, toNamedFunctionAction.kind, @@ -136330,13 +138368,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!functionDeclaration) return emptyArray; return [{ - name: refactorName8, - description: refactorDescription4, + name: refactorName9, + description: refactorDescription5, actions: [toDestructuredAction] }]; } function getRefactorEditsToConvertParametersToDestructuredObject(context, actionName2) { - Debug.assert(actionName2 === refactorName8, "Unexpected action name"); + Debug.assert(actionName2 === refactorName9, "Unexpected action name"); const { file, startPosition, program, cancellationToken, host } = context; const functionDeclaration = getFunctionDeclarationAtPosition(file, startPosition, program.getTypeChecker()); if (!functionDeclaration || !cancellationToken) @@ -136522,14 +138560,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const functionReference = entry.node; const parent2 = functionReference.parent; switch (parent2.kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); if (callOrNewExpression && callOrNewExpression.expression === functionReference) { return callOrNewExpression; } break; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); @@ -136538,7 +138576,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); @@ -136556,13 +138594,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const reference = entry.node; const parent2 = reference.parent; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; @@ -136604,22 +138642,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false; switch (functionDeclaration.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: if (isObjectLiteralExpression(functionDeclaration.parent)) { const contextualSymbol = getSymbolForContextualType(functionDeclaration.name, checker); return ((_a = contextualSymbol == null ? void 0 : contextualSymbol.declarations) == null ? void 0 : _a.length) === 1 && isSingleImplementation(functionDeclaration, checker); } return isSingleImplementation(functionDeclaration, checker); - case 175 /* Constructor */: + case 176 /* Constructor */: if (isClassDeclaration(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); } - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return isValidVariableDeclaration(functionDeclaration.parent); } return false; @@ -136796,7 +138834,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getClassNames(constructorDeclaration) { switch (constructorDeclaration.parent.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const classDeclaration = constructorDeclaration.parent; if (classDeclaration.name) return [classDeclaration.name]; @@ -136805,7 +138843,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} "Nameless class declaration should be a default export" ); return [defaultModifier]; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: const classExpression = constructorDeclaration.parent; const variableDeclaration = constructorDeclaration.parent.parent; const className = classExpression.name; @@ -136816,7 +138854,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getFunctionNames(functionDeclaration) { switch (functionDeclaration.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: if (functionDeclaration.name) return [functionDeclaration.name]; const defaultModifier = Debug.checkDefined( @@ -136824,21 +138862,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} "Nameless function declaration should be a default export" ); return [defaultModifier]; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return [functionDeclaration.name]; - case 175 /* Constructor */: + case 176 /* Constructor */: const ctrKeyword = Debug.checkDefined( findChildOfKind(functionDeclaration, 137 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword" ); - if (functionDeclaration.parent.kind === 230 /* ClassExpression */) { + if (functionDeclaration.parent.kind === 231 /* ClassExpression */) { const variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; } return [ctrKeyword]; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return [functionDeclaration.parent.name]; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name]; return [functionDeclaration.parent.name]; @@ -136846,21 +138884,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return Debug.assertNever(functionDeclaration, `Unexpected function declaration kind ${functionDeclaration.kind}`); } } - var refactorName8, minimumParameterLength, refactorDescription4, toDestructuredAction; + var refactorName9, minimumParameterLength, refactorDescription5, toDestructuredAction; var init_convertParamsToDestructuredObject = __esm({ "src/services/refactors/convertParamsToDestructuredObject.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName8 = "Convert parameters to destructured object"; + refactorName9 = "Convert parameters to destructured object"; minimumParameterLength = 1; - refactorDescription4 = getLocaleSpecificMessage(Diagnostics.Convert_parameters_to_destructured_object); + refactorDescription5 = getLocaleSpecificMessage(Diagnostics.Convert_parameters_to_destructured_object); toDestructuredAction = { - name: refactorName8, - description: refactorDescription4, + name: refactorName9, + description: refactorDescription5, kind: "refactor.rewrite.parameters.toDestructured" }; - registerRefactor(refactorName8, { + registerRefactor(refactorName9, { kinds: [toDestructuredAction.kind], getEditsForAction: getRefactorEditsToConvertParametersToDestructuredObject, getAvailableActions: getRefactorActionsToConvertParametersToDestructuredObject @@ -136882,7 +138920,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { file, startPosition } = context; const node = getNodeOrParentOfParentheses(file, startPosition); const maybeBinary = getParentBinaryExpression(node); - const refactorInfo = { name: refactorName9, description: refactorDescription5, actions: [] }; + const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] }; if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) { refactorInfo.actions.push(convertStringAction); return [refactorInfo]; @@ -136908,7 +138946,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { file, startPosition } = context; const node = getNodeOrParentOfParentheses(file, startPosition); switch (actionName2) { - case refactorDescription5: + case refactorDescription6: return { edits: getEditsForToTemplateLiteral(context, node) }; default: return Debug.fail("invalid action"); @@ -136931,16 +138969,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function isNotEqualsOperator(node) { - return node.operatorToken.kind !== 64 /* EqualsToken */; + return !(node.operatorToken.kind === 64 /* EqualsToken */ || node.operatorToken.kind === 65 /* PlusEqualsToken */); } function getParentBinaryExpression(expr) { const container = findAncestor(expr.parent, (n) => { switch (n.kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return false; - case 227 /* TemplateExpression */: - case 225 /* BinaryExpression */: + case 228 /* TemplateExpression */: + case 226 /* BinaryExpression */: return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; @@ -137059,20 +139097,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return node; } - var refactorName9, refactorDescription5, convertStringAction, copyTrailingOperatorComments, copyCommentFromMultiNode; + var refactorName10, refactorDescription6, convertStringAction, copyTrailingOperatorComments, copyCommentFromMultiNode; var init_convertStringOrTemplateLiteral = __esm({ "src/services/refactors/convertStringOrTemplateLiteral.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName9 = "Convert to template string"; - refactorDescription5 = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string); + refactorName10 = "Convert to template string"; + refactorDescription6 = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string); convertStringAction = { - name: refactorName9, - description: refactorDescription5, + name: refactorName10, + description: refactorDescription6, kind: "refactor.rewrite.string" }; - registerRefactor(refactorName9, { + registerRefactor(refactorName10, { kinds: [convertStringAction.kind], getEditsForAction: getRefactorEditsToConvertToTemplateString, getAvailableActions: getRefactorActionsToConvertToTemplateString @@ -137122,14 +139160,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return emptyArray; if (!isRefactorErrorInfo(info)) { return [{ - name: refactorName10, + name: refactorName11, description: convertToOptionalChainExpressionMessage, actions: [toOptionalChainAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName10, + name: refactorName11, description: convertToOptionalChainExpressionMessage, actions: [{ ...toOptionalChainAction, notApplicableReason: info.error }] }]; @@ -137313,20 +139351,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } } - var refactorName10, convertToOptionalChainExpressionMessage, toOptionalChainAction; + var refactorName11, convertToOptionalChainExpressionMessage, toOptionalChainAction; var init_convertToOptionalChainExpression = __esm({ "src/services/refactors/convertToOptionalChainExpression.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName10 = "Convert to optional chain expression"; + refactorName11 = "Convert to optional chain expression"; convertToOptionalChainExpressionMessage = getLocaleSpecificMessage(Diagnostics.Convert_to_optional_chain_expression); toOptionalChainAction = { - name: refactorName10, + name: refactorName11, description: convertToOptionalChainExpressionMessage, kind: "refactor.rewrite.expression.optionalChain" }; - registerRefactor(refactorName10, { + registerRefactor(refactorName11, { kinds: [toOptionalChainAction.kind], getEditsForAction: getRefactorEditsToConvertToOptionalChain, getAvailableActions: getRefactorActionsToConvertToOptionalChain @@ -137355,14 +139393,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const errors = []; if (refactorKindBeginsWith(extractFunctionAction.kind, requestedRefactor)) { errors.push({ - name: refactorName11, + name: refactorName12, description: extractFunctionAction.description, actions: [{ ...extractFunctionAction, notApplicableReason: getStringError(rangeToExtract.errors) }] }); } if (refactorKindBeginsWith(extractConstantAction.kind, requestedRefactor)) { errors.push({ - name: refactorName11, + name: refactorName12, description: extractConstantAction.description, actions: [{ ...extractConstantAction, notApplicableReason: getStringError(rangeToExtract.errors) }] }); @@ -137426,37 +139464,37 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const infos = []; if (functionActions.length) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_function), actions: functionActions }); } else if (context.preferences.provideRefactorNotApplicableReason && innermostErrorFunctionAction) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_function), actions: [innermostErrorFunctionAction] }); } if (constantActions.length) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_constant), actions: constantActions }); } else if (context.preferences.provideRefactorNotApplicableReason && innermostErrorConstantAction) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_constant), actions: [innermostErrorConstantAction] }); } return infos.length ? infos : emptyArray; function getStringError(errors) { - let error = errors[0].messageText; - if (typeof error !== "string") { - error = error.messageText; + let error2 = errors[0].messageText; + if (typeof error2 !== "string") { + error2 = error2.messageText; } - return error; + return error2; } } function getRefactorEditsToExtractSymbol(context, actionName2) { @@ -137492,7 +139530,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!start || !end) { return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] }; } - if (start.flags & 8388608 /* JSDoc */) { + if (start.flags & 16777216 /* JSDoc */) { return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractJSDoc)] }; } if (start.parent !== end.parent) { @@ -137563,18 +139601,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function checkForStaticContext(nodeToCheck, containingClass) { let current = nodeToCheck; while (current !== containingClass) { - if (current.kind === 171 /* PropertyDeclaration */) { + if (current.kind === 172 /* PropertyDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 168 /* Parameter */) { + } else if (current.kind === 169 /* Parameter */) { const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 175 /* Constructor */) { + if (ctorOrMethod.kind === 176 /* Constructor */) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 173 /* MethodDeclaration */) { + } else if (current.kind === 174 /* MethodDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } @@ -137595,7 +139633,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!isStatement(nodeToCheck) && !(isExpressionNode(nodeToCheck) && isExtractableExpression(nodeToCheck)) && !isStringLiteralJsxAttribute(nodeToCheck)) { return [createDiagnosticForNode(nodeToCheck, Messages.statementOrExpressionExpected)]; } - if (nodeToCheck.flags & 16777216 /* Ambient */) { + if (nodeToCheck.flags & 33554432 /* Ambient */) { return [createDiagnosticForNode(nodeToCheck, Messages.cannotExtractAmbientBlock)]; } const containingClass = getContainingClass(nodeToCheck); @@ -137614,7 +139652,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} /*includeClassComputedPropertyName*/ false ); - if (container.kind === 261 /* FunctionDeclaration */ || container.kind === 173 /* MethodDeclaration */ && container.parent.kind === 209 /* ObjectLiteralExpression */ || container.kind === 217 /* FunctionExpression */) { + if (container.kind === 262 /* FunctionDeclaration */ || container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ || container.kind === 218 /* FunctionExpression */) { rangeFacts |= 16 /* UsesThisInFunction */; } } @@ -137624,21 +139662,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return true; } if (isDeclaration(node2)) { - const declaringNode = node2.kind === 259 /* VariableDeclaration */ ? node2.parent.parent : node2; + const declaringNode = node2.kind === 260 /* VariableDeclaration */ ? node2.parent.parent : node2; if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } } switch (node2.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); return true; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; case 108 /* SuperKeyword */: - if (node2.parent.kind === 212 /* CallExpression */) { + if (node2.parent.kind === 213 /* CallExpression */) { const containingClass2 = getContainingClass(node2); if (containingClass2 === void 0 || containingClass2.pos < span.start || containingClass2.end >= span.start + span.length) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractSuper)); @@ -137649,7 +139687,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} thisNode = node2; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: forEachChild(node2, function check(n) { if (isThis(n)) { rangeFacts |= 8 /* UsesThis */; @@ -137660,34 +139698,34 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} forEachChild(n, check); } }); - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); } - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return false; } const savedPermittedJumps = permittedJumps; switch (node2.kind) { - case 244 /* IfStatement */: + case 245 /* IfStatement */: permittedJumps &= ~4 /* Return */; break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: permittedJumps = 0 /* None */; break; - case 240 /* Block */: - if (node2.parent && node2.parent.kind === 257 /* TryStatement */ && node2.parent.finallyBlock === node2) { + case 241 /* Block */: + if (node2.parent && node2.parent.kind === 258 /* TryStatement */ && node2.parent.finallyBlock === node2) { permittedJumps = 4 /* Return */; } break; - case 296 /* DefaultClause */: - case 295 /* CaseClause */: + case 297 /* DefaultClause */: + case 296 /* CaseClause */: permittedJumps |= 1 /* Break */; break; default: @@ -137701,39 +139739,39 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; } switch (node2.kind) { - case 196 /* ThisType */: + case 197 /* ThisType */: case 110 /* ThisKeyword */: rangeFacts |= 8 /* UsesThis */; thisNode = node2; break; - case 255 /* LabeledStatement */: { + case 256 /* LabeledStatement */: { const label = node2.label; (seenLabels || (seenLabels = [])).push(label.escapedText); forEachChild(node2, visit); seenLabels.pop(); break; } - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: { + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: { const label = node2.label; if (label) { if (!contains(seenLabels, label.escapedText)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { - if (!(permittedJumps & (node2.kind === 251 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { + if (!(permittedJumps & (node2.kind === 252 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; } - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: rangeFacts |= 4 /* IsAsyncFunction */; break; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: rangeFacts |= 2 /* IsGenerator */; break; - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: if (permittedJumps & 4 /* Return */) { rangeFacts |= 1 /* HasReturn */; } else { @@ -137783,12 +139821,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const scopes = []; while (true) { current = current.parent; - if (current.kind === 168 /* Parameter */) { + if (current.kind === 169 /* Parameter */) { current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; } if (isScope(current)) { scopes.push(current); - if (current.kind === 311 /* SourceFile */) { + if (current.kind === 312 /* SourceFile */) { return scopes; } } @@ -137864,28 +139902,28 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getDescriptionForFunctionLikeDeclaration(scope) { switch (scope.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return "constructor"; - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return "arrow function"; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return `method '${scope.name.getText()}'`; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return `'get ${scope.name.getText()}'`; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return `'set ${scope.name.getText()}'`; default: Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); } } function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 262 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; + return scope.kind === 263 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; } function getDescriptionForModuleLikeDeclaration(scope) { - return scope.kind === 267 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; + return scope.kind === 268 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; } function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParameterUsages, substitutions }, exposedVariableDeclarations, range, context) { const checker = context.program.getTypeChecker(); @@ -138262,7 +140300,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); const localReference = factory.createIdentifier(localNameText); changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 243 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { + } else if (node.parent.kind === 244 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { const newVariableStatement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -138292,7 +140330,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} false ); } - if (node.parent.kind === 243 /* ExpressionStatement */) { + if (node.parent.kind === 244 /* ExpressionStatement */) { changeTracker.delete(context.file, node.parent); } else { let localReference = factory.createIdentifier(localNameText); @@ -138844,27 +140882,27 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isExtractableExpression(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 305 /* EnumMember */: + case 306 /* EnumMember */: return false; } switch (node.kind) { case 11 /* StringLiteral */: - return parent2.kind !== 271 /* ImportDeclaration */ && parent2.kind !== 275 /* ImportSpecifier */; - case 229 /* SpreadElement */: - case 205 /* ObjectBindingPattern */: - case 207 /* BindingElement */: + return parent2.kind !== 272 /* ImportDeclaration */ && parent2.kind !== 276 /* ImportSpecifier */; + case 230 /* SpreadElement */: + case 206 /* ObjectBindingPattern */: + case 208 /* BindingElement */: return false; case 80 /* Identifier */: - return parent2.kind !== 207 /* BindingElement */ && parent2.kind !== 275 /* ImportSpecifier */ && parent2.kind !== 280 /* ExportSpecifier */; + return parent2.kind !== 208 /* BindingElement */ && parent2.kind !== 276 /* ImportSpecifier */ && parent2.kind !== 281 /* ExportSpecifier */; } return true; } function isBlockLike(node) { switch (node.kind) { - case 240 /* Block */: - case 311 /* SourceFile */: - case 267 /* ModuleBlock */: - case 295 /* CaseClause */: + case 241 /* Block */: + case 312 /* SourceFile */: + case 268 /* ModuleBlock */: + case 296 /* CaseClause */: return true; default: return false; @@ -138876,13 +140914,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isStringLiteralJsxAttribute(node) { return isStringLiteral(node) && node.parent && isJsxAttribute(node.parent); } - var refactorName11, extractConstantAction, extractFunctionAction, Messages, RangeFacts; + var refactorName12, extractConstantAction, extractFunctionAction, Messages, RangeFacts; var init_extractSymbol = __esm({ "src/services/refactors/extractSymbol.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName11 = "Extract Symbol"; + refactorName12 = "Extract Symbol"; extractConstantAction = { name: "Extract Constant", description: getLocaleSpecificMessage(Diagnostics.Extract_constant), @@ -138893,7 +140931,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} description: getLocaleSpecificMessage(Diagnostics.Extract_function), kind: "refactor.extract.function" }; - registerRefactor(refactorName11, { + registerRefactor(refactorName12, { kinds: [ extractConstantAction.kind, extractFunctionAction.kind @@ -138966,7 +141004,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} init_ts4(); init_ts_refactor(); actionName = "Generate 'get' and 'set' accessors"; - actionDescription = Diagnostics.Generate_get_and_set_accessors.message; + actionDescription = getLocaleSpecificMessage(Diagnostics.Generate_get_and_set_accessors); generateGetSetAction = { name: actionName, description: actionDescription, @@ -139044,15 +141082,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return emptyArray; if (!isRefactorErrorInfo(info)) { return [{ - name: refactorName12, - description: refactorDescription6, + name: refactorName13, + description: refactorDescription7, actions: [inferReturnTypeAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName12, - description: refactorDescription6, + name: refactorName13, + description: refactorDescription7, actions: [{ ...inferReturnTypeAction, notApplicableReason: info.error }] }]; } @@ -139090,10 +141128,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConvertibleDeclaration(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return true; default: return false; @@ -139111,20 +141149,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return typeChecker.getReturnTypeOfSignature(signature); } } - var refactorName12, refactorDescription6, inferReturnTypeAction; + var refactorName13, refactorDescription7, inferReturnTypeAction; var init_inferFunctionReturnType = __esm({ "src/services/refactors/inferFunctionReturnType.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName12 = "Infer function return type"; - refactorDescription6 = Diagnostics.Infer_function_return_type.message; + refactorName13 = "Infer function return type"; + refactorDescription7 = getLocaleSpecificMessage(Diagnostics.Infer_function_return_type); inferReturnTypeAction = { - name: refactorName12, - description: refactorDescription6, + name: refactorName13, + description: refactorDescription7, kind: "refactor.rewrite.function.returnType" }; - registerRefactor(refactorName12, { + registerRefactor(refactorName13, { kinds: [inferReturnTypeAction.kind], getEditsForAction: getRefactorEditsToInferReturnType, getAvailableActions: getRefactorActionsToInferReturnType @@ -139185,6 +141223,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} init_convertImport(); init_extractType(); init_helpers(); + init_inlineVariable(); init_moveToNewFile(); init_moveToFile(); init_ts_refactor_addOrRemoveBracesToArrowFunction(); @@ -139233,13 +141272,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let inJSXElement = false; function visit(node) { switch (node.kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { @@ -139410,25 +141449,25 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return TokenModifier2; })(TokenModifier || {}); tokenFromDeclarationMapping = /* @__PURE__ */ new Map([ - [259 /* VariableDeclaration */, 7 /* variable */], - [168 /* Parameter */, 6 /* parameter */], - [171 /* PropertyDeclaration */, 9 /* property */], - [266 /* ModuleDeclaration */, 3 /* namespace */], - [265 /* EnumDeclaration */, 1 /* enum */], - [305 /* EnumMember */, 8 /* enumMember */], - [262 /* ClassDeclaration */, 0 /* class */], - [173 /* MethodDeclaration */, 11 /* member */], - [261 /* FunctionDeclaration */, 10 /* function */], - [217 /* FunctionExpression */, 10 /* function */], - [172 /* MethodSignature */, 11 /* member */], - [176 /* GetAccessor */, 9 /* property */], - [177 /* SetAccessor */, 9 /* property */], - [170 /* PropertySignature */, 9 /* property */], - [263 /* InterfaceDeclaration */, 2 /* interface */], - [264 /* TypeAliasDeclaration */, 5 /* type */], - [167 /* TypeParameter */, 4 /* typeParameter */], - [302 /* PropertyAssignment */, 9 /* property */], - [303 /* ShorthandPropertyAssignment */, 9 /* property */] + [260 /* VariableDeclaration */, 7 /* variable */], + [169 /* Parameter */, 6 /* parameter */], + [172 /* PropertyDeclaration */, 9 /* property */], + [267 /* ModuleDeclaration */, 3 /* namespace */], + [266 /* EnumDeclaration */, 1 /* enum */], + [306 /* EnumMember */, 8 /* enumMember */], + [263 /* ClassDeclaration */, 0 /* class */], + [174 /* MethodDeclaration */, 11 /* member */], + [262 /* FunctionDeclaration */, 10 /* function */], + [218 /* FunctionExpression */, 10 /* function */], + [173 /* MethodSignature */, 11 /* member */], + [177 /* GetAccessor */, 9 /* property */], + [178 /* SetAccessor */, 9 /* property */], + [171 /* PropertySignature */, 9 /* property */], + [264 /* InterfaceDeclaration */, 2 /* interface */], + [265 /* TypeAliasDeclaration */, 5 /* type */], + [168 /* TypeParameter */, 4 /* typeParameter */], + [303 /* PropertyAssignment */, 9 /* property */], + [304 /* ShorthandPropertyAssignment */, 9 /* property */] ]); } }); @@ -139437,7 +141476,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function createNode(kind, pos, end, parent2) { const node = isNodeKind(kind) ? new NodeObject(kind, pos, end) : kind === 80 /* Identifier */ ? new IdentifierObject(80 /* Identifier */, pos, end) : kind === 81 /* PrivateIdentifier */ ? new PrivateIdentifierObject(81 /* PrivateIdentifier */, pos, end) : new TokenObject(kind, pos, end); node.parent = parent2; - node.flags = parent2.flags & 50720768 /* ContextFlags */; + node.flags = parent2.flags & 101441536 /* ContextFlags */; return node; } function createChildren(node, sourceFile) { @@ -139491,7 +141530,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function createSyntaxList(nodes, parent2) { - const list = createNode(357 /* SyntaxList */, nodes.pos, nodes.end, parent2); + const list = createNode(358 /* SyntaxList */, nodes.pos, nodes.end, parent2); list._children = []; let pos = nodes.pos; for (const node of nodes) { @@ -139516,7 +141555,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} var _a; if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 176 /* GetAccessor */ || declaration.kind === 177 /* SetAccessor */) { + if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { return symbol.getContextualJsDocTags(declaration, checker); } return ((_a = symbol.declarations) == null ? void 0 : _a.length) === 1 ? symbol.getJsDocTags() : void 0; @@ -139539,7 +141578,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 176 /* GetAccessor */ || declaration.kind === 177 /* SetAccessor */) { + if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { return symbol.getContextualDocumentationComment(declaration, checker); } return symbol.getDocumentationComment(checker); @@ -139553,7 +141592,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function findBaseOfDeclaration(checker, declaration, cb) { var _a; - const classOrInterfaceDeclaration = ((_a = declaration.parent) == null ? void 0 : _a.kind) === 175 /* Constructor */ ? declaration.parent.parent : declaration.parent; + const classOrInterfaceDeclaration = ((_a = declaration.parent) == null ? void 0 : _a.kind) === 176 /* Constructor */ ? declaration.parent.parent : declaration.parent; if (!classOrInterfaceDeclaration) return; const isStaticMember = hasStaticModifier(declaration); @@ -139685,10 +141724,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} host.log(message); } } - const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const sourceMapper = getSourceMapper({ - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, + useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, getCurrentDirectory: () => currentDirectory, getProgram, fileExists: maybeBind(host, host.fileExists), @@ -139700,9 +141739,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getValidSourceFile(fileName) { const sourceFile = program.getSourceFile(fileName); if (!sourceFile) { - const error = new Error(`Could not find source file: '${fileName}'.`); - error.ProgramFiles = program.getSourceFiles().map((f) => f.fileName); - throw error; + const error2 = new Error(`Could not find source file: '${fileName}'.`); + error2.ProgramFiles = program.getSourceFiles().map((f) => f.fileName); + throw error2; } return sourceFile; } @@ -139736,7 +141775,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} getSourceFileByPath: getOrCreateSourceFileByPath, getCancellationToken: () => cancellationToken, getCanonicalFileName, - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, + useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, getNewLine: () => getNewLineCharacter(newSettings), getDefaultLibFileName: (options2) => host.getDefaultLibFileName(options2), writeFile: noop, @@ -139780,9 +141819,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} compilerHost.getSourceFile = getSourceFileWithCache; (_c = host.setCompilerHost) == null ? void 0 : _c.call(host, compilerHost); const parseConfigHost = { - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, fileExists: (fileName) => compilerHost.fileExists(fileName), readFile: (fileName) => compilerHost.readFile(fileName), + directoryExists: (f) => compilerHost.directoryExists(f), + getDirectories: (f) => compilerHost.getDirectories(f), + realpath: compilerHost.realpath, readDirectory: (...args) => compilerHost.readDirectory(...args), trace: compilerHost.trace, getCurrentDirectory: compilerHost.getCurrentDirectory, @@ -139935,14 +141977,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function cleanupSemanticCache() { - program = void 0; - } - function dispose() { if (program) { const key = documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions()); forEach(program.getSourceFiles(), (f) => documentRegistry.releaseDocumentWithKey(f.resolvedPath, key, f.scriptKind, f.impliedNodeFormat)); program = void 0; } + } + function dispose() { + cleanupSemanticCache(); host = void 0; } function getSyntacticDiagnostics(fileName) { @@ -140061,15 +142103,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} switch (node.kind) { case 80 /* Identifier */: return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 210 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: return !isInComment(sourceFile, position); case 110 /* ThisKeyword */: - case 196 /* ThisType */: + case 197 /* ThisType */: case 108 /* SuperKeyword */: - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return true; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return isImportMeta(node); default: return false; @@ -140169,15 +142211,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } switch (node.kind) { - case 210 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: case 11 /* StringLiteral */: case 97 /* FalseKeyword */: case 112 /* TrueKeyword */: case 106 /* NullKeyword */: case 108 /* SuperKeyword */: case 110 /* ThisKeyword */: - case 196 /* ThisType */: + case 197 /* ThisType */: case 80 /* Identifier */: break; default: @@ -140188,7 +142230,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 266 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 267 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { break; @@ -140365,7 +142407,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getLinkedEditingRangeAtPosition(fileName, position) { const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); const token = findPrecedingToken(position, sourceFile); - if (!token || token.parent.kind === 311 /* SourceFile */) + if (!token || token.parent.kind === 312 /* SourceFile */) return void 0; const jsxTagWordPattern = "[a-zA-Z0-9:\\-\\._$]*"; if (isJsxFragment(token.parent.parent)) { @@ -140613,7 +142655,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return !tagNamesAreEquivalent(openingElement.tagName, closingElement.tagName) || isJsxElement(parent2) && tagNamesAreEquivalent(openingElement.tagName, parent2.openingElement.tagName) && isUnclosedTag(parent2); } function isUnclosedFragment({ closingFragment, parent: parent2 }) { - return !!(closingFragment.flags & 131072 /* ThisNodeHasError */) || isJsxFragment(parent2) && isUnclosedFragment(parent2); + return !!(closingFragment.flags & 262144 /* ThisNodeHasError */) || isJsxFragment(parent2) && isUnclosedFragment(parent2); } function getSpanOfEnclosingComment(fileName, position, onlyMultiLine) { const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); @@ -140655,7 +142697,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return result; function escapeRegExp(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&"); } function getTodoCommentsRegExp() { const singleLineCommentStart = /(?:\/\/+\s*)/.source; @@ -140723,10 +142765,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const newFileName = createNewFileName(sourceFile, program, getRefactorContext(sourceFile, positionOrRange, preferences, emptyOptions), host); return { newFileName, files }; } - function getEditsForRefactor2(fileName, formatOptions, positionOrRange, refactorName13, actionName2, preferences = emptyOptions, interactiveRefactorArguments) { + function getEditsForRefactor2(fileName, formatOptions, positionOrRange, refactorName14, actionName2, preferences = emptyOptions, interactiveRefactorArguments) { synchronizeHostData(); const file = getValidSourceFile(fileName); - return ts_refactor_exports.getEditsForRefactor(getRefactorContext(file, positionOrRange, preferences, formatOptions), refactorName13, actionName2, interactiveRefactorArguments); + return ts_refactor_exports.getEditsForRefactor(getRefactorContext(file, positionOrRange, preferences, formatOptions), refactorName14, actionName2, interactiveRefactorArguments); } function toLineColumnOffset(fileName, position) { if (position === 0) { @@ -140874,7 +142916,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); } function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 282 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); + return isDeclarationName(node) || node.parent.kind === 283 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); @@ -140885,11 +142927,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; } case 80 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 209 /* ObjectLiteralExpression */ || node.parent.parent.kind === 291 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; + return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.parent.kind === 292 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; } return void 0; } @@ -140930,7 +142972,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return discriminatedPropertySymbols; } function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 211 /* ElementAccessExpression */ && node.parent.argumentExpression === node; + return node && node.parent && node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { if (sys) { @@ -141016,8 +143058,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!children.length) { return void 0; } - const child = find(children, (kid) => kid.kind < 315 /* FirstJSDocNode */ || kid.kind > 356 /* LastJSDocNode */); - return child.kind < 165 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + const child = find(children, (kid) => kid.kind < 316 /* FirstJSDocNode */ || kid.kind > 357 /* LastJSDocNode */); + return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile); } getLastToken(sourceFile) { this.assertHasRealPosition(); @@ -141026,7 +143068,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!child) { return void 0; } - return child.kind < 165 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 166 /* FirstNode */ ? child : child.getLastToken(sourceFile); } forEachChild(cbNode, cbNodeArray) { return forEachChild(this, cbNode, cbNodeArray); @@ -141327,7 +143369,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} SourceFileObject = class extends NodeObject { constructor(kind, pos, end) { super(kind, pos, end); - this.kind = 311 /* SourceFile */; + this.kind = 312 /* SourceFile */; } update(newText, textChangeRange) { return updateSourceFile(this, newText, textChangeRange); @@ -141383,10 +143425,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function visit(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: const functionDeclaration = node; const declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -141402,29 +143444,29 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } forEachChild(node, visit); break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 266 /* ModuleDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 280 /* ExportSpecifier */: - case 275 /* ImportSpecifier */: - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 186 /* TypeLiteral */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 281 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 187 /* TypeLiteral */: addDeclaration(node); forEachChild(node, visit); break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { break; } - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: { + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: { const decl = node; if (isBindingPattern(decl.name)) { forEachChild(decl.name, visit); @@ -141434,12 +143476,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} visit(decl.initializer); } } - case 305 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 306 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: addDeclaration(node); break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDeclaration = node; if (exportDeclaration.exportClause) { if (isNamedExports(exportDeclaration.exportClause)) { @@ -141449,14 +143491,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } break; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: const importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause.name); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { forEach(importClause.namedBindings.elements, visit); @@ -141464,7 +143506,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) !== 0 /* None */) { addDeclaration(node); } @@ -142600,7 +144642,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } tokenAtLocation = preceding; } - if (tokenAtLocation.flags & 16777216 /* Ambient */) { + if (tokenAtLocation.flags & 33554432 /* Ambient */) { return void 0; } return spanInNode(tokenAtLocation); @@ -142643,89 +144685,89 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (node) { const { parent: parent2 } = node; switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 259 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 260 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return spanInVariableDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return spanInParameterDeclaration(node); - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 240 /* Block */: + case 241 /* Block */: if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return spanInBlock(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return spanInBlock(node.block); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return textSpan(node.expression); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return spanInNode(node.statement); - case 258 /* DebuggerStatement */: + case 259 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return spanInNode(node.statement); - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return spanInForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return spanInInitializerOfForLike(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return spanInNode(node.statements[0]); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return spanInBlock(node.tryBlock); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return textSpan(node, node.expression); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return textSpan(node, node.expression); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return textSpan(node, node.moduleReference); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (getModuleInstanceState(node) !== 1 /* Instantiated */) { return void 0; } - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 207 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 208 /* BindingElement */: return textSpan(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return spanInNode(node.statement); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return spanInBindingPattern(node); - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return void 0; case 27 /* SemicolonToken */: case 1 /* EndOfFileToken */: @@ -142753,16 +144795,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 85 /* CatchKeyword */: case 98 /* FinallyKeyword */: return spanInNextNode(node); - case 164 /* OfKeyword */: + case 165 /* OfKeyword */: return spanInOfKeyword(node); default: if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 80 /* Identifier */ || node.kind === 229 /* SpreadElement */ || node.kind === 302 /* PropertyAssignment */ || node.kind === 303 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { + if ((node.kind === 80 /* Identifier */ || node.kind === 230 /* SpreadElement */ || node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { return textSpan(node); } - if (node.kind === 225 /* BinaryExpression */) { + if (node.kind === 226 /* BinaryExpression */) { const { left, operatorToken } = node; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern( @@ -142778,19 +144820,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (isExpressionNode(node)) { switch (parent2.kind) { - case 245 /* DoStatement */: + case 246 /* DoStatement */: return spanInPreviousNode(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNode(node.parent); - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: return textSpan(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (node.parent.operatorToken.kind === 28 /* CommaToken */) { return textSpan(node); } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (node.parent.body === node) { return textSpan(node); } @@ -142798,25 +144840,25 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } switch (node.parent.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } break; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: if (node.parent.type === node) { return spanInNextNode(node.parent.type); } break; - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: { + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: { const { initializer, type } = node.parent; if (initializer === node || type === node || isAssignmentOperator(node.kind)) { return spanInPreviousNode(node); } break; } - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const { left } = node.parent; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { return spanInPreviousNode(node); @@ -142839,14 +144881,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 248 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 249 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } const parent2 = variableDeclaration.parent; if (isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } - if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 249 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 250 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -142873,7 +144915,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 262 /* ClassDeclaration */ && functionDeclaration.kind !== 175 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 263 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -142893,22 +144935,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function spanInBlock(block) { switch (block.parent.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return void 0; } - case 246 /* WhileStatement */: - case 244 /* IfStatement */: - case 248 /* ForInStatement */: + case 247 /* WhileStatement */: + case 245 /* IfStatement */: + case 249 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 260 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 261 /* VariableDeclarationList */) { const variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -142931,64 +144973,64 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function spanInBindingPattern(bindingPattern) { const firstBindingElement = forEach( bindingPattern.elements, - (element) => element.kind !== 231 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 207 /* BindingElement */) { + if (bindingPattern.parent.kind === 208 /* BindingElement */) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 206 /* ArrayBindingPattern */ && node2.kind !== 205 /* ObjectBindingPattern */); - const elements = node2.kind === 208 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; + Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */); + const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; const firstBindingElement = forEach( elements, - (element) => element.kind !== 231 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node2.parent.kind === 225 /* BinaryExpression */ ? node2.parent : node2); + return textSpan(node2.parent.kind === 226 /* BinaryExpression */ ? node2.parent : node2); } function spanInOpenBraceToken(node2) { switch (node2.parent.kind) { - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: const enumDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const classDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); } return spanInNode(node2.parent); } function spanInCloseBraceToken(node2) { switch (node2.parent.kind) { - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { return void 0; } - case 265 /* EnumDeclaration */: - case 262 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 263 /* ClassDeclaration */: return textSpan(node2); - case 240 /* Block */: + case 241 /* Block */: if (isFunctionBlock(node2.parent)) { return textSpan(node2); } - case 298 /* CatchClause */: + case 299 /* CatchClause */: return spanInNode(lastOrUndefined(node2.parent.statements)); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: const caseBlock = node2.parent; const lastClause = lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(lastOrUndefined(lastClause.statements)); } return void 0; - case 205 /* ObjectBindingPattern */: + case 206 /* ObjectBindingPattern */: const bindingPattern = node2.parent; return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -143001,7 +145043,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function spanInCloseBracketToken(node2) { switch (node2.parent.kind) { - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: const bindingPattern = node2.parent; return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -143013,57 +145055,57 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function spanInOpenParenToken(node2) { - if (node2.parent.kind === 245 /* DoStatement */ || // Go to while keyword and do action instead - node2.parent.kind === 212 /* CallExpression */ || node2.parent.kind === 213 /* NewExpression */) { + if (node2.parent.kind === 246 /* DoStatement */ || // Go to while keyword and do action instead + node2.parent.kind === 213 /* CallExpression */ || node2.parent.kind === 214 /* NewExpression */) { return spanInPreviousNode(node2); } - if (node2.parent.kind === 216 /* ParenthesizedExpression */) { + if (node2.parent.kind === 217 /* ParenthesizedExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInCloseParenToken(node2) { switch (node2.parent.kind) { - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: - case 246 /* WhileStatement */: - case 245 /* DoStatement */: - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 216 /* ParenthesizedExpression */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: + case 247 /* WhileStatement */: + case 246 /* DoStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 217 /* ParenthesizedExpression */: return spanInPreviousNode(node2); default: return spanInNode(node2.parent); } } function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 302 /* PropertyAssignment */ || node2.parent.kind === 168 /* Parameter */) { + if (isFunctionLike(node2.parent) || node2.parent.kind === 303 /* PropertyAssignment */ || node2.parent.kind === 169 /* Parameter */) { return spanInPreviousNode(node2); } return spanInNode(node2.parent); } function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 215 /* TypeAssertionExpression */) { + if (node2.parent.kind === 216 /* TypeAssertionExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInWhileKeyword(node2) { - if (node2.parent.kind === 245 /* DoStatement */) { + if (node2.parent.kind === 246 /* DoStatement */) { return textSpanEndingAtNextToken(node2, node2.parent.expression); } return spanInNode(node2.parent); } function spanInOfKeyword(node2) { - if (node2.parent.kind === 249 /* ForOfStatement */) { + if (node2.parent.kind === 250 /* ForOfStatement */) { return spanInNextNode(node2); } return spanInNode(node2.parent); @@ -143161,16 +145203,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } switch (node.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - if (node.parent.kind === 209 /* ObjectLiteralExpression */) { + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + if (node.parent.kind === 210 /* ObjectLiteralExpression */) { return (_a = getAssignedName(node.parent)) == null ? void 0 : _a.getText(); } return (_b = getNameOfDeclaration(node.parent)) == null ? void 0 : _b.getText(); - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { return node.parent.parent.name.getText(); } @@ -143372,7 +145414,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function collect(node) { if (!node) return; - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return; } if (isValidCallHierarchyDeclaration(node)) { @@ -143387,55 +145429,55 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } switch (node.kind) { case 80 /* Identifier */: - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return; - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: recordCallSite(node); return; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: collect(node.expression); return; - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: collect(node.name); collect(node.initializer); return; - case 212 /* CallExpression */: + case 213 /* CallExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 213 /* NewExpression */: + case 214 /* NewExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: recordCallSite(node); collect(node.tag); collect(node.template); return; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: recordCallSite(node); collect(node.tagName); collect(node.attributes); return; - case 169 /* Decorator */: + case 170 /* Decorator */: recordCallSite(node); collect(node.expression); return; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: recordCallSite(node); forEachChild(node, collect); break; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: collect(node.expression); return; } @@ -143488,25 +145530,25 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const callSites = []; const collect = createCallSiteCollector(program, callSites); switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: collectCallSitesOfSourceFile(node, collect); break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: collectCallSitesOfModuleDeclaration(node, collect); break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: collectCallSitesOfClassLikeDeclaration(node, collect); break; - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: collectCallSitesOfClassStaticBlockDeclaration(node, collect); break; default: @@ -143521,7 +145563,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return createCallHierarchyOutgoingCall(createCallHierarchyItem(program, entries[0].declaration), map(entries, (entry) => createTextSpanFromRange(entry.range))); } function getOutgoingCalls(program, declaration) { - if (declaration.flags & 16777216 /* Ambient */ || isMethodSignature(declaration)) { + if (declaration.flags & 33554432 /* Ambient */ || isMethodSignature(declaration)) { return []; } return group(collectCallSites(program, declaration), getCallSiteGroupKey, (entries) => convertCallSiteGroupToOutgoingCall(program, entries)); @@ -143598,9 +145640,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { fixName: fixName8, description: description3, changes, fixId: fixId52, fixAllDescription, commands: command ? [command] : void 0 }; } function registerCodeFix(reg) { - for (const error of reg.errorCodes) { + for (const error2 of reg.errorCodes) { errorCodeToFixesArray = void 0; - errorCodeToFixes.add(String(error), reg); + errorCodeToFixes.add(String(error2), reg); } if (reg.fixIds) { for (const fixId52 of reg.fixIds) { @@ -143716,6 +145758,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} registerCodeFix({ errorCodes: [ Diagnostics.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.code, + Diagnostics.await_using_statements_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.code, Diagnostics.for_await_loops_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.code ], getCodeActions: function getCodeActionsToAddEmptyExportDeclaration(context) { @@ -143867,7 +145910,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 242 /* VariableStatement */); + const variableStatement = getAncestor(declaration, 243 /* VariableStatement */); if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; @@ -143926,7 +145969,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} checker.getTypeAtLocation(errorNode).flags & 1 /* Any */; } function isInsideAwaitableBody(node) { - return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 261 /* FunctionDeclaration */ || ancestor.parent.kind === 217 /* FunctionExpression */ || ancestor.parent.kind === 218 /* ArrowFunction */ || ancestor.parent.kind === 173 /* MethodDeclaration */)); + return node.kind & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 262 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -144092,10 +146135,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isPossiblyPartOfDestructuring(node) { switch (node.kind) { case 80 /* Identifier */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return true; default: return false; @@ -144112,7 +146155,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isPossiblyPartOfCommaSeperatedInitializer(node) { switch (node.kind) { case 80 /* Identifier */: - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: case 28 /* CommaToken */: return true; default: @@ -144163,7 +146206,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } const declaration = token.parent; - if (declaration.kind === 171 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { + if (declaration.kind === 172 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { changeTracker.insertModifierBefore(sourceFile, 138 /* DeclareKeyword */, declaration); } } @@ -144330,7 +146373,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const d = add.valueDeclaration; if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ - ...d.type.kind === 191 /* UnionType */ ? d.type.types : [d.type], + ...d.type.kind === 192 /* UnionType */ ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") ]); changes.replaceNode(d.getSourceFile(), d.type, t); @@ -144407,26 +146450,26 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 259 /* VariableDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 171 /* PropertyDeclaration */; + return isFunctionLikeDeclaration(node) || node.kind === 260 /* VariableDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 172 /* PropertyDeclaration */; } function transformJSDocType(node) { switch (node.kind) { - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: return factory.createTypeReferenceNode("any", emptyArray); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return transformJSDocOptionalType(node); - case 321 /* JSDocNonNullableType */: + case 322 /* JSDocNonNullableType */: return transformJSDocType(node.type); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return transformJSDocNullableType(node); - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: return transformJSDocVariadicType(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return transformJSDocFunctionType(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return transformJSDocTypeReference(node); - case 328 /* JSDocTypeLiteral */: + case 329 /* JSDocTypeLiteral */: return transformJSDocTypeLiteral(node); default: const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); @@ -144459,7 +146502,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function transformJSDocParameter(node) { const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 324 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; + const isRest = node.type.kind === 325 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; const name = node.name || (isRest ? "rest" : "arg" + index); const dotdotdot = isRest ? factory.createToken(26 /* DotDotDotToken */) : node.dotDotDotToken; return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer); @@ -144641,7 +146684,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} })) { return; } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 243 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; + const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 244 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; changes.delete(sourceFile, nodeToDelete); if (!assignmentExpr) { members.push(factory.createPropertyDeclaration( @@ -144726,7 +146769,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function createArrowFunctionExpressionMember(members2, arrowFunction, name) { const arrowFunctionBody = arrowFunction.body; let bodyBlock; - if (arrowFunctionBody.kind === 240 /* Block */) { + if (arrowFunctionBody.kind === 241 /* Block */) { bodyBlock = arrowFunctionBody; } else { bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); @@ -145289,7 +147332,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} switch (func.kind) { case 106 /* NullKeyword */: break; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: case 80 /* Identifier */: if (!inputArgName) { break; @@ -145314,8 +147357,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); } return varDeclOrAssignment; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: { + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: { const funcBody = func.body; const returnType2 = (_a = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a.getReturnType(); if (isBlock(funcBody)) { @@ -145557,7 +147600,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const importNode = importFromModuleSpecifier(moduleSpecifier); switch (importNode.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: changes.replaceNode(importingFile, importNode, makeImport( importNode.name, /*namedImports*/ @@ -145566,7 +147609,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} quotePreference )); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isRequireCall( importNode, /*requireStringLiteralLikeArgument*/ @@ -145635,13 +147678,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) { switch (statement.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); return false; - case 243 /* ExpressionStatement */: { + case 244 /* ExpressionStatement */: { const { expression } = statement; switch (expression.kind) { - case 212 /* CallExpression */: { + case 213 /* CallExpression */: { if (isRequireCall( expression, /*requireStringLiteralLikeArgument*/ @@ -145658,7 +147701,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return false; } - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const { operatorToken } = expression; return operatorToken.kind === 64 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify); } @@ -145712,8 +147755,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: { + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: { const tmp = makeUniqueName(propertyName, identifiers); return convertedImports([ makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), @@ -145761,14 +147804,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function tryChangeModuleExportsObject(object, useSitesToUnqualify) { const statements = mapAllOrFail(object.properties, (prop) => { switch (prop.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return void 0; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(95 /* ExportKeyword */)], prop, useSitesToUnqualify); default: Debug.assertNever(prop, `Convert to ES6 got invalid prop kind ${prop.kind}`); @@ -145846,15 +147889,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { const modifiers = [factory.createToken(95 /* ExportKeyword */)]; switch (exported.kind) { - case 217 /* FunctionExpression */: { + case 218 /* FunctionExpression */: { const { name: expressionName } = exported; if (expressionName && expressionName.text !== name) { return exportConst(); } } - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); default: return exportConst(); @@ -145879,7 +147922,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} replaceNode ); function replaceNode(original) { - if (original.kind === 210 /* PropertyAccessExpression */) { + if (original.kind === 211 /* PropertyAccessExpression */) { const replacement = useSitesToUnqualify.get(original); useSitesToUnqualify.delete(original); return replacement; @@ -145888,7 +147931,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: { + case 206 /* ObjectBindingPattern */: { const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier(e.propertyName) || !isIdentifier(e.name) ? void 0 : makeImportSpecifier2(e.propertyName && e.propertyName.text, e.name.text)); if (importSpecifiers) { return convertedImports([makeImport( @@ -145900,7 +147943,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} )]); } } - case 206 /* ArrayBindingPattern */: { + case 207 /* ArrayBindingPattern */: { const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); return convertedImports([ makeImport( @@ -145987,11 +148030,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isFreeIdentifier(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return parent2.name !== node; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return parent2.propertyName !== node; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return parent2.propertyName !== node; default: return true; @@ -146232,7 +148275,27 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { parent: parent2 } = getTokenAtPosition(sourceFile, pos); return isImportSpecifier(parent2) || isImportDeclaration(parent2) && parent2.importClause ? parent2 : void 0; } + function canConvertImportDeclarationForSpecifier(specifier, sourceFile, program) { + if (specifier.parent.parent.name) { + return false; + } + const nonTypeOnlySpecifiers = specifier.parent.elements.filter((e) => !e.isTypeOnly); + if (nonTypeOnlySpecifiers.length === 1) { + return true; + } + const checker = program.getTypeChecker(); + for (const specifier2 of nonTypeOnlySpecifiers) { + const isUsedAsValue = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(specifier2.name, checker, sourceFile, (usage) => { + return !isValidTypeOnlyAliasUseSite(usage); + }); + if (isUsedAsValue) { + return false; + } + } + return true; + } function doChange11(changes, sourceFile, declaration) { + var _a; if (isImportSpecifier(declaration)) { changes.replaceNode(sourceFile, declaration, factory.updateImportSpecifier( declaration, @@ -146303,6 +148366,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ) ]); } else { + const newNamedBindings = ((_a = importClause.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */ ? factory.updateNamedImports( + importClause.namedBindings, + sameMap(importClause.namedBindings.elements, (e) => factory.updateImportSpecifier( + e, + /*isTypeOnly*/ + false, + e.propertyName, + e.name + )) + ) : importClause.namedBindings; const importDeclaration = factory.updateImportDeclaration( declaration, declaration.modifiers, @@ -146311,7 +148384,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} /*isTypeOnly*/ true, importClause.name, - importClause.namedBindings + newNamedBindings ), declaration.moduleSpecifier, declaration.assertClause @@ -146334,19 +148407,41 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} registerCodeFix({ errorCodes: errorCodes14, getCodeActions: function getCodeActionsToConvertToTypeOnlyImport(context) { + var _a; const declaration = getDeclaration2(context.sourceFile, context.span.start); if (declaration) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration)); - return [createCodeFixAction(fixId13, changes, Diagnostics.Convert_to_type_only_import, fixId13, Diagnostics.Convert_all_imports_not_used_as_a_value_to_type_only_imports)]; + const importDeclarationChanges = declaration.kind === 276 /* ImportSpecifier */ && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0; + const mainAction = createCodeFixAction( + fixId13, + changes, + declaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Use_type_0, ((_a = declaration.propertyName) == null ? void 0 : _a.text) ?? declaration.name.text] : Diagnostics.Use_import_type, + fixId13, + Diagnostics.Fix_all_with_type_only_imports + ); + if (some(importDeclarationChanges)) { + return [ + createCodeFixActionWithoutFixAll(fixId13, importDeclarationChanges, Diagnostics.Use_import_type), + mainAction + ]; + } + return [mainAction]; } return void 0; }, fixIds: [fixId13], getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyImport(context) { + const fixedImportDeclarations = /* @__PURE__ */ new Set(); return codeFixAll(context, errorCodes14, (changes, diag2) => { - const declaration = getDeclaration2(diag2.file, diag2.start); - if (declaration) { - doChange11(changes, diag2.file, declaration); + const errorDeclaration = getDeclaration2(diag2.file, diag2.start); + if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 272 /* ImportDeclaration */ && !fixedImportDeclarations.has(errorDeclaration)) { + doChange11(changes, diag2.file, errorDeclaration); + fixedImportDeclarations.add(errorDeclaration); + } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */ && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) { + doChange11(changes, diag2.file, errorDeclaration.parent.parent.parent); + fixedImportDeclarations.add(errorDeclaration.parent.parent.parent); + } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */) { + doChange11(changes, diag2.file, errorDeclaration); } }); } @@ -146355,23 +148450,60 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); // src/services/codefixes/convertTypedefToType.ts - function doChange12(changes, node, sourceFile) { - if (isJSDocTypedefTag(node)) { - fixSingleTypeDef(changes, node, sourceFile); - } - } - function fixSingleTypeDef(changes, typeDefNode, sourceFile) { - if (!typeDefNode) + function doChange12(changes, node, sourceFile, newLine, fixAll = false) { + if (!isJSDocTypedefTag(node)) return; - const declaration = createDeclaration(typeDefNode); + const declaration = createDeclaration(node); if (!declaration) return; - const comment = typeDefNode.parent; - changes.replaceNode( - sourceFile, - comment, - declaration + const commentNode = node.parent; + const { leftSibling, rightSibling } = getLeftAndRightSiblings(node); + let pos = commentNode.getStart(); + let prefix = ""; + if (!leftSibling && commentNode.comment) { + pos = findEndOfTextBetween(commentNode, commentNode.getStart(), node.getStart()); + prefix = `${newLine} */${newLine}`; + } + if (leftSibling) { + if (fixAll && isJSDocTypedefTag(leftSibling)) { + pos = node.getStart(); + prefix = ""; + } else { + pos = findEndOfTextBetween(commentNode, leftSibling.getStart(), node.getStart()); + prefix = `${newLine} */${newLine}`; + } + } + let end = commentNode.getEnd(); + let suffix = ""; + if (rightSibling) { + if (fixAll && isJSDocTypedefTag(rightSibling)) { + end = rightSibling.getStart(); + suffix = `${newLine}${newLine}`; + } else { + end = rightSibling.getStart(); + suffix = `${newLine}/**${newLine} * `; + } + } + changes.replaceRange(sourceFile, { pos, end }, declaration, { prefix, suffix }); + } + function getLeftAndRightSiblings(typedefNode) { + const commentNode = typedefNode.parent; + const maxChildIndex = commentNode.getChildCount() - 1; + const currentNodeIndex = commentNode.getChildren().findIndex( + (n) => n.getStart() === typedefNode.getStart() && n.getEnd() === typedefNode.getEnd() ); + const leftSibling = currentNodeIndex > 0 ? commentNode.getChildAt(currentNodeIndex - 1) : void 0; + const rightSibling = currentNodeIndex < maxChildIndex ? commentNode.getChildAt(currentNodeIndex + 1) : void 0; + return { leftSibling, rightSibling }; + } + function findEndOfTextBetween(jsDocComment, from, to) { + const comment = jsDocComment.getText().substring(from - jsDocComment.getStart(), to - jsDocComment.getStart()); + for (let i = comment.length; i > 0; i--) { + if (!/[*/\s]/g.test(comment.substring(i - 1, i))) { + return from + i; + } + } + return to; } function createDeclaration(tag) { var _a; @@ -146381,10 +148513,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const typeName = (_a = tag.name) == null ? void 0 : _a.getText(); if (!typeName) return; - if (typeExpression.kind === 328 /* JSDocTypeLiteral */) { + if (typeExpression.kind === 329 /* JSDocTypeLiteral */) { return createInterfaceForTypeLiteral(typeName, typeExpression); } - if (typeExpression.kind === 315 /* JSDocTypeExpression */) { + if (typeExpression.kind === 316 /* JSDocTypeExpression */) { return createTypeAliasForTypeExpression(typeName, typeExpression); } } @@ -146392,7 +148524,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const propertySignatures = createSignatureFromTypeLiteral(typeLiteral); if (!some(propertySignatures)) return; - const interfaceDeclaration = factory.createInterfaceDeclaration( + return factory.createInterfaceDeclaration( /*modifiers*/ void 0, typeName, @@ -146402,13 +148534,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} void 0, propertySignatures ); - return interfaceDeclaration; } function createTypeAliasForTypeExpression(typeName, typeExpression) { const typeReference = getSynthesizedDeepClone(typeExpression.type); if (!typeReference) return; - const declaration = factory.createTypeAliasDeclaration( + return factory.createTypeAliasDeclaration( /*modifiers*/ void 0, factory.createIdentifier(typeName), @@ -146416,7 +148547,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} void 0, typeReference ); - return declaration; } function createSignatureFromTypeLiteral(typeLiteral) { const propertyTags = typeLiteral.jsDocPropertyTags; @@ -146436,30 +148566,28 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (typeReference && name) { const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; - const prop = factory.createPropertySignature( + return factory.createPropertySignature( /*modifiers*/ void 0, name, questionToken, typeReference ); - return prop; } }; - const props = mapDefined(propertyTags, getSignature); - return props; + return mapDefined(propertyTags, getSignature); } function getPropertyName(tag) { return tag.name.kind === 80 /* Identifier */ ? tag.name.text : tag.name.right.text; } - function getJSDocTypedefNode(node) { + function getJSDocTypedefNodes(node) { if (hasJSDocNodes(node)) { - return forEach(node.jsDoc, (node2) => { + return flatMap(node.jsDoc, (doc) => { var _a; - return (_a = node2.tags) == null ? void 0 : _a.find(isJSDocTypedefTag); + return (_a = doc.tags) == null ? void 0 : _a.filter((tag) => isJSDocTypedefTag(tag)); }); } - return void 0; + return []; } var fixId14, errorCodes15; var init_convertTypedefToType = __esm({ @@ -146473,13 +148601,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} fixIds: [fixId14], errorCodes: errorCodes15, getCodeActions(context) { + const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); const node = getTokenAtPosition( context.sourceFile, context.span.start ); if (!node) return; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange12(t, node, context.sourceFile)); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange12(t, node, context.sourceFile, newLineCharacter)); if (changes.length > 0) { return [ createCodeFixAction( @@ -146492,11 +148621,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ]; } }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes15, (changes, diag2) => { - const node = getTokenAtPosition(diag2.file, diag2.start); - if (node) - doChange12(changes, node, diag2.file); - }) + getAllCodeActions: (context) => codeFixAll( + context, + errorCodes15, + (changes, diag2) => { + const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); + const node = getTokenAtPosition(diag2.file, diag2.start); + const fixAll = true; + if (node) + doChange12(changes, node, diag2.file, newLineCharacter, fixAll); + } + ) }); } }); @@ -146809,8 +148944,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return `${topLevelTypeOnly ? 1 : 0}|${moduleSpecifier}`; } } - function writeFixes(changeTracker) { - const quotePreference = getQuotePreference(sourceFile, preferences); + function writeFixes(changeTracker, oldFileQuotePreference) { + let quotePreference; + if (sourceFile.imports.length === 0 && oldFileQuotePreference !== void 0) { + quotePreference = oldFileQuotePreference; + } else { + quotePreference = getQuotePreference(sourceFile, preferences); + } for (const fix of addToNamespace) { addNamespaceQualifier(changeTracker, sourceFile, fix); } @@ -146998,11 +149138,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getNamespaceLikeImportText(declaration) { var _a, _b, _c; switch (declaration.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return (_a = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a.text; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return declaration.name.text; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); @@ -147034,11 +149174,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return best; function getAddToExistingImportFix({ declaration, importKind, symbol, targetFlags }) { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 270 /* ImportEqualsDeclaration */) { + if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 271 /* ImportEqualsDeclaration */) { return void 0; } - if (declaration.kind === 259 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 205 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; + if (declaration.kind === 260 /* VariableDeclaration */) { + return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 206 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; } const { importClause } = declaration; if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier)) { @@ -147061,7 +149201,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addAsTypeOnly === 2 /* Required */ && namedBindings)) { return void 0; } - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 273 /* NamespaceImport */) { + if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 274 /* NamespaceImport */) { return void 0; } return { @@ -147082,7 +149222,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); } - } else if (i.kind === 271 /* ImportDeclaration */ || i.kind === 270 /* ImportEqualsDeclaration */) { + } else if (i.kind === 272 /* ImportDeclaration */ || i.kind === 271 /* ImportEqualsDeclaration */) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); @@ -147113,6 +149253,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (compilerOptions.configFile) { return getEmitModuleKind(compilerOptions) < 5 /* ES2015 */; } + if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) + return true; + if (sourceFile.impliedNodeFormat === 99 /* ESNext */) + return false; for (const otherFile of program.getSourceFiles()) { if (otherFile === sourceFile || !isSourceFileJS(otherFile) || program.isSourceFileFromExternalLibrary(otherFile)) continue; @@ -147534,7 +149678,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile, preferences); - return promotedDeclaration.kind === 275 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; + return promotedDeclaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; } default: return Debug.assertNever(fix, `Unexpected fix kind ${fix.kind}`); @@ -147542,12 +149686,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getModuleSpecifierText(promotedDeclaration) { var _a, _b; - return promotedDeclaration.kind === 270 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; + return promotedDeclaration.kind === 271 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; } function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceFile, preferences) { const convertExistingToTypeOnly = importNameElisionDisabled(compilerOptions); switch (aliasDeclaration.kind) { - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences); if (aliasDeclaration.parent.elements.length > 1 && sortKind) { @@ -147571,13 +149715,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} promoteImportClause(aliasDeclaration.parent.parent); return aliasDeclaration.parent.parent; } - case 272 /* ImportClause */: + case 273 /* ImportClause */: promoteImportClause(aliasDeclaration); return aliasDeclaration; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: promoteImportClause(aliasDeclaration.parent); return aliasDeclaration.parent; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); return aliasDeclaration; default: @@ -147585,10 +149729,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function promoteImportClause(importClause) { changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile)); + if (!compilerOptions.allowImportingTsExtensions) { + const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent); + const resolvedModule = moduleSpecifier && getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier)); + if (resolvedModule == null ? void 0 : resolvedModule.resolvedUsingTsExtension) { + const changedExtension = changeAnyExtension(moduleSpecifier.text, getOutputExtension(moduleSpecifier.text, compilerOptions)); + changes.replaceNode(sourceFile, moduleSpecifier, factory.createStringLiteral(changedExtension)); + } + } if (convertExistingToTypeOnly) { const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { - if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 275 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { + if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 276 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { changes.delete(sourceFile, aliasDeclaration); changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); } @@ -147603,7 +149755,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, preferences) { var _a; - if (clause.kind === 205 /* ObjectBindingPattern */) { + if (clause.kind === 206 /* ObjectBindingPattern */) { if (defaultImport) { addElementToBindingPattern(clause, defaultImport.name, "default"); } @@ -148039,7 +150191,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const lastDecorator = findLast(modifiers, isDecorator); const modifierPos = abstractModifier ? abstractModifier.end : staticModifier ? staticModifier.end : accessibilityModifier ? accessibilityModifier.end : lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : classElement.getStart(sourceFile); const options = accessibilityModifier || staticModifier || abstractModifier ? { prefix: " " } : { suffix: " " }; - changeTracker.insertModifierAt(sourceFile, modifierPos, 163 /* OverrideKeyword */, options); + changeTracker.insertModifierAt(sourceFile, modifierPos, 164 /* OverrideKeyword */, options); } function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { const classElement = findContainerClassElementLike(sourceFile, pos); @@ -148053,13 +150205,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isClassElementLikeHasJSDoc(node) { switch (node.kind) { - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; - case 168 /* Parameter */: + case 169 /* Parameter */: return isParameterPropertyDeclaration(node, node.parent); default: return false; @@ -148465,7 +150617,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // src/services/codefixes/fixIncorrectNamedTupleSyntax.ts function getNamedTupleMember(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 201 /* NamedTupleMember */); + return findAncestor(token, (t) => t.kind === 202 /* NamedTupleMember */); } function doChange17(changes, sourceFile, namedTupleMember) { if (!namedTupleMember) { @@ -148474,10 +150626,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let unwrappedType = namedTupleMember.type; let sawOptional = false; let sawRest = false; - while (unwrappedType.kind === 189 /* OptionalType */ || unwrappedType.kind === 190 /* RestType */ || unwrappedType.kind === 195 /* ParenthesizedType */) { - if (unwrappedType.kind === 189 /* OptionalType */) { + while (unwrappedType.kind === 190 /* OptionalType */ || unwrappedType.kind === 191 /* RestType */ || unwrappedType.kind === 196 /* ParenthesizedType */) { + if (unwrappedType.kind === 190 /* OptionalType */) { sawOptional = true; - } else if (unwrappedType.kind === 190 /* RestType */) { + } else if (unwrappedType.kind === 191 /* RestType */) { sawRest = true; } unwrappedType = unwrappedType.type; @@ -148529,7 +150681,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isPropertyAccessExpression(parent2) && parent2.name === node) { Debug.assert(isMemberName(node), "Expected an identifier for spelling (property access)"); let containingType = checker.getTypeAtLocation(parent2.expression); - if (parent2.flags & 32 /* OptionalChain */) { + if (parent2.flags & 64 /* OptionalChain */) { containingType = checker.getNonNullableType(containingType); } suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); @@ -148762,6 +150914,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!declaration || !isCallExpression(declaration.parent) || !declaration.body) return void 0; const pos = declaration.parent.arguments.indexOf(declaration); + if (pos === -1) + return void 0; const type = checker.getContextualTypeForArgumentAtIndex(declaration.parent, pos); if (!type) return void 0; @@ -148790,19 +150944,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getVariableLikeInitializer(declaration) { switch (declaration.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: return declaration.initializer; - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 303 /* ShorthandPropertyAssignment */: - case 170 /* PropertySignature */: - case 305 /* EnumMember */: - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: + case 304 /* ShorthandPropertyAssignment */: + case 171 /* PropertySignature */: + case 306 /* EnumMember */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: return void 0; } } @@ -149030,7 +151184,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { const tokenName = token.text; if (makeStatic) { - if (classDeclaration.kind === 230 /* ClassExpression */) { + if (classDeclaration.kind === 231 /* ClassExpression */) { return; } const className = classDeclaration.name.getText(); @@ -149083,7 +151237,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getTypeNode2(checker, node, token) { let typeNode; - if (token.parent.parent.kind === 225 /* BinaryExpression */) { + if (token.parent.parent.kind === 226 /* BinaryExpression */) { const binaryExpression = token.parent.parent; const otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left; const widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression))); @@ -149161,9 +151315,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (call === void 0) { return void 0; } - if (isPrivateIdentifier(token)) { - return void 0; - } const methodName = token.text; const addMethodDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addMethodDeclaration(context, t, call, token, modifierFlags2, parentDeclaration, declSourceFile)); const actions2 = [createCodeFixAction(fixMissingMember, addMethodDeclarationChanges(modifierFlags & 32 /* Static */), [modifierFlags & 32 /* Static */ ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, methodName], fixMissingMember, Diagnostics.Add_all_missing_members)]; @@ -149174,7 +151325,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 173 /* MethodDeclaration */ : 172 /* MethodSignature */; + const kind = isClassLike(parentDeclaration) ? 174 /* MethodDeclaration */ : 173 /* MethodSignature */; const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); if (containingMethodDeclaration) { @@ -149203,8 +151354,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function addFunctionDeclaration(changes, context, info) { const quotePreference = getQuotePreference(context.sourceFile, context.preferences); const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(261 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( - 261 /* FunctionDeclaration */, + const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(262 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( + 262 /* FunctionDeclaration */, context, quotePreference, info.signature, @@ -149353,7 +151504,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (signature === void 0) return createUndefined(); const func = createSignatureDeclarationFromSignature( - 217 /* FunctionExpression */, + 218 /* FunctionExpression */, context, quotePreference, signature[0], @@ -149861,7 +152012,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } function getSuggestion(messageText) { - const [_, suggestion] = flattenDiagnosticMessageText(messageText, "\n", 0).match(/\'(.*)\'/) || []; + const [_, suggestion] = flattenDiagnosticMessageText(messageText, "\n", 0).match(/'(.*)'/) || []; return suggestion; } var fixId28, errorCodes34; @@ -149907,6 +152058,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} registerCodeFix({ errorCodes: [ Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, + Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code ], getCodeActions: function getCodeActionsToFixModuleAndTarget(context) { @@ -150230,18 +152382,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts function getImportDeclaration(sourceFile, program, start) { const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier); - if (!identifier || identifier.parent.kind !== 182 /* TypeReference */) + if (!identifier || identifier.parent.kind !== 183 /* TypeReference */) return; const checker = program.getTypeChecker(); const symbol = checker.getSymbolAtLocation(identifier); return find((symbol == null ? void 0 : symbol.declarations) || emptyArray, or(isImportClause, isImportSpecifier, isImportEqualsDeclaration)); } function doTypeOnlyImportChange(changes, sourceFile, importDeclaration, program) { - if (importDeclaration.kind === 270 /* ImportEqualsDeclaration */) { + if (importDeclaration.kind === 271 /* ImportEqualsDeclaration */) { changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, importDeclaration.name); return; } - const importClause = importDeclaration.kind === 272 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; + const importClause = importDeclaration.kind === 273 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; if (importClause.name && importClause.namedBindings) { return; } @@ -150272,14 +152424,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); if (!importDeclaration) return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 275 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); + const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 276 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); const typeOnlyChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => doTypeOnlyImportChange(t, context.sourceFile, importDeclaration, context.program)); let actions2; if (namespaceChanges.length) { actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, namespaceChanges, Diagnostics.Convert_named_imports_to_namespace_import)); } if (typeOnlyChanges.length) { - actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, typeOnlyChanges, Diagnostics.Convert_to_type_only_import)); + actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, typeOnlyChanges, Diagnostics.Use_import_type)); } return actions2; }, @@ -150299,7 +152451,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } function isImport(token) { - return token.kind === 102 /* ImportKeyword */ || token.kind === 80 /* Identifier */ && (token.parent.kind === 275 /* ImportSpecifier */ || token.parent.kind === 272 /* ImportClause */); + return token.kind === 102 /* ImportKeyword */ || token.kind === 80 /* Identifier */ && (token.parent.kind === 276 /* ImportSpecifier */ || token.parent.kind === 273 /* ImportClause */); } function tryGetFullImport(token) { return token.kind === 102 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; @@ -150308,7 +152460,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return isVariableDeclarationList(token.parent) && first(token.parent.getChildren(sourceFile)) === token; } function deleteEntireVariableStatement(changes, sourceFile, node) { - changes.delete(sourceFile, node.parent.kind === 242 /* VariableStatement */ ? node.parent : node); + changes.delete(sourceFile, node.parent.kind === 243 /* VariableStatement */ ? node.parent : node); } function deleteDestructuringElements(changes, sourceFile, node) { forEach(node.elements, (n) => changes.delete(sourceFile, n)); @@ -150350,14 +152502,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function canPrefix(token) { switch (token.parent.kind) { - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return true; - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { const varDecl = token.parent; switch (varDecl.parent.parent.kind) { - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: return true; } } @@ -150406,8 +152558,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { const { parent: parent2 } = parameter; switch (parent2.kind) { - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: const index = parent2.parameters.indexOf(parameter); const referent = isMethodDeclaration(parent2) ? parent2.name : parent2; const entries = ts_FindAllReferences_exports.Core.getReferencedSymbolsForNode(parent2.pos, referent, program, sourceFiles, cancellationToken); @@ -150425,18 +152577,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } return true; - case 261 /* FunctionDeclaration */: { + case 262 /* FunctionDeclaration */: { if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { return isLastParameter(parent2, parameter, isFixAll); } return true; } - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return isLastParameter(parent2, parameter, isFixAll); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return false; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return true; default: return Debug.failBadSyntaxKind(parent2); @@ -150649,7 +152801,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const container = (isBlock(statement.parent) ? statement.parent : statement).parent; if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { - case 244 /* IfStatement */: + case 245 /* IfStatement */: if (container.elseStatement) { if (isBlock(statement.parent)) { break; @@ -150658,8 +152810,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return; } - case 246 /* WhileStatement */: - case 247 /* ForStatement */: + case 247 /* WhileStatement */: + case 248 /* ForStatement */: changes.delete(sourceFile, container); return; } @@ -150755,22 +152907,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isTypeContainer(node) { switch (node.kind) { - case 233 /* AsExpression */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 261 /* FunctionDeclaration */: - case 176 /* GetAccessor */: - case 180 /* IndexSignature */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* SetAccessor */: - case 264 /* TypeAliasDeclaration */: - case 215 /* TypeAssertionExpression */: - case 259 /* VariableDeclaration */: + case 234 /* AsExpression */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 262 /* FunctionDeclaration */: + case 177 /* GetAccessor */: + case 181 /* IndexSignature */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 178 /* SetAccessor */: + case 265 /* TypeAliasDeclaration */: + case 216 /* TypeAssertionExpression */: + case 260 /* VariableDeclaration */: return true; default: return false; @@ -150812,7 +152964,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { typeNode, type } = info; const original = typeNode.getText(sourceFile); const actions2 = [fix(type, fixIdPlain, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)]; - if (typeNode.kind === 320 /* JSDocNullableType */) { + if (typeNode.kind === 321 /* JSDocNullableType */) { actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); } return actions2; @@ -150830,7 +152982,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!info) return; const { typeNode, type } = info; - const fixedType = typeNode.kind === 320 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; + const fixedType = typeNode.kind === 321 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; doChange28(changes, sourceFile, typeNode, fixedType, checker); }); } @@ -150903,14 +153055,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } let insertBefore; switch (containingFunction.kind) { - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: insertBefore = containingFunction.name; break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: insertBefore = findChildOfKind(containingFunction, 100 /* FunctionKeyword */, sourceFile); break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: const kind = containingFunction.typeParameters ? 30 /* LessThanToken */ : 21 /* OpenParenToken */; insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); break; @@ -150940,6 +153092,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} fixId36 = "fixAwaitInSyncFunction"; errorCodes46 = [ Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code ]; @@ -151217,7 +153370,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 170 /* PropertySignature */) { + if (isInJSFile(sourceFile) && declaration.kind !== 171 /* PropertySignature */) { const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; if (!parent2) { return; @@ -151328,17 +153481,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { let searchToken; switch (containingFunction.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: searchToken = findChildOfKind(containingFunction, 137 /* ConstructorKeyword */, sourceFile); break; - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: const parent2 = containingFunction.parent; searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; break; - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: searchToken = containingFunction.name; break; } @@ -151474,44 +153627,44 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} node = node.parent; } switch (node.parent.kind) { - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: inferTypeFromExpressionStatement(node, usage); break; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: usage.isNumber = true; break; - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: inferTypeFromPrefixUnaryExpression(node.parent, usage); break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: inferTypeFromBinaryExpression(node, node.parent, usage); break; - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: inferTypeFromSwitchStatementLabel(node.parent, usage); break; - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: if (node.parent.expression === node) { inferTypeFromCallExpression(node.parent, usage); } else { inferTypeFromContextualType(node, usage); } break; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: inferTypeFromPropertyAccessExpression(node.parent, usage); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: inferTypeFromPropertyElementExpression(node.parent, node, usage); break; - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: inferTypeFromPropertyAssignment(node.parent, usage); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: inferTypeFromPropertyDeclaration(node.parent, usage); break; - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { const { name, initializer } = node.parent; if (node === name) { if (initializer) { @@ -151611,7 +153764,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; case 57 /* BarBarToken */: case 61 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 259 /* VariableDeclaration */ || isAssignmentExpression( + if (node === parent2.left && (node.parent.parent.kind === 260 /* VariableDeclaration */ || isAssignmentExpression( node.parent.parent, /*excludeCompoundAssignment*/ true @@ -151639,7 +153792,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 212 /* CallExpression */) { + if (parent2.kind === 213 /* CallExpression */) { (usage.calls || (usage.calls = [])).push(call); } else { (usage.constructs || (usage.constructs = [])).push(call); @@ -152188,28 +154341,25 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, preserveOptional = 3 /* All */, isAmbient = false) { const declarations = symbol.getDeclarations(); - const declaration = declarations == null ? void 0 : declarations[0]; + const declaration = firstOrUndefined(declarations); const checker = context.program.getTypeChecker(); const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); - const kind = (declaration == null ? void 0 : declaration.kind) ?? 170 /* PropertySignature */; - const declarationName = getSynthesizedDeepClone( - getNameOfDeclaration(declaration), - /*includeTrivia*/ - false - ); + const kind = (declaration == null ? void 0 : declaration.kind) ?? 171 /* PropertySignature */; + const declarationName = createDeclarationName(symbol, declaration); const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */; - let modifierFlags = effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; + let modifierFlags = effectiveModifierFlags & 32 /* Static */; + modifierFlags |= effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; if (declaration && isAutoAccessorPropertyDeclaration(declaration)) { modifierFlags |= 128 /* Accessor */; } const modifiers = createModifiers(); const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); const optional = !!(symbol.flags & 16777216 /* Optional */); - const ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient; + const ambient = !!(enclosingDeclaration.flags & 33554432 /* Ambient */) || isAmbient; const quotePreference = getQuotePreference(sourceFile, preferences); switch (kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: const flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : void 0; let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { @@ -152228,8 +154378,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} void 0 )); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { Debug.assertIsDefined(declarations); let typeNode2 = checker.typeToTypeNode( type, @@ -152277,8 +154427,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } break; } - case 172 /* MethodSignature */: - case 173 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 174 /* MethodDeclaration */: Debug.assertIsDefined(declarations); const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); if (!some(signatures)) { @@ -152305,7 +154455,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; } function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(173 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); + const method = createSignatureDeclarationFromSignature(174 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); if (method) addClassElement(method); } @@ -152315,7 +154465,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} modifiers2 = combine(modifiers2, factory.createModifiersFromModifierFlags(modifierFlags)); } if (shouldAddOverrideKeyword()) { - modifiers2 = append(modifiers2, factory.createToken(163 /* OverrideKeyword */)); + modifiers2 = append(modifiers2, factory.createToken(164 /* OverrideKeyword */)); } return modifiers2 && factory.createNodeArray(modifiers2); } @@ -152346,6 +154496,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} false ); } + function createDeclarationName(symbol2, declaration2) { + if (getCheckFlags(symbol2) & 262144 /* Mapped */) { + const nameType = symbol2.links.nameType; + if (nameType && isTypeUsableAsPropertyName(nameType)) { + return factory.createIdentifier(unescapeLeadingUnderscores(getPropertyNameFromType(nameType))); + } + } + return getSynthesizedDeepClone( + getNameOfDeclaration(declaration2), + /*includeTrivia*/ + false + ); + } } function createSignatureDeclarationFromSignature(kind, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder) { const program = context.program; @@ -152453,8 +154616,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} instanceTypes, contextNode, scriptTarget, - /*flags*/ - void 0, + 1 /* NoTruncation */, tracker ); const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0; @@ -152476,7 +154638,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} tracker ); switch (kind) { - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return factory.createMethodDeclaration( modifiers, asteriskToken, @@ -152488,7 +154650,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} type, createStubbedMethodBody(quotePreference) ); - case 172 /* MethodSignature */: + case 173 /* MethodSignature */: return factory.createMethodSignature( modifiers, name, @@ -152498,7 +154660,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} parameters, type === void 0 ? factory.createKeywordTypeNode(159 /* UnknownKeyword */) : type ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: + Debug.assert(typeof name === "string" || isIdentifier(name), "Unexpected name"); return factory.createFunctionDeclaration( modifiers, asteriskToken, @@ -152903,7 +155066,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} isStatic: hasStaticModifier(declaration), isReadonly: hasEffectiveReadonlyModifier(declaration), type: getDeclarationType(declaration, program), - container: declaration.kind === 168 /* Parameter */ ? declaration.parent.parent : declaration.parent, + container: declaration.kind === 169 /* Parameter */ ? declaration.parent.parent : declaration.parent, originalName: declaration.name.text, declaration, fieldName, @@ -153075,7 +155238,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getActionsForUsageOfInvalidImport(context) { const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 212 /* CallExpression */ : 213 /* NewExpression */; + const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 213 /* CallExpression */ : 214 /* NewExpression */; const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); if (!node) { return []; @@ -153480,7 +155643,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getImportTypeNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); Debug.assert(token.kind === 102 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 204 /* ImportType */, "Token parent should be an ImportType"); + Debug.assert(token.parent.kind === 205 /* ImportType */, "Token parent should be an ImportType"); return token.parent; } function doChange36(changes, sourceFile, importType) { @@ -153787,8 +155950,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return [createCodeFixAction(fixId48, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId48, Diagnostics.Split_all_invalid_type_only_imports)]; } }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes60, (changes, error) => { - splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error), context); + getAllCodeActions: (context) => codeFixAll(context, errorCodes60, (changes, error2) => { + splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error2), context); }) }); } @@ -154001,7 +156164,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} getFixes: () => getFixes, getImportCompletionAction: () => getImportCompletionAction, getImportKind: () => getImportKind, - getJSDocTypedefNode: () => getJSDocTypedefNode, + getJSDocTypedefNodes: () => getJSDocTypedefNodes, getNoopSymbolTrackerWithResolver: () => getNoopSymbolTrackerWithResolver, getPromoteTypeOnlyCompletionAction: () => getPromoteTypeOnlyCompletionAction, getSupportedErrorCodes: () => getSupportedErrorCodes, @@ -154846,14 +157009,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function typeNodeToExpression(typeNode, languageVersion, quotePreference) { switch (typeNode.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: const typeName = typeNode.typeName; return entityNameToExpression(typeName, languageVersion, quotePreference); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: const objectExpression = typeNodeToExpression(typeNode.objectType, languageVersion, quotePreference); const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference); return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression); - case 200 /* LiteralType */: + case 201 /* LiteralType */: const literal = typeNode.literal; switch (literal.kind) { case 11 /* StringLiteral */: @@ -154862,12 +157025,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return factory.createNumericLiteral(literal.text, literal.numericLiteralFlags); } return void 0; - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference); return exp && (isIdentifier(exp) ? exp : factory.createParenthesizedExpression(exp)); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference); - case 204 /* ImportType */: + case 205 /* ImportType */: Debug.fail(`We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.`); } return void 0; @@ -154902,12 +157065,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getJsxClosingTagCompletion(location, sourceFile) { const jsxClosingElement = findAncestor(location, (node) => { switch (node.kind) { - case 286 /* JsxClosingElement */: + case 287 /* JsxClosingElement */: return true; case 44 /* SlashToken */: case 32 /* GreaterThanToken */: case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return false; default: return "quit"; @@ -154954,7 +157117,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; } function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol) { + var _a, _b; let insertText; + let filterText; let replacementSpan = getReplacementSpanForContextToken(replacementToken); let data; let isSnippet; @@ -155011,13 +157176,23 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if ((origin == null ? void 0 : origin.kind) === 64 /* TypeOnlyAlias */) { hasAction = true; } + if (completionKind === 0 /* ObjectPropertyDeclaration */ && contextToken && ((_a = findPrecedingToken(contextToken.pos, sourceFile, contextToken)) == null ? void 0 : _a.kind) !== 28 /* CommaToken */) { + if (isMethodDeclaration(contextToken.parent.parent) || isGetAccessorDeclaration(contextToken.parent.parent) || isSetAccessorDeclaration(contextToken.parent.parent) || isSpreadAssignment(contextToken.parent) || ((_b = findAncestor(contextToken.parent, isPropertyAssignment)) == null ? void 0 : _b.getLastToken(sourceFile)) === contextToken || isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) { + source = "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */; + hasAction = true; + } + } if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === 3 /* MemberLike */ && isClassLikeMemberCompletion(symbol, location, sourceFile)) { let importAdder; - ({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext)); - sortText = SortText.ClassMemberSnippets; - if (importAdder == null ? void 0 : importAdder.hasFixes()) { - hasAction = true; - source = "ClassMemberSnippet/" /* ClassMemberSnippet */; + const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext); + if (memberCompletionEntry) { + ({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry); + if (importAdder == null ? void 0 : importAdder.hasFixes()) { + hasAction = true; + source = "ClassMemberSnippet/" /* ClassMemberSnippet */; + } + } else { + return void 0; } } if (origin && originIsObjectLiteralMethod(origin)) { @@ -155052,6 +157227,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} data = originToCompletionEntryData(origin); hasAction = !importStatementCompletion; } + const parentNamedImportOrExport = findAncestor(location, isNamedImportsOrExports); + if ((parentNamedImportOrExport == null ? void 0 : parentNamedImportOrExport.kind) === 275 /* NamedImports */) { + const possibleToken = stringToToken(name); + if (parentNamedImportOrExport && possibleToken && (possibleToken === 135 /* AwaitKeyword */ || isNonContextualKeyword(possibleToken))) { + insertText = `${name} as ${name}_`; + } + } return { name, kind: ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, location), @@ -155061,6 +157243,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} hasAction: hasAction ? true : void 0, isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || void 0, insertText, + filterText, replacementSpan, sourceDisplay, labelDetails, @@ -155081,11 +157264,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) { const classLikeDeclaration = findAncestor(location, isClassLike); if (!classLikeDeclaration) { - return { insertText: name }; + return void 0; } let isSnippet; - let replacementSpan; let insertText = name; + const filterText = name; const checker = program.getTypeChecker(); const sourceFile = location.getSourceFile(); const printer = createSnippetPrinter({ @@ -155114,9 +157297,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } let modifiers = 0 /* None */; - const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position); - const isAbstract = !!(presentModifiers & 256 /* Abstract */); - const completionNodes = []; + const { modifiers: presentModifiers, range: eraseRange, decorators: presentDecorators } = getPresentModifiers(contextToken, sourceFile, position); + const isAbstract = presentModifiers & 256 /* Abstract */ && classLikeDeclaration.modifierFlagsCache & 256 /* Abstract */; + let completionNodes = []; ts_codefix_exports.addNewNodeForMemberSymbol( symbol, classLikeDeclaration, @@ -155140,18 +157323,42 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} requiredModifiers |= 16384 /* Override */; } if (!completionNodes.length) { - modifiers = node.modifierFlagsCache | requiredModifiers | presentModifiers; + modifiers = node.modifierFlagsCache | requiredModifiers; } node = factory.updateModifiers(node, modifiers); completionNodes.push(node); }, body, ts_codefix_exports.PreserveOptionalFlags.Property, - isAbstract + !!isAbstract ); if (completionNodes.length) { + const isMethod = symbol.flags & 8192 /* Method */; + let allowedModifiers = modifiers | 16384 /* Override */ | 4 /* Public */; + if (!isMethod) { + allowedModifiers |= 2 /* Ambient */ | 64 /* Readonly */; + } else { + allowedModifiers |= 512 /* Async */; + } + const allowedAndPresent = presentModifiers & allowedModifiers; + if (presentModifiers & ~allowedModifiers) { + return void 0; + } + if (modifiers & 16 /* Protected */ && allowedAndPresent & 4 /* Public */) { + modifiers &= ~16 /* Protected */; + } + if (allowedAndPresent !== 0 /* None */ && !(allowedAndPresent & 4 /* Public */)) { + modifiers &= ~4 /* Public */; + } + modifiers |= allowedAndPresent; + completionNodes = completionNodes.map((node) => factory.updateModifiers(node, modifiers)); + if (presentDecorators == null ? void 0 : presentDecorators.length) { + const lastNode = completionNodes[completionNodes.length - 1]; + if (canHaveDecorators(lastNode)) { + completionNodes[completionNodes.length - 1] = factory.updateModifierLike(lastNode, presentDecorators.concat(getModifiers(lastNode) || [])); + } + } const format = 1 /* MultiLine */ | 131072 /* NoTrailingNewLine */; - replacementSpan = modifiersSpan; if (formatContext) { insertText = printer.printAndFormatSnippetList( format, @@ -155167,24 +157374,29 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } } - return { insertText, isSnippet, importAdder, replacementSpan }; + return { insertText, filterText, isSnippet, importAdder, eraseRange }; } function getPresentModifiers(contextToken, sourceFile, position) { if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) { return { modifiers: 0 /* None */ }; } let modifiers = 0 /* None */; - let span; + let decorators; let contextMod; - if (contextMod = isModifierLike2(contextToken)) { - modifiers |= modifierToFlag(contextMod); - span = createTextSpanFromNode(contextToken); - } - if (isPropertyDeclaration(contextToken.parent)) { + const range = { pos: position, end: position }; + if (isPropertyDeclaration(contextToken.parent) && contextToken.parent.modifiers) { modifiers |= modifiersToFlags(contextToken.parent.modifiers) & 126975 /* Modifier */; - span = createTextSpanFromNode(contextToken.parent); + decorators = contextToken.parent.modifiers.filter(isDecorator) || []; + range.pos = Math.min(range.pos, contextToken.parent.modifiers.pos); + } + if (contextMod = isModifierLike2(contextToken)) { + const contextModifierFlag = modifierToFlag(contextMod); + if (!(modifiers & contextModifierFlag)) { + modifiers |= contextModifierFlag; + range.pos = Math.min(range.pos, contextToken.pos); + } } - return { modifiers, span }; + return { modifiers, decorators, range: range.pos !== position ? range : void 0 }; } function isModifierLike2(node) { if (isModifier(node)) { @@ -155261,10 +157473,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const quotePreference = getQuotePreference(sourceFile, preferences); const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (declaration.kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: - case 172 /* MethodSignature */: - case 173 /* MethodDeclaration */: { + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 173 /* MethodSignature */: + case 174 /* MethodDeclaration */: { let effectiveType = type.flags & 1048576 /* Union */ && type.types.length < 10 ? checker.getUnionType(type.types, 2 /* Subtype */) : type; if (effectiveType.flags & 1048576 /* Union */) { const functionTypes = filter(effectiveType.types, (type2) => checker.getSignaturesOfType(type2, 0 /* Call */).length > 0); @@ -155707,7 +157919,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return firstDefined(symbols, (symbol, index) => { const origin = symbolToOriginInfoMap[index]; const info = getCompletionEntryDisplayNameForSymbol(symbol, getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected); - return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0; + return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source || entryId.source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0; }) || { type: "none" }; } function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) { @@ -155802,12 +158014,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken, origin, symbol, program, host, compilerOptions, sourceFile, position, previousToken, formatContext, preferences, data, source, cancellationToken) { if (data == null ? void 0 : data.moduleSpecifier) { - if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken).replacementSpan) { + if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken, sourceFile).replacementSpan) { return { codeActions: void 0, sourceDisplay: [textPart(data.moduleSpecifier)] }; } } if (source === "ClassMemberSnippet/" /* ClassMemberSnippet */) { - const { importAdder } = getEntryForMemberCompletion( + const { importAdder, eraseRange } = getEntryForMemberCompletion( host, program, compilerOptions, @@ -155819,10 +158031,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} contextToken, formatContext ); - if (importAdder) { + if (importAdder || eraseRange) { const changes = ts_textChanges_exports.ChangeTracker.with( { host, formatContext, preferences }, - importAdder.writeFixes + (tracker) => { + if (importAdder) { + importAdder.writeFixes(tracker); + } + if (eraseRange) { + tracker.deleteRange(sourceFile, eraseRange); + } + } ); return { sourceDisplay: void 0, @@ -155845,6 +158064,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} Debug.assertIsDefined(codeAction2, "Expected to have a code action for promoting type-only alias"); return { codeActions: [codeAction2], sourceDisplay: void 0 }; } + if (source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */ && contextToken) { + const changes = ts_textChanges_exports.ChangeTracker.with( + { host, formatContext, preferences }, + (tracker) => tracker.insertText(sourceFile, contextToken.end, ",") + ); + if (changes) { + return { + sourceDisplay: void 0, + codeActions: [{ + changes, + description: diagnosticToString([Diagnostics.Add_missing_comma_for_object_member_completion_0, name]) + }] + }; + } + } if (!origin || !(originIsExport(origin) || originIsResolvedExport(origin))) { return { codeActions: void 0, sourceDisplay: void 0 }; } @@ -155886,11 +158120,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return getContextualTypeFromParent(previousToken, checker); case 64 /* EqualsToken */: switch (parent2.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return checker.getContextualType(parent2.initializer); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return checker.getTypeAtLocation(parent2.left); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return checker.getContextualTypeForJsxAttribute(parent2); default: return void 0; @@ -155928,7 +158162,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isModuleSymbol(symbol) { var _a; - return !!((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d.kind === 311 /* SourceFile */)); + return !!((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d.kind === 312 /* SourceFile */)); } function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { const typeChecker = program.getTypeChecker(); @@ -155947,7 +158181,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { kind: 1 /* JsDocTagName */ }; } else { const lineStart = getLineStartPositionForPosition(position, sourceFile); - if (!/[^\*|\s(/)]/.test(sourceFile.text.substring(lineStart, position))) { + if (!/[^*|\s(/)]/.test(sourceFile.text.substring(lineStart, position))) { return { kind: 2 /* JsDocTag */ }; } } @@ -155960,7 +158194,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const typeExpression = tryGetTypeExpressionFromTag(tag); if (typeExpression) { currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 354 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { + if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 355 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); } } @@ -155993,7 +158227,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let isNewIdentifierLocation = false; let flags = 0 /* None */; if (contextToken) { - const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken); + const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken, sourceFile); if (importStatementCompletionInfo.keywordCompletion) { if (importStatementCompletionInfo.isKeywordOnlyCompletion) { return { @@ -156018,7 +158252,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} isRightOfDot = contextToken.kind === 25 /* DotToken */; isRightOfQuestionDot = contextToken.kind === 29 /* QuestionDotToken */; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); @@ -156026,16 +158260,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } break; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: node = parent2.left; break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: node = parent2.name; break; - case 204 /* ImportType */: + case 205 /* ImportType */: node = parent2; break; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: node = parent2.getFirstToken(sourceFile); Debug.assert(node.kind === 102 /* ImportKeyword */ || node.kind === 105 /* NewKeyword */); break; @@ -156043,51 +158277,51 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 210 /* PropertyAccessExpression */) { + if (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { contextToken = parent2; parent2 = parent2.parent; } if (currentToken.parent === location) { switch (currentToken.kind) { case 32 /* GreaterThanToken */: - if (currentToken.parent.kind === 283 /* JsxElement */ || currentToken.parent.kind === 285 /* JsxOpeningElement */) { + if (currentToken.parent.kind === 284 /* JsxElement */ || currentToken.parent.kind === 286 /* JsxOpeningElement */) { location = currentToken; } break; case 44 /* SlashToken */: - if (currentToken.parent.kind === 284 /* JsxSelfClosingElement */) { + if (currentToken.parent.kind === 285 /* JsxSelfClosingElement */) { location = currentToken; } break; } } switch (parent2.kind) { - case 286 /* JsxClosingElement */: + case 287 /* JsxClosingElement */: if (contextToken.kind === 44 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (!binaryExpressionMayBeOpenTag(parent2)) { break; } - case 284 /* JsxSelfClosingElement */: - case 283 /* JsxElement */: - case 285 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: + case 284 /* JsxElement */: + case 286 /* JsxOpeningElement */: isJsxIdentifierExpected = true; if (contextToken.kind === 30 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } break; - case 293 /* JsxExpression */: - case 292 /* JsxSpreadAttribute */: - if (previousToken.kind === 20 /* CloseBraceToken */ || previousToken.kind === 80 /* Identifier */ && previousToken.parent.kind === 290 /* JsxAttribute */) { + case 294 /* JsxExpression */: + case 293 /* JsxSpreadAttribute */: + if (previousToken.kind === 20 /* CloseBraceToken */ || previousToken.kind === 80 /* Identifier */ && previousToken.parent.kind === 291 /* JsxAttribute */) { isJsxIdentifierExpected = true; } break; - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: if (parent2.initializer === previousToken && previousToken.end < position) { isJsxIdentifierExpected = true; break; @@ -156175,15 +158409,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: - case 348 /* JSDocReturnTag */: - case 350 /* JSDocTypeTag */: - case 352 /* JSDocTypedefTag */: - case 355 /* JSDocThrowsTag */: - case 356 /* JSDocSatisfiesTag */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 349 /* JSDocReturnTag */: + case 351 /* JSDocTypeTag */: + case 353 /* JSDocTypedefTag */: + case 356 /* JSDocThrowsTag */: + case 357 /* JSDocSatisfiesTag */: return true; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return !!tag.constraint; default: return false; @@ -156192,7 +158426,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function tryGetTypeExpressionFromTag(tag) { if (isTagWithTypeExpression(tag)) { const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 315 /* JSDocTypeExpression */ ? typeExpression : void 0; + return typeExpression && typeExpression.kind === 316 /* JSDocTypeExpression */ ? typeExpression : void 0; } if (isJSDocAugmentsTag(tag) || isJSDocImplementsTag(tag)) { return tag.class; @@ -156228,7 +158462,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} symbols.push(exportedSymbol); } } - if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 311 /* SourceFile */ && d.kind !== 266 /* ModuleDeclaration */ && d.kind !== 265 /* EnumDeclaration */)) { + if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 312 /* SourceFile */ && d.kind !== 267 /* ModuleDeclaration */ && d.kind !== 266 /* EnumDeclaration */)) { let type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); let insertQuestionDot = false; if (type.isNullableType()) { @@ -156240,30 +158474,40 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } } - addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); + addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot); } return; } } } - if (!isTypeLocation) { + if (!isTypeLocation || isInTypeQuery(node)) { typeChecker.tryGetThisTypeAt( node, /*includeGlobalThis*/ false ); let type = typeChecker.getTypeAtLocation(node).getNonOptionalType(); - let insertQuestionDot = false; - if (type.isNullableType()) { - const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false; - if (canCorrectToQuestionDot || isRightOfQuestionDot) { - type = type.getNonNullableType(); - if (canCorrectToQuestionDot) { - insertQuestionDot = true; + if (!isTypeLocation) { + let insertQuestionDot = false; + if (type.isNullableType()) { + const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } } } + addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot); + } else { + addTypeProperties( + type.getNonNullableType(), + /*insertAwait*/ + false, + /*insertQuestionDot*/ + false + ); } - addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } } function addTypeProperties(type, insertAwait, insertQuestionDot) { @@ -156271,7 +158515,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isRightOfQuestionDot && some(type.getCallSignatures())) { isNewIdentifierLocation = true; } - const propertyAccess = node.kind === 204 /* ImportType */ ? node : node.parent; + const propertyAccess = node.kind === 205 /* ImportType */ ? node : node.parent; if (inCheckedFile) { for (const symbol of type.getApparentProperties()) { if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) { @@ -156309,7 +158553,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const leftMostName = getLeftMostName(computedPropertyName.expression); const nameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName); const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker); - if (firstAccessibleSymbol && addToSeen(seenPropertySymbols, getSymbolId(firstAccessibleSymbol))) { + const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol); + if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) { const index = symbols.length; symbols.push(firstAccessibleSymbol); const moduleSymbol = firstAccessibleSymbol.parent; @@ -156339,6 +158584,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } } else if (preferences.includeCompletionsWithInsertText) { + if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) { + return; + } addSymbolOriginInfo(symbol); addSymbolSortInfo(symbol); symbols.push(symbol); @@ -156427,7 +158675,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 311 /* SourceFile */) { + if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 312 /* SourceFile */) { const thisType = typeChecker.tryGetThisTypeAt( scopeNode, /*includeGlobalThis*/ @@ -156462,10 +158710,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isSnippetScope(scopeNode) { switch (scopeNode.kind) { - case 311 /* SourceFile */: - case 227 /* TemplateExpression */: - case 293 /* JsxExpression */: - case 240 /* Block */: + case 312 /* SourceFile */: + case 228 /* TemplateExpression */: + case 294 /* JsxExpression */: + case 241 /* Block */: return true; default: return isStatement(scopeNode); @@ -156475,24 +158723,24 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 185 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 181 /* TypePredicate */); + return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */); } function isContextTokenTypeLocation(contextToken2) { if (contextToken2) { const parentKind = contextToken2.parent.kind; switch (contextToken2.kind) { case 59 /* ColonToken */: - return parentKind === 171 /* PropertyDeclaration */ || parentKind === 170 /* PropertySignature */ || parentKind === 168 /* Parameter */ || parentKind === 259 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); + return parentKind === 172 /* PropertyDeclaration */ || parentKind === 171 /* PropertySignature */ || parentKind === 169 /* Parameter */ || parentKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); case 64 /* EqualsToken */: - return parentKind === 264 /* TypeAliasDeclaration */; + return parentKind === 265 /* TypeAliasDeclaration */; case 130 /* AsKeyword */: - return parentKind === 233 /* AsExpression */; + return parentKind === 234 /* AsExpression */; case 30 /* LessThanToken */: - return parentKind === 182 /* TypeReference */ || parentKind === 215 /* TypeAssertionExpression */; + return parentKind === 183 /* TypeReference */ || parentKind === 216 /* TypeAssertionExpression */; case 96 /* ExtendsKeyword */: - return parentKind === 167 /* TypeParameter */; + return parentKind === 168 /* TypeParameter */; case 152 /* SatisfiesKeyword */: - return parentKind === 237 /* SatisfiesExpression */; + return parentKind === 238 /* SatisfiesExpression */; } } return false; @@ -156670,14 +158918,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return true; } if (contextToken2.kind === 32 /* GreaterThanToken */ && contextToken2.parent) { - if (location === contextToken2.parent && (location.kind === 285 /* JsxOpeningElement */ || location.kind === 284 /* JsxSelfClosingElement */)) { + if (location === contextToken2.parent && (location.kind === 286 /* JsxOpeningElement */ || location.kind === 285 /* JsxSelfClosingElement */)) { return false; } - if (contextToken2.parent.kind === 285 /* JsxOpeningElement */) { - return location.parent.kind !== 285 /* JsxOpeningElement */; + if (contextToken2.parent.kind === 286 /* JsxOpeningElement */) { + return location.parent.kind !== 286 /* JsxOpeningElement */; } - if (contextToken2.parent.kind === 286 /* JsxClosingElement */ || contextToken2.parent.kind === 284 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 283 /* JsxElement */; + if (contextToken2.parent.kind === 287 /* JsxClosingElement */ || contextToken2.parent.kind === 285 /* JsxSelfClosingElement */) { + return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 284 /* JsxElement */; } } return false; @@ -156688,29 +158936,29 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const tokenKind = keywordForNode(contextToken); switch (tokenKind) { case 28 /* CommaToken */: - return containingNodeKind === 212 /* CallExpression */ || containingNodeKind === 175 /* Constructor */ || containingNodeKind === 213 /* NewExpression */ || containingNodeKind === 208 /* ArrayLiteralExpression */ || containingNodeKind === 225 /* BinaryExpression */ || containingNodeKind === 183 /* FunctionType */ || containingNodeKind === 209 /* ObjectLiteralExpression */; + return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 226 /* BinaryExpression */ || containingNodeKind === 184 /* FunctionType */ || containingNodeKind === 210 /* ObjectLiteralExpression */; case 21 /* OpenParenToken */: - return containingNodeKind === 212 /* CallExpression */ || containingNodeKind === 175 /* Constructor */ || containingNodeKind === 213 /* NewExpression */ || containingNodeKind === 216 /* ParenthesizedExpression */ || containingNodeKind === 195 /* ParenthesizedType */; + return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 217 /* ParenthesizedExpression */ || containingNodeKind === 196 /* ParenthesizedType */; case 23 /* OpenBracketToken */: - return containingNodeKind === 208 /* ArrayLiteralExpression */ || containingNodeKind === 180 /* IndexSignature */ || containingNodeKind === 166 /* ComputedPropertyName */; + return containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 181 /* IndexSignature */ || containingNodeKind === 167 /* ComputedPropertyName */; case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: case 102 /* ImportKeyword */: return true; case 25 /* DotToken */: - return containingNodeKind === 266 /* ModuleDeclaration */; + return containingNodeKind === 267 /* ModuleDeclaration */; case 19 /* OpenBraceToken */: - return containingNodeKind === 262 /* ClassDeclaration */ || containingNodeKind === 209 /* ObjectLiteralExpression */; + return containingNodeKind === 263 /* ClassDeclaration */ || containingNodeKind === 210 /* ObjectLiteralExpression */; case 64 /* EqualsToken */: - return containingNodeKind === 259 /* VariableDeclaration */ || containingNodeKind === 225 /* BinaryExpression */; + return containingNodeKind === 260 /* VariableDeclaration */ || containingNodeKind === 226 /* BinaryExpression */; case 16 /* TemplateHead */: - return containingNodeKind === 227 /* TemplateExpression */; + return containingNodeKind === 228 /* TemplateExpression */; case 17 /* TemplateMiddle */: - return containingNodeKind === 238 /* TemplateSpan */; + return containingNodeKind === 239 /* TemplateSpan */; case 134 /* AsyncKeyword */: - return containingNodeKind === 173 /* MethodDeclaration */ || containingNodeKind === 303 /* ShorthandPropertyAssignment */; + return containingNodeKind === 174 /* MethodDeclaration */ || containingNodeKind === 304 /* ShorthandPropertyAssignment */; case 42 /* AsteriskToken */: - return containingNodeKind === 173 /* MethodDeclaration */; + return containingNodeKind === 174 /* MethodDeclaration */; } if (isClassMemberCompletionKeyword(tokenKind)) { return true; @@ -156742,16 +158990,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function tryGetObjectLikeCompletionSymbols() { const symbolsStartIndex = symbols.length; - const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken); + const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile); if (!objectLikeContainer) return 0 /* Continue */; completionKind = 0 /* ObjectPropertyDeclaration */; let typeMembers; let existingMembers; - if (objectLikeContainer.kind === 209 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */) { const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker); if (instantiatedType === void 0) { - if (objectLikeContainer.flags & 33554432 /* InWithStatement */) { + if (objectLikeContainer.flags & 67108864 /* InWithStatement */) { return 2 /* Fail */; } isNonContextualObjectLiteral = true; @@ -156770,16 +159018,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } } else { - Debug.assert(objectLikeContainer.kind === 205 /* ObjectBindingPattern */); + Debug.assert(objectLikeContainer.kind === 206 /* ObjectBindingPattern */); isNewIdentifierLocation = false; const rootDeclaration = getRootDeclaration(objectLikeContainer.parent); if (!isVariableLike(rootDeclaration)) return Debug.fail("Root declaration is not variable-like."); - let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 249 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 168 /* Parameter */) { + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 250 /* ForOfStatement */; + if (!canGetType && rootDeclaration.kind === 169 /* Parameter */) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 173 /* MethodDeclaration */ || rootDeclaration.parent.kind === 177 /* SetAccessor */) { + } else if (rootDeclaration.parent.kind === 174 /* MethodDeclaration */ || rootDeclaration.parent.kind === 178 /* SetAccessor */) { canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -156805,7 +159053,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); symbols = concatenate(symbols, filteredMembers); setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 209 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { + if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { transformObjectLiteralMembersSortText(symbolsStartIndex); collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); } @@ -156821,10 +159069,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!isTypeKeywordTokenOrIdentifier(contextToken)) { keywordFilters = 8 /* TypeKeyword */; } - const { moduleSpecifier } = namedImportsOrExports.kind === 274 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 275 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; if (!moduleSpecifier) { isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 274 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; + return namedImportsOrExports.kind === 275 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; } const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); if (!moduleSpecifierSymbol) { @@ -156949,11 +159197,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 31 /* LessThanSlashToken */: case 44 /* SlashToken */: case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: - case 291 /* JsxAttributes */: - case 290 /* JsxAttribute */: - case 292 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 284 /* JsxSelfClosingElement */ || parent2.kind === 285 /* JsxOpeningElement */)) { + case 211 /* PropertyAccessExpression */: + case 292 /* JsxAttributes */: + case 291 /* JsxAttribute */: + case 293 /* JsxSpreadAttribute */: + if (parent2 && (parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 286 /* JsxOpeningElement */)) { if (contextToken2.kind === 32 /* GreaterThanToken */) { const precedingToken = findPrecedingToken( contextToken2.pos, @@ -156965,20 +159213,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; } return parent2; - } else if (parent2.kind === 290 /* JsxAttribute */) { + } else if (parent2.kind === 291 /* JsxAttribute */) { return parent2.parent.parent; } break; case 11 /* StringLiteral */: - if (parent2 && (parent2.kind === 290 /* JsxAttribute */ || parent2.kind === 292 /* JsxSpreadAttribute */)) { + if (parent2 && (parent2.kind === 291 /* JsxAttribute */ || parent2.kind === 293 /* JsxSpreadAttribute */)) { return parent2.parent.parent; } break; case 20 /* CloseBraceToken */: - if (parent2 && parent2.kind === 293 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 290 /* JsxAttribute */) { + if (parent2 && parent2.kind === 294 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 291 /* JsxAttribute */) { return parent2.parent.parent.parent; } - if (parent2 && parent2.kind === 292 /* JsxSpreadAttribute */) { + if (parent2 && parent2.kind === 293 /* JsxSpreadAttribute */) { return parent2.parent.parent; } break; @@ -156991,44 +159239,44 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const containingNodeKind = parent2.kind; switch (contextToken2.kind) { case 28 /* CommaToken */: - return containingNodeKind === 259 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 242 /* VariableStatement */ || containingNodeKind === 265 /* EnumDeclaration */ || // enum a { foo, | - isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 263 /* InterfaceDeclaration */ || // interface A= contextToken2.pos; case 25 /* DotToken */: - return containingNodeKind === 206 /* ArrayBindingPattern */; + return containingNodeKind === 207 /* ArrayBindingPattern */; case 59 /* ColonToken */: - return containingNodeKind === 207 /* BindingElement */; + return containingNodeKind === 208 /* BindingElement */; case 23 /* OpenBracketToken */: - return containingNodeKind === 206 /* ArrayBindingPattern */; + return containingNodeKind === 207 /* ArrayBindingPattern */; case 21 /* OpenParenToken */: - return containingNodeKind === 298 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); + return containingNodeKind === 299 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); case 19 /* OpenBraceToken */: - return containingNodeKind === 265 /* EnumDeclaration */; + return containingNodeKind === 266 /* EnumDeclaration */; case 30 /* LessThanToken */: - return containingNodeKind === 262 /* ClassDeclaration */ || // class A< | - containingNodeKind === 230 /* ClassExpression */ || // var C = class D< | - containingNodeKind === 263 /* InterfaceDeclaration */ || // interface A< | - containingNodeKind === 264 /* TypeAliasDeclaration */ || // type List< | + return containingNodeKind === 263 /* ClassDeclaration */ || // class A< | + containingNodeKind === 231 /* ClassExpression */ || // var C = class D< | + containingNodeKind === 264 /* InterfaceDeclaration */ || // interface A< | + containingNodeKind === 265 /* TypeAliasDeclaration */ || // type List< | isFunctionLikeKind(containingNodeKind); case 126 /* StaticKeyword */: - return containingNodeKind === 171 /* PropertyDeclaration */ && !isClassLike(parent2.parent); + return containingNodeKind === 172 /* PropertyDeclaration */ && !isClassLike(parent2.parent); case 26 /* DotDotDotToken */: - return containingNodeKind === 168 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 206 /* ArrayBindingPattern */; + return containingNodeKind === 169 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 207 /* ArrayBindingPattern */; case 125 /* PublicKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: - return containingNodeKind === 168 /* Parameter */ && !isConstructorDeclaration(parent2.parent); + return containingNodeKind === 169 /* Parameter */ && !isConstructorDeclaration(parent2.parent); case 130 /* AsKeyword */: - return containingNodeKind === 275 /* ImportSpecifier */ || containingNodeKind === 280 /* ExportSpecifier */ || containingNodeKind === 273 /* NamespaceImport */; + return containingNodeKind === 276 /* ImportSpecifier */ || containingNodeKind === 281 /* ExportSpecifier */ || containingNodeKind === 274 /* NamespaceImport */; case 139 /* GetKeyword */: case 153 /* SetKeyword */: return !isFromObjectTypeDeclaration(contextToken2); case 80 /* Identifier */: - if (containingNodeKind === 275 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { + if (containingNodeKind === 276 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { return false; } break; @@ -157043,7 +159291,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 140 /* InferKeyword */: return true; case 156 /* TypeKeyword */: - return containingNodeKind !== 275 /* ImportSpecifier */; + return containingNodeKind !== 276 /* ImportSpecifier */; case 42 /* AsteriskToken */: return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); } @@ -157077,7 +159325,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { return false; } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 171 /* PropertyDeclaration */); + const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 172 /* PropertyDeclaration */); if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { return false; @@ -157091,7 +159339,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return contextToken2.kind !== 64 /* EqualsToken */ && (contextToken2.kind === 27 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); } function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 175 /* Constructor */; + return isFunctionLikeKind(kind) && kind !== 176 /* Constructor */; } function isDotOfNumericLiteral(contextToken2) { if (contextToken2.kind === 9 /* NumericLiteral */) { @@ -157101,7 +159349,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return false; } function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 260 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); + return node2.parent.kind === 261 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); } function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (existingMembers.length === 0) { @@ -157110,7 +159358,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set(); const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 302 /* PropertyAssignment */ && m.kind !== 303 /* ShorthandPropertyAssignment */ && m.kind !== 207 /* BindingElement */ && m.kind !== 173 /* MethodDeclaration */ && m.kind !== 176 /* GetAccessor */ && m.kind !== 177 /* SetAccessor */ && m.kind !== 304 /* SpreadAssignment */) { + if (m.kind !== 303 /* PropertyAssignment */ && m.kind !== 304 /* ShorthandPropertyAssignment */ && m.kind !== 208 /* BindingElement */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */ && m.kind !== 305 /* SpreadAssignment */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -157188,7 +159436,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 171 /* PropertyDeclaration */ && m.kind !== 173 /* MethodDeclaration */ && m.kind !== 176 /* GetAccessor */ && m.kind !== 177 /* SetAccessor */) { + if (m.kind !== 172 /* PropertyDeclaration */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -157214,7 +159462,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isCurrentlyEditingNode(attr)) { continue; } - if (attr.kind === 290 /* JsxAttribute */) { + if (attr.kind === 291 /* JsxAttribute */) { seenNames.add(getEscapedTextOfJsxAttributeName(attr.name)); } else if (isJsxSpreadAttribute(attr)) { setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); @@ -157228,7 +159476,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return node2.getStart(sourceFile) <= position && position <= node2.getEnd(); } } - function tryGetObjectLikeCompletionContainer(contextToken) { + function tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile) { + var _a; if (contextToken) { const { parent: parent2 } = contextToken; switch (contextToken.kind) { @@ -157243,7 +159492,29 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 134 /* AsyncKeyword */: return tryCast(parent2.parent, isObjectLiteralExpression); case 80 /* Identifier */: - return contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent) ? contextToken.parent.parent : void 0; + if (contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent)) { + return contextToken.parent.parent; + } else { + if (isObjectLiteralExpression(contextToken.parent.parent) && (isSpreadAssignment(contextToken.parent) || isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line)) { + return contextToken.parent.parent; + } + const ancestorNode2 = findAncestor(parent2, isPropertyAssignment); + if ((ancestorNode2 == null ? void 0 : ancestorNode2.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression(ancestorNode2.parent)) { + return ancestorNode2.parent; + } + } + break; + default: + if (((_a = parent2.parent) == null ? void 0 : _a.parent) && (isMethodDeclaration(parent2.parent) || isGetAccessorDeclaration(parent2.parent) || isSetAccessorDeclaration(parent2.parent)) && isObjectLiteralExpression(parent2.parent.parent)) { + return parent2.parent.parent; + } + if (isSpreadAssignment(parent2) && isObjectLiteralExpression(parent2.parent)) { + return parent2.parent; + } + const ancestorNode = findAncestor(parent2, isPropertyAssignment); + if (contextToken.kind !== 59 /* ColonToken */ && (ancestorNode == null ? void 0 : ancestorNode.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression(ancestorNode.parent)) { + return ancestorNode.parent; + } } } return void 0; @@ -157338,11 +159609,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} switch (kind) { case 128 /* AbstractKeyword */: case 133 /* AnyKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 138 /* DeclareKeyword */: case 94 /* EnumKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: case 119 /* ImplementsKeyword */: case 140 /* InferKeyword */: case 120 /* InterfaceKeyword */: @@ -157353,7 +159624,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 146 /* NeverKeyword */: case 150 /* NumberKeyword */: case 151 /* ObjectKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: case 125 /* PublicKeyword */: @@ -157380,7 +159651,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 153 /* SetKeyword */: case 134 /* AsyncKeyword */: case 138 /* DeclareKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return true; default: return isClassMemberModifier(kind); @@ -157437,7 +159708,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { switch (location.kind) { - case 357 /* SyntaxList */: + case 358 /* SyntaxList */: return tryCast(location.parent, isObjectTypeDeclaration); case 1 /* EndOfFileToken */: const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration); @@ -157445,6 +159716,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return cls; } break; + case 81 /* PrivateIdentifier */: + if (tryCast(location.parent, isPropertyDeclaration)) { + return findAncestor(location, isClassLike); + } + break; case 80 /* Identifier */: { const originalKeywordKind = identifierToKeywordKind(location); if (originalKeywordKind) { @@ -157496,7 +159772,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 27 /* SemicolonToken */: case 28 /* CommaToken */: case 80 /* Identifier */: - if (parent2.kind === 170 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 171 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { return parent2.parent; } break; @@ -157513,11 +159789,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!t) return void 0; switch (node.kind) { - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 192 /* IntersectionType */: - case 186 /* TypeLiteral */: - case 191 /* UnionType */: + case 193 /* IntersectionType */: + case 187 /* TypeLiteral */: + case 192 /* UnionType */: return t; } } @@ -157540,7 +159816,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 311 /* SourceFile */; + return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 312 /* SourceFile */; default: return Debug.assertNever(triggerCharacter); } @@ -157601,7 +159877,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return void 0; } - function getImportStatementCompletionInfo(contextToken) { + function getImportStatementCompletionInfo(contextToken, sourceFile) { var _a, _b, _c; let keywordCompletion; let isKeywordOnlyCompletion = false; @@ -157617,6 +159893,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getCandidate() { const parent2 = contextToken.parent; if (isImportEqualsDeclaration(parent2)) { + const lastToken = parent2.getLastToken(sourceFile); + if (isIdentifier(contextToken) && lastToken !== contextToken) { + keywordCompletion = 161 /* FromKeyword */; + isKeywordOnlyCompletion = true; + return void 0; + } keywordCompletion = contextToken.kind === 156 /* TypeKeyword */ ? void 0 : 156 /* TypeKeyword */; return isModuleSpecifierMissingOrEmpty(parent2.moduleReference) ? parent2 : void 0; } @@ -157630,7 +159912,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (canCompleteFromNamedBindings(parent2)) { if (contextToken.kind === 20 /* CloseBraceToken */ || contextToken.kind === 80 /* Identifier */) { isKeywordOnlyCompletion = true; - keywordCompletion = 160 /* FromKeyword */; + keywordCompletion = 161 /* FromKeyword */; } else { return parent2.parent.parent; } @@ -157657,8 +159939,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); } - Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 275 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 271 /* ImportDeclaration */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference; + Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 276 /* ImportSpecifier */); + const potentialSplitPoint = top.kind === 272 /* ImportDeclaration */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference; const withoutModuleSpecifier = { pos: top.getFirstToken().getStart(), end: potentialSplitPoint.pos @@ -157786,6 +160068,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} CompletionSource2["TypeOnlyAlias"] = "TypeOnlyAlias/"; CompletionSource2["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/"; CompletionSource2["SwitchCases"] = "SwitchCases/"; + CompletionSource2["ObjectLiteralMemberWithComma"] = "ObjectLiteralMemberWithComma/"; return CompletionSource2; })(CompletionSource || {}); SymbolOriginInfoKind = /* @__PURE__ */ ((SymbolOriginInfoKind2) => { @@ -157815,7 +160098,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} _keywordCompletions = []; allKeywordsCompletions = memoize(() => { const res = []; - for (let i = 83 /* FirstKeyword */; i <= 164 /* LastKeyword */; i++) { + for (let i = 83 /* FirstKeyword */; i <= 165 /* LastKeyword */; i++) { res.push({ name: tokenToString(i), kind: "keyword" /* keyword */, @@ -157985,37 +160268,37 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getStringLiteralCompletionEntries(sourceFile, node, position, typeChecker, compilerOptions, host, preferences) { const parent2 = walkUpParentheses(node.parent); switch (parent2.kind) { - case 200 /* LiteralType */: { + case 201 /* LiteralType */: { const grandParent = walkUpParentheses(parent2.parent); - if (grandParent.kind === 204 /* ImportType */) { + if (grandParent.kind === 205 /* ImportType */) { return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; } return fromUnionableLiteralType(grandParent); } - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker, parent2.parent); } return fromContextualType() || fromContextualType(0 /* None */); - case 211 /* ElementAccessExpression */: { + case 212 /* ElementAccessExpression */: { const { expression, argumentExpression } = parent2; if (node === skipParentheses(argumentExpression)) { return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression)); } return void 0; } - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 290 /* JsxAttribute */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 291 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 290 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); - return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */); + const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 291 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); + return argumentInfo && (getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker, 0 /* Normal */)) || fromContextualType(0 /* None */); } - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 282 /* ExternalModuleReference */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 283 /* ExternalModuleReference */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - case 295 /* CaseClause */: + case 296 /* CaseClause */: const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses); const contextualTypes = fromContextualType(); if (!contextualTypes) { @@ -158028,21 +160311,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function fromUnionableLiteralType(grandParent) { switch (grandParent.kind) { - case 232 /* ExpressionWithTypeArguments */: - case 182 /* TypeReference */: { + case 233 /* ExpressionWithTypeArguments */: + case 183 /* TypeReference */: { const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); if (typeArgument) { return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; } return void 0; } - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: const { indexType, objectType } = grandParent; if (!rangeContainsPosition(indexType, position)) { return void 0; } return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType)); - case 191 /* UnionType */: { + case 192 /* UnionType */: { const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent)); if (!result) { return void 0; @@ -158067,9 +160350,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function walkUpParentheses(node) { switch (node.kind) { - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return walkUpParenthesizedTypes(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return walkUpParenthesizedExpressions(node); default: return node; @@ -158078,12 +160361,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getAlreadyUsedTypesInStringLiteralUnion(union, current) { return mapDefined(union.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : void 0); } - function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) { + function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) { let isNewIdentifier = false; const uniques = /* @__PURE__ */ new Map(); const candidates = []; const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg; - checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates); + checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates, checkMode); const types = flatMap(candidates, (candidate) => { if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return; @@ -158183,7 +160466,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} extensionOptions, host, /*moduleSpecifierIsRelative*/ - false, + true, scriptPath ).values()); } @@ -158444,7 +160727,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const keys = getOwnKeys(exports); const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); - const conditions = mode === 99 /* ESNext */ ? ["node", "import", "types"] : ["node", "require", "types"]; + const conditions = getConditions(compilerOptions, mode === 99 /* ESNext */); addCompletionEntriesFromPathsOrExports( result, fragmentSubpath, @@ -158515,16 +160798,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0; const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory; const normalizedSuffix = normalizePath(parsed.suffix); + const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix); + const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix]; const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory)); const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase; - const includeGlob = normalizedSuffix ? "**/*" + normalizedSuffix : "./*"; + const includeGlobs = normalizedSuffix ? matchingSuffixes.map((suffix) => "**/*" + suffix) : ["./*"]; const matches = mapDefined(tryReadDirectory( host, baseDirectory, extensionOptions.extensionsToSearch, /*exclude*/ void 0, - [includeGlob] + includeGlobs ), (match) => { const trimmedWithPattern = trimPrefixAndSuffix(match); if (trimmedWithPattern) { @@ -158538,8 +160823,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const directories = normalizedSuffix ? emptyArray : mapDefined(tryGetDirectories(host, baseDirectory), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir)); return [...matches, ...directories]; function trimPrefixAndSuffix(path) { - const inner = withoutStartAndEnd(normalizePath(path), completePrefix, normalizedSuffix); - return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner); + return firstDefined(matchingSuffixes, (suffix) => { + const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix); + return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner); + }); } } function withoutStartAndEnd(s, start, end) { @@ -158763,14 +161050,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (cancellationToken) cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(direct)) { handleImportCall(direct); break; } if (!isAvailableThroughGlobal) { const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 259 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent2.kind === 260 /* VariableDeclaration */) { const { name } = parent2; if (name.kind === 80 /* Identifier */) { directImports.push(name); @@ -158781,7 +161068,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; case 80 /* Identifier */: break; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: handleNamespaceImport( direct, direct.name, @@ -158790,10 +161077,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} false ); break; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 273 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 274 /* NamespaceImport */) { handleNamespaceImport( direct, namedBindings.name, @@ -158806,10 +161093,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 279 /* NamespaceExport */) { + } else if (direct.exportClause.kind === 280 /* NamespaceExport */) { addIndirectUser( getSourceFileLikeForImportDeclaration(direct), /*addTransitiveDependencies*/ @@ -158819,7 +161106,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} directImports.push(direct); } break; - case 204 /* ImportType */: + case 205 /* ImportType */: if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { addIndirectUser( direct.getSourceFile(), @@ -158860,7 +161147,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} directImports.push(importDeclaration); } else if (!isAvailableThroughGlobal) { const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 311 /* SourceFile */ || sourceFileLike.kind === 266 /* ModuleDeclaration */); + Debug.assert(sourceFileLike.kind === 312 /* SourceFile */ || sourceFileLike.kind === 267 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUser( sourceFileLike, @@ -158914,7 +161201,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return { importSearches, singleReferences }; function handleImport(decl) { - if (decl.kind === 270 /* ImportEqualsDeclaration */) { + if (decl.kind === 271 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } @@ -158924,7 +161211,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} handleNamespaceImportLike(decl); return; } - if (decl.kind === 204 /* ImportType */) { + if (decl.kind === 205 /* ImportType */) { if (decl.qualifier) { const firstIdentifier = getFirstIdentifier(decl.qualifier); if (firstIdentifier.escapedText === symbolName(exportSymbol)) { @@ -158938,7 +161225,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (decl.moduleSpecifier.kind !== 11 /* StringLiteral */) { return; } - if (decl.kind === 277 /* ExportDeclaration */) { + if (decl.kind === 278 /* ExportDeclaration */) { if (decl.exportClause && isNamedExports(decl.exportClause)) { searchForNamedImport(decl.exportClause); } @@ -158947,10 +161234,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: handleNamespaceImportLike(namedBindings.name); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { searchForNamedImport(namedBindings); } @@ -158984,7 +161271,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addSearch(name, checker.getSymbolAtLocation(name)); } } else { - const localSymbol = element.kind === 280 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); + const localSymbol = element.kind === 281 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); } } @@ -159008,7 +161295,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const checker = program.getTypeChecker(); for (const referencingFile of sourceFiles) { const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 311 /* SourceFile */) { + if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 312 /* SourceFile */) { for (const ref of referencingFile.referencedFiles) { if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { refs.push({ kind: "reference", referencingFile, ref }); @@ -159050,7 +161337,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return map2; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 311 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( + return forEach(sourceFileLike.kind === 312 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( // TODO: GH#18217 action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action) )); @@ -159063,15 +161350,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else { forEachPossibleImportOrExportStatement(sourceFile, (statement) => { switch (statement.kind) { - case 277 /* ExportDeclaration */: - case 271 /* ImportDeclaration */: { + case 278 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: { const decl = statement; if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; } - case 270 /* ImportEqualsDeclaration */: { + case 271 /* ImportEqualsDeclaration */: { const decl = statement; if (isExternalModuleImportEquals(decl)) { action(decl, decl.moduleReference.expression); @@ -159089,7 +161376,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { parent: parent2 } = node; const grandparent = parent2.parent; if (symbol.exportSymbol) { - if (parent2.kind === 210 /* PropertyAccessExpression */) { + if (parent2.kind === 211 /* PropertyAccessExpression */) { return ((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport( grandparent, /*useLhsSymbol*/ @@ -159206,15 +161493,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isNodeImport(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return parent2.name === node && isExternalModuleImportEquals(parent2); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return !parent2.propertyName; - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: Debug.assert(parent2.name === node); return true; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); default: return false; @@ -159245,21 +161532,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { return node.getSourceFile(); } const { parent: parent2 } = node; - if (parent2.kind === 311 /* SourceFile */) { + if (parent2.kind === 312 /* SourceFile */) { return parent2; } - Debug.assert(parent2.kind === 267 /* ModuleBlock */); + Debug.assert(parent2.kind === 268 /* ModuleBlock */); return cast(parent2.parent, isAmbientModuleDeclaration); } function isAmbientModuleDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */ && node.name.kind === 11 /* StringLiteral */; + return node.kind === 267 /* ModuleDeclaration */ && node.name.kind === 11 /* StringLiteral */; } function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 282 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 11 /* StringLiteral */; + return eq.moduleReference.kind === 283 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 11 /* StringLiteral */; } var ExportKind2, ImportExport; var init_importTracker = __esm({ @@ -159333,28 +161620,28 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!node) return void 0; switch (node.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getContextNode(node.parent.parent); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent; - case 280 /* ExportSpecifier */: - case 273 /* NamespaceImport */: + case 281 /* ExportSpecifier */: + case 274 /* NamespaceImport */: return node.parent.parent; - case 272 /* ImportClause */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 280 /* NamespaceExport */: return node.parent; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isExpressionStatement(node.parent) ? node.parent : node; - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: return { start: node.initializer, end: node.expression }; - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( findAncestor( node.parent, @@ -159393,7 +161680,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const node = getTouchingPropertyName(sourceFile, position); let referenceEntries; const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 210 /* PropertyAccessExpression */ || node.parent.kind === 207 /* BindingElement */ || node.parent.kind === 211 /* ElementAccessExpression */ || node.kind === 108 /* SuperKeyword */) { + if (node.parent.kind === 211 /* PropertyAccessExpression */ || node.parent.kind === 208 /* BindingElement */ || node.parent.kind === 212 /* ElementAccessExpression */ || node.kind === 108 /* SuperKeyword */) { referenceEntries = entries && [...entries]; } else if (entries) { const queue = createQueue(entries); @@ -159414,11 +161701,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return void 0; } const checker = program.getTypeChecker(); - if (node.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { const result = []; Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); return result; @@ -159613,12 +161900,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); if (symbol) { return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 209 /* ObjectLiteralExpression */) { + } else if (node.kind === 210 /* ObjectLiteralExpression */) { return { kind: "interface" /* interfaceElement */, displayParts: [punctuationPart(21 /* OpenParenToken */), textPart("object literal"), punctuationPart(22 /* CloseParenToken */)] }; - } else if (node.kind === 230 /* ClassExpression */) { + } else if (node.kind === 231 /* ClassExpression */) { return { kind: "local class" /* localClassElement */, displayParts: [punctuationPart(21 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(22 /* CloseParenToken */)] @@ -159673,49 +161960,49 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return !!(source && ((_a = target.declarations) == null ? void 0 : _a.some((d) => d === source || d === commonjsSource))); } function declarationIsWriteAccess(decl) { - if (!!(decl.flags & 16777216 /* Ambient */)) + if (!!(decl.flags & 33554432 /* Ambient */)) return true; switch (decl.kind) { - case 225 /* BinaryExpression */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 226 /* BinaryExpression */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: case 90 /* DefaultKeyword */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 280 /* ExportSpecifier */: - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 263 /* InterfaceDeclaration */: - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: - case 290 /* JsxAttribute */: - case 266 /* ModuleDeclaration */: - case 269 /* NamespaceExportDeclaration */: - case 273 /* NamespaceImport */: - case 279 /* NamespaceExport */: - case 168 /* Parameter */: - case 303 /* ShorthandPropertyAssignment */: - case 264 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 281 /* ExportSpecifier */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 264 /* InterfaceDeclaration */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 291 /* JsxAttribute */: + case 267 /* ModuleDeclaration */: + case 270 /* NamespaceExportDeclaration */: + case 274 /* NamespaceImport */: + case 280 /* NamespaceExport */: + case 169 /* Parameter */: + case 304 /* ShorthandPropertyAssignment */: + case 265 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: return true; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return !!decl.body; - case 259 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: + case 260 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: return !!decl.initializer || isCatchClause(decl.parent); - case 172 /* MethodSignature */: - case 170 /* PropertySignature */: - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: + case 173 /* MethodSignature */: + case 171 /* PropertySignature */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: return false; default: return Debug.failBadSyntaxKind(decl); @@ -159968,9 +162255,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (symbol.declarations) { for (const decl of symbol.declarations) { switch (decl.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { references.push(nodeEntry(decl.name)); } @@ -160094,7 +162381,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getSpecialSearchKind(node) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: case 137 /* ConstructorKeyword */: return 1 /* Constructor */; case 80 /* Identifier */: @@ -160303,7 +162590,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getSymbolScope(symbol) { const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 217 /* FunctionExpression */ || valueDeclaration.kind === 230 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 218 /* FunctionExpression */ || valueDeclaration.kind === 231 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -160312,7 +162599,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (flags & (4 /* Property */ | 8192 /* Method */)) { const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { - return getAncestor(privateDeclaration, 262 /* ClassDeclaration */); + return getAncestor(privateDeclaration, 263 /* ClassDeclaration */); } return void 0; } @@ -160329,7 +162616,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (scope && scope !== container) { return void 0; } - if (!container || container.kind === 311 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 312 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { return void 0; } scope = container; @@ -160407,7 +162694,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } Core2.someSignatureUsage = someSignatureUsage; function getPossibleSymbolReferenceNodes(sourceFile, symbolName2, container = sourceFile) { - return getPossibleSymbolReferencePositions(sourceFile, symbolName2, container).map((pos) => getTouchingPropertyName(sourceFile, pos)); + return mapDefined(getPossibleSymbolReferencePositions(sourceFile, symbolName2, container), (pos) => { + const referenceLocation = getTouchingPropertyName(sourceFile, pos); + return referenceLocation === sourceFile ? void 0 : referenceLocation; + }); } function getPossibleSymbolReferencePositions(sourceFile, symbolName2, container = sourceFile) { const positions = []; @@ -160676,14 +162966,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { const ctrKeyword = findChildOfKind(decl, 137 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 175 /* Constructor */ && !!ctrKeyword); + Debug.assert(decl.kind === 176 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } } if (classSymbol.exports) { classSymbol.exports.forEach((member) => { const decl = member.valueDeclaration; - if (decl && decl.kind === 173 /* MethodDeclaration */) { + if (decl && decl.kind === 174 /* MethodDeclaration */) { const body = decl.body; if (body) { forEachDescendantOfKind(body, 110 /* ThisKeyword */, (thisKeyword) => { @@ -160705,7 +162995,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 175 /* Constructor */); + Debug.assert(decl.kind === 176 /* Constructor */); const body = decl.body; if (body) { forEachDescendantOfKind(body, 108 /* SuperKeyword */, (node) => { @@ -160740,12 +163030,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (refNode.kind !== 80 /* Identifier */) { return; } - if (refNode.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 304 /* ShorthandPropertyAssignment */) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); } - const containingClass = getContainingClassIfInHeritageClause(refNode); - if (containingClass) { - addReference2(containingClass); + const containingNode = getContainingNodeIfInHeritageClause(refNode); + if (containingNode) { + addReference2(containingNode); return; } const typeNode = findAncestor(refNode, (a) => !isQualifiedName(a.parent) && !isTypeNode(a.parent) && !isTypeElement(a.parent)); @@ -160755,7 +163045,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addIfImplementation(typeHavingNode.initializer); } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { const body = typeHavingNode.body; - if (body.kind === 240 /* Block */) { + if (body.kind === 241 /* Block */) { forEachReturnStatement(body, (returnStatement) => { if (returnStatement.expression) addIfImplementation(returnStatement.expression); @@ -160772,18 +163062,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addReference2(e); } } - function getContainingClassIfInHeritageClause(node) { - return isIdentifier(node) || isPropertyAccessExpression(node) ? getContainingClassIfInHeritageClause(node.parent) : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, isClassLike) : void 0; + function getContainingNodeIfInHeritageClause(node) { + return isIdentifier(node) || isPropertyAccessExpression(node) ? getContainingNodeIfInHeritageClause(node.parent) : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, or(isClassLike, isInterfaceDeclaration)) : void 0; } function isImplementationExpression(node) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 208 /* ArrayLiteralExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 209 /* ArrayLiteralExpression */: return true; default: return false; @@ -160817,13 +163107,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -160845,7 +163135,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; } function isParameterName(node) { - return node.kind === 80 /* Identifier */ && node.parent.kind === 168 /* Parameter */ && node.parent.name === node; + return node.kind === 80 /* Identifier */ && node.parent.kind === 169 /* Parameter */ && node.parent.name === node; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { let searchSpaceNode = getThisContainer( @@ -160857,32 +163147,32 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isObjectLiteralMethod(searchSpaceNode)) { staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { return void 0; } - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: break; default: return void 0; } - const references = flatMap(searchSpaceNode.kind === 311 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { + const references = flatMap(searchSpaceNode.kind === 312 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { cancellationToken.throwIfCancellationRequested(); return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { if (!isThis(node)) { @@ -160898,18 +163188,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!canHaveSymbol(container)) return false; switch (searchSpaceNode.kind) { - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return searchSpaceNode.symbol === container.symbol; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: - case 209 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 210 /* ObjectLiteralExpression */: return container.parent && canHaveSymbol(container.parent) && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 311 /* SourceFile */: - return container.kind === 311 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); + case 312 /* SourceFile */: + return container.kind === 312 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); } }); }).map((n) => nodeEntry(n)); @@ -161033,7 +163323,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} Debug.assert(paramProps.length === 2 && !!(paramProps[0].flags & 1 /* FunctionScopedVariable */) && !!(paramProps[1].flags & 4 /* Property */)); return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } - const exportSpecifier = getDeclarationOfKind(symbol, 280 /* ExportSpecifier */); + const exportSpecifier = getDeclarationOfKind(symbol, 281 /* ExportSpecifier */); if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); if (localSymbol) { @@ -161074,7 +163364,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ) || (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */) && allowBaseTypes(rootSymbol) ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, (base) => cbSymbol(sym, rootSymbol, base, kind)) : void 0)); } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol2, checker2) { - const bindingElement = getDeclarationOfKind(symbol2, 207 /* BindingElement */); + const bindingElement = getDeclarationOfKind(symbol2, 208 /* BindingElement */); if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { return getPropertySymbolFromBindingElement(checker2, bindingElement); } @@ -161140,7 +163430,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } Core2.getIntersectingMeaningFromDeclarations = getIntersectingMeaningFromDeclarations; function isImplementation(node) { - return !!(node.flags & 16777216 /* Ambient */) ? !(isInterfaceDeclaration(node) || isTypeAliasDeclaration(node)) : isVariableLike(node) ? hasInitializer(node) : isFunctionLikeDeclaration(node) ? !!node.body : isClassLike(node) || isModuleOrEnumDeclaration(node); + return !!(node.flags & 33554432 /* Ambient */) ? !(isInterfaceDeclaration(node) || isTypeAliasDeclaration(node)) : isVariableLike(node) ? hasInitializer(node) : isFunctionLikeDeclaration(node) ? !!node.body : isClassLike(node) || isModuleOrEnumDeclaration(node); } function getReferenceEntriesForShorthandPropertyAssignment(node, checker, addReference2) { const refSymbol = checker.getSymbolAtLocation(node); @@ -161199,6 +163489,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} getTextSpanOfEntry: () => getTextSpanOfEntry, isContextWithStartAndEndNode: () => isContextWithStartAndEndNode, isDeclarationOfSymbol: () => isDeclarationOfSymbol, + isWriteAccessForReference: () => isWriteAccessForReference, nodeEntry: () => nodeEntry, toContextSpan: () => toContextSpan, toHighlightSpan: () => toHighlightSpan, @@ -161227,7 +163518,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const { parent: parent2 } = node; const typeChecker = program.getTypeChecker(); - if (node.kind === 163 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { + if (node.kind === 164 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { return getDefinitionFromOverriddenMember(typeChecker, node) || emptyArray; } if (isJumpStatementTarget(node)) { @@ -161318,7 +163609,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return node.kind === 108 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; } } - if (node.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { const shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo( decl, @@ -161419,6 +163710,55 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return void 0; } + function shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type) { + const referenceName = type.symbol.name; + if (!typesWithUnwrappedTypeArguments.has(referenceName)) { + return false; + } + const globalType = typeChecker.resolveName( + referenceName, + /*location*/ + void 0, + 788968 /* Type */, + /*excludeGlobals*/ + false + ); + return !!globalType && globalType === type.target.symbol; + } + function shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) { + if (!type.aliasSymbol) { + return false; + } + const referenceName = type.aliasSymbol.name; + if (!typesWithUnwrappedTypeArguments.has(referenceName)) { + return false; + } + const globalType = typeChecker.resolveName( + referenceName, + /*location*/ + void 0, + 788968 /* Type */, + /*excludeGlobals*/ + false + ); + return !!globalType && globalType === type.aliasSymbol; + } + function getFirstTypeArgumentDefinitions(typeChecker, type, node, failedAliasResolution) { + var _a, _b; + if (!!(getObjectFlags(type) & 4 /* Reference */) && shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type)) { + return definitionFromType(typeChecker.getTypeArguments(type)[0], typeChecker, node, failedAliasResolution); + } + if (shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) && type.aliasTypeArguments) { + return definitionFromType(type.aliasTypeArguments[0], typeChecker, node, failedAliasResolution); + } + if (getObjectFlags(type) & 32 /* Mapped */ && type.target && shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type.target)) { + const declaration = (_b = (_a = type.aliasSymbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b[0]; + if (declaration && isTypeAliasDeclaration(declaration) && isTypeReferenceNode(declaration.type) && declaration.type.typeArguments) { + return definitionFromType(typeChecker.getTypeAtLocation(declaration.type.typeArguments[0]), typeChecker, node, failedAliasResolution); + } + } + return []; + } function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) { const node = getTouchingPropertyName(sourceFile, position); if (node === sourceFile) { @@ -161444,8 +163784,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node); const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker); const fromReturnType = returnType && definitionFromType(returnType, typeChecker, node, failedAliasResolution); - const typeDefinitions = fromReturnType && fromReturnType.length !== 0 ? fromReturnType : definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution); - return typeDefinitions.length ? typeDefinitions : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0; + const [resolvedType, typeDefinitions] = fromReturnType && fromReturnType.length !== 0 ? [returnType, fromReturnType] : [typeAtLocation, definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution)]; + return typeDefinitions.length ? [...getFirstTypeArgumentDefinitions(typeChecker, resolvedType, node, failedAliasResolution), ...typeDefinitions] : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0; } function definitionFromType(type, checker, node, failedAliasResolution) { return flatMap(type.isUnion() && !(type.flags & 32 /* Enum */) ? type.types : [type], (t) => t.symbol && getDefinitionFromSymbol(checker, t.symbol, node, failedAliasResolution)); @@ -161495,7 +163835,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (node.parent === declaration) { return true; } - if (declaration.kind === 273 /* NamespaceImport */) { + if (declaration.kind === 274 /* NamespaceImport */) { return false; } return true; @@ -161585,7 +163925,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ts_FindAllReferences_exports.getContextNode(declaration) ), isLocal: !isDefinitionVisible(checker, declaration), - isAmbient: !!(declaration.flags & 16777216 /* Ambient */), + isAmbient: !!(declaration.flags & 33554432 /* Ambient */), unverified, failedAliasResolution }; @@ -161598,19 +163938,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent); switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: if (hasEffectiveModifier(declaration, 8 /* Private */)) return false; - case 175 /* Constructor */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: + case 176 /* Constructor */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: return isDefinitionVisible(checker, declaration.parent); default: return false; @@ -161654,18 +163994,40 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConstructorLike(node) { switch (node.kind) { - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: return true; default: return false; } } + var typesWithUnwrappedTypeArguments; var init_goToDefinition = __esm({ "src/services/goToDefinition.ts"() { "use strict"; init_ts4(); + typesWithUnwrappedTypeArguments = /* @__PURE__ */ new Set([ + "Array", + "ArrayLike", + "ReadonlyArray", + "Promise", + "PromiseLike", + "Iterable", + "IterableIterator", + "AsyncIterable", + "Set", + "WeakSet", + "ReadonlySet", + "Map", + "WeakMap", + "ReadonlyMap", + "Partial", + "Required", + "Readonly", + "Pick", + "Omit" + ]); } }); @@ -161693,6 +164055,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function shouldShowLiteralParameterNameHintsOnly(preferences) { return preferences.includeInlayParameterNameHints === "literals"; } + function shouldUseInteractiveInlayHints(preferences) { + return preferences.interactiveInlayHints === true; + } function provideInlayHints(context) { const { file, program, span, cancellationToken, preferences } = context; const sourceFileText = file.text; @@ -161706,14 +164071,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } switch (node.kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 218 /* ArrowFunction */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { @@ -161743,17 +164108,26 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isSignatureSupportingReturnAnnotation(node) { return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node); } - function addParameterHints(text, position, isFirstVariadicArgument) { + function addParameterHints(text, parameter, position, isFirstVariadicArgument) { + let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`; + let displayParts; + if (shouldUseInteractiveInlayHints(preferences)) { + displayParts = [getNodeDisplayPart(hintText, parameter), { text: ":" }]; + hintText = ""; + } else { + hintText += ":"; + } result.push({ - text: `${isFirstVariadicArgument ? "..." : ""}${truncation(text, maxHintsLength)}:`, + text: hintText, position, kind: "Parameter" /* Parameter */, - whitespaceAfter: true + whitespaceAfter: true, + displayParts }); } function addTypeHints(text, position) { result.push({ - text: `: ${truncation(text, maxHintsLength)}`, + text: `: ${text.length > maxTypeHintLength ? text.substr(0, maxTypeHintLength - "...".length) + "..." : text}`, position, kind: "Type" /* Type */, whitespaceBefore: true @@ -161761,7 +164135,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function addEnumMemberValueHints(text, position) { result.push({ - text: `= ${truncation(text, maxHintsLength)}`, + text: `= ${text}`, position, kind: "Enum" /* Enum */, whitespaceBefore: true @@ -161810,15 +164184,31 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!signature || !candidates.length) { return; } - for (let i = 0; i < args.length; ++i) { - const originalArg = args[i]; + let signatureParamPos = 0; + for (const originalArg of args) { const arg = skipParentheses(originalArg); if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) { continue; } - const identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i); - if (identifierNameInfo) { - const [parameterName, isFirstVariadicArgument] = identifierNameInfo; + let spreadArgs = 0; + if (isSpreadElement(arg)) { + const spreadType = checker.getTypeAtLocation(arg.expression); + if (checker.isTupleType(spreadType)) { + const { elementFlags, fixedLength } = spreadType.target; + if (fixedLength === 0) { + continue; + } + const firstOptionalIndex = findIndex(elementFlags, (f) => !(f & 1 /* Required */)); + const requiredArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex; + if (requiredArgs > 0) { + spreadArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex; + } + } + } + const identifierInfo = checker.getParameterIdentifierInfoAtPosition(signature, signatureParamPos); + signatureParamPos = signatureParamPos + (spreadArgs || 1); + if (identifierInfo) { + const { parameter, parameterName, isRestParameter: isFirstVariadicArgument } = identifierInfo; const isParameterNameNotSameAsArgument = preferences.includeInlayParameterNameHintsWhenArgumentMatchesName || !identifierOrAccessExpressionPostfixMatchesParameterName(arg, parameterName); if (!isParameterNameNotSameAsArgument && !isFirstVariadicArgument) { continue; @@ -161827,7 +164217,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (leadingCommentsContainsParameterName(arg, name)) { continue; } - addParameterHints(name, originalArg.getStart(), isFirstVariadicArgument); + addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument); } } } @@ -161853,7 +164243,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isHintableLiteral(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: { + case 224 /* PrefixUnaryExpression */: { const operand = node.operand; return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); } @@ -161861,7 +164251,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return true; case 80 /* Identifier */: { const name = node.escapedText; @@ -161933,12 +164323,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return printTypeInSingleLine(signatureParamType); } - function truncation(text, maxLength2) { - if (text.length > maxLength2) { - return text.substr(0, maxLength2 - "...".length) + "..."; - } - return text; - } function printTypeInSingleLine(type) { const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; const printer = createPrinterWithRemoveComments(); @@ -161969,13 +164353,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return true; } + function getNodeDisplayPart(text, node) { + const sourceFile = node.getSourceFile(); + return { + text, + span: createTextSpanFromNode(node, sourceFile), + file: sourceFile.fileName + }; + } } - var maxHintsLength, leadingParameterNameCommentRegexFactory; + var maxTypeHintLength, leadingParameterNameCommentRegexFactory; var init_inlayHints = __esm({ "src/services/inlayHints.ts"() { "use strict"; init_ts4(); - maxHintsLength = 30; + maxTypeHintLength = 30; leadingParameterNameCommentRegexFactory = (name) => { return new RegExp(`^\\s?/\\*\\*?\\s?${name}\\s?\\*\\/\\s?$`); }; @@ -161999,8 +164391,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const parts = []; forEachUnique(declarations, (declaration) => { for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 333 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 352 /* JSDocTypedefTag */ && declaration.kind !== 344 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 352 /* JSDocTypedefTag */ || t.kind === 344 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 347 /* JSDocParameterTag */ || t.kind === 348 /* JSDocReturnTag */)) { + const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 334 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); + if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 353 /* JSDocTypedefTag */ && declaration.kind !== 345 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 353 /* JSDocTypedefTag */ || t.kind === 345 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 348 /* JSDocParameterTag */ || t.kind === 349 /* JSDocReturnTag */)) { continue; } let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; @@ -162019,11 +164411,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: return [declaration]; - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return getJSDocCommentsAndTags(declaration); @@ -162033,7 +164425,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const infos = []; forEachUnique(declarations, (declaration) => { const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 352 /* JSDocTypedefTag */ || t.kind === 344 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 347 /* JSDocParameterTag */ || t.kind === 348 /* JSDocReturnTag */)) { + if (tags.some((t) => t.kind === 353 /* JSDocTypedefTag */ || t.kind === 345 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 348 /* JSDocParameterTag */ || t.kind === 349 /* JSDocReturnTag */)) { return; } for (const tag of tags) { @@ -162048,21 +164440,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return flatMap( comment, - (node) => node.kind === 327 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) + (node) => node.kind === 328 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) ); } function getCommentDisplayParts(tag, checker) { const { comment, kind } = tag; const namePart = getTagNameDisplayPart(kind); switch (kind) { - case 355 /* JSDocThrowsTag */: + case 356 /* JSDocThrowsTag */: const typeExpression = tag.typeExpression; return typeExpression ? withNode(typeExpression) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return withNode(tag.class); - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return withNode(tag.class); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: const templateTag = tag; const displayParts = []; if (templateTag.constraint) { @@ -162084,14 +164476,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); } return displayParts; - case 350 /* JSDocTypeTag */: - case 356 /* JSDocSatisfiesTag */: + case 351 /* JSDocTypeTag */: + case 357 /* JSDocSatisfiesTag */: return withNode(tag.typeExpression); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: - case 353 /* JSDocSeeTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: + case 354 /* JSDocSeeTag */: const { name } = tag; return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); default: @@ -162114,14 +164506,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getTagNameDisplayPart(kind) { switch (kind) { - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return parameterNamePart; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return propertyNamePart; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return typeParameterNamePart; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: return typeAliasNamePart; default: return textPart; @@ -162214,7 +164606,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const tags = (parameters ? parameterDocComments(parameters || [], isJavaScriptFile, indentationStr, newLine) : "") + (hasReturn2 ? returnsDocComment(indentationStr, newLine) : ""); const openComment = "/**"; const closeComment = " */"; - const hasTag = (commentOwnerJsDoc || []).some((jsDoc) => !!jsDoc.tags); + const hasTag = length(getJSDocTags(commentOwner)) > 0; if (tags && !hasTag) { const preamble = openComment + newLine + indentationStr + " * "; const endLine = tokenStart === position ? newLine + indentationStr : ""; @@ -162246,46 +164638,46 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getCommentOwnerInfoWorker(commentOwner, options) { switch (commentOwner.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 172 /* MethodSignature */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 173 /* MethodSignature */: + case 219 /* ArrowFunction */: const host = commentOwner; return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 264 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 265 /* TypeAliasDeclaration */: return { commentOwner }; - case 170 /* PropertySignature */: { + case 171 /* PropertySignature */: { const host2 = commentOwner; return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; } - case 242 /* VariableStatement */: { + case 243 /* VariableStatement */: { const varStatement = commentOwner; const varDeclarations = varStatement.declarationList.declarations; const host2 = varDeclarations.length === 1 && varDeclarations[0].initializer ? getRightHandSideOfAssignment(varDeclarations[0].initializer) : void 0; return host2 ? { commentOwner, parameters: host2.parameters, hasReturn: hasReturn(host2, options) } : { commentOwner }; } - case 311 /* SourceFile */: + case 312 /* SourceFile */: return "quit"; - case 266 /* ModuleDeclaration */: - return commentOwner.parent.kind === 266 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 243 /* ExpressionStatement */: + case 267 /* ModuleDeclaration */: + return commentOwner.parent.kind === 267 /* ModuleDeclaration */ ? void 0 : { commentOwner }; + case 244 /* ExpressionStatement */: return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const be = commentOwner; if (getAssignmentDeclarationKind(be) === 0 /* None */) { return "quit"; } return isFunctionLike(be.right) ? { commentOwner, parameters: be.right.parameters, hasReturn: hasReturn(be.right, options) } : { commentOwner }; } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: const init = commentOwner.initializer; if (init && (isFunctionExpression(init) || isArrowFunction(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; @@ -162296,14 +164688,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock(node.body) && !!forEachReturnStatement(node.body, (n) => n)); } function getRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 216 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 217 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return rightHandSide; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return find(rightHandSide.members, isConstructorDeclaration); } } @@ -162457,7 +164849,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (length(oldImportDecls) === 0) { return; } - suppressLeadingTrivia(oldImportDecls[0]); + setEmitFlags(oldImportDecls[0], 1024 /* NoLeadingComments */); const oldImportGroups = shouldCombine ? group(oldImportDecls, (importDecl) => getExternalModuleName2(importDecl.moduleSpecifier)) : [oldImportDecls]; const sortedImportGroups = shouldSort ? stableSort(oldImportGroups, (group1, group2) => compareModuleSpecifiersWorker(group1[0].moduleSpecifier, group2[0].moduleSpecifier, comparer)) : oldImportGroups; const newImportDecls = flatMap(sortedImportGroups, (importGroup) => getExternalModuleName2(importGroup[0].moduleSpecifier) || importGroup[0].moduleSpecifier === void 0 ? coalesce(importGroup) : importGroup); @@ -162780,11 +165172,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getModuleSpecifierExpression(declaration) { var _a; switch (declaration.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return (_a = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return declaration.moduleSpecifier; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return declaration.declarationList.declarations[0].initializer.arguments[0]; } } @@ -162884,19 +165276,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getImportKindOrder(s1) { var _a; switch (s1.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: if (!s1.importClause) return 0; if (s1.importClause.isTypeOnly) return 1; - if (((_a = s1.importClause.namedBindings) == null ? void 0 : _a.kind) === 273 /* NamespaceImport */) + if (((_a = s1.importClause.namedBindings) == null ? void 0 : _a.kind) === 274 /* NamespaceImport */) return 2; if (s1.importClause.name) return 3; return 4; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return 5; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return 6; } } @@ -163204,21 +165596,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getOutliningSpanForNode(n, sourceFile) { switch (n.kind) { - case 240 /* Block */: + case 241 /* Block */: if (isFunctionLike(n.parent)) { return functionSpan(n.parent, n, sourceFile); } switch (n.parent.kind) { - case 245 /* DoStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 244 /* IfStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 298 /* CatchClause */: + case 246 /* DoStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 245 /* IfStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 299 /* CatchClause */: return spanForNode(n.parent); - case 257 /* TryStatement */: + case 258 /* TryStatement */: const tryStatement = n.parent; if (tryStatement.tryBlock === n) { return spanForNode(n.parent); @@ -163230,17 +165622,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} default: return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); } - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return spanForNode(n.parent); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 268 /* CaseBlock */: - case 186 /* TypeLiteral */: - case 205 /* ObjectBindingPattern */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 269 /* CaseBlock */: + case 187 /* TypeLiteral */: + case 206 /* ObjectBindingPattern */: return spanForNode(n); - case 188 /* TupleType */: + case 189 /* TupleType */: return spanForNode( n, /*autoCollapse*/ @@ -163249,24 +165641,24 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} !isTupleTypeNode(n.parent), 23 /* OpenBracketToken */ ); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return spanForNodeArray(n.statements); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return spanForObjectOrArrayLiteral(n); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return spanForObjectOrArrayLiteral(n, 23 /* OpenBracketToken */); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return spanForJSXElement(n); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return spanForJSXFragment(n); - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: case 15 /* NoSubstitutionTemplateLiteral */: return spanForTemplateLiteral(n); - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: return spanForNode( n, /*autoCollapse*/ @@ -163275,15 +165667,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} !isBindingElement(n.parent), 23 /* OpenBracketToken */ ); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return spanForArrowFunction(n); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return spanForCallExpression(n); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return spanForParenthesizedExpression(n); - case 274 /* NamedImports */: - case 278 /* NamedExports */: - case 299 /* AssertClause */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: + case 300 /* AssertClause */: return spanForNamedImportsOrExportsOrAssertClause(n); } function spanForNamedImportsOrExportsOrAssertClause(node) { @@ -163404,7 +165796,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} node, sourceFile, /*autoCollapse*/ - node.kind !== 218 /* ArrowFunction */ + node.kind !== 219 /* ArrowFunction */ ); } function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { @@ -163486,7 +165878,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return getRenameInfoError(wouldRenameNodeModules); } const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; + const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; const displayName = specifierName || typeChecker.symbolToString(symbol); const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol); return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), node, sourceFile); @@ -163772,10 +166164,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 214 /* TaggedTemplateExpression */) { + } else if (isTemplateHead(node) && parent2.parent.kind === 215 /* TaggedTemplateExpression */) { const templateExpression = parent2; const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 227 /* TemplateExpression */); + Debug.assert(templateExpression.kind === 228 /* TemplateExpression */); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { @@ -163852,17 +166244,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getContextualSignatureLocationInfo(node, sourceFile, position, checker) { const { parent: parent2 } = node; switch (parent2.kind) { - case 216 /* ParenthesizedExpression */: - case 173 /* MethodDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 217 /* ParenthesizedExpression */: + case 174 /* MethodDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: const info = getArgumentOrParameterListInfo(node, position, sourceFile); if (!info) return void 0; const { argumentIndex, argumentCount, argumentsSpan } = info; const contextualType = isMethodDeclaration(parent2) ? checker.getContextualTypeForObjectLiteralElement(parent2) : checker.getContextualType(parent2); return contextualType && { contextualType, argumentIndex, argumentCount, argumentsSpan }; - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const highestBinary = getHighestBinary(parent2); const contextualType2 = checker.getContextualType(highestBinary); const argumentIndex2 = node.kind === 21 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; @@ -163936,7 +166328,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const template = taggedTemplate.template; const applicableSpanStart = template.getStart(); let applicableSpanEnd = template.getEnd(); - if (template.kind === 227 /* TemplateExpression */) { + if (template.kind === 228 /* TemplateExpression */) { const lastSpan = last(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia( @@ -164249,7 +166641,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 148 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 58 /* QuestionToken */); const groupedWithBrackets = groupChildren( groupedWithPlusMinusTokens, - ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 167 /* TypeParameter */ || kind === 24 /* CloseBracketToken */ + ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 24 /* CloseBracketToken */ ); return [ openBraceToken, @@ -164260,7 +166652,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (isPropertySignature(node)) { const children = groupChildren(node.getChildren(), (child) => child === node.name || contains(node.modifiers, child)); - const firstJSDocChild = ((_a = children[0]) == null ? void 0 : _a.kind) === 326 /* JSDoc */ ? children[0] : void 0; + const firstJSDocChild = ((_a = children[0]) == null ? void 0 : _a.kind) === 327 /* JSDoc */ ? children[0] : void 0; const withJSDocSeparated = firstJSDocChild ? children.slice(1) : children; const splittedChildren = splitChildren(withJSDocSeparated, ({ kind }) => kind === 59 /* ColonToken */); return firstJSDocChild ? [firstJSDocChild, createSyntaxList2(splittedChildren)] : splittedChildren; @@ -164321,19 +166713,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isListOpener(token) { const kind = token && token.kind; - return kind === 19 /* OpenBraceToken */ || kind === 23 /* OpenBracketToken */ || kind === 21 /* OpenParenToken */ || kind === 285 /* JsxOpeningElement */; + return kind === 19 /* OpenBraceToken */ || kind === 23 /* OpenBracketToken */ || kind === 21 /* OpenParenToken */ || kind === 286 /* JsxOpeningElement */; } function isListCloser(token) { const kind = token && token.kind; - return kind === 20 /* CloseBraceToken */ || kind === 24 /* CloseBracketToken */ || kind === 22 /* CloseParenToken */ || kind === 286 /* JsxClosingElement */; + return kind === 20 /* CloseBraceToken */ || kind === 24 /* CloseBracketToken */ || kind === 22 /* CloseParenToken */ || kind === 287 /* JsxClosingElement */; } function getEndPos(sourceFile, node) { switch (node.kind) { - case 347 /* JSDocParameterTag */: - case 344 /* JSDocCallbackTag */: - case 354 /* JSDocPropertyTag */: - case 352 /* JSDocTypedefTag */: - case 349 /* JSDocThisTag */: + case 348 /* JSDocParameterTag */: + case 345 /* JSDocCallbackTag */: + case 355 /* JSDocPropertyTag */: + case 353 /* JSDocTypedefTag */: + case 350 /* JSDocThisTag */: return sourceFile.getLineEndOfPosition(node.getStart()); default: return node.getEnd(); @@ -164368,7 +166760,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const flags = getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 230 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; + return getDeclarationOfKind(symbol, 231 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; } if (flags & 384 /* Enum */) return "enum" /* enumElement */; @@ -164406,6 +166798,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return "parameter" /* parameterElement */; } else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration)) { return "const" /* constElement */; + } else if (symbol.valueDeclaration && isVarUsing(symbol.valueDeclaration)) { + return "using" /* variableUsingElement */; + } else if (symbol.valueDeclaration && isVarAwaitUsing(symbol.valueDeclaration)) { + return "await using" /* variableAwaitUsingElement */; } else if (forEach(symbol.declarations, isLet)) { return "let" /* letElement */; } @@ -164473,7 +166869,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return modifiers.size > 0 ? arrayFrom(modifiers.values()).join(",") : "" /* none */; } - function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias) { + function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, type, semanticMeaning, alias) { var _a; const displayParts = []; let documentation = []; @@ -164482,7 +166878,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let symbolKind = semanticMeaning & 1 /* Value */ ? getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) : "" /* unknown */; let hasAddedSymbolInfo = false; const isThisExpression = location.kind === 110 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location); - let type; let documentationFromAlias; let tagsFromAlias; let hasMultipleSignatures = false; @@ -164494,13 +166889,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location); if (declaration) { switch (declaration.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: symbolKind = "getter" /* memberGetAccessorElement */; break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: symbolKind = "setter" /* memberSetAccessorElement */; break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: symbolKind = "accessor" /* memberAccessorVariableElement */; break; default: @@ -164511,8 +166906,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } let signature; - type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (location.parent && location.parent.kind === 210 /* PropertyAccessExpression */) { + type ?? (type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location)); + if (location.parent && location.parent.kind === 211 /* PropertyAccessExpression */) { const right = location.parent.name; if (right === location || right && right.getFullWidth() === 0) { location = location.parent; @@ -164528,7 +166923,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (callExpressionLike) { signature = typeChecker.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 213 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 108 /* SuperKeyword */; + const useConstructSignatures = callExpressionLike.kind === 214 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 108 /* SuperKeyword */; const allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (signature && !contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : void 0; @@ -164591,21 +166986,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} hasMultipleSignatures = allSignatures.length > 1; } } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || // name of function declaration - location.kind === 137 /* ConstructorKeyword */ && location.parent.kind === 175 /* Constructor */) { + location.kind === 137 /* ConstructorKeyword */ && location.parent.kind === 176 /* Constructor */) { const functionDeclaration = location.parent; const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 137 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 175 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + const allSignatures = functionDeclaration.kind === 176 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 175 /* Constructor */) { + if (functionDeclaration.kind === 176 /* Constructor */) { symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 178 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -164617,7 +167012,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 230 /* ClassExpression */)) { + if (getDeclarationOfKind(symbol, 231 /* ClassExpression */)) { pushSymbolKind("local class" /* localClassElement */); } else { displayParts.push(keywordPart(86 /* ClassKeyword */)); @@ -164656,7 +167051,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (symbolFlags & 1536 /* Module */ && !isThisExpression) { prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 266 /* ModuleDeclaration */); + const declaration = getDeclarationOfKind(symbol, 267 /* ModuleDeclaration */); const isNamespace = declaration && declaration.name && declaration.name.kind === 80 /* Identifier */; displayParts.push(keywordPart(isNamespace ? 145 /* NamespaceKeyword */ : 144 /* ModuleKeyword */)); displayParts.push(spacePart()); @@ -164674,7 +167069,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addFullSymbolName(symbol.parent, enclosingDeclaration); writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - const decl = getDeclarationOfKind(symbol, 167 /* TypeParameter */); + const decl = getDeclarationOfKind(symbol, 168 /* TypeParameter */); if (decl === void 0) return Debug.fail(); const declaration = decl.parent; @@ -164682,10 +167077,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isFunctionLike(declaration)) { addInPrefix(); const signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 179 /* ConstructSignature */) { + if (declaration.kind === 180 /* ConstructSignature */) { displayParts.push(keywordPart(105 /* NewKeyword */)); displayParts.push(spacePart()); - } else if (declaration.kind !== 178 /* CallSignature */ && declaration.name) { + } else if (declaration.kind !== 179 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); @@ -164703,7 +167098,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} symbolKind = "enum member" /* enumMemberElement */; addPrefixForAnyFunctionOrVar(symbol, "enum member"); const declaration = (_a = symbol.declarations) == null ? void 0 : _a[0]; - if ((declaration == null ? void 0 : declaration.kind) === 305 /* EnumMember */) { + if ((declaration == null ? void 0 : declaration.kind) === 306 /* EnumMember */) { const constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== void 0) { displayParts.push(spacePart()); @@ -164726,12 +167121,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (declarationName && !hasAddedSymbolInfo) { const isExternalModuleDeclaration = isModuleWithStringLiteralName(resolvedNode) && hasSyntacticModifier(resolvedNode, 2 /* Ambient */); const shouldUseAliasName = symbol.name !== "default" && !isExternalModuleDeclaration; - const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKind( + const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKindWorker( typeChecker, resolvedSymbol, getSourceFileOfNode(resolvedNode), resolvedNode, declarationName, + type, semanticMeaning, shouldUseAliasName ? symbol : resolvedSymbol ); @@ -164747,17 +167143,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (symbol.declarations) { switch (symbol.declarations[0].kind) { - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: displayParts.push(keywordPart(95 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(145 /* NamespaceKeyword */)); break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: displayParts.push(keywordPart(95 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 64 /* EqualsToken */ : 90 /* DefaultKeyword */)); break; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: displayParts.push(keywordPart(95 /* ExportKeyword */)); break; default: @@ -164767,7 +167163,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} displayParts.push(spacePart()); addFullSymbolName(symbol); forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 270 /* ImportEqualsDeclaration */) { + if (declaration.kind === 271 /* ImportEqualsDeclaration */) { const importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); @@ -164799,7 +167195,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else { addPrefixForAnyFunctionOrVar(symbol, symbolKind); } - if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || isThisExpression) { + if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || symbolKind === "using" /* variableUsingElement */ || symbolKind === "await using" /* variableAwaitUsingElement */ || isThisExpression) { displayParts.push(punctuationPart(59 /* ColonToken */)); displayParts.push(spacePart()); if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== "index" /* indexSignatureElement */) { @@ -164835,9 +167231,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker); } if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 311 /* SourceFile */)) { + if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 312 /* SourceFile */)) { for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 225 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 226 /* BinaryExpression */) { continue; } const rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -164949,6 +167345,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case "let" /* letElement */: case "const" /* constElement */: case "constructor" /* constructorImplementationElement */: + case "using" /* variableUsingElement */: + case "await using" /* variableAwaitUsingElement */: displayParts.push(textOrKeywordPart(symbolKind2)); return; default: @@ -164984,19 +167382,32 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addRange(displayParts, typeParameterParts); } } + function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias) { + return getSymbolDisplayPartsDocumentationAndSymbolKindWorker( + typeChecker, + symbol, + sourceFile, + enclosingDeclaration, + location, + /*type*/ + void 0, + semanticMeaning, + alias + ); + } function isLocalVariableOrFunction(symbol) { if (symbol.parent) { return false; } return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 217 /* FunctionExpression */) { + if (declaration.kind === 218 /* FunctionExpression */) { return true; } - if (declaration.kind !== 259 /* VariableDeclaration */ && declaration.kind !== 261 /* FunctionDeclaration */) { + if (declaration.kind !== 260 /* VariableDeclaration */ && declaration.kind !== 262 /* FunctionDeclaration */) { return false; } for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 311 /* SourceFile */ || parent2.kind === 267 /* ModuleBlock */) { + if (parent2.kind === 312 /* SourceFile */ || parent2.kind === 268 /* ModuleBlock */) { return false; } } @@ -165170,16 +167581,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return newEnd !== end && (trailingTriviaOption === 2 /* Include */ || isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))) ? newEnd : end; } function isSeparator(node, candidate) { - return !!candidate && !!node.parent && (candidate.kind === 28 /* CommaToken */ || candidate.kind === 27 /* SemicolonToken */ && node.parent.kind === 209 /* ObjectLiteralExpression */); + return !!candidate && !!node.parent && (candidate.kind === 28 /* CommaToken */ || candidate.kind === 27 /* SemicolonToken */ && node.parent.kind === 210 /* ObjectLiteralExpression */); } function isThisTypeAnnotatable(containingFunction) { return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); } function updateJSDocHost(parent2) { - if (parent2.kind !== 218 /* ArrowFunction */) { + if (parent2.kind !== 219 /* ArrowFunction */) { return parent2; } - const jsDocNode = parent2.parent.kind === 171 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; + const jsDocNode = parent2.parent.kind === 172 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; jsDocNode.jsDoc = parent2.jsDoc; return jsDocNode; } @@ -165188,7 +167599,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } switch (oldTag.kind) { - case 347 /* JSDocParameterTag */: { + case 348 /* JSDocParameterTag */: { const oldParam = oldTag; const newParam = newTag; return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag( @@ -165202,14 +167613,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} oldParam.comment ) : void 0; } - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: return factory.createJSDocReturnTag( /*tagName*/ void 0, newTag.typeExpression, oldTag.comment ); - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return factory.createJSDocTypeTag( /*tagName*/ void 0, @@ -165570,7 +167981,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return !isInComment(sourceFile, position) && !isInString(sourceFile, position) && !isInTemplateString(sourceFile, position) && !isInJSXText(sourceFile, position); } function needSemicolonBetween(a, b) { - return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 166 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 167 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } function deleteNode(changes, sourceFile, node, options = { leadingTriviaOption: 1 /* IncludeAll */ }) { const startPosition = getAdjustedStartPosition(sourceFile, node, options); @@ -165614,7 +168025,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} leadingTriviaOption: 0 /* Exclude */, trailingTriviaOption: 0 /* Exclude */ }; - ChangeTracker = class { + ChangeTracker = class _ChangeTracker { /** Public for tests only. Other callers should use `ChangeTracker.with`. */ constructor(newLineCharacter, formatContext) { this.newLineCharacter = newLineCharacter; @@ -165625,10 +168036,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} this.deletedNodes = []; } static fromContext(context) { - return new ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext); + return new _ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext); } static with(context, cb) { - const tracker = ChangeTracker.fromContext(context); + const tracker = _ChangeTracker.fromContext(context); cb(tracker); return tracker.getChanges(); } @@ -165763,6 +168174,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} insertNodeBefore(sourceFile, before, newNode, blankLineBetween = false, options = {}) { this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween)); } + insertNodesBefore(sourceFile, before, newNodes, blankLineBetween = false, options = {}) { + this.insertNodesAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNodes, this.getOptionsForInsertNodeBefore(before, first(newNodes), blankLineBetween)); + } insertModifierAt(sourceFile, pos, modifier, options = {}) { this.insertNodeAt(sourceFile, pos, factory.createToken(modifier), options); } @@ -165835,7 +168249,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} endNode2 = first(node.parameters); } } else { - endNode2 = (node.kind === 259 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) ?? node.name; + endNode2 = (node.kind === 260 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) ?? node.name; } this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); return true; @@ -165983,18 +168397,18 @@ ${options.prefix}` : "\n" : options.prefix } getInsertNodeAfterOptionsWorker(node) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: case 11 /* StringLiteral */: case 80 /* Identifier */: return { prefix: ", " }; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return { suffix: "," + this.newLineCharacter }; case 95 /* ExportKeyword */: return { prefix: " " }; - case 168 /* Parameter */: + case 169 /* Parameter */: return {}; default: Debug.assert(isStatement(node) || isClassOrTypeElement(node)); @@ -166003,7 +168417,7 @@ ${options.prefix}` : "\n" : options.prefix } insertName(sourceFile, node, name) { Debug.assert(!node.name); - if (node.kind === 218 /* ArrowFunction */) { + if (node.kind === 219 /* ArrowFunction */) { const arrow = findChildOfKind(node, 39 /* EqualsGreaterThanToken */, sourceFile); const lparen = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile); if (lparen) { @@ -166013,12 +168427,12 @@ ${options.prefix}` : "\n" : options.prefix this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); this.replaceRange(sourceFile, arrow, factory.createToken(22 /* CloseParenToken */)); } - if (node.body.kind !== 240 /* Block */) { + if (node.body.kind !== 241 /* Block */) { this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(19 /* OpenBraceToken */), factory.createToken(107 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); this.insertNodesAt(sourceFile, node.body.end, [factory.createToken(27 /* SemicolonToken */), factory.createToken(20 /* CloseBraceToken */)], { joiner: " " }); } } else { - const pos = findChildOfKind(node, node.kind === 217 /* FunctionExpression */ ? 100 /* FunctionKeyword */ : 86 /* ClassKeyword */, sourceFile).end; + const pos = findChildOfKind(node, node.kind === 218 /* FunctionExpression */ ? 100 /* FunctionKeyword */ : 86 /* ClassKeyword */, sourceFile).end; this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); } } @@ -166253,7 +168667,7 @@ ${options.prefix}` : "\n" : options.prefix ((_deleteDeclaration) => { function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { switch (node.kind) { - case 168 /* Parameter */: { + case 169 /* Parameter */: { const oldFunction = node.parent; if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 21 /* OpenParenToken */, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); @@ -166262,29 +168676,29 @@ ${options.prefix}` : "\n" : options.prefix } break; } - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: const isFirstImport = sourceFile.imports.length && node === first(sourceFile.imports).parent || node === find(sourceFile.statements, isAnyImportSyntax); deleteNode(changes, sourceFile, node, { leadingTriviaOption: isFirstImport ? 0 /* Exclude */ : hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: const pattern = node.parent; - const preserveComma = pattern.kind === 206 /* ArrayBindingPattern */ && node !== last(pattern.elements); + const preserveComma = pattern.kind === 207 /* ArrayBindingPattern */ && node !== last(pattern.elements); if (preserveComma) { deleteNode(changes, sourceFile, node); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); break; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: const namedImports = node.parent; if (namedImports.elements.length === 1) { deleteImportBinding(changes, sourceFile, namedImports); @@ -166292,7 +168706,7 @@ ${options.prefix}` : "\n" : options.prefix deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: deleteImportBinding(changes, sourceFile, node); break; case 27 /* SemicolonToken */: @@ -166301,8 +168715,8 @@ ${options.prefix}` : "\n" : options.prefix case 100 /* FunctionKeyword */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); break; - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -166344,13 +168758,13 @@ ${options.prefix}` : "\n" : options.prefix const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { - const importDecl = getAncestor(node, 271 /* ImportDeclaration */); + const importDecl = getAncestor(node, 272 /* ImportDeclaration */); deleteNode(changes, sourceFile, importDecl); } } function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { const { parent: parent2 } = node; - if (parent2.kind === 298 /* CatchClause */) { + if (parent2.kind === 299 /* CatchClause */) { changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 21 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 22 /* CloseParenToken */, sourceFile)); return; } @@ -166360,14 +168774,14 @@ ${options.prefix}` : "\n" : options.prefix } const gp = parent2.parent; switch (gp.kind) { - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); break; - case 247 /* ForStatement */: + case 248 /* ForStatement */: deleteNode(changes, sourceFile, parent2); break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -166550,10 +168964,10 @@ ${options.prefix}` : "\n" : options.prefix function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 290 /* JsxAttribute */: - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: - case 284 /* JsxSelfClosingElement */: + case 291 /* JsxAttribute */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: + case 285 /* JsxSelfClosingElement */: return isKeyword(node.kind) || node.kind === 80 /* Identifier */; } } @@ -166754,7 +169168,7 @@ ${options.prefix}` : "\n" : options.prefix // src/services/formatting/rules.ts function getAllRules() { const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 164 /* LastToken */; token++) { + for (let token = 0 /* FirstToken */; token <= 165 /* LastToken */; token++) { if (token !== 1 /* EndOfFileToken */) { allTokens.push(token); } @@ -166765,12 +169179,12 @@ ${options.prefix}` : "\n" : options.prefix const anyToken = { tokens: allTokens, isSpecific: false }; const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(83 /* FirstKeyword */, 164 /* LastKeyword */); + const keywords = tokenRangeFromRange(83 /* FirstKeyword */, 165 /* LastKeyword */); const binaryOperators = tokenRangeFromRange(30 /* FirstBinaryOperator */, 79 /* LastBinaryOperator */); const binaryKeywordOperators = [ 103 /* InKeyword */, 104 /* InstanceOfKeyword */, - 164 /* OfKeyword */, + 165 /* OfKeyword */, 130 /* AsKeyword */, 142 /* IsKeyword */, 152 /* SatisfiesKeyword */ @@ -166899,7 +169313,7 @@ ${options.prefix}` : "\n" : options.prefix 153 /* SetKeyword */, 126 /* StaticKeyword */, 156 /* TypeKeyword */, - 160 /* FromKeyword */, + 161 /* FromKeyword */, 143 /* KeyOfKeyword */, 140 /* InferKeyword */ ], @@ -166910,7 +169324,7 @@ ${options.prefix}` : "\n" : options.prefix rule( "SpaceBeforeCertainTypeScriptKeywords", anyToken, - [96 /* ExtendsKeyword */, 119 /* ImplementsKeyword */, 160 /* FromKeyword */], + [96 /* ExtendsKeyword */, 119 /* ImplementsKeyword */, 161 /* FromKeyword */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */ ), @@ -167100,40 +169514,40 @@ ${options.prefix}` : "\n" : options.prefix return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; } function isForContext(context) { - return context.contextNode.kind === 247 /* ForStatement */; + return context.contextNode.kind === 248 /* ForStatement */; } function isNotForContext(context) { return !isForContext(context); } function isBinaryOpContext(context) { switch (context.contextNode.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return context.contextNode.operatorToken.kind !== 28 /* CommaToken */; - case 226 /* ConditionalExpression */: - case 193 /* ConditionalType */: - case 233 /* AsExpression */: - case 280 /* ExportSpecifier */: - case 275 /* ImportSpecifier */: - case 181 /* TypePredicate */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 237 /* SatisfiesExpression */: + case 227 /* ConditionalExpression */: + case 194 /* ConditionalType */: + case 234 /* AsExpression */: + case 281 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 182 /* TypePredicate */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 238 /* SatisfiesExpression */: return true; - case 207 /* BindingElement */: - case 264 /* TypeAliasDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 276 /* ExportAssignment */: - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 305 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 208 /* BindingElement */: + case 265 /* TypeAliasDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 277 /* ExportAssignment */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 306 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */; - case 248 /* ForInStatement */: - case 167 /* TypeParameter */: + case 249 /* ForInStatement */: + case 168 /* TypeParameter */: return context.currentTokenSpan.kind === 103 /* InKeyword */ || context.nextTokenSpan.kind === 103 /* InKeyword */ || context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */; - case 249 /* ForOfStatement */: - return context.currentTokenSpan.kind === 164 /* OfKeyword */ || context.nextTokenSpan.kind === 164 /* OfKeyword */; + case 250 /* ForOfStatement */: + return context.currentTokenSpan.kind === 165 /* OfKeyword */ || context.nextTokenSpan.kind === 165 /* OfKeyword */; } return false; } @@ -167145,16 +169559,16 @@ ${options.prefix}` : "\n" : options.prefix } function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; - return contextKind === 171 /* PropertyDeclaration */ || contextKind === 170 /* PropertySignature */ || contextKind === 168 /* Parameter */ || contextKind === 259 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); + return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } function isConditionalOperatorContext(context) { - return context.contextNode.kind === 226 /* ConditionalExpression */ || context.contextNode.kind === 193 /* ConditionalType */; + return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */; } function isSameLineTokenOrBeforeBlockContext(context) { return context.TokensAreOnSameLine() || isBeforeBlockContext(context); } function isBraceWrappedContext(context) { - return context.contextNode.kind === 205 /* ObjectBindingPattern */ || context.contextNode.kind === 199 /* MappedType */ || isSingleLineBlockContext(context); + return context.contextNode.kind === 206 /* ObjectBindingPattern */ || context.contextNode.kind === 200 /* MappedType */ || isSingleLineBlockContext(context); } function isBeforeMultilineBlockContext(context) { return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -167176,26 +169590,26 @@ ${options.prefix}` : "\n" : options.prefix return true; } switch (node.kind) { - case 240 /* Block */: - case 268 /* CaseBlock */: - case 209 /* ObjectLiteralExpression */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 210 /* ObjectLiteralExpression */: + case 268 /* ModuleBlock */: return true; } return false; } function isFunctionDeclContext(context) { switch (context.contextNode.kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 178 /* CallSignature */: - case 217 /* FunctionExpression */: - case 175 /* Constructor */: - case 218 /* ArrowFunction */: - case 263 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 179 /* CallSignature */: + case 218 /* FunctionExpression */: + case 176 /* Constructor */: + case 219 /* ArrowFunction */: + case 264 /* InterfaceDeclaration */: return true; } return false; @@ -167204,39 +169618,39 @@ ${options.prefix}` : "\n" : options.prefix return !isFunctionDeclContext(context); } function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 261 /* FunctionDeclaration */ || context.contextNode.kind === 217 /* FunctionExpression */; + return context.contextNode.kind === 262 /* FunctionDeclaration */ || context.contextNode.kind === 218 /* FunctionExpression */; } function isTypeScriptDeclWithBlockContext(context) { return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); } function nodeIsTypeScriptDeclWithBlockContext(node) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 186 /* TypeLiteral */: - case 266 /* ModuleDeclaration */: - case 277 /* ExportDeclaration */: - case 278 /* NamedExports */: - case 271 /* ImportDeclaration */: - case 274 /* NamedImports */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 187 /* TypeLiteral */: + case 267 /* ModuleDeclaration */: + case 278 /* ExportDeclaration */: + case 279 /* NamedExports */: + case 272 /* ImportDeclaration */: + case 275 /* NamedImports */: return true; } return false; } function isAfterCodeBlockContext(context) { switch (context.currentTokenParent.kind) { - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 298 /* CatchClause */: - case 267 /* ModuleBlock */: - case 254 /* SwitchStatement */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 299 /* CatchClause */: + case 268 /* ModuleBlock */: + case 255 /* SwitchStatement */: return true; - case 240 /* Block */: { + case 241 /* Block */: { const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 218 /* ArrowFunction */ && blockParent.kind !== 217 /* FunctionExpression */) { + if (!blockParent || blockParent.kind !== 219 /* ArrowFunction */ && blockParent.kind !== 218 /* FunctionExpression */) { return true; } } @@ -167245,29 +169659,29 @@ ${options.prefix}` : "\n" : options.prefix } function isControlDeclContext(context) { switch (context.contextNode.kind) { - case 244 /* IfStatement */: - case 254 /* SwitchStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 246 /* WhileStatement */: - case 257 /* TryStatement */: - case 245 /* DoStatement */: - case 253 /* WithStatement */: - case 298 /* CatchClause */: + case 245 /* IfStatement */: + case 255 /* SwitchStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 247 /* WhileStatement */: + case 258 /* TryStatement */: + case 246 /* DoStatement */: + case 254 /* WithStatement */: + case 299 /* CatchClause */: return true; default: return false; } } function isObjectContext(context) { - return context.contextNode.kind === 209 /* ObjectLiteralExpression */; + return context.contextNode.kind === 210 /* ObjectLiteralExpression */; } function isFunctionCallContext(context) { - return context.contextNode.kind === 212 /* CallExpression */; + return context.contextNode.kind === 213 /* CallExpression */; } function isNewContext(context) { - return context.contextNode.kind === 213 /* NewExpression */; + return context.contextNode.kind === 214 /* NewExpression */; } function isFunctionCallOrNewContext(context) { return isFunctionCallContext(context) || isNewContext(context); @@ -167282,10 +169696,10 @@ ${options.prefix}` : "\n" : options.prefix return context.nextTokenSpan.kind !== 22 /* CloseParenToken */; } function isArrowFunctionContext(context) { - return context.contextNode.kind === 218 /* ArrowFunction */; + return context.contextNode.kind === 219 /* ArrowFunction */; } function isImportTypeContext(context) { - return context.contextNode.kind === 204 /* ImportType */; + return context.contextNode.kind === 205 /* ImportType */; } function isNonJsxSameLineTokenContext(context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 12 /* JsxText */; @@ -167294,19 +169708,19 @@ ${options.prefix}` : "\n" : options.prefix return context.contextNode.kind !== 12 /* JsxText */; } function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 283 /* JsxElement */ && context.contextNode.kind !== 287 /* JsxFragment */; + return context.contextNode.kind !== 284 /* JsxElement */ && context.contextNode.kind !== 288 /* JsxFragment */; } function isJsxExpressionContext(context) { - return context.contextNode.kind === 293 /* JsxExpression */ || context.contextNode.kind === 292 /* JsxSpreadAttribute */; + return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 290 /* JsxAttribute */; + return context.nextTokenParent.kind === 291 /* JsxAttribute */; } function isJsxAttributeContext(context) { - return context.contextNode.kind === 290 /* JsxAttribute */; + return context.contextNode.kind === 291 /* JsxAttribute */; } function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 284 /* JsxSelfClosingElement */; + return context.contextNode.kind === 285 /* JsxSelfClosingElement */; } function isNotBeforeBlockInFunctionDeclarationContext(context) { return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); @@ -167318,44 +169732,44 @@ ${options.prefix}` : "\n" : options.prefix while (node && isExpression(node)) { node = node.parent; } - return node && node.kind === 169 /* Decorator */; + return node && node.kind === 170 /* Decorator */; } function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 260 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; + return context.currentTokenParent.kind === 261 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; } function isNotFormatOnEnter(context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; } function isModuleDeclContext(context) { - return context.contextNode.kind === 266 /* ModuleDeclaration */; + return context.contextNode.kind === 267 /* ModuleDeclaration */; } function isObjectTypeContext(context) { - return context.contextNode.kind === 186 /* TypeLiteral */; + return context.contextNode.kind === 187 /* TypeLiteral */; } function isConstructorSignatureContext(context) { - return context.contextNode.kind === 179 /* ConstructSignature */; + return context.contextNode.kind === 180 /* ConstructSignature */; } function isTypeArgumentOrParameterOrAssertion(token, parent2) { if (token.kind !== 30 /* LessThanToken */ && token.kind !== 32 /* GreaterThanToken */) { return false; } switch (parent2.kind) { - case 182 /* TypeReference */: - case 215 /* TypeAssertionExpression */: - case 264 /* TypeAliasDeclaration */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 232 /* ExpressionWithTypeArguments */: + case 183 /* TypeReference */: + case 216 /* TypeAssertionExpression */: + case 265 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 233 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -167365,31 +169779,31 @@ ${options.prefix}` : "\n" : options.prefix return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); } function isTypeAssertionContext(context) { - return context.contextNode.kind === 215 /* TypeAssertionExpression */; + return context.contextNode.kind === 216 /* TypeAssertionExpression */; } function isNonTypeAssertionContext(context) { return !isTypeAssertionContext(context); } function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 116 /* VoidKeyword */ && context.currentTokenParent.kind === 221 /* VoidExpression */; + return context.currentTokenSpan.kind === 116 /* VoidKeyword */ && context.currentTokenParent.kind === 222 /* VoidExpression */; } function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 228 /* YieldExpression */ && context.contextNode.expression !== void 0; + return context.contextNode.kind === 229 /* YieldExpression */ && context.contextNode.expression !== void 0; } function isNonNullAssertionContext(context) { - return context.contextNode.kind === 234 /* NonNullExpression */; + return context.contextNode.kind === 235 /* NonNullExpression */; } function isNotStatementConditionContext(context) { return !isStatementConditionContext(context); } function isStatementConditionContext(context) { switch (context.contextNode.kind) { - case 244 /* IfStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 245 /* IfStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return true; default: return false; @@ -167415,16 +169829,16 @@ ${options.prefix}` : "\n" : options.prefix if (startLine === endLine) { return nextTokenKind === 20 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; } - if (nextTokenKind === 239 /* SemicolonClassElement */ || nextTokenKind === 27 /* SemicolonToken */) { + if (nextTokenKind === 240 /* SemicolonClassElement */ || nextTokenKind === 27 /* SemicolonToken */) { return false; } - if (context.contextNode.kind === 263 /* InterfaceDeclaration */ || context.contextNode.kind === 264 /* TypeAliasDeclaration */) { + if (context.contextNode.kind === 264 /* InterfaceDeclaration */ || context.contextNode.kind === 265 /* TypeAliasDeclaration */) { return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 21 /* OpenParenToken */; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; } - return context.currentTokenParent.kind !== 247 /* ForStatement */ && context.currentTokenParent.kind !== 241 /* EmptyStatement */ && context.currentTokenParent.kind !== 239 /* SemicolonClassElement */ && nextTokenKind !== 23 /* OpenBracketToken */ && nextTokenKind !== 21 /* OpenParenToken */ && nextTokenKind !== 40 /* PlusToken */ && nextTokenKind !== 41 /* MinusToken */ && nextTokenKind !== 44 /* SlashToken */ && nextTokenKind !== 14 /* RegularExpressionLiteral */ && nextTokenKind !== 28 /* CommaToken */ && nextTokenKind !== 227 /* TemplateExpression */ && nextTokenKind !== 16 /* TemplateHead */ && nextTokenKind !== 15 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 25 /* DotToken */; + return context.currentTokenParent.kind !== 248 /* ForStatement */ && context.currentTokenParent.kind !== 242 /* EmptyStatement */ && context.currentTokenParent.kind !== 240 /* SemicolonClassElement */ && nextTokenKind !== 23 /* OpenBracketToken */ && nextTokenKind !== 21 /* OpenParenToken */ && nextTokenKind !== 40 /* PlusToken */ && nextTokenKind !== 41 /* MinusToken */ && nextTokenKind !== 44 /* SlashToken */ && nextTokenKind !== 14 /* RegularExpressionLiteral */ && nextTokenKind !== 28 /* CommaToken */ && nextTokenKind !== 228 /* TemplateExpression */ && nextTokenKind !== 16 /* TemplateHead */ && nextTokenKind !== 15 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 25 /* DotToken */; } function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); @@ -167505,7 +169919,7 @@ ${options.prefix}` : "\n" : options.prefix return map2; } function getRuleBucketIndex(row, column) { - Debug.assert(row <= 164 /* LastKeyword */ && column <= 164 /* LastKeyword */, "Must compute formatting context from tokens"); + Debug.assert(row <= 165 /* LastKeyword */ && column <= 165 /* LastKeyword */, "Must compute formatting context from tokens"); return row * mapRowLength + column; } function addRule(rules, rule2, specificTokens, constructionState, rulesBucketIndex) { @@ -167535,7 +169949,7 @@ ${options.prefix}` : "\n" : options.prefix init_ts_formatting(); maskBitSize = 5; mask = 31; - mapRowLength = 164 /* LastToken */ + 1; + mapRowLength = 165 /* LastToken */ + 1; RulesPosition = ((RulesPosition2) => { RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; @@ -167627,17 +170041,17 @@ ${options.prefix}` : "\n" : options.prefix } function isListElement(parent2, node) { switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: return rangeContainsRange(parent2.members, node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const body = parent2.body; - return !!body && body.kind === 267 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 311 /* SourceFile */: - case 240 /* Block */: - case 267 /* ModuleBlock */: + return !!body && body.kind === 268 /* ModuleBlock */ && rangeContainsRange(body.statements, node); + case 312 /* SourceFile */: + case 241 /* Block */: + case 268 /* ModuleBlock */: return rangeContainsRange(parent2.statements, node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return rangeContainsRange(parent2.block.statements, node); } return false; @@ -167669,11 +170083,11 @@ ${options.prefix}` : "\n" : options.prefix if (index >= sorted.length) { return false; } - const error = sorted[index]; - if (r.end <= error.start) { + const error2 = sorted[index]; + if (r.end <= error2.start) { return false; } - if (startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { + if (startEndOverlapsWithStartEnd(r.pos, r.end, error2.start, error2.start + error2.length)) { return true; } index++; @@ -167778,7 +170192,8 @@ ${options.prefix}` : "\n" : options.prefix } processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta); } - if (!formattingScanner.isOnToken()) { + const remainingTrivia = formattingScanner.getCurrentLeadingTrivia(); + if (remainingTrivia) { const indentation = SmartIndenter.nodeWillIndentChild( options, enclosingNode, @@ -167788,25 +170203,30 @@ ${options.prefix}` : "\n" : options.prefix /*indentByDefault*/ false ) ? initialIndentation + options.indentSize : initialIndentation; - const leadingTrivia = formattingScanner.getCurrentLeadingTrivia(); - if (leadingTrivia) { - indentTriviaItems( - leadingTrivia, - indentation, - /*indentNextTokenOrTrivia*/ - false, - (item) => processRange( + indentTriviaItems( + remainingTrivia, + indentation, + /*indentNextTokenOrTrivia*/ + true, + (item) => { + processRange( item, sourceFile.getLineAndCharacterOfPosition(item.pos), enclosingNode, enclosingNode, /*dynamicIndentation*/ void 0 - ) - ); - if (options.trimTrailingWhitespace !== false) { - trimTrailingWhitespacesForRemainingRange(leadingTrivia); + ); + insertIndentation( + item.pos, + indentation, + /*lineAdded*/ + false + ); } + ); + if (options.trimTrailingWhitespace !== false) { + trimTrailingWhitespacesForRemainingRange(remainingTrivia); } } if (previousRange && formattingScanner.getTokenFullStart() >= originalRange.end) { @@ -167869,24 +170289,24 @@ ${options.prefix}` : "\n" : options.prefix return modifier.kind; } switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return 86 /* ClassKeyword */; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return 120 /* InterfaceKeyword */; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return 100 /* FunctionKeyword */; - case 265 /* EnumDeclaration */: - return 265 /* EnumDeclaration */; - case 176 /* GetAccessor */: + case 266 /* EnumDeclaration */: + return 266 /* EnumDeclaration */; + case 177 /* GetAccessor */: return 139 /* GetKeyword */; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return 153 /* SetKeyword */; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: if (node.asteriskToken) { return 42 /* AsteriskToken */; } - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: const name = getNameOfDeclaration(node); if (name) { return name.kind; @@ -167936,15 +170356,15 @@ ${options.prefix}` : "\n" : options.prefix case 44 /* SlashToken */: case 32 /* GreaterThanToken */: switch (container.kind) { - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: + case 285 /* JsxSelfClosingElement */: return false; } break; case 23 /* OpenBracketToken */: case 24 /* CloseBracketToken */: - if (container.kind !== 199 /* MappedType */) { + if (container.kind !== 200 /* MappedType */) { return false; } break; @@ -168045,11 +170465,11 @@ ${options.prefix}` : "\n" : options.prefix return inheritedIndentation; } } - const effectiveParentStartLine = child.kind === 169 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + const effectiveParentStartLine = child.kind === 170 /* Decorator */ ? childStartLine : undecoratedParentStartLine; const childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent2.kind === 208 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent2.kind === 209 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -168470,50 +170890,50 @@ ${options.prefix}` : "\n" : options.prefix } function getOpenTokenForList(node, list) { switch (node.kind) { - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 218 /* ArrowFunction */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 219 /* ArrowFunction */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (node.typeParameters === list) { return 30 /* LessThanToken */; } else if (node.parameters === list) { return 21 /* OpenParenToken */; } break; - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: if (node.typeArguments === list) { return 30 /* LessThanToken */; } else if (node.arguments === list) { return 21 /* OpenParenToken */; } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: if (node.typeParameters === list) { return 30 /* LessThanToken */; } break; - case 182 /* TypeReference */: - case 214 /* TaggedTemplateExpression */: - case 185 /* TypeQuery */: - case 232 /* ExpressionWithTypeArguments */: - case 204 /* ImportType */: + case 183 /* TypeReference */: + case 215 /* TaggedTemplateExpression */: + case 186 /* TypeQuery */: + case 233 /* ExpressionWithTypeArguments */: + case 205 /* ImportType */: if (node.typeArguments === list) { return 30 /* LessThanToken */; } break; - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return 19 /* OpenBraceToken */; } return 0 /* Unknown */; @@ -168613,11 +171033,11 @@ ${options.prefix}` : "\n" : options.prefix } const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 19 /* OpenBraceToken */ && currentToken.parent.kind === 209 /* ObjectLiteralExpression */; + const isObjectLiteral = currentToken.kind === 19 /* OpenBraceToken */ && currentToken.parent.kind === 210 /* ObjectLiteralExpression */; if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { return getBlockIndent(sourceFile, position, options); } - if (precedingToken.kind === 28 /* CommaToken */ && precedingToken.parent.kind !== 225 /* BinaryExpression */) { + if (precedingToken.kind === 28 /* CommaToken */ && precedingToken.parent.kind !== 226 /* BinaryExpression */) { const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { return actualIndentation; @@ -168625,7 +171045,7 @@ ${options.prefix}` : "\n" : options.prefix } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [217 /* FunctionExpression */, 218 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -168767,7 +171187,7 @@ ${options.prefix}` : "\n" : options.prefix } } function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 311 /* SourceFile */ || !parentAndChildShareLine); + const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 312 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -168805,7 +171225,7 @@ ${options.prefix}` : "\n" : options.prefix } SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 244 /* IfStatement */ && parent2.elseStatement === child) { + if (parent2.kind === 245 /* IfStatement */ && parent2.elseStatement === child) { const elseKeyword = findChildOfKind(parent2, 93 /* ElseKeyword */, sourceFile); Debug.assert(elseKeyword !== void 0); const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -168856,42 +171276,42 @@ ${options.prefix}` : "\n" : options.prefix } function getListByRange(start, end, node, sourceFile) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return getList(node.typeArguments); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return getList(node.properties); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getList(node.elements); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return getList(node.members); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: return getList(node.typeParameters) || getList(node.parameters); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return getList(node.parameters); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 351 /* JSDocTemplateTag */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 352 /* JSDocTemplateTag */: return getList(node.typeParameters); - case 213 /* NewExpression */: - case 212 /* CallExpression */: + case 214 /* NewExpression */: + case 213 /* CallExpression */: return getList(node.typeArguments) || getList(node.arguments); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return getList(node.declarations); - case 274 /* NamedImports */: - case 278 /* NamedExports */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: return getList(node.elements); - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return getList(node.elements); } function getList(list) { @@ -168914,7 +171334,7 @@ ${options.prefix}` : "\n" : options.prefix return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); } function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 260 /* VariableDeclarationList */) { + if (node.parent && node.parent.kind === 261 /* VariableDeclarationList */) { return -1 /* Unknown */; } const containingList = getContainingList(node, sourceFile); @@ -168975,96 +171395,96 @@ ${options.prefix}` : "\n" : options.prefix function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { const childKind = child ? child.kind : 0 /* Unknown */; switch (parent2.kind) { - case 243 /* ExpressionStatement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 208 /* ArrayLiteralExpression */: - case 240 /* Block */: - case 267 /* ModuleBlock */: - case 209 /* ObjectLiteralExpression */: - case 186 /* TypeLiteral */: - case 199 /* MappedType */: - case 188 /* TupleType */: - case 216 /* ParenthesizedExpression */: - case 210 /* PropertyAccessExpression */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 242 /* VariableStatement */: - case 276 /* ExportAssignment */: - case 252 /* ReturnStatement */: - case 226 /* ConditionalExpression */: - case 206 /* ArrayBindingPattern */: - case 205 /* ObjectBindingPattern */: - case 285 /* JsxOpeningElement */: - case 288 /* JsxOpeningFragment */: - case 284 /* JsxSelfClosingElement */: - case 293 /* JsxExpression */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 168 /* Parameter */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 195 /* ParenthesizedType */: - case 214 /* TaggedTemplateExpression */: - case 222 /* AwaitExpression */: - case 278 /* NamedExports */: - case 274 /* NamedImports */: - case 280 /* ExportSpecifier */: - case 275 /* ImportSpecifier */: - case 171 /* PropertyDeclaration */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 244 /* ExpressionStatement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 209 /* ArrayLiteralExpression */: + case 241 /* Block */: + case 268 /* ModuleBlock */: + case 210 /* ObjectLiteralExpression */: + case 187 /* TypeLiteral */: + case 200 /* MappedType */: + case 189 /* TupleType */: + case 217 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 243 /* VariableStatement */: + case 277 /* ExportAssignment */: + case 253 /* ReturnStatement */: + case 227 /* ConditionalExpression */: + case 207 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 286 /* JsxOpeningElement */: + case 289 /* JsxOpeningFragment */: + case 285 /* JsxSelfClosingElement */: + case 294 /* JsxExpression */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 169 /* Parameter */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 196 /* ParenthesizedType */: + case 215 /* TaggedTemplateExpression */: + case 223 /* AwaitExpression */: + case 279 /* NamedExports */: + case 275 /* NamedImports */: + case 281 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 172 /* PropertyDeclaration */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return true; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return settings.indentSwitchCase ?? true; - case 259 /* VariableDeclaration */: - case 302 /* PropertyAssignment */: - case 225 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 209 /* ObjectLiteralExpression */) { + case 260 /* VariableDeclaration */: + case 303 /* PropertyAssignment */: + case 226 /* BinaryExpression */: + if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 210 /* ObjectLiteralExpression */) { return rangeIsOnOneLine(sourceFile, child); } - if (parent2.kind === 225 /* BinaryExpression */ && sourceFile && child && childKind === 283 /* JsxElement */) { + if (parent2.kind === 226 /* BinaryExpression */ && sourceFile && child && childKind === 284 /* JsxElement */) { const parentStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, parent2.pos)).line; const childStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, child.pos)).line; return parentStartLine !== childStartLine; } - if (parent2.kind !== 225 /* BinaryExpression */) { + if (parent2.kind !== 226 /* BinaryExpression */) { return true; } break; - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 244 /* IfStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - return childKind !== 240 /* Block */; - case 218 /* ArrowFunction */: - if (sourceFile && childKind === 216 /* ParenthesizedExpression */) { + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 245 /* IfStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + return childKind !== 241 /* Block */; + case 219 /* ArrowFunction */: + if (sourceFile && childKind === 217 /* ParenthesizedExpression */) { return rangeIsOnOneLine(sourceFile, child); } - return childKind !== 240 /* Block */; - case 277 /* ExportDeclaration */: - return childKind !== 278 /* NamedExports */; - case 271 /* ImportDeclaration */: - return childKind !== 272 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 274 /* NamedImports */; - case 283 /* JsxElement */: - return childKind !== 286 /* JsxClosingElement */; - case 287 /* JsxFragment */: - return childKind !== 289 /* JsxClosingFragment */; - case 192 /* IntersectionType */: - case 191 /* UnionType */: - if (childKind === 186 /* TypeLiteral */ || childKind === 188 /* TupleType */) { + return childKind !== 241 /* Block */; + case 278 /* ExportDeclaration */: + return childKind !== 279 /* NamedExports */; + case 272 /* ImportDeclaration */: + return childKind !== 273 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 275 /* NamedImports */; + case 284 /* JsxElement */: + return childKind !== 287 /* JsxClosingElement */; + case 288 /* JsxFragment */: + return childKind !== 290 /* JsxClosingFragment */; + case 193 /* IntersectionType */: + case 192 /* UnionType */: + if (childKind === 187 /* TypeLiteral */ || childKind === 189 /* TupleType */) { return false; } break; @@ -169074,11 +171494,11 @@ ${options.prefix}` : "\n" : options.prefix SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; function isControlFlowEndingStatement(kind, parent2) { switch (kind) { - case 252 /* ReturnStatement */: - case 256 /* ThrowStatement */: - case 250 /* ContinueStatement */: - case 251 /* BreakStatement */: - return parent2.kind !== 240 /* Block */; + case 253 /* ReturnStatement */: + case 257 /* ThrowStatement */: + case 251 /* ContinueStatement */: + case 252 /* BreakStatement */: + return parent2.kind !== 241 /* Block */; default: return false; } @@ -169188,11 +171608,11 @@ ${options.prefix}` : "\n" : options.prefix function getTypeScriptVersion() { return typeScriptVersion2 ?? (typeScriptVersion2 = new Version(version)); } - function formatDeprecationMessage(name, error, errorAfter, since, message) { - let deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: "; + function formatDeprecationMessage(name, error2, errorAfter, since, message) { + let deprecationMessage = error2 ? "DeprecationError: " : "DeprecationWarning: "; deprecationMessage += `'${name}' `; deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated"; - deprecationMessage += error ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : "."; + deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : "."; deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : ""; return deprecationMessage; } @@ -169230,9 +171650,9 @@ ${options.prefix}` : "\n" : options.prefix const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter; const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter; const since = typeof options.since === "string" ? new Version(options.since) : options.since ?? warnAfter; - const error = options.error || errorAfter && version2.compareTo(errorAfter) >= 0; + const error2 = options.error || errorAfter && version2.compareTo(errorAfter) >= 0; const warn = !warnAfter || version2.compareTo(warnAfter) >= 0; - return error ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop; + return error2 ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop; } function wrapFunction(deprecation, func) { return function() { @@ -169312,9 +171732,9 @@ ${options.prefix}` : "\n" : options.prefix init_ts5(); init_deprecate(); addObjectAllocatorPatcher((objectAllocator2) => { - const Identifier74 = objectAllocator2.getIdentifierConstructor(); - if (!hasProperty(Identifier74.prototype, "originalKeywordKind")) { - Object.defineProperty(Identifier74.prototype, "originalKeywordKind", { + const Identifier78 = objectAllocator2.getIdentifierConstructor(); + if (!hasProperty(Identifier78.prototype, "originalKeywordKind")) { + Object.defineProperty(Identifier78.prototype, "originalKeywordKind", { get: deprecate(function() { return identifierToKeywordKind(this); }, { @@ -169326,10 +171746,10 @@ ${options.prefix}` : "\n" : options.prefix }) }); } - if (!hasProperty(Identifier74.prototype, "isInJSDocNamespace")) { - Object.defineProperty(Identifier74.prototype, "isInJSDocNamespace", { + if (!hasProperty(Identifier78.prototype, "isInJSDocNamespace")) { + Object.defineProperty(Identifier78.prototype, "isInJSDocNamespace", { get: deprecate(function() { - return this.flags & 2048 /* IdentifierIsInJSDocNamespace */ ? true : void 0; + return this.flags & 4096 /* IdentifierIsInJSDocNamespace */ ? true : void 0; }, { name: "isInJSDocNamespace", since: "5.0", @@ -169881,7 +172301,7 @@ ${options.prefix}` : "\n" : options.prefix "use strict"; init_ts7(); init_ts_server3(); - ThrottledOperations = class { + ThrottledOperations = class _ThrottledOperations { constructor(host, logger) { this.host = host; this.pendingTimeouts = /* @__PURE__ */ new Map(); @@ -169898,7 +172318,7 @@ ${options.prefix}` : "\n" : options.prefix if (pendingTimeout) { this.host.clearTimeout(pendingTimeout); } - this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, operationId, this, cb)); + this.pendingTimeouts.set(operationId, this.host.setTimeout(_ThrottledOperations.run, delay, operationId, this, cb)); if (this.logger) { this.logger.info(`Scheduled: ${operationId}${pendingTimeout ? ", Cancelled earlier one" : ""}`); } @@ -169921,7 +172341,7 @@ ${options.prefix}` : "\n" : options.prefix (_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation(); } }; - GcTimer = class { + GcTimer = class _GcTimer { constructor(host, delay, logger) { this.host = host; this.delay = delay; @@ -169931,7 +172351,7 @@ ${options.prefix}` : "\n" : options.prefix if (!this.host.gc || this.timerId !== void 0) { return; } - this.timerId = this.host.setTimeout(GcTimer.run, this.delay, this); + this.timerId = this.host.setTimeout(_GcTimer.run, this.delay, this); } static run(self) { var _a, _b; @@ -170927,7 +173347,7 @@ ${options.prefix}` : "\n" : options.prefix ProjectKind2[ProjectKind2["Auxiliary"] = 4] = "Auxiliary"; return ProjectKind2; })(ProjectKind || {}); - Project3 = class { + Project3 = class _Project { /** @internal */ constructor(projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, watchOptions, directoryStructureHost, currentDirectory) { this.projectKind = projectKind; @@ -171044,7 +173464,7 @@ ${options.prefix}` : "\n" : options.prefix return hasOneOrMoreJsAndNoTsFiles(this); } static resolveModule(moduleName, initialDir, host, log) { - return Project3.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule; + return _Project.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule; } /** @internal */ static importServicePluginSync(pluginConfigEntry, searchPaths, host, log) { @@ -171421,6 +173841,16 @@ ${options.prefix}` : "\n" : options.prefix true ); } + /** @internal */ + cleanupProgram() { + if (this.program) { + for (const f of this.program.getSourceFiles()) { + this.detachScriptInfoIfNotRoot(f.fileName); + } + this.program.forEachResolvedProjectReference((ref) => this.detachScriptInfoFromProject(ref.sourceFile.fileName)); + this.program = void 0; + } + } disableLanguageService(lastFileExceededProgramSize) { if (!this.languageServiceEnabled) { return; @@ -171428,6 +173858,7 @@ ${options.prefix}` : "\n" : options.prefix Debug.assert(this.projectService.serverMode !== 2 /* Syntactic */); this.languageService.cleanupSemanticCache(); this.languageServiceEnabled = false; + this.cleanupProgram(); this.lastFileExceededProgramSize = lastFileExceededProgramSize; this.builderState = void 0; if (this.autoImportProviderHost) { @@ -171436,6 +173867,7 @@ ${options.prefix}` : "\n" : options.prefix this.autoImportProviderHost = void 0; this.resolutionCache.closeTypeRootsWatch(); this.clearGeneratedFileWatch(); + this.projectService.verifyDocumentRegistry(); this.projectService.onUpdateLanguageServiceStateForProject( this, /*languageServiceEnabled*/ @@ -171479,12 +173911,7 @@ ${options.prefix}` : "\n" : options.prefix close() { this.projectService.typingsCache.onProjectClosed(this); this.closeWatchingTypingLocations(); - if (this.program) { - for (const f of this.program.getSourceFiles()) { - this.detachScriptInfoIfNotRoot(f.fileName); - } - this.program.forEachResolvedProjectReference((ref) => this.detachScriptInfoFromProject(ref.sourceFile.fileName)); - } + this.cleanupProgram(); forEach(this.externalFiles, (externalFile) => this.detachScriptInfoIfNotRoot(externalFile)); for (const root of this.rootFiles) { root.detachFromProject(this); @@ -171862,6 +174289,7 @@ ${options.prefix}` : "\n" : options.prefix updateGraphWorker() { var _a, _b; const oldProgram = this.languageService.getCurrentProgram(); + Debug.assert(oldProgram === this.program); Debug.assert(!this.isClosed(), "Called update graph worker of closed project"); this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`); const start = timestamp(); @@ -171992,6 +174420,7 @@ ${options.prefix}` : "\n" : options.prefix } else if (this.program !== oldProgram) { this.writeLog(`Different program with same set of files`); } + this.projectService.verifyDocumentRegistry(); return hasNewProgram; } /** @internal */ @@ -172388,7 +174817,7 @@ ${options.prefix}` : "\n" : options.prefix return this.projectService.includePackageJsonAutoImports(); } /** @internal */ - getModuleResolutionHostForAutoImportProvider() { + getHostForAutoImportProvider() { var _a, _b; if (this.program) { return { @@ -172399,7 +174828,8 @@ ${options.prefix}` : "\n" : options.prefix readFile: this.projectService.host.readFile.bind(this.projectService.host), getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host), trace: (_b = this.projectService.host.trace) == null ? void 0 : _b.bind(this.projectService.host), - useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames() + useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(), + readDirectory: this.projectService.host.readDirectory.bind(this.projectService.host) }; } return this.projectService.host; @@ -172427,7 +174857,7 @@ ${options.prefix}` : "\n" : options.prefix if (dependencySelection) { (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "getPackageJsonAutoImportProvider"); const start = timestamp(); - this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getModuleResolutionHostForAutoImportProvider(), this.documentRegistry); + this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getHostForAutoImportProvider(), this.documentRegistry); if (this.autoImportProviderHost) { updateProjectIfDirty(this.autoImportProviderHost); this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", timestamp() - start); @@ -172614,12 +175044,11 @@ ${options.prefix}` : "\n" : options.prefix isOrphan() { return true; } - /** @internal */ scheduleInvalidateResolutionsOfFailedLookupLocations() { return; } }; - _AutoImportProviderProject = class extends Project3 { + _AutoImportProviderProject = class _AutoImportProviderProject extends Project3 { /** @internal */ constructor(hostProject, initialRootNames, documentRegistry, compilerOptions) { super( @@ -172644,7 +175073,7 @@ ${options.prefix}` : "\n" : options.prefix this.getParsedCommandLine = maybeBind(this.hostProject, this.hostProject.getParsedCommandLine); } /** @internal */ - static getRootFileNames(dependencySelection, hostProject, moduleResolutionHost, compilerOptions) { + static getRootFileNames(dependencySelection, hostProject, host, compilerOptions) { var _a, _b; if (!dependencySelection) { return emptyArray; @@ -172674,7 +175103,7 @@ ${options.prefix}` : "\n" : options.prefix name, hostProject.currentDirectory, compilerOptions, - moduleResolutionHost, + host, program.getModuleResolutionCache() ); if (packageJson) { @@ -172691,7 +175120,7 @@ ${options.prefix}` : "\n" : options.prefix `@types/${name}`, directory, compilerOptions, - moduleResolutionHost, + host, program.getModuleResolutionCache() ); if (typesPackageJson) { @@ -172731,12 +175160,12 @@ ${options.prefix}` : "\n" : options.prefix const entrypoints = getEntrypointsFromPackageJsonInfo( packageJson, compilerOptions, - moduleResolutionHost, + host, program2.getModuleResolutionCache(), resolveJs ); if (entrypoints) { - const real = (_a2 = moduleResolutionHost.realpath) == null ? void 0 : _a2.call(moduleResolutionHost, packageJson.packageDirectory); + const real = (_a2 = host.realpath) == null ? void 0 : _a2.call(host, packageJson.packageDirectory); const isSymlink = real && real !== packageJson.packageDirectory; if (isSymlink) { symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, { @@ -172754,7 +175183,7 @@ ${options.prefix}` : "\n" : options.prefix } } /** @internal */ - static create(dependencySelection, hostProject, moduleResolutionHost, documentRegistry) { + static create(dependencySelection, hostProject, host, documentRegistry) { if (dependencySelection === 0 /* Off */) { return void 0; } @@ -172762,7 +175191,7 @@ ${options.prefix}` : "\n" : options.prefix ...hostProject.getCompilerOptions(), ...this.compilerOptionsOverrides }; - const rootNames = this.getRootFileNames(dependencySelection, hostProject, moduleResolutionHost, compilerOptions); + const rootNames = this.getRootFileNames(dependencySelection, hostProject, host, compilerOptions); if (!rootNames.length) { return void 0; } @@ -172781,7 +175210,7 @@ ${options.prefix}` : "\n" : options.prefix rootFileNames = _AutoImportProviderProject.getRootFileNames( this.hostProject.includePackageJsonAutoImports(), this.hostProject, - this.hostProject.getModuleResolutionHostForAutoImportProvider(), + this.hostProject.getHostForAutoImportProvider(), this.getCompilationSettings() ); } @@ -172820,7 +175249,7 @@ ${options.prefix}` : "\n" : options.prefix onPackageJsonChange() { throw new Error("package.json changes should be notified on an AutoImportProvider's host project"); } - getModuleResolutionHostForAutoImportProvider() { + getHostForAutoImportProvider() { throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead."); } getProjectReferences() { @@ -172843,11 +175272,10 @@ ${options.prefix}` : "\n" : options.prefix return (_a = this.hostProject.getCurrentProgram()) == null ? void 0 : _a.getModuleResolutionCache(); } }; - AutoImportProviderProject = _AutoImportProviderProject; /** @internal */ - AutoImportProviderProject.maxDependencies = 10; + _AutoImportProviderProject.maxDependencies = 10; /** @internal */ - AutoImportProviderProject.compilerOptionsOverrides = { + _AutoImportProviderProject.compilerOptionsOverrides = { diagnostics: false, skipLibCheck: true, sourceMap: false, @@ -172855,6 +175283,7 @@ ${options.prefix}` : "\n" : options.prefix lib: emptyArray, noLib: true }; + AutoImportProviderProject = _AutoImportProviderProject; ConfiguredProject2 = class extends Project3 { /** @internal */ constructor(configFileName, canonicalConfigFilePath, projectService, documentRegistry, cachedDirectoryStructureHost) { @@ -173377,7 +175806,7 @@ ${options.prefix}` : "\n" : options.prefix defaultTypeSafeList = { "jquery": { // jquery files can have names like "jquery-1.10.2.min.js" (or "jquery.intellisense.js") - match: /jquery(-[\d\.]+)?(\.intellisense)?(\.min)?\.js$/i, + match: /jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i, types: ["jquery"] }, "WinJS": { @@ -173442,7 +175871,7 @@ ${options.prefix}` : "\n" : options.prefix ProjectReferenceProjectLoadKind2[ProjectReferenceProjectLoadKind2["FindCreateLoad"] = 2] = "FindCreateLoad"; return ProjectReferenceProjectLoadKind2; })(ProjectReferenceProjectLoadKind || {}); - _ProjectService = class { + _ProjectService = class _ProjectService { constructor(opts) { /** * Container of all known scripts @@ -173520,6 +175949,9 @@ ${options.prefix}` : "\n" : options.prefix this.sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map(); /** @internal */ this.extendedConfigCache = /* @__PURE__ */ new Map(); + /** @internal */ + this.verifyDocumentRegistry = noop; + var _a; this.host = opts.host; this.logger = opts.logger; this.cancellationToken = opts.cancellationToken; @@ -173567,6 +175999,7 @@ ${options.prefix}` : "\n" : options.prefix watchFile: returnNoopFileWatcher, watchDirectory: returnNoopFileWatcher } : getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); + (_a = opts.incrementalVerifier) == null ? void 0 : _a.call(opts, this); } toPath(fileName) { return toPath(fileName, this.currentDirectory, this.toCanonicalFileName); @@ -174895,6 +177328,7 @@ ${options.prefix}` : "\n" : options.prefix /*ensureSynchronized*/ false ).cleanupSemanticCache(); + project.cleanupProgram(); project.markAsDirty(); } sendConfigFileDiagEvent(project, triggerFile) { @@ -176100,7 +178534,7 @@ Dynamic files must always be opened with service's current directory or service } } if (!exclude) { - if (/^.+[\.-]min\.js$/.test(normalizedNames[i])) { + if (/^.+[.-]min\.js$/.test(normalizedNames[i])) { excludedFiles.push(normalizedNames[i]); } else { filesToKeep.push(proj.rootFiles[i]); @@ -176420,9 +178854,9 @@ Dynamic files must always be opened with service's current directory or service return this.incompleteCompletionsCache || (this.incompleteCompletionsCache = createIncompleteCompletionsCache()); } }; - ProjectService3 = _ProjectService; /** Makes a filename safe to insert in a RegExp */ - ProjectService3.filenameEscapeRegexp = /[-\/\\^$*+?.()|[\]{}]/g; + _ProjectService.filenameEscapeRegexp = /[-/\\^$*+?.()|[\]{}]/g; + ProjectService3 = _ProjectService; } }); @@ -177158,7 +179592,7 @@ ${json}${newLine}`; "documentHighlights" /* DocumentHighlights */, "documentHighlights-full" /* DocumentHighlightsFull */ ]; - Session3 = class { + Session3 = class _Session { constructor(opts) { this.changeSeq = 0; this.handlers = new Map(Object.entries({ @@ -177833,7 +180267,8 @@ ${json}${newLine}`; allowLocalPluginLoads: opts.allowLocalPluginLoads, typesMapLocation: opts.typesMapLocation, serverMode: opts.serverMode, - session: this + session: this, + incrementalVerifier: opts.incrementalVerifier }; this.projectService = new ProjectService3(settings); this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)); @@ -178153,6 +180588,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter /*ensureSynchronized*/ false ).cleanupSemanticCache(); + p.cleanupProgram(); } } cleanup() { @@ -178259,7 +180695,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const { file, project } = this.getFileAndProject(args); const position = this.getPositionInFile(args, file); const definitions = this.mapDefinitionInfoLocations(project.getLanguageService().getDefinitionAtPosition(file, position) || emptyArray2, project); - return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(Session3.mapToOriginalLocation); + return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(_Session.mapToOriginalLocation); } mapDefinitionInfoLocations(definitions, project) { return definitions.map((info) => { @@ -178296,7 +180732,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter }; } return { - definitions: definitions.map(Session3.mapToOriginalLocation), + definitions: definitions.map(_Session.mapToOriginalLocation), textSpan }; } @@ -178418,7 +180854,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter } const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); const symbol = program.getTypeChecker().getSymbolAtLocation(initialNode); - const importSpecifier = symbol && getDeclarationOfKind(symbol, 275 /* ImportSpecifier */); + const importSpecifier = symbol && getDeclarationOfKind(symbol, 276 /* ImportSpecifier */); if (!importSpecifier) return void 0; const nameToSearch = ((_a2 = importSpecifier.propertyName) == null ? void 0 : _a2.text) || importSpecifier.name.text; @@ -178553,7 +180989,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const { file, project } = this.getFileAndProject(args); const position = this.getPositionInFile(args, file); const implementations = this.mapImplementationLocations(project.getLanguageService().getImplementationAtPosition(file, position) || emptyArray2, project); - return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(Session3.mapToOriginalLocation); + return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(_Session.mapToOriginalLocation); } getSyntacticDiagnosticsSync(args) { const { configFile } = this.getConfigFileAndProject(args); @@ -178632,10 +181068,29 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const { file, project } = this.getFileAndProject(args); const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); const hints = project.getLanguageService().provideInlayHints(file, args, this.getPreferences(file)); - return hints.map((hint) => ({ - ...hint, - position: scriptInfo.positionToLineOffset(hint.position) - })); + return hints.map((hint) => { + const { position, displayParts } = hint; + return { + ...hint, + position: scriptInfo.positionToLineOffset(position), + displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => { + if (span) { + Debug.assertIsDefined(file2, "Target file should be defined together with its span."); + const scriptInfo2 = this.projectService.getScriptInfo(file2); + return { + text, + span: { + start: scriptInfo2.positionToLineOffset(span.start), + end: scriptInfo2.positionToLineOffset(span.start + span.length), + file: file2 + } + }; + } else { + return { text }; + } + }) + }; + }); } setCompilerOptionsForInferredProjects(args) { this.projectService.setCompilerOptionsForInferredProjects(args.options, args.projectRootPath); @@ -179036,6 +181491,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter kindModifiers, sortText, insertText, + filterText, replacementSpan, hasAction, source, @@ -179054,6 +181510,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter kindModifiers, sortText, insertText, + filterText, replacementSpan: convertedSpan, isSnippet, hasAction: hasAction || void 0, @@ -180108,7 +182565,7 @@ ${e.message}`; ); } }; - _ScriptVersionCache = class { + _ScriptVersionCache = class _ScriptVersionCache { constructor() { this.changes = []; this.versions = new Array(_ScriptVersionCache.maxVersions); @@ -180200,11 +182657,11 @@ ${e.message}`; return svc; } }; + _ScriptVersionCache.changeNumberThreshold = 8; + _ScriptVersionCache.changeLengthThreshold = 256; + _ScriptVersionCache.maxVersions = 8; ScriptVersionCache = _ScriptVersionCache; - ScriptVersionCache.changeNumberThreshold = 8; - ScriptVersionCache.changeLengthThreshold = 256; - ScriptVersionCache.maxVersions = 8; - LineIndexSnapshot = class { + LineIndexSnapshot = class _LineIndexSnapshot { constructor(version2, cache, index, changesSincePreviousVersion = emptyArray2) { this.version = version2; this.cache = cache; @@ -180218,7 +182675,7 @@ ${e.message}`; return this.index.getLength(); } getChangeRange(oldSnapshot) { - if (oldSnapshot instanceof LineIndexSnapshot && this.cache === oldSnapshot.cache) { + if (oldSnapshot instanceof _LineIndexSnapshot && this.cache === oldSnapshot.cache) { if (this.version <= oldSnapshot.version) { return unchangedTextChangeRange; } else { @@ -180227,7 +182684,7 @@ ${e.message}`; } } }; - LineIndex = class { + LineIndex = class _LineIndex { constructor() { // set this to true to check each edit for accuracy this.checkEdits = false; @@ -180260,7 +182717,7 @@ ${e.message}`; for (let i = 0; i < lines.length; i++) { leaves[i] = new LineLeaf(lines[i]); } - this.root = LineIndex.buildTreeFromBottom(leaves); + this.root = _LineIndex.buildTreeFromBottom(leaves); } else { this.root = new LineNode(); } @@ -180304,7 +182761,7 @@ ${e.message}`; if (this.root.charCount() === 0) { Debug.assert(deleteLength === 0); if (newText !== void 0) { - this.load(LineIndex.linesFromText(newText).lines); + this.load(_LineIndex.linesFromText(newText).lines); return this; } return void 0; @@ -180375,7 +182832,7 @@ ${e.message}`; return { lines, lineMap }; } }; - LineNode = class { + LineNode = class _LineNode { constructor(children = []) { this.children = children; this.totalChars = 0; @@ -180507,7 +182964,7 @@ ${e.message}`; childIndex++; const endLength = childIndex; if (childIndex < clen) { - splitNode = new LineNode(); + splitNode = new _LineNode(); while (childIndex < clen) { splitNode.add(this.children[childIndex]); childIndex++; @@ -180556,7 +183013,7 @@ ${e.message}`; splitNodes = new Array(splitNodeCount); let splitNodeIndex = 0; for (let i = 0; i < splitNodeCount; i++) { - splitNodes[i] = new LineNode(); + splitNodes[i] = new _LineNode(); } let splitNode = splitNodes[0]; while (nodeIndex < nodeCount) { @@ -180624,6 +183081,7 @@ ${e.message}`; ActionWatchTypingLocations: () => ActionWatchTypingLocations, Arguments: () => Arguments, AutoImportProviderProject: () => AutoImportProviderProject, + AuxiliaryProject: () => AuxiliaryProject, CharRangeSection: () => CharRangeSection, CommandNames: () => CommandNames, ConfigFileDiagEvent: () => ConfigFileDiagEvent, @@ -180754,6 +183212,7 @@ ${e.message}`; CompletionTriggerKind: () => CompletionTriggerKind, Completions: () => ts_Completions_exports, ConfigFileProgramReloadLevel: () => ConfigFileProgramReloadLevel, + ContainerFlags: () => ContainerFlags, ContextFlags: () => ContextFlags, CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, @@ -180783,6 +183242,8 @@ ${e.message}`; GetLiteralTextFlags: () => GetLiteralTextFlags, GoToDefinition: () => ts_GoToDefinition_exports, HighlightSpanKind: () => HighlightSpanKind, + IdentifierNameMap: () => IdentifierNameMap, + IdentifierNameMultiMap: () => IdentifierNameMultiMap, ImportKind: () => ImportKind, ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, IndentStyle: () => IndentStyle, @@ -180887,6 +183348,7 @@ ${e.message}`; WatchLogLevel: () => WatchLogLevel, WatchType: () => WatchType, accessPrivateIdentifier: () => accessPrivateIdentifier, + addDisposableResourceHelper: () => addDisposableResourceHelper, addEmitFlags: () => addEmitFlags, addEmitHelper: () => addEmitHelper, addEmitHelpers: () => addEmitHelpers, @@ -180966,6 +183428,9 @@ ${e.message}`; changesAffectingProgramStructure: () => changesAffectingProgramStructure, childIsDecorated: () => childIsDecorated, classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, + classHasClassThisAssignment: () => classHasClassThisAssignment, + classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, + classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, classPrivateFieldInHelper: () => classPrivateFieldInHelper, @@ -181063,6 +183528,8 @@ ${e.message}`; createCacheWithRedirects: () => createCacheWithRedirects, createCacheableExportInfoMap: () => createCacheableExportInfoMap, createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, + createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, + createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, createClassifier: () => createClassifier, createCommentDirectivesMap: () => createCommentDirectivesMap, createCompilerDiagnostic: () => createCompilerDiagnostic, @@ -181195,6 +183662,7 @@ ${e.message}`; displayPart: () => displayPart, displayPartsToString: () => displayPartsToString, disposeEmitNodes: () => disposeEmitNodes, + disposeResourcesHelper: () => disposeResourcesHelper, documentSpansEqual: () => documentSpansEqual, dumpTracingLegend: () => dumpTracingLegend, elementAt: () => elementAt, @@ -181272,7 +183740,7 @@ ${e.message}`; findPackageJsons: () => findPackageJsons, findPrecedingMatchingToken: () => findPrecedingMatchingToken, findPrecedingToken: () => findPrecedingToken, - findSuperStatementIndex: () => findSuperStatementIndex, + findSuperStatementIndexPath: () => findSuperStatementIndexPath, findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition, findUseStrictPrologue: () => findUseStrictPrologue, first: () => first, @@ -181347,6 +183815,7 @@ ${e.message}`; getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, getAssignedName: () => getAssignedName, + getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, getAssignmentTargetKind: () => getAssignmentTargetKind, @@ -181374,8 +183843,10 @@ ${e.message}`; getConditions: () => getConditions, getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, getConstantValue: () => getConstantValue, + getContainerFlags: () => getContainerFlags, getContainerNode: () => getContainerNode, getContainingClass: () => getContainingClass, + getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators, getContainingClassStaticBlock: () => getContainingClassStaticBlock, getContainingFunction: () => getContainingFunction, getContainingFunctionDeclaration: () => getContainingFunctionDeclaration, @@ -181433,7 +183904,9 @@ ${e.message}`; getEmitModuleKind: () => getEmitModuleKind, getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, getEmitScriptTarget: () => getEmitScriptTarget, + getEmitStandardClassFields: () => getEmitStandardClassFields, getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer, + getEnclosingContainer: () => getEnclosingContainer, getEncodedSemanticClassifications: () => getEncodedSemanticClassifications, getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications, getEndLinePosition: () => getEndLinePosition, @@ -181651,6 +184124,7 @@ ${e.message}`; getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression, getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode, getPropertyNameForUniqueESSymbol: () => getPropertyNameForUniqueESSymbol, + getPropertyNameFromType: () => getPropertyNameFromType, getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement, getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement, getPropertySymbolsFromContextualType: () => getPropertySymbolsFromContextualType, @@ -181831,6 +184305,8 @@ ${e.message}`; indexOfNode: () => indexOfNode, indicesOf: () => indicesOf, inferredTypesContainingFile: () => inferredTypesContainingFile, + injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing, + injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing, insertImports: () => insertImports, insertLeadingStatement: () => insertLeadingStatement, insertSorted: () => insertSorted, @@ -181933,8 +184409,10 @@ ${e.message}`; isClassExpression: () => isClassExpression, isClassLike: () => isClassLike, isClassMemberModifier: () => isClassMemberModifier, + isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, isClassOrTypeElement: () => isClassOrTypeElement, isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration, + isClassThisAssignmentBlock: () => isClassThisAssignmentBlock, isCollapsedRange: () => isCollapsedRange, isColonToken: () => isColonToken, isCommaExpression: () => isCommaExpression, @@ -181980,6 +184458,7 @@ ${e.message}`; isDiagnosticWithLocation: () => isDiagnosticWithLocation, isDiskPathRoot: () => isDiskPathRoot, isDoStatement: () => isDoStatement, + isDocumentRegistryEntry: () => isDocumentRegistryEntry, isDotDotDotToken: () => isDotDotDotToken, isDottedName: () => isDottedName, isDynamicName: () => isDynamicName, @@ -182030,6 +184509,7 @@ ${e.message}`; isExternalModuleReference: () => isExternalModuleReference, isExternalModuleSymbol: () => isExternalModuleSymbol, isExternalOrCommonJsModule: () => isExternalOrCommonJsModule, + isFileLevelReservedGeneratedIdentifier: () => isFileLevelReservedGeneratedIdentifier, isFileLevelUniqueName: () => isFileLevelUniqueName, isFileProbablyExternalModule: () => isFileProbablyExternalModule, isFirstDeclarationOfSymbolParameter: () => isFirstDeclarationOfSymbolParameter, @@ -182100,6 +184580,7 @@ ${e.message}`; isInString: () => isInString, isInTemplateString: () => isInTemplateString, isInTopLevelContext: () => isInTopLevelContext, + isInTypeQuery: () => isInTypeQuery, isIncrementalCompilation: () => isIncrementalCompilation, isIndexSignatureDeclaration: () => isIndexSignatureDeclaration, isIndexedAccessTypeNode: () => isIndexedAccessTypeNode, @@ -182477,6 +184958,7 @@ ${e.message}`; isTypeQueryNode: () => isTypeQueryNode, isTypeReferenceNode: () => isTypeReferenceNode, isTypeReferenceType: () => isTypeReferenceType, + isTypeUsableAsPropertyName: () => isTypeUsableAsPropertyName, isUMDExportSymbol: () => isUMDExportSymbol, isUnaryExpression: () => isUnaryExpression, isUnaryExpressionWithWrite: () => isUnaryExpressionWithWrite, @@ -182491,7 +184973,9 @@ ${e.message}`; isValidESSymbolDeclaration: () => isValidESSymbolDeclaration, isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite, isValueSignatureDeclaration: () => isValueSignatureDeclaration, + isVarAwaitUsing: () => isVarAwaitUsing, isVarConst: () => isVarConst, + isVarUsing: () => isVarUsing, isVariableDeclaration: () => isVariableDeclaration, isVariableDeclarationInVariableStatement: () => isVariableDeclarationInVariableStatement, isVariableDeclarationInitializedToBareOrAccessedRequire: () => isVariableDeclarationInitializedToBareOrAccessedRequire, @@ -182903,6 +185387,7 @@ ${e.message}`; transformJsx: () => transformJsx, transformLegacyDecorators: () => transformLegacyDecorators, transformModule: () => transformModule, + transformNamedEvaluation: () => transformNamedEvaluation, transformNodeModule: () => transformNodeModule, transformNodes: () => transformNodes, transformSystemModule: () => transformSystemModule, @@ -183015,6 +185500,7 @@ ${e.message}`; ActionWatchTypingLocations: () => ActionWatchTypingLocations, Arguments: () => Arguments, AutoImportProviderProject: () => AutoImportProviderProject, + AuxiliaryProject: () => AuxiliaryProject, CharRangeSection: () => CharRangeSection, CommandNames: () => CommandNames, ConfigFileDiagEvent: () => ConfigFileDiagEvent, @@ -183133,6 +185619,7 @@ ${e.message}`; CompletionTriggerKind: () => CompletionTriggerKind, Completions: () => ts_Completions_exports, ConfigFileProgramReloadLevel: () => ConfigFileProgramReloadLevel, + ContainerFlags: () => ContainerFlags, ContextFlags: () => ContextFlags, CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, @@ -183162,6 +185649,8 @@ ${e.message}`; GetLiteralTextFlags: () => GetLiteralTextFlags, GoToDefinition: () => ts_GoToDefinition_exports, HighlightSpanKind: () => HighlightSpanKind, + IdentifierNameMap: () => IdentifierNameMap, + IdentifierNameMultiMap: () => IdentifierNameMultiMap, ImportKind: () => ImportKind, ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, IndentStyle: () => IndentStyle, @@ -183266,6 +185755,7 @@ ${e.message}`; WatchLogLevel: () => WatchLogLevel, WatchType: () => WatchType, accessPrivateIdentifier: () => accessPrivateIdentifier, + addDisposableResourceHelper: () => addDisposableResourceHelper, addEmitFlags: () => addEmitFlags, addEmitHelper: () => addEmitHelper, addEmitHelpers: () => addEmitHelpers, @@ -183345,6 +185835,9 @@ ${e.message}`; changesAffectingProgramStructure: () => changesAffectingProgramStructure, childIsDecorated: () => childIsDecorated, classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, + classHasClassThisAssignment: () => classHasClassThisAssignment, + classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, + classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, classPrivateFieldInHelper: () => classPrivateFieldInHelper, @@ -183442,6 +185935,8 @@ ${e.message}`; createCacheWithRedirects: () => createCacheWithRedirects, createCacheableExportInfoMap: () => createCacheableExportInfoMap, createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, + createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, + createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, createClassifier: () => createClassifier, createCommentDirectivesMap: () => createCommentDirectivesMap, createCompilerDiagnostic: () => createCompilerDiagnostic, @@ -183574,6 +186069,7 @@ ${e.message}`; displayPart: () => displayPart, displayPartsToString: () => displayPartsToString, disposeEmitNodes: () => disposeEmitNodes, + disposeResourcesHelper: () => disposeResourcesHelper, documentSpansEqual: () => documentSpansEqual, dumpTracingLegend: () => dumpTracingLegend, elementAt: () => elementAt, @@ -183651,7 +186147,7 @@ ${e.message}`; findPackageJsons: () => findPackageJsons, findPrecedingMatchingToken: () => findPrecedingMatchingToken, findPrecedingToken: () => findPrecedingToken, - findSuperStatementIndex: () => findSuperStatementIndex, + findSuperStatementIndexPath: () => findSuperStatementIndexPath, findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition, findUseStrictPrologue: () => findUseStrictPrologue, first: () => first, @@ -183726,6 +186222,7 @@ ${e.message}`; getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, getAssignedName: () => getAssignedName, + getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, getAssignmentTargetKind: () => getAssignmentTargetKind, @@ -183753,8 +186250,10 @@ ${e.message}`; getConditions: () => getConditions, getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, getConstantValue: () => getConstantValue, + getContainerFlags: () => getContainerFlags, getContainerNode: () => getContainerNode, getContainingClass: () => getContainingClass, + getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators, getContainingClassStaticBlock: () => getContainingClassStaticBlock, getContainingFunction: () => getContainingFunction, getContainingFunctionDeclaration: () => getContainingFunctionDeclaration, @@ -183812,7 +186311,9 @@ ${e.message}`; getEmitModuleKind: () => getEmitModuleKind, getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, getEmitScriptTarget: () => getEmitScriptTarget, + getEmitStandardClassFields: () => getEmitStandardClassFields, getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer, + getEnclosingContainer: () => getEnclosingContainer, getEncodedSemanticClassifications: () => getEncodedSemanticClassifications, getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications, getEndLinePosition: () => getEndLinePosition, @@ -184030,6 +186531,7 @@ ${e.message}`; getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression, getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode, getPropertyNameForUniqueESSymbol: () => getPropertyNameForUniqueESSymbol, + getPropertyNameFromType: () => getPropertyNameFromType, getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement, getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement, getPropertySymbolsFromContextualType: () => getPropertySymbolsFromContextualType, @@ -184210,6 +186712,8 @@ ${e.message}`; indexOfNode: () => indexOfNode, indicesOf: () => indicesOf, inferredTypesContainingFile: () => inferredTypesContainingFile, + injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing, + injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing, insertImports: () => insertImports, insertLeadingStatement: () => insertLeadingStatement, insertSorted: () => insertSorted, @@ -184312,8 +186816,10 @@ ${e.message}`; isClassExpression: () => isClassExpression, isClassLike: () => isClassLike, isClassMemberModifier: () => isClassMemberModifier, + isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, isClassOrTypeElement: () => isClassOrTypeElement, isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration, + isClassThisAssignmentBlock: () => isClassThisAssignmentBlock, isCollapsedRange: () => isCollapsedRange, isColonToken: () => isColonToken, isCommaExpression: () => isCommaExpression, @@ -184359,6 +186865,7 @@ ${e.message}`; isDiagnosticWithLocation: () => isDiagnosticWithLocation, isDiskPathRoot: () => isDiskPathRoot, isDoStatement: () => isDoStatement, + isDocumentRegistryEntry: () => isDocumentRegistryEntry, isDotDotDotToken: () => isDotDotDotToken, isDottedName: () => isDottedName, isDynamicName: () => isDynamicName, @@ -184409,6 +186916,7 @@ ${e.message}`; isExternalModuleReference: () => isExternalModuleReference, isExternalModuleSymbol: () => isExternalModuleSymbol, isExternalOrCommonJsModule: () => isExternalOrCommonJsModule, + isFileLevelReservedGeneratedIdentifier: () => isFileLevelReservedGeneratedIdentifier, isFileLevelUniqueName: () => isFileLevelUniqueName, isFileProbablyExternalModule: () => isFileProbablyExternalModule, isFirstDeclarationOfSymbolParameter: () => isFirstDeclarationOfSymbolParameter, @@ -184479,6 +186987,7 @@ ${e.message}`; isInString: () => isInString, isInTemplateString: () => isInTemplateString, isInTopLevelContext: () => isInTopLevelContext, + isInTypeQuery: () => isInTypeQuery, isIncrementalCompilation: () => isIncrementalCompilation, isIndexSignatureDeclaration: () => isIndexSignatureDeclaration, isIndexedAccessTypeNode: () => isIndexedAccessTypeNode, @@ -184856,6 +187365,7 @@ ${e.message}`; isTypeQueryNode: () => isTypeQueryNode, isTypeReferenceNode: () => isTypeReferenceNode, isTypeReferenceType: () => isTypeReferenceType, + isTypeUsableAsPropertyName: () => isTypeUsableAsPropertyName, isUMDExportSymbol: () => isUMDExportSymbol, isUnaryExpression: () => isUnaryExpression, isUnaryExpressionWithWrite: () => isUnaryExpressionWithWrite, @@ -184870,7 +187380,9 @@ ${e.message}`; isValidESSymbolDeclaration: () => isValidESSymbolDeclaration, isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite, isValueSignatureDeclaration: () => isValueSignatureDeclaration, + isVarAwaitUsing: () => isVarAwaitUsing, isVarConst: () => isVarConst, + isVarUsing: () => isVarUsing, isVariableDeclaration: () => isVariableDeclaration, isVariableDeclarationInVariableStatement: () => isVariableDeclarationInVariableStatement, isVariableDeclarationInitializedToBareOrAccessedRequire: () => isVariableDeclarationInitializedToBareOrAccessedRequire, @@ -185282,6 +187794,7 @@ ${e.message}`; transformJsx: () => transformJsx, transformLegacyDecorators: () => transformLegacyDecorators, transformModule: () => transformModule, + transformNamedEvaluation: () => transformNamedEvaluation, transformNodeModule: () => transformNodeModule, transformNodes: () => transformNodes, transformSystemModule: () => transformSystemModule, diff --git a/node_modules/typescript/lib/typescript.d.ts b/node_modules/typescript/lib/typescript.d.ts index ff7896ef26..ead6d07d8f 100644 --- a/node_modules/typescript/lib/typescript.d.ts +++ b/node_modules/typescript/lib/typescript.d.ts @@ -14,7 +14,7 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "5.1"; + const versionMajorMinor = "5.2"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -204,211 +204,212 @@ declare namespace ts { UndefinedKeyword = 157, UniqueKeyword = 158, UnknownKeyword = 159, - FromKeyword = 160, - GlobalKeyword = 161, - BigIntKeyword = 162, - OverrideKeyword = 163, - OfKeyword = 164, - QualifiedName = 165, - ComputedPropertyName = 166, - TypeParameter = 167, - Parameter = 168, - Decorator = 169, - PropertySignature = 170, - PropertyDeclaration = 171, - MethodSignature = 172, - MethodDeclaration = 173, - ClassStaticBlockDeclaration = 174, - Constructor = 175, - GetAccessor = 176, - SetAccessor = 177, - CallSignature = 178, - ConstructSignature = 179, - IndexSignature = 180, - TypePredicate = 181, - TypeReference = 182, - FunctionType = 183, - ConstructorType = 184, - TypeQuery = 185, - TypeLiteral = 186, - ArrayType = 187, - TupleType = 188, - OptionalType = 189, - RestType = 190, - UnionType = 191, - IntersectionType = 192, - ConditionalType = 193, - InferType = 194, - ParenthesizedType = 195, - ThisType = 196, - TypeOperator = 197, - IndexedAccessType = 198, - MappedType = 199, - LiteralType = 200, - NamedTupleMember = 201, - TemplateLiteralType = 202, - TemplateLiteralTypeSpan = 203, - ImportType = 204, - ObjectBindingPattern = 205, - ArrayBindingPattern = 206, - BindingElement = 207, - ArrayLiteralExpression = 208, - ObjectLiteralExpression = 209, - PropertyAccessExpression = 210, - ElementAccessExpression = 211, - CallExpression = 212, - NewExpression = 213, - TaggedTemplateExpression = 214, - TypeAssertionExpression = 215, - ParenthesizedExpression = 216, - FunctionExpression = 217, - ArrowFunction = 218, - DeleteExpression = 219, - TypeOfExpression = 220, - VoidExpression = 221, - AwaitExpression = 222, - PrefixUnaryExpression = 223, - PostfixUnaryExpression = 224, - BinaryExpression = 225, - ConditionalExpression = 226, - TemplateExpression = 227, - YieldExpression = 228, - SpreadElement = 229, - ClassExpression = 230, - OmittedExpression = 231, - ExpressionWithTypeArguments = 232, - AsExpression = 233, - NonNullExpression = 234, - MetaProperty = 235, - SyntheticExpression = 236, - SatisfiesExpression = 237, - TemplateSpan = 238, - SemicolonClassElement = 239, - Block = 240, - EmptyStatement = 241, - VariableStatement = 242, - ExpressionStatement = 243, - IfStatement = 244, - DoStatement = 245, - WhileStatement = 246, - ForStatement = 247, - ForInStatement = 248, - ForOfStatement = 249, - ContinueStatement = 250, - BreakStatement = 251, - ReturnStatement = 252, - WithStatement = 253, - SwitchStatement = 254, - LabeledStatement = 255, - ThrowStatement = 256, - TryStatement = 257, - DebuggerStatement = 258, - VariableDeclaration = 259, - VariableDeclarationList = 260, - FunctionDeclaration = 261, - ClassDeclaration = 262, - InterfaceDeclaration = 263, - TypeAliasDeclaration = 264, - EnumDeclaration = 265, - ModuleDeclaration = 266, - ModuleBlock = 267, - CaseBlock = 268, - NamespaceExportDeclaration = 269, - ImportEqualsDeclaration = 270, - ImportDeclaration = 271, - ImportClause = 272, - NamespaceImport = 273, - NamedImports = 274, - ImportSpecifier = 275, - ExportAssignment = 276, - ExportDeclaration = 277, - NamedExports = 278, - NamespaceExport = 279, - ExportSpecifier = 280, - MissingDeclaration = 281, - ExternalModuleReference = 282, - JsxElement = 283, - JsxSelfClosingElement = 284, - JsxOpeningElement = 285, - JsxClosingElement = 286, - JsxFragment = 287, - JsxOpeningFragment = 288, - JsxClosingFragment = 289, - JsxAttribute = 290, - JsxAttributes = 291, - JsxSpreadAttribute = 292, - JsxExpression = 293, - JsxNamespacedName = 294, - CaseClause = 295, - DefaultClause = 296, - HeritageClause = 297, - CatchClause = 298, - AssertClause = 299, - AssertEntry = 300, - ImportTypeAssertionContainer = 301, - PropertyAssignment = 302, - ShorthandPropertyAssignment = 303, - SpreadAssignment = 304, - EnumMember = 305, - /** @deprecated */ UnparsedPrologue = 306, - /** @deprecated */ UnparsedPrepend = 307, - /** @deprecated */ UnparsedText = 308, - /** @deprecated */ UnparsedInternalText = 309, - /** @deprecated */ UnparsedSyntheticReference = 310, - SourceFile = 311, - Bundle = 312, - /** @deprecated */ UnparsedSource = 313, - /** @deprecated */ InputFiles = 314, - JSDocTypeExpression = 315, - JSDocNameReference = 316, - JSDocMemberName = 317, - JSDocAllType = 318, - JSDocUnknownType = 319, - JSDocNullableType = 320, - JSDocNonNullableType = 321, - JSDocOptionalType = 322, - JSDocFunctionType = 323, - JSDocVariadicType = 324, - JSDocNamepathType = 325, - JSDoc = 326, + UsingKeyword = 160, + FromKeyword = 161, + GlobalKeyword = 162, + BigIntKeyword = 163, + OverrideKeyword = 164, + OfKeyword = 165, + QualifiedName = 166, + ComputedPropertyName = 167, + TypeParameter = 168, + Parameter = 169, + Decorator = 170, + PropertySignature = 171, + PropertyDeclaration = 172, + MethodSignature = 173, + MethodDeclaration = 174, + ClassStaticBlockDeclaration = 175, + Constructor = 176, + GetAccessor = 177, + SetAccessor = 178, + CallSignature = 179, + ConstructSignature = 180, + IndexSignature = 181, + TypePredicate = 182, + TypeReference = 183, + FunctionType = 184, + ConstructorType = 185, + TypeQuery = 186, + TypeLiteral = 187, + ArrayType = 188, + TupleType = 189, + OptionalType = 190, + RestType = 191, + UnionType = 192, + IntersectionType = 193, + ConditionalType = 194, + InferType = 195, + ParenthesizedType = 196, + ThisType = 197, + TypeOperator = 198, + IndexedAccessType = 199, + MappedType = 200, + LiteralType = 201, + NamedTupleMember = 202, + TemplateLiteralType = 203, + TemplateLiteralTypeSpan = 204, + ImportType = 205, + ObjectBindingPattern = 206, + ArrayBindingPattern = 207, + BindingElement = 208, + ArrayLiteralExpression = 209, + ObjectLiteralExpression = 210, + PropertyAccessExpression = 211, + ElementAccessExpression = 212, + CallExpression = 213, + NewExpression = 214, + TaggedTemplateExpression = 215, + TypeAssertionExpression = 216, + ParenthesizedExpression = 217, + FunctionExpression = 218, + ArrowFunction = 219, + DeleteExpression = 220, + TypeOfExpression = 221, + VoidExpression = 222, + AwaitExpression = 223, + PrefixUnaryExpression = 224, + PostfixUnaryExpression = 225, + BinaryExpression = 226, + ConditionalExpression = 227, + TemplateExpression = 228, + YieldExpression = 229, + SpreadElement = 230, + ClassExpression = 231, + OmittedExpression = 232, + ExpressionWithTypeArguments = 233, + AsExpression = 234, + NonNullExpression = 235, + MetaProperty = 236, + SyntheticExpression = 237, + SatisfiesExpression = 238, + TemplateSpan = 239, + SemicolonClassElement = 240, + Block = 241, + EmptyStatement = 242, + VariableStatement = 243, + ExpressionStatement = 244, + IfStatement = 245, + DoStatement = 246, + WhileStatement = 247, + ForStatement = 248, + ForInStatement = 249, + ForOfStatement = 250, + ContinueStatement = 251, + BreakStatement = 252, + ReturnStatement = 253, + WithStatement = 254, + SwitchStatement = 255, + LabeledStatement = 256, + ThrowStatement = 257, + TryStatement = 258, + DebuggerStatement = 259, + VariableDeclaration = 260, + VariableDeclarationList = 261, + FunctionDeclaration = 262, + ClassDeclaration = 263, + InterfaceDeclaration = 264, + TypeAliasDeclaration = 265, + EnumDeclaration = 266, + ModuleDeclaration = 267, + ModuleBlock = 268, + CaseBlock = 269, + NamespaceExportDeclaration = 270, + ImportEqualsDeclaration = 271, + ImportDeclaration = 272, + ImportClause = 273, + NamespaceImport = 274, + NamedImports = 275, + ImportSpecifier = 276, + ExportAssignment = 277, + ExportDeclaration = 278, + NamedExports = 279, + NamespaceExport = 280, + ExportSpecifier = 281, + MissingDeclaration = 282, + ExternalModuleReference = 283, + JsxElement = 284, + JsxSelfClosingElement = 285, + JsxOpeningElement = 286, + JsxClosingElement = 287, + JsxFragment = 288, + JsxOpeningFragment = 289, + JsxClosingFragment = 290, + JsxAttribute = 291, + JsxAttributes = 292, + JsxSpreadAttribute = 293, + JsxExpression = 294, + JsxNamespacedName = 295, + CaseClause = 296, + DefaultClause = 297, + HeritageClause = 298, + CatchClause = 299, + AssertClause = 300, + AssertEntry = 301, + ImportTypeAssertionContainer = 302, + PropertyAssignment = 303, + ShorthandPropertyAssignment = 304, + SpreadAssignment = 305, + EnumMember = 306, + /** @deprecated */ UnparsedPrologue = 307, + /** @deprecated */ UnparsedPrepend = 308, + /** @deprecated */ UnparsedText = 309, + /** @deprecated */ UnparsedInternalText = 310, + /** @deprecated */ UnparsedSyntheticReference = 311, + SourceFile = 312, + Bundle = 313, + /** @deprecated */ UnparsedSource = 314, + /** @deprecated */ InputFiles = 315, + JSDocTypeExpression = 316, + JSDocNameReference = 317, + JSDocMemberName = 318, + JSDocAllType = 319, + JSDocUnknownType = 320, + JSDocNullableType = 321, + JSDocNonNullableType = 322, + JSDocOptionalType = 323, + JSDocFunctionType = 324, + JSDocVariadicType = 325, + JSDocNamepathType = 326, + JSDoc = 327, /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 326, - JSDocText = 327, - JSDocTypeLiteral = 328, - JSDocSignature = 329, - JSDocLink = 330, - JSDocLinkCode = 331, - JSDocLinkPlain = 332, - JSDocTag = 333, - JSDocAugmentsTag = 334, - JSDocImplementsTag = 335, - JSDocAuthorTag = 336, - JSDocDeprecatedTag = 337, - JSDocClassTag = 338, - JSDocPublicTag = 339, - JSDocPrivateTag = 340, - JSDocProtectedTag = 341, - JSDocReadonlyTag = 342, - JSDocOverrideTag = 343, - JSDocCallbackTag = 344, - JSDocOverloadTag = 345, - JSDocEnumTag = 346, - JSDocParameterTag = 347, - JSDocReturnTag = 348, - JSDocThisTag = 349, - JSDocTypeTag = 350, - JSDocTemplateTag = 351, - JSDocTypedefTag = 352, - JSDocSeeTag = 353, - JSDocPropertyTag = 354, - JSDocThrowsTag = 355, - JSDocSatisfiesTag = 356, - SyntaxList = 357, - NotEmittedStatement = 358, - PartiallyEmittedExpression = 359, - CommaListExpression = 360, - SyntheticReferenceExpression = 361, - Count = 362, + JSDocComment = 327, + JSDocText = 328, + JSDocTypeLiteral = 329, + JSDocSignature = 330, + JSDocLink = 331, + JSDocLinkCode = 332, + JSDocLinkPlain = 333, + JSDocTag = 334, + JSDocAugmentsTag = 335, + JSDocImplementsTag = 336, + JSDocAuthorTag = 337, + JSDocDeprecatedTag = 338, + JSDocClassTag = 339, + JSDocPublicTag = 340, + JSDocPrivateTag = 341, + JSDocProtectedTag = 342, + JSDocReadonlyTag = 343, + JSDocOverrideTag = 344, + JSDocCallbackTag = 345, + JSDocOverloadTag = 346, + JSDocEnumTag = 347, + JSDocParameterTag = 348, + JSDocReturnTag = 349, + JSDocThisTag = 350, + JSDocTypeTag = 351, + JSDocTemplateTag = 352, + JSDocTypedefTag = 353, + JSDocSeeTag = 354, + JSDocPropertyTag = 355, + JSDocThrowsTag = 356, + JSDocSatisfiesTag = 357, + SyntaxList = 358, + NotEmittedStatement = 359, + PartiallyEmittedExpression = 360, + CommaListExpression = 361, + SyntheticReferenceExpression = 362, + Count = 363, FirstAssignment = 64, LastAssignment = 79, FirstCompoundAssignment = 65, @@ -416,15 +417,15 @@ declare namespace ts { FirstReservedWord = 83, LastReservedWord = 118, FirstKeyword = 83, - LastKeyword = 164, + LastKeyword = 165, FirstFutureReservedWord = 119, LastFutureReservedWord = 127, - FirstTypeNode = 181, - LastTypeNode = 204, + FirstTypeNode = 182, + LastTypeNode = 205, FirstPunctuation = 19, LastPunctuation = 79, FirstToken = 0, - LastToken = 164, + LastToken = 165, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 9, @@ -433,19 +434,19 @@ declare namespace ts { LastTemplateToken = 18, FirstBinaryOperator = 30, LastBinaryOperator = 79, - FirstStatement = 242, - LastStatement = 258, - FirstNode = 165, - FirstJSDocNode = 315, - LastJSDocNode = 356, - FirstJSDocTagNode = 333, - LastJSDocTagNode = 356 + FirstStatement = 243, + LastStatement = 259, + FirstNode = 166, + FirstJSDocNode = 316, + LastJSDocNode = 357, + FirstJSDocTagNode = 334, + LastJSDocTagNode = 357 } type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken; - type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; + type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; @@ -455,32 +456,35 @@ declare namespace ts { None = 0, Let = 1, Const = 2, - NestedNamespace = 4, - Synthesized = 8, - Namespace = 16, - OptionalChain = 32, - ExportContext = 64, - ContainsThis = 128, - HasImplicitReturn = 256, - HasExplicitReturn = 512, - GlobalAugmentation = 1024, - HasAsyncFunctions = 2048, - DisallowInContext = 4096, - YieldContext = 8192, - DecoratorContext = 16384, - AwaitContext = 32768, - DisallowConditionalTypesContext = 65536, - ThisNodeHasError = 131072, - JavaScriptFile = 262144, - ThisNodeOrAnySubNodesHasError = 524288, - HasAggregatedChildData = 1048576, - JSDoc = 8388608, - JsonFile = 67108864, - BlockScoped = 3, - ReachabilityCheckFlags = 768, - ReachabilityAndEmitFlags = 2816, - ContextFlags = 50720768, - TypeExcludesFlags = 40960 + Using = 4, + AwaitUsing = 6, + NestedNamespace = 8, + Synthesized = 16, + Namespace = 32, + OptionalChain = 64, + ExportContext = 128, + ContainsThis = 256, + HasImplicitReturn = 512, + HasExplicitReturn = 1024, + GlobalAugmentation = 2048, + HasAsyncFunctions = 4096, + DisallowInContext = 8192, + YieldContext = 16384, + DecoratorContext = 32768, + AwaitContext = 65536, + DisallowConditionalTypesContext = 131072, + ThisNodeHasError = 262144, + JavaScriptFile = 524288, + ThisNodeOrAnySubNodesHasError = 1048576, + HasAggregatedChildData = 2097152, + JSDoc = 16777216, + JsonFile = 134217728, + BlockScoped = 7, + Constant = 6, + ReachabilityCheckFlags = 1536, + ReachabilityAndEmitFlags = 5632, + ContextFlags = 101441536, + TypeExcludesFlags = 81920 } enum ModifierFlags { None = 0, @@ -1770,9 +1774,11 @@ declare namespace ts { }; }) | ExportDeclaration & { readonly isTypeOnly: true; + readonly moduleSpecifier: Expression; } | NamespaceExport & { readonly parent: ExportDeclaration & { readonly isTypeOnly: true; + readonly moduleSpecifier: Expression; }; }; type TypeOnlyAliasDeclaration = TypeOnlyImportDeclaration | TypeOnlyExportDeclaration; @@ -2217,7 +2223,7 @@ declare namespace ts { getSourceFileByPath(path: Path): SourceFile | undefined; getCurrentDirectory(): string; } - interface ParseConfigHost { + interface ParseConfigHost extends ModuleResolutionHost { useCaseSensitiveFileNames: boolean; readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; /** @@ -2894,7 +2900,7 @@ declare namespace ts { hasRestElement: boolean; combinedFlags: ElementFlags; readonly: boolean; - labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration)[]; + labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration | undefined)[]; } interface TupleTypeReference extends TypeReference { target: TupleType; @@ -3535,7 +3541,14 @@ declare namespace ts { All = 15, ExcludeJSDocTypeAssertion = 16 } - type TypeOfTag = "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function"; + type ImmediatelyInvokedFunctionExpression = CallExpression & { + readonly expression: FunctionExpression; + }; + type ImmediatelyInvokedArrowFunction = CallExpression & { + readonly expression: ParenthesizedExpression & { + readonly expression: ArrowFunction; + }; + }; interface NodeFactory { createNodeArray(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray; createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral; @@ -4005,8 +4018,8 @@ declare namespace ts { createPostfixDecrement(operand: Expression): PostfixUnaryExpression; createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression; createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; + createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): ImmediatelyInvokedArrowFunction; + createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): ImmediatelyInvokedArrowFunction; createVoidZero(): VoidExpression; createExportDefault(expression: Expression): ExportAssignment; createExternalModuleExport(exportName: Identifier): ExportDeclaration; @@ -4336,6 +4349,7 @@ declare namespace ts { readonly includeInlayPropertyDeclarationTypeHints?: boolean; readonly includeInlayFunctionLikeReturnTypeHints?: boolean; readonly includeInlayEnumMemberValueHints?: boolean; + readonly interactiveInlayHints?: boolean; readonly allowRenameOfImportPath?: boolean; readonly autoImportFileExcludePatterns?: string[]; readonly organizeImportsIgnoreCase?: "auto" | boolean; @@ -6402,11 +6416,18 @@ declare namespace ts { Enum = "Enum" } interface InlayHint { + /** This property will be the empty string when displayParts is set. */ text: string; position: number; kind: InlayHintKind; whitespaceBefore?: boolean; whitespaceAfter?: boolean; + displayParts?: InlayHintDisplayPart[]; + } + interface InlayHintDisplayPart { + text: string; + span?: TextSpan; + file?: string; } interface TodoCommentDescriptor { text: string; @@ -6838,6 +6859,7 @@ declare namespace ts { kindModifiers?: string; sortText: string; insertText?: string; + filterText?: string; isSnippet?: true; /** * An optional span that indicates the text to be replaced by this completion item. @@ -6997,6 +7019,10 @@ declare namespace ts { variableElement = "var", /** Inside function */ localVariableElement = "local var", + /** using foo = ... */ + variableUsingElement = "using", + /** await using foo = ... */ + variableAwaitUsingElement = "await using", /** * Inside module and script only * function f() { } diff --git a/node_modules/typescript/lib/typescript.js b/node_modules/typescript/lib/typescript.js index 589e2c2e31..4d0ee15506 100644 --- a/node_modules/typescript/lib/typescript.js +++ b/node_modules/typescript/lib/typescript.js @@ -34,8 +34,8 @@ var ts = (() => { var init_corePublic = __esm({ "src/compiler/corePublic.ts"() { "use strict"; - versionMajorMinor = "5.1"; - version = "5.1.6"; + versionMajorMinor = "5.2"; + version = "5.2.2"; Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -1464,8 +1464,8 @@ var ts = (() => { } return false; } - function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; + function createGetCanonicalFileName(useCaseSensitiveFileNames2) { + return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase; } function patternText({ prefix, suffix }) { return `${prefix}*${suffix}`; @@ -1646,7 +1646,7 @@ var ts = (() => { return void 0; }; hasOwnProperty = Object.prototype.hasOwnProperty; - fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; AssertionLevel = /* @__PURE__ */ ((AssertionLevel2) => { AssertionLevel2[AssertionLevel2["None"] = 0] = "None"; AssertionLevel2[AssertionLevel2["Normal"] = 1] = "Normal"; @@ -1748,10 +1748,10 @@ var ts = (() => { } Debug2.log = log; ((_log) => { - function error(s) { + function error2(s) { logMessage(1 /* Error */, s); } - _log.error = error; + _log.error = error2; function warn(s) { logMessage(2 /* Warning */, s); } @@ -1951,7 +1951,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return func.name; } else { const text = Function.prototype.toString.call(func); - const match = /^function\s+([\w\$]+)\s*\(/.exec(text); + const match = /^function\s+([\w$]+)\s*\(/.exec(text); return match ? match[1] : ""; } } @@ -2025,6 +2025,15 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, ); } Debug2.formatSnippetKind = formatSnippetKind; + function formatScriptKind(kind) { + return formatEnum( + kind, + ScriptKind, + /*isFlags*/ + false + ); + } + Debug2.formatScriptKind = formatScriptKind; function formatNodeFlags(flags) { return formatEnum( flags, @@ -2927,13 +2936,13 @@ ${lanes.join("\n")} "src/compiler/semver.ts"() { "use strict"; init_ts2(); - versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; + versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; prereleaseRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i; prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i; buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i; buildPartRegExp = /^[a-z0-9-]+$/i; numericIdentifierRegExp = /^(0|[1-9]\d*)$/; - _Version = class { + _Version = class _Version { constructor(major, minor = 0, patch = 0, prerelease = "", build2 = "") { if (typeof major === "string") { const result = Debug.checkDefined(tryParseComponents(major), "Invalid version"); @@ -2997,16 +3006,16 @@ ${lanes.join("\n")} return result; } }; + _Version.zero = new _Version(0, 0, 0, ["0"]); Version = _Version; - Version.zero = new _Version(0, 0, 0, ["0"]); - VersionRange = class { + VersionRange = class _VersionRange { constructor(spec) { this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray; } static tryParse(text) { const sets = parseRange(text); if (sets) { - const range = new VersionRange(""); + const range = new _VersionRange(""); range._alternatives = sets; return range; } @@ -3684,210 +3693,211 @@ ${lanes.join("\n")} SyntaxKind5[SyntaxKind5["UndefinedKeyword"] = 157] = "UndefinedKeyword"; SyntaxKind5[SyntaxKind5["UniqueKeyword"] = 158] = "UniqueKeyword"; SyntaxKind5[SyntaxKind5["UnknownKeyword"] = 159] = "UnknownKeyword"; - SyntaxKind5[SyntaxKind5["FromKeyword"] = 160] = "FromKeyword"; - SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 161] = "GlobalKeyword"; - SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 162] = "BigIntKeyword"; - SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 163] = "OverrideKeyword"; - SyntaxKind5[SyntaxKind5["OfKeyword"] = 164] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 165] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 166] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 167] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 168] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 169] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 170] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 171] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 172] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 173] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 174] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 175] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 176] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 177] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 178] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 179] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 180] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 181] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 182] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 183] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 184] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 185] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 186] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 187] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 188] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 189] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 190] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 191] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 192] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 193] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 194] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 195] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 196] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 197] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 198] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 199] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 200] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 201] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 202] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 203] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 204] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 205] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 206] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 207] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 208] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 209] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 210] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 211] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 212] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 213] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 214] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 215] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 216] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 217] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 218] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 219] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 220] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 221] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 222] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 223] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 224] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 225] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 226] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 227] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 228] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 229] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 230] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 231] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 232] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 233] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 234] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 235] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 236] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 237] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 238] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 239] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 240] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 241] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 242] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 243] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 244] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 245] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 246] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 247] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 248] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 249] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 250] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 251] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 252] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 253] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 254] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 255] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 256] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 257] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 258] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 259] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 260] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 261] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 262] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 263] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 264] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 265] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 266] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 267] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 268] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 269] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 270] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 271] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 272] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 273] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 274] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 275] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 276] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 277] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 278] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 279] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 280] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 281] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 282] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 283] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 284] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 285] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 286] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 287] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 288] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 289] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 290] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 291] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 292] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 293] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["JsxNamespacedName"] = 294] = "JsxNamespacedName"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 295] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 296] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 297] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 298] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 299] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 300] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 301] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 302] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 303] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 304] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 305] = "EnumMember"; - SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 306] = "UnparsedPrologue"; - SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 307] = "UnparsedPrepend"; - SyntaxKind5[SyntaxKind5["UnparsedText"] = 308] = "UnparsedText"; - SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 309] = "UnparsedInternalText"; - SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 310] = "UnparsedSyntheticReference"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 311] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 312] = "Bundle"; - SyntaxKind5[SyntaxKind5["UnparsedSource"] = 313] = "UnparsedSource"; - SyntaxKind5[SyntaxKind5["InputFiles"] = 314] = "InputFiles"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 315] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 316] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 317] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 318] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 319] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 320] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 321] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 322] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 323] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 324] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 325] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 326] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 326 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 327] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 328] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 329] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 330] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 331] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 332] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 333] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 334] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 335] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 336] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 337] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 338] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 339] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 340] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 341] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 342] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 343] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 344] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 345] = "JSDocOverloadTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 346] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 347] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 348] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 349] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 350] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 351] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 352] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 353] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 354] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 355] = "JSDocThrowsTag"; - SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 356] = "JSDocSatisfiesTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 357] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 358] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 360] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 362] = "Count"; + SyntaxKind5[SyntaxKind5["UsingKeyword"] = 160] = "UsingKeyword"; + SyntaxKind5[SyntaxKind5["FromKeyword"] = 161] = "FromKeyword"; + SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 162] = "GlobalKeyword"; + SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 163] = "BigIntKeyword"; + SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 164] = "OverrideKeyword"; + SyntaxKind5[SyntaxKind5["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind5[SyntaxKind5["QualifiedName"] = 166] = "QualifiedName"; + SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 167] = "ComputedPropertyName"; + SyntaxKind5[SyntaxKind5["TypeParameter"] = 168] = "TypeParameter"; + SyntaxKind5[SyntaxKind5["Parameter"] = 169] = "Parameter"; + SyntaxKind5[SyntaxKind5["Decorator"] = 170] = "Decorator"; + SyntaxKind5[SyntaxKind5["PropertySignature"] = 171] = "PropertySignature"; + SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 172] = "PropertyDeclaration"; + SyntaxKind5[SyntaxKind5["MethodSignature"] = 173] = "MethodSignature"; + SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 174] = "MethodDeclaration"; + SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; + SyntaxKind5[SyntaxKind5["Constructor"] = 176] = "Constructor"; + SyntaxKind5[SyntaxKind5["GetAccessor"] = 177] = "GetAccessor"; + SyntaxKind5[SyntaxKind5["SetAccessor"] = 178] = "SetAccessor"; + SyntaxKind5[SyntaxKind5["CallSignature"] = 179] = "CallSignature"; + SyntaxKind5[SyntaxKind5["ConstructSignature"] = 180] = "ConstructSignature"; + SyntaxKind5[SyntaxKind5["IndexSignature"] = 181] = "IndexSignature"; + SyntaxKind5[SyntaxKind5["TypePredicate"] = 182] = "TypePredicate"; + SyntaxKind5[SyntaxKind5["TypeReference"] = 183] = "TypeReference"; + SyntaxKind5[SyntaxKind5["FunctionType"] = 184] = "FunctionType"; + SyntaxKind5[SyntaxKind5["ConstructorType"] = 185] = "ConstructorType"; + SyntaxKind5[SyntaxKind5["TypeQuery"] = 186] = "TypeQuery"; + SyntaxKind5[SyntaxKind5["TypeLiteral"] = 187] = "TypeLiteral"; + SyntaxKind5[SyntaxKind5["ArrayType"] = 188] = "ArrayType"; + SyntaxKind5[SyntaxKind5["TupleType"] = 189] = "TupleType"; + SyntaxKind5[SyntaxKind5["OptionalType"] = 190] = "OptionalType"; + SyntaxKind5[SyntaxKind5["RestType"] = 191] = "RestType"; + SyntaxKind5[SyntaxKind5["UnionType"] = 192] = "UnionType"; + SyntaxKind5[SyntaxKind5["IntersectionType"] = 193] = "IntersectionType"; + SyntaxKind5[SyntaxKind5["ConditionalType"] = 194] = "ConditionalType"; + SyntaxKind5[SyntaxKind5["InferType"] = 195] = "InferType"; + SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 196] = "ParenthesizedType"; + SyntaxKind5[SyntaxKind5["ThisType"] = 197] = "ThisType"; + SyntaxKind5[SyntaxKind5["TypeOperator"] = 198] = "TypeOperator"; + SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 199] = "IndexedAccessType"; + SyntaxKind5[SyntaxKind5["MappedType"] = 200] = "MappedType"; + SyntaxKind5[SyntaxKind5["LiteralType"] = 201] = "LiteralType"; + SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 202] = "NamedTupleMember"; + SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 203] = "TemplateLiteralType"; + SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; + SyntaxKind5[SyntaxKind5["ImportType"] = 205] = "ImportType"; + SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; + SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; + SyntaxKind5[SyntaxKind5["BindingElement"] = 208] = "BindingElement"; + SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; + SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; + SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; + SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 212] = "ElementAccessExpression"; + SyntaxKind5[SyntaxKind5["CallExpression"] = 213] = "CallExpression"; + SyntaxKind5[SyntaxKind5["NewExpression"] = 214] = "NewExpression"; + SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; + SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; + SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; + SyntaxKind5[SyntaxKind5["FunctionExpression"] = 218] = "FunctionExpression"; + SyntaxKind5[SyntaxKind5["ArrowFunction"] = 219] = "ArrowFunction"; + SyntaxKind5[SyntaxKind5["DeleteExpression"] = 220] = "DeleteExpression"; + SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 221] = "TypeOfExpression"; + SyntaxKind5[SyntaxKind5["VoidExpression"] = 222] = "VoidExpression"; + SyntaxKind5[SyntaxKind5["AwaitExpression"] = 223] = "AwaitExpression"; + SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 224] = "PrefixUnaryExpression"; + SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 225] = "PostfixUnaryExpression"; + SyntaxKind5[SyntaxKind5["BinaryExpression"] = 226] = "BinaryExpression"; + SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 227] = "ConditionalExpression"; + SyntaxKind5[SyntaxKind5["TemplateExpression"] = 228] = "TemplateExpression"; + SyntaxKind5[SyntaxKind5["YieldExpression"] = 229] = "YieldExpression"; + SyntaxKind5[SyntaxKind5["SpreadElement"] = 230] = "SpreadElement"; + SyntaxKind5[SyntaxKind5["ClassExpression"] = 231] = "ClassExpression"; + SyntaxKind5[SyntaxKind5["OmittedExpression"] = 232] = "OmittedExpression"; + SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 233] = "ExpressionWithTypeArguments"; + SyntaxKind5[SyntaxKind5["AsExpression"] = 234] = "AsExpression"; + SyntaxKind5[SyntaxKind5["NonNullExpression"] = 235] = "NonNullExpression"; + SyntaxKind5[SyntaxKind5["MetaProperty"] = 236] = "MetaProperty"; + SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 237] = "SyntheticExpression"; + SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 238] = "SatisfiesExpression"; + SyntaxKind5[SyntaxKind5["TemplateSpan"] = 239] = "TemplateSpan"; + SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 240] = "SemicolonClassElement"; + SyntaxKind5[SyntaxKind5["Block"] = 241] = "Block"; + SyntaxKind5[SyntaxKind5["EmptyStatement"] = 242] = "EmptyStatement"; + SyntaxKind5[SyntaxKind5["VariableStatement"] = 243] = "VariableStatement"; + SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 244] = "ExpressionStatement"; + SyntaxKind5[SyntaxKind5["IfStatement"] = 245] = "IfStatement"; + SyntaxKind5[SyntaxKind5["DoStatement"] = 246] = "DoStatement"; + SyntaxKind5[SyntaxKind5["WhileStatement"] = 247] = "WhileStatement"; + SyntaxKind5[SyntaxKind5["ForStatement"] = 248] = "ForStatement"; + SyntaxKind5[SyntaxKind5["ForInStatement"] = 249] = "ForInStatement"; + SyntaxKind5[SyntaxKind5["ForOfStatement"] = 250] = "ForOfStatement"; + SyntaxKind5[SyntaxKind5["ContinueStatement"] = 251] = "ContinueStatement"; + SyntaxKind5[SyntaxKind5["BreakStatement"] = 252] = "BreakStatement"; + SyntaxKind5[SyntaxKind5["ReturnStatement"] = 253] = "ReturnStatement"; + SyntaxKind5[SyntaxKind5["WithStatement"] = 254] = "WithStatement"; + SyntaxKind5[SyntaxKind5["SwitchStatement"] = 255] = "SwitchStatement"; + SyntaxKind5[SyntaxKind5["LabeledStatement"] = 256] = "LabeledStatement"; + SyntaxKind5[SyntaxKind5["ThrowStatement"] = 257] = "ThrowStatement"; + SyntaxKind5[SyntaxKind5["TryStatement"] = 258] = "TryStatement"; + SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 259] = "DebuggerStatement"; + SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 260] = "VariableDeclaration"; + SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 261] = "VariableDeclarationList"; + SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 262] = "FunctionDeclaration"; + SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 263] = "ClassDeclaration"; + SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 264] = "InterfaceDeclaration"; + SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 265] = "TypeAliasDeclaration"; + SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 266] = "EnumDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 267] = "ModuleDeclaration"; + SyntaxKind5[SyntaxKind5["ModuleBlock"] = 268] = "ModuleBlock"; + SyntaxKind5[SyntaxKind5["CaseBlock"] = 269] = "CaseBlock"; + SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 270] = "NamespaceExportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 271] = "ImportEqualsDeclaration"; + SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 272] = "ImportDeclaration"; + SyntaxKind5[SyntaxKind5["ImportClause"] = 273] = "ImportClause"; + SyntaxKind5[SyntaxKind5["NamespaceImport"] = 274] = "NamespaceImport"; + SyntaxKind5[SyntaxKind5["NamedImports"] = 275] = "NamedImports"; + SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 276] = "ImportSpecifier"; + SyntaxKind5[SyntaxKind5["ExportAssignment"] = 277] = "ExportAssignment"; + SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 278] = "ExportDeclaration"; + SyntaxKind5[SyntaxKind5["NamedExports"] = 279] = "NamedExports"; + SyntaxKind5[SyntaxKind5["NamespaceExport"] = 280] = "NamespaceExport"; + SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 281] = "ExportSpecifier"; + SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 282] = "MissingDeclaration"; + SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 283] = "ExternalModuleReference"; + SyntaxKind5[SyntaxKind5["JsxElement"] = 284] = "JsxElement"; + SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 285] = "JsxSelfClosingElement"; + SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 286] = "JsxOpeningElement"; + SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 287] = "JsxClosingElement"; + SyntaxKind5[SyntaxKind5["JsxFragment"] = 288] = "JsxFragment"; + SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 289] = "JsxOpeningFragment"; + SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 290] = "JsxClosingFragment"; + SyntaxKind5[SyntaxKind5["JsxAttribute"] = 291] = "JsxAttribute"; + SyntaxKind5[SyntaxKind5["JsxAttributes"] = 292] = "JsxAttributes"; + SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 293] = "JsxSpreadAttribute"; + SyntaxKind5[SyntaxKind5["JsxExpression"] = 294] = "JsxExpression"; + SyntaxKind5[SyntaxKind5["JsxNamespacedName"] = 295] = "JsxNamespacedName"; + SyntaxKind5[SyntaxKind5["CaseClause"] = 296] = "CaseClause"; + SyntaxKind5[SyntaxKind5["DefaultClause"] = 297] = "DefaultClause"; + SyntaxKind5[SyntaxKind5["HeritageClause"] = 298] = "HeritageClause"; + SyntaxKind5[SyntaxKind5["CatchClause"] = 299] = "CatchClause"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 300] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 301] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; + SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 303] = "PropertyAssignment"; + SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; + SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 305] = "SpreadAssignment"; + SyntaxKind5[SyntaxKind5["EnumMember"] = 306] = "EnumMember"; + SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 307] = "UnparsedPrologue"; + SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 308] = "UnparsedPrepend"; + SyntaxKind5[SyntaxKind5["UnparsedText"] = 309] = "UnparsedText"; + SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 310] = "UnparsedInternalText"; + SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 311] = "UnparsedSyntheticReference"; + SyntaxKind5[SyntaxKind5["SourceFile"] = 312] = "SourceFile"; + SyntaxKind5[SyntaxKind5["Bundle"] = 313] = "Bundle"; + SyntaxKind5[SyntaxKind5["UnparsedSource"] = 314] = "UnparsedSource"; + SyntaxKind5[SyntaxKind5["InputFiles"] = 315] = "InputFiles"; + SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 316] = "JSDocTypeExpression"; + SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 317] = "JSDocNameReference"; + SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 318] = "JSDocMemberName"; + SyntaxKind5[SyntaxKind5["JSDocAllType"] = 319] = "JSDocAllType"; + SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 320] = "JSDocUnknownType"; + SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 321] = "JSDocNullableType"; + SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 322] = "JSDocNonNullableType"; + SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 323] = "JSDocOptionalType"; + SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 324] = "JSDocFunctionType"; + SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 325] = "JSDocVariadicType"; + SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 326] = "JSDocNamepathType"; + SyntaxKind5[SyntaxKind5["JSDoc"] = 327] = "JSDoc"; + SyntaxKind5[SyntaxKind5["JSDocComment"] = 327 /* JSDoc */] = "JSDocComment"; + SyntaxKind5[SyntaxKind5["JSDocText"] = 328] = "JSDocText"; + SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 329] = "JSDocTypeLiteral"; + SyntaxKind5[SyntaxKind5["JSDocSignature"] = 330] = "JSDocSignature"; + SyntaxKind5[SyntaxKind5["JSDocLink"] = 331] = "JSDocLink"; + SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 332] = "JSDocLinkCode"; + SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 333] = "JSDocLinkPlain"; + SyntaxKind5[SyntaxKind5["JSDocTag"] = 334] = "JSDocTag"; + SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 335] = "JSDocAugmentsTag"; + SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 336] = "JSDocImplementsTag"; + SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 337] = "JSDocAuthorTag"; + SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 338] = "JSDocDeprecatedTag"; + SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 339] = "JSDocClassTag"; + SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 340] = "JSDocPublicTag"; + SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 341] = "JSDocPrivateTag"; + SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 342] = "JSDocProtectedTag"; + SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 343] = "JSDocReadonlyTag"; + SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 344] = "JSDocOverrideTag"; + SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 345] = "JSDocCallbackTag"; + SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 346] = "JSDocOverloadTag"; + SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 347] = "JSDocEnumTag"; + SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 348] = "JSDocParameterTag"; + SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 349] = "JSDocReturnTag"; + SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 350] = "JSDocThisTag"; + SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 351] = "JSDocTypeTag"; + SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 352] = "JSDocTemplateTag"; + SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 353] = "JSDocTypedefTag"; + SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 354] = "JSDocSeeTag"; + SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 355] = "JSDocPropertyTag"; + SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 356] = "JSDocThrowsTag"; + SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 357] = "JSDocSatisfiesTag"; + SyntaxKind5[SyntaxKind5["SyntaxList"] = 358] = "SyntaxList"; + SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 359] = "NotEmittedStatement"; + SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 360] = "PartiallyEmittedExpression"; + SyntaxKind5[SyntaxKind5["CommaListExpression"] = 361] = "CommaListExpression"; + SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 362] = "SyntheticReferenceExpression"; + SyntaxKind5[SyntaxKind5["Count"] = 363] = "Count"; SyntaxKind5[SyntaxKind5["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment"; SyntaxKind5[SyntaxKind5["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -3895,15 +3905,15 @@ ${lanes.join("\n")} SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 83 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind5[SyntaxKind5["LastReservedWord"] = 118 /* WithKeyword */] = "LastReservedWord"; SyntaxKind5[SyntaxKind5["FirstKeyword"] = 83 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 164 /* OfKeyword */] = "LastKeyword"; + SyntaxKind5[SyntaxKind5["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 119 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 127 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 181 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 204 /* ImportType */] = "LastTypeNode"; + SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind5[SyntaxKind5["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 19 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind5[SyntaxKind5["LastPunctuation"] = 79 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 164 /* LastKeyword */] = "LastToken"; + SyntaxKind5[SyntaxKind5["LastToken"] = 165 /* LastKeyword */] = "LastToken"; SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 9 /* NumericLiteral */] = "FirstLiteralToken"; @@ -3912,56 +3922,59 @@ ${lanes.join("\n")} SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 18 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 30 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 79 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 242 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 258 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 165 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 315 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 356 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 333 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 356 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; + SyntaxKind5[SyntaxKind5["FirstStatement"] = 243 /* VariableStatement */] = "FirstStatement"; + SyntaxKind5[SyntaxKind5["LastStatement"] = 259 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind5[SyntaxKind5["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 316 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocNode"; + SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 334 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 128 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 164 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind5; })(SyntaxKind || {}); NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { NodeFlags3[NodeFlags3["None"] = 0] = "None"; NodeFlags3[NodeFlags3["Let"] = 1] = "Let"; NodeFlags3[NodeFlags3["Const"] = 2] = "Const"; - NodeFlags3[NodeFlags3["NestedNamespace"] = 4] = "NestedNamespace"; - NodeFlags3[NodeFlags3["Synthesized"] = 8] = "Synthesized"; - NodeFlags3[NodeFlags3["Namespace"] = 16] = "Namespace"; - NodeFlags3[NodeFlags3["OptionalChain"] = 32] = "OptionalChain"; - NodeFlags3[NodeFlags3["ExportContext"] = 64] = "ExportContext"; - NodeFlags3[NodeFlags3["ContainsThis"] = 128] = "ContainsThis"; - NodeFlags3[NodeFlags3["HasImplicitReturn"] = 256] = "HasImplicitReturn"; - NodeFlags3[NodeFlags3["HasExplicitReturn"] = 512] = "HasExplicitReturn"; - NodeFlags3[NodeFlags3["GlobalAugmentation"] = 1024] = "GlobalAugmentation"; - NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 2048] = "HasAsyncFunctions"; - NodeFlags3[NodeFlags3["DisallowInContext"] = 4096] = "DisallowInContext"; - NodeFlags3[NodeFlags3["YieldContext"] = 8192] = "YieldContext"; - NodeFlags3[NodeFlags3["DecoratorContext"] = 16384] = "DecoratorContext"; - NodeFlags3[NodeFlags3["AwaitContext"] = 32768] = "AwaitContext"; - NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 65536] = "DisallowConditionalTypesContext"; - NodeFlags3[NodeFlags3["ThisNodeHasError"] = 131072] = "ThisNodeHasError"; - NodeFlags3[NodeFlags3["JavaScriptFile"] = 262144] = "JavaScriptFile"; - NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 524288] = "ThisNodeOrAnySubNodesHasError"; - NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 1048576] = "HasAggregatedChildData"; - NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 2097152] = "PossiblyContainsDynamicImport"; - NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 4194304] = "PossiblyContainsImportMeta"; - NodeFlags3[NodeFlags3["JSDoc"] = 8388608] = "JSDoc"; - NodeFlags3[NodeFlags3["Ambient"] = 16777216] = "Ambient"; - NodeFlags3[NodeFlags3["InWithStatement"] = 33554432] = "InWithStatement"; - NodeFlags3[NodeFlags3["JsonFile"] = 67108864] = "JsonFile"; - NodeFlags3[NodeFlags3["TypeCached"] = 134217728] = "TypeCached"; - NodeFlags3[NodeFlags3["Deprecated"] = 268435456] = "Deprecated"; - NodeFlags3[NodeFlags3["BlockScoped"] = 3] = "BlockScoped"; - NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags"; - NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 2816] = "ReachabilityAndEmitFlags"; - NodeFlags3[NodeFlags3["ContextFlags"] = 50720768] = "ContextFlags"; - NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 40960] = "TypeExcludesFlags"; - NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 6291456] = "PermanentlySetIncrementalFlags"; - NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 128 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; - NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 2048 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; + NodeFlags3[NodeFlags3["Using"] = 4] = "Using"; + NodeFlags3[NodeFlags3["AwaitUsing"] = 6] = "AwaitUsing"; + NodeFlags3[NodeFlags3["NestedNamespace"] = 8] = "NestedNamespace"; + NodeFlags3[NodeFlags3["Synthesized"] = 16] = "Synthesized"; + NodeFlags3[NodeFlags3["Namespace"] = 32] = "Namespace"; + NodeFlags3[NodeFlags3["OptionalChain"] = 64] = "OptionalChain"; + NodeFlags3[NodeFlags3["ExportContext"] = 128] = "ExportContext"; + NodeFlags3[NodeFlags3["ContainsThis"] = 256] = "ContainsThis"; + NodeFlags3[NodeFlags3["HasImplicitReturn"] = 512] = "HasImplicitReturn"; + NodeFlags3[NodeFlags3["HasExplicitReturn"] = 1024] = "HasExplicitReturn"; + NodeFlags3[NodeFlags3["GlobalAugmentation"] = 2048] = "GlobalAugmentation"; + NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 4096] = "HasAsyncFunctions"; + NodeFlags3[NodeFlags3["DisallowInContext"] = 8192] = "DisallowInContext"; + NodeFlags3[NodeFlags3["YieldContext"] = 16384] = "YieldContext"; + NodeFlags3[NodeFlags3["DecoratorContext"] = 32768] = "DecoratorContext"; + NodeFlags3[NodeFlags3["AwaitContext"] = 65536] = "AwaitContext"; + NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 131072] = "DisallowConditionalTypesContext"; + NodeFlags3[NodeFlags3["ThisNodeHasError"] = 262144] = "ThisNodeHasError"; + NodeFlags3[NodeFlags3["JavaScriptFile"] = 524288] = "JavaScriptFile"; + NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 1048576] = "ThisNodeOrAnySubNodesHasError"; + NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 2097152] = "HasAggregatedChildData"; + NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 4194304] = "PossiblyContainsDynamicImport"; + NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 8388608] = "PossiblyContainsImportMeta"; + NodeFlags3[NodeFlags3["JSDoc"] = 16777216] = "JSDoc"; + NodeFlags3[NodeFlags3["Ambient"] = 33554432] = "Ambient"; + NodeFlags3[NodeFlags3["InWithStatement"] = 67108864] = "InWithStatement"; + NodeFlags3[NodeFlags3["JsonFile"] = 134217728] = "JsonFile"; + NodeFlags3[NodeFlags3["TypeCached"] = 268435456] = "TypeCached"; + NodeFlags3[NodeFlags3["Deprecated"] = 536870912] = "Deprecated"; + NodeFlags3[NodeFlags3["BlockScoped"] = 7] = "BlockScoped"; + NodeFlags3[NodeFlags3["Constant"] = 6] = "Constant"; + NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 1536] = "ReachabilityCheckFlags"; + NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 5632] = "ReachabilityAndEmitFlags"; + NodeFlags3[NodeFlags3["ContextFlags"] = 101441536] = "ContextFlags"; + NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 81920] = "TypeExcludesFlags"; + NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 12582912] = "PermanentlySetIncrementalFlags"; + NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 256 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; + NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 4096 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; return NodeFlags3; })(NodeFlags || {}); ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { @@ -4374,15 +4387,13 @@ ${lanes.join("\n")} NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding"; NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding"; NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop"; - NodeCheckFlags2[NodeCheckFlags2["ClassWithBodyScopedClassBinding"] = 65536] = "ClassWithBodyScopedClassBinding"; - NodeCheckFlags2[NodeCheckFlags2["BodyScopedClassBinding"] = 131072] = "BodyScopedClassBinding"; - NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 262144] = "NeedsLoopOutParameter"; - NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 524288] = "AssignmentsMarked"; - NodeCheckFlags2[NodeCheckFlags2["ClassWithConstructorReference"] = 1048576] = "ClassWithConstructorReference"; - NodeCheckFlags2[NodeCheckFlags2["ConstructorReferenceInClass"] = 2097152] = "ConstructorReferenceInClass"; - NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 4194304] = "ContainsClassWithPrivateIdentifiers"; - NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 8388608] = "ContainsSuperPropertyInStaticInitializer"; - NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 16777216] = "InCheckIdentifier"; + NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 65536] = "NeedsLoopOutParameter"; + NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 131072] = "AssignmentsMarked"; + NodeCheckFlags2[NodeCheckFlags2["ContainsConstructorReference"] = 262144] = "ContainsConstructorReference"; + NodeCheckFlags2[NodeCheckFlags2["ConstructorReference"] = 536870912] = "ConstructorReference"; + NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 1048576] = "ContainsClassWithPrivateIdentifiers"; + NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 2097152] = "ContainsSuperPropertyInStaticInitializer"; + NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 4194304] = "InCheckIdentifier"; return NodeCheckFlags2; })(NodeCheckFlags || {}); TypeFlags = /* @__PURE__ */ ((TypeFlags2) => { @@ -4563,7 +4574,8 @@ ${lanes.join("\n")} SignatureFlags5[SignatureFlags5["IsOuterCallChain"] = 16] = "IsOuterCallChain"; SignatureFlags5[SignatureFlags5["IsUntypedSignatureInJSFile"] = 32] = "IsUntypedSignatureInJSFile"; SignatureFlags5[SignatureFlags5["IsNonInferrable"] = 64] = "IsNonInferrable"; - SignatureFlags5[SignatureFlags5["PropagatingFlags"] = 39] = "PropagatingFlags"; + SignatureFlags5[SignatureFlags5["IsSignatureCandidateForOverloadFailure"] = 128] = "IsSignatureCandidateForOverloadFailure"; + SignatureFlags5[SignatureFlags5["PropagatingFlags"] = 167] = "PropagatingFlags"; SignatureFlags5[SignatureFlags5["CallChainFlags"] = 24] = "CallChainFlags"; return SignatureFlags5; })(SignatureFlags || {}); @@ -4705,16 +4717,16 @@ ${lanes.join("\n")} NewLineKind2[NewLineKind2["LineFeed"] = 1] = "LineFeed"; return NewLineKind2; })(NewLineKind || {}); - ScriptKind = /* @__PURE__ */ ((ScriptKind5) => { - ScriptKind5[ScriptKind5["Unknown"] = 0] = "Unknown"; - ScriptKind5[ScriptKind5["JS"] = 1] = "JS"; - ScriptKind5[ScriptKind5["JSX"] = 2] = "JSX"; - ScriptKind5[ScriptKind5["TS"] = 3] = "TS"; - ScriptKind5[ScriptKind5["TSX"] = 4] = "TSX"; - ScriptKind5[ScriptKind5["External"] = 5] = "External"; - ScriptKind5[ScriptKind5["JSON"] = 6] = "JSON"; - ScriptKind5[ScriptKind5["Deferred"] = 7] = "Deferred"; - return ScriptKind5; + ScriptKind = /* @__PURE__ */ ((ScriptKind6) => { + ScriptKind6[ScriptKind6["Unknown"] = 0] = "Unknown"; + ScriptKind6[ScriptKind6["JS"] = 1] = "JS"; + ScriptKind6[ScriptKind6["JSX"] = 2] = "JSX"; + ScriptKind6[ScriptKind6["TS"] = 3] = "TS"; + ScriptKind6[ScriptKind6["TSX"] = 4] = "TSX"; + ScriptKind6[ScriptKind6["External"] = 5] = "External"; + ScriptKind6[ScriptKind6["JSON"] = 6] = "JSON"; + ScriptKind6[ScriptKind6["Deferred"] = 7] = "Deferred"; + return ScriptKind6; })(ScriptKind || {}); ScriptTarget = /* @__PURE__ */ ((ScriptTarget10) => { ScriptTarget10[ScriptTarget10["ES3"] = 0] = "ES3"; @@ -5029,8 +5041,9 @@ ${lanes.join("\n")} ExternalEmitHelpers2[ExternalEmitHelpers2["CreateBinding"] = 4194304] = "CreateBinding"; ExternalEmitHelpers2[ExternalEmitHelpers2["SetFunctionName"] = 8388608] = "SetFunctionName"; ExternalEmitHelpers2[ExternalEmitHelpers2["PropKey"] = 16777216] = "PropKey"; + ExternalEmitHelpers2[ExternalEmitHelpers2["AddDisposableResourceAndDisposeResources"] = 33554432] = "AddDisposableResourceAndDisposeResources"; ExternalEmitHelpers2[ExternalEmitHelpers2["FirstEmitHelper"] = 1 /* Extends */] = "FirstEmitHelper"; - ExternalEmitHelpers2[ExternalEmitHelpers2["LastEmitHelper"] = 16777216 /* PropKey */] = "LastEmitHelper"; + ExternalEmitHelpers2[ExternalEmitHelpers2["LastEmitHelper"] = 33554432 /* AddDisposableResourceAndDisposeResources */] = "LastEmitHelper"; ExternalEmitHelpers2[ExternalEmitHelpers2["ForOfIncludes"] = 256 /* Values */] = "ForOfIncludes"; ExternalEmitHelpers2[ExternalEmitHelpers2["ForAwaitOfIncludes"] = 16384 /* AsyncValues */] = "ForAwaitOfIncludes"; ExternalEmitHelpers2[ExternalEmitHelpers2["AsyncGeneratorIncludes"] = 6144] = "AsyncGeneratorIncludes"; @@ -5411,10 +5424,10 @@ ${lanes.join("\n")} pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval)); } } - function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) { + function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) { const fileWatcherCallbacks = createMultiMap(); const dirWatchers = /* @__PURE__ */ new Map(); - const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2); return nonPollingWatchFile; function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) { const filePath = toCanonicalName(fileName); @@ -5490,8 +5503,8 @@ ${lanes.join("\n")} pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue"); } } - function createSingleWatcherPerName(cache, useCaseSensitiveFileNames, name, callback, createWatcher) { - const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) { + const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const path = toCanonicalFileName(name); const existing = cache.get(path); if (existing) { @@ -5541,7 +5554,7 @@ ${lanes.join("\n")} } function createDirectoryWatcherSupportingRecursive({ watchDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, getAccessibleSortedChildDirectories, fileSystemEntryExists, @@ -5553,8 +5566,8 @@ ${lanes.join("\n")} const callbackCache = createMultiMap(); const cacheToUpdateChildWatches = /* @__PURE__ */ new Map(); let timerToUpdateChildWatches; - const filePathComparer = getStringComparer(!useCaseSensitiveFileNames); - const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames); + const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2); + const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2); return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options); function createDirectoryWatcher(dirName, options, callback) { const dirPath = toCanonicalFilePath(dirName); @@ -5721,12 +5734,12 @@ ${lanes.join("\n")} } } function isIgnoredPath(path, options) { - return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames, getCurrentDirectory); + return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory); } function isInPath(path, searchPath) { if (stringContains(path, searchPath)) return true; - if (useCaseSensitiveFileNames) + if (useCaseSensitiveFileNames2) return false; return stringContains(toCanonicalFilePath(path), searchPath); } @@ -5744,14 +5757,14 @@ ${lanes.join("\n")} } }; } - function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames, getCurrentDirectory) { - return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames, getCurrentDirectory())); + function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) { + return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames2, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2, getCurrentDirectory())); } - function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory) { + function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) { return (eventName, relativeFileName) => { if (eventName === "rename") { const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName)); - if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames, getCurrentDirectory)) { + if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) { callback(fileName); } } @@ -5764,7 +5777,7 @@ ${lanes.join("\n")} clearTimeout: clearTimeout2, fsWatchWorker, fileSystemEntryExists, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories, @@ -5836,7 +5849,7 @@ ${lanes.join("\n")} ); case 5 /* UseFsEventsOnParentDirectory */: if (!nonPollingWatchFile) { - nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames); + nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2); } return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options)); default: @@ -5885,7 +5898,7 @@ ${lanes.join("\n")} return fsWatch( directoryName, 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), + createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), recursive, 500 /* Medium */, getFallbackOptions(options) @@ -5893,7 +5906,7 @@ ${lanes.join("\n")} } if (!hostRecursiveDirectoryWatcher) { hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({ - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fileSystemEntryExists, getAccessibleSortedChildDirectories, @@ -5939,7 +5952,7 @@ ${lanes.join("\n")} return fsWatch( directoryName, 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), + createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), recursive, 500 /* Medium */, getFallbackOptions(watchDirectoryOptions) @@ -5967,7 +5980,7 @@ ${lanes.join("\n")} function pollingWatchFile(fileName, callback, pollingInterval, options) { return createSingleWatcherPerName( pollingWatches, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, fileName, callback, (cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options) @@ -5976,7 +5989,7 @@ ${lanes.join("\n")} function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) { return createSingleWatcherPerName( recursive ? fsWatchesRecursive : fsWatches, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, fileOrDirectory, callback, (cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions) @@ -6135,7 +6148,7 @@ ${lanes.join("\n")} const Buffer2 = require("buffer").Buffer; const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin"; const platform = _os.platform(); - const useCaseSensitiveFileNames = isFileSystemCaseSensitive(); + const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive(); const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync; const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename; const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin"; @@ -6146,7 +6159,7 @@ ${lanes.join("\n")} setTimeout, clearTimeout, fsWatchWorker, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fileSystemEntryExists, // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows @@ -6163,7 +6176,7 @@ ${lanes.join("\n")} const nodeSystem = { args: process.argv.slice(2), newLine: _os.EOL, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, write(s) { process.stdout.write(s); }, @@ -6228,7 +6241,7 @@ ${lanes.join("\n")} disableCPUProfiler, cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"), realpath, - debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)), + debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay, tryEnableSourceMapsForHost() { try { require("source-map-support").install(); @@ -6254,8 +6267,8 @@ ${lanes.join("\n")} try { const modulePath = resolveJSModule(moduleName, baseDir, nodeSystem); return { module: require(modulePath), modulePath, error: void 0 }; - } catch (error) { - return { module: void 0, modulePath: void 0, error }; + } catch (error2) { + return { module: void 0, modulePath: void 0, error: error2 }; } } }; @@ -6292,12 +6305,12 @@ ${lanes.join("\n")} for (const node of profile.nodes) { if (node.callFrame.url) { const url = normalizeSlashes(node.callFrame.url); - if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames)) { + if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) { node.callFrame.url = getRelativePathToDirectoryOrUrl( fileUrlRoot, url, fileUrlRoot, - createGetCanonicalFileName(useCaseSensitiveFileNames), + createGetCanonicalFileName(useCaseSensitiveFileNames2), /*isAbsolutePathAnUrl*/ true ); @@ -6477,7 +6490,7 @@ ${lanes.join("\n")} } } function readDirectory(path, extensions, excludes, includes, depth) { - return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); + return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); } function fileSystemEntryExists(path, entryKind) { const originalStackTraceLimit = Error.stackTraceLimit; @@ -7053,6 +7066,7 @@ ${lanes.join("\n")} Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, 1 /* Error */, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, 1 /* Error */, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: diag(1065, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065", "The return type of an async function or method must be the global Promise type."), In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, 1 /* Error */, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, 1 /* Error */, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, 1 /* Error */, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), @@ -7082,6 +7096,7 @@ ${lanes.join("\n")} A_return_statement_can_only_be_used_within_a_function_body: diag(1108, 1 /* Error */, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), Expression_expected: diag(1109, 1 /* Error */, "Expression_expected_1109", "Expression expected."), Type_expected: diag(1110, 1 /* Error */, "Type_expected_1110", "Type expected."), + Private_field_0_must_be_declared_in_an_enclosing_class: diag(1111, 1 /* Error */, "Private_field_0_must_be_declared_in_an_enclosing_class_1111", "Private field '{0}' must be declared in an enclosing class."), A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, 1 /* Error */, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), Duplicate_label_0: diag(1114, 1 /* Error */, "Duplicate_label_0_1114", "Duplicate label '{0}'."), A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, 1 /* Error */, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), @@ -7116,9 +7131,8 @@ ${lanes.join("\n")} Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, 1 /* Error */, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, 1 /* Error */, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, 1 /* Error */, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), - const_declarations_must_be_initialized: diag(1155, 1 /* Error */, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."), - const_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."), - let_declarations_can_only_be_declared_inside_a_block: diag(1157, 1 /* Error */, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."), + _0_declarations_must_be_initialized: diag(1155, 1 /* Error */, "_0_declarations_must_be_initialized_1155", "'{0}' declarations must be initialized."), + _0_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "_0_declarations_can_only_be_declared_inside_a_block_1156", "'{0}' declarations can only be declared inside a block."), Unterminated_template_literal: diag(1160, 1 /* Error */, "Unterminated_template_literal_1160", "Unterminated template literal."), Unterminated_regular_expression_literal: diag(1161, 1 /* Error */, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), An_object_member_cannot_be_declared_optional: diag(1162, 1 /* Error */, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), @@ -7300,8 +7314,6 @@ ${lanes.join("\n")} Class_constructor_may_not_be_a_generator: diag(1368, 1 /* Error */, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), Did_you_mean_0: diag(1369, 3 /* Message */, "Did_you_mean_0_1369", "Did you mean '{0}'?"), This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, 1 /* Error */, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."), - Convert_to_type_only_import: diag(1373, 3 /* 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, 3 /* 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, 1 /* 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."), _0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."), _0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."), @@ -7405,6 +7417,11 @@ ${lanes.join("\n")} Escape_sequence_0_is_not_allowed: diag(1488, 1 /* Error */, "Escape_sequence_0_is_not_allowed_1488", "Escape sequence '{0}' is not allowed."), Decimals_with_leading_zeros_are_not_allowed: diag(1489, 1 /* Error */, "Decimals_with_leading_zeros_are_not_allowed_1489", "Decimals with leading zeros are not allowed."), File_appears_to_be_binary: diag(1490, 1 /* Error */, "File_appears_to_be_binary_1490", "File appears to be binary."), + _0_modifier_cannot_appear_on_a_using_declaration: diag(1491, 1 /* Error */, "_0_modifier_cannot_appear_on_a_using_declaration_1491", "'{0}' modifier cannot appear on a 'using' declaration."), + _0_declarations_may_not_have_binding_patterns: diag(1492, 1 /* Error */, "_0_declarations_may_not_have_binding_patterns_1492", "'{0}' declarations may not have binding patterns."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), + The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), + _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* 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, 1 /* 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( @@ -7499,7 +7516,6 @@ ${lanes.join("\n")} This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, 1 /* Error */, "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}'."), Type_0_does_not_satisfy_the_constraint_1: diag(2344, 1 /* Error */, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, 1 /* Error */, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), - Call_target_does_not_contain_any_signatures: diag(2346, 1 /* Error */, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), Untyped_function_calls_may_not_accept_type_arguments: diag(2347, 1 /* Error */, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, 1 /* Error */, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), This_expression_is_not_callable: diag(2349, 1 /* Error */, "This_expression_is_not_callable_2349", "This expression is not callable."), @@ -7951,6 +7967,11 @@ ${lanes.join("\n")} A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: diag(2846, 1 /* Error */, "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"), The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression: diag(2848, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848", "The right-hand side of an 'instanceof' expression must not be an instantiation expression."), Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1: diag(2849, 1 /* Error */, "Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849", "Target signature provides too few arguments. Expected {0} or more, but got {1}."), + The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined: diag(2850, 1 /* Error */, "The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850", "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: diag(2851, 1 /* Error */, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), + await_using_statements_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(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* 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, 1 /* 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, 1 /* 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}'."), @@ -8104,7 +8125,6 @@ ${lanes.join("\n")} Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: diag(5081, 1 /* Error */, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: diag(5082, 1 /* Error */, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), Cannot_read_file_0: diag(5083, 1 /* Error */, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), - Tuple_members_must_all_have_names_or_all_not_have_names: diag(5084, 1 /* Error */, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."), A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, 1 /* Error */, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, 1 /* Error */, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, 1 /* Error */, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), @@ -8127,6 +8147,8 @@ ${lanes.join("\n")} Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), + Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."), + Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -8507,6 +8529,8 @@ ${lanes.join("\n")} Resolved_under_condition_0: diag(6414, 3 /* Message */, "Resolved_under_condition_0_6414", "Resolved under condition '{0}'."), Failed_to_resolve_under_condition_0: diag(6415, 3 /* Message */, "Failed_to_resolve_under_condition_0_6415", "Failed to resolve under condition '{0}'."), Exiting_conditional_exports: diag(6416, 3 /* Message */, "Exiting_conditional_exports_6416", "Exiting conditional exports."), + Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: diag(6417, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", "Searching all ancestor node_modules directories for preferred extensions: {0}."), + Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: diag(6418, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", "Searching all ancestor node_modules directories for fallback extensions: {0}."), The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* Message */, "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_this_index_signature: diag(6501, 3 /* Message */, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, 3 /* Message */, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), @@ -8745,6 +8769,7 @@ ${lanes.join("\n")} Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, 1 /* Error */, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, 1 /* Error */, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, 1 /* Error */, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), + Signature_declarations_can_only_be_used_in_TypeScript_files: diag(8017, 1 /* Error */, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."), Report_errors_in_js_files: diag(8019, 3 /* Message */, "Report_errors_in_js_files_8019", "Report errors in .js files."), JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, 1 /* Error */, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, 1 /* Error */, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), @@ -9019,6 +9044,14 @@ ${lanes.join("\n")} Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."), Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"), Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"), + Use_import_type: diag(95180, 3 /* Message */, "Use_import_type_95180", "Use 'import type'"), + Use_type_0: diag(95181, 3 /* Message */, "Use_type_0_95181", "Use 'type {0}'"), + Fix_all_with_type_only_imports: diag(95182, 3 /* Message */, "Fix_all_with_type_only_imports_95182", "Fix all with type-only imports"), + Cannot_move_statements_to_the_selected_file: diag(95183, 3 /* Message */, "Cannot_move_statements_to_the_selected_file_95183", "Cannot move statements to the selected file"), + Inline_variable: diag(95184, 3 /* Message */, "Inline_variable_95184", "Inline variable"), + Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."), + Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."), + Add_missing_comma_for_object_member_completion_0: diag(95187, 3 /* Message */, "Add_missing_comma_for_object_member_completion_0_95187", "Add missing comma for object member completion '{0}'."), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* 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, 1 /* 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, 1 /* 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?"), @@ -9045,8 +9078,8 @@ ${lanes.join("\n")} Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, 3 /* Message */, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, 1 /* Error */, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, 1 /* Error */, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), - Await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."), - For_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."), + await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "await_expression_cannot_be_used_inside_a_class_static_block_18037", "'await' expression cannot be used inside a class static block."), + for_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "for_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'for await' loops cannot be used inside a class static block."), Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, 1 /* Error */, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, 1 /* Error */, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, 1 /* Error */, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), @@ -9060,7 +9093,8 @@ ${lanes.join("\n")} The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."), Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"), - Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type.") + Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."), + await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block.") }; } }); @@ -9337,9 +9371,9 @@ ${lanes.join("\n")} } return false; } - function scanConflictMarkerTrivia(text, pos, error) { - if (error) { - error(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength); + function scanConflictMarkerTrivia(text, pos, error2) { + if (error2) { + error2(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength); } const ch = text.charCodeAt(pos); const len = text.length; @@ -9635,7 +9669,7 @@ ${lanes.join("\n")} }); } return scanner2; - function error(message, errPos = pos, length3, arg0) { + function error2(message, errPos = pos, length3, arg0) { if (onError) { const oldPos = pos; pos = errPos; @@ -9659,9 +9693,9 @@ ${lanes.join("\n")} } else { tokenFlags |= 16384 /* ContainsInvalidSeparator */; if (isPreviousTokenSeparator) { - error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); + error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); } } pos++; @@ -9678,7 +9712,7 @@ ${lanes.join("\n")} } if (text.charCodeAt(pos - 1) === 95 /* _ */) { tokenFlags |= 16384 /* ContainsInvalidSeparator */; - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); } return result + text.substring(start2, pos); } @@ -9689,7 +9723,7 @@ ${lanes.join("\n")} pos++; if (text.charCodeAt(pos) === 95 /* _ */) { tokenFlags |= 512 /* ContainsSeparator */ | 16384 /* ContainsInvalidSeparator */; - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); pos--; mainFragment = scanNumberFragment(); } else if (!scanDigits()) { @@ -9704,8 +9738,8 @@ ${lanes.join("\n")} const literal = (withMinus ? "-" : "") + "0o" + (+tokenValue).toString(8); if (withMinus) start2--; - error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal); - return { type: 9 /* NumericLiteral */, value: tokenValue }; + error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal); + return 9 /* NumericLiteral */; } } else { mainFragment = scanNumberFragment(); @@ -9725,7 +9759,7 @@ ${lanes.join("\n")} const preNumericPart = pos; const finalFragment = scanNumberFragment(); if (!finalFragment) { - error(Diagnostics.Digit_expected); + error2(Diagnostics.Digit_expected); } else { scientificFragment = text.substring(end2, preNumericPart) + finalFragment; end2 = pos; @@ -9744,21 +9778,19 @@ ${lanes.join("\n")} result = text.substring(start2, end2); } if (tokenFlags & 8192 /* ContainsLeadingZero */) { - error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2); - return { type: 9 /* NumericLiteral */, value: "" + +result }; + error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2); + tokenValue = "" + +result; + return 9 /* NumericLiteral */; } if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) { checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */)); - return { - type: 9 /* NumericLiteral */, - value: "" + +result - // if value is not an integer, it can be safely coerced to a number - }; + tokenValue = "" + +result; + return 9 /* NumericLiteral */; } else { tokenValue = result; const type = checkBigIntSuffix(); checkForIdentifierStartAfterNumericLiteral(start2); - return { type, value: tokenValue }; + return type; } } function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) { @@ -9769,12 +9801,12 @@ ${lanes.join("\n")} const { length: length3 } = scanIdentifierParts(); if (length3 === 1 && text[identifierStart] === "n") { if (isScientific) { - error(Diagnostics.A_bigint_literal_cannot_use_exponential_notation, numericStart, identifierStart - numericStart + 1); + error2(Diagnostics.A_bigint_literal_cannot_use_exponential_notation, numericStart, identifierStart - numericStart + 1); } else { - error(Diagnostics.A_bigint_literal_must_be_an_integer, numericStart, identifierStart - numericStart + 1); + error2(Diagnostics.A_bigint_literal_must_be_an_integer, numericStart, identifierStart - numericStart + 1); } } else { - error(Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, identifierStart, length3); + error2(Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, identifierStart, length3); pos = identifierStart; } } @@ -9821,9 +9853,9 @@ ${lanes.join("\n")} allowSeparator = false; isPreviousTokenSeparator = true; } else if (isPreviousTokenSeparator) { - error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); + error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); } pos++; continue; @@ -9842,7 +9874,7 @@ ${lanes.join("\n")} valueChars = []; } if (text.charCodeAt(pos - 1) === 95 /* _ */) { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); } return String.fromCharCode(...valueChars); } @@ -9855,7 +9887,7 @@ ${lanes.join("\n")} if (pos >= end) { result += text.substring(start2, pos); tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_string_literal); + error2(Diagnostics.Unterminated_string_literal); break; } const ch = text.charCodeAt(pos); @@ -9876,7 +9908,7 @@ ${lanes.join("\n")} if (isLineBreak(ch) && !jsxAttributeString) { result += text.substring(start2, pos); tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_string_literal); + error2(Diagnostics.Unterminated_string_literal); break; } pos++; @@ -9893,7 +9925,7 @@ ${lanes.join("\n")} if (pos >= end) { contents += text.substring(start2, pos); tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_template_literal); + error2(Diagnostics.Unterminated_template_literal); resultingToken = startedWithBacktick ? 15 /* NoSubstitutionTemplateLiteral */ : 18 /* TemplateTail */; break; } @@ -9936,7 +9968,7 @@ ${lanes.join("\n")} const start2 = pos; pos++; if (pos >= end) { - error(Diagnostics.Unexpected_end_of_text); + error2(Diagnostics.Unexpected_end_of_text); return ""; } const ch = text.charCodeAt(pos); @@ -9962,7 +9994,7 @@ ${lanes.join("\n")} tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { const code = parseInt(text.substring(start2 + 1, pos), 8); - error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0")); + error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0")); return String.fromCharCode(code); } return text.substring(start2, pos); @@ -9970,7 +10002,7 @@ ${lanes.join("\n")} case 57 /* _9 */: tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Escape_sequence_0_is_not_allowed, start2, pos - start2, text.substring(start2, pos)); + error2(Diagnostics.Escape_sequence_0_is_not_allowed, start2, pos - start2, text.substring(start2, pos)); return String.fromCharCode(ch); } return text.substring(start2, pos); @@ -10002,28 +10034,28 @@ ${lanes.join("\n")} if (escapedValue < 0) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); } return text.substring(start2, pos); } if (!isCodePoint(escapedValue)) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); + error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); } return text.substring(start2, pos); } if (pos >= end) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Unexpected_end_of_text); + error2(Diagnostics.Unexpected_end_of_text); } return text.substring(start2, pos); } if (text.charCodeAt(pos) !== 125 /* closeBrace */) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Unterminated_Unicode_escape_sequence); + error2(Diagnostics.Unterminated_Unicode_escape_sequence); } return text.substring(start2, pos); } @@ -10035,7 +10067,7 @@ ${lanes.join("\n")} if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); } return text.substring(start2, pos); } @@ -10047,7 +10079,7 @@ ${lanes.join("\n")} if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) { tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); } return text.substring(start2, pos); } @@ -10075,19 +10107,19 @@ ${lanes.join("\n")} const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; let isInvalidExtendedEscape = false; if (escapedValue < 0) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); isInvalidExtendedEscape = true; } else if (escapedValue > 1114111) { - error(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); + error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); isInvalidExtendedEscape = true; } if (pos >= end) { - error(Diagnostics.Unexpected_end_of_text); + error2(Diagnostics.Unexpected_end_of_text); isInvalidExtendedEscape = true; } else if (text.charCodeAt(pos) === 125 /* closeBrace */) { pos++; } else { - error(Diagnostics.Unterminated_Unicode_escape_sequence); + error2(Diagnostics.Unterminated_Unicode_escape_sequence); isInvalidExtendedEscape = true; } if (isInvalidExtendedEscape) { @@ -10181,9 +10213,9 @@ ${lanes.join("\n")} separatorAllowed = false; isPreviousTokenSeparator = true; } else if (isPreviousTokenSeparator) { - error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); + error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); } else { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); } pos++; continue; @@ -10197,7 +10229,7 @@ ${lanes.join("\n")} isPreviousTokenSeparator = false; } if (text.charCodeAt(pos - 1) === 95 /* _ */) { - error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); + error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); } return value; } @@ -10227,7 +10259,7 @@ ${lanes.join("\n")} const ch = codePointAt(text, pos); if (pos === 0) { if (ch === 65533 /* replacementCharacter */) { - error(Diagnostics.File_appears_to_be_binary); + error2(Diagnostics.File_appears_to_be_binary); pos = end; return token = 8 /* NonTextFileMarkerTrivia */; } @@ -10367,7 +10399,7 @@ ${lanes.join("\n")} return token = 41 /* MinusToken */; case 46 /* dot */: if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = scanNumber().value; + scanNumber(); return token = 9 /* NumericLiteral */; } if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { @@ -10418,7 +10450,7 @@ ${lanes.join("\n")} } commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart); if (!commentClosed) { - error(Diagnostics.Asterisk_Slash_expected); + error2(Diagnostics.Asterisk_Slash_expected); } if (skipTrivia2) { continue; @@ -10443,7 +10475,7 @@ ${lanes.join("\n")} true ); if (!tokenValue) { - error(Diagnostics.Hexadecimal_digit_expected); + error2(Diagnostics.Hexadecimal_digit_expected); tokenValue = "0"; } tokenValue = "0x" + tokenValue; @@ -10456,7 +10488,7 @@ ${lanes.join("\n")} 2 ); if (!tokenValue) { - error(Diagnostics.Binary_digit_expected); + error2(Diagnostics.Binary_digit_expected); tokenValue = "0"; } tokenValue = "0b" + tokenValue; @@ -10469,7 +10501,7 @@ ${lanes.join("\n")} 8 ); if (!tokenValue) { - error(Diagnostics.Octal_digit_expected); + error2(Diagnostics.Octal_digit_expected); tokenValue = "0"; } tokenValue = "0o" + tokenValue; @@ -10485,8 +10517,7 @@ ${lanes.join("\n")} case 55 /* _7 */: case 56 /* _8 */: case 57 /* _9 */: - ({ type: token, value: tokenValue } = scanNumber()); - return token; + return token = scanNumber(); case 58 /* colon */: pos++; return token = 59 /* ColonToken */; @@ -10495,7 +10526,7 @@ ${lanes.join("\n")} return token = 27 /* SemicolonToken */; case 60 /* lessThan */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -10518,7 +10549,7 @@ ${lanes.join("\n")} return token = 30 /* LessThanToken */; case 61 /* equals */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -10538,7 +10569,7 @@ ${lanes.join("\n")} return token = 64 /* EqualsToken */; case 62 /* greaterThan */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -10576,7 +10607,7 @@ ${lanes.join("\n")} return token = 19 /* OpenBraceToken */; case 124 /* bar */: if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); if (skipTrivia2) { continue; } else { @@ -10618,12 +10649,12 @@ ${lanes.join("\n")} tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); return token = getIdentifierToken(); } - error(Diagnostics.Invalid_character); + error2(Diagnostics.Invalid_character); pos++; return token = 0 /* Unknown */; case 35 /* hash */: if (pos !== 0 && text[pos + 1] === "!") { - error(Diagnostics.can_only_be_used_at_the_start_of_a_file); + error2(Diagnostics.can_only_be_used_at_the_start_of_a_file); pos++; return token = 0 /* Unknown */; } @@ -10651,7 +10682,7 @@ ${lanes.join("\n")} scanIdentifier(charAfterHash, languageVersion); } else { tokenValue = "#"; - error(Diagnostics.Invalid_character, pos++, charSize(ch)); + error2(Diagnostics.Invalid_character, pos++, charSize(ch)); } return token = 81 /* PrivateIdentifier */; default: @@ -10667,7 +10698,7 @@ ${lanes.join("\n")} continue; } const size = charSize(ch); - error(Diagnostics.Invalid_character, pos, size); + error2(Diagnostics.Invalid_character, pos, size); pos += size; return token = 0 /* Unknown */; } @@ -10733,13 +10764,13 @@ ${lanes.join("\n")} while (true) { if (p >= end) { tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_regular_expression_literal); + error2(Diagnostics.Unterminated_regular_expression_literal); break; } const ch = text.charCodeAt(p); if (isLineBreak(ch)) { tokenFlags |= 4 /* Unterminated */; - error(Diagnostics.Unterminated_regular_expression_literal); + error2(Diagnostics.Unterminated_regular_expression_literal); break; } if (inEscape) { @@ -10851,16 +10882,16 @@ ${lanes.join("\n")} } if (char === 60 /* lessThan */) { if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); + pos = scanConflictMarkerTrivia(text, pos, error2); return token = 7 /* ConflictMarkerTrivia */; } break; } if (char === 62 /* greaterThan */) { - error(Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); + error2(Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); } if (char === 125 /* closeBrace */) { - error(Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); + error2(Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); } if (isLineBreak(char) && firstNonWhitespace === 0) { firstNonWhitespace = -1; @@ -11130,7 +11161,7 @@ ${lanes.join("\n")} as: 130 /* AsKeyword */, asserts: 131 /* AssertsKeyword */, assert: 132 /* AssertKeyword */, - bigint: 162 /* BigIntKeyword */, + bigint: 163 /* BigIntKeyword */, boolean: 136 /* BooleanKeyword */, break: 83 /* BreakKeyword */, case: 84 /* CaseKeyword */, @@ -11151,7 +11182,7 @@ ${lanes.join("\n")} false: 97 /* FalseKeyword */, finally: 98 /* FinallyKeyword */, for: 99 /* ForKeyword */, - from: 160 /* FromKeyword */, + from: 161 /* FromKeyword */, function: 100 /* FunctionKeyword */, get: 139 /* GetKeyword */, if: 101 /* IfKeyword */, @@ -11176,11 +11207,11 @@ ${lanes.join("\n")} private: 123 /* PrivateKeyword */, protected: 124 /* ProtectedKeyword */, public: 125 /* PublicKeyword */, - override: 163 /* OverrideKeyword */, + override: 164 /* OverrideKeyword */, out: 147 /* OutKeyword */, readonly: 148 /* ReadonlyKeyword */, require: 149 /* RequireKeyword */, - global: 161 /* GlobalKeyword */, + global: 162 /* GlobalKeyword */, return: 107 /* ReturnKeyword */, satisfies: 152 /* SatisfiesKeyword */, set: 153 /* SetKeyword */, @@ -11198,6 +11229,7 @@ ${lanes.join("\n")} undefined: 157 /* UndefinedKeyword */, unique: 158 /* UniqueKeyword */, unknown: 159 /* UnknownKeyword */, + using: 160 /* UsingKeyword */, var: 115 /* VarKeyword */, void: 116 /* VoidKeyword */, while: 117 /* WhileKeyword */, @@ -11205,7 +11237,7 @@ ${lanes.join("\n")} yield: 127 /* YieldKeyword */, async: 134 /* AsyncKeyword */, await: 135 /* AwaitKeyword */, - of: 164 /* OfKeyword */ + of: 165 /* OfKeyword */ }; textToKeyword = new Map(Object.entries(textToKeywordObj)); textToToken = new Map(Object.entries({ @@ -11427,16 +11459,16 @@ ${lanes.join("\n")} ); } function getTypeParameterOwner(d) { - if (d && d.kind === 167 /* TypeParameter */) { + if (d && d.kind === 168 /* TypeParameter */) { for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 263 /* InterfaceDeclaration */) { + if (isFunctionLike(current) || isClassLike(current) || current.kind === 264 /* InterfaceDeclaration */) { return current; } } } } function isParameterPropertyDeclaration(node, parent2) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 175 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -11462,14 +11494,14 @@ ${lanes.join("\n")} node = walkUpBindingElementsAndPatterns(node); } let flags = getFlags(node); - if (node.kind === 259 /* VariableDeclaration */) { + if (node.kind === 260 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 260 /* VariableDeclarationList */) { + if (node && node.kind === 261 /* VariableDeclarationList */) { flags |= getFlags(node); node = node.parent; } - if (node && node.kind === 242 /* VariableStatement */) { + if (node && node.kind === 243 /* VariableStatement */) { flags |= getFlags(node); } return flags; @@ -11481,11 +11513,14 @@ ${lanes.join("\n")} return getCombinedFlags(node, getEffectiveModifierFlagsAlwaysIncludeJSDoc); } function getCombinedNodeFlags(node) { - return getCombinedFlags(node, (n) => n.flags); + return getCombinedFlags(node, getNodeFlags); + } + function getNodeFlags(node) { + return node.flags; } function validateLocaleAndSetLanguage(locale, sys2, errors) { const lowerCaseLocale = locale.toLowerCase(); - const matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(lowerCaseLocale); + const matchResult = /^([a-z]+)([_-]([a-z]+))?$/.exec(lowerCaseLocale); if (!matchResult) { if (errors) { errors.push(createCompilerDiagnostic(Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp")); @@ -11558,7 +11593,7 @@ ${lanes.join("\n")} return void 0; } function isParseTreeNode(node) { - return (node.flags & 8 /* Synthesized */) === 0; + return (node.flags & 16 /* Synthesized */) === 0; } function getParseTreeNode(node, nodeTest) { if (node === void 0 || isParseTreeNode(node)) { @@ -11601,30 +11636,30 @@ ${lanes.join("\n")} return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 225 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { + if (expr.kind === 226 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return expr.name; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 216 /* ParenthesizedExpression */: { + case 217 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 255 /* LabeledStatement */: { + case 256 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -11655,16 +11690,16 @@ ${lanes.join("\n")} switch (declaration.kind) { case 80 /* Identifier */: return declaration; - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: { + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 165 /* QualifiedName */) { + if (name.kind === 166 /* QualifiedName */) { return name.right; } break; } - case 212 /* CallExpression */: - case 225 /* BinaryExpression */: { + case 213 /* CallExpression */: + case 226 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -11680,15 +11715,15 @@ ${lanes.join("\n")} return void 0; } } - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 346 /* JSDocEnumTag */: + case 347 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -11935,10 +11970,10 @@ ${lanes.join("\n")} return getJSDocTags(node).filter((doc) => doc.kind === kind); } function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 327 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); + return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 328 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { - const kind = link.kind === 330 /* JSDocLink */ ? "link" : link.kind === 331 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; + const kind = link.kind === 331 /* JSDocLink */ ? "link" : link.kind === 332 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; const name = link.name ? entityNameToString(link.name) : ""; const space = link.name && link.text.startsWith("://") ? "" : " "; return `{@${kind} ${name}${space}${link.text}}`; @@ -11954,7 +11989,7 @@ ${lanes.join("\n")} return emptyArray; } if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 326 /* JSDoc */); + Debug.assert(node.parent.kind === 327 /* JSDoc */); return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); } if (node.typeParameters) { @@ -11982,20 +12017,20 @@ ${lanes.join("\n")} return node.kind === 80 /* Identifier */ || node.kind === 81 /* PrivateIdentifier */; } function isGetOrSetAccessorDeclaration(node) { - return node.kind === 177 /* SetAccessor */ || node.kind === 176 /* GetAccessor */; + return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */; } function isPropertyAccessChain(node) { - return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isPropertyAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isElementAccessChain(node) { - return isElementAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isElementAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isCallChain(node) { - return isCallExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isCallExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */ || kind === 212 /* CallExpression */ || kind === 234 /* NonNullExpression */); + return !!(node.flags & 64 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 235 /* NonNullExpression */); } function isOptionalChainRoot(node) { return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; @@ -12007,7 +12042,7 @@ ${lanes.join("\n")} return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; } function isNullishCoalesce(node) { - return node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; + return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; } function isConstTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; @@ -12016,37 +12051,37 @@ ${lanes.join("\n")} return skipOuterExpressions(node, 8 /* PartiallyEmittedExpressions */); } function isNonNullChain(node) { - return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isNonNullExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isBreakOrContinueStatement(node) { - return node.kind === 251 /* BreakStatement */ || node.kind === 250 /* ContinueStatement */; + return node.kind === 252 /* BreakStatement */ || node.kind === 251 /* ContinueStatement */; } function isNamedExportBindings(node) { - return node.kind === 279 /* NamespaceExport */ || node.kind === 278 /* NamedExports */; + return node.kind === 280 /* NamespaceExport */ || node.kind === 279 /* NamedExports */; } function isUnparsedTextLike(node) { switch (node.kind) { - case 308 /* UnparsedText */: - case 309 /* UnparsedInternalText */: + case 309 /* UnparsedText */: + case 310 /* UnparsedInternalText */: return true; default: return false; } } function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 306 /* UnparsedPrologue */ || node.kind === 310 /* UnparsedSyntheticReference */; + return isUnparsedTextLike(node) || node.kind === 307 /* UnparsedPrologue */ || node.kind === 311 /* UnparsedSyntheticReference */; } function isJSDocPropertyLikeTag(node) { - return node.kind === 354 /* JSDocPropertyTag */ || node.kind === 347 /* JSDocParameterTag */; + return node.kind === 355 /* JSDocPropertyTag */ || node.kind === 348 /* JSDocParameterTag */; } function isNode(node) { return isNodeKind(node.kind); } function isNodeKind(kind) { - return kind >= 165 /* FirstNode */; + return kind >= 166 /* FirstNode */; } function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 164 /* LastToken */; + return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; } function isToken(n) { return isTokenKind(n.kind); @@ -12062,11 +12097,11 @@ ${lanes.join("\n")} } function isLiteralExpressionOfObject(node) { switch (node.kind) { - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: case 14 /* RegularExpressionLiteral */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: return true; } return false; @@ -12086,23 +12121,23 @@ ${lanes.join("\n")} } function isTypeOnlyImportDeclaration(node) { switch (node.kind) { - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.isTypeOnly; - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: return node.isTypeOnly; } return false; } function isTypeOnlyExportDeclaration(node) { switch (node.kind) { - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause; - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return node.parent.isTypeOnly; } return false; @@ -12124,6 +12159,10 @@ ${lanes.join("\n")} var _a; return isPrivateIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0; } + function isFileLevelReservedGeneratedIdentifier(node) { + const flags = node.emitNode.autoGenerate.flags; + return !!(flags & 32 /* FileLevel */) && !!(flags & 16 /* Optimistic */) && !!(flags & 8 /* ReservedInNestedScopes */); + } function isPrivateIdentifierClassElementDeclaration(node) { return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name); } @@ -12146,7 +12185,7 @@ ${lanes.join("\n")} case 148 /* ReadonlyKeyword */: case 126 /* StaticKeyword */: case 147 /* OutKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return true; } return false; @@ -12155,22 +12194,22 @@ ${lanes.join("\n")} return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 163 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; + return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; } function isModifier(node) { return isModifierKind(node.kind); } function isEntityName(node) { const kind = node.kind; - return kind === 165 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 166 /* ComputedPropertyName */; + return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 205 /* ObjectBindingPattern */ || kind === 206 /* ArrayBindingPattern */; + return kind === 80 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); @@ -12186,13 +12225,13 @@ ${lanes.join("\n")} } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: return false; @@ -12200,14 +12239,14 @@ ${lanes.join("\n")} } function isFunctionLikeKind(kind) { switch (kind) { - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 183 /* FunctionType */: - case 323 /* JSDocFunctionType */: - case 184 /* ConstructorType */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 184 /* FunctionType */: + case 324 /* JSDocFunctionType */: + case 185 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -12218,22 +12257,22 @@ ${lanes.join("\n")} } function isClassElement(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 180 /* IndexSignature */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 239 /* SemicolonClassElement */; + return kind === 176 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 240 /* SemicolonClassElement */; } function isClassLike(node) { - return node && (node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */); + return node && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */); } function isAccessor(node) { - return node && (node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */); + return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); } function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } function isMethodOrAccessor(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -12241,10 +12280,10 @@ ${lanes.join("\n")} } function isNamedClassElement(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: return true; default: return false; @@ -12255,22 +12294,22 @@ ${lanes.join("\n")} } function isTypeElement(node) { const kind = node.kind; - return kind === 179 /* ConstructSignature */ || kind === 178 /* CallSignature */ || kind === 170 /* PropertySignature */ || kind === 172 /* MethodSignature */ || kind === 180 /* IndexSignature */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function isClassOrTypeElement(node) { return isTypeElement(node) || isClassElement(node); } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 304 /* SpreadAssignment */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 305 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return true; } return false; @@ -12278,23 +12317,23 @@ ${lanes.join("\n")} function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 206 /* ArrayBindingPattern */ || kind === 205 /* ObjectBindingPattern */; + return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 208 /* ArrayLiteralExpression */ || kind === 209 /* ObjectLiteralExpression */; + return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 207 /* BindingElement */ || kind === 231 /* OmittedExpression */; + return kind === 208 /* BindingElement */ || kind === 232 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: return true; } return false; @@ -12307,40 +12346,40 @@ ${lanes.join("\n")} } function isObjectBindingOrAssignmentPattern(node) { switch (node.kind) { - case 205 /* ObjectBindingPattern */: - case 209 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 210 /* ObjectLiteralExpression */: return true; } return false; } function isObjectBindingOrAssignmentElement(node) { switch (node.kind) { - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return true; } return false; } function isArrayBindingOrAssignmentPattern(node) { switch (node.kind) { - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return true; } return false; } function isArrayBindingOrAssignmentElement(node) { switch (node.kind) { - case 207 /* BindingElement */: - case 231 /* OmittedExpression */: - case 229 /* SpreadElement */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: + case 208 /* BindingElement */: + case 232 /* OmittedExpression */: + case 230 /* SpreadElement */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return true; } return isAssignmentExpression( @@ -12351,50 +12390,50 @@ ${lanes.join("\n")} } function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; - return kind === 210 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */ || kind === 204 /* ImportType */; + return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 205 /* ImportType */; } function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; - return kind === 210 /* PropertyAccessExpression */ || kind === 165 /* QualifiedName */; + return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; } function isCallLikeExpression(node) { switch (node.kind) { - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 169 /* Decorator */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 170 /* Decorator */: return true; default: return false; } } function isCallOrNewExpression(node) { - return node.kind === 212 /* CallExpression */ || node.kind === 213 /* NewExpression */; + return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 227 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; + return kind === 228 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 213 /* NewExpression */: - case 212 /* CallExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: - case 214 /* TaggedTemplateExpression */: - case 208 /* ArrayLiteralExpression */: - case 216 /* ParenthesizedExpression */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 214 /* NewExpression */: + case 213 /* CallExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: + case 215 /* TaggedTemplateExpression */: + case 209 /* ArrayLiteralExpression */: + case 217 /* ParenthesizedExpression */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: case 80 /* Identifier */: case 81 /* PrivateIdentifier */: case 14 /* RegularExpressionLiteral */: @@ -12402,17 +12441,17 @@ ${lanes.join("\n")} case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 110 /* ThisKeyword */: case 112 /* TrueKeyword */: case 108 /* SuperKeyword */: - case 234 /* NonNullExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 235 /* MetaProperty */: + case 235 /* NonNullExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 236 /* MetaProperty */: case 102 /* ImportKeyword */: - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return true; default: return false; @@ -12423,13 +12462,13 @@ ${lanes.join("\n")} } function isUnaryExpressionKind(kind) { switch (kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: - case 219 /* DeleteExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 222 /* AwaitExpression */: - case 215 /* TypeAssertionExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 220 /* DeleteExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 223 /* AwaitExpression */: + case 216 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -12437,9 +12476,9 @@ ${lanes.join("\n")} } function isUnaryExpressionWithWrite(expr) { switch (expr.kind) { - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return true; - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; default: return false; @@ -12450,7 +12489,7 @@ ${lanes.join("\n")} case 106 /* NullKeyword */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -12461,16 +12500,16 @@ ${lanes.join("\n")} } function isExpressionKind(kind) { switch (kind) { - case 226 /* ConditionalExpression */: - case 228 /* YieldExpression */: - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 229 /* SpreadElement */: - case 233 /* AsExpression */: - case 231 /* OmittedExpression */: - case 360 /* CommaListExpression */: - case 359 /* PartiallyEmittedExpression */: - case 237 /* SatisfiesExpression */: + case 227 /* ConditionalExpression */: + case 229 /* YieldExpression */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 230 /* SpreadElement */: + case 234 /* AsExpression */: + case 232 /* OmittedExpression */: + case 361 /* CommaListExpression */: + case 360 /* PartiallyEmittedExpression */: + case 238 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -12478,20 +12517,20 @@ ${lanes.join("\n")} } function isAssertionExpression(node) { const kind = node.kind; - return kind === 215 /* TypeAssertionExpression */ || kind === 233 /* AsExpression */; + return kind === 216 /* TypeAssertionExpression */ || kind === 234 /* AsExpression */; } function isNotEmittedOrPartiallyEmittedNode(node) { return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); } function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return true; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; @@ -12509,7 +12548,7 @@ ${lanes.join("\n")} return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); } function isForInOrOfStatement(node) { - return node.kind === 248 /* ForInStatement */ || node.kind === 249 /* ForOfStatement */; + return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */; } function isConciseBody(node) { return isBlock(node) || isExpression(node); @@ -12522,89 +12561,89 @@ ${lanes.join("\n")} } function isModuleBody(node) { const kind = node.kind; - return kind === 267 /* ModuleBlock */ || kind === 266 /* ModuleDeclaration */ || kind === 80 /* Identifier */; + return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */ || kind === 80 /* Identifier */; } function isNamespaceBody(node) { const kind = node.kind; - return kind === 267 /* ModuleBlock */ || kind === 266 /* ModuleDeclaration */; + return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */; } function isJSDocNamespaceBody(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 266 /* ModuleDeclaration */; + return kind === 80 /* Identifier */ || kind === 267 /* ModuleDeclaration */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 274 /* NamedImports */ || kind === 273 /* NamespaceImport */; + return kind === 275 /* NamedImports */ || kind === 274 /* NamespaceImport */; } function isModuleOrEnumDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */ || node.kind === 265 /* EnumDeclaration */; + return node.kind === 267 /* ModuleDeclaration */ || node.kind === 266 /* EnumDeclaration */; } function canHaveSymbol(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 207 /* BindingElement */: - case 212 /* CallExpression */: - case 178 /* CallSignature */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 174 /* ClassStaticBlockDeclaration */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 211 /* ElementAccessExpression */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: - case 280 /* ExportSpecifier */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 208 /* BindingElement */: + case 213 /* CallExpression */: + case 179 /* CallSignature */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 175 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 212 /* ElementAccessExpression */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: + case 281 /* ExportSpecifier */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: case 80 /* Identifier */: - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: - case 323 /* JSDocFunctionType */: - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: - case 329 /* JSDocSignature */: - case 352 /* JSDocTypedefTag */: - case 328 /* JSDocTypeLiteral */: - case 290 /* JsxAttribute */: - case 291 /* JsxAttributes */: - case 292 /* JsxSpreadAttribute */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 201 /* NamedTupleMember */: - case 279 /* NamespaceExport */: - case 269 /* NamespaceExportDeclaration */: - case 273 /* NamespaceImport */: - case 213 /* NewExpression */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: + case 324 /* JSDocFunctionType */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 330 /* JSDocSignature */: + case 353 /* JSDocTypedefTag */: + case 329 /* JSDocTypeLiteral */: + case 291 /* JsxAttribute */: + case 292 /* JsxAttributes */: + case 293 /* JsxSpreadAttribute */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 202 /* NamedTupleMember */: + case 280 /* NamespaceExport */: + case 270 /* NamespaceExportDeclaration */: + case 274 /* NamespaceImport */: + case 214 /* NewExpression */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: - case 209 /* ObjectLiteralExpression */: - case 168 /* Parameter */: - case 210 /* PropertyAccessExpression */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 311 /* SourceFile */: - case 304 /* SpreadAssignment */: + case 210 /* ObjectLiteralExpression */: + case 169 /* Parameter */: + case 211 /* PropertyAccessExpression */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 312 /* SourceFile */: + case 305 /* SpreadAssignment */: case 11 /* StringLiteral */: - case 264 /* TypeAliasDeclaration */: - case 186 /* TypeLiteral */: - case 167 /* TypeParameter */: - case 259 /* VariableDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 187 /* TypeLiteral */: + case 168 /* TypeParameter */: + case 260 /* VariableDeclaration */: return true; default: return false; @@ -12612,53 +12651,53 @@ ${lanes.join("\n")} } function canHaveLocals(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 240 /* Block */: - case 178 /* CallSignature */: - case 268 /* CaseBlock */: - case 298 /* CatchClause */: - case 174 /* ClassStaticBlockDeclaration */: - case 193 /* ConditionalType */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: - case 180 /* IndexSignature */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 352 /* JSDocTypedefTag */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 177 /* SetAccessor */: - case 311 /* SourceFile */: - case 264 /* TypeAliasDeclaration */: + case 219 /* ArrowFunction */: + case 241 /* Block */: + case 179 /* CallSignature */: + case 269 /* CaseBlock */: + case 299 /* CatchClause */: + case 175 /* ClassStaticBlockDeclaration */: + case 194 /* ConditionalType */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: + case 181 /* IndexSignature */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 353 /* JSDocTypedefTag */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 178 /* SetAccessor */: + case 312 /* SourceFile */: + case 265 /* TypeAliasDeclaration */: return true; default: return false; } } function isDeclarationKind(kind) { - return kind === 218 /* ArrowFunction */ || kind === 207 /* BindingElement */ || kind === 262 /* ClassDeclaration */ || kind === 230 /* ClassExpression */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 175 /* Constructor */ || kind === 265 /* EnumDeclaration */ || kind === 305 /* EnumMember */ || kind === 280 /* ExportSpecifier */ || kind === 261 /* FunctionDeclaration */ || kind === 217 /* FunctionExpression */ || kind === 176 /* GetAccessor */ || kind === 272 /* ImportClause */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 275 /* ImportSpecifier */ || kind === 263 /* InterfaceDeclaration */ || kind === 290 /* JsxAttribute */ || kind === 173 /* MethodDeclaration */ || kind === 172 /* MethodSignature */ || kind === 266 /* ModuleDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 273 /* NamespaceImport */ || kind === 279 /* NamespaceExport */ || kind === 168 /* Parameter */ || kind === 302 /* PropertyAssignment */ || kind === 171 /* PropertyDeclaration */ || kind === 170 /* PropertySignature */ || kind === 177 /* SetAccessor */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 264 /* TypeAliasDeclaration */ || kind === 167 /* TypeParameter */ || kind === 259 /* VariableDeclaration */ || kind === 352 /* JSDocTypedefTag */ || kind === 344 /* JSDocCallbackTag */ || kind === 354 /* JSDocPropertyTag */; + return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 176 /* Constructor */ || kind === 266 /* EnumDeclaration */ || kind === 306 /* EnumMember */ || kind === 281 /* ExportSpecifier */ || kind === 262 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 273 /* ImportClause */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 276 /* ImportSpecifier */ || kind === 264 /* InterfaceDeclaration */ || kind === 291 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 267 /* ModuleDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 274 /* NamespaceImport */ || kind === 280 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 303 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 265 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 260 /* VariableDeclaration */ || kind === 353 /* JSDocTypedefTag */ || kind === 345 /* JSDocCallbackTag */ || kind === 355 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 261 /* FunctionDeclaration */ || kind === 281 /* MissingDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 269 /* NamespaceExportDeclaration */; + return kind === 262 /* FunctionDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 270 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 251 /* BreakStatement */ || kind === 250 /* ContinueStatement */ || kind === 258 /* DebuggerStatement */ || kind === 245 /* DoStatement */ || kind === 243 /* ExpressionStatement */ || kind === 241 /* EmptyStatement */ || kind === 248 /* ForInStatement */ || kind === 249 /* ForOfStatement */ || kind === 247 /* ForStatement */ || kind === 244 /* IfStatement */ || kind === 255 /* LabeledStatement */ || kind === 252 /* ReturnStatement */ || kind === 254 /* SwitchStatement */ || kind === 256 /* ThrowStatement */ || kind === 257 /* TryStatement */ || kind === 242 /* VariableStatement */ || kind === 246 /* WhileStatement */ || kind === 253 /* WithStatement */ || kind === 358 /* NotEmittedStatement */; + return kind === 252 /* BreakStatement */ || kind === 251 /* ContinueStatement */ || kind === 259 /* DebuggerStatement */ || kind === 246 /* DoStatement */ || kind === 244 /* ExpressionStatement */ || kind === 242 /* EmptyStatement */ || kind === 249 /* ForInStatement */ || kind === 250 /* ForOfStatement */ || kind === 248 /* ForStatement */ || kind === 245 /* IfStatement */ || kind === 256 /* LabeledStatement */ || kind === 253 /* ReturnStatement */ || kind === 255 /* SwitchStatement */ || kind === 257 /* ThrowStatement */ || kind === 258 /* TryStatement */ || kind === 243 /* VariableStatement */ || kind === 247 /* WhileStatement */ || kind === 254 /* WithStatement */ || kind === 359 /* NotEmittedStatement */; } function isDeclaration(node) { - if (node.kind === 167 /* TypeParameter */) { - return node.parent && node.parent.kind !== 351 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 168 /* TypeParameter */) { + return node.parent && node.parent.kind !== 352 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -12673,10 +12712,10 @@ ${lanes.join("\n")} return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 240 /* Block */) + if (node.kind !== 241 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 257 /* TryStatement */ || node.parent.kind === 298 /* CatchClause */) { + if (node.parent.kind === 258 /* TryStatement */ || node.parent.kind === 299 /* CatchClause */) { return false; } } @@ -12684,50 +12723,50 @@ ${lanes.join("\n")} } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 240 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 241 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 282 /* ExternalModuleReference */ || kind === 165 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 283 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 210 /* PropertyAccessExpression */ || kind === 294 /* JsxNamespacedName */; + return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 211 /* PropertyAccessExpression */ || kind === 295 /* JsxNamespacedName */; } function isJsxChild(node) { const kind = node.kind; - return kind === 283 /* JsxElement */ || kind === 293 /* JsxExpression */ || kind === 284 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 287 /* JsxFragment */; + return kind === 284 /* JsxElement */ || kind === 294 /* JsxExpression */ || kind === 285 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 288 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 290 /* JsxAttribute */ || kind === 292 /* JsxSpreadAttribute */; + return kind === 291 /* JsxAttribute */ || kind === 293 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 11 /* StringLiteral */ || kind === 293 /* JsxExpression */; + return kind === 11 /* StringLiteral */ || kind === 294 /* JsxExpression */; } function isJsxOpeningLikeElement(node) { const kind = node.kind; - return kind === 285 /* JsxOpeningElement */ || kind === 284 /* JsxSelfClosingElement */; + return kind === 286 /* JsxOpeningElement */ || kind === 285 /* JsxSelfClosingElement */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 295 /* CaseClause */ || kind === 296 /* DefaultClause */; + return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 315 /* FirstJSDocNode */ && node.kind <= 356 /* LastJSDocNode */; + return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 357 /* LastJSDocNode */; } function isJSDocCommentContainingNode(node) { - return node.kind === 326 /* JSDoc */ || node.kind === 325 /* JSDocNamepathType */ || node.kind === 327 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); + return node.kind === 327 /* JSDoc */ || node.kind === 326 /* JSDocNamepathType */ || node.kind === 328 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); } function isJSDocTag(node) { - return node.kind >= 333 /* FirstJSDocTagNode */ && node.kind <= 356 /* LastJSDocTagNode */; + return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <= 357 /* LastJSDocTagNode */; } function isSetAccessor(node) { - return node.kind === 177 /* SetAccessor */; + return node.kind === 178 /* SetAccessor */; } function isGetAccessor(node) { - return node.kind === 176 /* GetAccessor */; + return node.kind === 177 /* GetAccessor */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) @@ -12743,22 +12782,22 @@ ${lanes.join("\n")} } function hasOnlyExpressionInitializer(node) { switch (node.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: - case 305 /* EnumMember */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: + case 306 /* EnumMember */: return true; default: return false; } } function isObjectLiteralElement(node) { - return node.kind === 290 /* JsxAttribute */ || node.kind === 292 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); + return node.kind === 291 /* JsxAttribute */ || node.kind === 293 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); } function isTypeReferenceType(node) { - return node.kind === 182 /* TypeReference */ || node.kind === 232 /* ExpressionWithTypeArguments */; + return node.kind === 183 /* TypeReference */ || node.kind === 233 /* ExpressionWithTypeArguments */; } function guessIndentation(lines) { let indentation = MAX_SMI_X86; @@ -12785,7 +12824,7 @@ ${lanes.join("\n")} return node.kind === 11 /* StringLiteral */ || node.kind === 15 /* NoSubstitutionTemplateLiteral */; } function isJSDocLinkLike(node) { - return node.kind === 330 /* JSDocLink */ || node.kind === 331 /* JSDocLinkCode */ || node.kind === 332 /* JSDocLinkPlain */; + return node.kind === 331 /* JSDocLink */ || node.kind === 332 /* JSDocLinkCode */ || node.kind === 333 /* JSDocLinkPlain */; } function hasRestParameter(s) { const last2 = lastOrUndefined(s.parameters); @@ -12793,7 +12832,7 @@ ${lanes.join("\n")} } function isRestParameter(node) { const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 324 /* JSDocVariadicType */; + return node.dotDotDotToken !== void 0 || !!type && type.kind === 325 /* JSDocVariadicType */; } var unchangedTextChangeRange, supportedLocaleDirectories, MAX_SMI_X86; var init_utilitiesPublic = __esm({ @@ -13015,19 +13054,19 @@ ${lanes.join("\n")} } function containsParseError(node) { aggregateChildData(node); - return (node.flags & 524288 /* ThisNodeOrAnySubNodesHasError */) !== 0; + return (node.flags & 1048576 /* ThisNodeOrAnySubNodesHasError */) !== 0; } function aggregateChildData(node) { - if (!(node.flags & 1048576 /* HasAggregatedChildData */)) { - const thisNodeOrAnySubNodesHasError = (node.flags & 131072 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); + if (!(node.flags & 2097152 /* HasAggregatedChildData */)) { + const thisNodeOrAnySubNodesHasError = (node.flags & 262144 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); if (thisNodeOrAnySubNodesHasError) { - node.flags |= 524288 /* ThisNodeOrAnySubNodesHasError */; + node.flags |= 1048576 /* ThisNodeOrAnySubNodesHasError */; } - node.flags |= 1048576 /* HasAggregatedChildData */; + node.flags |= 2097152 /* HasAggregatedChildData */; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 311 /* SourceFile */) { + while (node && node.kind !== 312 /* SourceFile */) { node = node.parent; } return node; @@ -13040,11 +13079,11 @@ ${lanes.join("\n")} } function isStatementWithLocals(node) { switch (node.kind) { - case 240 /* Block */: - case 268 /* CaseBlock */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return true; } return false; @@ -13203,7 +13242,7 @@ ${lanes.join("\n")} if (includeJsDoc && hasJSDocNodes(node)) { return getTokenPosOfNode(node.jsDoc[0], sourceFile); } - if (node.kind === 357 /* SyntaxList */ && node._children.length > 0) { + if (node.kind === 358 /* SyntaxList */ && node._children.length > 0) { return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); } return skipTrivia( @@ -13718,11 +13757,11 @@ ${lanes.join("\n")} return getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); } function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 3 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclarationOrBindingElement(declaration); + return (getCombinedNodeFlags(declaration) & 7 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclarationOrBindingElement(declaration); } function isCatchClauseVariableDeclarationOrBindingElement(declaration) { const node = getRootDeclaration(declaration); - return node.kind === 259 /* VariableDeclaration */ && node.parent.kind === 298 /* CatchClause */; + return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; } function isAmbientModule(node) { return isModuleDeclaration(node) && (node.name.kind === 11 /* StringLiteral */ || isGlobalScopeAugmentation(node)); @@ -13740,22 +13779,22 @@ ${lanes.join("\n")} return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node) { - return !!node && node.kind === 266 /* ModuleDeclaration */ && !node.body; + return !!node && node.kind === 267 /* ModuleDeclaration */ && !node.body; } function isBlockScopedContainerTopLevel(node) { - return node.kind === 311 /* SourceFile */ || node.kind === 266 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); + return node.kind === 312 /* SourceFile */ || node.kind === 267 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); } function isGlobalScopeAugmentation(module2) { - return !!(module2.flags & 1024 /* GlobalAugmentation */); + return !!(module2.flags & 2048 /* GlobalAugmentation */); } function isExternalModuleAugmentation(node) { return isAmbientModule(node) && isModuleAugmentationExternal(node); } function isModuleAugmentationExternal(node) { switch (node.parent.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return isExternalModule(node.parent); - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); } return false; @@ -13798,28 +13837,28 @@ ${lanes.join("\n")} return false; } function isAmbientPropertyDeclaration(node) { - return !!(node.flags & 16777216 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); + return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); } function isBlockScope(node, parentNode) { switch (node.kind) { - case 311 /* SourceFile */: - case 268 /* CaseBlock */: - case 298 /* CatchClause */: - case 266 /* ModuleDeclaration */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 171 /* PropertyDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: + case 312 /* SourceFile */: + case 269 /* CaseBlock */: + case 299 /* CatchClause */: + case 267 /* ModuleDeclaration */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 172 /* PropertyDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return true; - case 240 /* Block */: + case 241 /* Block */: return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); } return false; @@ -13827,9 +13866,9 @@ ${lanes.join("\n")} function isDeclarationWithTypeParameters(node) { Debug.type(node); switch (node.kind) { - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: - case 329 /* JSDocSignature */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 330 /* JSDocSignature */: return true; default: assertType(node); @@ -13839,25 +13878,25 @@ ${lanes.join("\n")} function isDeclarationWithTypeParameterChildren(node) { Debug.type(node); switch (node.kind) { - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 323 /* JSDocFunctionType */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 351 /* JSDocTemplateTag */: - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 324 /* JSDocFunctionType */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 352 /* JSDocTemplateTag */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: assertType(node); @@ -13866,8 +13905,8 @@ ${lanes.join("\n")} } function isAnyImportSyntax(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: return true; default: return false; @@ -13878,15 +13917,15 @@ ${lanes.join("\n")} } function isLateVisibilityPaintedStatement(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 242 /* VariableStatement */: - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 243 /* VariableStatement */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: return true; default: return false; @@ -13898,6 +13937,9 @@ ${lanes.join("\n")} function isAnyImportOrReExport(node) { return isAnyImportSyntax(node) || isExportDeclaration(node); } + function getEnclosingContainer(node) { + return findAncestor(node.parent, (n) => !!(getContainerFlags(n) & 1 /* IsContainer */)); + } function getEnclosingBlockScopeContainer(node) { return findAncestor(node.parent, (current) => isBlockScope(current, current.parent)); } @@ -13915,7 +13957,7 @@ ${lanes.join("\n")} return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; } function isComputedNonLiteralName(name) { - return name.kind === 166 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a; @@ -13927,11 +13969,11 @@ ${lanes.join("\n")} case 9 /* NumericLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -13947,17 +13989,17 @@ ${lanes.join("\n")} case 81 /* PrivateIdentifier */: case 80 /* Identifier */: return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); } - case 317 /* JSDocMemberName */: + case 318 /* JSDocMemberName */: return entityNameToString(name.left) + entityNameToString(name.right); - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return entityNameToString(name.namespace) + ":" + entityNameToString(name.name); default: return Debug.assertNever(name); @@ -14063,7 +14105,7 @@ ${lanes.join("\n")} } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 240 /* Block */) { + if (node.body && node.body.kind === 241 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -14075,7 +14117,7 @@ ${lanes.join("\n")} function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 311 /* SourceFile */: { + case 312 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -14087,43 +14129,43 @@ ${lanes.join("\n")} } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 264 /* TypeAliasDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 273 /* NamespaceImport */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 265 /* TypeAliasDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 274 /* NamespaceImport */: errorNode = node.name; break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: { + case 296 /* CaseClause */: + case 297 /* DefaultClause */: { const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); } - case 252 /* ReturnStatement */: - case 228 /* YieldExpression */: { + case 253 /* ReturnStatement */: + case 229 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 237 /* SatisfiesExpression */: { + case 238 /* SatisfiesExpression */: { const pos2 = skipTrivia(sourceFile.text, node.expression.end); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 356 /* JSDocSatisfiesTag */: { + case 357 /* JSDocSatisfiesTag */: { const pos2 = skipTrivia(sourceFile.text, node.tagName.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } @@ -14155,17 +14197,23 @@ ${lanes.join("\n")} function isDeclarationReadonly(declaration) { return !!(getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); } + function isVarAwaitUsing(node) { + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 6 /* AwaitUsing */; + } + function isVarUsing(node) { + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 4 /* Using */; + } function isVarConst(node) { - return !!(getCombinedNodeFlags(node) & 2 /* Const */); + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 2 /* Const */; } function isLet(node) { - return !!(getCombinedNodeFlags(node) & 1 /* Let */); + return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 1 /* Let */; } function isSuperCall(n) { - return n.kind === 212 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; + return n.kind === 213 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; } function isImportCall(n) { - return n.kind === 212 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */; + return n.kind === 213 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */; } function isImportMeta(n) { return isMetaProperty(n) && n.keywordToken === 102 /* ImportKeyword */ && n.name.escapedText === "meta"; @@ -14174,7 +14222,7 @@ ${lanes.join("\n")} return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); } function isPrologueDirective(node) { - return node.kind === 243 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; + return node.kind === 244 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -14192,18 +14240,18 @@ ${lanes.join("\n")} return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 168 /* Parameter */ || node.kind === 167 /* TypeParameter */ || node.kind === 217 /* FunctionExpression */ || node.kind === 218 /* ArrowFunction */ || node.kind === 216 /* ParenthesizedExpression */ || node.kind === 259 /* VariableDeclaration */ || node.kind === 280 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 260 /* VariableDeclaration */ || node.kind === 281 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } function isPartOfTypeNode(node) { - if (181 /* FirstTypeNode */ <= node.kind && node.kind <= 204 /* LastTypeNode */) { + if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) { return true; } switch (node.kind) { case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 154 /* StringKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: @@ -14213,64 +14261,64 @@ ${lanes.join("\n")} case 146 /* NeverKeyword */: return true; case 116 /* VoidKeyword */: - return node.parent.kind !== 221 /* VoidExpression */; - case 232 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 222 /* VoidExpression */; + case 233 /* ExpressionWithTypeArguments */: return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 167 /* TypeParameter */: - return node.parent.kind === 199 /* MappedType */ || node.parent.kind === 194 /* InferType */; + case 168 /* TypeParameter */: + return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */; case 80 /* Identifier */: - if (node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) { node = node.parent; - } else if (node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.name === node) { + } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } Debug.assert( - node.kind === 80 /* Identifier */ || node.kind === 165 /* QualifiedName */ || node.kind === 210 /* PropertyAccessExpression */, + node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." ); - case 165 /* QualifiedName */: - case 210 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: case 110 /* ThisKeyword */: { const { parent: parent2 } = node; - if (parent2.kind === 185 /* TypeQuery */) { + if (parent2.kind === 186 /* TypeQuery */) { return false; } - if (parent2.kind === 204 /* ImportType */) { + if (parent2.kind === 205 /* ImportType */) { return !parent2.isTypeOf; } - if (181 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 204 /* LastTypeNode */) { + if (182 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 205 /* LastTypeNode */) { return true; } switch (parent2.kind) { - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isHeritageClause(parent2.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent2); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return node === parent2.constraint; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return node === parent2.constraint; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 168 /* Parameter */: - case 259 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 169 /* Parameter */: + case 260 /* VariableDeclaration */: return node === parent2.type; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return node === parent2.type; - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return node === parent2.type; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return node === parent2.type; - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: return contains(parent2.typeArguments, node); } } @@ -14290,23 +14338,23 @@ ${lanes.join("\n")} return traverse(body); function traverse(node) { switch (node.kind) { - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitor(node); - case 268 /* CaseBlock */: - case 240 /* Block */: - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 253 /* WithStatement */: - case 254 /* SwitchStatement */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 255 /* LabeledStatement */: - case 257 /* TryStatement */: - case 298 /* CatchClause */: + case 269 /* CaseBlock */: + case 241 /* Block */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 254 /* WithStatement */: + case 255 /* SwitchStatement */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 256 /* LabeledStatement */: + case 258 /* TryStatement */: + case 299 /* CatchClause */: return forEachChild(node, traverse); } } @@ -14315,21 +14363,21 @@ ${lanes.join("\n")} return traverse(body); function traverse(node) { switch (node.kind) { - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: visitor(node); const operand = node.expression; if (operand) { traverse(operand); } return; - case 265 /* EnumDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: return; default: if (isFunctionLike(node)) { - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { traverse(node.name.expression); return; } @@ -14340,9 +14388,9 @@ ${lanes.join("\n")} } } function getRestParameterElementType(node) { - if (node && node.kind === 187 /* ArrayType */) { + if (node && node.kind === 188 /* ArrayType */) { return node.elementType; - } else if (node && node.kind === 182 /* TypeReference */) { + } else if (node && node.kind === 183 /* TypeReference */) { return singleOrUndefined(node.typeArguments); } else { return void 0; @@ -14350,26 +14398,26 @@ ${lanes.join("\n")} } function getMembersOfDeclaration(node) { switch (node.kind) { - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 186 /* TypeLiteral */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 187 /* TypeLiteral */: return node.members; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return node.properties; } } function isVariableLike(node) { if (node) { switch (node.kind) { - case 207 /* BindingElement */: - case 305 /* EnumMember */: - case 168 /* Parameter */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 303 /* ShorthandPropertyAssignment */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 306 /* EnumMember */: + case 169 /* Parameter */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 304 /* ShorthandPropertyAssignment */: + case 260 /* VariableDeclaration */: return true; } } @@ -14379,7 +14427,7 @@ ${lanes.join("\n")} return isVariableLike(node) || isAccessor(node); } function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 260 /* VariableDeclarationList */ && node.parent.parent.kind === 242 /* VariableStatement */; + return node.parent.kind === 261 /* VariableDeclarationList */ && node.parent.parent.kind === 243 /* VariableStatement */; } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) @@ -14396,13 +14444,13 @@ ${lanes.join("\n")} } function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return true; } return false; @@ -14412,20 +14460,20 @@ ${lanes.join("\n")} if (beforeUnwrapLabelCallback) { beforeUnwrapLabelCallback(node); } - if (node.statement.kind !== 255 /* LabeledStatement */) { + if (node.statement.kind !== 256 /* LabeledStatement */) { return node.statement; } node = node.statement; } } function isFunctionBlock(node) { - return node && node.kind === 240 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 241 /* Block */ && isFunctionLike(node.parent); } function isObjectLiteralMethod(node) { - return node && node.kind === 173 /* MethodDeclaration */ && node.parent.kind === 209 /* ObjectLiteralExpression */; + return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */; } function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 173 /* MethodDeclaration */ || node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */) && (node.parent.kind === 209 /* ObjectLiteralExpression */ || node.parent.kind === 230 /* ClassExpression */); + return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 231 /* ClassExpression */); } function isIdentifierTypePredicate(predicate) { return predicate && predicate.kind === 1 /* Identifier */; @@ -14480,64 +14528,68 @@ ${lanes.join("\n")} function getContainingFunctionOrClassStaticBlock(node) { return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration); } + function getContainingClassExcludingClassDecorators(node) { + const decorator = findAncestor(node.parent, (n) => isClassLike(n) ? "quit" : isDecorator(n)); + return decorator && isClassLike(decorator.parent) ? getContainingClass(decorator.parent) : getContainingClass(decorator ?? node); + } function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) { - Debug.assert(node.kind !== 311 /* SourceFile */); + Debug.assert(node.kind !== 312 /* SourceFile */); while (true) { node = node.parent; if (!node) { return Debug.fail(); } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) { return node; } node = node.parent.parent; break; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 266 /* ModuleDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 265 /* EnumDeclaration */: - case 311 /* SourceFile */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 267 /* ModuleDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 266 /* EnumDeclaration */: + case 312 /* SourceFile */: return node; } } } function isThisContainerOrFunctionBlock(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 171 /* PropertyDeclaration */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 172 /* PropertyDeclaration */: return true; - case 240 /* Block */: + case 241 /* Block */: switch (node.parent.kind) { - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -14569,9 +14621,9 @@ ${lanes.join("\n")} ); if (container) { switch (container.kind) { - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return container; } } @@ -14584,26 +14636,26 @@ ${lanes.join("\n")} return void 0; } switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: node = node.parent; break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: return node; - case 169 /* Decorator */: - if (node.parent.kind === 168 /* Parameter */ && isClassElement(node.parent.parent)) { + case 170 /* Decorator */: + if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { node = node.parent.parent; } else if (isClassElement(node.parent)) { node = node.parent; @@ -14613,14 +14665,14 @@ ${lanes.join("\n")} } } function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 217 /* FunctionExpression */ || func.kind === 218 /* ArrowFunction */) { + if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) { let prev = func; let parent2 = func.parent; - while (parent2.kind === 216 /* ParenthesizedExpression */) { + while (parent2.kind === 217 /* ParenthesizedExpression */) { prev = parent2; parent2 = parent2.parent; } - if (parent2.kind === 212 /* CallExpression */ && parent2.expression === prev) { + if (parent2.kind === 213 /* CallExpression */ && parent2.expression === prev) { return parent2; } } @@ -14630,11 +14682,11 @@ ${lanes.join("\n")} } function isSuperProperty(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; } function isThisProperty(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; } function isThisInitializedDeclaration(node) { var _a; @@ -14645,22 +14697,22 @@ ${lanes.join("\n")} } function getEntityNameFromTypeNode(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isEntityNameExpression(node.expression) ? node.expression : void 0; case 80 /* Identifier */: - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return node; } return void 0; } function getInvokedExpression(node) { switch (node.kind) { - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return node.tag; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return node.tagName; default: return node.expression; @@ -14671,20 +14723,20 @@ ${lanes.join("\n")} return false; } switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return true; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return !useLegacyDecorators; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2)); - case 168 /* Parameter */: + case 169 /* Parameter */: if (!useLegacyDecorators) return false; - return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 175 /* Constructor */ || parent2.kind === 173 /* MethodDeclaration */ || parent2.kind === 177 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 262 /* ClassDeclaration */; + return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 176 /* Constructor */ || parent2.kind === 174 /* MethodDeclaration */ || parent2.kind === 178 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 263 /* ClassDeclaration */; } return false; } @@ -14696,13 +14748,13 @@ ${lanes.join("\n")} } function childIsDecorated(useLegacyDecorators, node, parent2) { switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent2)); default: return false; @@ -14753,7 +14805,7 @@ ${lanes.join("\n")} } function isJSXTagName(node) { const { parent: parent2 } = node; - if (parent2.kind === 285 /* JsxOpeningElement */ || parent2.kind === 284 /* JsxSelfClosingElement */ || parent2.kind === 286 /* JsxClosingElement */) { + if (parent2.kind === 286 /* JsxOpeningElement */ || parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 287 /* JsxClosingElement */) { return parent2.tagName === node; } return false; @@ -14765,54 +14817,54 @@ ${lanes.join("\n")} case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: case 14 /* RegularExpressionLiteral */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 233 /* AsExpression */: - case 215 /* TypeAssertionExpression */: - case 237 /* SatisfiesExpression */: - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 220 /* TypeOfExpression */: - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: - case 225 /* BinaryExpression */: - case 226 /* ConditionalExpression */: - case 229 /* SpreadElement */: - case 227 /* TemplateExpression */: - case 231 /* OmittedExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: - case 228 /* YieldExpression */: - case 222 /* AwaitExpression */: - case 235 /* MetaProperty */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 234 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 238 /* SatisfiesExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 221 /* TypeOfExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 226 /* BinaryExpression */: + case 227 /* ConditionalExpression */: + case 230 /* SpreadElement */: + case 228 /* TemplateExpression */: + case 232 /* OmittedExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: + case 229 /* YieldExpression */: + case 223 /* AwaitExpression */: + case 236 /* MetaProperty */: return true; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); - case 165 /* QualifiedName */: - while (node.parent.kind === 165 /* QualifiedName */) { + case 166 /* QualifiedName */: + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 317 /* JSDocMemberName */: + return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + case 318 /* JSDocMemberName */: while (isJSDocMemberName(node.parent)) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); + return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); case 81 /* PrivateIdentifier */: return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 103 /* InKeyword */; case 80 /* Identifier */: - if (node.parent.kind === 185 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { + if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; } case 9 /* NumericLiteral */: @@ -14828,64 +14880,64 @@ ${lanes.join("\n")} function isInExpressionContext(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 305 /* EnumMember */: - case 302 /* PropertyAssignment */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 306 /* EnumMember */: + case 303 /* PropertyAssignment */: + case 208 /* BindingElement */: return parent2.initializer === node; - case 243 /* ExpressionStatement */: - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 252 /* ReturnStatement */: - case 253 /* WithStatement */: - case 254 /* SwitchStatement */: - case 295 /* CaseClause */: - case 256 /* ThrowStatement */: + case 244 /* ExpressionStatement */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 253 /* ReturnStatement */: + case 254 /* WithStatement */: + case 255 /* SwitchStatement */: + case 296 /* CaseClause */: + case 257 /* ThrowStatement */: return parent2.expression === node; - case 247 /* ForStatement */: + case 248 /* ForStatement */: const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 260 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + return forStatement.initializer === node && forStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 260 /* VariableDeclarationList */ || forInStatement.expression === node; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + return forInStatement.initializer === node && forInStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInStatement.expression === node; + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return node === parent2.expression; - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return node === parent2.expression; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return node === parent2.expression; - case 169 /* Decorator */: - case 293 /* JsxExpression */: - case 292 /* JsxSpreadAttribute */: - case 304 /* SpreadAssignment */: + case 170 /* Decorator */: + case 294 /* JsxExpression */: + case 293 /* JsxSpreadAttribute */: + case 305 /* SpreadAssignment */: return true; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return parent2.expression === node && !isPartOfTypeNode(parent2); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return parent2.objectAssignmentInitializer === node; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return node === parent2.expression; default: return isExpressionNode(parent2); } } function isPartOfTypeQuery(node) { - while (node.kind === 165 /* QualifiedName */ || node.kind === 80 /* Identifier */) { + while (node.kind === 166 /* QualifiedName */ || node.kind === 80 /* Identifier */) { node = node.parent; } - return node.kind === 185 /* TypeQuery */; + return node.kind === 186 /* TypeQuery */; } function isNamespaceReexportDeclaration(node) { return isNamespaceExport(node) && !!node.parent.moduleSpecifier; } function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 282 /* ExternalModuleReference */; + return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */; } function getExternalModuleImportEqualsDeclarationExpression(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node)); @@ -14895,7 +14947,7 @@ ${lanes.join("\n")} return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; } function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 282 /* ExternalModuleReference */; + return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 283 /* ExternalModuleReference */; } function isSourceFileJS(file) { return isInJSFile(file); @@ -14904,22 +14956,22 @@ ${lanes.join("\n")} return !isInJSFile(file); } function isInJSFile(node) { - return !!node && !!(node.flags & 262144 /* JavaScriptFile */); + return !!node && !!(node.flags & 524288 /* JavaScriptFile */); } function isInJsonFile(node) { - return !!node && !!(node.flags & 67108864 /* JsonFile */); + return !!node && !!(node.flags & 134217728 /* JsonFile */); } function isSourceFileNotJson(file) { return !isJsonSourceFile(file); } function isInJSDoc(node) { - return !!node && !!(node.flags & 8388608 /* JSDoc */); + return !!node && !!(node.flags & 16777216 /* JSDoc */); } function isJSDocIndexSignature(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 154 /* StringKeyword */ || node.typeArguments[0].kind === 150 /* NumberKeyword */); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 212 /* CallExpression */) { + if (callExpression.kind !== 213 /* CallExpression */) { return false; } const { expression, arguments: args } = callExpression; @@ -14996,9 +15048,9 @@ ${lanes.join("\n")} function getExpandoInitializer(initializer, isPrototypeAssignment) { if (isCallExpression(initializer)) { const e = skipParentheses(initializer.expression); - return e.kind === 217 /* FunctionExpression */ || e.kind === 218 /* ArrowFunction */ ? initializer : void 0; + return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0; } - if (initializer.kind === 217 /* FunctionExpression */ || initializer.kind === 230 /* ClassExpression */ || initializer.kind === 218 /* ArrowFunction */) { + if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 231 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) { return initializer; } if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { @@ -15189,11 +15241,11 @@ ${lanes.join("\n")} return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 243 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 244 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol, node) { const { valueDeclaration } = symbol; - if (!valueDeclaration || !(node.flags & 16777216 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 16777216 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) { + if (!valueDeclaration || !(node.flags & 33554432 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 33554432 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) { symbol.valueDeclaration = node; } } @@ -15202,29 +15254,29 @@ ${lanes.join("\n")} return false; } const decl = symbol.valueDeclaration; - return decl.kind === 261 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); + return decl.kind === 262 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); } function tryGetModuleSpecifierFromDeclaration(node) { var _a, _b; switch (node.kind) { - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: return (_a = findAncestor(node.initializer, (node2) => isRequireCall( node2, /*requireStringLiteralLikeArgument*/ true ))) == null ? void 0 : _a.arguments[0]; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); - case 272 /* ImportClause */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 280 /* NamespaceExport */: return tryCast(node.parent.moduleSpecifier, isStringLiteralLike); - case 273 /* NamespaceImport */: - case 280 /* ExportSpecifier */: + case 274 /* NamespaceImport */: + case 281 /* ExportSpecifier */: return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); default: Debug.assertNever(node); @@ -15235,18 +15287,18 @@ ${lanes.join("\n")} } function tryGetImportFromModuleSpecifier(node) { switch (node.parent.kind) { - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: return node.parent; - case 282 /* ExternalModuleReference */: + case 283 /* ExternalModuleReference */: return node.parent.parent; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return isImportCall(node.parent) || isRequireCall( node.parent, /*requireStringLiteralLikeArgument*/ false ) ? node.parent : void 0; - case 200 /* LiteralType */: + case 201 /* LiteralType */: Debug.assert(isStringLiteral(node)); return tryCast(node.parent.parent, isImportTypeNode); default: @@ -15255,16 +15307,16 @@ ${lanes.join("\n")} } function getExternalModuleName(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: return node.moduleSpecifier; - case 270 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 282 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 204 /* ImportType */: + case 271 /* ImportEqualsDeclaration */: + return node.moduleReference.kind === 283 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; + case 205 /* ImportType */: return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return node.arguments[0]; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return node.name.kind === 11 /* StringLiteral */ ? node.name : void 0; default: return Debug.assertNever(node); @@ -15272,18 +15324,18 @@ ${lanes.join("\n")} } function getNamespaceDeclarationNode(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return node; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return node.exportClause && tryCast(node.exportClause, isNamespaceExport); default: return Debug.assertNever(node); } } function isDefaultImport(node) { - return node.kind === 271 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; + return node.kind === 272 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; } function forEachImportClauseDeclaration(node, action) { if (node.name) { @@ -15300,13 +15352,13 @@ ${lanes.join("\n")} function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 168 /* Parameter */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 303 /* ShorthandPropertyAssignment */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 169 /* Parameter */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 304 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return node.questionToken !== void 0; } } @@ -15318,7 +15370,7 @@ ${lanes.join("\n")} return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { - return node.kind === 352 /* JSDocTypedefTag */ || node.kind === 344 /* JSDocCallbackTag */ || node.kind === 346 /* JSDocEnumTag */; + return node.kind === 353 /* JSDocTypedefTag */ || node.kind === 345 /* JSDocCallbackTag */ || node.kind === 347 /* JSDocEnumTag */; } function isTypeAlias(node) { return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); @@ -15331,12 +15383,12 @@ ${lanes.join("\n")} } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return node.initializer; } } @@ -15344,26 +15396,26 @@ ${lanes.join("\n")} return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 266 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 267 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveFlowNode(node) { - if (node.kind >= 242 /* FirstStatement */ && node.kind <= 258 /* LastStatement */) { + if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */) { return true; } switch (node.kind) { case 80 /* Identifier */: case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 165 /* QualifiedName */: - case 235 /* MetaProperty */: - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: - case 207 /* BindingElement */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 166 /* QualifiedName */: + case 236 /* MetaProperty */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 208 /* BindingElement */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -15371,72 +15423,72 @@ ${lanes.join("\n")} } function canHaveJSDoc(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 240 /* Block */: - case 251 /* BreakStatement */: - case 178 /* CallSignature */: - case 295 /* CaseClause */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 174 /* ClassStaticBlockDeclaration */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 250 /* ContinueStatement */: - case 258 /* DebuggerStatement */: - case 245 /* DoStatement */: - case 211 /* ElementAccessExpression */: - case 241 /* EmptyStatement */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 241 /* Block */: + case 252 /* BreakStatement */: + case 179 /* CallSignature */: + case 296 /* CaseClause */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 175 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 251 /* ContinueStatement */: + case 259 /* DebuggerStatement */: + case 246 /* DoStatement */: + case 212 /* ElementAccessExpression */: + case 242 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: - case 280 /* ExportSpecifier */: - case 243 /* ExpressionStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: + case 281 /* ExportSpecifier */: + case 244 /* ExpressionStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: case 80 /* Identifier */: - case 244 /* IfStatement */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 255 /* LabeledStatement */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 201 /* NamedTupleMember */: - case 269 /* NamespaceExportDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 168 /* Parameter */: - case 216 /* ParenthesizedExpression */: - case 210 /* PropertyAccessExpression */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 252 /* ReturnStatement */: - case 239 /* SemicolonClassElement */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: - case 254 /* SwitchStatement */: - case 256 /* ThrowStatement */: - case 257 /* TryStatement */: - case 264 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: - case 259 /* VariableDeclaration */: - case 242 /* VariableStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: + case 245 /* IfStatement */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 256 /* LabeledStatement */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 202 /* NamedTupleMember */: + case 270 /* NamespaceExportDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 169 /* Parameter */: + case 217 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 253 /* ReturnStatement */: + case 240 /* SemicolonClassElement */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: + case 255 /* SwitchStatement */: + case 257 /* ThrowStatement */: + case 258 /* TryStatement */: + case 265 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 260 /* VariableDeclaration */: + case 243 /* VariableStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: return true; default: return false; @@ -15452,11 +15504,11 @@ ${lanes.join("\n")} if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -15476,7 +15528,7 @@ ${lanes.join("\n")} } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 302 /* PropertyAssignment */ || parent2.kind === 276 /* ExportAssignment */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 243 /* ExpressionStatement */ && node.kind === 210 /* PropertyAccessExpression */ || parent2.kind === 252 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { + if (parent2.kind === 303 /* PropertyAssignment */ || parent2.kind === 277 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { return parent2; } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */)) { return parent2.parent; @@ -15546,32 +15598,32 @@ ${lanes.join("\n")} let parent2 = node.parent; while (true) { switch (parent2.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const binaryOperator = parent2.operatorToken.kind; return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: const unaryOperator = parent2.operator; return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 216 /* ParenthesizedExpression */: - case 208 /* ArrayLiteralExpression */: - case 229 /* SpreadElement */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 209 /* ArrayLiteralExpression */: + case 230 /* SpreadElement */: + case 235 /* NonNullExpression */: node = parent2; break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: node = parent2.parent; break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { return 0 /* None */; } node = parent2.parent; break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (parent2.name === node) { return 0 /* None */; } @@ -15588,22 +15640,22 @@ ${lanes.join("\n")} } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { - case 240 /* Block */: - case 242 /* VariableStatement */: - case 253 /* WithStatement */: - case 244 /* IfStatement */: - case 254 /* SwitchStatement */: - case 268 /* CaseBlock */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 255 /* LabeledStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 257 /* TryStatement */: - case 298 /* CatchClause */: + case 241 /* Block */: + case 243 /* VariableStatement */: + case 254 /* WithStatement */: + case 245 /* IfStatement */: + case 255 /* SwitchStatement */: + case 269 /* CaseBlock */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 256 /* LabeledStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 258 /* TryStatement */: + case 299 /* CatchClause */: return true; } return false; @@ -15618,14 +15670,14 @@ ${lanes.join("\n")} return node; } function walkUpParenthesizedTypes(node) { - return walkUp(node, 195 /* ParenthesizedType */); + return walkUp(node, 196 /* ParenthesizedType */); } function walkUpParenthesizedExpressions(node) { - return walkUp(node, 216 /* ParenthesizedExpression */); + return walkUp(node, 217 /* ParenthesizedExpression */); } function walkUpParenthesizedTypesAndGetParentAndChild(node) { let child; - while (node && node.kind === 195 /* ParenthesizedType */) { + while (node && node.kind === 196 /* ParenthesizedType */) { child = node; node = node.parent; } @@ -15641,11 +15693,11 @@ ${lanes.join("\n")} return skipOuterExpressions(node, flags); } function isDeleteTarget(node) { - if (node.kind !== 210 /* PropertyAccessExpression */ && node.kind !== 211 /* ElementAccessExpression */) { + if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) { return false; } node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 219 /* DeleteExpression */; + return node && node.kind === 220 /* DeleteExpression */; } function isNodeDescendantOf(node, ancestor) { while (node) { @@ -15683,55 +15735,55 @@ ${lanes.join("\n")} } } function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); + return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); } function isIdentifierName(node) { const parent2 = node.parent; switch (parent2.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 305 /* EnumMember */: - case 302 /* PropertyAssignment */: - case 210 /* PropertyAccessExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 306 /* EnumMember */: + case 303 /* PropertyAssignment */: + case 211 /* PropertyAccessExpression */: return parent2.name === node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return parent2.right === node; - case 207 /* BindingElement */: - case 275 /* ImportSpecifier */: + case 208 /* BindingElement */: + case 276 /* ImportSpecifier */: return parent2.propertyName === node; - case 280 /* ExportSpecifier */: - case 290 /* JsxAttribute */: - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: + case 281 /* ExportSpecifier */: + case 291 /* JsxAttribute */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: return true; } return false; } function isAliasSymbolDeclaration(node) { - if (node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 269 /* NamespaceExportDeclaration */ || node.kind === 272 /* ImportClause */ && !!node.name || node.kind === 273 /* NamespaceImport */ || node.kind === 279 /* NamespaceExport */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 280 /* ExportSpecifier */ || node.kind === 276 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { + if (node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { return true; } return isInJSFile(node) && (isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isPropertyAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableExpression(node.parent.right)); } function getAliasDeclarationFromName(node) { switch (node.parent.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 273 /* NamespaceImport */: - case 280 /* ExportSpecifier */: - case 276 /* ExportAssignment */: - case 270 /* ImportEqualsDeclaration */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 274 /* NamespaceImport */: + case 281 /* ExportSpecifier */: + case 277 /* ExportAssignment */: + case 271 /* ImportEqualsDeclaration */: + case 280 /* NamespaceExport */: return node.parent; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.parent; - } while (node.parent.kind === 165 /* QualifiedName */); + } while (node.parent.kind === 166 /* QualifiedName */); return getAliasDeclarationFromName(node); } } @@ -15746,7 +15798,7 @@ ${lanes.join("\n")} return isExportAssignment(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 303 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 302 /* PropertyAssignment */ ? node.initializer : node.parent.right; + return node.kind === 304 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 303 /* PropertyAssignment */ ? node.initializer : node.parent.right; } function getEffectiveBaseTypeNode(node) { const baseType = getClassExtendsHeritageElement(node); @@ -15797,7 +15849,7 @@ ${lanes.join("\n")} return void 0; } function isKeyword(token) { - return 83 /* FirstKeyword */ <= token && token <= 164 /* LastKeyword */; + return 83 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; } function isPunctuation(token) { return 19 /* FirstPunctuation */ <= token && token <= 79 /* LastPunctuation */; @@ -15806,7 +15858,7 @@ ${lanes.join("\n")} return isKeyword(token) || isPunctuation(token); } function isContextualKeyword(token) { - return 128 /* FirstContextualKeyword */ <= token && token <= 164 /* LastContextualKeyword */; + return 128 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */; } function isNonContextualKeyword(token) { return isKeyword(token) && !isContextualKeyword(token); @@ -15835,13 +15887,13 @@ ${lanes.join("\n")} } let flags = 0 /* Normal */; switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: if (node.asteriskToken) { flags |= 1 /* Generator */; } - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (hasSyntacticModifier(node, 512 /* Async */)) { flags |= 2 /* Async */; } @@ -15854,10 +15906,10 @@ ${lanes.join("\n")} } function isAsyncFunction(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); } return false; @@ -15873,7 +15925,7 @@ ${lanes.join("\n")} return !!name && isDynamicName(name); } function isDynamicName(name) { - if (!(name.kind === 166 /* ComputedPropertyName */ || name.kind === 211 /* ElementAccessExpression */)) { + if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -15887,7 +15939,7 @@ ${lanes.join("\n")} case 11 /* StringLiteral */: case 9 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -15898,7 +15950,7 @@ ${lanes.join("\n")} return nameExpression.operand.text; } return void 0; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -15942,13 +15994,17 @@ ${lanes.join("\n")} function isAnonymousFunctionDefinition(node, cb) { node = skipOuterExpressions(node); switch (node.kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 231 /* ClassExpression */: + if (classHasDeclaredOrExplicitlyAssignedName(node)) { + return false; + } + break; + case 218 /* FunctionExpression */: if (node.name) { return false; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: break; default: return false; @@ -15957,19 +16013,19 @@ ${lanes.join("\n")} } function isNamedEvaluationSource(node) { switch (node.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return !isProtoSetter(node.name); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return !!node.objectAssignmentInitializer; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return isIdentifier(node.name) && !!node.initializer; - case 168 /* Parameter */: + case 169 /* Parameter */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return !!node.initializer; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 77 /* AmpersandAmpersandEqualsToken */: @@ -15978,7 +16034,7 @@ ${lanes.join("\n")} return isIdentifier(node.left); } break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return true; } return false; @@ -15987,18 +16043,18 @@ ${lanes.join("\n")} if (!isNamedEvaluationSource(node)) return false; switch (node.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb); - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: return isAnonymousFunctionDefinition(node.initializer, cb); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isAnonymousFunctionDefinition(node.right, cb); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return isAnonymousFunctionDefinition(node.expression, cb); } } @@ -16007,17 +16063,17 @@ ${lanes.join("\n")} } function isParameterDeclaration(node) { const root = getRootDeclaration(node); - return root.kind === 168 /* Parameter */; + return root.kind === 169 /* Parameter */; } function getRootDeclaration(node) { - while (node.kind === 207 /* BindingElement */) { + while (node.kind === 208 /* BindingElement */) { node = node.parent.parent; } return node; } function nodeStartsNewLexicalEnvironment(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 217 /* FunctionExpression */ || kind === 261 /* FunctionDeclaration */ || kind === 218 /* ArrowFunction */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 266 /* ModuleDeclaration */ || kind === 311 /* SourceFile */; + return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 262 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 267 /* ModuleDeclaration */ || kind === 312 /* SourceFile */; } function nodeIsSynthesized(range) { return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); @@ -16027,22 +16083,22 @@ ${lanes.join("\n")} } function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 213 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 213 /* NewExpression */: + case 214 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 223 /* PrefixUnaryExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 222 /* AwaitExpression */: - case 226 /* ConditionalExpression */: - case 228 /* YieldExpression */: + case 224 /* PrefixUnaryExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 223 /* AwaitExpression */: + case 227 /* ConditionalExpression */: + case 229 /* YieldExpression */: return 1 /* Right */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (operator) { case 43 /* AsteriskAsteriskToken */: case 64 /* EqualsToken */: @@ -16068,13 +16124,13 @@ ${lanes.join("\n")} } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 213 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 225 /* BinaryExpression */) { + if (expression.kind === 226 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 223 /* PrefixUnaryExpression */ || expression.kind === 224 /* PostfixUnaryExpression */) { + } else if (expression.kind === 224 /* PrefixUnaryExpression */ || expression.kind === 225 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -16082,15 +16138,15 @@ ${lanes.join("\n")} } function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return 0 /* Comma */; - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return 1 /* Spread */; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return 2 /* Yield */; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return 4 /* Conditional */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (operatorKind) { case 28 /* CommaToken */: return 0 /* Comma */; @@ -16114,27 +16170,27 @@ ${lanes.join("\n")} default: return getBinaryOperatorPrecedence(operatorKind); } - case 215 /* TypeAssertionExpression */: - case 234 /* NonNullExpression */: - case 223 /* PrefixUnaryExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 222 /* AwaitExpression */: + case 216 /* TypeAssertionExpression */: + case 235 /* NonNullExpression */: + case 224 /* PrefixUnaryExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 223 /* AwaitExpression */: return 16 /* Unary */; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return 17 /* Update */; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return 18 /* LeftHandSide */; - case 213 /* NewExpression */: + case 214 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 214 /* TaggedTemplateExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 235 /* MetaProperty */: + case 215 /* TaggedTemplateExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 236 /* MetaProperty */: return 19 /* Member */; - case 233 /* AsExpression */: - case 237 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 238 /* SatisfiesExpression */: return 11 /* Relational */; case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: @@ -16146,19 +16202,19 @@ ${lanes.join("\n")} case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 230 /* ClassExpression */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 231 /* ClassExpression */: case 14 /* RegularExpressionLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: - case 216 /* ParenthesizedExpression */: - case 231 /* OmittedExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: + case 228 /* TemplateExpression */: + case 217 /* ParenthesizedExpression */: + case 232 /* OmittedExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -16211,7 +16267,7 @@ ${lanes.join("\n")} function getSemanticJsxChildren(children) { return filter(children, (i) => { switch (i.kind) { - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return !!i.expression; case 12 /* JsxText */: return !i.containsOnlyTriviaWhiteSpaces; @@ -16680,6 +16736,12 @@ ${lanes.join("\n")} function isThisIdentifier(node) { return !!node && node.kind === 80 /* Identifier */ && identifierIsThisKeyword(node); } + function isInTypeQuery(node) { + return !!findAncestor( + node, + (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit" + ); + } function isThisInTypeQuery(node) { if (!isThisIdentifier(node)) { return false; @@ -16687,7 +16749,7 @@ ${lanes.join("\n")} while (isQualifiedName(node.parent) && node.parent.left === node) { node = node.parent; } - return node.parent.kind === 185 /* TypeQuery */; + return node.parent.kind === 186 /* TypeQuery */; } function identifierIsThisKeyword(id) { return id.escapedText === "this"; @@ -16699,9 +16761,9 @@ ${lanes.join("\n")} let setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 176 /* GetAccessor */) { + if (accessor.kind === 177 /* GetAccessor */) { getAccessor = accessor; - } else if (accessor.kind === 177 /* SetAccessor */) { + } else if (accessor.kind === 178 /* SetAccessor */) { setAccessor = accessor; } else { Debug.fail("Accessor has wrong kind"); @@ -16717,10 +16779,10 @@ ${lanes.join("\n")} } else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 176 /* GetAccessor */ && !getAccessor) { + if (member.kind === 177 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 177 /* SetAccessor */ && !setAccessor) { + if (member.kind === 178 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -16752,7 +16814,7 @@ ${lanes.join("\n")} return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); } function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 326 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); + return isJSDocTemplateTag(tag) && !(tag.parent.kind === 327 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); } function getEffectiveSetAccessorTypeAnnotationNode(node) { const parameter = getSetAccessorValueParameter(node); @@ -16942,7 +17004,7 @@ ${lanes.join("\n")} return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 164 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -17001,7 +17063,7 @@ ${lanes.join("\n")} } function getSyntacticModifierFlagsNoCache(node) { let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */; - if (node.flags & 4 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { flags |= 1 /* Export */; } return flags; @@ -17041,13 +17103,13 @@ ${lanes.join("\n")} return 512 /* Async */; case 148 /* ReadonlyKeyword */: return 64 /* Readonly */; - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return 16384 /* Override */; case 103 /* InKeyword */: return 32768 /* In */; case 147 /* OutKeyword */: return 65536 /* Out */; - case 169 /* Decorator */: + case 170 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -17104,7 +17166,7 @@ ${lanes.join("\n")} true )) { const kind = node.left.kind; - return kind === 209 /* ObjectLiteralExpression */ || kind === 208 /* ArrayLiteralExpression */; + return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; } return false; } @@ -17118,12 +17180,12 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 80 /* Identifier */); return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: do { node = node.expression; } while (node.kind !== 80 /* Identifier */); @@ -17131,7 +17193,7 @@ ${lanes.join("\n")} } } function isDottedName(node) { - return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 235 /* MetaProperty */ || node.kind === 210 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 216 /* ParenthesizedExpression */ && isDottedName(node.expression); + return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 236 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); @@ -17158,7 +17220,7 @@ ${lanes.join("\n")} return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; } function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 165 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.name === node; + return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; @@ -17167,10 +17229,10 @@ ${lanes.join("\n")} return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } function isEmptyObjectLiteral(expression) { - return expression.kind === 209 /* ObjectLiteralExpression */ && expression.properties.length === 0; + return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; } function isEmptyArrayLiteral(expression) { - return expression.kind === 208 /* ArrayLiteralExpression */ && expression.elements.length === 0; + return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0; } function getLocalSymbolForExportDefault(symbol) { if (!isExportDefaultSymbol(symbol) || !symbol.declarations) @@ -17436,8 +17498,8 @@ ${lanes.join("\n")} const parseNode = getParseTreeNode(node); if (parseNode) { switch (parseNode.parent.kind) { - case 265 /* EnumDeclaration */: - case 266 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: return parseNode === parseNode.parent.name; } } @@ -17490,24 +17552,24 @@ ${lanes.join("\n")} function accessKind(node) { const { parent: parent2 } = node; switch (parent2 == null ? void 0 : parent2.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return accessKind(parent2); - case 224 /* PostfixUnaryExpression */: - case 223 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const { operator } = parent2; return operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const { left, operatorToken } = parent2; return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 64 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 302 /* PropertyAssignment */: { + case 303 /* PropertyAssignment */: { const parentAccess = accessKind(parent2.parent); return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; } - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return accessKind(parent2); default: return 0 /* Read */; @@ -17620,16 +17682,16 @@ ${lanes.join("\n")} return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); } function isTypeNodeKind(kind) { - return kind >= 181 /* FirstTypeNode */ && kind <= 204 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 232 /* ExpressionWithTypeArguments */ || kind === 318 /* JSDocAllType */ || kind === 319 /* JSDocUnknownType */ || kind === 320 /* JSDocNullableType */ || kind === 321 /* JSDocNonNullableType */ || kind === 322 /* JSDocOptionalType */ || kind === 323 /* JSDocFunctionType */ || kind === 324 /* JSDocVariadicType */; + return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 163 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 233 /* ExpressionWithTypeArguments */ || kind === 319 /* JSDocAllType */ || kind === 320 /* JSDocUnknownType */ || kind === 321 /* JSDocNullableType */ || kind === 322 /* JSDocNonNullableType */ || kind === 323 /* JSDocOptionalType */ || kind === 324 /* JSDocFunctionType */ || kind === 325 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 210 /* PropertyAccessExpression */ || node.kind === 211 /* ElementAccessExpression */; + return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; } function getNameOfAccessExpression(node) { - if (node.kind === 210 /* PropertyAccessExpression */) { + if (node.kind === 211 /* PropertyAccessExpression */) { return node.name; } - Debug.assert(node.kind === 211 /* ElementAccessExpression */); + Debug.assert(node.kind === 212 /* ElementAccessExpression */); return node.argumentExpression; } function isBundleFileTextLike(section) { @@ -17642,7 +17704,7 @@ ${lanes.join("\n")} } } function isNamedImportsOrExports(node) { - return node.kind === 274 /* NamedImports */ || node.kind === 278 /* NamedExports */; + return node.kind === 275 /* NamedImports */ || node.kind === 279 /* NamedExports */; } function getLeftmostAccessExpression(expr) { while (isAccessExpression(expr)) { @@ -17655,12 +17717,12 @@ ${lanes.join("\n")} return walkAccessExpression(name.parent); } function walkAccessExpression(access) { - if (access.kind === 210 /* PropertyAccessExpression */) { + if (access.kind === 211 /* PropertyAccessExpression */) { const res = action(access.name); if (res !== void 0) { return res; } - } else if (access.kind === 211 /* ElementAccessExpression */) { + } else if (access.kind === 212 /* ElementAccessExpression */) { if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { @@ -17682,28 +17744,28 @@ ${lanes.join("\n")} function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: node = node.operand; continue; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: node = node.left; continue; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: node = node.condition; continue; - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: node = node.tag; continue; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 233 /* AsExpression */: - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: - case 234 /* NonNullExpression */: - case 359 /* PartiallyEmittedExpression */: - case 237 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 235 /* NonNullExpression */: + case 360 /* PartiallyEmittedExpression */: + case 238 /* SatisfiesExpression */: node = node.expression; continue; } @@ -18161,6 +18223,9 @@ ${lanes.join("\n")} function getUseDefineForClassFields(compilerOptions) { return compilerOptions.useDefineForClassFields === void 0 ? getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ : compilerOptions.useDefineForClassFields; } + function getEmitStandardClassFields(compilerOptions) { + return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */; + } function compilerOptionsAffectSemanticDiagnostics(newOptions, oldOptions) { return optionsHaveChanges(oldOptions, newOptions, semanticDiagnosticsOptionDeclarations); } @@ -18346,7 +18411,7 @@ ${lanes.join("\n")} function replaceWildcardCharacter(match, singleAsteriskRegexFragment) { return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match; } - function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { + function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) { path = normalizePath(path); currentDirectory = normalizePath(currentDirectory); const absolutePath = combinePaths(currentDirectory, path); @@ -18355,22 +18420,22 @@ ${lanes.join("\n")} includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"), excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"), - basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames) + basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2) }; } - function getRegexFromPattern(pattern, useCaseSensitiveFileNames) { - return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i"); + function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) { + return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i"); } - function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) { + function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) { path = normalizePath(path); currentDirectory = normalizePath(currentDirectory); - const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory); - const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames)); - const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames); - const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames); + const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory); + const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2)); + const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2); + const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2); const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]]; const visited = /* @__PURE__ */ new Map(); - const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames); + const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2); for (const basePath of patterns.basePaths) { visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); } @@ -18412,7 +18477,7 @@ ${lanes.join("\n")} } } } - function getBasePaths(path, includes, useCaseSensitiveFileNames) { + function getBasePaths(path, includes, useCaseSensitiveFileNames2) { const basePaths = [path]; if (includes) { const includeBasePaths = []; @@ -18420,9 +18485,9 @@ ${lanes.join("\n")} const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include)); includeBasePaths.push(getIncludeBasePath(absolute)); } - includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames)); + includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2)); for (const includeBasePath of includeBasePaths) { - if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames))) { + if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) { basePaths.push(includeBasePath); } } @@ -18781,39 +18846,39 @@ ${lanes.join("\n")} return success && result === 10 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); } function isValidTypeOnlyAliasUseSite(useSite) { - return !!(useSite.flags & 16777216 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); + return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); } function isShorthandPropertyNameUseSite(useSite) { return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 80 /* Identifier */ || node.kind === 210 /* PropertyAccessExpression */) { + while (node.kind === 80 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) { node = node.parent; } - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; - return containerKind === 263 /* InterfaceDeclaration */ || containerKind === 186 /* TypeLiteral */; + return containerKind === 264 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */; } function isIdentifierInNonEmittingHeritageClause(node) { if (node.kind !== 80 /* Identifier */) return false; const heritageClause = findAncestor(node.parent, (parent2) => { switch (parent2.kind) { - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return true; - case 210 /* PropertyAccessExpression */: - case 232 /* ExpressionWithTypeArguments */: + case 211 /* PropertyAccessExpression */: + case 233 /* ExpressionWithTypeArguments */: return false; default: return "quit"; } }); - return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 263 /* InterfaceDeclaration */; + return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 264 /* InterfaceDeclaration */; } function isIdentifierTypeReference(node) { return isTypeReferenceNode(node) && isIdentifier(node.typeName); @@ -18925,20 +18990,20 @@ ${lanes.join("\n")} if (!node.parent) return void 0; switch (node.kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: const { parent: parent3 } = node; - return parent3.kind === 194 /* InferType */ ? void 0 : parent3.typeParameters; - case 168 /* Parameter */: + return parent3.kind === 195 /* InferType */ ? void 0 : parent3.typeParameters; + case 169 /* Parameter */: return node.parent.parameters; - case 203 /* TemplateLiteralTypeSpan */: + case 204 /* TemplateLiteralTypeSpan */: return node.parent.templateSpans; - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return node.parent.templateSpans; - case 169 /* Decorator */: { + case 170 /* Decorator */: { const { parent: parent4 } = node; return canHaveDecorators(parent4) ? parent4.modifiers : void 0; } - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return node.parent.heritageClauses; } const { parent: parent2 } = node; @@ -18946,43 +19011,43 @@ ${lanes.join("\n")} return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; } switch (parent2.kind) { - case 186 /* TypeLiteral */: - case 263 /* InterfaceDeclaration */: + case 187 /* TypeLiteral */: + case 264 /* InterfaceDeclaration */: return isTypeElement(node) ? parent2.members : void 0; - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return parent2.types; - case 188 /* TupleType */: - case 208 /* ArrayLiteralExpression */: - case 360 /* CommaListExpression */: - case 274 /* NamedImports */: - case 278 /* NamedExports */: + case 189 /* TupleType */: + case 209 /* ArrayLiteralExpression */: + case 361 /* CommaListExpression */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: return parent2.elements; - case 209 /* ObjectLiteralExpression */: - case 291 /* JsxAttributes */: + case 210 /* ObjectLiteralExpression */: + case 292 /* JsxAttributes */: return parent2.properties; - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 283 /* JsxElement */: - case 287 /* JsxFragment */: + case 284 /* JsxElement */: + case 288 /* JsxFragment */: return isJsxChild(node) ? parent2.children : void 0; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return isTypeNode(node) ? parent2.typeArguments : void 0; - case 240 /* Block */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 268 /* ModuleBlock */: return parent2.statements; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return parent2.clauses; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return isClassElement(node) ? parent2.members : void 0; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return isEnumMember(node) ? parent2.members : void 0; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return parent2.statements; } } @@ -18991,7 +19056,7 @@ ${lanes.join("\n")} if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { return true; } - if (node.kind !== 218 /* ArrowFunction */) { + if (node.kind !== 219 /* ArrowFunction */) { const parameter = firstOrUndefined(node.parameters); if (!(parameter && parameterIsThisKeyword(parameter))) { return true; @@ -19004,14 +19069,14 @@ ${lanes.join("\n")} return name === "Infinity" || name === "-Infinity" || name === "NaN"; } function isCatchClauseVariableDeclaration(node) { - return node.kind === 259 /* VariableDeclaration */ && node.parent.kind === 298 /* CatchClause */; + return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; } function isParameterOrCatchClauseVariable(symbol) { const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 217 /* FunctionExpression */ || node.kind === 218 /* ArrowFunction */; + return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */; } function escapeSnippetText(text) { return text.replace(/\$/gm, () => "\\$"); @@ -19074,23 +19139,23 @@ ${lanes.join("\n")} } function getParameterTypeNode(parameter) { var _a; - return parameter.kind === 347 /* JSDocParameterTag */ ? (_a = parameter.typeExpression) == null ? void 0 : _a.type : parameter.type; + return parameter.kind === 348 /* JSDocParameterTag */ ? (_a = parameter.typeExpression) == null ? void 0 : _a.type : parameter.type; } function isTypeDeclaration(node) { switch (node.kind) { - case 167 /* TypeParameter */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 168 /* TypeParameter */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return true; - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.isTypeOnly; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return node.parent.parent.isTypeOnly; default: return false; @@ -19104,7 +19169,7 @@ ${lanes.join("\n")} return false; } const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 322 /* JSDocOptionalType */; + return isBracketed || !!typeExpression && typeExpression.type.kind === 323 /* JSDocOptionalType */; } function canUsePropertyAccess(name, languageVersion) { if (name.length === 0) { @@ -19119,17 +19184,17 @@ ${lanes.join("\n")} } function isJSDocOptionalParameter(node) { return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType - (node.type && node.type.kind === 322 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 322 /* JSDocOptionalType */)); + (node.type && node.type.kind === 323 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 323 /* JSDocOptionalType */)); } function isOptionalDeclaration(declaration) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !!declaration.questionToken; - case 168 /* Parameter */: + case 169 /* Parameter */: return !!declaration.questionToken || isJSDocOptionalParameter(declaration); - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: return isOptionalJSDocPropertyLikeTag(declaration); default: return false; @@ -19137,7 +19202,7 @@ ${lanes.join("\n")} } function isNonNullAccess(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && isNonNullExpression(node.expression); + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && isNonNullExpression(node.expression); } function isJSDocSatisfiesExpression(node) { return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); @@ -19157,7 +19222,7 @@ ${lanes.join("\n")} } function isJsxAttributeName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 294 /* JsxNamespacedName */; + return kind === 80 /* Identifier */ || kind === 295 /* JsxNamespacedName */; } function getEscapedTextOfJsxNamespacedName(node) { return `${node.namespace.escapedText}:${idText(node.name)}`; @@ -19168,6 +19233,18 @@ ${lanes.join("\n")} function intrinsicTagNameToString(node) { return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node); } + function isTypeUsableAsPropertyName(type) { + return !!(type.flags & 8576 /* StringOrNumberLiteralOrUnique */); + } + function getPropertyNameFromType(type) { + if (type.flags & 8192 /* UniqueESSymbol */) { + return type.escapedName; + } + if (type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { + return escapeLeadingUnderscores("" + type.value); + } + return Debug.fail(); + } var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries; var init_utilities = __esm({ "src/compiler/utilities.ts"() { @@ -19240,9 +19317,9 @@ ${lanes.join("\n")} return OperatorPrecedence2; })(OperatorPrecedence || {}); templateSubstitutionRegExp = /\$\{/g; - doubleQuoteEscapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - singleQuoteEscapedCharsRegExp = /[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - backtickQuoteEscapedCharsRegExp = /\r\n|[\\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; + doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; + singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; + backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; escapedCharsMap = new Map(Object.entries({ " ": "\\t", "\v": "\\v", @@ -19264,8 +19341,8 @@ ${lanes.join("\n")} // special case for CRLFs in backticks })); nonAsciiCharacters = /[^\u0000-\u007F]/g; - jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g; - jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g; + jsxDoubleQuoteEscapedCharsRegExp = /["\u0000-\u001f\u2028\u2029\u0085]/g; + jsxSingleQuoteEscapedCharsRegExp = /['\u0000-\u001f\u2028\u2029\u0085]/g; jsxEscapedCharsMap = new Map(Object.entries({ '"': """, "'": "'" @@ -19286,7 +19363,7 @@ ${lanes.join("\n")} getSourceMapSourceConstructor: () => SourceMapSource }; objectAllocatorPatchers = []; - reservedCharacterPattern = /[^\w\s\/]/g; + reservedCharacterPattern = /[^\w\s/]/g; wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`; @@ -19477,16 +19554,16 @@ ${lanes.join("\n")} return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(225 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(225 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(226 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 218 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 228 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 229 /* YieldExpression */) { return false; } return true; @@ -19520,7 +19597,7 @@ ${lanes.join("\n")} if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { + if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -19533,7 +19610,7 @@ ${lanes.join("\n")} } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 216 /* ParenthesizedExpression */) { + if (skipped.kind === 217 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -19559,7 +19636,7 @@ ${lanes.join("\n")} return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(226 /* ConditionalExpression */, 58 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(227 /* ConditionalExpression */, 58 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -19580,8 +19657,8 @@ ${lanes.join("\n")} /*stopAtCallExpressions*/ false ).kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: needsParens = true; } } @@ -19594,16 +19671,16 @@ ${lanes.join("\n")} true ); switch (leftmostExpr.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 213 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -19621,7 +19698,7 @@ ${lanes.join("\n")} function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(225 /* BinaryExpression */, 28 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, 28 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -19629,7 +19706,7 @@ ${lanes.join("\n")} if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 217 /* FunctionExpression */ || kind === 218 /* ArrowFunction */) { + if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -19644,7 +19721,7 @@ ${lanes.join("\n")} /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 209 /* ObjectLiteralExpression */ || leftmostExpressionKind === 217 /* FunctionExpression */) { + if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -19654,31 +19731,31 @@ ${lanes.join("\n")} body, /*stopAtCallExpressions*/ false - ).kind === 209 /* ObjectLiteralExpression */)) { + ).kind === 210 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 193 /* ConditionalType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 194 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -19688,8 +19765,8 @@ ${lanes.join("\n")} } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -19699,23 +19776,23 @@ ${lanes.join("\n")} } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 194 /* InferType */: - case 197 /* TypeOperator */: - case 185 /* TypeQuery */: + case 195 /* InferType */: + case 198 /* TypeOperator */: + case 186 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -19807,6 +19884,7 @@ ${lanes.join("\n")} return { convertToFunctionBlock, convertToFunctionExpression, + convertToClassExpression, convertToArrayAssignmentElement, convertToObjectAssignmentElement, convertToAssignmentPattern, @@ -19824,10 +19902,11 @@ ${lanes.join("\n")} return body; } function convertToFunctionExpression(node) { + var _a; if (!node.body) return Debug.fail(`Cannot convert a FunctionDeclaration without a body`); const updated = factory2.createFunctionExpression( - getModifiers(node), + (_a = getModifiers(node)) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), node.asteriskToken, node.name, node.typeParameters, @@ -19846,6 +19925,26 @@ ${lanes.join("\n")} } return updated; } + function convertToClassExpression(node) { + var _a; + const updated = factory2.createClassExpression( + (_a = node.modifiers) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), + node.name, + node.typeParameters, + node.heritageClauses, + node.members + ); + setOriginalNode(updated, node); + setTextRange(updated, node); + if (getStartsOnNewLine(node)) { + setStartsOnNewLine( + updated, + /*newLine*/ + true + ); + } + return updated; + } function convertToArrayAssignmentElement(element) { if (isBindingElement(element)) { if (element.dotDotDotToken) { @@ -19880,11 +19979,11 @@ ${lanes.join("\n")} } function convertToAssignmentPattern(node) { switch (node.kind) { - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 205 /* ObjectBindingPattern */: - case 209 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 210 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -19927,6 +20026,7 @@ ${lanes.join("\n")} nullNodeConverters = { convertToFunctionBlock: notImplemented, convertToFunctionExpression: notImplemented, + convertToClassExpression: notImplemented, convertToArrayAssignmentElement: notImplemented, convertToObjectAssignmentElement: notImplemented, convertToAssignmentPattern: notImplemented, @@ -20239,40 +20339,40 @@ ${lanes.join("\n")} updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(318 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(319 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(319 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(320 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(322 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(322 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(320 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(320 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(322 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(323 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(322 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(323 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(324 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(325 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(324 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(325 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(326 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(326 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -20312,82 +20412,82 @@ ${lanes.join("\n")} updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(348 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(349 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(349 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(350 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(339 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(339 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(340 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(340 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(341 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(341 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(342 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(342 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(343 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(343 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(344 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(344 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(355 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(356 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(355 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(356 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(357 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(357 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -20562,6 +20662,7 @@ ${lanes.join("\n")} createExportDefault, createExternalModuleExport, createTypeCheck, + createIsNotTypeCheck, createMethodCall, createGlobalMethodCall, createFunctionBindCall, @@ -20593,7 +20694,8 @@ ${lanes.join("\n")} ensureUseStrict, liftToBlock, mergeLexicalEnvironment, - updateModifiers + updateModifiers, + updateModifierLike }; forEach(nodeFactoryPatchers, (fn) => fn(factory2)); return factory2; @@ -20751,11 +20853,11 @@ ${lanes.join("\n")} } const node = createBaseIdentifier(escapeLeadingUnderscores(text)); if (hasExtendedUnicodeEscape) - node.flags |= 128 /* IdentifierHasExtendedUnicodeEscape */; + node.flags |= 256 /* IdentifierHasExtendedUnicodeEscape */; if (node.escapedText === "await") { node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */; } - if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) { + if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { node.transformFlags |= 1024 /* ContainsES2015 */; } return node; @@ -20850,7 +20952,7 @@ ${lanes.join("\n")} return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 164 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* LastToken */, "Invalid token"); Debug.assert(token <= 15 /* FirstTemplateToken */ || token >= 18 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 9 /* FirstLiteralToken */ || token >= 15 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 80 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); @@ -20860,6 +20962,9 @@ ${lanes.join("\n")} case 134 /* AsyncKeyword */: transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; break; + case 160 /* UsingKeyword */: + transformFlags = 4 /* ContainsESNext */; + break; case 125 /* PublicKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: @@ -20869,12 +20974,12 @@ ${lanes.join("\n")} case 87 /* ConstKeyword */: case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 146 /* NeverKeyword */: case 151 /* ObjectKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 154 /* StringKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: @@ -20942,7 +21047,7 @@ ${lanes.join("\n")} if (flags2 & 32 /* Static */) result.push(createModifier(126 /* StaticKeyword */)); if (flags2 & 16384 /* Override */) - result.push(createModifier(163 /* OverrideKeyword */)); + result.push(createModifier(164 /* OverrideKeyword */)); if (flags2 & 64 /* Readonly */) result.push(createModifier(148 /* ReadonlyKeyword */)); if (flags2 & 128 /* Accessor */) @@ -20956,7 +21061,7 @@ ${lanes.join("\n")} return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(165 /* QualifiedName */); + const node = createBaseNode(166 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -20967,7 +21072,7 @@ ${lanes.join("\n")} return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(166 /* ComputedPropertyName */); + const node = createBaseNode(167 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -20976,7 +21081,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(167 /* TypeParameter */); + const node = createBaseDeclaration(168 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -20990,7 +21095,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.default !== defaultType ? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node) : node; } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { - const node = createBaseDeclaration(168 /* Parameter */); + const node = createBaseDeclaration(169 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -21009,7 +21114,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(169 /* Decorator */); + const node = createBaseNode(170 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -21022,7 +21127,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(170 /* PropertySignature */); + const node = createBaseDeclaration(171 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -21042,14 +21147,14 @@ ${lanes.join("\n")} return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(171 /* PropertyDeclaration */); + const node = createBaseDeclaration(172 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.type = type; node.initializer = asInitializer(initializer); - const isAmbient = node.flags & 16777216 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; + const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; node.jsDoc = void 0; return node; @@ -21058,7 +21163,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(172 /* MethodSignature */); + const node = createBaseDeclaration(173 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -21076,7 +21181,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(173 /* MethodDeclaration */); + const node = createBaseDeclaration(174 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -21113,7 +21218,7 @@ ${lanes.join("\n")} return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(174 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(175 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -21134,7 +21239,7 @@ ${lanes.join("\n")} return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(175 /* Constructor */); + const node = createBaseDeclaration(176 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; @@ -21160,7 +21265,7 @@ ${lanes.join("\n")} return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(176 /* GetAccessor */); + const node = createBaseDeclaration(177 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -21191,7 +21296,7 @@ ${lanes.join("\n")} return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(177 /* SetAccessor */); + const node = createBaseDeclaration(178 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -21223,7 +21328,7 @@ ${lanes.join("\n")} return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(178 /* CallSignature */); + const node = createBaseDeclaration(179 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21238,7 +21343,7 @@ ${lanes.join("\n")} return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(179 /* ConstructSignature */); + const node = createBaseDeclaration(180 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21253,7 +21358,7 @@ ${lanes.join("\n")} return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(180 /* IndexSignature */); + const node = createBaseDeclaration(181 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -21268,7 +21373,7 @@ ${lanes.join("\n")} return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(203 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -21281,7 +21386,7 @@ ${lanes.join("\n")} return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(181 /* TypePredicate */); + const node = createBaseNode(182 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -21292,7 +21397,7 @@ ${lanes.join("\n")} return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(182 /* TypeReference */); + const node = createBaseNode(183 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21302,7 +21407,7 @@ ${lanes.join("\n")} return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(183 /* FunctionType */); + const node = createBaseDeclaration(184 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -21327,7 +21432,7 @@ ${lanes.join("\n")} return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(184 /* ConstructorType */); + const node = createBaseDeclaration(185 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -21358,7 +21463,7 @@ ${lanes.join("\n")} return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(185 /* TypeQuery */); + const node = createBaseNode(186 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21368,7 +21473,7 @@ ${lanes.join("\n")} return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(186 /* TypeLiteral */); + const node = createBaseDeclaration(187 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21377,7 +21482,7 @@ ${lanes.join("\n")} return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(187 /* ArrayType */); + const node = createBaseNode(188 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21386,7 +21491,7 @@ ${lanes.join("\n")} return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(188 /* TupleType */); + const node = createBaseNode(189 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21395,7 +21500,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(201 /* NamedTupleMember */); + const node = createBaseDeclaration(202 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -21408,7 +21513,7 @@ ${lanes.join("\n")} return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(189 /* OptionalType */); + const node = createBaseNode(190 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21417,7 +21522,7 @@ ${lanes.join("\n")} return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(190 /* RestType */); + const node = createBaseNode(191 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21435,19 +21540,19 @@ ${lanes.join("\n")} return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(191 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(192 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(193 /* ConditionalType */); + const node = createBaseNode(194 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -21461,7 +21566,7 @@ ${lanes.join("\n")} return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(194 /* InferType */); + const node = createBaseNode(195 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21470,7 +21575,7 @@ ${lanes.join("\n")} return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(202 /* TemplateLiteralType */); + const node = createBaseNode(203 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21480,7 +21585,7 @@ ${lanes.join("\n")} return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(204 /* ImportType */); + const node = createBaseNode(205 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -21493,7 +21598,7 @@ ${lanes.join("\n")} return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(195 /* ParenthesizedType */); + const node = createBaseNode(196 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21502,12 +21607,12 @@ ${lanes.join("\n")} return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(196 /* ThisType */); + const node = createBaseNode(197 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(197 /* TypeOperator */); + const node = createBaseNode(198 /* TypeOperator */); node.operator = operator; node.type = operator === 148 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -21517,7 +21622,7 @@ ${lanes.join("\n")} return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(198 /* IndexedAccessType */); + const node = createBaseNode(199 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -21527,7 +21632,7 @@ ${lanes.join("\n")} return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(199 /* MappedType */); + const node = createBaseDeclaration(200 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -21543,7 +21648,7 @@ ${lanes.join("\n")} return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(200 /* LiteralType */); + const node = createBaseNode(201 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -21552,7 +21657,7 @@ ${lanes.join("\n")} return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(205 /* ObjectBindingPattern */); + const node = createBaseNode(206 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -21564,7 +21669,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(206 /* ArrayBindingPattern */); + const node = createBaseNode(207 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -21573,7 +21678,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(207 /* BindingElement */); + const node = createBaseDeclaration(208 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -21586,7 +21691,7 @@ ${lanes.join("\n")} return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(208 /* ArrayLiteralExpression */); + const node = createBaseNode(209 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -21598,7 +21703,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(209 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(210 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -21609,7 +21714,7 @@ ${lanes.join("\n")} return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(210 /* PropertyAccessExpression */); + const node = createBaseDeclaration(211 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -21650,16 +21755,16 @@ ${lanes.join("\n")} questionDotToken, asName(name) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updatePropertyAccessChain(node, expression, questionDotToken, name) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(211 /* ElementAccessExpression */); + const node = createBaseDeclaration(212 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -21700,16 +21805,16 @@ ${lanes.join("\n")} questionDotToken, asExpression(index) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(212 /* CallExpression */); + const node = createBaseDeclaration(213 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -21757,16 +21862,16 @@ ${lanes.join("\n")} asNodeArray(typeArguments), parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updateCallChain(node, expression, questionDotToken, typeArguments, argumentsArray) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(213 /* NewExpression */); + const node = createBaseDeclaration(214 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -21780,7 +21885,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(214 /* TaggedTemplateExpression */); + const node = createBaseNode(215 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -21801,7 +21906,7 @@ ${lanes.join("\n")} return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(215 /* TypeAssertionExpression */); + const node = createBaseNode(216 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -21811,7 +21916,7 @@ ${lanes.join("\n")} return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(216 /* ParenthesizedExpression */); + const node = createBaseNode(217 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -21821,7 +21926,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(217 /* FunctionExpression */); + const node = createBaseDeclaration(218 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -21846,7 +21951,7 @@ ${lanes.join("\n")} return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(218 /* ArrowFunction */); + const node = createBaseDeclaration(219 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -21868,7 +21973,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(219 /* DeleteExpression */); + const node = createBaseNode(220 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21877,7 +21982,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(220 /* TypeOfExpression */); + const node = createBaseNode(221 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21886,7 +21991,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(221 /* VoidExpression */); + const node = createBaseNode(222 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -21895,7 +22000,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(222 /* AwaitExpression */); + const node = createBaseNode(223 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -21904,7 +22009,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(223 /* PrefixUnaryExpression */); + const node = createBaseNode(224 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -21917,7 +22022,7 @@ ${lanes.join("\n")} return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(224 /* PostfixUnaryExpression */); + const node = createBaseNode(225 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -21930,7 +22035,7 @@ ${lanes.join("\n")} return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(225 /* BinaryExpression */); + const node = createBaseDeclaration(226 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -21963,7 +22068,7 @@ ${lanes.join("\n")} return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(226 /* ConditionalExpression */); + const node = createBaseNode(227 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken ?? createToken(58 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -21976,7 +22081,7 @@ ${lanes.join("\n")} return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(227 /* TemplateExpression */); + const node = createBaseNode(228 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -22051,7 +22156,7 @@ ${lanes.join("\n")} } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(228 /* YieldExpression */); + const node = createBaseNode(229 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -22061,7 +22166,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(229 /* SpreadElement */); + const node = createBaseNode(230 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -22070,7 +22175,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(230 /* ClassExpression */); + const node = createBaseDeclaration(231 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22084,10 +22189,10 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(231 /* OmittedExpression */); + return createBaseNode(232 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(232 /* ExpressionWithTypeArguments */); + const node = createBaseNode(233 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -22101,7 +22206,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(233 /* AsExpression */); + const node = createBaseNode(234 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -22111,7 +22216,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(234 /* NonNullExpression */); + const node = createBaseNode(235 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -22127,7 +22232,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(237 /* SatisfiesExpression */); + const node = createBaseNode(238 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -22137,8 +22242,8 @@ ${lanes.join("\n")} return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(234 /* NonNullExpression */); - node.flags |= 32 /* OptionalChain */; + const node = createBaseNode(235 /* NonNullExpression */); + node.flags |= 64 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -22148,11 +22253,11 @@ ${lanes.join("\n")} return node; } function updateNonNullChain(node, expression) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(235 /* MetaProperty */); + const node = createBaseNode(236 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -22173,7 +22278,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(238 /* TemplateSpan */); + const node = createBaseNode(239 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -22183,12 +22288,12 @@ ${lanes.join("\n")} return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(239 /* SemicolonClassElement */); + const node = createBaseNode(240 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(240 /* Block */); + const node = createBaseNode(241 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -22201,7 +22306,7 @@ ${lanes.join("\n")} return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(242 /* VariableStatement */); + const node = createBaseNode(243 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -22216,12 +22321,12 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(241 /* EmptyStatement */); + const node = createBaseNode(242 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(243 /* ExpressionStatement */); + const node = createBaseNode(244 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -22232,7 +22337,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(244 /* IfStatement */); + const node = createBaseNode(245 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -22245,7 +22350,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(245 /* DoStatement */); + const node = createBaseNode(246 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -22257,7 +22362,7 @@ ${lanes.join("\n")} return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(246 /* WhileStatement */); + const node = createBaseNode(247 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -22269,7 +22374,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(247 /* ForStatement */); + const node = createBaseNode(248 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -22285,7 +22390,7 @@ ${lanes.join("\n")} return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(248 /* ForInStatement */); + const node = createBaseNode(249 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -22300,7 +22405,7 @@ ${lanes.join("\n")} return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(249 /* ForOfStatement */); + const node = createBaseNode(250 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -22318,7 +22423,7 @@ ${lanes.join("\n")} return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(250 /* ContinueStatement */); + const node = createBaseNode(251 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22329,7 +22434,7 @@ ${lanes.join("\n")} return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(251 /* BreakStatement */); + const node = createBaseNode(252 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22340,7 +22445,7 @@ ${lanes.join("\n")} return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(252 /* ReturnStatement */); + const node = createBaseNode(253 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -22351,7 +22456,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(253 /* WithStatement */); + const node = createBaseNode(254 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -22363,7 +22468,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(254 /* SwitchStatement */); + const node = createBaseNode(255 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -22376,7 +22481,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(255 /* LabeledStatement */); + const node = createBaseNode(256 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -22388,7 +22493,7 @@ ${lanes.join("\n")} return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(256 /* ThrowStatement */); + const node = createBaseNode(257 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -22399,7 +22504,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(257 /* TryStatement */); + const node = createBaseNode(258 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -22412,13 +22517,13 @@ ${lanes.join("\n")} return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(258 /* DebuggerStatement */); + const node = createBaseNode(259 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { - const node = createBaseDeclaration(259 /* VariableDeclaration */); + const node = createBaseDeclaration(260 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -22431,20 +22536,23 @@ ${lanes.join("\n")} return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(260 /* VariableDeclarationList */); - node.flags |= flags2 & 3 /* BlockScoped */; + const node = createBaseNode(261 /* VariableDeclarationList */); + node.flags |= flags2 & 7 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - if (flags2 & 3 /* BlockScoped */) { + if (flags2 & 7 /* BlockScoped */) { node.transformFlags |= 1024 /* ContainsES2015 */ | 262144 /* ContainsBlockScopedBinding */; } + if (flags2 & 4 /* Using */) { + node.transformFlags |= 4 /* ContainsESNext */; + } return node; } function updateVariableDeclarationList(node, declarations) { return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(261 /* FunctionDeclaration */); + const node = createBaseDeclaration(262 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -22480,7 +22588,7 @@ ${lanes.join("\n")} return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(262 /* ClassDeclaration */); + const node = createBaseDeclaration(263 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22501,7 +22609,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(263 /* InterfaceDeclaration */); + const node = createBaseDeclaration(264 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22515,7 +22623,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(264 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(265 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -22530,7 +22638,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(265 /* EnumDeclaration */); + const node = createBaseDeclaration(266 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -22543,9 +22651,9 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(266 /* ModuleDeclaration */); + const node = createBaseDeclaration(267 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); - node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); + node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); node.name = name; node.body = body; if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { @@ -22563,7 +22671,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(267 /* ModuleBlock */); + const node = createBaseNode(268 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -22573,7 +22681,7 @@ ${lanes.join("\n")} return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(268 /* CaseBlock */); + const node = createBaseNode(269 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -22584,7 +22692,7 @@ ${lanes.join("\n")} return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(269 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(270 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -22601,7 +22709,7 @@ ${lanes.join("\n")} return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(270 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(271 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -22618,7 +22726,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(271 /* ImportDeclaration */); + const node = createBaseNode(272 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -22632,7 +22740,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(272 /* ImportClause */); + const node = createBaseDeclaration(273 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -22647,7 +22755,7 @@ ${lanes.join("\n")} return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(299 /* AssertClause */); + const node = createBaseNode(300 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -22657,7 +22765,7 @@ ${lanes.join("\n")} return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(300 /* AssertEntry */); + const node = createBaseNode(301 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -22667,7 +22775,7 @@ ${lanes.join("\n")} return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(301 /* ImportTypeAssertionContainer */); + const node = createBaseNode(302 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -22676,7 +22784,7 @@ ${lanes.join("\n")} return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(273 /* NamespaceImport */); + const node = createBaseDeclaration(274 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22686,7 +22794,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(279 /* NamespaceExport */); + const node = createBaseDeclaration(280 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 32 /* ContainsES2020 */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22696,7 +22804,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(274 /* NamedImports */); + const node = createBaseNode(275 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22706,7 +22814,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(275 /* ImportSpecifier */); + const node = createBaseDeclaration(276 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -22718,7 +22826,7 @@ ${lanes.join("\n")} return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment2(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(276 /* ExportAssignment */); + const node = createBaseDeclaration(277 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -22736,7 +22844,7 @@ ${lanes.join("\n")} return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(277 /* ExportDeclaration */); + const node = createBaseDeclaration(278 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -22759,7 +22867,7 @@ ${lanes.join("\n")} return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(278 /* NamedExports */); + const node = createBaseNode(279 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22769,7 +22877,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(280 /* ExportSpecifier */); + const node = createBaseNode(281 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -22782,12 +22890,12 @@ ${lanes.join("\n")} return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(281 /* MissingDeclaration */); + const node = createBaseDeclaration(282 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(282 /* ExternalModuleReference */); + const node = createBaseNode(283 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -22819,7 +22927,7 @@ ${lanes.join("\n")} return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(323 /* JSDocFunctionType */); + const node = createBaseDeclaration(324 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -22833,7 +22941,7 @@ ${lanes.join("\n")} return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(328 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(329 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -22842,7 +22950,7 @@ ${lanes.join("\n")} return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(315 /* JSDocTypeExpression */); + const node = createBaseNode(316 /* JSDocTypeExpression */); node.type = type; return node; } @@ -22850,7 +22958,7 @@ ${lanes.join("\n")} return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(329 /* JSDocSignature */); + const node = createBaseDeclaration(330 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -22879,7 +22987,7 @@ ${lanes.join("\n")} return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(351 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); + const node = createBaseJSDocTag(352 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -22888,7 +22996,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(352 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(353 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -22900,7 +23008,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(347 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(348 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -22911,7 +23019,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(354 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(355 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -22922,7 +23030,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(344 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(345 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -22934,7 +23042,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(345 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); + const node = createBaseJSDocTag(346 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -22942,7 +23050,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(334 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); + const node = createBaseJSDocTag(335 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); node.class = className; return node; } @@ -22950,12 +23058,12 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(335 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); + const node = createBaseJSDocTag(336 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(353 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); + const node = createBaseJSDocTag(354 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); node.name = name; return node; } @@ -22963,7 +23071,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(316 /* JSDocNameReference */); + const node = createBaseNode(317 /* JSDocNameReference */); node.name = name; return node; } @@ -22971,7 +23079,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(317 /* JSDocMemberName */); + const node = createBaseNode(318 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -22981,7 +23089,7 @@ ${lanes.join("\n")} return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(330 /* JSDocLink */); + const node = createBaseNode(331 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -22990,7 +23098,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(331 /* JSDocLinkCode */); + const node = createBaseNode(332 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -22999,7 +23107,7 @@ ${lanes.join("\n")} return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(332 /* JSDocLinkPlain */); + const node = createBaseNode(333 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -23026,14 +23134,14 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(333 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(334 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(346 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(346 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(347 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(347 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -23043,7 +23151,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(327 /* JSDocText */); + const node = createBaseNode(328 /* JSDocText */); node.text = text; return node; } @@ -23051,7 +23159,7 @@ ${lanes.join("\n")} return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(326 /* JSDoc */); + const node = createBaseNode(327 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -23060,7 +23168,7 @@ ${lanes.join("\n")} return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(283 /* JsxElement */); + const node = createBaseNode(284 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -23071,7 +23179,7 @@ ${lanes.join("\n")} return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(284 /* JsxSelfClosingElement */); + const node = createBaseNode(285 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -23085,7 +23193,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(285 /* JsxOpeningElement */); + const node = createBaseNode(286 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -23099,7 +23207,7 @@ ${lanes.join("\n")} return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(286 /* JsxClosingElement */); + const node = createBaseNode(287 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -23108,7 +23216,7 @@ ${lanes.join("\n")} return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(287 /* JsxFragment */); + const node = createBaseNode(288 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -23129,17 +23237,17 @@ ${lanes.join("\n")} return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(288 /* JsxOpeningFragment */); + const node = createBaseNode(289 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(289 /* JsxClosingFragment */); + const node = createBaseNode(290 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(290 /* JsxAttribute */); + const node = createBaseDeclaration(291 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -23149,7 +23257,7 @@ ${lanes.join("\n")} return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(291 /* JsxAttributes */); + const node = createBaseDeclaration(292 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -23158,7 +23266,7 @@ ${lanes.join("\n")} return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(292 /* JsxSpreadAttribute */); + const node = createBaseNode(293 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -23167,7 +23275,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(293 /* JsxExpression */); + const node = createBaseNode(294 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -23177,7 +23285,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createJsxNamespacedName(namespace, name) { - const node = createBaseNode(294 /* JsxNamespacedName */); + const node = createBaseNode(295 /* JsxNamespacedName */); node.namespace = namespace; node.name = name; node.transformFlags |= propagateChildFlags(node.namespace) | propagateChildFlags(node.name) | 2 /* ContainsJsx */; @@ -23187,7 +23295,7 @@ ${lanes.join("\n")} return node.namespace !== namespace || node.name !== name ? update(createJsxNamespacedName(namespace, name), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(295 /* CaseClause */); + const node = createBaseNode(296 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -23198,7 +23306,7 @@ ${lanes.join("\n")} return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(296 /* DefaultClause */); + const node = createBaseNode(297 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -23207,7 +23315,7 @@ ${lanes.join("\n")} return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(297 /* HeritageClause */); + const node = createBaseNode(298 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -23227,7 +23335,7 @@ ${lanes.join("\n")} return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(298 /* CatchClause */); + const node = createBaseNode(299 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -23239,7 +23347,7 @@ ${lanes.join("\n")} return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(302 /* PropertyAssignment */); + const node = createBaseDeclaration(303 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -23261,7 +23369,7 @@ ${lanes.join("\n")} return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(303 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(304 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -23285,7 +23393,7 @@ ${lanes.join("\n")} return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(304 /* SpreadAssignment */); + const node = createBaseDeclaration(305 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -23295,7 +23403,7 @@ ${lanes.join("\n")} return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(305 /* EnumMember */); + const node = createBaseDeclaration(306 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -23306,7 +23414,7 @@ ${lanes.join("\n")} return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(311 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -23376,7 +23484,7 @@ ${lanes.join("\n")} } function cloneRedirectedSourceFile(source) { const node = createRedirectedSourceFile(source.redirectInfo); - node.flags |= source.flags & ~8 /* Synthesized */; + node.flags |= source.flags & ~16 /* Synthesized */; node.fileName = source.fileName; node.path = source.path; node.resolvedPath = source.resolvedPath; @@ -23387,8 +23495,8 @@ ${lanes.join("\n")} return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(311 /* SourceFile */); - node.flags |= source.flags & ~8 /* Synthesized */; + const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); + node.flags |= source.flags & ~16 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { continue; @@ -23421,7 +23529,7 @@ ${lanes.join("\n")} return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(312 /* Bundle */); + const node = createBaseNode(313 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; @@ -23434,7 +23542,7 @@ ${lanes.join("\n")} return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(313 /* UnparsedSource */); + const node = createBaseNode(314 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -23451,48 +23559,48 @@ ${lanes.join("\n")} return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(306 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(307 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(307 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(308 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 309 /* UnparsedInternalText */ : 308 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 310 /* UnparsedInternalText */ : 309 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(310 /* UnparsedSyntheticReference */); + const node = createBaseNode(311 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles2() { - const node = createBaseNode(314 /* InputFiles */); + const node = createBaseNode(315 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(236 /* SyntheticExpression */); + const node = createBaseNode(237 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList3(children) { - const node = createBaseNode(357 /* SyntaxList */); + const node = createBaseNode(358 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(358 /* NotEmittedStatement */); + const node = createBaseNode(359 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(359 /* PartiallyEmittedExpression */); + const node = createBaseNode(360 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -23514,7 +23622,7 @@ ${lanes.join("\n")} return node; } function createCommaListExpression(elements) { - const node = createBaseNode(360 /* CommaListExpression */); + const node = createBaseNode(361 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -23523,7 +23631,7 @@ ${lanes.join("\n")} return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(361 /* SyntheticReferenceExpression */); + const node = createBaseNode(362 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -23534,7 +23642,7 @@ ${lanes.join("\n")} } function cloneGeneratedIdentifier(node) { const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); @@ -23542,7 +23650,7 @@ ${lanes.join("\n")} } function cloneIdentifier(node) { const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.jsDoc = node.jsDoc; clone2.flowNode = node.flowNode; clone2.symbol = node.symbol; @@ -23555,7 +23663,7 @@ ${lanes.join("\n")} } function cloneGeneratedPrivateIdentifier(node) { const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); @@ -23563,7 +23671,7 @@ ${lanes.join("\n")} } function clonePrivateIdentifier(node) { const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); return clone2; @@ -23588,7 +23696,7 @@ ${lanes.join("\n")} return clonePrivateIdentifier(node); } const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); for (const key in node) { @@ -23681,7 +23789,10 @@ ${lanes.join("\n")} ); } function createTypeCheck(value, tag) { - return tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + return tag === "null" ? factory2.createStrictEquality(value, createNull()) : tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + } + function createIsNotTypeCheck(value, tag) { + return tag === "null" ? factory2.createStrictInequality(value, createNull()) : tag === "undefined" ? factory2.createStrictInequality(value, createVoidZero()) : factory2.createStrictInequality(createTypeOfExpression(value), createStringLiteral(tag)); } function createMethodCall(object, methodName, argumentsList) { if (isCallChain(object)) { @@ -23756,17 +23867,17 @@ ${lanes.join("\n")} } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 233 /* AsExpression */: + case 234 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -23806,13 +23917,13 @@ ${lanes.join("\n")} case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: return false; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -24075,6 +24186,9 @@ ${lanes.join("\n")} } return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); } + function updateModifierLike(node, modifierArray) { + return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); + } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; } @@ -24123,43 +24237,43 @@ ${lanes.join("\n")} } function getDefaultTagNameForKind(kind) { switch (kind) { - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return "type"; - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: return "returns"; - case 349 /* JSDocThisTag */: + case 350 /* JSDocThisTag */: return "this"; - case 346 /* JSDocEnumTag */: + case 347 /* JSDocEnumTag */: return "enum"; - case 336 /* JSDocAuthorTag */: + case 337 /* JSDocAuthorTag */: return "author"; - case 338 /* JSDocClassTag */: + case 339 /* JSDocClassTag */: return "class"; - case 339 /* JSDocPublicTag */: + case 340 /* JSDocPublicTag */: return "public"; - case 340 /* JSDocPrivateTag */: + case 341 /* JSDocPrivateTag */: return "private"; - case 341 /* JSDocProtectedTag */: + case 342 /* JSDocProtectedTag */: return "protected"; - case 342 /* JSDocReadonlyTag */: + case 343 /* JSDocReadonlyTag */: return "readonly"; - case 343 /* JSDocOverrideTag */: + case 344 /* JSDocOverrideTag */: return "override"; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return "template"; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return "typedef"; - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return "param"; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return "prop"; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: return "callback"; - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return "overload"; - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return "augments"; - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -24241,77 +24355,77 @@ ${lanes.join("\n")} children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 181 /* FirstTypeNode */ && kind <= 204 /* LastTypeNode */) { + if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 208 /* ArrayLiteralExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 209 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 168 /* Parameter */: + case 169 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 175 /* Constructor */: + case 176 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 146 /* NeverKeyword */: case 154 /* StringKeyword */: case 151 /* ObjectKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: case 116 /* VoidKeyword */: - case 167 /* TypeParameter */: - case 170 /* PropertySignature */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 171 /* PropertySignature */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 298 /* CatchClause */: + case 299 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 215 /* TypeAssertionExpression */: - case 237 /* SatisfiesExpression */: - case 233 /* AsExpression */: - case 359 /* PartiallyEmittedExpression */: - case 216 /* ParenthesizedExpression */: + case 216 /* TypeAssertionExpression */: + case 238 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 360 /* PartiallyEmittedExpression */: + case 217 /* ParenthesizedExpression */: case 108 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; } } function makeSynthetic(node) { - node.flags |= 8 /* Synthesized */; + node.flags |= 16 /* Synthesized */; return node; } function createUnparsedSourceFile(textOrInputFiles, mapPathOrType, mapTextOrStripInternal) { @@ -24560,11 +24674,13 @@ ${lanes.join("\n")} return new (SourceMapSource2 || (SourceMapSource2 = objectAllocator.getSourceMapSourceConstructor()))(fileName, text, skipTrivia2); } function setOriginalNode(node, original) { - node.original = original; - if (original) { - const emitNode = original.emitNode; - if (emitNode) - node.emitNode = mergeEmitNode(emitNode, node.emitNode); + if (node.original !== original) { + node.original = original; + if (original) { + const emitNode = original.emitNode; + if (emitNode) + node.emitNode = mergeEmitNode(emitNode, node.emitNode); + } } return node; } @@ -24580,35 +24696,53 @@ ${lanes.join("\n")} constantValue, helpers, startsOnNewLine, - snippetElement + snippetElement, + classThis, + assignedName } = sourceEmitNode; if (!destEmitNode) destEmitNode = {}; - if (leadingComments) - destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); - if (trailingComments) - destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); - if (flags) + if (flags) { destEmitNode.flags = flags; - if (internalFlags) + } + if (internalFlags) { destEmitNode.internalFlags = internalFlags & ~8 /* Immutable */; - if (commentRange) + } + if (leadingComments) { + destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); + } + if (trailingComments) { + destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); + } + if (commentRange) { destEmitNode.commentRange = commentRange; - if (sourceMapRange) + } + if (sourceMapRange) { destEmitNode.sourceMapRange = sourceMapRange; - if (tokenSourceMapRanges) + } + if (tokenSourceMapRanges) { destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges); - if (constantValue !== void 0) + } + if (constantValue !== void 0) { destEmitNode.constantValue = constantValue; + } if (helpers) { for (const helper of helpers) { destEmitNode.helpers = appendIfUnique(destEmitNode.helpers, helper); } } - if (startsOnNewLine !== void 0) + if (startsOnNewLine !== void 0) { destEmitNode.startsOnNewLine = startsOnNewLine; - if (snippetElement !== void 0) + } + if (snippetElement !== void 0) { destEmitNode.snippetElement = snippetElement; + } + if (classThis) { + destEmitNode.classThis = classThis; + } + if (assignedName) { + destEmitNode.assignedName = assignedName; + } return destEmitNode; } function mergeTokenSourceMapRanges(sourceRanges, destRanges) { @@ -24651,7 +24785,7 @@ ${lanes.join("\n")} function getOrCreateEmitNode(node) { if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node))) ?? Debug.fail("Could not determine parsed source file."); @@ -24913,7 +25047,10 @@ ${lanes.join("\n")} // Class Fields Helpers createClassPrivateFieldGetHelper, createClassPrivateFieldSetHelper, - createClassPrivateFieldInHelper + createClassPrivateFieldInHelper, + // 'using' helpers + createAddDisposableResourceHelper, + createDisposeResourcesHelper }; function getUnscopedHelperName(name) { return setEmitFlags(factory2.createIdentifier(name), 8192 /* HelperName */ | 4 /* AdviseOnEmitNode */); @@ -24968,10 +25105,12 @@ ${lanes.join("\n")} ); } function createESDecorateClassContextObject(contextIn) { - return factory2.createObjectLiteralExpression([ + const properties = [ factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral("class")), - factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name) - ]); + factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name), + factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata) + ]; + return factory2.createObjectLiteralExpression(properties); } function createESDecorateClassElementAccessGetMethod(elementName) { const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name); @@ -25075,13 +25214,15 @@ ${lanes.join("\n")} return factory2.createObjectLiteralExpression(properties); } function createESDecorateClassElementContextObject(contextIn) { - return factory2.createObjectLiteralExpression([ + const properties = [ factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral(contextIn.kind)), factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name.computed ? contextIn.name.name : factory2.createStringLiteralFromNode(contextIn.name.name)), factory2.createPropertyAssignment(factory2.createIdentifier("static"), contextIn.static ? factory2.createTrue() : factory2.createFalse()), factory2.createPropertyAssignment(factory2.createIdentifier("private"), contextIn.private ? factory2.createTrue() : factory2.createFalse()), - factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)) - ]); + factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)), + factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata) + ]; + return factory2.createObjectLiteralExpression(properties); } function createESDecorateContextObject(contextIn) { return contextIn.kind === "class" ? createESDecorateClassContextObject(contextIn) : createESDecorateClassElementContextObject(contextIn); @@ -25392,6 +25533,24 @@ ${lanes.join("\n")} [state, receiver] ); } + function createAddDisposableResourceHelper(envBinding, value, async) { + context.requestEmitHelper(addDisposableResourceHelper); + return factory2.createCallExpression( + getUnscopedHelperName("__addDisposableResource"), + /*typeArguments*/ + void 0, + [envBinding, value, async ? factory2.createTrue() : factory2.createFalse()] + ); + } + function createDisposeResourcesHelper(envBinding) { + context.requestEmitHelper(disposeResourcesHelper); + return factory2.createCallExpression( + getUnscopedHelperName("__disposeResources"), + /*typeArguments*/ + void 0, + [envBinding] + ); + } } function compareEmitHelpers(x, y) { if (x === y) @@ -25444,13 +25603,15 @@ ${lanes.join("\n")} classPrivateFieldSetHelper, classPrivateFieldInHelper, createBindingHelper, - setModuleDefaultHelper + setModuleDefaultHelper, + addDisposableResourceHelper, + disposeResourcesHelper ], (helper) => helper.name)); } function isCallToHelper(firstSegment, helperName) { return isCallExpression(firstSegment) && isIdentifier(firstSegment.expression) && (getEmitFlags(firstSegment.expression) & 8192 /* HelperName */) !== 0 && firstSegment.expression.escapedText === helperName; } - var PrivateIdentifierKind, decorateHelper, metadataHelper, paramHelper, esDecorateHelper, runInitializersHelper, assignHelper, awaitHelper, asyncGeneratorHelper, asyncDelegator, asyncValues, restHelper, awaiterHelper, extendsHelper, templateObjectHelper, readHelper, spreadArrayHelper, propKeyHelper, setFunctionNameHelper, valuesHelper, generatorHelper, createBindingHelper, setModuleDefaultHelper, importStarHelper, importDefaultHelper, exportStarHelper, classPrivateFieldGetHelper, classPrivateFieldSetHelper, classPrivateFieldInHelper, allUnscopedEmitHelpers, asyncSuperHelper, advancedAsyncSuperHelper; + var PrivateIdentifierKind, decorateHelper, metadataHelper, paramHelper, esDecorateHelper, runInitializersHelper, assignHelper, awaitHelper, asyncGeneratorHelper, asyncDelegator, asyncValues, restHelper, awaiterHelper, extendsHelper, templateObjectHelper, readHelper, spreadArrayHelper, propKeyHelper, setFunctionNameHelper, valuesHelper, generatorHelper, createBindingHelper, setModuleDefaultHelper, importStarHelper, importDefaultHelper, exportStarHelper, classPrivateFieldGetHelper, classPrivateFieldSetHelper, classPrivateFieldInHelper, addDisposableResourceHelper, disposeResourcesHelper, allUnscopedEmitHelpers, asyncSuperHelper, advancedAsyncSuperHelper; var init_emitHelpers = __esm({ "src/compiler/factory/emitHelpers.ts"() { "use strict"; @@ -25882,6 +26043,63 @@ ${lanes.join("\n")} return typeof state === "function" ? receiver === state : state.has(receiver); };` }; + addDisposableResourceHelper = { + name: "typescript:addDisposableResource", + importName: "__addDisposableResource", + scoped: false, + text: ` + var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + };` + }; + disposeResourcesHelper = { + name: "typescript:disposeResources", + importName: "__disposeResources", + scoped: false, + text: ` + var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + });` + }; asyncSuperHelper = { name: "typescript:async-super", scoped: true, @@ -25989,7 +26207,7 @@ ${lanes.join("\n")} return node.kind === 128 /* AbstractKeyword */; } function isOverrideModifier(node) { - return node.kind === 163 /* OverrideKeyword */; + return node.kind === 164 /* OverrideKeyword */; } function isAccessorModifier(node) { return node.kind === 129 /* AccessorKeyword */; @@ -26004,577 +26222,577 @@ ${lanes.join("\n")} return node.kind === 84 /* CaseKeyword */; } function isQualifiedName(node) { - return node.kind === 165 /* QualifiedName */; + return node.kind === 166 /* QualifiedName */; } function isComputedPropertyName(node) { - return node.kind === 166 /* ComputedPropertyName */; + return node.kind === 167 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 167 /* TypeParameter */; + return node.kind === 168 /* TypeParameter */; } function isParameter(node) { - return node.kind === 168 /* Parameter */; + return node.kind === 169 /* Parameter */; } function isDecorator(node) { - return node.kind === 169 /* Decorator */; + return node.kind === 170 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 170 /* PropertySignature */; + return node.kind === 171 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 171 /* PropertyDeclaration */; + return node.kind === 172 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 172 /* MethodSignature */; + return node.kind === 173 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 173 /* MethodDeclaration */; + return node.kind === 174 /* MethodDeclaration */; } function isClassStaticBlockDeclaration(node) { - return node.kind === 174 /* ClassStaticBlockDeclaration */; + return node.kind === 175 /* ClassStaticBlockDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 175 /* Constructor */; + return node.kind === 176 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 176 /* GetAccessor */; + return node.kind === 177 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 177 /* SetAccessor */; + return node.kind === 178 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 178 /* CallSignature */; + return node.kind === 179 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 179 /* ConstructSignature */; + return node.kind === 180 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 180 /* IndexSignature */; + return node.kind === 181 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 181 /* TypePredicate */; + return node.kind === 182 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 182 /* TypeReference */; + return node.kind === 183 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 183 /* FunctionType */; + return node.kind === 184 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 184 /* ConstructorType */; + return node.kind === 185 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 185 /* TypeQuery */; + return node.kind === 186 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 186 /* TypeLiteral */; + return node.kind === 187 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 187 /* ArrayType */; + return node.kind === 188 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 188 /* TupleType */; + return node.kind === 189 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 201 /* NamedTupleMember */; + return node.kind === 202 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 189 /* OptionalType */; + return node.kind === 190 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 190 /* RestType */; + return node.kind === 191 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 191 /* UnionType */; + return node.kind === 192 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 192 /* IntersectionType */; + return node.kind === 193 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 193 /* ConditionalType */; + return node.kind === 194 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 194 /* InferType */; + return node.kind === 195 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 195 /* ParenthesizedType */; + return node.kind === 196 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 196 /* ThisType */; + return node.kind === 197 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 197 /* TypeOperator */; + return node.kind === 198 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 198 /* IndexedAccessType */; + return node.kind === 199 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 199 /* MappedType */; + return node.kind === 200 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 200 /* LiteralType */; + return node.kind === 201 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 204 /* ImportType */; + return node.kind === 205 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 203 /* TemplateLiteralTypeSpan */; + return node.kind === 204 /* TemplateLiteralTypeSpan */; } function isTemplateLiteralTypeNode(node) { - return node.kind === 202 /* TemplateLiteralType */; + return node.kind === 203 /* TemplateLiteralType */; } function isObjectBindingPattern(node) { - return node.kind === 205 /* ObjectBindingPattern */; + return node.kind === 206 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 206 /* ArrayBindingPattern */; + return node.kind === 207 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 207 /* BindingElement */; + return node.kind === 208 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 208 /* ArrayLiteralExpression */; + return node.kind === 209 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 209 /* ObjectLiteralExpression */; + return node.kind === 210 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 210 /* PropertyAccessExpression */; + return node.kind === 211 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 211 /* ElementAccessExpression */; + return node.kind === 212 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 212 /* CallExpression */; + return node.kind === 213 /* CallExpression */; } function isNewExpression(node) { - return node.kind === 213 /* NewExpression */; + return node.kind === 214 /* NewExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 214 /* TaggedTemplateExpression */; + return node.kind === 215 /* TaggedTemplateExpression */; } function isTypeAssertionExpression(node) { - return node.kind === 215 /* TypeAssertionExpression */; + return node.kind === 216 /* TypeAssertionExpression */; } function isParenthesizedExpression(node) { - return node.kind === 216 /* ParenthesizedExpression */; + return node.kind === 217 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 217 /* FunctionExpression */; + return node.kind === 218 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 218 /* ArrowFunction */; + return node.kind === 219 /* ArrowFunction */; } function isDeleteExpression(node) { - return node.kind === 219 /* DeleteExpression */; + return node.kind === 220 /* DeleteExpression */; } function isTypeOfExpression(node) { - return node.kind === 220 /* TypeOfExpression */; + return node.kind === 221 /* TypeOfExpression */; } function isVoidExpression(node) { - return node.kind === 221 /* VoidExpression */; + return node.kind === 222 /* VoidExpression */; } function isAwaitExpression(node) { - return node.kind === 222 /* AwaitExpression */; + return node.kind === 223 /* AwaitExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 223 /* PrefixUnaryExpression */; + return node.kind === 224 /* PrefixUnaryExpression */; } function isPostfixUnaryExpression(node) { - return node.kind === 224 /* PostfixUnaryExpression */; + return node.kind === 225 /* PostfixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 225 /* BinaryExpression */; + return node.kind === 226 /* BinaryExpression */; } function isConditionalExpression(node) { - return node.kind === 226 /* ConditionalExpression */; + return node.kind === 227 /* ConditionalExpression */; } function isTemplateExpression(node) { - return node.kind === 227 /* TemplateExpression */; + return node.kind === 228 /* TemplateExpression */; } function isYieldExpression(node) { - return node.kind === 228 /* YieldExpression */; + return node.kind === 229 /* YieldExpression */; } function isSpreadElement(node) { - return node.kind === 229 /* SpreadElement */; + return node.kind === 230 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 230 /* ClassExpression */; + return node.kind === 231 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 231 /* OmittedExpression */; + return node.kind === 232 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 232 /* ExpressionWithTypeArguments */; + return node.kind === 233 /* ExpressionWithTypeArguments */; } function isAsExpression(node) { - return node.kind === 233 /* AsExpression */; + return node.kind === 234 /* AsExpression */; } function isSatisfiesExpression(node) { - return node.kind === 237 /* SatisfiesExpression */; + return node.kind === 238 /* SatisfiesExpression */; } function isNonNullExpression(node) { - return node.kind === 234 /* NonNullExpression */; + return node.kind === 235 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 235 /* MetaProperty */; + return node.kind === 236 /* MetaProperty */; } function isSyntheticExpression(node) { - return node.kind === 236 /* SyntheticExpression */; + return node.kind === 237 /* SyntheticExpression */; } function isPartiallyEmittedExpression(node) { - return node.kind === 359 /* PartiallyEmittedExpression */; + return node.kind === 360 /* PartiallyEmittedExpression */; } function isCommaListExpression(node) { - return node.kind === 360 /* CommaListExpression */; + return node.kind === 361 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 238 /* TemplateSpan */; + return node.kind === 239 /* TemplateSpan */; } function isSemicolonClassElement(node) { - return node.kind === 239 /* SemicolonClassElement */; + return node.kind === 240 /* SemicolonClassElement */; } function isBlock(node) { - return node.kind === 240 /* Block */; + return node.kind === 241 /* Block */; } function isVariableStatement(node) { - return node.kind === 242 /* VariableStatement */; + return node.kind === 243 /* VariableStatement */; } function isEmptyStatement(node) { - return node.kind === 241 /* EmptyStatement */; + return node.kind === 242 /* EmptyStatement */; } function isExpressionStatement(node) { - return node.kind === 243 /* ExpressionStatement */; + return node.kind === 244 /* ExpressionStatement */; } function isIfStatement(node) { - return node.kind === 244 /* IfStatement */; + return node.kind === 245 /* IfStatement */; } function isDoStatement(node) { - return node.kind === 245 /* DoStatement */; + return node.kind === 246 /* DoStatement */; } function isWhileStatement(node) { - return node.kind === 246 /* WhileStatement */; + return node.kind === 247 /* WhileStatement */; } function isForStatement(node) { - return node.kind === 247 /* ForStatement */; + return node.kind === 248 /* ForStatement */; } function isForInStatement(node) { - return node.kind === 248 /* ForInStatement */; + return node.kind === 249 /* ForInStatement */; } function isForOfStatement(node) { - return node.kind === 249 /* ForOfStatement */; + return node.kind === 250 /* ForOfStatement */; } function isContinueStatement(node) { - return node.kind === 250 /* ContinueStatement */; + return node.kind === 251 /* ContinueStatement */; } function isBreakStatement(node) { - return node.kind === 251 /* BreakStatement */; + return node.kind === 252 /* BreakStatement */; } function isReturnStatement(node) { - return node.kind === 252 /* ReturnStatement */; + return node.kind === 253 /* ReturnStatement */; } function isWithStatement(node) { - return node.kind === 253 /* WithStatement */; + return node.kind === 254 /* WithStatement */; } function isSwitchStatement(node) { - return node.kind === 254 /* SwitchStatement */; + return node.kind === 255 /* SwitchStatement */; } function isLabeledStatement(node) { - return node.kind === 255 /* LabeledStatement */; + return node.kind === 256 /* LabeledStatement */; } function isThrowStatement(node) { - return node.kind === 256 /* ThrowStatement */; + return node.kind === 257 /* ThrowStatement */; } function isTryStatement(node) { - return node.kind === 257 /* TryStatement */; + return node.kind === 258 /* TryStatement */; } function isDebuggerStatement(node) { - return node.kind === 258 /* DebuggerStatement */; + return node.kind === 259 /* DebuggerStatement */; } function isVariableDeclaration(node) { - return node.kind === 259 /* VariableDeclaration */; + return node.kind === 260 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 260 /* VariableDeclarationList */; + return node.kind === 261 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 261 /* FunctionDeclaration */; + return node.kind === 262 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 262 /* ClassDeclaration */; + return node.kind === 263 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 263 /* InterfaceDeclaration */; + return node.kind === 264 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 264 /* TypeAliasDeclaration */; + return node.kind === 265 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 265 /* EnumDeclaration */; + return node.kind === 266 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */; + return node.kind === 267 /* ModuleDeclaration */; } function isModuleBlock(node) { - return node.kind === 267 /* ModuleBlock */; + return node.kind === 268 /* ModuleBlock */; } function isCaseBlock(node) { - return node.kind === 268 /* CaseBlock */; + return node.kind === 269 /* CaseBlock */; } function isNamespaceExportDeclaration(node) { - return node.kind === 269 /* NamespaceExportDeclaration */; + return node.kind === 270 /* NamespaceExportDeclaration */; } function isImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */; + return node.kind === 271 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 271 /* ImportDeclaration */; + return node.kind === 272 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 272 /* ImportClause */; + return node.kind === 273 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 301 /* ImportTypeAssertionContainer */; + return node.kind === 302 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 299 /* AssertClause */; + return node.kind === 300 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 300 /* AssertEntry */; + return node.kind === 301 /* AssertEntry */; } function isNamespaceImport(node) { - return node.kind === 273 /* NamespaceImport */; + return node.kind === 274 /* NamespaceImport */; } function isNamespaceExport(node) { - return node.kind === 279 /* NamespaceExport */; + return node.kind === 280 /* NamespaceExport */; } function isNamedImports(node) { - return node.kind === 274 /* NamedImports */; + return node.kind === 275 /* NamedImports */; } function isImportSpecifier(node) { - return node.kind === 275 /* ImportSpecifier */; + return node.kind === 276 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 276 /* ExportAssignment */; + return node.kind === 277 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 277 /* ExportDeclaration */; + return node.kind === 278 /* ExportDeclaration */; } function isNamedExports(node) { - return node.kind === 278 /* NamedExports */; + return node.kind === 279 /* NamedExports */; } function isExportSpecifier(node) { - return node.kind === 280 /* ExportSpecifier */; + return node.kind === 281 /* ExportSpecifier */; } function isMissingDeclaration(node) { - return node.kind === 281 /* MissingDeclaration */; + return node.kind === 282 /* MissingDeclaration */; } function isNotEmittedStatement(node) { - return node.kind === 358 /* NotEmittedStatement */; + return node.kind === 359 /* NotEmittedStatement */; } function isSyntheticReference(node) { - return node.kind === 361 /* SyntheticReferenceExpression */; + return node.kind === 362 /* SyntheticReferenceExpression */; } function isExternalModuleReference(node) { - return node.kind === 282 /* ExternalModuleReference */; + return node.kind === 283 /* ExternalModuleReference */; } function isJsxElement(node) { - return node.kind === 283 /* JsxElement */; + return node.kind === 284 /* JsxElement */; } function isJsxSelfClosingElement(node) { - return node.kind === 284 /* JsxSelfClosingElement */; + return node.kind === 285 /* JsxSelfClosingElement */; } function isJsxOpeningElement(node) { - return node.kind === 285 /* JsxOpeningElement */; + return node.kind === 286 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 286 /* JsxClosingElement */; + return node.kind === 287 /* JsxClosingElement */; } function isJsxFragment(node) { - return node.kind === 287 /* JsxFragment */; + return node.kind === 288 /* JsxFragment */; } function isJsxOpeningFragment(node) { - return node.kind === 288 /* JsxOpeningFragment */; + return node.kind === 289 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 289 /* JsxClosingFragment */; + return node.kind === 290 /* JsxClosingFragment */; } function isJsxAttribute(node) { - return node.kind === 290 /* JsxAttribute */; + return node.kind === 291 /* JsxAttribute */; } function isJsxAttributes(node) { - return node.kind === 291 /* JsxAttributes */; + return node.kind === 292 /* JsxAttributes */; } function isJsxSpreadAttribute(node) { - return node.kind === 292 /* JsxSpreadAttribute */; + return node.kind === 293 /* JsxSpreadAttribute */; } function isJsxExpression(node) { - return node.kind === 293 /* JsxExpression */; + return node.kind === 294 /* JsxExpression */; } function isJsxNamespacedName(node) { - return node.kind === 294 /* JsxNamespacedName */; + return node.kind === 295 /* JsxNamespacedName */; } function isCaseClause(node) { - return node.kind === 295 /* CaseClause */; + return node.kind === 296 /* CaseClause */; } function isDefaultClause(node) { - return node.kind === 296 /* DefaultClause */; + return node.kind === 297 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 297 /* HeritageClause */; + return node.kind === 298 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 298 /* CatchClause */; + return node.kind === 299 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 302 /* PropertyAssignment */; + return node.kind === 303 /* PropertyAssignment */; } function isShorthandPropertyAssignment(node) { - return node.kind === 303 /* ShorthandPropertyAssignment */; + return node.kind === 304 /* ShorthandPropertyAssignment */; } function isSpreadAssignment(node) { - return node.kind === 304 /* SpreadAssignment */; + return node.kind === 305 /* SpreadAssignment */; } function isEnumMember(node) { - return node.kind === 305 /* EnumMember */; + return node.kind === 306 /* EnumMember */; } function isUnparsedPrepend(node) { - return node.kind === 307 /* UnparsedPrepend */; + return node.kind === 308 /* UnparsedPrepend */; } function isSourceFile(node) { - return node.kind === 311 /* SourceFile */; + return node.kind === 312 /* SourceFile */; } function isBundle(node) { - return node.kind === 312 /* Bundle */; + return node.kind === 313 /* Bundle */; } function isUnparsedSource(node) { - return node.kind === 313 /* UnparsedSource */; + return node.kind === 314 /* UnparsedSource */; } function isJSDocTypeExpression(node) { - return node.kind === 315 /* JSDocTypeExpression */; + return node.kind === 316 /* JSDocTypeExpression */; } function isJSDocNameReference(node) { - return node.kind === 316 /* JSDocNameReference */; + return node.kind === 317 /* JSDocNameReference */; } function isJSDocMemberName(node) { - return node.kind === 317 /* JSDocMemberName */; + return node.kind === 318 /* JSDocMemberName */; } function isJSDocLink(node) { - return node.kind === 330 /* JSDocLink */; + return node.kind === 331 /* JSDocLink */; } function isJSDocLinkCode(node) { - return node.kind === 331 /* JSDocLinkCode */; + return node.kind === 332 /* JSDocLinkCode */; } function isJSDocLinkPlain(node) { - return node.kind === 332 /* JSDocLinkPlain */; + return node.kind === 333 /* JSDocLinkPlain */; } function isJSDocAllType(node) { - return node.kind === 318 /* JSDocAllType */; + return node.kind === 319 /* JSDocAllType */; } function isJSDocUnknownType(node) { - return node.kind === 319 /* JSDocUnknownType */; + return node.kind === 320 /* JSDocUnknownType */; } function isJSDocNullableType(node) { - return node.kind === 320 /* JSDocNullableType */; + return node.kind === 321 /* JSDocNullableType */; } function isJSDocNonNullableType(node) { - return node.kind === 321 /* JSDocNonNullableType */; + return node.kind === 322 /* JSDocNonNullableType */; } function isJSDocOptionalType(node) { - return node.kind === 322 /* JSDocOptionalType */; + return node.kind === 323 /* JSDocOptionalType */; } function isJSDocFunctionType(node) { - return node.kind === 323 /* JSDocFunctionType */; + return node.kind === 324 /* JSDocFunctionType */; } function isJSDocVariadicType(node) { - return node.kind === 324 /* JSDocVariadicType */; + return node.kind === 325 /* JSDocVariadicType */; } function isJSDocNamepathType(node) { - return node.kind === 325 /* JSDocNamepathType */; + return node.kind === 326 /* JSDocNamepathType */; } function isJSDoc(node) { - return node.kind === 326 /* JSDoc */; + return node.kind === 327 /* JSDoc */; } function isJSDocTypeLiteral(node) { - return node.kind === 328 /* JSDocTypeLiteral */; + return node.kind === 329 /* JSDocTypeLiteral */; } function isJSDocSignature(node) { - return node.kind === 329 /* JSDocSignature */; + return node.kind === 330 /* JSDocSignature */; } function isJSDocAugmentsTag(node) { - return node.kind === 334 /* JSDocAugmentsTag */; + return node.kind === 335 /* JSDocAugmentsTag */; } function isJSDocAuthorTag(node) { - return node.kind === 336 /* JSDocAuthorTag */; + return node.kind === 337 /* JSDocAuthorTag */; } function isJSDocClassTag(node) { - return node.kind === 338 /* JSDocClassTag */; + return node.kind === 339 /* JSDocClassTag */; } function isJSDocCallbackTag(node) { - return node.kind === 344 /* JSDocCallbackTag */; + return node.kind === 345 /* JSDocCallbackTag */; } function isJSDocPublicTag(node) { - return node.kind === 339 /* JSDocPublicTag */; + return node.kind === 340 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 340 /* JSDocPrivateTag */; + return node.kind === 341 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 341 /* JSDocProtectedTag */; + return node.kind === 342 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 342 /* JSDocReadonlyTag */; + return node.kind === 343 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 343 /* JSDocOverrideTag */; + return node.kind === 344 /* JSDocOverrideTag */; } function isJSDocOverloadTag(node) { - return node.kind === 345 /* JSDocOverloadTag */; + return node.kind === 346 /* JSDocOverloadTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 337 /* JSDocDeprecatedTag */; + return node.kind === 338 /* JSDocDeprecatedTag */; } function isJSDocSeeTag(node) { - return node.kind === 353 /* JSDocSeeTag */; + return node.kind === 354 /* JSDocSeeTag */; } function isJSDocEnumTag(node) { - return node.kind === 346 /* JSDocEnumTag */; + return node.kind === 347 /* JSDocEnumTag */; } function isJSDocParameterTag(node) { - return node.kind === 347 /* JSDocParameterTag */; + return node.kind === 348 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 348 /* JSDocReturnTag */; + return node.kind === 349 /* JSDocReturnTag */; } function isJSDocThisTag(node) { - return node.kind === 349 /* JSDocThisTag */; + return node.kind === 350 /* JSDocThisTag */; } function isJSDocTypeTag(node) { - return node.kind === 350 /* JSDocTypeTag */; + return node.kind === 351 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 351 /* JSDocTemplateTag */; + return node.kind === 352 /* JSDocTemplateTag */; } function isJSDocTypedefTag(node) { - return node.kind === 352 /* JSDocTypedefTag */; + return node.kind === 353 /* JSDocTypedefTag */; } function isJSDocUnknownTag(node) { - return node.kind === 333 /* JSDocTag */; + return node.kind === 334 /* JSDocTag */; } function isJSDocPropertyTag(node) { - return node.kind === 354 /* JSDocPropertyTag */; + return node.kind === 355 /* JSDocPropertyTag */; } function isJSDocImplementsTag(node) { - return node.kind === 335 /* JSDocImplementsTag */; + return node.kind === 336 /* JSDocImplementsTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 356 /* JSDocSatisfiesTag */; + return node.kind === 357 /* JSDocSatisfiesTag */; } function isJSDocThrowsTag(node) { - return node.kind === 355 /* JSDocThrowsTag */; + return node.kind === 356 /* JSDocThrowsTag */; } function isSyntaxList(n) { - return n.kind === 357 /* SyntaxList */; + return n.kind === 358 /* SyntaxList */; } var init_nodeTests = __esm({ "src/compiler/factory/nodeTests.ts"() { @@ -26888,14 +27106,14 @@ ${lanes.join("\n")} Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); } switch (property.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return createExpressionForPropertyAssignment(factory2, property, receiver); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return createExpressionForMethodDeclaration(factory2, property, receiver); } } @@ -26948,7 +27166,7 @@ ${lanes.join("\n")} return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); } function isCommaExpression(node) { - return node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; + return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -26963,19 +27181,19 @@ ${lanes.join("\n")} } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 237 /* SatisfiesExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 238 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -27112,10 +27330,10 @@ ${lanes.join("\n")} const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } - if (node.kind === 271 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 272 /* ImportDeclaration */ && node.importClause) { return factory2.getGeneratedNameForNode(node); } - if (node.kind === 277 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 278 /* ExportDeclaration */ && node.moduleSpecifier) { return factory2.getGeneratedNameForNode(node); } return void 0; @@ -27178,11 +27396,11 @@ ${lanes.join("\n")} } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -27201,11 +27419,11 @@ ${lanes.join("\n")} } function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 168 /* Parameter */: - case 207 /* BindingElement */: + case 169 /* Parameter */: + case 208 /* BindingElement */: return bindingElement.dotDotDotToken; - case 229 /* SpreadElement */: - case 304 /* SpreadAssignment */: + case 230 /* SpreadElement */: + case 305 /* SpreadAssignment */: return bindingElement; } return void 0; @@ -27217,7 +27435,7 @@ ${lanes.join("\n")} } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { switch (bindingElement.kind) { - case 207 /* BindingElement */: + case 208 /* BindingElement */: if (bindingElement.propertyName) { const propertyName = bindingElement.propertyName; if (isPrivateIdentifier(propertyName)) { @@ -27226,7 +27444,7 @@ ${lanes.join("\n")} return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (bindingElement.name) { const propertyName = bindingElement.name; if (isPrivateIdentifier(propertyName)) { @@ -27235,7 +27453,7 @@ ${lanes.join("\n")} return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; } break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { return Debug.failBadSyntaxKind(bindingElement.name); } @@ -27252,11 +27470,11 @@ ${lanes.join("\n")} } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return name.elements; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return name.properties; } } @@ -27273,19 +27491,19 @@ ${lanes.join("\n")} } function canHaveIllegalType(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 177 /* SetAccessor */; + return kind === 176 /* Constructor */ || kind === 178 /* SetAccessor */; } function canHaveIllegalTypeParameters(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function canHaveIllegalDecorators(node) { const kind = node.kind; - return kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 261 /* FunctionDeclaration */ || kind === 175 /* Constructor */ || kind === 180 /* IndexSignature */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 281 /* MissingDeclaration */ || kind === 242 /* VariableStatement */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 276 /* ExportAssignment */; + return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 243 /* VariableStatement */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */; } function canHaveIllegalModifiers(node) { const kind = node.kind; - return kind === 174 /* ClassStaticBlockDeclaration */ || kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 281 /* MissingDeclaration */ || kind === 269 /* NamespaceExportDeclaration */; + return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 282 /* MissingDeclaration */ || kind === 270 /* NamespaceExportDeclaration */; } function isQuestionOrExclamationToken(node) { return isQuestionToken(node) || isExclamationToken(node); @@ -27452,7 +27670,7 @@ ${lanes.join("\n")} initializer ); } - function createAccessorPropertyGetRedirector(factory2, node, modifiers, name) { + function createAccessorPropertyGetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) { return factory2.createGetAccessorDeclaration( modifiers, name, @@ -27462,7 +27680,7 @@ ${lanes.join("\n")} factory2.createBlock([ factory2.createReturnStatement( factory2.createPropertyAccessExpression( - factory2.createThis(), + receiver, factory2.getGeneratedPrivateNameForNode( node.name, /*prefix*/ @@ -27474,7 +27692,7 @@ ${lanes.join("\n")} ]) ); } - function createAccessorPropertySetRedirector(factory2, node, modifiers, name) { + function createAccessorPropertySetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) { return factory2.createSetAccessorDeclaration( modifiers, name, @@ -27489,7 +27707,7 @@ ${lanes.join("\n")} factory2.createExpressionStatement( factory2.createAssignment( factory2.createPropertyAccessExpression( - factory2.createThis(), + receiver, factory2.getGeneratedPrivateNameForNode( node.name, /*prefix*/ @@ -27690,11 +27908,11 @@ ${lanes.join("\n")} } function canHaveModifiers(node) { const kind = node.kind; - return kind === 167 /* TypeParameter */ || kind === 168 /* Parameter */ || kind === 170 /* PropertySignature */ || kind === 171 /* PropertyDeclaration */ || kind === 172 /* MethodSignature */ || kind === 173 /* MethodDeclaration */ || kind === 175 /* Constructor */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 180 /* IndexSignature */ || kind === 184 /* ConstructorType */ || kind === 217 /* FunctionExpression */ || kind === 218 /* ArrowFunction */ || kind === 230 /* ClassExpression */ || kind === 242 /* VariableStatement */ || kind === 261 /* FunctionDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 277 /* ExportDeclaration */; + return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 231 /* ClassExpression */ || kind === 243 /* VariableStatement */ || kind === 262 /* FunctionDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 278 /* ExportDeclaration */; } function canHaveDecorators(node) { const kind = node.kind; - return kind === 168 /* Parameter */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 230 /* ClassExpression */ || kind === 262 /* ClassDeclaration */; + return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 231 /* ClassExpression */ || kind === 263 /* ClassDeclaration */; } var init_utilitiesPublic2 = __esm({ "src/compiler/factory/utilitiesPublic.ts"() { @@ -27730,7 +27948,7 @@ ${lanes.join("\n")} return canHaveModifiers(node) && hasModifierOfKind(node, 95 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { - return sourceFile.flags & 4194304 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; + return sourceFile.flags & 8388608 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; } function walkTreeForImportMeta(node) { return isImportMeta2(node) ? node : forEachChild(node, walkTreeForImportMeta); @@ -27794,7 +28012,7 @@ ${lanes.join("\n")} return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 164 /* LastToken */) { + if (node === void 0 || node.kind <= 165 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -27829,7 +28047,7 @@ ${lanes.join("\n")} continue; return res; } - if (current.kind >= 165 /* FirstNode */) { + if (current.kind >= 166 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -27910,7 +28128,7 @@ ${lanes.join("\n")} } function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks = false) { const newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks); - newSourceFile.flags |= sourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */; + newSourceFile.flags |= sourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */; return newSourceFile; } function parseIsolatedJSDocComment(content, start, length2) { @@ -28131,7 +28349,7 @@ ${lanes.join("\n")} if (lhs.kind === 110 /* ThisKeyword */) { return true; } - if (lhs.kind === 294 /* JsxNamespacedName */) { + if (lhs.kind === 295 /* JsxNamespacedName */) { return lhs.namespace.escapedText === rhs.namespace.escapedText && lhs.name.escapedText === rhs.name.escapedText; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -28151,428 +28369,428 @@ ${lanes.join("\n")} }; parseNodeFactory = createNodeFactory(1 /* NoParenthesizerRules */, parseBaseNodeFactory); forEachChildTable = { - [165 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [167 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [168 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [303 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [304 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [304 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [305 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [168 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [169 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [171 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [172 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [170 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [171 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [302 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [303 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [259 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [260 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [207 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [180 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [184 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [183 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [178 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [179 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [173 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [172 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [175 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [176 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [177 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [261 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [262 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [217 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [218 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [174 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [182 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [181 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [185 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [186 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [187 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [188 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [191 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [192 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [193 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [194 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [204 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [301 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [195 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [197 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [199 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [200 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [201 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [205 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [206 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [208 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [209 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [210 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [211 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [212 /* CallExpression */]: forEachChildInCallOrNewExpression, - [213 /* NewExpression */]: forEachChildInCallOrNewExpression, - [214 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [213 /* CallExpression */]: forEachChildInCallOrNewExpression, + [214 /* NewExpression */]: forEachChildInCallOrNewExpression, + [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [215 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [216 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [219 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [220 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [220 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [221 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [222 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [223 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [224 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [228 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [229 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [222 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [223 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [224 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [225 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [225 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [226 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [233 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [234 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [234 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [235 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [237 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [238 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [235 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [236 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [226 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [227 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [229 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [230 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [240 /* Block */]: forEachChildInBlock, - [267 /* ModuleBlock */]: forEachChildInBlock, - [311 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [241 /* Block */]: forEachChildInBlock, + [268 /* ModuleBlock */]: forEachChildInBlock, + [312 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [242 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [243 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [260 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [261 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [243 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [244 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [244 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [245 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [245 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [246 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [246 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [247 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [247 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [248 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [248 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [249 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [249 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [250 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [250 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [251 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [252 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [251 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [252 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [253 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [253 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [254 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [254 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [255 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [268 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [269 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [295 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [296 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [296 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [297 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [255 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [256 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [256 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [257 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [257 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [258 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [298 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [299 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [169 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [262 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [230 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [263 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [263 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [231 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [264 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [264 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [265 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [265 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [266 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [305 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [306 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [266 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [267 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [270 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [271 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [271 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [272 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [299 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [300 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [269 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [273 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [274 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [279 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [280 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [274 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [278 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [277 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [275 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [280 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [276 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [277 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [227 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [228 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [238 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [239 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [202 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [203 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [166 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [297 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [298 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [232 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [233 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [282 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [283 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [281 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [360 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [361 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [283 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [287 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [288 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [284 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [285 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [291 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [285 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [286 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [292 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [290 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [291 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [292 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [293 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [293 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [294 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [286 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [287 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [294 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { + [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.namespace) || visitNode2(cbNode, node.name); }, - [189 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [190 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [315 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [320 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [322 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [316 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [322 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [323 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [325 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [324 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [326 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [327 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [353 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [354 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [316 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [317 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [317 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [318 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [347 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [354 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [336 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [348 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [355 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [337 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [335 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [336 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [334 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [335 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [351 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [352 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [352 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 315 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [353 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 316 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [344 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [345 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [348 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [350 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [349 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [356 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [355 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [345 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [329 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [349 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [351 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [350 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [347 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [357 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [356 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [346 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [330 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [330 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [331 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [332 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [328 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [331 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [332 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [333 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [329 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [333 /* JSDocTag */]: forEachChildInJSDocTag, - [338 /* JSDocClassTag */]: forEachChildInJSDocTag, - [339 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [340 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [341 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [342 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [337 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [343 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [359 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [334 /* JSDocTag */]: forEachChildInJSDocTag, + [339 /* JSDocClassTag */]: forEachChildInJSDocTag, + [340 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [341 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [342 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [343 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [338 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [344 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [360 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; ((Parser2) => { var scanner2 = createScanner( @@ -28580,7 +28798,7 @@ ${lanes.join("\n")} /*skipTrivia*/ true ); - var disallowInAndDecoratorContext = 4096 /* DisallowInContext */ | 16384 /* DecoratorContext */; + var disallowInAndDecoratorContext = 8192 /* DisallowInContext */ | 32768 /* DecoratorContext */; var NodeConstructor2; var TokenConstructor2; var IdentifierConstructor2; @@ -28825,10 +29043,10 @@ ${lanes.join("\n")} switch (scriptKind) { case 1 /* JS */: case 2 /* JSX */: - contextFlags = 262144 /* JavaScriptFile */; + contextFlags = 524288 /* JavaScriptFile */; break; case 6 /* JSON */: - contextFlags = 262144 /* JavaScriptFile */ | 67108864 /* JsonFile */; + contextFlags = 524288 /* JavaScriptFile */ | 134217728 /* JsonFile */; break; default: contextFlags = 0 /* None */; @@ -28860,13 +29078,14 @@ ${lanes.join("\n")} function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) { const isDeclarationFile = isDeclarationFileName(fileName); if (isDeclarationFile) { - contextFlags |= 16777216 /* Ambient */; + contextFlags |= 33554432 /* Ambient */; } sourceFlags = contextFlags; nextToken(); const statements = parseList(0 /* SourceElements */, parseStatement); Debug.assert(token() === 1 /* EndOfFileToken */); - const endOfFileToken = addJSDocComment(parseTokenNode()); + const endHasJSDoc = hasPrecedingJSDocComment(); + const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc); const sourceFile = createSourceFile2(fileName, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator2); processCommentPragmas(sourceFile, sourceText); processPragmasIntoFields(sourceFile, reportPragmaDiagnostic); @@ -28886,18 +29105,18 @@ ${lanes.join("\n")} parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic)); } } - function withJSDoc(node, hasJSDoc) { - return hasJSDoc ? addJSDocComment(node) : node; - } let hasDeprecatedTag = false; - function addJSDocComment(node) { + function withJSDoc(node, hasJSDoc) { + if (!hasJSDoc) { + return node; + } Debug.assert(!node.jsDoc); const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), (comment) => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos)); if (jsDoc.length) node.jsDoc = jsDoc; if (hasDeprecatedTag) { hasDeprecatedTag = false; - node.flags |= 268435456 /* Deprecated */; + node.flags |= 536870912 /* Deprecated */; } return node; } @@ -28922,7 +29141,7 @@ ${lanes.join("\n")} } speculationHelper(() => { const savedContextFlags = contextFlags; - contextFlags |= 32768 /* AwaitContext */; + contextFlags |= 65536 /* AwaitContext */; scanner2.resetTokenState(nextStatement.pos); nextToken(); while (token() !== 1 /* EndOfFileToken */) { @@ -28957,7 +29176,7 @@ ${lanes.join("\n")} syntaxCursor = savedSyntaxCursor; return factory2.updateSourceFile(sourceFile, setTextRange(factoryCreateNodeArray(statements), sourceFile.statements)); function containsPossibleTopLevelAwait(node) { - return !(node.flags & 32768 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); + return !(node.flags & 65536 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); } function findNextStatementWithAwait(statements2, start2) { for (let i = start2; i < statements2.length; i++) { @@ -29021,16 +29240,16 @@ ${lanes.join("\n")} } } function setDisallowInContext(val) { - setContextFlag(val, 4096 /* DisallowInContext */); + setContextFlag(val, 8192 /* DisallowInContext */); } function setYieldContext(val) { - setContextFlag(val, 8192 /* YieldContext */); + setContextFlag(val, 16384 /* YieldContext */); } function setDecoratorContext(val) { - setContextFlag(val, 16384 /* DecoratorContext */); + setContextFlag(val, 32768 /* DecoratorContext */); } function setAwaitContext(val) { - setContextFlag(val, 32768 /* AwaitContext */); + setContextFlag(val, 65536 /* AwaitContext */); } function doOutsideOfContext(context, func) { const contextFlagsToClear = context & contextFlags; @@ -29069,52 +29288,52 @@ ${lanes.join("\n")} return func(); } function allowInAnd(func) { - return doOutsideOfContext(4096 /* DisallowInContext */, func); + return doOutsideOfContext(8192 /* DisallowInContext */, func); } function disallowInAnd(func) { - return doInsideOfContext(4096 /* DisallowInContext */, func); + return doInsideOfContext(8192 /* DisallowInContext */, func); } function allowConditionalTypesAnd(func) { - return doOutsideOfContext(65536 /* DisallowConditionalTypesContext */, func); + return doOutsideOfContext(131072 /* DisallowConditionalTypesContext */, func); } function disallowConditionalTypesAnd(func) { - return doInsideOfContext(65536 /* DisallowConditionalTypesContext */, func); + return doInsideOfContext(131072 /* DisallowConditionalTypesContext */, func); } function doInYieldContext(func) { - return doInsideOfContext(8192 /* YieldContext */, func); + return doInsideOfContext(16384 /* YieldContext */, func); } function doInDecoratorContext(func) { - return doInsideOfContext(16384 /* DecoratorContext */, func); + return doInsideOfContext(32768 /* DecoratorContext */, func); } function doInAwaitContext(func) { - return doInsideOfContext(32768 /* AwaitContext */, func); + return doInsideOfContext(65536 /* AwaitContext */, func); } function doOutsideOfAwaitContext(func) { - return doOutsideOfContext(32768 /* AwaitContext */, func); + return doOutsideOfContext(65536 /* AwaitContext */, func); } function doInYieldAndAwaitContext(func) { - return doInsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + return doInsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); } function doOutsideOfYieldAndAwaitContext(func) { - return doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + return doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); } function inContext(flags) { return (contextFlags & flags) !== 0; } function inYieldContext() { - return inContext(8192 /* YieldContext */); + return inContext(16384 /* YieldContext */); } function inDisallowInContext() { - return inContext(4096 /* DisallowInContext */); + return inContext(8192 /* DisallowInContext */); } function inDisallowConditionalTypesContext() { - return inContext(65536 /* DisallowConditionalTypesContext */); + return inContext(131072 /* DisallowConditionalTypesContext */); } function inDecoratorContext() { - return inContext(16384 /* DecoratorContext */); + return inContext(32768 /* DecoratorContext */); } function inAwaitContext() { - return inContext(32768 /* AwaitContext */); + return inContext(65536 /* AwaitContext */); } function parseErrorAtCurrentToken(message, ...args) { return parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), message, ...args); @@ -29438,7 +29657,7 @@ ${lanes.join("\n")} } if (parseErrorBeforeNextFinishedNode) { parseErrorBeforeNextFinishedNode = false; - node.flags |= 131072 /* ThisNodeHasError */; + node.flags |= 262144 /* ThisNodeHasError */; } return node; } @@ -29467,7 +29686,7 @@ ${lanes.join("\n")} "", /*isSingleQuote*/ void 0 - ) : kind === 281 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 282 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -29684,6 +29903,9 @@ ${lanes.join("\n")} case 22 /* HeritageClauses */: return isHeritageClause2(); case 23 /* ImportOrExportSpecifiers */: + if (token() === 161 /* FromKeyword */ && lookAhead(nextTokenIsStringLiteral)) { + return false; + } return tokenIsIdentifierOrKeyword(token()); case 13 /* JsxAttributes */: return tokenIsIdentifierOrKeyword(token()) || token() === 19 /* OpenBraceToken */; @@ -29840,7 +30062,7 @@ ${lanes.join("\n")} if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { return void 0; } - const nodeContextFlags = node.flags & 50720768 /* ContextFlags */; + const nodeContextFlags = node.flags & 101441536 /* ContextFlags */; if (nodeContextFlags !== contextFlags) { return void 0; } @@ -29898,14 +30120,14 @@ ${lanes.join("\n")} function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 175 /* Constructor */: - case 180 /* IndexSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 239 /* SemicolonClassElement */: + case 176 /* Constructor */: + case 181 /* IndexSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 240 /* SemicolonClassElement */: return true; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 80 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -29916,8 +30138,8 @@ ${lanes.join("\n")} function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return true; } } @@ -29926,65 +30148,65 @@ ${lanes.join("\n")} function isReusableStatement(node) { if (node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 242 /* VariableStatement */: - case 240 /* Block */: - case 244 /* IfStatement */: - case 243 /* ExpressionStatement */: - case 256 /* ThrowStatement */: - case 252 /* ReturnStatement */: - case 254 /* SwitchStatement */: - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 241 /* EmptyStatement */: - case 257 /* TryStatement */: - case 255 /* LabeledStatement */: - case 245 /* DoStatement */: - case 258 /* DebuggerStatement */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 262 /* FunctionDeclaration */: + case 243 /* VariableStatement */: + case 241 /* Block */: + case 245 /* IfStatement */: + case 244 /* ExpressionStatement */: + case 257 /* ThrowStatement */: + case 253 /* ReturnStatement */: + case 255 /* SwitchStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 242 /* EmptyStatement */: + case 258 /* TryStatement */: + case 256 /* LabeledStatement */: + case 246 /* DoStatement */: + case 259 /* DebuggerStatement */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 305 /* EnumMember */; + return node.kind === 306 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 170 /* PropertySignature */: - case 178 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 171 /* PropertySignature */: + case 179 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 259 /* VariableDeclaration */) { + if (node.kind !== 260 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 168 /* Parameter */) { + if (node.kind !== 169 /* Parameter */) { return false; } const parameter = node; @@ -30042,6 +30264,9 @@ ${lanes.join("\n")} case 22 /* HeritageClauses */: return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_expected); case 23 /* ImportOrExportSpecifiers */: + if (token() === 161 /* FromKeyword */) { + return parseErrorAtCurrentToken(Diagnostics._0_expected, "}"); + } return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case 13 /* JsxAttributes */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); @@ -30321,14 +30546,14 @@ ${lanes.join("\n")} } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return nodeIsMissing(node.typeName); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: { + case 184 /* FunctionType */: + case 185 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -30620,7 +30845,7 @@ ${lanes.join("\n")} function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 179 /* ConstructSignature */) { + if (kind === 180 /* ConstructSignature */) { parseExpected(105 /* NewKeyword */); } const typeParameters = parseTypeParameters(); @@ -30631,7 +30856,7 @@ ${lanes.join("\n")} true ); parseTypeMemberSemicolon(); - const node = kind === 178 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -30716,10 +30941,10 @@ ${lanes.join("\n")} } function parseTypeMember() { if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { - return parseSignatureMember(178 /* CallSignature */); + return parseSignatureMember(179 /* CallSignature */); } if (token() === 105 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(179 /* ConstructSignature */); + return parseSignatureMember(180 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -30728,10 +30953,10 @@ ${lanes.join("\n")} false ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -30940,7 +31165,7 @@ ${lanes.join("\n")} return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos); } function parseImportType() { - sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); const isTypeOf = parseOptional(114 /* TypeOfKeyword */); parseExpected(102 /* ImportKeyword */); @@ -30965,7 +31190,7 @@ ${lanes.join("\n")} case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 155 /* SymbolKeyword */: case 136 /* BooleanKeyword */: case 157 /* UndefinedKeyword */: @@ -31031,7 +31256,7 @@ ${lanes.join("\n")} case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 148 /* ReadonlyKeyword */: case 155 /* SymbolKeyword */: @@ -31277,8 +31502,8 @@ ${lanes.join("\n")} return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); } function parseType() { - if (contextFlags & 40960 /* TypeExcludesFlags */) { - return doOutsideOfContext(40960 /* TypeExcludesFlags */, parseType); + if (contextFlags & 81920 /* TypeExcludesFlags */) { + return doOutsideOfContext(81920 /* TypeExcludesFlags */, parseType); } if (isStartOfFunctionTypeOrConstructorType()) { return parseFunctionOrConstructorType(); @@ -31399,12 +31624,14 @@ ${lanes.join("\n")} return arrowExpression; } const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); if (expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) { return parseSimpleArrowFunctionExpression( pos, expr, allowReturnTypeInArrowFunction, + hasJSDoc, /*asyncModifier*/ void 0 ); @@ -31450,7 +31677,7 @@ ${lanes.join("\n")} ), pos); } } - function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, asyncModifier) { + function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier) { Debug.assert(token() === 39 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); const parameter = factory2.createParameterDeclaration( /*modifiers*/ @@ -31483,7 +31710,7 @@ ${lanes.join("\n")} equalsGreaterThanToken, body ); - return addJSDocComment(finishNode(node, pos)); + return withJSDoc(finishNode(node, pos), hasJSDoc); } function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { const triState = isParenthesizedArrowFunctionExpression(); @@ -31611,9 +31838,10 @@ ${lanes.join("\n")} if (token() === 134 /* AsyncKeyword */) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const asyncModifier = parseModifiersForArrowFunction(); const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); - return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, asyncModifier); + return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier); } } return void 0; @@ -31667,7 +31895,7 @@ ${lanes.join("\n")} return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 195 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -31730,7 +31958,7 @@ ${lanes.join("\n")} return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 103 /* InKeyword */ || t === 164 /* OfKeyword */; + return t === 103 /* InKeyword */ || t === 165 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -31812,7 +32040,7 @@ ${lanes.join("\n")} if (token() === 43 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 215 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { Debug.assert(isKeywordOrPunctuation(unaryOperator)); @@ -31899,13 +32127,13 @@ ${lanes.join("\n")} let expression; if (token() === 102 /* ImportKeyword */) { if (lookAhead(nextTokenIsOpenParenOrLessThan)) { - sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; expression = parseTokenNode(); } else if (lookAhead(nextTokenIsDot)) { nextToken(); nextToken(); expression = finishNode(factory2.createMetaProperty(102 /* ImportKeyword */, parseIdentifierName()), pos); - sourceFlags |= 4194304 /* PossiblyContainsImportMeta */; + sourceFlags |= 8388608 /* PossiblyContainsImportMeta */; } else { expression = parseMemberExpressionOrHigher(); } @@ -31952,11 +32180,11 @@ ${lanes.join("\n")} const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 285 /* JsxOpeningElement */) { + if (opening.kind === 286 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 283 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -31980,10 +32208,10 @@ ${lanes.join("\n")} } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 288 /* JsxOpeningFragment */) { + } else if (opening.kind === 289 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 284 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 285 /* JsxSelfClosingElement */); result = opening; } if (!mustBeUnary && inExpressionContext && token() === 30 /* LessThanToken */) { @@ -32056,7 +32284,7 @@ ${lanes.join("\n")} if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 283 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -32075,7 +32303,7 @@ ${lanes.join("\n")} return finishNode(factory2.createJsxOpeningFragment(), pos); } const tagName = parseJsxElementName(); - const typeArguments = (contextFlags & 262144 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; + const typeArguments = (contextFlags & 524288 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; const attributes = parseJsxAttributes(); let node; if (token() === 32 /* GreaterThanToken */) { @@ -32253,17 +32481,17 @@ ${lanes.join("\n")} return token() === 29 /* QuestionDotToken */ && lookAhead(nextTokenIsIdentifierOrKeywordOrOpenBracketOrTemplate); } function tryReparseOptionalChain(node) { - if (node.flags & 32 /* OptionalChain */) { + if (node.flags & 64 /* OptionalChain */) { return true; } if (isNonNullExpression(node)) { let expr = node.expression; - while (isNonNullExpression(expr) && !(expr.flags & 32 /* OptionalChain */)) { + while (isNonNullExpression(expr) && !(expr.flags & 64 /* OptionalChain */)) { expr = expr.expression; } - if (expr.flags & 32 /* OptionalChain */) { + if (expr.flags & 64 /* OptionalChain */) { while (isNonNullExpression(node)) { - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node = node.expression; } return true; @@ -32329,7 +32557,7 @@ ${lanes.join("\n")} continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 232 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -32368,8 +32596,8 @@ ${lanes.join("\n")} true ) ); - if (questionDotToken || tag.flags & 32 /* OptionalChain */) { - tagExpression.flags |= 32 /* OptionalChain */; + if (questionDotToken || tag.flags & 64 /* OptionalChain */) { + tagExpression.flags |= 64 /* OptionalChain */; } tagExpression.questionDotToken = questionDotToken; return finishNode(tagExpression, pos); @@ -32392,7 +32620,7 @@ ${lanes.join("\n")} } } if (typeArguments || token() === 21 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32421,7 +32649,7 @@ ${lanes.join("\n")} return result; } function parseTypeArgumentsInExpression() { - if ((contextFlags & 262144 /* JavaScriptFile */) !== 0) { + if ((contextFlags & 524288 /* JavaScriptFile */) !== 0) { return void 0; } if (reScanLessThanToken() !== 30 /* LessThanToken */) { @@ -32553,10 +32781,10 @@ ${lanes.join("\n")} true ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -32650,7 +32878,7 @@ ${lanes.join("\n")} false ); let typeArguments; - if (expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (expression.kind === 233 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -32760,7 +32988,7 @@ ${lanes.join("\n")} parseExpected(21 /* OpenParenToken */); let initializer; if (token() !== 27 /* SemicolonToken */) { - if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */) { + if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -32770,7 +32998,7 @@ ${lanes.join("\n")} } } let node; - if (awaitToken ? parseExpected(164 /* OfKeyword */) : parseOptional(164 /* OfKeyword */)) { + if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ true @@ -32794,10 +33022,10 @@ ${lanes.join("\n")} function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 251 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); + parseExpected(kind === 252 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 251 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 252 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -32816,7 +33044,7 @@ ${lanes.join("\n")} const openParenParsed = parseExpected(21 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition); - const statement = doInsideOfContext(33554432 /* InWithStatement */, parseStatement); + const statement = doInsideOfContext(67108864 /* InWithStatement */, parseStatement); return withJSDoc(finishNode(factory2.createWithStatement(expression, statement), pos), hasJSDoc); } function parseCaseClause() { @@ -32956,6 +33184,10 @@ ${lanes.join("\n")} case 86 /* ClassKeyword */: case 94 /* EnumKeyword */: return true; + case 160 /* UsingKeyword */: + return isUsingDeclaration(); + case 135 /* AwaitKeyword */: + return isAwaitUsingDeclaration(); case 120 /* InterfaceKeyword */: case 156 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); @@ -32970,12 +33202,16 @@ ${lanes.join("\n")} case 124 /* ProtectedKeyword */: case 125 /* PublicKeyword */: case 148 /* ReadonlyKeyword */: + const previousToken = token(); nextToken(); if (scanner2.hasPrecedingLineBreak()) { return false; } + if (previousToken === 138 /* DeclareKeyword */ && token() === 156 /* TypeKeyword */) { + return true; + } continue; - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: nextToken(); return token() === 19 /* OpenBraceToken */ || token() === 80 /* Identifier */ || token() === 95 /* ExportKeyword */; case 102 /* ImportKeyword */: @@ -33008,6 +33244,7 @@ ${lanes.join("\n")} case 19 /* OpenBraceToken */: case 115 /* VarKeyword */: case 121 /* LetKeyword */: + case 160 /* UsingKeyword */: case 100 /* FunctionKeyword */: case 86 /* ClassKeyword */: case 94 /* EnumKeyword */: @@ -33037,7 +33274,7 @@ ${lanes.join("\n")} case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: case 156 /* TypeKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: return true; case 129 /* AccessorKeyword */: case 125 /* PublicKeyword */: @@ -33057,6 +33294,36 @@ ${lanes.join("\n")} function isLetDeclaration() { return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuring); } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf() { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine( + /*disallowOf*/ + true + ); + } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf) { + nextToken(); + if (disallowOf && token() === 165 /* OfKeyword */) + return false; + return (isBindingIdentifier() || token() === 19 /* OpenBraceToken */) && !scanner2.hasPrecedingLineBreak(); + } + function isUsingDeclaration() { + return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); + } + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { + return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine( + /*disallowOf*/ + true + ); + } + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) { + if (nextToken() === 160 /* UsingKeyword */) { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); + } + return false; + } + function isAwaitUsingDeclaration() { + return lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine); + } function parseStatement() { switch (token()) { case 27 /* SemicolonToken */: @@ -33083,6 +33350,26 @@ ${lanes.join("\n")} ); } break; + case 135 /* AwaitKeyword */: + if (isAwaitUsingDeclaration()) { + return parseVariableStatement( + getNodePos(), + hasPrecedingJSDocComment(), + /*modifiers*/ + void 0 + ); + } + break; + case 160 /* UsingKeyword */: + if (isUsingDeclaration()) { + return parseVariableStatement( + getNodePos(), + hasPrecedingJSDocComment(), + /*modifiers*/ + void 0 + ); + } + break; case 100 /* FunctionKeyword */: return parseFunctionDeclaration( getNodePos(), @@ -33106,9 +33393,9 @@ ${lanes.join("\n")} case 99 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 88 /* ContinueKeyword */: - return parseBreakOrContinueStatement(250 /* ContinueStatement */); + return parseBreakOrContinueStatement(251 /* ContinueStatement */); case 83 /* BreakKeyword */: - return parseBreakOrContinueStatement(251 /* BreakStatement */); + return parseBreakOrContinueStatement(252 /* BreakStatement */); case 107 /* ReturnKeyword */: return parseReturnStatement(); case 118 /* WithKeyword */: @@ -33142,7 +33429,7 @@ ${lanes.join("\n")} case 129 /* AccessorKeyword */: case 126 /* StaticKeyword */: case 148 /* ReadonlyKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -33167,15 +33454,15 @@ ${lanes.join("\n")} return node; } for (const m of modifiers) { - m.flags |= 16777216 /* Ambient */; + m.flags |= 33554432 /* Ambient */; } - return doInsideOfContext(16777216 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); + return doInsideOfContext(33554432 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); } else { return parseDeclarationWorker(pos, hasJSDoc, modifiers); } } function tryReuseAmbientDeclaration(pos) { - return doInsideOfContext(16777216 /* Ambient */, () => { + return doInsideOfContext(33554432 /* Ambient */, () => { const node = currentNode(parsingContext, pos); if (node) { return consumeNode(node); @@ -33187,6 +33474,8 @@ ${lanes.join("\n")} case 115 /* VarKeyword */: case 121 /* LetKeyword */: case 87 /* ConstKeyword */: + case 160 /* UsingKeyword */: + case 135 /* AwaitKeyword */: return parseVariableStatement(pos, hasJSDoc, modifiersIn); case 100 /* FunctionKeyword */: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); @@ -33198,7 +33487,7 @@ ${lanes.join("\n")} return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); case 94 /* EnumKeyword */: return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); @@ -33218,7 +33507,7 @@ ${lanes.join("\n")} default: if (modifiersIn) { const missing = createMissingNode( - 281 /* MissingDeclaration */, + 282 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -33230,6 +33519,9 @@ ${lanes.join("\n")} return void 0; } } + function nextTokenIsStringLiteral() { + return nextToken() === 11 /* StringLiteral */; + } function nextTokenIsIdentifierOrStringLiteralOnSameLine() { nextToken(); return !scanner2.hasPrecedingLineBreak() && (isIdentifier2() || token() === 11 /* StringLiteral */); @@ -33282,14 +33574,14 @@ ${lanes.join("\n")} function parseObjectBindingPattern() { const pos = getNodePos(); parseExpected(19 /* OpenBraceToken */); - const elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); + const elements = allowInAnd(() => parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement)); parseExpected(20 /* CloseBraceToken */); return finishNode(factory2.createObjectBindingPattern(elements), pos); } function parseArrayBindingPattern() { const pos = getNodePos(); parseExpected(23 /* OpenBracketToken */); - const elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); + const elements = allowInAnd(() => parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement)); parseExpected(24 /* CloseBracketToken */); return finishNode(factory2.createArrayBindingPattern(elements), pos); } @@ -33336,12 +33628,20 @@ ${lanes.join("\n")} case 87 /* ConstKeyword */: flags |= 2 /* Const */; break; + case 160 /* UsingKeyword */: + flags |= 4 /* Using */; + break; + case 135 /* AwaitKeyword */: + Debug.assert(isAwaitUsingDeclaration()); + flags |= 6 /* AwaitUsing */; + nextToken(); + break; default: Debug.fail(); } nextToken(); let declarations; - if (token() === 164 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -33447,7 +33747,7 @@ ${lanes.join("\n")} function parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken) { const exclamationToken = !questionToken && !scanner2.hasPrecedingLineBreak() ? parseOptionalToken(54 /* ExclamationToken */) : void 0; const type = parseTypeAnnotation(); - const initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer); + const initializer = doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */ | 8192 /* DisallowInContext */, parseInitializer); parseSemicolonAfterPropertyName(name, type, initializer); const node = factory2.createPropertyDeclaration( modifiers, @@ -33487,7 +33787,7 @@ ${lanes.join("\n")} false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 176 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -33653,10 +33953,10 @@ ${lanes.join("\n")} return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); } if (token() === 137 /* ConstructorKeyword */ || token() === 11 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); @@ -33671,9 +33971,9 @@ ${lanes.join("\n")} const isAmbient = some(modifiers, isDeclareModifier); if (isAmbient) { for (const m of modifiers) { - m.flags |= 16777216 /* Ambient */; + m.flags |= 33554432 /* Ambient */; } - return doInsideOfContext(16777216 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); + return doInsideOfContext(33554432 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); } else { return parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers); } @@ -33704,10 +34004,10 @@ ${lanes.join("\n")} true ); if (token() === 86 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 230 /* ClassExpression */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 231 /* ClassExpression */); } const missing = createMissingNode( - 281 /* MissingDeclaration */, + 282 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -33722,11 +34022,11 @@ ${lanes.join("\n")} hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 230 /* ClassExpression */ + 231 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 262 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 263 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); @@ -33747,7 +34047,7 @@ ${lanes.join("\n")} members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 262 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 263 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { @@ -33773,7 +34073,7 @@ ${lanes.join("\n")} function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (expression.kind === 233 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -33799,6 +34099,9 @@ ${lanes.join("\n")} } function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { parseExpected(156 /* TypeKeyword */); + if (scanner2.hasPrecedingLineBreak()) { + parseErrorAtCurrentToken(Diagnostics.Line_break_not_permitted_here); + } const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(64 /* EqualsToken */); @@ -33839,7 +34142,7 @@ ${lanes.join("\n")} return finishNode(factory2.createModuleBlock(statements), pos); } function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) { - const namespaceFlag = flags & 16 /* Namespace */; + const namespaceFlag = flags & 32 /* Namespace */; const name = parseIdentifier(); const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration( getNodePos(), @@ -33847,7 +34150,7 @@ ${lanes.join("\n")} false, /*modifiers*/ void 0, - 4 /* NestedNamespace */ | namespaceFlag + 8 /* NestedNamespace */ | namespaceFlag ) : parseModuleBlock(); const node = factory2.createModuleDeclaration(modifiers, name, body, flags); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -33855,9 +34158,9 @@ ${lanes.join("\n")} function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; let name; - if (token() === 161 /* GlobalKeyword */) { + if (token() === 162 /* GlobalKeyword */) { name = parseIdentifier(); - flags |= 1024 /* GlobalAugmentation */; + flags |= 2048 /* GlobalAugmentation */; } else { name = parseLiteralNode(); name.text = internIdentifier(name.text); @@ -33873,10 +34176,10 @@ ${lanes.join("\n")} } function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; - if (token() === 161 /* GlobalKeyword */) { + if (token() === 162 /* GlobalKeyword */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); } else if (parseOptional(145 /* NamespaceKeyword */)) { - flags |= 16 /* Namespace */; + flags |= 32 /* Namespace */; } else { parseExpected(144 /* ModuleKeyword */); if (token() === 11 /* StringLiteral */) { @@ -33914,7 +34217,7 @@ ${lanes.join("\n")} identifier = parseIdentifier(); } let isTypeOnly = false; - if (token() !== 160 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { + if (token() !== 161 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { isTypeOnly = true; identifier = isIdentifier2() ? parseIdentifier() : void 0; } @@ -33926,7 +34229,7 @@ ${lanes.join("\n")} token() === 42 /* AsteriskToken */ || // import * token() === 19 /* OpenBraceToken */) { importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(160 /* FromKeyword */); + parseExpected(161 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); let assertClause; @@ -33991,7 +34294,7 @@ ${lanes.join("\n")} return token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */; } function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 28 /* CommaToken */ || token() === 160 /* FromKeyword */; + return token() === 28 /* CommaToken */ || token() === 161 /* FromKeyword */; } function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { parseExpected(64 /* EqualsToken */); @@ -34004,7 +34307,7 @@ ${lanes.join("\n")} function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(28 /* CommaToken */)) { - namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(274 /* NamedImports */); + namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(275 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -34040,15 +34343,15 @@ ${lanes.join("\n")} } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 274 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); + const node = kind === 275 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(280 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(281 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(275 /* ImportSpecifier */); + return parseImportOrExportSpecifier(276 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -34092,10 +34395,10 @@ ${lanes.join("\n")} parseExpected(130 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 275 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 276 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 275 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 276 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -34122,12 +34425,12 @@ ${lanes.join("\n")} if (parseOptional(130 /* AsKeyword */)) { exportClause = parseNamespaceExport(namespaceExportPos); } - parseExpected(160 /* FromKeyword */); + parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(278 /* NamedExports */); - if (token() === 160 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { - parseExpected(160 /* FromKeyword */); + exportClause = parseNamedImportsOrExports(279 /* NamedExports */); + if (token() === 161 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { + parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } } @@ -34232,7 +34535,7 @@ ${lanes.join("\n")} function parseJSDocTypeExpression(mayOmitBraces) { const pos = getNodePos(); const hasBrace = (mayOmitBraces ? parseOptional : parseExpected)(19 /* OpenBraceToken */); - const type = doInsideOfContext(8388608 /* JSDoc */, parseJSDocType); + const type = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); if (!mayOmitBraces || hasBrace) { parseExpectedJSDoc(20 /* CloseBraceToken */); } @@ -34271,7 +34574,7 @@ ${lanes.join("\n")} void 0, 1 /* JS */ ); - const jsDoc = doInsideOfContext(8388608 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); + const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); const sourceFile = { languageVariant: 0 /* Standard */, text: content }; const diagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); clearState(); @@ -34282,9 +34585,9 @@ ${lanes.join("\n")} const saveToken = currentToken; const saveParseDiagnosticsLength = parseDiagnostics.length; const saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; - const comment = doInsideOfContext(8388608 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); + const comment = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); setParent(comment, parent2); - if (contextFlags & 262144 /* JavaScriptFile */) { + if (contextFlags & 524288 /* JavaScriptFile */) { if (!jsDocDiagnostics) { jsDocDiagnostics = []; } @@ -34765,7 +35068,7 @@ ${lanes.join("\n")} switch (node.kind) { case 151 /* ObjectKeyword */: return true; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -34781,7 +35084,7 @@ ${lanes.join("\n")} typeExpression = tryParseTypeExpression(); } const comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); - const nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent2); + const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent2); if (nestedTypeLiteral) { typeExpression = nestedTypeLiteral; isNameFirst = true; @@ -34795,14 +35098,14 @@ ${lanes.join("\n")} let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { - if (child.kind === 347 /* JSDocParameterTag */ || child.kind === 354 /* JSDocPropertyTag */) { + if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) { children = append(children, child); - } else if (child.kind === 351 /* JSDocTemplateTag */) { + } else if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 187 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -34937,11 +35240,11 @@ ${lanes.join("\n")} let jsDocPropertyTags; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent2))) { - if (child.kind === 351 /* JSDocTemplateTag */) { + if (child.kind === 352 /* JSDocTemplateTag */) { break; } hasChildren = true; - if (child.kind === 350 /* JSDocTypeTag */) { + if (child.kind === 351 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -34956,7 +35259,7 @@ ${lanes.join("\n")} } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 187 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -34985,12 +35288,12 @@ ${lanes.join("\n")} void 0, typeNameOrNamespaceName, body, - nested ? 4 /* NestedNamespace */ : void 0 + nested ? 8 /* NestedNamespace */ : void 0 ); return finishNode(jsDocNamespaceNode, start2); } if (nested) { - typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */; + typeNameOrNamespaceName.flags |= 4096 /* IdentifierIsInJSDocNamespace */; } return typeNameOrNamespaceName; } @@ -34999,7 +35302,7 @@ ${lanes.join("\n")} let child; let parameters; while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent2))) { - if (child.kind === 351 /* JSDocTemplateTag */) { + if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); break; } @@ -35012,7 +35315,7 @@ ${lanes.join("\n")} const returnTag = tryParse(() => { if (parseOptionalJsdoc(60 /* AtToken */)) { const tag = parseTag(indent2); - if (tag && tag.kind === 348 /* JSDocReturnTag */) { + if (tag && tag.kind === 349 /* JSDocReturnTag */) { return tag; } } @@ -35067,7 +35370,7 @@ ${lanes.join("\n")} case 60 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent2); - if (child && (child.kind === 347 /* JSDocParameterTag */ || child.kind === 354 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -35132,7 +35435,7 @@ ${lanes.join("\n")} if (isBracketed) { skipWhitespace(); parseExpected(64 /* EqualsToken */); - defaultType = doInsideOfContext(8388608 /* JSDoc */, parseJSDocType); + defaultType = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); parseExpected(24 /* CloseBracketToken */); } if (nodeIsMissing(name)) { @@ -35582,7 +35885,7 @@ ${lanes.join("\n")} })(IncrementalParser || (IncrementalParser = {})); namedArgRegExCache = /* @__PURE__ */ new Map(); tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/im; - singleLinePragmaRegEx = /^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im; + singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im; } }); @@ -35968,7 +36271,7 @@ ${lanes.join("\n")} function convertConfigFileToObject(sourceFile, errors, jsonConversionNotifier) { var _a; const rootExpression = (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression; - if (rootExpression && rootExpression.kind !== 209 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -36020,7 +36323,7 @@ ${lanes.join("\n")} var _a; const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 302 /* PropertyAssignment */) { + if (element.kind !== 303 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -36065,15 +36368,15 @@ ${lanes.join("\n")} return valueExpression.text; case 9 /* NumericLiteral */: return Number(valueExpression.text); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: if (valueExpression.operator !== 41 /* MinusToken */ || valueExpression.operand.kind !== 9 /* NumericLiteral */) { break; } return -Number(valueExpression.operand.text); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: const objectLiteralExpression = valueExpression; return convertObjectLiteralExpressionToJson(objectLiteralExpression, option); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return convertArrayLiteralExpressionToJson( valueExpression.elements, option && option.element @@ -36456,8 +36759,8 @@ ${lanes.join("\n")} const fileName = configFileName || "tsconfig.json"; const diagnosticMessage = Diagnostics.The_files_list_in_config_file_0_is_empty; const nodeValue = forEachTsConfigPropArray(sourceFile, "files", (property) => property.initializer); - const error = createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnosticMessage, fileName); - errors.push(error); + const error2 = createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnosticMessage, fileName); + errors.push(error2); } else { createCompilerDiagnosticOnlyIfJson(Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json"); } @@ -36564,8 +36867,8 @@ ${lanes.join("\n")} } } } - function isErrorNoInputFiles(error) { - return error.code === Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code; + function isErrorNoInputFiles(error2) { + return error2.code === Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code; } function getErrorForNoInputFiles({ includeSpecs, excludeSpecs }, configFileName) { return createCompilerDiagnostic( @@ -36586,7 +36889,7 @@ ${lanes.join("\n")} if (shouldReportNoInputFiles(fileNames, canJsonReportNoInutFiles)) { configParseDiagnostics.push(getErrorForNoInputFiles(configFileSpecs, configFileName)); } else { - filterMutate(configParseDiagnostics, (error) => !isErrorNoInputFiles(error)); + filterMutate(configParseDiagnostics, (error2) => !isErrorNoInputFiles(error2)); } return existingErrors !== configParseDiagnostics.length; } @@ -36994,19 +37297,19 @@ ${lanes.join("\n")} const wildcardFiles = arrayFrom(wildcardFileMap.values()); return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values())); } - function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames, currentDirectory) { + function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) { const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec; if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs)) return false; basePath = normalizePath(basePath); - const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames); + const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2); if (validatedFilesSpec) { for (const fileName of validatedFilesSpec) { if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck) return false; } } - return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath); + return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath); } function invalidDotDotAfterRecursiveWildcard(s) { const wildcardIndex = startsWith(s, "**/") ? 0 : s.indexOf("/**/"); @@ -37016,17 +37319,17 @@ ${lanes.join("\n")} const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../"); return lastDotIndex > wildcardIndex; } - function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) { + function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) { return matchesExcludeWorker( pathToCheck, filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)), - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, currentDirectory ); } - function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) { + function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) { const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude"); - const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames); + const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2); if (!excludeRegex) return false; if (excludeRegex.test(pathToCheck)) @@ -37056,9 +37359,9 @@ ${lanes.join("\n")} return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec]; } } - function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames) { + function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames2) { const rawExcludeRegex = getRegularExpressionForWildcard(exclude, path, "exclude"); - const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i"); + const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? "" : "i"); const wildcardDirectories = {}; if (include !== void 0) { const recursiveKeys = []; @@ -37067,7 +37370,7 @@ ${lanes.join("\n")} if (excludeRegex && excludeRegex.test(spec)) { continue; } - const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames); + const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2); if (match) { const { key, flags } = match; const existingFlags = wildcardDirectories[key]; @@ -37082,7 +37385,7 @@ ${lanes.join("\n")} for (const key in wildcardDirectories) { if (hasProperty(wildcardDirectories, key)) { for (const recursiveKey of recursiveKeys) { - if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) { + if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames2)) { delete wildcardDirectories[key]; } } @@ -37091,20 +37394,20 @@ ${lanes.join("\n")} } return wildcardDirectories; } - function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames) { + function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) { const match = wildcardDirectoryPattern.exec(spec); if (match) { const questionWildcardIndex = spec.indexOf("?"); const starWildcardIndex = spec.indexOf("*"); const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator); return { - key: useCaseSensitiveFileNames ? match[0] : toFileNameLowerCase(match[0]), + key: useCaseSensitiveFileNames2 ? match[0] : toFileNameLowerCase(match[0]), flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */ }; } if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) { return { - key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : toFileNameLowerCase(spec)), + key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames2 ? spec : toFileNameLowerCase(spec)), flags: 1 /* Recursive */ }; } @@ -37254,6 +37557,7 @@ ${lanes.join("\n")} ["es2015.symbol", "lib.es2015.symbol.d.ts"], ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], ["es2016.array.include", "lib.es2016.array.include.d.ts"], + ["es2017.date", "lib.es2017.date.d.ts"], ["es2017.object", "lib.es2017.object.d.ts"], ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], ["es2017.string", "lib.es2017.string.d.ts"], @@ -37289,14 +37593,18 @@ ${lanes.join("\n")} ["es2022.string", "lib.es2022.string.d.ts"], ["es2022.regexp", "lib.es2022.regexp.d.ts"], ["es2023.array", "lib.es2023.array.d.ts"], + ["es2023.collection", "lib.es2023.collection.d.ts"], ["esnext.array", "lib.es2023.array.d.ts"], + ["esnext.collection", "lib.es2023.collection.d.ts"], ["esnext.symbol", "lib.es2019.symbol.d.ts"], ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], ["esnext.intl", "lib.esnext.intl.d.ts"], + ["esnext.disposable", "lib.esnext.disposable.d.ts"], ["esnext.bigint", "lib.es2020.bigint.d.ts"], ["esnext.string", "lib.es2022.string.d.ts"], ["esnext.promise", "lib.es2021.promise.d.ts"], ["esnext.weakref", "lib.es2021.weakref.d.ts"], + ["esnext.decorators", "lib.esnext.decorators.d.ts"], ["decorators", "lib.decorators.d.ts"], ["decorators.legacy", "lib.decorators.legacy.d.ts"] ]; @@ -37704,6 +38012,7 @@ ${lanes.join("\n")} { name: "checkJs", type: "boolean", + affectsModuleResolution: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, @@ -37930,7 +38239,7 @@ ${lanes.join("\n")} strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any, - defaultValueDescription: false + defaultValueDescription: Diagnostics.false_unless_strict_is_set }, { name: "alwaysStrict", @@ -38784,6 +39093,18 @@ ${lanes.join("\n")} result.push("JSON"); return result.join(", "); } + function extensionsToExtensionsArray(extensions) { + const result = []; + if (extensions & 1 /* TypeScript */) + result.push(...supportedTSImplementationExtensions); + if (extensions & 2 /* JavaScript */) + result.push(...supportedJSExtensionsFlat); + if (extensions & 4 /* Declaration */) + result.push(...supportedDeclarationExtensions); + if (extensions & 8 /* Json */) + result.push(".json" /* Json */); + return result; + } function resolvedTypeScriptOnly(resolved) { if (!resolved) { return void 0; @@ -38956,8 +39277,8 @@ ${lanes.join("\n")} return typeRoots; } function arePathsEqual(path1, path2, host) { - const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; - return comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0 /* EqualTo */; + const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; + return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */; } function getOriginalAndResolvedFileName(fileName, host, traceEnabled) { const resolvedFileName = realPath(fileName, host, traceEnabled); @@ -39260,7 +39581,7 @@ ${lanes.join("\n")} return str + "}"; } function getKeyForCompilerOptions(options, affectingOptionDeclarations) { - return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + (options.pathsBasePath ? `|${options.pathsBasePath}` : void 0); + return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + `|${options.pathsBasePath}`; } function createCacheWithRedirects(ownOptions) { const redirectsMap = /* @__PURE__ */ new Map(); @@ -40220,7 +40541,7 @@ ${lanes.join("\n")} arrayIsEqualTo ); for (const conditions of conditionSets) { - const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions }; + const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions, host }; const exportResolutions = loadEntrypointsFromExportMap( packageJsonInfo, packageJsonInfo.contents.packageJsonContent.exports, @@ -40252,23 +40573,42 @@ ${lanes.join("\n")} return entrypoints; function loadEntrypointsFromTargetExports(target) { var _a, _b; - if (typeof target === "string" && startsWith(target, "./") && target.indexOf("*") === -1) { - const partsAfterFirst = getPathComponents(target).slice(2); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { - return false; - } - const resolvedTarget = combinePaths(scope.packageDirectory, target); - const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); - const result = loadFileNameFromPackageJsonField( - extensions, - finalPath, - /*onlyRecordFailures*/ - false, - state - ); - if (result) { - entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path); - return true; + if (typeof target === "string" && startsWith(target, "./")) { + if (target.indexOf("*") >= 0 && state.host.readDirectory) { + if (target.indexOf("*") !== target.lastIndexOf("*")) { + return false; + } + state.host.readDirectory( + scope.packageDirectory, + extensionsToExtensionsArray(extensions), + /*excludes*/ + void 0, + [changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))] + ).forEach((entry) => { + entrypoints = appendIfUnique(entrypoints, { + path: entry, + ext: getAnyExtensionFromPath(entry), + resolvedUsingTsExtension: void 0 + }); + }); + } else { + const partsAfterFirst = getPathComponents(target).slice(2); + if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { + return false; + } + const resolvedTarget = combinePaths(scope.packageDirectory, target); + const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); + const result = loadFileNameFromPackageJsonField( + extensions, + finalPath, + /*onlyRecordFailures*/ + false, + state + ); + if (result) { + entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path); + return true; + } } } else if (Array.isArray(target)) { for (const t of target) { @@ -40477,6 +40817,9 @@ ${lanes.join("\n")} } const trailingParts = parts.slice(nameParts.length); const subpath = !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`; + if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) { + return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference); + } const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference); @@ -40824,13 +41167,10 @@ ${lanes.join("\n")} function combineDirectoryPath(root, dir) { return ensureTrailingDirectorySeparator(combinePaths(root, dir)); } - function useCaseSensitiveFileNames() { - return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); - } function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { var _a, _b, _c, _d; - if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames()) : true)) { - const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames }); + if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { + const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses = []; if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName)); @@ -40859,7 +41199,7 @@ ${lanes.join("\n")} for (const commonSourceDirGuess of commonSourceDirGuesses) { const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess); for (const candidateDir of candidateDirectories) { - if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) { + if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) { const pathFragment = finalPath.slice(candidateDir.length + 1); const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment); const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */]; @@ -40869,7 +41209,7 @@ ${lanes.join("\n")} for (const possibleExt of inputExts) { if (!extensionIsOk(extensions, possibleExt)) continue; - const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames()); + const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state)); if (state.host.fileExists(possibleInputWithInputExtension)) { return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField( extensions, @@ -40943,11 +41283,13 @@ ${lanes.join("\n")} const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); if (priorityExtensions) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, formatExtensions(priorityExtensions)); const result = lookup(priorityExtensions); if (result) return result; } if (secondaryExtensions && !typesScopeOnly) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0, formatExtensions(secondaryExtensions)); return lookup(secondaryExtensions); } function lookup(extensions2) { @@ -41283,6 +41625,9 @@ ${lanes.join("\n")} trace(state.host, diagnostic, ...args); } } + function useCaseSensitiveFileNames(state) { + return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); + } var typeScriptVersion, nodeModulesAtTypes, NodeResolutionFeatures, nodeModulesPathPart, mangledScopedPackageSeparator; var init_moduleNameResolver = __esm({ "src/compiler/moduleNameResolver.ts"() { @@ -41331,23 +41676,23 @@ ${lanes.join("\n")} } function getModuleInstanceStateWorker(node, visited) { switch (node.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return 0 /* NonInstantiated */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (isEnumConst(node)) { return 2 /* ConstEnumOnly */; } break; - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (!hasSyntacticModifier(node, 1 /* Export */)) { return 0 /* NonInstantiated */; } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 278 /* NamedExports */) { + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 279 /* NamedExports */) { let state = 0 /* NonInstantiated */; for (const specifier of exportDeclaration.exportClause.elements) { const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); @@ -41361,7 +41706,7 @@ ${lanes.join("\n")} return state; } break; - case 267 /* ModuleBlock */: { + case 268 /* ModuleBlock */: { let state = 0 /* NonInstantiated */; forEachChild(node, (n) => { const childState = getModuleInstanceStateCached(n, visited); @@ -41380,10 +41725,10 @@ ${lanes.join("\n")} }); return state; } - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return getModuleInstanceState(node, visited); case 80 /* Identifier */: - if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { return 0 /* NonInstantiated */; } } @@ -41413,6 +41758,9 @@ ${lanes.join("\n")} if (found === 1 /* Instantiated */) { return found; } + if (statement.kind === 271 /* ImportEqualsDeclaration */) { + found = 1 /* Instantiated */; + } } } if (found !== void 0) { @@ -41546,7 +41894,7 @@ ${lanes.join("\n")} } } function getDeclarationName(node) { - if (node.kind === 276 /* ExportAssignment */) { + if (node.kind === 277 /* ExportAssignment */) { return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; } const name = getNameOfDeclaration(node); @@ -41555,7 +41903,7 @@ ${lanes.join("\n")} const moduleName = getTextOfIdentifierOrLiteral(name); return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; } - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { const nameExpression = name.expression; if (isStringOrNumericLiteralLike(nameExpression)) { return escapeLeadingUnderscores(nameExpression.text); @@ -41580,31 +41928,31 @@ ${lanes.join("\n")} return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; } switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return "__constructor" /* Constructor */; - case 183 /* FunctionType */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: + case 184 /* FunctionType */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: return "__call" /* Call */; - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: return "__new" /* New */; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return "__index" /* Index */; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return "__export" /* ExportStar */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return "export=" /* ExportEquals */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { return "export=" /* ExportEquals */; } Debug.fail("Unknown binary declaration kind"); break; - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 168 /* Parameter */: - Debug.assert(node.parent.kind === 323 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); + case 169 /* Parameter */: + Debug.assert(node.parent.kind === 324 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); const functionType = node.parent; const index = functionType.parameters.indexOf(node); return "arg" + index; @@ -41651,7 +41999,7 @@ ${lanes.join("\n")} messageNeedsName = false; multipleDefaultExports = true; } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 276 /* ExportAssignment */ && !node.isExportEquals)) { + if (symbol.declarations && symbol.declarations.length && (node.kind === 277 /* ExportAssignment */ && !node.isExportEquals)) { message = Diagnostics.A_module_cannot_have_multiple_default_exports; messageNeedsName = false; multipleDefaultExports = true; @@ -41690,7 +42038,7 @@ ${lanes.join("\n")} function declareModuleMember(node, symbolFlags, symbolExcludes) { const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 280 /* ExportSpecifier */ || node.kind === 270 /* ImportEqualsDeclaration */ && hasExportModifier) { + if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { Debug.assertNode(container, canHaveLocals); @@ -41706,7 +42054,7 @@ ${lanes.join("\n")} } else { if (isJSDocTypeAlias(node)) Debug.assert(isInJSFile(node)); - if (!isAmbientModule(node) && (hasExportModifier || container.flags & 64 /* ExportContext */)) { + if (!isAmbientModule(node) && (hasExportModifier || container.flags & 128 /* ExportContext */)) { if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } @@ -41757,7 +42105,7 @@ ${lanes.join("\n")} const saveThisParentContainer = thisParentContainer; const savedBlockScopeContainer = blockScopeContainer; if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 218 /* ArrowFunction */) { + if (node.kind !== 219 /* ArrowFunction */) { thisParentContainer = container; } container = blockScopeContainer = node; @@ -41779,35 +42127,35 @@ ${lanes.join("\n")} const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 174 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { currentFlow.node = node; } } - currentReturnTarget = isImmediatelyInvoked || node.kind === 175 /* Constructor */ || isInJSFile(node) && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */) ? createBranchLabel() : void 0; + currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; currentExceptionTarget = void 0; currentBreakTarget = void 0; currentContinueTarget = void 0; activeLabelList = void 0; hasExplicitReturn = false; bindChildren(node); - node.flags &= ~2816 /* ReachabilityAndEmitFlags */; + node.flags &= ~5632 /* ReachabilityAndEmitFlags */; if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && nodeIsPresent(node.body)) { - node.flags |= 256 /* HasImplicitReturn */; + node.flags |= 512 /* HasImplicitReturn */; if (hasExplicitReturn) - node.flags |= 512 /* HasExplicitReturn */; + node.flags |= 1024 /* HasExplicitReturn */; node.endFlowNode = currentFlow; } - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { node.flags |= emitFlags; node.endFlowNode = currentFlow; } if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 175 /* Constructor */ || node.kind === 174 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */)) { + if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { node.returnFlowNode = currentFlow; } } @@ -41824,7 +42172,7 @@ ${lanes.join("\n")} seenThisKeyword = false; bindChildren(node); Debug.assertNotNode(node, isIdentifier); - node.flags = seenThisKeyword ? node.flags | 128 /* ContainsThis */ : node.flags & ~128 /* ContainsThis */; + node.flags = seenThisKeyword ? node.flags | 256 /* ContainsThis */ : node.flags & ~256 /* ContainsThis */; } else { bindChildren(node); } @@ -41833,8 +42181,8 @@ ${lanes.join("\n")} blockScopeContainer = savedBlockScopeContainer; } function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 261 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 261 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind === 262 /* FunctionDeclaration */ ? bind(n) : void 0); + bindEach(nodes, (n) => n.kind !== 262 /* FunctionDeclaration */ ? bind(n) : void 0); } function bindEach(nodes, bindFunction = bind) { if (nodes === void 0) { @@ -41854,59 +42202,59 @@ ${lanes.join("\n")} inAssignmentPattern = saveInAssignmentPattern; return; } - if (node.kind >= 242 /* FirstStatement */ && node.kind <= 258 /* LastStatement */ && !options.allowUnreachableCode) { + if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && !options.allowUnreachableCode) { node.flowNode = currentFlow; } switch (node.kind) { - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: bindWhileStatement(node); break; - case 245 /* DoStatement */: + case 246 /* DoStatement */: bindDoStatement(node); break; - case 247 /* ForStatement */: + case 248 /* ForStatement */: bindForStatement(node); break; - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 244 /* IfStatement */: + case 245 /* IfStatement */: bindIfStatement(node); break; - case 252 /* ReturnStatement */: - case 256 /* ThrowStatement */: + case 253 /* ReturnStatement */: + case 257 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: bindTryStatement(node); break; - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: bindSwitchStatement(node); break; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: bindCaseBlock(node); break; - case 295 /* CaseClause */: + case 296 /* CaseClause */: bindCaseClause(node); break; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: bindExpressionStatement(node); break; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: bindLabeledStatement(node); break; - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: bindPrefixUnaryExpressionFlow(node); break; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: bindPostfixUnaryExpressionFlow(node); break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { inAssignmentPattern = saveInAssignmentPattern; bindDestructuringAssignmentFlow(node); @@ -41914,49 +42262,49 @@ ${lanes.join("\n")} } bindBinaryExpressionFlow(node); break; - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: bindDeleteExpressionFlow(node); break; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: bindConditionalExpressionFlow(node); break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: bindVariableDeclarationFlow(node); break; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: bindAccessExpressionFlow(node); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: bindCallExpressionFlow(node); break; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: bindNonNullExpressionFlow(node); break; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: bindJSDocTypeAlias(node); break; - case 311 /* SourceFile */: { + case 312 /* SourceFile */: { bindEachFunctionsFirst(node.statements); bind(node.endOfFileToken); break; } - case 240 /* Block */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 268 /* ModuleBlock */: bindEachFunctionsFirst(node.statements); break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: bindBindingElementFlow(node); break; - case 168 /* Parameter */: + case 169 /* Parameter */: bindParameterFlow(node); break; - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: - case 302 /* PropertyAssignment */: - case 229 /* SpreadElement */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: + case 303 /* PropertyAssignment */: + case 230 /* SpreadElement */: inAssignmentPattern = saveInAssignmentPattern; default: bindEachChild(node); @@ -41970,19 +42318,19 @@ ${lanes.join("\n")} case 80 /* Identifier */: case 81 /* PrivateIdentifier */: case 110 /* ThisKeyword */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return containsNarrowableReference(expr); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return hasNarrowableArgument(expr); - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return isNarrowingExpression(expr.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isNarrowingBinaryExpression(expr); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return expr.operator === 54 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return isNarrowingExpression(expr.expression); } return false; @@ -42001,7 +42349,7 @@ ${lanes.join("\n")} } } } - if (expr.expression.kind === 210 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { + if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { return true; } return false; @@ -42032,9 +42380,9 @@ ${lanes.join("\n")} } function isNarrowableOperand(expr) { switch (expr.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isNarrowableOperand(expr.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (expr.operatorToken.kind) { case 64 /* EqualsToken */: return isNarrowableOperand(expr.left); @@ -42107,21 +42455,21 @@ ${lanes.join("\n")} function isStatementCondition(node) { const parent3 = node.parent; switch (parent3.kind) { - case 244 /* IfStatement */: - case 246 /* WhileStatement */: - case 245 /* DoStatement */: + case 245 /* IfStatement */: + case 247 /* WhileStatement */: + case 246 /* DoStatement */: return parent3.expression === node; - case 247 /* ForStatement */: - case 226 /* ConditionalExpression */: + case 248 /* ForStatement */: + case 227 /* ConditionalExpression */: return parent3.condition === node; } return false; } function isLogicalExpression(node) { while (true) { - if (node.kind === 216 /* ParenthesizedExpression */) { + if (node.kind === 217 /* ParenthesizedExpression */) { node = node.expression; - } else if (node.kind === 223 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { + } else if (node.kind === 224 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { node = node.operand; } else { return isLogicalOrCoalescingBinaryExpression(node); @@ -42164,7 +42512,7 @@ ${lanes.join("\n")} } function setContinueTarget(node, target) { let label = activeLabelList; - while (label && node.parent.kind === 255 /* LabeledStatement */) { + while (label && node.parent.kind === 256 /* LabeledStatement */) { label.continueTarget = target; label = label.next; node = node.parent; @@ -42215,12 +42563,12 @@ ${lanes.join("\n")} bind(node.expression); addAntecedent(preLoopLabel, currentFlow); currentFlow = preLoopLabel; - if (node.kind === 249 /* ForOfStatement */) { + if (node.kind === 250 /* ForOfStatement */) { bind(node.awaitModifier); } addAntecedent(postLoopLabel, currentFlow); bind(node.initializer); - if (node.initializer.kind !== 260 /* VariableDeclarationList */) { + if (node.initializer.kind !== 261 /* VariableDeclarationList */) { bindAssignmentTargetFlow(node.initializer); } bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); @@ -42242,7 +42590,7 @@ ${lanes.join("\n")} } function bindReturnOrThrow(node) { bind(node.expression); - if (node.kind === 252 /* ReturnStatement */) { + if (node.kind === 253 /* ReturnStatement */) { hasExplicitReturn = true; if (currentReturnTarget) { addAntecedent(currentReturnTarget, currentFlow); @@ -42259,7 +42607,7 @@ ${lanes.join("\n")} return void 0; } function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 251 /* BreakStatement */ ? breakTarget : continueTarget; + const flowLabel = node.kind === 252 /* BreakStatement */ ? breakTarget : continueTarget; if (flowLabel) { addAntecedent(flowLabel, currentFlow); currentFlow = unreachableFlow; @@ -42329,7 +42677,7 @@ ${lanes.join("\n")} preSwitchCaseFlow = currentFlow; bind(node.caseBlock); addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 296 /* DefaultClause */); + const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 297 /* DefaultClause */); node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; if (!hasDefault) { addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); @@ -42372,7 +42720,7 @@ ${lanes.join("\n")} maybeBindExpressionFlowIfCall(node.expression); } function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { const call = node; if (call.expression.kind !== 108 /* SuperKeyword */ && isDottedName(call.expression)) { currentFlow = createFlowCall(currentFlow, call); @@ -42398,7 +42746,7 @@ ${lanes.join("\n")} currentFlow = finishFlowLabel(postStatementLabel); } function bindDestructuringTargetFlow(node) { - if (node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { + if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { bindAssignmentTargetFlow(node.left); } else { bindAssignmentTargetFlow(node); @@ -42407,21 +42755,21 @@ ${lanes.join("\n")} function bindAssignmentTargetFlow(node) { if (isNarrowableReference(node)) { currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 208 /* ArrayLiteralExpression */) { + } else if (node.kind === 209 /* ArrayLiteralExpression */) { for (const e of node.elements) { - if (e.kind === 229 /* SpreadElement */) { + if (e.kind === 230 /* SpreadElement */) { bindAssignmentTargetFlow(e.expression); } else { bindDestructuringTargetFlow(e); } } - } else if (node.kind === 209 /* ObjectLiteralExpression */) { + } else if (node.kind === 210 /* ObjectLiteralExpression */) { for (const p of node.properties) { - if (p.kind === 302 /* PropertyAssignment */) { + if (p.kind === 303 /* PropertyAssignment */) { bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 303 /* ShorthandPropertyAssignment */) { + } else if (p.kind === 304 /* ShorthandPropertyAssignment */) { bindAssignmentTargetFlow(p.name); - } else if (p.kind === 304 /* SpreadAssignment */) { + } else if (p.kind === 305 /* SpreadAssignment */) { bindAssignmentTargetFlow(p.expression); } } @@ -42552,7 +42900,7 @@ ${lanes.join("\n")} const operator = node.operatorToken.kind; if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { bindAssignmentTargetFlow(node.left); - if (operator === 64 /* EqualsToken */ && node.left.kind === 211 /* ElementAccessExpression */) { + if (operator === 64 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { const elementAccess = node.left; if (isNarrowableOperand(elementAccess.expression)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -42580,7 +42928,7 @@ ${lanes.join("\n")} } function bindDeleteExpressionFlow(node) { bindEachChild(node); - if (node.expression.kind === 210 /* PropertyAccessExpression */) { + if (node.expression.kind === 211 /* PropertyAccessExpression */) { bindAssignmentTargetFlow(node.expression); } } @@ -42645,7 +42993,7 @@ ${lanes.join("\n")} } function bindJSDocTypeAlias(node) { bind(node.tagName); - if (node.kind !== 346 /* JSDocEnumTag */ && node.fullName) { + if (node.kind !== 347 /* JSDocEnumTag */ && node.fullName) { setParent(node.fullName, node); setParentRecursive( node.fullName, @@ -42660,7 +43008,7 @@ ${lanes.join("\n")} function bindJSDocClassTag(node) { bindEachChild(node); const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 173 /* MethodDeclaration */) { + if (host && host.kind !== 174 /* MethodDeclaration */) { addDeclarationToSymbol(host.symbol, host, 32 /* Class */); } } @@ -42673,15 +43021,15 @@ ${lanes.join("\n")} } function bindOptionalChainRest(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: bind(node.questionDotToken); bind(node.name); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: bind(node.questionDotToken); bind(node.argumentExpression); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: bind(node.questionDotToken); bindEach(node.typeArguments); bindEach(node.arguments); @@ -42728,7 +43076,7 @@ ${lanes.join("\n")} bindOptionalChainFlow(node); } else { const expr = skipParentheses(node.expression); - if (expr.kind === 217 /* FunctionExpression */ || expr.kind === 218 /* ArrowFunction */) { + if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { bindEach(node.typeArguments); bindEach(node.arguments); bind(node.expression); @@ -42739,7 +43087,7 @@ ${lanes.join("\n")} } } } - if (node.expression.kind === 210 /* PropertyAccessExpression */) { + if (node.expression.kind === 211 /* PropertyAccessExpression */) { const propertyAccess = node.expression; if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); @@ -42754,39 +43102,39 @@ ${lanes.join("\n")} } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { switch (container.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 311 /* SourceFile */: + case 312 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 209 /* ObjectLiteralExpression */: - case 263 /* InterfaceDeclaration */: - case 291 /* JsxAttributes */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 210 /* ObjectLiteralExpression */: + case 264 /* InterfaceDeclaration */: + case 292 /* JsxAttributes */: return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 329 /* JSDocSignature */: - case 180 /* IndexSignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 323 /* JSDocFunctionType */: - case 174 /* ClassStaticBlockDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 199 /* MappedType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 330 /* JSDocSignature */: + case 181 /* IndexSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 324 /* JSDocFunctionType */: + case 175 /* ClassStaticBlockDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 200 /* MappedType */: if (container.locals) Debug.assertNode(container, canHaveLocals); return declareSymbol( @@ -42817,10 +43165,10 @@ ${lanes.join("\n")} return !!body && body.statements.some((s) => isExportDeclaration(s) || isExportAssignment(s)); } function setExportContextFlag(node) { - if (node.flags & 16777216 /* Ambient */ && !hasExportDeclarations(node)) { - node.flags |= 64 /* ExportContext */; + if (node.flags & 33554432 /* Ambient */ && !hasExportDeclarations(node)) { + node.flags |= 128 /* ExportContext */; } else { - node.flags &= ~64 /* ExportContext */; + node.flags &= ~128 /* ExportContext */; } } function bindModuleDeclaration(node) { @@ -42888,10 +43236,10 @@ ${lanes.join("\n")} } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (isExternalOrCommonJsModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -42923,7 +43271,7 @@ ${lanes.join("\n")} const saveCurrentFlow = currentFlow; for (const typeAlias of delayedTypeAliases) { const host = typeAlias.parent.parent; - container = findAncestor(host.parent, (n) => !!(getContainerFlags(n) & 1 /* IsContainer */)) || file; + container = getEnclosingContainer(host) || file; blockScopeContainer = getEnclosingBlockScopeContainer(host) || file; currentFlow = initFlowNode({ flags: 2 /* Start */ }); parent2 = typeAlias; @@ -42981,7 +43329,7 @@ ${lanes.join("\n")} currentFlow = saveCurrentFlow; } function checkContextualIdentifier(node) { - if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) { + if (!file.parseDiagnostics.length && !(node.flags & 33554432 /* Ambient */) && !(node.flags & 16777216 /* JSDoc */) && !isIdentifierName(node)) { const originalKeywordKind = identifierToKeywordKind(node); if (originalKeywordKind === void 0) { return; @@ -42999,14 +43347,14 @@ ${lanes.join("\n")} Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, declarationNameToString(node) )); - } else if (node.flags & 32768 /* AwaitContext */) { + } else if (node.flags & 65536 /* AwaitContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node) )); } - } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) { + } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 16384 /* YieldContext */) { file.bindDiagnostics.push(createDiagnosticForNode2( node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, @@ -43094,7 +43442,7 @@ ${lanes.join("\n")} } function checkStrictModeFunctionDeclaration(node) { if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 311 /* SourceFile */ && blockScopeContainer.kind !== 266 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { + if (blockScopeContainer.kind !== 312 /* SourceFile */ && blockScopeContainer.kind !== 267 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); file.bindDiagnostics.push(createFileDiagnostic( file, @@ -43156,7 +43504,7 @@ ${lanes.join("\n")} node.tracingPath = file.path; const saveInStrictMode = inStrictMode; bindWorker(node); - if (node.kind > 164 /* LastToken */) { + if (node.kind > 165 /* LastToken */) { const saveParent = parent2; parent2 = node; const containerFlags = getContainerFlags(node); @@ -43213,7 +43561,7 @@ ${lanes.join("\n")} function bindWorker(node) { switch (node.kind) { case 80 /* Identifier */: - if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { let parentNode = node.parent; while (parentNode && !isJSDocTypeAlias(parentNode)) { parentNode = parentNode.parent; @@ -43222,23 +43570,23 @@ ${lanes.join("\n")} break; } case 110 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 303 /* ShorthandPropertyAssignment */)) { + if (currentFlow && (isExpression(node) || parent2.kind === 304 /* ShorthandPropertyAssignment */)) { node.flowNode = currentFlow; } return checkContextualIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: if (currentFlow && isPartOfTypeQuery(node)) { node.flowNode = currentFlow; } break; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: case 108 /* SuperKeyword */: node.flowNode = currentFlow; break; case 81 /* PrivateIdentifier */: return checkPrivateIdentifier(node); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = node; if (currentFlow && isNarrowableReference(expr)) { expr.flowNode = currentFlow; @@ -43257,7 +43605,7 @@ ${lanes.join("\n")} ); } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const specialKind = getAssignmentDeclarationKind(node); switch (specialKind) { case 1 /* ExportsProperty */: @@ -43292,81 +43640,81 @@ ${lanes.join("\n")} Debug.fail("Unknown binary expression special property assignment kind"); } return checkStrictModeBinaryExpression(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return checkStrictModeCatchClause(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return checkStrictModeWithStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return checkStrictModeLabeledStatement(node); - case 196 /* ThisType */: + case 197 /* ThisType */: seenThisKeyword = true; return; - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return bindTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return bindParameter(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return bindVariableDeclarationOrBindingElement(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: node.flowNode = currentFlow; return bindVariableDeclarationOrBindingElement(node); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return bindPropertyWorker(node); - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 305 /* EnumMember */: + case 306 /* EnumMember */: return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return bindPropertyOrMethodOrAccessor( node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return declareSymbolAndAddToSymbolTable( node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */ ); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 183 /* FunctionType */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 185 /* ConstructorType */: return bindFunctionOrConstructorType(node); - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 199 /* MappedType */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 200 /* MappedType */: return bindAnonymousTypeWorker(node); - case 338 /* JSDocClassTag */: + case 339 /* JSDocClassTag */: return bindJSDocClassTag(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return bindFunctionExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: const assignmentKind = getAssignmentDeclarationKind(node); switch (assignmentKind) { case 7 /* ObjectDefinePropertyValue */: @@ -43384,60 +43732,60 @@ ${lanes.join("\n")} bindCallExpression(node); } break; - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: inStrictMode = true; return bindClassLikeDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return bindModuleDeclaration(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return bindJsxAttributes(node); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 270 /* ImportEqualsDeclaration */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 271 /* ImportEqualsDeclaration */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return bindNamespaceExportDeclaration(node); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return bindImportClause(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return bindExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return bindExportAssignment(node); - case 311 /* SourceFile */: + case 312 /* SourceFile */: updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); - case 240 /* Block */: + case 241 /* Block */: if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { return; } - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return updateStrictModeStatementList(node.statements); - case 347 /* JSDocParameterTag */: - if (node.parent.kind === 329 /* JSDocSignature */) { + case 348 /* JSDocParameterTag */: + if (node.parent.kind === 330 /* JSDocSignature */) { return bindParameter(node); } - if (node.parent.kind !== 328 /* JSDocTypeLiteral */) { + if (node.parent.kind !== 329 /* JSDocTypeLiteral */) { break; } - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 322 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 323 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return bind(node.typeExpression); } } @@ -43589,8 +43937,8 @@ ${lanes.join("\n")} false ); switch (thisContainer.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: let constructorSymbol = thisContainer.symbol; if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 64 /* EqualsToken */) { const l = thisContainer.parent.left; @@ -43608,12 +43956,12 @@ ${lanes.join("\n")} addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); } break; - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: const containingClass = thisContainer.parent; const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; if (hasDynamicName(node)) { @@ -43630,7 +43978,7 @@ ${lanes.join("\n")} ); } break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (hasDynamicName(node)) { break; } else if (thisContainer.commonJsModuleIndicator) { @@ -43639,7 +43987,7 @@ ${lanes.join("\n")} declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */); } break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: break; default: Debug.failBadSyntaxKind(thisContainer); @@ -43667,7 +44015,7 @@ ${lanes.join("\n")} function bindSpecialPropertyDeclaration(node) { if (node.expression.kind === 110 /* ThisKeyword */) { bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 311 /* SourceFile */) { + } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 312 /* SourceFile */) { if (isPrototypeAccess(node.expression)) { bindPrototypePropertyAssignment(node, node.parent); } else { @@ -43716,7 +44064,7 @@ ${lanes.join("\n")} } function bindObjectDefinePropertyAssignment(node) { let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 311 /* SourceFile */; + const isToplevel = node.parent.parent.kind === 312 /* SourceFile */; namespaceSymbol = bindPotentiallyMissingNamespaces( namespaceSymbol, node.arguments[0], @@ -43830,7 +44178,7 @@ ${lanes.join("\n")} declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 311 /* SourceFile */ : propertyAccess.parent.parent.kind === 311 /* SourceFile */; + return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 312 /* SourceFile */ : propertyAccess.parent.parent.kind === 312 /* SourceFile */; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); @@ -43892,7 +44240,7 @@ ${lanes.join("\n")} } } function bindClassLikeDeclaration(node) { - if (node.kind === 262 /* ClassDeclaration */) { + if (node.kind === 263 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); } else { const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; @@ -43921,7 +44269,7 @@ ${lanes.join("\n")} checkStrictModeEvalOrArguments(node, node.name); } if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 259 /* VariableDeclaration */ ? node : node.parent.parent; + const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent; if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { @@ -43934,10 +44282,10 @@ ${lanes.join("\n")} } } function bindParameter(node) { - if (node.kind === 347 /* JSDocParameterTag */ && container.kind !== 329 /* JSDocSignature */) { + if (node.kind === 348 /* JSDocParameterTag */ && container.kind !== 330 /* JSDocSignature */) { return; } - if (inStrictMode && !(node.flags & 16777216 /* Ambient */)) { + if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) { checkStrictModeEvalOrArguments(node, node.name); } if (isBindingPattern(node.name)) { @@ -43951,9 +44299,9 @@ ${lanes.join("\n")} } } function bindFunctionDeclaration(node) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */)) { + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) { if (isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + emitFlags |= 4096 /* HasAsyncFunctions */; } } checkStrictModeFunctionName(node); @@ -43965,9 +44313,9 @@ ${lanes.join("\n")} } } function bindFunctionExpression(node) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */)) { + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) { if (isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + emitFlags |= 4096 /* HasAsyncFunctions */; } } if (currentFlow) { @@ -43978,8 +44326,8 @@ ${lanes.join("\n")} return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); } function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { - if (!file.isDeclarationFile && !(node.flags & 16777216 /* Ambient */) && isAsyncFunction(node)) { - emitFlags |= 2048 /* HasAsyncFunctions */; + if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */) && isAsyncFunction(node)) { + emitFlags |= 4096 /* HasAsyncFunctions */; } if (currentFlow && isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { node.flowNode = currentFlow; @@ -44007,7 +44355,7 @@ ${lanes.join("\n")} } else { declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); } - } else if (node.parent.kind === 194 /* InferType */) { + } else if (node.parent.kind === 195 /* InferType */) { const container2 = getInferTypeContainer(node.parent); if (container2) { Debug.assertNode(container2, canHaveLocals); @@ -44038,14 +44386,14 @@ ${lanes.join("\n")} if (currentFlow === unreachableFlow) { const reportError = ( // report error on all statements except empty ones - isStatementButNotDeclaration(node) && node.kind !== 241 /* EmptyStatement */ || // report error on class declarations - node.kind === 262 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - node.kind === 266 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) + isStatementButNotDeclaration(node) && node.kind !== 242 /* EmptyStatement */ || // report error on class declarations + node.kind === 263 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + node.kind === 267 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) ); if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { - const isError = unreachableCodeIsError(options) && !(node.flags & 16777216 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 3 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer)); + const isError = unreachableCodeIsError(options) && !(node.flags & 33554432 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 7 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer)); eachUnreachableRange(node, (start, end) => errorOrSuggestionOnRange(isError, start, end, Diagnostics.Unreachable_code_detected)); } } @@ -44064,16 +44412,16 @@ ${lanes.join("\n")} } function isExecutableStatement(s) { return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && !isEnumDeclaration(s) && // `var x;` may declare a variable used above - !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & (1 /* Let */ | 2 /* Const */)) && s.declarationList.declarations.some((d) => !d.initializer)); + !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & 7 /* BlockScoped */) && s.declarationList.declarations.some((d) => !d.initializer)); } function isPurelyTypeDeclaration(s) { switch (s.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return hasSyntacticModifier(s, 2048 /* Const */); default: return false; @@ -44108,54 +44456,54 @@ ${lanes.join("\n")} } function getContainerFlags(node) { switch (node.kind) { - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 291 /* JsxAttributes */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 292 /* JsxAttributes */: return 1 /* IsContainer */; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return 1 /* IsContainer */ | 64 /* IsInterface */; - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 199 /* MappedType */: - case 180 /* IndexSignature */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 200 /* MappedType */: + case 181 /* IndexSignature */: return 1 /* IsContainer */ | 32 /* HasLocals */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; } - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: - case 323 /* JSDocFunctionType */: - case 183 /* FunctionType */: - case 179 /* ConstructSignature */: - case 184 /* ConstructorType */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: + case 324 /* JSDocFunctionType */: + case 184 /* FunctionType */: + case 180 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 175 /* ClassStaticBlockDeclaration */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return 4 /* IsControlFlowContainer */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 298 /* CatchClause */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 268 /* CaseBlock */: + case 299 /* CatchClause */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 269 /* CaseBlock */: return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - case 240 /* Block */: + case 241 /* Block */: return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; } return 0 /* None */; @@ -44173,7 +44521,7 @@ ${lanes.join("\n")} return (_d = (_c = container.symbol) == null ? void 0 : _c.exports) == null ? void 0 : _d.get(name); } } - var ModuleInstanceState, binder; + var ModuleInstanceState, ContainerFlags, binder; var init_binder = __esm({ "src/compiler/binder.ts"() { "use strict"; @@ -44185,6 +44533,18 @@ ${lanes.join("\n")} ModuleInstanceState2[ModuleInstanceState2["ConstEnumOnly"] = 2] = "ConstEnumOnly"; return ModuleInstanceState2; })(ModuleInstanceState || {}); + ContainerFlags = /* @__PURE__ */ ((ContainerFlags2) => { + ContainerFlags2[ContainerFlags2["None"] = 0] = "None"; + ContainerFlags2[ContainerFlags2["IsContainer"] = 1] = "IsContainer"; + ContainerFlags2[ContainerFlags2["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; + ContainerFlags2[ContainerFlags2["IsControlFlowContainer"] = 4] = "IsControlFlowContainer"; + ContainerFlags2[ContainerFlags2["IsFunctionLike"] = 8] = "IsFunctionLike"; + ContainerFlags2[ContainerFlags2["IsFunctionExpression"] = 16] = "IsFunctionExpression"; + ContainerFlags2[ContainerFlags2["HasLocals"] = 32] = "HasLocals"; + ContainerFlags2[ContainerFlags2["IsInterface"] = 64] = "IsInterface"; + ContainerFlags2[ContainerFlags2["IsObjectLiteralOrClassExpressionMethodOrAccessor"] = 128] = "IsObjectLiteralOrClassExpressionMethodOrAccessor"; + return ContainerFlags2; + })(ContainerFlags || {}); binder = /* @__PURE__ */ createBinder(); } }); @@ -44331,7 +44691,7 @@ ${lanes.join("\n")} symbol.exports.forEach(visitSymbol); } forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 185 /* TypeQuery */) { + if (d.type && d.type.kind === 186 /* TypeQuery */) { const query = d.type; const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); visitSymbol(entity); @@ -44746,7 +45106,7 @@ ${lanes.join("\n")} if (originalExportSymbol === d.symbol) return topNamespace.parent.parent; function getTopNamespace(namespaceDeclaration) { - while (namespaceDeclaration.flags & 4 /* NestedNamespace */) { + while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { namespaceDeclaration = namespaceDeclaration.parent; } return namespaceDeclaration; @@ -44776,7 +45136,9 @@ ${lanes.join("\n")} for (const { ending, value } of candidates) { if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) { const matchedStar = value.substring(prefix.length, value.length - suffix.length); - return pathIsRelative(matchedStar) ? void 0 : key.replace("*", matchedStar); + if (!pathIsRelative(matchedStar)) { + return key.replace("*", matchedStar); + } } } } else if (some(candidates, (c) => c.ending !== 0 /* Minimal */ && pattern === c.value) || some(candidates, (c) => c.ending === 0 /* Minimal */ && pattern === c.value && validateEnding(c))) { @@ -44848,7 +45210,7 @@ ${lanes.join("\n")} for (const key of getOwnKeys(exports)) { if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = exports[key]; - const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions); + const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode); if (result) { return result; } @@ -45163,6 +45525,7 @@ ${lanes.join("\n")} var moduleKind = getEmitModuleKind(compilerOptions); var legacyDecorators = !!compilerOptions.experimentalDecorators; var useDefineForClassFields = getUseDefineForClassFields(compilerOptions); + var emitStandardClassFields = getEmitStandardClassFields(compilerOptions); var allowSyntheticDefaultImports = getAllowSyntheticDefaultImports(compilerOptions); var strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks"); var strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes"); @@ -45190,6 +45553,10 @@ ${lanes.join("\n")} var isolatedModulesLikeFlagName = compilerOptions.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"; var canCollectSymbolAliasAccessabilityData = !compilerOptions.verbatimModuleSyntax || !!compilerOptions.importsNotUsedAsValues; var apparentArgumentCount; + var lastGetCombinedNodeFlagsNode; + var lastGetCombinedNodeFlagsResult = 0 /* None */; + var lastGetCombinedModifierFlagsNode; + var lastGetCombinedModifierFlagsResult = 0 /* None */; const checker = { getNodeCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.nodeCount, 0), getIdentifierCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.identifierCount, 0), @@ -45249,7 +45616,7 @@ ${lanes.join("\n")} return node ? getTypeFromTypeNode(node) : errorType; }, getParameterType: getTypeAtPosition, - getParameterIdentifierNameAtPosition, + getParameterIdentifierInfoAtPosition, getPromisedTypeOfPromise, getAwaitedType: (type) => getAwaitedType(type), getReturnTypeOfSignature, @@ -45367,13 +45734,24 @@ ${lanes.join("\n")} getTypeOfPropertyOfContextualType, getFullyQualifiedName, getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */), - getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray) => runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - 32 /* IsForStringLiteralArgumentCompletions */ - )), + getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) => { + if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) { + return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( + call, + candidatesOutArray, + /*argumentCount*/ + void 0, + checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ + )); + } + return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( + call, + candidatesOutArray, + /*argumentCount*/ + void 0, + checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ + )); + }, getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)), getExpandedParameters, hasEffectiveRestParameter, @@ -45547,7 +45925,7 @@ ${lanes.join("\n")} Debug.assert(!!(getNodeLinks(file).flags & 1 /* TypeChecked */)); diagnostics2 = addRange(diagnostics2, suggestionDiagnostics.getDiagnostics(file.fileName)); checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(file), (containingNode, kind, diag2) => { - if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 16777216 /* Ambient */))) { + if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) { (diagnostics2 || (diagnostics2 = [])).push({ ...diag2, category: 2 /* Suggestion */ }); } }); @@ -45573,14 +45951,19 @@ ${lanes.join("\n")} typeHasCallOrConstructSignatures }; function runWithoutResolvedSignatureCaching(node, fn) { - const containingCall = findAncestor(node, isCallLikeExpression); - const containingCallResolvedSignature = containingCall && getNodeLinks(containingCall).resolvedSignature; - if (containingCall) { - getNodeLinks(containingCall).resolvedSignature = void 0; + const cachedSignatures = []; + while (node) { + if (isCallLikeExpression(node)) { + const nodeLinks2 = getNodeLinks(node); + const resolvedSignature = nodeLinks2.resolvedSignature; + cachedSignatures.push([nodeLinks2, resolvedSignature]); + nodeLinks2.resolvedSignature = void 0; + } + node = node.parent; } const result = fn(); - if (containingCall) { - getNodeLinks(containingCall).resolvedSignature = containingCallResolvedSignature; + for (const [nodeLinks2, resolvedSignature] of cachedSignatures) { + nodeLinks2.resolvedSignature = resolvedSignature; } return result; } @@ -45886,7 +46269,7 @@ ${lanes.join("\n")} }; var amalgamatedDuplicates; var reverseMappedCache = /* @__PURE__ */ new Map(); - var inInferTypeForHomomorphicMappedType = false; + var homomorphicMappedTypeInferenceStack = []; var ambientModulesCache; var patternAmbientModules; var patternAmbientModuleAugmentations; @@ -45927,6 +46310,8 @@ ${lanes.join("\n")} var deferredGlobalImportMetaType; var deferredGlobalImportMetaExpressionType; var deferredGlobalImportCallOptionsType; + var deferredGlobalDisposableType; + var deferredGlobalAsyncDisposableType; var deferredGlobalExtractSymbol; var deferredGlobalOmitSymbol; var deferredGlobalAwaitedSymbol; @@ -46098,14 +46483,14 @@ ${lanes.join("\n")} } } function errorSkippedOn(key, location, message, ...args) { - const diagnostic = error(location, message, ...args); + const diagnostic = error2(location, message, ...args); diagnostic.skippedOn = key; return diagnostic; } function createError(location, message, ...args) { return location ? createDiagnosticForNode(location, message, ...args) : createCompilerDiagnostic(message, ...args); } - function error(location, message, ...args) { + function error2(location, message, ...args) { const diagnostic = createError(location, message, ...args); diagnostics.add(diagnostic); return diagnostic; @@ -46129,7 +46514,7 @@ ${lanes.join("\n")} addErrorOrSuggestion(isError, "message" in message ? createDiagnosticForNode(location, message, ...args) : createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(location), location, message)); } function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, ...args) { - const diagnostic = error(location, message, ...args); + const diagnostic = error2(location, message, ...args); if (maybeMissingAwait) { const related = createDiagnosticForNode(location, Diagnostics.Did_you_forget_to_use_await); addRelatedInfo(diagnostic, related); @@ -46155,7 +46540,7 @@ ${lanes.join("\n")} return !!symbol.valueDeclaration && isDeprecatedDeclaration2(symbol.valueDeclaration) || length(symbol.declarations) && every(symbol.declarations, isDeprecatedDeclaration2); } function isDeprecatedDeclaration2(declaration) { - return !!(getCombinedNodeFlags(declaration) & 268435456 /* Deprecated */); + return !!(getCombinedNodeFlagsCached(declaration) & 536870912 /* Deprecated */); } function addDeprecatedSuggestion(location, declarations, deprecatedEntity) { const diagnostic = createDiagnosticForNode(location, Diagnostics._0_is_deprecated, deprecatedEntity); @@ -46275,7 +46660,7 @@ ${lanes.join("\n")} } } else if (target.flags & 1024 /* NamespaceModule */) { if (target !== globalThisSymbol) { - error( + error2( source.declarations && getNameOfDeclaration(source.declarations[0]), Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target) @@ -46369,7 +46754,7 @@ ${lanes.join("\n")} if (isGlobalScopeAugmentation(moduleAugmentation)) { mergeSymbolTable(globals, moduleAugmentation.symbol.exports); } else { - const moduleNotFoundError = !(moduleName.parent.parent.flags & 16777216 /* Ambient */) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : void 0; + const moduleNotFoundError = !(moduleName.parent.parent.flags & 33554432 /* Ambient */) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : void 0; let mainModule = resolveExternalModuleNameWorker( moduleName, moduleName, @@ -46405,7 +46790,7 @@ ${lanes.join("\n")} mergeSymbol(mainModule, moduleAugmentation.symbol); } } else { - error(moduleName, Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, moduleName.text); + error2(moduleName, Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, moduleName.text); } } } @@ -46433,7 +46818,7 @@ ${lanes.join("\n")} return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); } function isGlobalSourceFile(node) { - return node.kind === 311 /* SourceFile */ && !isExternalOrCommonJsModule(node); + return node.kind === 312 /* SourceFile */ && !isExternalOrCommonJsModule(node); } function getSymbol2(symbols, name, meaning) { if (meaning) { @@ -46444,7 +46829,7 @@ ${lanes.join("\n")} return symbol; } if (symbol.flags & 2097152 /* Alias */) { - const targetFlags = getAllSymbolFlags(symbol); + const targetFlags = getSymbolFlags(symbol); if (targetFlags & meaning) { return symbol; } @@ -46467,7 +46852,7 @@ ${lanes.join("\n")} const useFile = getSourceFileOfNode(usage); const declContainer = getEnclosingBlockScopeContainer(declaration); if (declarationFile !== useFile) { - if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !outFile(compilerOptions) || isInTypeQuery(usage) || declaration.flags & 16777216 /* Ambient */) { + if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !outFile(compilerOptions) || isInTypeQuery(usage) || declaration.flags & 33554432 /* Ambient */) { return true; } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { @@ -46477,13 +46862,13 @@ ${lanes.join("\n")} return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 207 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 207 /* BindingElement */); + if (declaration.kind === 208 /* BindingElement */) { + const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); if (errorBindingElement) { return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 259 /* VariableDeclaration */), usage); - } else if (declaration.kind === 259 /* VariableDeclaration */) { + return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 260 /* VariableDeclaration */), usage); + } else if (declaration.kind === 260 /* VariableDeclaration */) { return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } else if (isClassDeclaration(declaration)) { return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); @@ -46495,21 +46880,21 @@ ${lanes.join("\n")} false ); } else if (isParameterPropertyDeclaration(declaration, declaration.parent)) { - return !(getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration)); + return !(emitStandardClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration)); } return true; } - if (usage.parent.kind === 280 /* ExportSpecifier */ || usage.parent.kind === 276 /* ExportAssignment */ && usage.parent.isExportEquals) { + if (usage.parent.kind === 281 /* ExportSpecifier */ || usage.parent.kind === 277 /* ExportAssignment */ && usage.parent.isExportEquals) { return true; } - if (usage.kind === 276 /* ExportAssignment */ && usage.isExportEquals) { + if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) { return true; } - if (!!(usage.flags & 8388608 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { + if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { return true; } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { - if (getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ && useDefineForClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { + if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { return !isPropertyImmediatelyReferencedWithinDeclaration( declaration, usage, @@ -46523,9 +46908,9 @@ ${lanes.join("\n")} return false; function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { switch (declaration2.parent.parent.kind) { - case 242 /* VariableStatement */: - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: + case 243 /* VariableStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { return true; } @@ -46550,7 +46935,7 @@ ${lanes.join("\n")} const initializerOfProperty = propertyDeclaration.initializer === current; if (initializerOfProperty) { if (isStatic(current.parent)) { - if (declaration2.kind === 173 /* MethodDeclaration */) { + if (declaration2.kind === 174 /* MethodDeclaration */) { return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { @@ -46564,7 +46949,7 @@ ${lanes.join("\n")} } } } else { - const isDeclarationInstanceProperty = declaration2.kind === 171 /* PropertyDeclaration */ && !isStatic(declaration2); + const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2); if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { return true; } @@ -46583,15 +46968,15 @@ ${lanes.join("\n")} return "quit"; } switch (node.kind) { - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return true; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 240 /* Block */: + case 241 /* Block */: switch (node.parent.kind) { - case 176 /* GetAccessor */: - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: return true; default: return false; @@ -46621,19 +47006,19 @@ ${lanes.join("\n")} } function requiresScopeChangeWorker(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 175 /* Constructor */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: return false; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 302 /* PropertyAssignment */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 303 /* PropertyAssignment */: return requiresScopeChangeWorker(node.name); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasStaticModifier(node)) { - return target < 99 /* ESNext */ || !useDefineForClassFields; + return !emitStandardClassFields; } return requiresScopeChangeWorker(node.name); default: @@ -46672,7 +47057,7 @@ ${lanes.join("\n")} if (name === "const" && isConstAssertion(location)) { return void 0; } - if (isModuleDeclaration(location) && lastLocation && location.name === lastLocation) { + if (isModuleOrEnumDeclaration(location) && lastLocation && location.name === lastLocation) { lastLocation = location; location = location.parent; } @@ -46680,17 +47065,17 @@ ${lanes.join("\n")} if (result = lookup(location.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 326 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 168 /* Parameter */ || lastLocation.kind === 347 /* JSDocParameterTag */ || lastLocation.kind === 348 /* JSDocReturnTag */ || lastLocation.kind === 167 /* TypeParameter */ : false; + if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 327 /* JSDoc */) { + useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 348 /* JSDocParameterTag */ || lastLocation.kind === 349 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false; } if (meaning & result.flags & 3 /* Variable */) { if (useOuterVariableScopeInParameter(result, location, lastLocation)) { useResult = false; } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 168 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); + useResult = lastLocation.kind === 169 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); } } - } else if (location.kind === 193 /* ConditionalType */) { + } else if (location.kind === 194 /* ConditionalType */) { useResult = lastLocation === location.trueType; } if (useResult) { @@ -46702,13 +47087,13 @@ ${lanes.join("\n")} } withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) break; isInExternalModule = true; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const moduleExports = ((_a = getSymbolOfDeclaration(location)) == null ? void 0 : _a.exports) || emptySymbols; - if (location.kind === 311 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 16777216 /* Ambient */ && !isGlobalScopeAugmentation(location)) { + if (location.kind === 312 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 33554432 /* Ambient */ && !isGlobalScopeAugmentation(location)) { if (result = moduleExports.get("default" /* Default */)) { const localSymbol = getLocalSymbolForExportDefault(result); if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { @@ -46717,7 +47102,7 @@ ${lanes.join("\n")} result = void 0; } const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 280 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 279 /* NamespaceExport */))) { + if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 281 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 280 /* NamespaceExport */))) { break; } } @@ -46729,10 +47114,10 @@ ${lanes.join("\n")} } } break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { - if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 16777216 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { - error( + if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 33554432 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { + error2( errorLocation, Diagnostics.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead, unescapeLeadingUnderscores(name), @@ -46743,7 +47128,7 @@ ${lanes.join("\n")} break loop; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(location)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { @@ -46754,9 +47139,9 @@ ${lanes.join("\n")} } } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { result = void 0; @@ -46764,7 +47149,7 @@ ${lanes.join("\n")} } if (lastLocation && isStatic(lastLocation)) { if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.Static_members_cannot_reference_class_type_parameters); + error2(errorLocation, Diagnostics.Static_members_cannot_reference_class_type_parameters); } return void 0; } @@ -46778,43 +47163,43 @@ ${lanes.join("\n")} } } break; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: if (lastLocation === location.expression && location.parent.token === 96 /* ExtendsKeyword */) { const container = location.parent.parent; if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) { if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters); + error2(errorLocation, Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters); } return void 0; } } break; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 263 /* InterfaceDeclaration */) { + if (isClassLike(grandparent) || grandparent.kind === 264 /* InterfaceDeclaration */) { if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) { if (nameNotFoundMessage) { - error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); + error2(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); } return void 0; } } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { break; } - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -46827,37 +47212,37 @@ ${lanes.join("\n")} } } break; - case 169 /* Decorator */: - if (location.parent && location.parent.kind === 168 /* Parameter */) { + case 170 /* Decorator */: + if (location.parent && location.parent.kind === 169 /* Parameter */) { location = location.parent; } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 262 /* ClassDeclaration */)) { + if (location.parent && (isClassElement(location.parent) || location.parent.kind === 263 /* ClassDeclaration */)) { location = location.parent; } break; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: const root = getJSDocRoot(location); if (root) { location = root.parent; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (!associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { associatedDeclarationForContainingInitializerOrBindingName = location; } } break; - case 194 /* InferType */: + case 195 /* InferType */: if (meaning & 262144 /* TypeParameter */) { const parameterName = location.typeParameter.name; if (parameterName && name === parameterName.escapedText) { @@ -46866,7 +47251,7 @@ ${lanes.join("\n")} } } break; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: if (lastLocation && lastLocation === location.propertyName && location.parent.parent.moduleSpecifier) { location = location.parent.parent.parent; } @@ -46904,8 +47289,8 @@ ${lanes.join("\n")} } } function checkAndReportErrorForInvalidInitializer() { - if (propertyWithInvalidInitializer && !(useDefineForClassFields && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */)) { - error( + if (propertyWithInvalidInitializer && !emitStandardClassFields) { + error2( errorLocation, errorLocation && propertyWithInvalidInitializer.type && textRangeContainsPositionInclusive(propertyWithInvalidInitializer.type, errorLocation.pos) ? Diagnostics.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor : Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, declarationNameToString(propertyWithInvalidInitializer.name), @@ -46918,14 +47303,14 @@ ${lanes.join("\n")} if (!result) { if (nameNotFoundMessage) { addLazyDiagnostic(() => { - if (!errorLocation || errorLocation.parent.kind !== 330 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 + if (!errorLocation || errorLocation.parent.kind !== 331 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 !checkAndReportErrorForInvalidInitializer() && !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingNamespaceAsTypeOrValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { let suggestion; let suggestedLib; if (nameArg) { suggestedLib = getSuggestedLibForNonExistentName(nameArg); if (suggestedLib) { - error(errorLocation, nameNotFoundMessage, diagnosticName(nameArg), suggestedLib); + error2(errorLocation, nameNotFoundMessage, diagnosticName(nameArg), suggestedLib); } } if (!suggestedLib && getSpellingSuggestions && suggestionCount < maximumSuggestionCount) { @@ -46954,7 +47339,7 @@ ${lanes.join("\n")} } } if (!suggestion && !suggestedLib && nameArg) { - error(errorLocation, nameNotFoundMessage, diagnosticName(nameArg)); + error2(errorLocation, nameNotFoundMessage, diagnosticName(nameArg)); } suggestionCount++; } @@ -46972,7 +47357,7 @@ ${lanes.join("\n")} checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } - if (result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(originalLocation.flags & 8388608 /* JSDoc */)) { + if (result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(originalLocation.flags & 16777216 /* JSDoc */)) { const merged = getMergedSymbol(result); if (length(merged.declarations) && every(merged.declarations, (d) => isNamespaceExportDeclaration(d) || isSourceFile(d) && !!d.symbol.globalExports)) { errorOrSuggestion(!compilerOptions.allowUmdGlobalAccess, errorLocation, Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, unescapeLeadingUnderscores(name)); @@ -46982,18 +47367,18 @@ ${lanes.join("\n")} const candidate = getMergedSymbol(getLateBoundSymbol(result)); const root = getRootDeclaration(associatedDeclarationForContainingInitializerOrBindingName); if (candidate === getSymbolOfDeclaration(associatedDeclarationForContainingInitializerOrBindingName)) { - error(errorLocation, Diagnostics.Parameter_0_cannot_reference_itself, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name)); + error2(errorLocation, Diagnostics.Parameter_0_cannot_reference_itself, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name)); } else if (candidate.valueDeclaration && candidate.valueDeclaration.pos > associatedDeclarationForContainingInitializerOrBindingName.pos && root.parent.locals && lookup(root.parent.locals, candidate.escapedName, meaning) === candidate) { - error(errorLocation, Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), declarationNameToString(errorLocation)); + error2(errorLocation, Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), declarationNameToString(errorLocation)); } } if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */); if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 279 /* NamespaceExport */ ? 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 message = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? 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 unescapedName = unescapeLeadingUnderscores(name); addTypeOnlyDeclarationRelatedInfo( - error(errorLocation, message, unescapedName), + error2(errorLocation, message, unescapedName), typeOnlyDeclaration, unescapedName ); @@ -47010,14 +47395,14 @@ ${lanes.join("\n")} diagnostic, createDiagnosticForNode( typeOnlyDeclaration, - typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 279 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, + typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, unescapedName ) ); } function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 218 /* ArrowFunction */ && location.kind !== 217 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 171 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); + if (location.kind !== 219 /* ArrowFunction */ && location.kind !== 218 /* FunctionExpression */) { + return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 172 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); } if (lastLocation && lastLocation === location.name) { return false; @@ -47029,12 +47414,12 @@ ${lanes.join("\n")} } function isSelfReferenceLocation(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 266 /* ModuleDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 267 /* ModuleDeclaration */: return true; default: return false; @@ -47046,7 +47431,7 @@ ${lanes.join("\n")} function isTypeParameterSymbolDeclaredInContainer(symbol, container) { if (symbol.declarations) { for (const decl of symbol.declarations) { - if (decl.kind === 167 /* TypeParameter */) { + if (decl.kind === 168 /* TypeParameter */) { const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; if (parent2 === container) { return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); @@ -47076,13 +47461,13 @@ ${lanes.join("\n")} } const constructorType = getTypeOfSymbol(classSymbol); if (getPropertyOfType(constructorType, name)) { - error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, diagnosticName(nameArg), symbolToString(classSymbol)); + error2(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, diagnosticName(nameArg), symbolToString(classSymbol)); return true; } if (location === container && !isStatic(location)) { const instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType; if (getPropertyOfType(instanceType, name)) { - error(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, diagnosticName(nameArg)); + error2(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, diagnosticName(nameArg)); return true; } } @@ -47099,7 +47484,7 @@ ${lanes.join("\n")} /*ignoreErrors*/ true )) { - error(errorLocation, Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements, getTextOfNode(expression)); + error2(errorLocation, Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements, getTextOfNode(expression)); return true; } return false; @@ -47107,9 +47492,9 @@ ${lanes.join("\n")} function getEntityNameForExtendingInterface(node) { switch (node.kind) { case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: if (isEntityNameExpression(node.expression)) { return node.expression; } @@ -47138,7 +47523,7 @@ ${lanes.join("\n")} const propName = parent2.right.escapedText; const propType = getPropertyOfType(getDeclaredTypeOfSymbol(symbol), propName); if (propType) { - error( + error2( parent2, Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, unescapeLeadingUnderscores(name), @@ -47147,7 +47532,7 @@ ${lanes.join("\n")} return true; } } - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name)); return true; } } @@ -47167,7 +47552,7 @@ ${lanes.join("\n")} false )); if (symbol && !(symbol.flags & 1920 /* Namespace */)) { - error(errorLocation, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, unescapeLeadingUnderscores(name)); return true; } } @@ -47177,8 +47562,8 @@ ${lanes.join("\n")} return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; } function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 280 /* ExportSpecifier */) { - error(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); + if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 281 /* ExportSpecifier */) { + error2(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); return true; } return false; @@ -47187,9 +47572,9 @@ ${lanes.join("\n")} if (meaning & 111551 /* Value */) { if (isPrimitiveTypeName(name)) { if (isExtendedByInterface(errorLocation)) { - error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name)); } else { - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name)); } return true; } @@ -47204,15 +47589,15 @@ ${lanes.join("\n")} /*isUse*/ false )); - const allFlags = symbol && getAllSymbolFlags(symbol); + const allFlags = symbol && getSymbolFlags(symbol); if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) { const rawName = unescapeLeadingUnderscores(name); if (isES2015OrLaterConstructorName(name)) { - error(errorLocation, Diagnostics._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, rawName); + error2(errorLocation, Diagnostics._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, rawName); } else if (maybeMappedType(errorLocation, symbol)) { - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === "K" ? "P" : "K"); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === "K" ? "P" : "K"); } else { - error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName); + error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName); } return true; } @@ -47268,7 +47653,7 @@ ${lanes.join("\n")} false )); if (symbol) { - error( + error2( errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_value, unescapeLeadingUnderscores(name) @@ -47288,7 +47673,7 @@ ${lanes.join("\n")} false )); if (symbol) { - error(errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_type, unescapeLeadingUnderscores(name)); + error2(errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_type, unescapeLeadingUnderscores(name)); return true; } } @@ -47301,19 +47686,19 @@ ${lanes.join("\n")} return; } const declaration = (_a = result.declarations) == null ? void 0 : _a.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 265 /* EnumDeclaration */ + (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 266 /* EnumDeclaration */ ); if (declaration === void 0) return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); - if (!(declaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { + if (!(declaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { let diagnosticMessage; const declarationName = declarationNameToString(getNameOfDeclaration(declaration)); if (result.flags & 2 /* BlockScopedVariable */) { - diagnosticMessage = error(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationName); + diagnosticMessage = error2(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationName); } else if (result.flags & 32 /* Class */) { - diagnosticMessage = error(errorLocation, Diagnostics.Class_0_used_before_its_declaration, declarationName); + diagnosticMessage = error2(errorLocation, Diagnostics.Class_0_used_before_its_declaration, declarationName); } else if (result.flags & 256 /* RegularEnum */) { - diagnosticMessage = error(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); + diagnosticMessage = error2(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { addRelatedInfo( @@ -47328,13 +47713,13 @@ ${lanes.join("\n")} } function getAnyImportSyntax(node) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return node; - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.parent; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.parent; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent; default: return void 0; @@ -47344,7 +47729,7 @@ ${lanes.join("\n")} return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); } function isAliasSymbolDeclaration2(node) { - return node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 269 /* NamespaceExportDeclaration */ || node.kind === 272 /* ImportClause */ && !!node.name || node.kind === 273 /* NamespaceImport */ || node.kind === 279 /* NamespaceExport */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 280 /* ExportSpecifier */ || node.kind === 276 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 303 /* ShorthandPropertyAssignment */ || node.kind === 302 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 259 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 207 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 304 /* ShorthandPropertyAssignment */ || node.kind === 303 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 260 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); @@ -47355,7 +47740,7 @@ ${lanes.join("\n")} const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; } - if (isVariableDeclaration(node) || node.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (isVariableDeclaration(node) || node.moduleReference.kind === 283 /* ExternalModuleReference */) { const immediate = resolveExternalModuleName( node, getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) @@ -47384,11 +47769,11 @@ ${lanes.join("\n")} false ) && !node.isTypeOnly) { const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node)); - const isExport = typeOnlyDeclaration.kind === 280 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 277 /* ExportDeclaration */; + const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */; 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 = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; - const name = typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); - addRelatedInfo(error(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); + const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); + addRelatedInfo(error2(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); } } function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) { @@ -47493,7 +47878,7 @@ ${lanes.join("\n")} const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; const exportEqualsSymbol = moduleSymbol.exports.get("export=" /* ExportEquals */); const exportAssignment = exportEqualsSymbol.valueDeclaration; - const err = error(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName); + const err = error2(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName); if (exportAssignment) { addRelatedInfo(err, createDiagnosticForNode( exportAssignment, @@ -47529,15 +47914,15 @@ ${lanes.join("\n")} } function getModuleSpecifierForImportOrExport(node) { switch (node.kind) { - case 272 /* ImportClause */: + case 273 /* ImportClause */: return node.parent.moduleSpecifier; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return node.parent.parent.moduleSpecifier; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent.moduleSpecifier; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return node.parent.parent.moduleSpecifier; default: return Debug.assertNever(node); @@ -47546,14 +47931,14 @@ ${lanes.join("\n")} function reportNonDefaultExport(moduleSymbol, node) { var _a, _b, _c; if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has(node.symbol.escapedName)) { - error( + error2( node.name, Diagnostics.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead, symbolToString(moduleSymbol), symbolToString(node.symbol) ); } else { - const diagnostic = error(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); + const diagnostic = error2(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); const exportStar = (_b = moduleSymbol.exports) == null ? void 0 : _b.get("__export" /* ExportStar */); if (exportStar) { const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find((decl) => { @@ -47704,7 +48089,7 @@ ${lanes.join("\n")} const suggestion = getSuggestedSymbolForNonexistentModule(name, targetSymbol); if (suggestion !== void 0) { const suggestionName = symbolToString(suggestion); - const diagnostic = error(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); + const diagnostic = error2(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); if (suggestion.valueDeclaration) { addRelatedInfo( diagnostic, @@ -47713,7 +48098,7 @@ ${lanes.join("\n")} } } else { if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has("default" /* Default */)) { - error( + error2( name, Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, @@ -47731,10 +48116,10 @@ ${lanes.join("\n")} if (localSymbol) { const exportedEqualsSymbol = exports == null ? void 0 : exports.get("export=" /* ExportEquals */); if (exportedEqualsSymbol) { - getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) : error(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) : error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); } else { const exportedSymbol = exports ? find(symbolsToArray(exports), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0; - const diagnostic = exportedSymbol ? error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); + const diagnostic = exportedSymbol ? error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); if (localSymbol.declarations) { addRelatedInfo( diagnostic, @@ -47743,20 +48128,20 @@ ${lanes.join("\n")} } } } else { - error(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); + error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); } } function reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) { if (moduleKind >= 5 /* ES2015 */) { const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error(name, message, declarationName); + error2(name, message, declarationName); } else { if (isInJSFile(node)) { const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error(name, message, declarationName); + error2(name, message, declarationName); } else { const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import : Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error(name, message, declarationName, declarationName, moduleName); + error2(name, message, declarationName, declarationName, moduleName); } } } @@ -47870,26 +48255,26 @@ ${lanes.join("\n")} } function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: - case 259 /* VariableDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 260 /* VariableDeclaration */: return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return getTargetOfImportClause(node, dontRecursivelyResolve); - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 275 /* ImportSpecifier */: - case 207 /* BindingElement */: + case 276 /* ImportSpecifier */: + case 208 /* BindingElement */: return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 276 /* ExportAssignment */: - case 225 /* BinaryExpression */: + case 277 /* ExportAssignment */: + case 226 /* BinaryExpression */: return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return resolveEntityName( node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -47897,10 +48282,10 @@ ${lanes.join("\n")} true, dontRecursivelyResolve ); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: return getTargetOfAccessExpression(node, dontRecursivelyResolve); default: return Debug.fail(); @@ -47926,7 +48311,7 @@ ${lanes.join("\n")} if (links.aliasTarget === resolvingSymbol) { links.aliasTarget = target || unknownSymbol; } else { - error(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); + error2(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); } } else if (links.aliasTarget === resolvingSymbol) { links.aliasTarget = unknownSymbol; @@ -47940,11 +48325,23 @@ ${lanes.join("\n")} } return void 0; } - function getAllSymbolFlags(symbol) { - let flags = symbol.flags; + function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) { + const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol); + const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration); + const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName( + typeOnlyDeclaration.moduleSpecifier, + typeOnlyDeclaration.moduleSpecifier, + /*ignoreErrors*/ + true + ) : resolveAlias(typeOnlyDeclaration.symbol)); + const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0; + let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags; let seenSymbols; while (symbol.flags & 2097152 /* Alias */) { - const target = resolveAlias(symbol); + const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol)); + if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) { + break; + } if (target === unknownSymbol) { return 67108863 /* All */; } @@ -48001,8 +48398,8 @@ ${lanes.join("\n")} return links.typeOnlyDeclaration || void 0; } if (links.typeOnlyDeclaration) { - const resolved = links.typeOnlyDeclaration.kind === 277 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); - return getAllSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; + const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); + return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; } return void 0; } @@ -48013,7 +48410,11 @@ ${lanes.join("\n")} const symbol = getSymbolOfDeclaration(node); const target = resolveAlias(symbol); if (target) { - const markAlias = target === unknownSymbol || getAllSymbolFlags(target) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); + const markAlias = target === unknownSymbol || getSymbolFlags( + symbol, + /*excludeTypeOnlyMeanings*/ + true + ) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -48028,7 +48429,7 @@ ${lanes.join("\n")} if (!node) return Debug.fail(); if (isInternalModuleImportEqualsDeclaration(node)) { - if (getAllSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) { + if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) { checkExpressionCached(node.moduleReference); } } @@ -48044,7 +48445,7 @@ ${lanes.join("\n")} if (entityName.kind === 80 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; } - if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 165 /* QualifiedName */) { + if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) { return resolveEntityName( entityName, 1920 /* Namespace */, @@ -48053,7 +48454,7 @@ ${lanes.join("\n")} dontResolveAlias ); } else { - Debug.assert(entityName.parent.kind === 270 /* ImportEqualsDeclaration */); + Debug.assert(entityName.parent.kind === 271 /* ImportEqualsDeclaration */); return resolveEntityName( entityName, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, @@ -48126,9 +48527,9 @@ ${lanes.join("\n")} if (!symbol) { return getMergedSymbol(symbolFromJSPrototype); } - } else if (name.kind === 165 /* QualifiedName */ || name.kind === 210 /* PropertyAccessExpression */) { - const left = name.kind === 165 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 165 /* QualifiedName */ ? name.right : name.name; + } else if (name.kind === 166 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) { + const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression; + const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name; let namespace = resolveEntityName( left, namespaceMeaning, @@ -48162,13 +48563,13 @@ ${lanes.join("\n")} const declarationName = declarationNameToString(right); const suggestionForNonexistentModule = getSuggestedSymbolForNonexistentModule(right, namespace); if (suggestionForNonexistentModule) { - error(right, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule)); + error2(right, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule)); return void 0; } const containingQualifiedName = isQualifiedName(name) && getContainingQualifiedNameNode(name); const canSuggestTypeof = globalObjectType && meaning & 788968 /* Type */ && containingQualifiedName && !isTypeOfExpression(containingQualifiedName.parent) && tryGetQualifiedNameAsValue(containingQualifiedName); if (canSuggestTypeof) { - error( + error2( containingQualifiedName, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, entityNameToString(containingQualifiedName) @@ -48178,7 +48579,7 @@ ${lanes.join("\n")} if (meaning & 1920 /* Namespace */ && isQualifiedName(name.parent)) { const exportedTypeSymbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(namespace), right.escapedText, 788968 /* Type */)); if (exportedTypeSymbol) { - error( + error2( name.parent.right, Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, symbolToString(exportedTypeSymbol), @@ -48187,7 +48588,7 @@ ${lanes.join("\n")} return void 0; } } - error(right, Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName); + error2(right, Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName); } return void 0; } @@ -48195,7 +48596,7 @@ ${lanes.join("\n")} Debug.assertNever(name, "Unknown entity name kind."); } Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 276 /* ExportAssignment */)) { + if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 277 /* ExportAssignment */)) { markSymbolOfAliasDeclarationIfTypeOnly( getAliasDeclarationFromName(name), symbol, @@ -48225,7 +48626,7 @@ ${lanes.join("\n")} } } function getAssignmentDeclarationLocation(node) { - const typeAlias = findAncestor(node, (node2) => !(isJSDocNode(node2) || node2.flags & 8388608 /* JSDoc */) ? "quit" : isJSDocTypeAlias(node2)); + const typeAlias = findAncestor(node, (node2) => !(isJSDocNode(node2) || node2.flags & 16777216 /* JSDoc */) ? "quit" : isJSDocTypeAlias(node2)); if (typeAlias) { return; } @@ -48288,11 +48689,11 @@ ${lanes.join("\n")} return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0; } function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i; + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; if (startsWith(moduleReference, "@types/")) { const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1; const withoutAtTypePrefix = removePrefix(moduleReference, "@types/"); - error(errorNode, diag2, withoutAtTypePrefix, moduleReference); + error2(errorNode, diag2, withoutAtTypePrefix, moduleReference); } const ambientModule = tryFindAmbientModule( moduleReference, @@ -48311,20 +48712,23 @@ ${lanes.join("\n")} const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (resolutionDiagnostic) { - error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); + error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) { const importOrExport = ((_g = findAncestor(location, isImportDeclaration)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); if (importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) { - error( + error2( errorNode, Diagnostics.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead, getSuggestedImportSource(Debug.checkDefined(tryExtractTSExtension(moduleReference))) ); } } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); - error(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); + const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { + const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); + error2(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); + } } if (sourceFile.symbol) { if (resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) { @@ -48341,10 +48745,10 @@ ${lanes.join("\n")} if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) { const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration); const overrideClauseHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); - const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_h = overrideClauseHost.assertions) == null ? void 0 : _h.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; + const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_i = overrideClauseHost.assertions) == null ? void 0 : _i.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) { if (findAncestor(location, isImportEqualsDeclaration)) { - error(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); + error2(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); } else { let diagnosticDetails; const ext = tryGetExtensionFromPath2(currentSourceFile.fileName); @@ -48396,7 +48800,7 @@ ${lanes.join("\n")} return getMergedSymbol(sourceFile.symbol); } if (moduleNotFoundError) { - error(errorNode, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); + error2(errorNode, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); } return void 0; } @@ -48413,7 +48817,7 @@ ${lanes.join("\n")} if (resolvedModule && !resolutionExtensionIsTSOrJson(resolvedModule.extension) && resolutionDiagnostic === void 0 || resolutionDiagnostic === Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type) { if (isForAugmentation) { const diag2 = Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented; - error(errorNode, diag2, moduleReference, resolvedModule.resolvedFileName); + error2(errorNode, diag2, moduleReference, resolvedModule.resolvedFileName); } else { errorOnImplicitAnyModule( /*isError*/ @@ -48431,31 +48835,31 @@ ${lanes.join("\n")} if (resolvedModule) { const redirect = host.getProjectReferenceRedirect(resolvedModule.resolvedFileName); if (redirect) { - error(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName); + error2(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName); return void 0; } } if (resolutionDiagnostic) { - error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); + error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } else { const isExtensionlessRelativePathImport = pathIsRelative(moduleReference) && !hasExtension(moduleReference); const resolutionIsNode16OrNext = moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */; if (!getResolveJsonModule(compilerOptions) && fileExtensionIs(moduleReference, ".json" /* Json */) && moduleResolutionKind !== 1 /* Classic */ && hasJsonModuleEmitEnabled(compilerOptions)) { - error(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference); + error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference); } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) { const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path)); - const suggestedExt = (_i = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _i[1]; + const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1]; if (suggestedExt) { - error( + error2( errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt ); } else { - error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); + error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); } } else { - error(errorNode, moduleNotFoundError, moduleReference); + error2(errorNode, moduleNotFoundError, moduleReference); } } } @@ -48519,9 +48923,9 @@ ${lanes.join("\n")} var _a; const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 311 /* SourceFile */)) { + if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 312 /* SourceFile */)) { const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; - error(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); + error2(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); return symbol; } const referenceParent = referencingLocation.parent; @@ -48876,12 +49280,12 @@ ${lanes.join("\n")} return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol); } function symbolIsValue(symbol, includeTypeOnlyMembers) { - return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getAllSymbolFlags(symbol) & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol))); + return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */); } function findConstructorDeclaration(node) { const members = node.members; for (const member of members) { - if (member.kind === 175 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) { return member; } } @@ -48905,7 +49309,7 @@ ${lanes.join("\n")} function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) { const type = createType(kind); type.intrinsicName = intrinsicName; - type.objectFlags = objectFlags; + type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */; return type; } function createObjectType(objectFlags, symbol) { @@ -48999,11 +49403,11 @@ ${lanes.join("\n")} } } switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalOrCommonJsModule(location)) { break; } - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const sym = getSymbolOfDeclaration(location); if (result = callback( (sym == null ? void 0 : sym.exports) || emptySymbols, @@ -49016,9 +49420,9 @@ ${lanes.join("\n")} return result; } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: let table; (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => { if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { @@ -49096,7 +49500,7 @@ ${lanes.join("\n")} return [symbol]; } const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => { - if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 280 /* ExportSpecifier */))) { + if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */))) { const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); if (candidate) { @@ -49141,9 +49545,9 @@ ${lanes.join("\n")} if (symbolFromSymbolTable === symbol) { return true; } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 280 /* ExportSpecifier */); + const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */); symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; - const flags = shouldResolveAlias ? getAllSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; + const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; if (flags & meaning) { qualify = true; return true; @@ -49156,10 +49560,10 @@ ${lanes.join("\n")} if (symbol.declarations && symbol.declarations.length) { for (const declaration of symbol.declarations) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: continue; default: return false; @@ -49295,10 +49699,10 @@ ${lanes.join("\n")} return node && getSymbolOfDeclaration(node); } function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isAmbientModule(declaration) || declaration.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(declaration); + return isModuleWithStringLiteralName(declaration) || declaration.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(declaration); } function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { let aliasesToMakeVisible; @@ -49346,9 +49750,9 @@ ${lanes.join("\n")} } function isEntityNameVisible(entityName, enclosingDeclaration) { let meaning; - if (entityName.parent.kind === 185 /* TypeQuery */ || entityName.parent.kind === 232 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 166 /* ComputedPropertyName */) { + if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 165 /* QualifiedName */ || entityName.kind === 210 /* PropertyAccessExpression */ || entityName.parent.kind === 270 /* ImportEqualsDeclaration */) { + } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) { meaning = 1920 /* Namespace */; } else { meaning = 788968 /* Type */; @@ -49414,7 +49818,7 @@ ${lanes.join("\n")} return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer2) { const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 311 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); + const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 312 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode( 4 /* Unspecified */, @@ -49431,9 +49835,9 @@ ${lanes.join("\n")} function signatureToStringWorker(writer2) { let sigOutput; if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 184 /* ConstructorType */ : 183 /* FunctionType */; + sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */; } else { - sigOutput = kind === 1 /* Construct */ ? 179 /* ConstructSignature */ : 178 /* CallSignature */; + sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */; } const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); @@ -49535,7 +49939,7 @@ ${lanes.join("\n")} return symbolToExpression(symbol, context, meaning); } function withContext(enclosingDeclaration, flags, tracker, cb) { - Debug.assert(enclosingDeclaration === void 0 || (enclosingDeclaration.flags & 8 /* Synthesized */) === 0); + Debug.assert(enclosingDeclaration === void 0 || (enclosingDeclaration.flags & 16 /* Synthesized */) === 0); const moduleResolverHost = (tracker == null ? void 0 : tracker.trackSymbol) ? tracker.moduleResolverHost : flags & 134217728 /* DoNotIncludeSymbolChain */ ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : void 0; const context = { enclosingDeclaration, @@ -49607,7 +50011,7 @@ ${lanes.join("\n")} } if (type.flags & 64 /* BigInt */) { context.approximateLength += 6; - return factory.createKeywordTypeNode(162 /* BigIntKeyword */); + return factory.createKeywordTypeNode(163 /* BigIntKeyword */); } if (type.flags & 16 /* Boolean */ && !type.aliasSymbol) { context.approximateLength += 7; @@ -49880,11 +50284,13 @@ ${lanes.join("\n")} return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2); } function createMappedTypeNodeFromType(type2) { + var _a2; Debug.assert(!!(type2.flags & 524288 /* Object */)); const readonlyToken = type2.declaration.readonlyToken ? factory.createToken(type2.declaration.readonlyToken.kind) : void 0; const questionToken = type2.declaration.questionToken ? factory.createToken(type2.declaration.questionToken.kind) : void 0; let appropriateConstraintTypeNode; let newTypeVariable; + const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type2) && !(getModifiersTypeFromMappedType(type2).flags & 2 /* Unknown */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && !(getConstraintTypeFromMappedType(type2).flags & 262144 /* TypeParameter */ && ((_a2 = getConstraintOfTypeParameter(getConstraintTypeFromMappedType(type2))) == null ? void 0 : _a2.flags) & 4194304 /* Index */); if (isMappedTypeWithKeyofConstraintDeclaration(type2)) { if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) { const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); @@ -49892,6 +50298,11 @@ ${lanes.join("\n")} newTypeVariable = factory.createTypeReferenceNode(name); } appropriateConstraintTypeNode = factory.createTypeOperatorNode(143 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); + } else if (needsModifierPreservingWrapper) { + const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); + const name = typeParameterToName(newParam, context); + newTypeVariable = factory.createTypeReferenceNode(name); + appropriateConstraintTypeNode = newTypeVariable; } else { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context); } @@ -49922,6 +50333,18 @@ ${lanes.join("\n")} result, factory.createKeywordTypeNode(146 /* NeverKeyword */) ); + } else if (needsModifierPreservingWrapper) { + return factory.createConditionalTypeNode( + typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context), + factory.createInferTypeNode(factory.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + factory.cloneNode(newTypeVariable.typeName), + factory.createTypeOperatorNode(143 /* KeyOfKeyword */, typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)) + )), + result, + factory.createKeywordTypeNode(146 /* NeverKeyword */) + ); } return result; } @@ -49973,7 +50396,7 @@ ${lanes.join("\n")} const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method some(symbol.declarations, (declaration) => isStatic(declaration)); const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol - forEach(symbol.declarations, (declaration) => declaration.parent.kind === 311 /* SourceFile */ || declaration.parent.kind === 267 /* ModuleBlock */)); + forEach(symbol.declarations, (declaration) => declaration.parent.kind === 312 /* SourceFile */ || declaration.parent.kind === 268 /* ModuleBlock */)); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && // it is type of the symbol uses itself recursively (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); @@ -50056,12 +50479,12 @@ ${lanes.join("\n")} } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 183 /* FunctionType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context); return signatureNode; } if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* ConstructorType */, context); + const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context); return signatureNode; } } @@ -50101,19 +50524,18 @@ ${lanes.join("\n")} const arity = getTypeReferenceArity(type2); const tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, arity), context); if (tupleConstituentNodes) { - if (type2.target.labeledElementDeclarations) { - for (let i = 0; i < tupleConstituentNodes.length; i++) { - const flags = type2.target.elementFlags[i]; + const { labeledElementDeclarations } = type2.target; + for (let i = 0; i < tupleConstituentNodes.length; i++) { + const flags = type2.target.elementFlags[i]; + const labeledElementDeclaration = labeledElementDeclarations == null ? void 0 : labeledElementDeclarations[i]; + if (labeledElementDeclaration) { tupleConstituentNodes[i] = factory.createNamedTupleMember( flags & 12 /* Variable */ ? factory.createToken(26 /* DotDotDotToken */) : void 0, - factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(type2.target.labeledElementDeclarations[i]))), + factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(labeledElementDeclaration))), flags & 2 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i] ); - } - } else { - for (let i = 0; i < Math.min(arity, tupleConstituentNodes.length); i++) { - const flags = type2.target.elementFlags[i]; + } else { tupleConstituentNodes[i] = flags & 12 /* Variable */ ? factory.createRestTypeNode(flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]) : flags & 2 /* Optional */ ? factory.createOptionalTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]; } } @@ -50247,12 +50669,12 @@ ${lanes.join("\n")} } const typeElements = []; for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 178 /* CallSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context)); } for (const signature of resolvedType.constructSignatures) { if (signature.flags & 4 /* Abstract */) continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* ConstructSignature */, context)); + typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context)); } for (const info of resolvedType.indexInfos) { typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); @@ -50336,39 +50758,41 @@ ${lanes.join("\n")} if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); for (const signature of signatures) { - const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 172 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); + const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); typeElements.push(preserveCommentsOn(methodDeclaration)); } + if (signatures.length || !optionalToken) { + return; + } + } + let propertyTypeNode; + if (shouldUsePlaceholderForProperty(propertySymbol, context)) { + propertyTypeNode = createElidedInformationPlaceholder(context); } else { - let propertyTypeNode; - if (shouldUsePlaceholderForProperty(propertySymbol, context)) { - propertyTypeNode = createElidedInformationPlaceholder(context); - } else { - if (propertyIsReverseMapped) { - context.reverseMappedStack || (context.reverseMappedStack = []); - context.reverseMappedStack.push(propertySymbol); - } - propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */); - if (propertyIsReverseMapped) { - context.reverseMappedStack.pop(); - } + if (propertyIsReverseMapped) { + context.reverseMappedStack || (context.reverseMappedStack = []); + context.reverseMappedStack.push(propertySymbol); } - const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0; - if (modifiers) { - context.approximateLength += 9; + propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */); + if (propertyIsReverseMapped) { + context.reverseMappedStack.pop(); } - const propertySignature = factory.createPropertySignature( - modifiers, - propertyName, - optionalToken, - propertyTypeNode - ); - typeElements.push(preserveCommentsOn(propertySignature)); } + const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0; + if (modifiers) { + context.approximateLength += 9; + } + const propertySignature = factory.createPropertySignature( + modifiers, + propertyName, + optionalToken, + propertyTypeNode + ); + typeElements.push(preserveCommentsOn(propertySignature)); function preserveCommentsOn(node) { var _a2; - if (some(propertySymbol.declarations, (d) => d.kind === 354 /* JSDocPropertyTag */)) { - const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 354 /* JSDocPropertyTag */); + if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) { + const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */); const commentText = getTextOfJSDocComment(d.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); @@ -50474,6 +50898,7 @@ ${lanes.join("\n")} ); } function signatureToSignatureDeclarationHelper(signature, kind, context, options) { + var _a; const suppressAny = context.flags & 256 /* SuppressAnyReturnType */; if (suppressAny) context.flags &= ~256 /* SuppressAnyReturnType */; @@ -50523,7 +50948,7 @@ ${lanes.join("\n")} } } } - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 175 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); + const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context); if (thisParameter) { parameters.unshift(thisParameter); @@ -50544,11 +50969,11 @@ ${lanes.join("\n")} } } let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 184 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { + if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); } - const node = kind === 178 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 179 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 172 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodDeclaration */ ? factory.createMethodDeclaration( + const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -50560,25 +50985,25 @@ ${lanes.join("\n")} returnTypeNode, /*body*/ void 0 - ) : kind === 175 /* Constructor */ ? factory.createConstructorDeclaration( + ) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration( modifiers, parameters, /*body*/ void 0 - ) : kind === 176 /* GetAccessor */ ? factory.createGetAccessorDeclaration( + ) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration( modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), parameters, returnTypeNode, /*body*/ void 0 - ) : kind === 177 /* SetAccessor */ ? factory.createSetAccessorDeclaration( + ) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration( modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), parameters, /*body*/ void 0 - ) : kind === 180 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 323 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 183 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 184 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 261 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( + ) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 324 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 262 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( modifiers, /*asteriskToken*/ void 0, @@ -50588,7 +51013,7 @@ ${lanes.join("\n")} returnTypeNode, /*body*/ void 0 - ) : kind === 217 /* FunctionExpression */ ? factory.createFunctionExpression( + ) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression( modifiers, /*asteriskToken*/ void 0, @@ -50597,7 +51022,7 @@ ${lanes.join("\n")} parameters, returnTypeNode, factory.createBlock([]) - ) : kind === 218 /* ArrowFunction */ ? factory.createArrowFunction( + ) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction( modifiers, typeParameters, parameters, @@ -50609,6 +51034,20 @@ ${lanes.join("\n")} if (typeArguments) { node.typeArguments = factory.createNodeArray(typeArguments); } + if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) { + const comment = getTextOfNode( + signature.declaration.parent.parent, + /*includeTrivia*/ + true + ).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n"); + addSyntheticLeadingComment( + node, + 3 /* MultiLineCommentTrivia */, + comment, + /*hasTrailingNewLine*/ + true + ); + } cleanup == null ? void 0 : cleanup(); return node; } @@ -50647,9 +51086,9 @@ ${lanes.join("\n")} return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 168 /* Parameter */); + let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 347 /* JSDocParameterTag */); + parameterDeclaration = getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); } let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { @@ -50659,7 +51098,7 @@ ${lanes.join("\n")} const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(26 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 165 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -50839,11 +51278,11 @@ ${lanes.join("\n")} return top; } function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { - let file = getDeclarationOfKind(symbol, 311 /* SourceFile */); + let file = getDeclarationOfKind(symbol, 312 /* SourceFile */); if (!file) { const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 311 /* SourceFile */); + file = getDeclarationOfKind(equivalentFileSymbol, 312 /* SourceFile */); } } if (file && file.moduleName !== void 0) { @@ -51323,7 +51762,7 @@ ${lanes.join("\n")} } return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 325 /* JSDocNamepathType */) { + if (isJSDocAllType(node) || node.kind === 326 /* JSDocNamepathType */) { return factory.createKeywordTypeNode(133 /* AnyKeyword */); } if (isJSDocUnknownType(node)) { @@ -51487,13 +51926,13 @@ ${lanes.join("\n")} function symbolTableToDeclarationStatements(symbolTable, context, bundled) { const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, - 173 /* MethodDeclaration */, + 174 /* MethodDeclaration */, /*useAccessors*/ true ); const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol( (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), - 172 /* MethodSignature */, + 173 /* MethodSignature */, /*useAccessors*/ false ); @@ -51762,7 +52201,7 @@ ${lanes.join("\n")} if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags); } else { - const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstVariable(symbol) ? 2 /* Const */ : 1 /* Let */; + const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol); let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d)); if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) { @@ -51908,7 +52347,7 @@ ${lanes.join("\n")} if (additionalModifierFlags & 1 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { newModifierFlags |= 1 /* Export */; } - if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 16777216 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { + if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { newModifierFlags |= 2 /* Ambient */; } if (additionalModifierFlags & 1024 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { @@ -51952,8 +52391,8 @@ ${lanes.join("\n")} const baseTypes = getBaseTypes(interfaceType); const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0; const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType)); - const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 178 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 179 /* ConstructSignature */); + const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 179 /* CallSignature */); + const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(96 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; addResult(factory.createInterfaceDeclaration( @@ -51970,7 +52409,7 @@ ${lanes.join("\n")} return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */)); } function isTypeOnlyNamespace(symbol) { - return every(getNamespaceMembersForSerialization(symbol), (m) => !(getAllSymbolFlags(resolveSymbol(m)) & 111551 /* Value */)); + return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */)); } function serializeModule(symbol, symbolName2, modifierFlags) { const members = getNamespaceMembersForSerialization(symbol); @@ -52018,7 +52457,7 @@ ${lanes.join("\n")} void 0, factory.createIdentifier(localName), nsBody, - 16 /* Namespace */ + 32 /* Namespace */ ), 0 /* None */); } } @@ -52035,7 +52474,7 @@ ${lanes.join("\n")} function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 261 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); + const decl = signatureToSignatureDeclarationHelper(sig, 262 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); addResult(setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags); } if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) { @@ -52075,7 +52514,7 @@ ${lanes.join("\n")} void 0, factory.createIdentifier(localName), factory.createModuleBlock([]), - 16 /* Namespace */ + 32 /* Namespace */ ); setParent(fakespace, enclosingDeclaration); fakespace.locals = createSymbolTable(props); @@ -52219,7 +52658,7 @@ ${lanes.join("\n")} [], /*body*/ void 0 - )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 175 /* Constructor */); + )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; addResult(setTextRange(factory.createClassDeclaration( @@ -52271,8 +52710,8 @@ ${lanes.join("\n")} const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); switch (node.kind) { - case 207 /* BindingElement */: - if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 259 /* VariableDeclaration */) { + case 208 /* BindingElement */: + if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; addResult(factory.createImportDeclaration( @@ -52298,15 +52737,15 @@ ${lanes.join("\n")} } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); break; - case 303 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 225 /* BinaryExpression */) { + case 304 /* ShorthandPropertyAssignment */: + if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 226 /* BinaryExpression */) { serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), targetName ); } break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: if (isPropertyAccessExpression(node.initializer)) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); @@ -52329,7 +52768,7 @@ ${lanes.join("\n")} ), modifierFlags); break; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) { serializeMaybeAliasAssignment(symbol); break; @@ -52350,10 +52789,10 @@ ${lanes.join("\n")} ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : 0 /* None */); break; - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); break; - case 272 /* ImportClause */: { + case 273 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52371,7 +52810,7 @@ ${lanes.join("\n")} ), 0 /* None */); break; } - case 273 /* NamespaceImport */: { + case 274 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52389,7 +52828,7 @@ ${lanes.join("\n")} ), 0 /* None */); break; } - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: addResult(factory.createExportDeclaration( /*modifiers*/ void 0, @@ -52399,7 +52838,7 @@ ${lanes.join("\n")} factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) ), 0 /* None */); break; - case 275 /* ImportSpecifier */: { + case 276 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; addResult(factory.createImportDeclaration( @@ -52424,7 +52863,7 @@ ${lanes.join("\n")} ), 0 /* None */); break; } - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: const specifier = node.parent.parent.moduleSpecifier; serializeExportSpecifier( unescapeLeadingUnderscores(symbol.escapedName), @@ -52432,12 +52871,12 @@ ${lanes.join("\n")} specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 ); break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: serializeMaybeAliasAssignment(symbol); break; - case 225 /* BinaryExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 226 /* BinaryExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { serializeMaybeAliasAssignment(symbol); } else { @@ -52544,7 +52983,7 @@ ${lanes.join("\n")} void 0, serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled) ) - ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 266 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) + ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) ); addResult( statement, @@ -52917,10 +53356,10 @@ ${lanes.join("\n")} return void 0; } function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 267 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); + return node && node.parent && node.parent.kind === 268 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); } function isDefaultBindingContext(location) { - return location.kind === 311 /* SourceFile */ || isAmbientModule(location); + return location.kind === 312 /* SourceFile */ || isAmbientModule(location); } function getNameOfSymbolFromNameType(symbol, context) { const nameType = getSymbolLinks(symbol).nameType; @@ -52968,17 +53407,17 @@ ${lanes.join("\n")} if (!declaration) { declaration = symbol.declarations[0]; } - if (declaration.parent && declaration.parent.kind === 259 /* VariableDeclaration */) { + if (declaration.parent && declaration.parent.kind === 260 /* VariableDeclaration */) { return declarationNameToString(declaration.parent.name); } switch (declaration.kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { context.encounteredError = true; } - return declaration.kind === 230 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; + return declaration.kind === 231 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; } } const name = getNameOfSymbolFromNameType(symbol, context); @@ -52995,66 +53434,66 @@ ${lanes.join("\n")} return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: - case 346 /* JSDocEnumTag */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 347 /* JSDocEnumTag */: return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: if (isBindingPattern(node.name) && !node.name.elements.length) { return false; } - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 261 /* FunctionDeclaration */: - case 265 /* EnumDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 262 /* FunctionDeclaration */: + case 266 /* EnumDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (isExternalModuleAugmentation(node)) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlags(node) & 1 /* Export */) && !(node.kind !== 270 /* ImportEqualsDeclaration */ && parent2.kind !== 311 /* SourceFile */ && parent2.flags & 16777216 /* Ambient */)) { + if (!(getCombinedModifierFlagsCached(node) & 1 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent2.kind !== 312 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { return false; } - case 175 /* Constructor */: - case 179 /* ConstructSignature */: - case 178 /* CallSignature */: - case 180 /* IndexSignature */: - case 168 /* Parameter */: - case 267 /* ModuleBlock */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 186 /* TypeLiteral */: - case 182 /* TypeReference */: - case 187 /* ArrayType */: - case 188 /* TupleType */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: + case 176 /* Constructor */: + case 180 /* ConstructSignature */: + case 179 /* CallSignature */: + case 181 /* IndexSignature */: + case 169 /* Parameter */: + case 268 /* ModuleBlock */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 187 /* TypeLiteral */: + case 183 /* TypeReference */: + case 188 /* ArrayType */: + case 189 /* TupleType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: return isDeclarationVisible(node.parent); - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: return false; - case 167 /* TypeParameter */: - case 311 /* SourceFile */: - case 269 /* NamespaceExportDeclaration */: + case 168 /* TypeParameter */: + case 312 /* SourceFile */: + case 270 /* NamespaceExportDeclaration */: return true; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return false; default: return false; @@ -53063,7 +53502,7 @@ ${lanes.join("\n")} } function collectLinkedAliases(node, setVisibility) { let exportSymbol; - if (node.parent && node.parent.kind === 276 /* ExportAssignment */) { + if (node.parent && node.parent.kind === 277 /* ExportAssignment */) { exportSymbol = resolveName( node, node.escapedText, @@ -53074,7 +53513,7 @@ ${lanes.join("\n")} /*isUse*/ false ); - } else if (node.parent.kind === 280 /* ExportSpecifier */) { + } else if (node.parent.kind === 281 /* ExportSpecifier */) { exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); } let result; @@ -53178,12 +53617,12 @@ ${lanes.join("\n")} function getDeclarationContainer(node) { return findAncestor(getRootDeclaration(node), (node2) => { switch (node2.kind) { - case 259 /* VariableDeclaration */: - case 260 /* VariableDeclarationList */: - case 275 /* ImportSpecifier */: - case 274 /* NamedImports */: - case 273 /* NamespaceImport */: - case 272 /* ImportClause */: + case 260 /* VariableDeclaration */: + case 261 /* VariableDeclarationList */: + case 276 /* ImportSpecifier */: + case 275 /* NamedImports */: + case 274 /* NamespaceImport */: + case 273 /* ImportClause */: return false; default: return true; @@ -53202,6 +53641,17 @@ ${lanes.join("\n")} var _a; return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType; } + function getTypeOfPropertyOrIndexSignatureOfType(type, name) { + var _a; + let propType; + return getTypeOfPropertyOfType(type, name) || (propType = (_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) && addOptionality( + propType, + /*isProperty*/ + true, + /*isOptional*/ + true + ); + } function isTypeAny(type) { return type && (type.flags & 1 /* Any */) !== 0; } @@ -53301,23 +53751,23 @@ ${lanes.join("\n")} function getParentElementAccess(node) { const ancestor = node.parent.parent; switch (ancestor.kind) { - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: return getSyntheticElementAccess(ancestor); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getSyntheticElementAccess(node.parent); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return ancestor.initializer; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return ancestor.right; } } function getDestructuringPropertyName(node) { const parent2 = node.parent; - if (node.kind === 207 /* BindingElement */ && parent2.kind === 205 /* ObjectBindingPattern */) { + if (node.kind === 208 /* BindingElement */ && parent2.kind === 206 /* ObjectBindingPattern */) { return getLiteralPropertyNameText(node.propertyName || node.name); } - if (node.kind === 302 /* PropertyAssignment */ || node.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) { return getLiteralPropertyNameText(node.name); } return "" + parent2.elements.indexOf(node); @@ -53336,17 +53786,17 @@ ${lanes.join("\n")} return parentType; } const pattern = declaration.parent; - if (strictNullChecks && declaration.flags & 16777216 /* Ambient */ && isParameterDeclaration(declaration)) { + if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isParameterDeclaration(declaration)) { parentType = getNonNullableType(parentType); } else if (strictNullChecks && pattern.parent.initializer && !(getTypeFacts(getTypeOfInitializer(pattern.parent.initializer)) & 65536 /* EQUndefined */)) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; - if (pattern.kind === 205 /* ObjectBindingPattern */) { + if (pattern.kind === 206 /* ObjectBindingPattern */) { if (declaration.dotDotDotToken) { parentType = getReducedType(parentType); if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { - error(declaration, Diagnostics.Rest_types_may_only_be_created_from_object_types); + error2(declaration, Diagnostics.Rest_types_may_only_be_created_from_object_types); return errorType; } const literalMembers = []; @@ -53406,13 +53856,13 @@ ${lanes.join("\n")} /*excludeJSDocTypeAssertions*/ true ); - return expr.kind === 208 /* ArrayLiteralExpression */ && expr.elements.length === 0; + return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0; } function addOptionality(type, isProperty = false, isOptional = true) { return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type; } function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) { - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 248 /* ForInStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForInStatement */) { const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression( declaration.parent.parent.expression, /*checkMode*/ @@ -53420,7 +53870,7 @@ ${lanes.join("\n")} ))); return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { const forOfStatement = declaration.parent.parent; return checkRightHandSideOfForOf(forOfStatement) || anyType; } @@ -53439,8 +53889,8 @@ ${lanes.join("\n")} if (declaredType) { return addOptionality(declaredType, isProperty, isOptional); } - if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlags(declaration) & 1 /* Export */) && !(declaration.flags & 16777216 /* Ambient */)) { - if (!(getCombinedNodeFlags(declaration) & 2 /* Const */) && (!declaration.initializer || isNullOrUndefined3(declaration.initializer))) { + if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 1 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { + if (!(getCombinedNodeFlagsCached(declaration) & 6 /* Constant */) && (!declaration.initializer || isNullOrUndefined3(declaration.initializer))) { return autoType; } if (declaration.initializer && isEmptyArrayLiteral2(declaration.initializer)) { @@ -53449,8 +53899,8 @@ ${lanes.join("\n")} } if (isParameter(declaration)) { const func = declaration.parent; - if (func.kind === 177 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 176 /* GetAccessor */); + if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) { + const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 177 /* GetAccessor */); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); const thisParameter = getAccessorThisParameter(func); @@ -53524,7 +53974,7 @@ ${lanes.join("\n")} const links = getSymbolLinks(symbol); if (links.isConstructorDeclaredProperty === void 0) { links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 211 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( /*declaredType*/ void 0, declaration, @@ -53552,7 +54002,7 @@ ${lanes.join("\n")} /*includeClassComputedPropertyName*/ false ); - if (container && (container.kind === 175 /* Constructor */ || isJSConstructor(container))) { + if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) { return container; } } @@ -53579,7 +54029,7 @@ ${lanes.join("\n")} reference.flowNode = staticBlock.returnFlowNode; const flowType = getFlowTypeOfProperty(reference, symbol); if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) { - error(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); + error2(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); } if (everyType(flowType, isNullableType)) { continue; @@ -53595,7 +54045,7 @@ ${lanes.join("\n")} reference.flowNode = constructor.returnFlowNode; const flowType = getFlowTypeOfProperty(reference, symbol); if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) { - error(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); + error2(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); } return everyType(flowType, isNullableType) ? void 0 : convertAutoToAny(flowType); } @@ -53667,7 +54117,7 @@ ${lanes.join("\n")} false, definedInMethod && !definedInConstructor )); - if (symbol.valueDeclaration && filterType(widened, (t) => !!(t.flags & ~98304 /* Nullable */)) === neverType) { + if (symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && filterType(widened, (t) => !!(t.flags & ~98304 /* Nullable */)) === neverType) { reportImplicitAny(symbol.valueDeclaration, anyType); return anyType; } @@ -53770,11 +54220,11 @@ ${lanes.join("\n")} const unescapedName = unescapeLeadingUnderscores(s.escapedName); const exportedMemberName = ((_a = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a.name) || exportedMember.valueDeclaration; addRelatedInfo( - error(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName), + error2(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName), createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here, unescapedName) ); addRelatedInfo( - error(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName), + error2(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName), createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here, unescapedName) ); } @@ -53832,7 +54282,7 @@ ${lanes.join("\n")} /*includeClassComputedPropertyName*/ false ); - return thisContainer.kind === 175 /* Constructor */ || thisContainer.kind === 261 /* FunctionDeclaration */ || thisContainer.kind === 217 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); + return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 262 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); } function getConstructorDefinedThisAssignmentTypes(types, declarations) { Debug.assert(types.length === declarations.length); @@ -53906,7 +54356,7 @@ ${lanes.join("\n")} function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { const elements = pattern.elements; const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 207 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; + const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; if (elements.length === 0 || elements.length === 1 && restElement) { return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; } @@ -53922,7 +54372,7 @@ ${lanes.join("\n")} return result; } function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 205 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); + return pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); } function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration( @@ -53963,7 +54413,7 @@ ${lanes.join("\n")} } function declarationBelongsToPrivateAmbientMember(declaration) { const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 168 /* Parameter */ ? root.parent : root; + const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root; return isPrivateWithinAmbient(memberDeclaration); } function tryGetTypeFromEffectiveTypeNode(node) { @@ -54037,7 +54487,7 @@ ${lanes.join("\n")} return reportCircularityError(symbol); } let type; - if (declaration.kind === 276 /* ExportAssignment */) { + if (declaration.kind === 277 /* ExportAssignment */) { type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) { type = getWidenedTypeForAssignmentDeclaration(symbol); @@ -54078,13 +54528,13 @@ ${lanes.join("\n")} function getAnnotatedAccessorTypeNode(accessor) { if (accessor) { switch (accessor.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); return getterTypeAnnotation; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); return setterTypeAnnotation; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: Debug.assert(hasAccessorModifier(accessor)); const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); return accessorTypeAnnotation; @@ -54109,9 +54559,9 @@ ${lanes.join("\n")} if (!pushTypeResolution(symbol, 0 /* Type */)) { return errorType; } - const getter = getDeclarationOfKind(symbol, 176 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); + const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration( accessor, /*reportErrors*/ @@ -54129,13 +54579,13 @@ ${lanes.join("\n")} } if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(getter)) { - error(getter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(getter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } else if (getAnnotatedAccessorTypeNode(setter)) { - error(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } else if (getAnnotatedAccessorTypeNode(accessor)) { - error(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } else if (getter && noImplicitAny) { - error(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); + error2(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } type = anyType; } @@ -54149,11 +54599,11 @@ ${lanes.join("\n")} if (!pushTypeResolution(symbol, 8 /* WriteType */)) { return errorType; } - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 171 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); let writeType = getAnnotatedAccessorType(setter); if (!popTypeResolution()) { if (getAnnotatedAccessorTypeNode(setter)) { - error(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); } writeType = anyType; } @@ -54189,7 +54639,7 @@ ${lanes.join("\n")} const declaration = symbol.valueDeclaration; if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { return anyType; - } else if (declaration && (declaration.kind === 225 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 225 /* BinaryExpression */)) { + } else if (declaration && (declaration.kind === 226 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 226 /* BinaryExpression */)) { return getWidenedTypeForAssignmentDeclaration(symbol); } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { const resolvedModule = resolveExternalModuleSymbol(symbol); @@ -54231,7 +54681,7 @@ ${lanes.join("\n")} true ); const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0); - links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getAllSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; + links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; } return links.type; } @@ -54246,15 +54696,15 @@ ${lanes.join("\n")} function reportCircularityError(symbol) { const declaration = symbol.valueDeclaration; if (getEffectiveTypeAnnotationNode(declaration)) { - error( + error2( symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol) ); return errorType; } - if (noImplicitAny && (declaration.kind !== 168 /* Parameter */ || declaration.initializer)) { - error( + if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { + error2( symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol) @@ -54367,43 +54817,43 @@ ${lanes.join("\n")} return void 0; } switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 323 /* JSDocFunctionType */: - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 264 /* TypeAliasDeclaration */: - case 351 /* JSDocTemplateTag */: - case 352 /* JSDocTypedefTag */: - case 346 /* JSDocEnumTag */: - case 344 /* JSDocCallbackTag */: - case 199 /* MappedType */: - case 193 /* ConditionalType */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 324 /* JSDocFunctionType */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 265 /* TypeAliasDeclaration */: + case 352 /* JSDocTemplateTag */: + case 353 /* JSDocTypedefTag */: + case 347 /* JSDocEnumTag */: + case 345 /* JSDocCallbackTag */: + case 200 /* MappedType */: + case 194 /* ConditionalType */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 199 /* MappedType */) { + if (node.kind === 200 /* MappedType */) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))); - } else if (node.kind === 193 /* ConditionalType */) { + } else if (node.kind === 194 /* ConditionalType */) { return concatenate(outerTypeParameters, getInferTypeParameters(node)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */ || node.kind === 263 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; + const thisType = includeThisTypes && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || node.kind === 264 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: const paramSymbol = getParameterSymbolFromJSDoc(node); if (paramSymbol) { node = paramSymbol.valueDeclaration; } break; - case 326 /* JSDoc */: { + case 327 /* JSDoc */: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; } @@ -54413,14 +54863,14 @@ ${lanes.join("\n")} function getOuterTypeParametersOfClassOrInterface(symbol) { var _a; const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a = symbol.declarations) == null ? void 0 : _a.find((decl) => { - if (decl.kind === 263 /* InterfaceDeclaration */) { + if (decl.kind === 264 /* InterfaceDeclaration */) { return true; } - if (decl.kind !== 259 /* VariableDeclaration */) { + if (decl.kind !== 260 /* VariableDeclaration */) { return false; } const initializer = decl.initializer; - return !!initializer && (initializer.kind === 217 /* FunctionExpression */ || initializer.kind === 218 /* ArrowFunction */); + return !!initializer && (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 219 /* ArrowFunction */); }); Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); return getOuterTypeParameters(declaration); @@ -54431,7 +54881,7 @@ ${lanes.join("\n")} } let result; for (const node of symbol.declarations) { - if (node.kind === 263 /* InterfaceDeclaration */ || node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { const declaration = node; result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); } @@ -54499,11 +54949,11 @@ ${lanes.join("\n")} resolveStructuredTypeMembers(baseConstructorType); } if (!popTypeResolution()) { - error(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol)); + error2(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol)); return type.resolvedBaseConstructorType = errorType; } if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) { - const err = error(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType)); + const err = error2(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType)); if (baseConstructorType.flags & 262144 /* TypeParameter */) { const constraint = getConstraintFromTypeParameter(baseConstructorType); let ctorReturn = unknownType; @@ -54545,7 +54995,7 @@ ${lanes.join("\n")} return resolvedImplementsTypes; } function reportCircularBaseType(node, type) { - error(node, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( + error2(node, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( type, /*enclosingDeclaration*/ void 0, @@ -54569,7 +55019,7 @@ ${lanes.join("\n")} } if (!popTypeResolution() && type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 262 /* ClassDeclaration */ || declaration.kind === 263 /* InterfaceDeclaration */) { + if (declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 264 /* InterfaceDeclaration */) { reportCircularBaseType(declaration, type); } } @@ -54599,7 +55049,7 @@ ${lanes.join("\n")} } else { const constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments, baseTypeNode); if (!constructors.length) { - error(baseTypeNode.expression, Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); + error2(baseTypeNode.expression, Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); return type.resolvedBaseTypes = emptyArray; } baseType = getReturnTypeOfSignature(constructors[0]); @@ -54619,7 +55069,7 @@ ${lanes.join("\n")} return type.resolvedBaseTypes = emptyArray; } if (type === reducedBaseType || hasBaseType(reducedBaseType, type)) { - error( + error2( type.symbol.valueDeclaration, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( @@ -54658,7 +55108,7 @@ ${lanes.join("\n")} type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; if (type.symbol.declarations) { for (const declaration of type.symbol.declarations) { - if (declaration.kind === 263 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 264 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { for (const node of getInterfaceBaseTypeNodes(declaration)) { const baseType = getReducedType(getTypeFromTypeNode(node)); if (!isErrorType(baseType)) { @@ -54673,7 +55123,7 @@ ${lanes.join("\n")} reportCircularBaseType(declaration, type); } } else { - error(node, Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members); + error2(node, Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members); } } } @@ -54686,8 +55136,8 @@ ${lanes.join("\n")} return true; } for (const declaration of symbol.declarations) { - if (declaration.kind === 263 /* InterfaceDeclaration */) { - if (declaration.flags & 128 /* ContainsThis */) { + if (declaration.kind === 264 /* InterfaceDeclaration */) { + if (declaration.flags & 256 /* ContainsThis */) { return false; } const baseTypeNodes = getInterfaceBaseTypeNodes(declaration); @@ -54758,10 +55208,10 @@ ${lanes.join("\n")} } } else { type = errorType; - if (declaration.kind === 346 /* JSDocEnumTag */) { - error(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + if (declaration.kind === 347 /* JSDocEnumTag */) { + error2(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } else { - error(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); + error2(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); } } links.declaredType = type; @@ -54777,7 +55227,7 @@ ${lanes.join("\n")} const memberTypeList = []; if (symbol.declarations) { for (const declaration of symbol.declarations) { - if (declaration.kind === 265 /* EnumDeclaration */) { + if (declaration.kind === 266 /* EnumDeclaration */) { for (const member of declaration.members) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); @@ -54862,18 +55312,18 @@ ${lanes.join("\n")} case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: case 151 /* ObjectKeyword */: case 116 /* VoidKeyword */: case 157 /* UndefinedKeyword */: case 146 /* NeverKeyword */: - case 200 /* LiteralType */: + case 201 /* LiteralType */: return true; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return isThislessType(node.elementType); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return !node.typeArguments || node.typeArguments.every(isThislessType); } return false; @@ -54889,21 +55339,21 @@ ${lanes.join("\n")} function isThislessFunctionLikeDeclaration(node) { const returnType = getEffectiveReturnTypeNode(node); const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 175 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); + return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); } function isThisless(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { const declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return isThislessVariableLikeDeclaration(declaration); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return isThislessFunctionLikeDeclaration(declaration); } } @@ -54946,9 +55396,6 @@ ${lanes.join("\n")} } return type; } - function isTypeUsableAsPropertyName(type) { - return !!(type.flags & 8576 /* StringOrNumberLiteralOrUnique */); - } function isLateBindableName(node) { if (!isComputedPropertyName(node) && !isElementAccessExpression(node)) { return false; @@ -54969,15 +55416,6 @@ ${lanes.join("\n")} function isNonBindableDynamicName(node) { return isDynamicName(node) && !isLateBindableName(node); } - function getPropertyNameFromType(type) { - if (type.flags & 8192 /* UniqueESSymbol */) { - return type.escapedName; - } - if (type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { - return escapeLeadingUnderscores("" + type.value); - } - return Debug.fail(); - } function addDeclarationToLateBoundSymbol(symbol, member, symbolFlags) { Debug.assert(!!(getCheckFlags(symbol) & 4096 /* Late */), "Expected a late-bound symbol."); symbol.flags |= symbolFlags; @@ -55010,8 +55448,8 @@ ${lanes.join("\n")} if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) { const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations; const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName); - forEach(declarations, (declaration) => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name)); - error(declName || decl, Diagnostics.Duplicate_property_0, name); + forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name)); + error2(declName || decl, Diagnostics.Duplicate_property_0, name); lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */); } lateSymbol.links.nameType = type; @@ -55027,6 +55465,7 @@ ${lanes.join("\n")} return links.resolvedSymbol; } function getResolvedMembersOrExportsOfSymbol(symbol, resolutionKind) { + var _a, _b, _c; const links = getSymbolLinks(symbol); if (!links[resolutionKind]) { const isStatic2 = resolutionKind === "resolvedExports" /* resolvedExports */; @@ -55045,7 +55484,7 @@ ${lanes.join("\n")} } } } - const assignments = symbol.assignmentDeclarationMembers; + const assignments = (((_a = symbol.valueDeclaration) == null ? void 0 : _a.kind) === 219 /* ArrowFunction */ || ((_b = symbol.valueDeclaration) == null ? void 0 : _b.kind) === 218 /* FunctionExpression */) && ((_c = getSymbolOfNode(symbol.valueDeclaration.parent)) == null ? void 0 : _c.assignmentDeclarationMembers) || symbol.assignmentDeclarationMembers; if (assignments) { const decls = arrayFrom(assignments.values()); for (const member of decls) { @@ -55174,7 +55613,7 @@ ${lanes.join("\n")} /*resolvedTypePredicate*/ void 0, sig.minArgumentCount, - sig.flags & 39 /* PropagatingFlags */ + sig.flags & 167 /* PropagatingFlags */ ); result.target = sig.target; result.mapper = sig.mapper; @@ -55212,17 +55651,18 @@ ${lanes.join("\n")} function getExpandedParameters(sig, skipUnionExpanding) { if (signatureHasRestParameter(sig)) { const restIndex = sig.parameters.length - 1; + const restName = sig.parameters[restIndex].escapedName; const restType = getTypeOfSymbol(sig.parameters[restIndex]); if (isTupleType(restType)) { - return [expandSignatureParametersWithTupleMembers(restType, restIndex)]; + return [expandSignatureParametersWithTupleMembers(restType, restIndex, restName)]; } else if (!skipUnionExpanding && restType.flags & 1048576 /* Union */ && every(restType.types, isTupleType)) { - return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex)); + return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex, restName)); } } return [sig.parameters]; - function expandSignatureParametersWithTupleMembers(restType, restIndex) { - const elementTypes = getElementTypes(restType); - const associatedNames = getUniqAssociatedNamesFromTupleType(restType); + function expandSignatureParametersWithTupleMembers(restType, restIndex, restName) { + const elementTypes = getTypeArguments(restType); + const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restName); const restParams = map(elementTypes, (t, i) => { const name = associatedNames && associatedNames[i] ? associatedNames[i] : getParameterNameAtPosition(sig, restIndex + i, restType); const flags = restType.target.elementFlags[i]; @@ -55233,10 +55673,10 @@ ${lanes.join("\n")} }); return concatenate(sig.parameters.slice(0, restIndex), restParams); } - function getUniqAssociatedNamesFromTupleType(type) { + function getUniqAssociatedNamesFromTupleType(type, restName) { const associatedNamesMap = /* @__PURE__ */ new Map(); - return map(type.target.labeledElementDeclarations, (labeledElement) => { - const name = getTupleElementLabel(labeledElement); + return map(type.target.labeledElementDeclarations, (labeledElement, i) => { + const name = getTupleElementLabel(labeledElement, i, restName); const prevCounter = associatedNamesMap.get(name); if (prevCounter === void 0) { associatedNamesMap.set(name, 1); @@ -55474,7 +55914,7 @@ ${lanes.join("\n")} /*resolvedTypePredicate*/ void 0, minArgCount, - (left.flags | right.flags) & 39 /* PropagatingFlags */ + (left.flags | right.flags) & 167 /* PropagatingFlags */ ); result.compositeKind = 1048576 /* Union */; result.compositeSignatures = concatenate(left.compositeKind !== 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); @@ -55622,20 +56062,17 @@ ${lanes.join("\n")} setStructuredTypeMembers(type, members2, callSignatures, constructSignatures, indexInfos2); return; } - let members = emptySymbols; + let members = getExportsOfSymbol(symbol); let indexInfos; - if (symbol.exports) { - members = getExportsOfSymbol(symbol); - if (symbol === globalThisSymbol) { - const varsOnly = /* @__PURE__ */ new Map(); - members.forEach((p) => { - var _a; - if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) { - varsOnly.set(p.escapedName, p); - } - }); - members = varsOnly; - } + if (symbol === globalThisSymbol) { + const varsOnly = /* @__PURE__ */ new Map(); + members.forEach((p) => { + var _a; + if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) { + varsOnly.set(p.escapedName, p); + } + }); + members = varsOnly; } let baseConstructorIndexInfo; setStructuredTypeMembers(type, members, emptyArray, emptyArray, emptyArray); @@ -55684,7 +56121,7 @@ ${lanes.join("\n")} /*resolvedTypePredicate*/ void 0, sig.minArgumentCount, - sig.flags & 39 /* PropagatingFlags */ + sig.flags & 167 /* PropagatingFlags */ ) : void 0 )); } @@ -55851,7 +56288,7 @@ ${lanes.join("\n")} true ) : symbol.links.checkFlags & 524288 /* StripOptional */ ? removeMissingOrUndefinedType(propType) : propType; if (!popTypeResolution()) { - error(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType)); + error2(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType)); type = errorType; } symbol.links.type = type; @@ -55880,7 +56317,7 @@ ${lanes.join("\n")} } function isMappedTypeWithKeyofConstraintDeclaration(type) { const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 197 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; + return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; } function getModifiersTypeFromMappedType(type) { if (!type.modifiersType) { @@ -56035,9 +56472,9 @@ ${lanes.join("\n")} function getConstraintOfTypeParameter(typeParameter) { return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0; } - function isConstTypeVariable(type) { + function isConstTypeVariable(type, depth = 0) { var _a; - return !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, isConstTypeVariable) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type)) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0)); + return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); } function getConstraintOfIndexedAccess(type) { return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0; @@ -56177,7 +56614,7 @@ ${lanes.join("\n")} if (t.flags & 262144 /* TypeParameter */) { const errorNode = getConstraintDeclaration(t); if (errorNode) { - const diagnostic = error(errorNode, Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(t)); + const diagnostic = error2(errorNode, Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(t)); if (currentNode && !isNodeDescendantOf(errorNode, currentNode) && !isNodeDescendantOf(currentNode, errorNode)) { addRelatedInfo(diagnostic, createDiagnosticForNode(currentNode, Diagnostics.Circularity_originates_in_type_at_this_location)); } @@ -56594,7 +57031,35 @@ ${lanes.join("\n")} return emptyArray; } function getSignaturesOfType(type, kind) { - return getSignaturesOfStructuredType(getReducedApparentType(type), kind); + const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind); + if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) { + if (type.arrayFallbackSignatures) { + return type.arrayFallbackSignatures; + } + let memberName; + if (everyType(type, (t) => { + var _a; + return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName); + })) { + const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper)); + const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent))); + return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind); + } + type.arrayFallbackSignatures = result; + } + return result; + } + function isArrayOrTupleSymbol(symbol) { + if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) { + return false; + } + return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); + } + function isReadonlyArraySymbol(symbol) { + if (!symbol || !globalReadonlyArrayType.symbol) { + return false; + } + return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); } function findIndexInfo(indexInfos, keyType) { return find(indexInfos, (info) => info.keyType === keyType); @@ -56773,7 +57238,7 @@ ${lanes.join("\n")} } else { parameters.push(paramSymbol); } - if (type && type.kind === 200 /* LiteralType */) { + if (type && type.kind === 201 /* LiteralType */) { flags |= 2 /* HasLiteralTypes */; } const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); @@ -56781,8 +57246,8 @@ ${lanes.join("\n")} minArgumentCount = parameters.length; } } - if ((declaration.kind === 176 /* GetAccessor */ || declaration.kind === 177 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 176 /* GetAccessor */ ? 177 /* SetAccessor */ : 176 /* GetAccessor */; + if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { + const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind); if (other) { thisParameter = getAnnotatedAccessorThisParameter(other); @@ -56873,15 +57338,15 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - return node.name.kind === 166 /* ComputedPropertyName */ && traverse(node.name); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name); + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return traverse(node.expression); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return traverse(node.initializer); default: return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); @@ -56968,7 +57433,7 @@ ${lanes.join("\n")} function createTypePredicateFromTypePredicateNode(node, signature) { const parameterName = node.parameterName; const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 196 /* ThisType */ ? createTypePredicate( + return parameterName.kind === 197 /* ThisType */ ? createTypePredicate( node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, /*parameterName*/ void 0, @@ -57000,14 +57465,14 @@ ${lanes.join("\n")} if (signature.declaration) { const typeNode = getEffectiveReturnTypeNode(signature.declaration); if (typeNode) { - error(typeNode, Diagnostics.Return_type_annotation_circularly_references_itself); + error2(typeNode, Diagnostics.Return_type_annotation_circularly_references_itself); } else if (noImplicitAny) { const declaration = signature.declaration; const name = getNameOfDeclaration(declaration); if (name) { - error(name, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, declarationNameToString(name)); + error2(name, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, declarationNameToString(name)); } else { - error(declaration, Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); + error2(declaration, Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); } } } @@ -57018,7 +57483,7 @@ ${lanes.join("\n")} return signature.resolvedReturnType; } function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 175 /* Constructor */) { + if (declaration.kind === 176 /* Constructor */) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); } const typeNode = getEffectiveReturnTypeNode(declaration); @@ -57034,12 +57499,12 @@ ${lanes.join("\n")} if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === 176 /* GetAccessor */ && hasBindableName(declaration)) { + if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; } - const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 177 /* SetAccessor */); + const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 178 /* SetAccessor */); const setterType = getAnnotatedAccessorType(setter); if (setterType) { return setterType; @@ -57048,7 +57513,7 @@ ${lanes.join("\n")} return getReturnTypeOfTypeTag(declaration); } function isResolvingReturnTypeOfSignature(signature) { - return !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0; + return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0; } function getRestTypeOfSignature(signature) { return tryGetRestTypeOfSignature(signature) || anyType; @@ -57142,7 +57607,7 @@ ${lanes.join("\n")} var _a; if (!signature.isolatedSignatureType) { const kind = (_a = signature.declaration) == null ? void 0 : _a.kind; - const isConstructor = kind === void 0 || kind === 175 /* Constructor */ || kind === 179 /* ConstructSignature */ || kind === 184 /* ConstructorType */; + const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */; const type = createObjectType(16 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; @@ -57201,9 +57666,9 @@ ${lanes.join("\n")} let inferences; if ((_a = typeParameter.symbol) == null ? void 0 : _a.declarations) { for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 194 /* InferType */) { + if (declaration.parent.kind === 195 /* InferType */) { const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 182 /* TypeReference */ && !omitTypeReferences) { + if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference); if (typeParameters) { @@ -57221,13 +57686,13 @@ ${lanes.join("\n")} } } } - } else if (grandParent.kind === 168 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 190 /* RestType */ || grandParent.kind === 201 /* NamedTupleMember */ && grandParent.dotDotDotToken) { + } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 203 /* TemplateLiteralTypeSpan */) { + } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) { inferences = append(inferences, stringType); - } else if (grandParent.kind === 167 /* TypeParameter */ && grandParent.parent.kind === 199 /* MappedType */) { + } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) { inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 199 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 193 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 199 /* MappedType */ && grandParent.parent.checkType.type) { + } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); inferences = append(inferences, instantiateType( @@ -57252,7 +57717,7 @@ ${lanes.join("\n")} } else { let type = getTypeFromTypeNode(constraintDeclaration); if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 199 /* MappedType */ ? keyofConstraintType : unknownType; + type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? keyofConstraintType : unknownType; } typeParameter.constraint = type; } @@ -57261,7 +57726,7 @@ ${lanes.join("\n")} return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 167 /* TypeParameter */); + const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */); const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; return host2 && getSymbolOfNode(host2); } @@ -57346,12 +57811,12 @@ ${lanes.join("\n")} return ((_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray; } const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 182 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 187 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); if (popTypeResolution()) { type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; } else { type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray; - error( + error2( type.node || currentNode, type.target.symbol ? Diagnostics.Type_arguments_for_0_circularly_reference_themselves : Diagnostics.Tuple_type_arguments_circularly_reference_themselves, type.target.symbol && symbolToString(type.target.symbol) @@ -57380,12 +57845,12 @@ ${lanes.join("\n")} void 0, 2 /* WriteArrayAsGenericType */ ); - error(node, diag2, typeStr, minTypeArgumentCount, typeParameters.length); + error2(node, diag2, typeStr, minTypeArgumentCount, typeParameters.length); if (!isJs) { return errorType; } } - if (node.kind === 182 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { + if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { return createDeferredTypeReference( type, node, @@ -57436,7 +57901,7 @@ ${lanes.join("\n")} const numTypeArguments = length(node.typeArguments); const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters); if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) { - error( + error2( node, minTypeArgumentCount === typeParameters.length ? Diagnostics.Generic_type_0_requires_1_type_argument_s : Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, symbolToString(symbol), @@ -57476,9 +57941,9 @@ ${lanes.join("\n")} } function getTypeReferenceName(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: const expr = node.expression; if (isEntityNameExpression(expr)) { return expr; @@ -57490,10 +57955,10 @@ ${lanes.join("\n")} return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; } function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 165 /* QualifiedName */ ? name.right : name.kind === 210 /* PropertyAccessExpression */ ? name.name : name; + const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name; const text = identifier.escapedText; if (text) { - const parentSymbol = name.kind === 165 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 210 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; + const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; let result = unresolvedSymbols.get(path); if (!result) { @@ -57545,7 +58010,7 @@ ${lanes.join("\n")} const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 204 /* ImportType */ && node.qualifier; + const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier; if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } @@ -57573,7 +58038,7 @@ ${lanes.join("\n")} return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); } function isUnaryTupleTypeNode(node) { - return node.kind === 188 /* TupleType */ && node.elements.length === 1; + return node.kind === 189 /* TupleType */ && node.elements.length === 1; } function getImpliedConstraint(type, checkNode, extendsNode) { return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0; @@ -57581,17 +58046,17 @@ ${lanes.join("\n")} function getConditionalFlowTypeOfType(type, node) { let constraints; let covariant = true; - while (node && !isStatement(node) && node.kind !== 326 /* JSDoc */) { + while (node && !isStatement(node) && node.kind !== 327 /* JSDoc */) { const parent2 = node.parent; - if (parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 169 /* Parameter */) { covariant = !covariant; } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 193 /* ConditionalType */ && node === parent2.trueType) { + if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 194 /* ConditionalType */ && node === parent2.trueType) { const constraint = getImpliedConstraint(type, parent2.checkType, parent2.extendsType); if (constraint) { constraints = append(constraints, constraint); } - } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 199 /* MappedType */ && node === parent2.type) { + } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && node === parent2.type) { const mappedType = getTypeFromTypeNode(parent2); if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { const typeParameter = getHomomorphicTypeVariable(mappedType); @@ -57608,11 +58073,11 @@ ${lanes.join("\n")} return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; } function isJSDocTypeReference(node) { - return !!(node.flags & 8388608 /* JSDoc */) && (node.kind === 182 /* TypeReference */ || node.kind === 204 /* ImportType */); + return !!(node.flags & 16777216 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */); } function checkNoTypeArguments(node, symbol) { if (node.typeArguments) { - error(node, Diagnostics.Type_0_is_not_generic, symbol ? symbolToString(symbol) : node.typeName ? declarationNameToString(node.typeName) : anon); + error2(node, Diagnostics.Type_0_is_not_generic, symbol ? symbolToString(symbol) : node.typeName ? declarationNameToString(node.typeName) : anon); return false; } return true; @@ -57731,9 +58196,9 @@ ${lanes.join("\n")} if (declarations) { for (const declaration of declarations) { switch (declaration.kind) { - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: return declaration; } } @@ -57744,11 +58209,11 @@ ${lanes.join("\n")} } const type = getDeclaredTypeOfSymbol(symbol); if (!(type.flags & 524288 /* Object */)) { - error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbolName(symbol)); + error2(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbolName(symbol)); return arity ? emptyGenericType : emptyObjectType; } if (length(type.typeParameters) !== arity) { - error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); + error2(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); return arity ? emptyGenericType : emptyObjectType; } return type; @@ -57765,7 +58230,7 @@ ${lanes.join("\n")} getDeclaredTypeOfSymbol(symbol); if (length(getSymbolLinks(symbol).typeParameters) !== arity) { const decl = symbol.declarations && find(symbol.declarations, isTypeAliasDeclaration); - error(decl, Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); + error2(decl, Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); return void 0; } } @@ -57961,6 +58426,22 @@ ${lanes.join("\n")} reportErrors2 )) || emptyGenericType; } + function getGlobalDisposableType(reportErrors2) { + return deferredGlobalDisposableType || (deferredGlobalDisposableType = getGlobalType( + "Disposable", + /*arity*/ + 0, + reportErrors2 + )) || emptyObjectType; + } + function getGlobalAsyncDisposableType(reportErrors2) { + return deferredGlobalAsyncDisposableType || (deferredGlobalAsyncDisposableType = getGlobalType( + "AsyncDisposable", + /*arity*/ + 0, + reportErrors2 + )) || emptyObjectType; + } function getGlobalTypeOrUndefined(name, arity = 0) { const symbol = getGlobalSymbol( name, @@ -58106,11 +58587,11 @@ ${lanes.join("\n")} } function getTupleElementFlags(node) { switch (node.kind) { - case 189 /* OptionalType */: + case 190 /* OptionalType */: return 2 /* Optional */; - case 190 /* RestType */: + case 191 /* RestType */: return getRestTypeElementFlags(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; default: return 1 /* Required */; @@ -58126,60 +58607,57 @@ ${lanes.join("\n")} return readonly ? globalReadonlyArrayType : globalArrayType; } const elementFlags = map(node.elements, getTupleElementFlags); - const missingName = some(node.elements, (e) => e.kind !== 201 /* NamedTupleMember */); - return getTupleTargetType( - elementFlags, - readonly, - /*associatedNames*/ - missingName ? void 0 : node.elements - ); + return getTupleTargetType(elementFlags, readonly, map(node.elements, memberIfLabeledElementDeclaration)); + } + function memberIfLabeledElementDeclaration(member) { + return isNamedTupleMember(member) || isParameter(member) ? member : void 0; } function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 187 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 188 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); + return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); } function isResolvedByTypeAlias(node) { const parent2 = node.parent; switch (parent2.kind) { - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: - case 182 /* TypeReference */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 198 /* IndexedAccessType */: - case 193 /* ConditionalType */: - case 197 /* TypeOperator */: - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: + case 183 /* TypeReference */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 199 /* IndexedAccessType */: + case 194 /* ConditionalType */: + case 198 /* TypeOperator */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return isResolvedByTypeAlias(parent2); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; } return false; } function mayResolveTypeAlias(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return true; - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 195 /* ParenthesizedType */: - case 189 /* OptionalType */: - case 201 /* NamedTupleMember */: - case 322 /* JSDocOptionalType */: - case 320 /* JSDocNullableType */: - case 321 /* JSDocNonNullableType */: - case 315 /* JSDocTypeExpression */: + case 196 /* ParenthesizedType */: + case 190 /* OptionalType */: + case 202 /* NamedTupleMember */: + case 323 /* JSDocOptionalType */: + case 321 /* JSDocNullableType */: + case 322 /* JSDocNonNullableType */: + case 316 /* JSDocTypeExpression */: return mayResolveTypeAlias(node.type); - case 190 /* RestType */: - return node.type.kind !== 187 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 191 /* RestType */: + return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); + case 192 /* UnionType */: + case 193 /* IntersectionType */: return some(node.types, mayResolveTypeAlias); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); } return false; @@ -58190,15 +58668,15 @@ ${lanes.join("\n")} const target = getArrayOrTupleTargetType(node); if (target === emptyGenericType) { links.resolvedType = emptyObjectType; - } else if (!(node.kind === 188 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 188 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( + } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { + links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( target, node, /*mapper*/ void 0 ); } else { - const elementTypes = node.kind === 187 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); + const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); links.resolvedType = createNormalizedTypeReference(target, elementTypes); } } @@ -58207,7 +58685,7 @@ ${lanes.join("\n")} function isReadonlyTypeOperator(node) { return isTypeOperatorNode(node) && node.operator === 148 /* ReadonlyKeyword */; } - function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations) { + function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations = []) { const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, (_) => 1 /* Required */), readonly, namedMemberDeclarations); return tupleTarget === emptyGenericType ? emptyObjectType : elementTypes.length ? createNormalizedTypeReference(tupleTarget, elementTypes) : tupleTarget; } @@ -58215,7 +58693,8 @@ ${lanes.join("\n")} if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) { return readonly ? globalReadonlyArrayType : globalArrayType; } - const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (namedMemberDeclarations && namedMemberDeclarations.length ? "," + map(namedMemberDeclarations, getNodeId).join(",") : ""); + const memberIds = mapDefined(namedMemberDeclarations, (node) => node ? getNodeId(node) : void 0); + const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : ""); let type = tupleTypes.get(key); if (!type) { tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations)); @@ -58297,7 +58776,7 @@ ${lanes.join("\n")} } const expandedTypes = []; const expandedFlags = []; - let expandedDeclarations = []; + const expandedDeclarations = []; let lastRequiredIndex = -1; let firstRestIndex = -1; let lastOptionalOrRestIndex = -1; @@ -58310,7 +58789,7 @@ ${lanes.join("\n")} } else if (isTupleType(type)) { const elements = getElementTypes(type); if (elements.length + expandedTypes.length >= 1e4) { - error(currentNode, isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent); + error2(currentNode, isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent); return errorType; } forEach(elements, (t, n) => { @@ -58335,7 +58814,7 @@ ${lanes.join("\n")} )); expandedTypes.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedFlags.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); - expandedDeclarations == null ? void 0 : expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); + expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); } const tupleTarget = getTupleTargetType(expandedFlags, target.readonly, expandedDeclarations); return tupleTarget === emptyGenericType ? emptyObjectType : expandedFlags.length ? createTypeReference(tupleTarget, expandedTypes) : tupleTarget; @@ -58355,11 +58834,7 @@ ${lanes.join("\n")} true ) : type); expandedFlags.push(flags); - if (expandedDeclarations && declaration) { - expandedDeclarations.push(declaration); - } else { - expandedDeclarations = void 0; - } + expandedDeclarations.push(declaration); } } function sliceTupleType(type, index, endSkipCount = 0) { @@ -58386,6 +58861,9 @@ ${lanes.join("\n")} function getEndElementCount(type, flags) { return type.elementFlags.length - findLastIndex(type.elementFlags, (f) => !(f & flags)) - 1; } + function getTotalFixedElementCount(type) { + return type.fixedLength + getEndElementCount(type, 3 /* Fixed */); + } function getElementTypes(type) { const typeArguments = getTypeArguments(type); const arity = getTypeReferenceArity(type); @@ -58475,7 +58953,7 @@ ${lanes.join("\n")} const estimatedCount = count / (len - i) * len; if (estimatedCount > 1e6) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "removeSubtypes_DepthLimit", { typeIds: types.map((t) => t.id) }); - error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); + error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); return void 0; } } @@ -58884,7 +59362,7 @@ ${lanes.join("\n")} const size = getCrossProductUnionSize(types); if (size >= 1e5) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkCrossProductUnion_DepthLimit", { typeIds: types.map((t) => t.id), size }); - error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); + error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); return false; } return true; @@ -59236,12 +59714,12 @@ ${lanes.join("\n")} if (isCallLikeExpression(parent2)) { return isCallOrNewExpression(parent2) && isIdentifier(node) && hasMatchingArgument(parent2, node); } - return every(symbol.declarations, (d) => !isFunctionLike(d) || !!(getCombinedNodeFlags(d) & 268435456 /* Deprecated */)); + return every(symbol.declarations, (d) => !isFunctionLike(d) || isDeprecatedDeclaration2(d)); } return true; } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { - const accessExpression = accessNode && accessNode.kind === 211 /* ElementAccessExpression */ ? accessNode : void 0; + const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0; const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); if (propName !== void 0) { if (accessFlags & 256 /* Contextual */) { @@ -59256,7 +59734,7 @@ ${lanes.join("\n")} if (accessExpression) { markPropertyAsReferenced(prop, accessExpression, isSelfTypeAccess(accessExpression.expression, objectType.symbol)); if (isAssignmentToReadonlyEntity(accessExpression, prop, getAssignmentTargetKind(accessExpression))) { - error(accessExpression.argumentExpression, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(prop)); + error2(accessExpression.argumentExpression, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(prop)); return void 0; } if (accessFlags & 8 /* CacheSymbol */) { @@ -59275,10 +59753,10 @@ ${lanes.join("\n")} const indexNode = getIndexNodeForAccessExpression(accessNode); if (isTupleType(objectType)) { if (index < 0) { - error(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); + error2(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); return undefinedType; } - error( + error2( indexNode, Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), @@ -59286,15 +59764,12 @@ ${lanes.join("\n")} unescapeLeadingUnderscores(propName) ); } else { - error(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); + error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); } } if (index >= 0) { errorIfWritingToReadonlyIndex(getIndexInfoOfType(objectType, numberType)); - return mapType(objectType, (t) => { - const restType = getRestTypeOfTupleType(t) || undefinedType; - return accessFlags & 1 /* IncludeUndefined */ ? getUnionType([restType, missingType]) : restType; - }); + return getTupleElementTypeOutOfStartCount(objectType, index, accessFlags & 1 /* IncludeUndefined */ ? missingType : void 0); } } } @@ -59306,13 +59781,13 @@ ${lanes.join("\n")} if (indexInfo) { if (accessFlags & 2 /* NoIndexSignatures */ && indexInfo.keyType !== numberType) { if (accessExpression) { - error(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); + error2(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); } return void 0; } if (accessNode && indexInfo.keyType === stringType && !isTypeAssignableToKind(indexType, 4 /* String */ | 8 /* Number */)) { const indexNode = getIndexNodeForAccessExpression(accessNode); - error(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); + error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); return accessFlags & 1 /* IncludeUndefined */ ? getUnionType([indexInfo.type, missingType]) : indexInfo.type; } errorIfWritingToReadonlyIndex(indexInfo); @@ -59340,23 +59815,23 @@ ${lanes.join("\n")} } } if (objectType.symbol === globalThisSymbol && propName !== void 0 && globalThisSymbol.exports.has(propName) && globalThisSymbol.exports.get(propName).flags & 418 /* BlockScoped */) { - error(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); + error2(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); } else if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !(accessFlags & 128 /* SuppressNoImplicitAnyError */)) { if (propName !== void 0 && typeHasStaticProperty(propName, objectType)) { const typeName = typeToString(objectType); - error(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "[" + getTextOfNode(accessExpression.argumentExpression) + "]"); + error2(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "[" + getTextOfNode(accessExpression.argumentExpression) + "]"); } else if (getIndexTypeOfType(objectType, numberType)) { - error(accessExpression.argumentExpression, Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number); + error2(accessExpression.argumentExpression, Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number); } else { let suggestion; if (propName !== void 0 && (suggestion = getSuggestionForNonexistentProperty(propName, objectType))) { if (suggestion !== void 0) { - error(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(objectType), suggestion); + error2(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(objectType), suggestion); } } else { const suggestion2 = getSuggestionForNonexistentIndexSignature(objectType, accessExpression, indexType); if (suggestion2 !== void 0) { - error(accessExpression, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, typeToString(objectType), suggestion2); + error2(accessExpression, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, typeToString(objectType), suggestion2); } else { let errorInfo; if (indexType.flags & 1024 /* EnumLiteral */) { @@ -59421,11 +59896,11 @@ ${lanes.join("\n")} if (accessNode) { const indexNode = getIndexNodeForAccessExpression(accessNode); if (indexType.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { - error(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType)); + error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType)); } else if (indexType.flags & (4 /* String */ | 8 /* Number */)) { - error(indexNode, Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType)); + error2(indexNode, Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType)); } else { - error(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); + error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); } } if (isTypeAny(indexType)) { @@ -59434,12 +59909,12 @@ ${lanes.join("\n")} return void 0; function errorIfWritingToReadonlyIndex(indexInfo) { if (indexInfo && indexInfo.isReadonly && accessExpression && (isAssignmentTarget(accessExpression) || isDeleteTarget(accessExpression))) { - error(accessExpression, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); + error2(accessExpression, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } } } function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 211 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 198 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 166 /* ComputedPropertyName */ ? accessNode.expression : accessNode; + return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode; } function isPatternLiteralPlaceholderType(type) { if (type.flags & 2097152 /* Intersection */) { @@ -59579,7 +60054,7 @@ ${lanes.join("\n")} } if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 198 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)) || isGenericReducibleType(objectType))) { + if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target)) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target))) || isGenericReducibleType(objectType))) { if (objectType.flags & 3 /* AnyOrUnknown */) { return objectType; } @@ -59659,7 +60134,7 @@ ${lanes.join("\n")} let tailCount = 0; while (true) { if (tailCount === 1e3) { - error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); + error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper); @@ -59684,9 +60159,9 @@ ${lanes.join("\n")} ); if (freshMapper) { const freshCombinedMapper = combineTypeMappers(mapper, freshMapper); - for (const p of freshParams) { - if (root.inferTypeParameters.indexOf(p) === -1) { - p.mapper = freshCombinedMapper; + for (let i = 0; i < freshParams.length; i++) { + if (freshParams[i] !== root.inferTypeParameters[i]) { + freshParams[i].mapper = freshCombinedMapper; } } } @@ -59837,11 +60312,11 @@ ${lanes.join("\n")} const links = getNodeLinks(node); if (!links.resolvedType) { if (!isLiteralImportTypeNode(node)) { - error(node.argument, Diagnostics.String_literal_expected); + error2(node.argument, Diagnostics.String_literal_expected); links.resolvedSymbol = unknownSymbol; return links.resolvedType = errorType; } - const targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 8388608 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */; + const targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 16777216 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */; const innerModuleSymbol = resolveExternalModuleName(node, node.argument.literal); if (!innerModuleSymbol) { links.resolvedSymbol = unknownSymbol; @@ -59871,7 +60346,7 @@ ${lanes.join("\n")} const symbolFromModule = node.isTypeOf ? void 0 : getSymbol2(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning); const next = symbolFromModule ?? symbolFromVariable; if (!next) { - error(current, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), declarationNameToString(current)); + error2(current, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), declarationNameToString(current)); return links.resolvedType = errorType; } getNodeLinks(current).resolvedSymbol = next; @@ -59884,7 +60359,7 @@ ${lanes.join("\n")} links.resolvedType = resolveImportSymbolType(node, links, moduleSymbol, targetMeaning); } else { const errorMessage = targetMeaning === 111551 /* Value */ ? Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0; - error(node, errorMessage, node.argument.literal.text); + error2(node, errorMessage, node.argument.literal.text); links.resolvedSymbol = unknownSymbol; links.resolvedType = errorType; } @@ -60147,7 +60622,7 @@ ${lanes.join("\n")} false ); const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 263 /* InterfaceDeclaration */)) { + if (parent2 && (isClassLike(parent2) || parent2.kind === 264 /* InterfaceDeclaration */)) { if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent2)).thisType; } @@ -60155,14 +60630,14 @@ ${lanes.join("\n")} if (parent2 && isObjectLiteralExpression(parent2) && isBinaryExpression(parent2.parent) && getAssignmentDeclarationKind(parent2.parent) === 6 /* Prototype */) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent2.parent.left).parent).thisType; } - const host2 = node.flags & 8388608 /* JSDoc */ ? getHostSignatureFromJSDoc(node) : void 0; + const host2 = node.flags & 16777216 /* JSDoc */ ? getHostSignatureFromJSDoc(node) : void 0; if (host2 && isFunctionExpression(host2) && isBinaryExpression(host2.parent) && getAssignmentDeclarationKind(host2.parent) === 3 /* PrototypeProperty */) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(host2.parent.left).parent).thisType; } if (isJSConstructor(container) && isNodeDescendantOf(node, container.body)) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(container)).thisType; } - error(node, Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface); + error2(node, Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface); return errorType; } function getTypeFromThisTypeNode(node) { @@ -60177,17 +60652,17 @@ ${lanes.join("\n")} } function getArrayElementTypeNode(node) { switch (node.kind) { - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return getArrayElementTypeNode(node.type); - case 188 /* TupleType */: + case 189 /* TupleType */: if (node.elements.length === 1) { node = node.elements[0]; - if (node.kind === 190 /* RestType */ || node.kind === 201 /* NamedTupleMember */ && node.dotDotDotToken) { + if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) { return getArrayElementTypeNode(node.type); } } break; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return node.elementType; } return void 0; @@ -60207,8 +60682,8 @@ ${lanes.join("\n")} function getTypeFromTypeNodeWorker(node) { switch (node.kind) { case 133 /* AnyKeyword */: - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: return anyType; case 159 /* UnknownKeyword */: return unknownType; @@ -60216,7 +60691,7 @@ ${lanes.join("\n")} return stringType; case 150 /* NumberKeyword */: return numberType; - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: return bigintType; case 136 /* BooleanKeyword */: return booleanType; @@ -60231,69 +60706,69 @@ ${lanes.join("\n")} case 146 /* NeverKeyword */: return neverType; case 151 /* ObjectKeyword */: - return node.flags & 262144 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; + return node.flags & 524288 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; case 141 /* IntrinsicKeyword */: return intrinsicMarkerType; - case 196 /* ThisType */: + case 197 /* ThisType */: case 110 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return getTypeFromLiteralTypeNode(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return getTypeFromTypeReference(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return node.assertsModifier ? voidType : booleanType; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return getTypeFromArrayOrTupleTypeNode(node); - case 189 /* OptionalType */: + case 190 /* OptionalType */: return getTypeFromOptionalTypeNode(node); - case 191 /* UnionType */: + case 192 /* UnionType */: return getTypeFromUnionTypeNode(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return getTypeFromIntersectionTypeNode(node); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return getTypeFromJSDocNullableTypeNode(node); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return addOptionality(getTypeFromTypeNode(node.type)); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return getTypeFromNamedTupleTypeNode(node); - case 195 /* ParenthesizedType */: - case 321 /* JSDocNonNullableType */: - case 315 /* JSDocTypeExpression */: + case 196 /* ParenthesizedType */: + case 322 /* JSDocNonNullableType */: + case 316 /* JSDocTypeExpression */: return getTypeFromTypeNode(node.type); - case 190 /* RestType */: + case 191 /* RestType */: return getTypeFromRestTypeNode(node); - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 186 /* TypeLiteral */: - case 328 /* JSDocTypeLiteral */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 187 /* TypeLiteral */: + case 329 /* JSDocTypeLiteral */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return getTypeFromTypeOperatorNode(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return getTypeFromIndexedAccessTypeNode(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return getTypeFromMappedTypeNode(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return getTypeFromConditionalTypeNode(node); - case 194 /* InferType */: + case 195 /* InferType */: return getTypeFromInferTypeNode(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return getTypeFromTemplateTypeNode(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return getTypeFromImportTypeNode(node); case 80 /* Identifier */: - case 165 /* QualifiedName */: - case 210 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: const symbol = getSymbolAtLocation(node); return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; default: @@ -60429,7 +60904,7 @@ ${lanes.join("\n")} /*resolvedTypePredicate*/ void 0, signature.minArgumentCount, - signature.flags & 39 /* PropagatingFlags */ + signature.flags & 167 /* PropagatingFlags */ ); result.target = signature; result.mapper = mapper; @@ -60491,26 +60966,31 @@ ${lanes.join("\n")} if (!result) { const newMapper = createTypeMapper(typeParameters, typeArguments); result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); - if (result.flags & 138117121 /* ObjectFlagsType */ && !(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { + target.instantiations.set(id, result); + const resultObjectFlags = getObjectFlags(result); + if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables); - if (!(result.objectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { - result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0); + if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) { + if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) { + result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0); + } else { + result.objectFlags |= !resultCouldContainTypeVariables ? 524288 /* CouldContainTypeVariablesComputed */ : 0; + } } } - target.instantiations.set(id, result); } return result; } return type; } function maybeTypeParameterReference(node) { - return !(node.parent.kind === 182 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 204 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); + return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); } function isTypeParameterPossiblyReferenced(tp, node) { if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { const container = tp.symbol.declarations[0].parent; for (let n = node; n !== container; n = n.parent) { - if (!n || n.kind === 240 /* Block */ || n.kind === 193 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { + if (!n || n.kind === 241 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { return true; } } @@ -60519,17 +60999,17 @@ ${lanes.join("\n")} return true; function containsReference(node2) { switch (node2.kind) { - case 196 /* ThisType */: + case 197 /* ThisType */: return !!tp.isThisType; case 80 /* Identifier */: return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: const entityName = node2.exprName; const firstIdentifier = getFirstIdentifier(entityName); if (!isThisIdentifier(firstIdentifier)) { const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); const tpDeclaration = tp.symbol.declarations[0]; - const tpScope = tpDeclaration.kind === 167 /* TypeParameter */ ? tpDeclaration.parent : ( + const tpScope = tpDeclaration.kind === 168 /* TypeParameter */ ? tpDeclaration.parent : ( // Type parameter is a regular type parameter, e.g. foo tp.isThisType ? tpDeclaration : ( // Type parameter is the this type, and its declaration is the class declaration. @@ -60541,8 +61021,8 @@ ${lanes.join("\n")} } } return true; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); } return !!forEachChild(node2, containsReference); @@ -60592,6 +61072,9 @@ ${lanes.join("\n")} const elementFlags = tupleType.target.elementFlags; const elementTypes = map(getElementTypes(tupleType), (t, i) => { const singleton = elementFlags[i] & 8 /* Variadic */ ? t : elementFlags[i] & 4 /* Rest */ ? createArrayType(t) : createTupleType([t], [elementFlags[i]]); + if (singleton === typeVariable) { + return mappedType; + } return instantiateMappedType(mappedType, prependTypeMapping(typeVariable, singleton, mapper)); }); const newReadonly = getModifiedReadonlyState(tupleType.target.readonly, getMappedTypeModifiers(mappedType)); @@ -60679,7 +61162,7 @@ ${lanes.join("\n")} } if (instantiationDepth === 100 || instantiationCount >= 5e6) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "instantiateType_DepthLimit", { typeId: type.id, instantiationDepth, instantiationCount }); - error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); + error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } totalInstantiationCount++; @@ -60795,32 +61278,32 @@ ${lanes.join("\n")} return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); } function isContextSensitive(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); switch (node.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: return isContextSensitiveFunctionLikeDeclaration(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return some(node.properties, isContextSensitive); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return some(node.elements, isContextSensitive); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isContextSensitive(node.expression); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 290 /* JsxAttribute */: { + case 291 /* JsxAttribute */: { const { initializer } = node; return !!initializer && isContextSensitive(initializer); } - case 293 /* JsxExpression */: { + case 294 /* JsxExpression */: { const { expression } = node; return !!expression && isContextSensitive(expression); } @@ -60834,7 +61317,7 @@ ${lanes.join("\n")} if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) { return false; } - if (node.body.kind !== 240 /* Block */) { + if (node.body.kind !== 241 /* Block */) { return isContextSensitive(node.body); } return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression)); @@ -60929,23 +61412,27 @@ ${lanes.join("\n")} return true; } switch (node.kind) { - case 293 /* JsxExpression */: - case 216 /* ParenthesizedExpression */: + case 234 /* AsExpression */: + if (!isConstAssertion(node)) { + break; + } + case 294 /* JsxExpression */: + case 217 /* ParenthesizedExpression */: return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 28 /* CommaToken */: return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); } break; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); } return false; @@ -61245,16 +61732,16 @@ ${lanes.join("\n")} } function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { switch (child.kind) { - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return { errorNode: child, innerExpression: child.expression, nameType }; case 12 /* JsxText */: if (child.containsOnlyTriviaWhiteSpaces) { break; } return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() }; - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: return { errorNode: child, innerExpression: child, nameType }; default: return Debug.assertNever(child, "Found invalid jsx child"); @@ -61295,7 +61782,7 @@ ${lanes.join("\n")} result = elaborateIterableOrArrayLikeTargetElementwise(children, realSource, arrayLikeTargetParts, relation, containingMessageChain, errorOutputContainer) || result; } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) { result = true; - const diag2 = error( + const diag2 = error2( containingElement.openingElement.tagName, Diagnostics.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided, childrenPropName, @@ -61323,7 +61810,7 @@ ${lanes.join("\n")} } } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) { result = true; - const diag2 = error( + const diag2 = error2( containingElement.openingElement.tagName, Diagnostics.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided, childrenPropName, @@ -61404,13 +61891,13 @@ ${lanes.join("\n")} continue; } switch (prop.kind) { - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: - case 173 /* MethodDeclaration */: - case 303 /* ShorthandPropertyAssignment */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: + case 174 /* MethodDeclaration */: + case 304 /* ShorthandPropertyAssignment */: yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; break; default: @@ -61485,7 +61972,7 @@ ${lanes.join("\n")} void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); } const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 173 /* MethodDeclaration */ && kind !== 172 /* MethodSignature */ && kind !== 175 /* Constructor */; + const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */; let result = -1 /* True */; const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType && sourceThisType !== voidType) { @@ -61804,6 +62291,7 @@ ${lanes.join("\n")} let errorInfo; let relatedInfo; let maybeKeys; + let maybeKeysSet; let sourceStack; let targetStack; let maybeCount = 0; @@ -61828,7 +62316,7 @@ ${lanes.join("\n")} } if (overflow) { (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth }); - const diag2 = error(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); + const diag2 = error2(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); if (errorOutputContainer) { (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); } @@ -62673,9 +63161,13 @@ ${lanes.join("\n")} } if (!maybeKeys) { maybeKeys = []; + maybeKeysSet = /* @__PURE__ */ new Set(); sourceStack = []; targetStack = []; } else { + if (maybeKeysSet.has(id)) { + return 3 /* Maybe */; + } const broadestEquivalentId = id.startsWith("*") ? getRelationKey( source2, target2, @@ -62684,10 +63176,8 @@ ${lanes.join("\n")} /*ignoreConstraints*/ true ) : void 0; - for (let i = 0; i < maybeCount; i++) { - if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) { - return 3 /* Maybe */; - } + if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) { + return 3 /* Maybe */; } if (sourceDepth === 100 || targetDepth === 100) { overflow = true; @@ -62696,6 +63186,7 @@ ${lanes.join("\n")} } const maybeStart = maybeCount; maybeKeys[maybeCount] = id; + maybeKeysSet.add(id); maybeCount++; const saveExpandingFlags = expandingFlags; if (recursionFlags & 1 /* Source */) { @@ -62748,17 +63239,34 @@ ${lanes.join("\n")} if (result2) { if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) { if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) { - for (let i = maybeStart; i < maybeCount; i++) { - relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); - } + resetMaybeStack( + /*markAllAsSucceeded*/ + true + ); + } else { + resetMaybeStack( + /*markAllAsSucceeded*/ + false + ); } - maybeCount = maybeStart; } } else { relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags); - maybeCount = maybeStart; + resetMaybeStack( + /*markAllAsSucceeded*/ + false + ); } return result2; + function resetMaybeStack(markAllAsSucceeded) { + for (let i = maybeStart; i < maybeCount; i++) { + maybeKeysSet.delete(maybeKeys[i]); + if (markAllAsSucceeded) { + relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); + } + } + maybeCount = maybeStart; + } } function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) { const saveErrorInfo = captureErrorCalculationState(); @@ -63170,26 +63678,6 @@ ${lanes.join("\n")} )) { return result2; } - if (sourceFlags & 8388608 /* IndexedAccess */) { - const indexType = source2.indexType; - if (indexType.flags & 4194304 /* Index */) { - const unresolvedIndexConstraint = getBaseConstraintOfType(indexType.type); - const indexConstraint = unresolvedIndexConstraint && unresolvedIndexConstraint !== noConstraintType ? getIndexType(unresolvedIndexConstraint) : keyofConstraintType; - const constraint2 = getIndexedAccessType(source2.objectType, indexConstraint); - if (result2 = isRelatedTo( - constraint2, - target2, - 1 /* Source */, - /*reportErrors*/ - false, - /*headMessage*/ - void 0, - intersectionState - )) { - return result2; - } - } - } if (isMappedTypeGenericIndexedAccess(source2)) { const indexConstraint = getConstraintOfType(source2.indexType); if (indexConstraint) { @@ -63875,7 +64363,7 @@ ${lanes.join("\n")} const sourceSignature = first(sourceSignatures); const targetSignature = first(targetSignatures); result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 175 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 175 /* Constructor */)) { + if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) { const constructSignatureToString = (signature) => signatureToString( signature, /*enclosingDeclaration*/ @@ -64161,7 +64649,7 @@ ${lanes.join("\n")} let matched = false; for (let i = 0; i < types.length; i++) { if (include[i]) { - const targetType = getTypeOfPropertyOfType(types[i], propertyName); + const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName); if (targetType && related(getDiscriminatingType(), targetType)) { matched = true; } else { @@ -64175,7 +64663,7 @@ ${lanes.join("\n")} } } } - const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i])) : target; + const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i]), 0 /* None */) : target; return filtered.flags & 131072 /* Never */ ? target : filtered; } function isWeakType(type) { @@ -64379,7 +64867,7 @@ ${lanes.join("\n")} } function getRecursionIdentity(type) { if (type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { - if (getObjectFlags(type) && 4 /* Reference */ && type.node) { + if (getObjectFlags(type) & 4 /* Reference */ && type.node) { return type.node; } if (type.symbol && !(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) { @@ -64560,7 +65048,7 @@ ${lanes.join("\n")} const target = type.target; if (getObjectFlags(target) & 1 /* Class */) { const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 210 /* PropertyAccessExpression */) { + if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) { return void 0; } } @@ -64586,7 +65074,8 @@ ${lanes.join("\n")} return !!elementType && isEmptyLiteralType(elementType); } function isTupleLikeType(type) { - return isTupleType(type) || !!getPropertyOfType(type, "0"); + let lengthType; + return isTupleType(type) || !!getPropertyOfType(type, "0") || isArrayLikeType(type) && !!(lengthType = getTypeOfPropertyOfType(type, "length")) && everyType(lengthType, (t) => !!(t.flags & 256 /* NumberLiteral */)); } function isArrayOrTupleLikeType(type) { return isArrayLikeType(type) || isTupleLikeType(type); @@ -64597,17 +65086,7 @@ ${lanes.join("\n")} return propType; } if (everyType(type, isTupleType)) { - return mapType(type, (t) => { - const tupleType = t; - const restType = getRestTypeOfTupleType(tupleType); - if (!restType) { - return undefinedType; - } - if (compilerOptions.noUncheckedIndexedAccess && index >= tupleType.target.fixedLength + getEndElementCount(tupleType.target, 3 /* Fixed */)) { - return getUnionType([restType, undefinedType]); - } - return restType; - }); + return getTupleElementTypeOutOfStartCount(type, index, compilerOptions.noUncheckedIndexedAccess ? undefinedType : void 0); } return void 0; } @@ -64675,6 +65154,19 @@ ${lanes.join("\n")} function getRestTypeOfTupleType(type) { return getElementTypeOfSliceOfTupleType(type, type.target.fixedLength); } + function getTupleElementTypeOutOfStartCount(type, index, undefinedOrMissingType2) { + return mapType(type, (t) => { + const tupleType = t; + const restType = getRestTypeOfTupleType(tupleType); + if (!restType) { + return undefinedType; + } + if (undefinedOrMissingType2 && index >= getTotalFixedElementCount(tupleType.target)) { + return getUnionType([restType, undefinedOrMissingType2]); + } + return restType; + }); + } function getRestArrayTypeOfTupleType(type) { const restType = getRestTypeOfTupleType(type); return restType && createArrayType(restType); @@ -64943,7 +65435,7 @@ ${lanes.join("\n")} const t = getTypeOfSymbol(p); if (getObjectFlags(t) & 65536 /* ContainsWideningType */) { if (!reportWideningErrorsInType(t)) { - error(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); + error2(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); } errorReported = true; } @@ -64959,12 +65451,12 @@ ${lanes.join("\n")} } let diagnostic; switch (declaration.kind) { - case 225 /* BinaryExpression */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 226 /* BinaryExpression */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 168 /* Parameter */: + case 169 /* Parameter */: const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); @@ -64986,40 +65478,40 @@ ${lanes.join("\n")} } diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; if (!noImplicitAny) { return; } break; - case 323 /* JSDocFunctionType */: - error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); + case 324 /* JSDocFunctionType */: + error2(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; - case 329 /* JSDocSignature */: + case 330 /* JSDocSignature */: if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) { - error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); + error2(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); } return; - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: if (noImplicitAny && !declaration.name) { if (wideningKind === 3 /* GeneratorYield */) { - error(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); + error2(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); } else { - error(declaration, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); + error2(declaration, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); } return; } diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; break; - case 199 /* MappedType */: + case 200 /* MappedType */: if (noImplicitAny) { - error(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); + error2(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); } return; default: @@ -65114,7 +65606,7 @@ ${lanes.join("\n")} function inferFromIntraExpressionSites(context) { if (context.intraExpressionInferenceSites) { for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 173 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); + const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); if (contextualType) { inferTypes(context.inferences, type, contextualType); } @@ -65166,8 +65658,8 @@ ${lanes.join("\n")} } function isNonGenericTopLevelType(type) { if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 264 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 311 /* SourceFile */ ? true : n.kind === 266 /* ModuleDeclaration */ ? false : "quit")); + const declaration = getDeclarationOfKind(type.aliasSymbol, 265 /* TypeAliasDeclaration */); + return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 312 /* SourceFile */ ? true : n.kind === 267 /* ModuleDeclaration */ ? false : "quit")); } return false; } @@ -65209,17 +65701,18 @@ ${lanes.join("\n")} ); } function inferTypeForHomomorphicMappedType(source, target, constraint) { - if (inInferTypeForHomomorphicMappedType) { - return void 0; + const cacheKey = source.id + "," + target.id + "," + constraint.id; + if (reverseMappedCache.has(cacheKey)) { + return reverseMappedCache.get(cacheKey); } - const key = source.id + "," + target.id + "," + constraint.id; - if (reverseMappedCache.has(key)) { - return reverseMappedCache.get(key); + const recursionKey = source.id + "," + (target.target || target).id; + if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) { + return void 0; } - inInferTypeForHomomorphicMappedType = true; + homomorphicMappedTypeInferenceStack.push(recursionKey); const type = createReverseMappedType(source, target, constraint); - inInferTypeForHomomorphicMappedType = false; - reverseMappedCache.set(key, type); + homomorphicMappedTypeInferenceStack.pop(); + reverseMappedCache.set(cacheKey, type); return type; } function isPartiallyInferableType(type) { @@ -65992,7 +66485,7 @@ ${lanes.join("\n")} if (!(source.flags & 64 /* IsNonInferrable */)) { const saveBivariant = bivariant; const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 173 /* MethodDeclaration */ || kind === 172 /* MethodSignature */ || kind === 175 /* Constructor */; + bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */; applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); bivariant = saveBivariant; } @@ -66092,7 +66585,7 @@ ${lanes.join("\n")} const constraint = getConstraintOfTypeParameter(inference.typeParameter); if (constraint) { const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper); - if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { + if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; } } @@ -66150,7 +66643,7 @@ ${lanes.join("\n")} return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } default: - if (node.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer; } else { return Diagnostics.Cannot_find_name_0; @@ -66173,14 +66666,8 @@ ${lanes.join("\n")} } return links.resolvedSymbol; } - function isInTypeQuery(node) { - return !!findAncestor( - node, - (n) => n.kind === 185 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 165 /* QualifiedName */ ? false : "quit" - ); - } function isInAmbientOrTypeNode(node) { - return !!(node.flags & 16777216 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n))); + return !!(node.flags & 33554432 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n))); } function getFlowCacheKey(node, declaredType, initialType, flowContainer) { switch (node.kind) { @@ -66191,41 +66678,41 @@ ${lanes.join("\n")} } case 110 /* ThisKeyword */: return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); return left && left + "." + node.right.escapedText; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const propName = getAccessedPropertyName(node); if (propName !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); return key && key + "." + propName; } break; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return `${getNodeId(node)}#${getTypeId(declaredType)}`; } return void 0; } function isMatchingReference(source, target) { switch (target.kind) { - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return isMatchingReference(source, target.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source, target.right); } switch (source.kind) { - case 235 /* MetaProperty */: - return target.kind === 235 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; + case 236 /* MetaProperty */: + return target.kind === 236 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; case 80 /* Identifier */: case 81 /* PrivateIdentifier */: return isThisInTypeQuery(source) ? target.kind === 110 /* ThisKeyword */ : target.kind === 80 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); @@ -66233,17 +66720,17 @@ ${lanes.join("\n")} return target.kind === 110 /* ThisKeyword */; case 108 /* SuperKeyword */: return target.kind === 108 /* SuperKeyword */; - case 234 /* NonNullExpression */: - case 216 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: return isMatchingReference(source.expression, target); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const sourcePropertyName = getAccessedPropertyName(source); const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0; return sourcePropertyName !== void 0 && targetPropertyName !== void 0 && targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isBinaryExpression(source) && source.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source.right, target); } return false; @@ -66277,7 +66764,7 @@ ${lanes.join("\n")} /*ignoreErrors*/ true ); - if (!symbol || !(isConstVariable(symbol) || symbol.flags & 8 /* EnumMember */)) + if (!symbol || !(isConstantVariable(symbol) || symbol.flags & 8 /* EnumMember */)) return void 0; const declaration = symbol.valueDeclaration; if (declaration === void 0) @@ -66396,7 +66883,7 @@ ${lanes.join("\n")} } function getMatchingUnionConstituentForObjectLiteral(unionType, node) { const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 302 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); + const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 303 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); return propType && getConstituentTypeForKeyType(unionType, propType); } @@ -66411,7 +66898,7 @@ ${lanes.join("\n")} } } } - if (expression.expression.kind === 210 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { + if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { return true; } return false; @@ -66583,11 +67070,11 @@ ${lanes.join("\n")} ) || errorType); } function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 208 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 302 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); + const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 303 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); } function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 225 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 249 /* ForOfStatement */ && parent2.parent.initializer === parent2; + return parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 250 /* ForOfStatement */ && parent2.parent.initializer === parent2; } function getAssignedTypeOfArrayLiteralElement(node, element) { return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); @@ -66604,21 +67091,21 @@ ${lanes.join("\n")} function getAssignedType(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return stringType; - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return checkRightHandSideOfForOf(parent2) || errorType; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return getAssignedTypeOfBinaryExpression(parent2); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return undefinedType; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return getAssignedTypeOfSpreadExpression(parent2); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getAssignedTypeOfPropertyAssignment(parent2); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return getAssignedTypeOfShorthandPropertyAssignment(parent2); } return errorType; @@ -66626,7 +67113,7 @@ ${lanes.join("\n")} function getInitialTypeOfBindingElement(node) { const pattern = node.parent; const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 205 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); + const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); return getTypeWithDefault(type, node.initializer); } function getTypeOfInitializer(node) { @@ -66637,25 +67124,25 @@ ${lanes.join("\n")} if (node.initializer) { return getTypeOfInitializer(node.initializer); } - if (node.parent.parent.kind === 248 /* ForInStatement */) { + if (node.parent.parent.kind === 249 /* ForInStatement */) { return stringType; } - if (node.parent.parent.kind === 249 /* ForOfStatement */) { + if (node.parent.parent.kind === 250 /* ForOfStatement */) { return checkRightHandSideOfForOf(node.parent.parent) || errorType; } return errorType; } function getInitialType(node) { - return node.kind === 259 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); + return node.kind === 260 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); } function isEmptyArrayAssignment(node) { - return node.kind === 259 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 207 /* BindingElement */ && node.parent.kind === 225 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); + return node.kind === 260 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 226 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); } function getReferenceCandidate(node) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return getReferenceCandidate(node.expression); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (node.operatorToken.kind) { case 64 /* EqualsToken */: case 76 /* BarBarEqualsToken */: @@ -66670,10 +67157,10 @@ ${lanes.join("\n")} } function getReferenceRoot(node) { const { parent: parent2 } = node; - return parent2.kind === 216 /* ParenthesizedExpression */ || parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */ && parent2.left === node || parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 28 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; + return parent2.kind === 217 /* ParenthesizedExpression */ || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */ && parent2.left === node || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 28 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; } function getTypeOfSwitchClause(clause) { - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); } return neverType; @@ -66689,12 +67176,12 @@ ${lanes.join("\n")} return links.switchTypes; } function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 295 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { + if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { return void 0; } const witnesses = []; for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 295 /* CaseClause */ ? clause.expression.text : void 0; + const text = clause.kind === 296 /* CaseClause */ ? clause.expression.text : void 0; witnesses.push(text && !contains(witnesses, text) ? text : void 0); } return witnesses; @@ -66852,8 +67339,8 @@ ${lanes.join("\n")} function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 212 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 211 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 225 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 64 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); + const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 213 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isElementAssignment = parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 64 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); return isLengthPushOrUnshift || isElementAssignment; } function isDeclarationWithExplicitTypeAnnotation(node) { @@ -66876,7 +67363,7 @@ ${lanes.join("\n")} if (isDeclarationWithExplicitTypeAnnotation(declaration)) { return getTypeOfSymbol(symbol); } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForOfStatement */) { + if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { const statement = declaration.parent.parent; const expressionType = getTypeOfDottedName( statement.expression, @@ -66901,7 +67388,7 @@ ${lanes.join("\n")} } } function getTypeOfDottedName(node, diagnostic) { - if (!(node.flags & 33554432 /* InWithStatement */)) { + if (!(node.flags & 67108864 /* InWithStatement */)) { switch (node.kind) { case 80 /* Identifier */: const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node)); @@ -66910,7 +67397,7 @@ ${lanes.join("\n")} return getExplicitThisType(node); case 108 /* SuperKeyword */: return checkSuperExpression(node); - case 210 /* PropertyAccessExpression */: { + case 211 /* PropertyAccessExpression */: { const type = getTypeOfDottedName(node.expression, diagnostic); if (type) { const name = node.name; @@ -66927,7 +67414,7 @@ ${lanes.join("\n")} } return void 0; } - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return getTypeOfDottedName(node.expression, diagnostic); } } @@ -66937,7 +67424,7 @@ ${lanes.join("\n")} let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 243 /* ExpressionStatement */) { + if (node.parent.kind === 244 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ @@ -66991,7 +67478,7 @@ ${lanes.join("\n")} /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 97 /* FalseKeyword */ || node.kind === 225 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); + return node.kind === 97 /* FalseKeyword */ || node.kind === 226 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); } function isReachableFlowNodeWorker(flow, noCacheCheck) { while (true) { @@ -67110,14 +67597,16 @@ ${lanes.join("\n")} } function isConstantReference(node) { switch (node.kind) { + case 110 /* ThisKeyword */: + return true; case 80 /* Identifier */: if (!isThisInTypeQuery(node)) { const symbol = getResolvedSymbol(node); - return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); + return isConstantVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); } break; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); } return false; @@ -67137,7 +67626,7 @@ ${lanes.join("\n")} const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode)); sharedFlowCount = sharedFlowStart; const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType); - if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 234 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { + if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 235 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { return declaredType; } return resultType === nonNullUnknownType ? unknownType : resultType; @@ -67206,7 +67695,7 @@ ${lanes.join("\n")} target.antecedents = saveAntecedents; } else if (flags & 2 /* Start */) { const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 210 /* PropertyAccessExpression */ && reference.kind !== 211 /* ElementAccessExpression */ && reference.kind !== 110 /* ThisKeyword */) { + if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && !(reference.kind === 110 /* ThisKeyword */ && container.kind !== 219 /* ArrowFunction */)) { flow = container.flowNode; continue; } @@ -67225,7 +67714,7 @@ ${lanes.join("\n")} } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference(node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -67253,15 +67742,15 @@ ${lanes.join("\n")} if (!isReachableFlowNode(flow)) { return unreachableNeverType; } - if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConst(node))) { + if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConstLike(node))) { const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 217 /* FunctionExpression */ || init.kind === 218 /* ArrowFunction */)) { + if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) { return getTypeAtFlowNode(flow.antecedent); } } return declaredType; } - if (isVariableDeclaration(node) && node.parent.parent.kind === 248 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { + if (isVariableDeclaration(node) && node.parent.parent.kind === 249 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); } return void 0; @@ -67275,7 +67764,7 @@ ${lanes.join("\n")} if (node.kind === 97 /* FalseKeyword */) { return unreachableNeverType; } - if (node.kind === 225 /* BinaryExpression */) { + if (node.kind === 226 /* BinaryExpression */) { if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) { return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); } @@ -67315,13 +67804,13 @@ ${lanes.join("\n")} function getTypeAtFlowArrayMutation(flow) { if (declaredType === autoType || declaredType === autoArrayType) { const node = flow.node; - const expr = node.kind === 212 /* CallExpression */ ? node.expression.expression : node.left.expression; + const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression; if (isMatchingReference(reference, getReferenceCandidate(expr))) { const flowType = getTypeAtFlowNode(flow.antecedent); const type = getTypeFromFlowType(flowType); if (getObjectFlags(type) & 256 /* EvolvingArray */) { let evolvedType2 = type; - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { for (const arg of node.arguments) { evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); } @@ -67358,7 +67847,7 @@ ${lanes.join("\n")} let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 220 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { + } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { @@ -67370,7 +67859,7 @@ ${lanes.join("\n")} flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) ); - } else if (expr.kind === 220 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { + } else if (expr.kind === 221 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { type = narrowTypeBySwitchOptionalChainContainment( type, flow.switchStatement, @@ -67515,7 +68004,7 @@ ${lanes.join("\n")} } } else if (isIdentifier(expr)) { const symbol = getResolvedSymbol(expr); - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; if (isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isAccessExpression(declaration.initializer) && isMatchingReference(reference, declaration.initializer.expression)) { return declaration.initializer; @@ -67633,10 +68122,10 @@ ${lanes.join("\n")} const operator = expr.operatorToken.kind; const left = getReferenceCandidate(expr.left); const right = getReferenceCandidate(expr.right); - if (left.kind === 220 /* TypeOfExpression */ && isStringLiteralLike(right)) { + if (left.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(right)) { return narrowTypeByTypeof(type, left, operator, right, assumeTrue); } - if (right.kind === 220 /* TypeOfExpression */ && isStringLiteralLike(left)) { + if (right.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(left)) { return narrowTypeByTypeof(type, right, operator, left, assumeTrue); } if (isMatchingReference(reference, left)) { @@ -67674,12 +68163,15 @@ ${lanes.join("\n")} return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue); } const target = getReferenceCandidate(expr.right); - const leftType = getTypeOfExpression(expr.left); - if (leftType.flags & 8576 /* StringOrNumberLiteralOrUnique */) { - if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) { + if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target)) { + const leftType = getTypeOfExpression(expr.left); + if (isTypeUsableAsPropertyName(leftType) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) { return getTypeWithFacts(type, assumeTrue ? 524288 /* NEUndefined */ : 65536 /* EQUndefined */); } - if (isMatchingReference(reference, target)) { + } + if (isMatchingReference(reference, target)) { + const leftType = getTypeOfExpression(expr.left); + if (isTypeUsableAsPropertyName(leftType)) { return narrowTypeByInKeyword(type, leftType, assumeTrue); } } @@ -67895,7 +68387,7 @@ ${lanes.join("\n")} if (!witnesses) { return type; } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* DefaultClause */); + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */); const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); @@ -68059,7 +68551,7 @@ ${lanes.join("\n")} case 80 /* Identifier */: if (!isMatchingReference(reference, expr) && inlineLevel < 5) { const symbol = getResolvedSymbol(expr); - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isConstantReference(reference)) { inlineLevel++; @@ -68071,17 +68563,17 @@ ${lanes.join("\n")} } case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return narrowTypeByTruthiness(type, expr, assumeTrue); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return narrowTypeByCallExpression(type, expr, assumeTrue); - case 216 /* ParenthesizedExpression */: - case 234 /* NonNullExpression */: + case 217 /* ParenthesizedExpression */: + case 235 /* NonNullExpression */: return narrowType(type, expr.expression, assumeTrue); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: if (expr.operator === 54 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -68107,7 +68599,7 @@ ${lanes.join("\n")} location = location.parent; } if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) { - const type = getTypeOfExpression(location); + const type = removeOptionalTypeMarker(getTypeOfExpression(location)); if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) { return type; } @@ -68119,7 +68611,7 @@ ${lanes.join("\n")} return getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 267 /* ModuleBlock */ || node2.kind === 311 /* SourceFile */ || node2.kind === 171 /* PropertyDeclaration */); + return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */); } function isSymbolAssigned(symbol) { if (!symbol.valueDeclaration) { @@ -68127,8 +68619,8 @@ ${lanes.join("\n")} } const parent2 = getRootDeclaration(symbol.valueDeclaration).parent; const links = getNodeLinks(parent2); - if (!(links.flags & 524288 /* AssignmentsMarked */)) { - links.flags |= 524288 /* AssignmentsMarked */; + if (!(links.flags & 131072 /* AssignmentsMarked */)) { + links.flags |= 131072 /* AssignmentsMarked */; if (!hasParentWithAssignmentsMarked(parent2)) { markNodeAssignments(parent2); } @@ -68136,7 +68628,7 @@ ${lanes.join("\n")} return symbol.isAssigned || false; } function hasParentWithAssignmentsMarked(node) { - return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 524288 /* AssignmentsMarked */)); + return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */)); } function markNodeAssignments(node) { if (node.kind === 80 /* Identifier */) { @@ -68150,8 +68642,8 @@ ${lanes.join("\n")} forEachChild(node, markNodeAssignments); } } - function isConstVariable(symbol) { - return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */) !== 0; + function isConstantVariable(symbol) { + return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */) !== 0; } function parameterInitializerContainsUndefined(declaration) { const links = getNodeLinks(declaration); @@ -68170,12 +68662,12 @@ ${lanes.join("\n")} return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 168 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { const parent2 = node.parent; - return parent2.kind === 210 /* PropertyAccessExpression */ || parent2.kind === 165 /* QualifiedName */ || parent2.kind === 212 /* CallExpression */ && parent2.expression === node || parent2.kind === 211 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); + return parent2.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 166 /* QualifiedName */ || parent2.kind === 213 /* CallExpression */ && parent2.expression === node || parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); } function isGenericTypeWithUnionConstraint(type) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */)); @@ -68218,9 +68710,13 @@ ${lanes.join("\n")} symbol, /*excludes*/ 111551 /* Value */ - ) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */)) { + ) && !isInTypeQuery(location)) { const target = resolveAlias(symbol); - if (getAllSymbolFlags(target) & (111551 /* Value */ | 1048576 /* ExportValue */)) { + if (getSymbolFlags( + symbol, + /*excludeTypeOnlyMeanings*/ + true + ) & (111551 /* Value */ | 1048576 /* ExportValue */)) { if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) { markAliasSymbolAsReferenced(symbol); } else { @@ -68236,14 +68732,14 @@ ${lanes.join("\n")} if (declaration) { if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { const parent2 = declaration.parent.parent; - if (parent2.kind === 259 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 168 /* Parameter */) { + if (parent2.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || parent2.kind === 169 /* Parameter */) { const links = getNodeLinks(parent2); - if (!(links.flags & 16777216 /* InCheckIdentifier */)) { - links.flags |= 16777216 /* InCheckIdentifier */; + if (!(links.flags & 4194304 /* InCheckIdentifier */)) { + links.flags |= 4194304 /* InCheckIdentifier */; const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); - links.flags &= ~16777216 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 168 /* Parameter */ && isSymbolAssigned(symbol))) { + links.flags &= ~4194304 /* InCheckIdentifier */; + if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) { const pattern = declaration.parent; const narrowedType = getFlowTypeOfReference( pattern, @@ -68295,15 +68791,15 @@ ${lanes.join("\n")} } if (symbol === argumentsSymbol) { if (isInPropertyInitializerOrClassStaticBlock(node)) { - error(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers); + error2(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers); return errorType; } const container = getContainingFunction(node); if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 218 /* ArrowFunction */) { - error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); + if (container.kind === 219 /* ArrowFunction */) { + error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } else if (hasSyntacticModifier(container, 512 /* Async */)) { - error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); + error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); } } getNodeLinks(container).flags |= 512 /* CaptureArguments */; @@ -68319,17 +68815,7 @@ ${lanes.join("\n")} } let declaration = localOrExportSymbol.valueDeclaration; if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (declaration.kind === 262 /* ClassDeclaration */ && nodeIsDecorated(legacyDecorators, declaration)) { - let container = getContainingClass(node); - while (container !== void 0) { - if (container === declaration && container.name !== node) { - getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; - getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */; - break; - } - container = getContainingClass(container); - } - } else if (declaration.kind === 230 /* ClassExpression */) { + if (isClassLike(declaration) && declaration.name !== node) { let container = getThisContainer( node, /*includeArrowFunctions*/ @@ -68337,14 +68823,7 @@ ${lanes.join("\n")} /*includeClassComputedPropertyName*/ false ); - while (container.kind !== 311 /* SourceFile */) { - if (container.parent === declaration) { - if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) { - getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */; - getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */; - } - break; - } + while (container.kind !== 312 /* SourceFile */ && container.parent !== declaration) { container = getThisContainer( container, /*includeArrowFunctions*/ @@ -68353,6 +68832,11 @@ ${lanes.join("\n")} false ); } + if (container.kind !== 312 /* SourceFile */) { + getNodeLinks(declaration).flags |= 262144 /* ContainsConstructorReference */; + getNodeLinks(container).flags |= 262144 /* ContainsConstructorReference */; + getNodeLinks(node).flags |= 536870912 /* ConstructorReference */; + } } } checkNestedBlockScopedBinding(node, symbol); @@ -68361,14 +68845,14 @@ ${lanes.join("\n")} if (assignmentKind) { if (!(localOrExportSymbol.flags & 3 /* Variable */) && !(isInJSFile(node) && localOrExportSymbol.flags & 512 /* ValueModule */)) { const assignmentError = localOrExportSymbol.flags & 384 /* Enum */ ? Diagnostics.Cannot_assign_to_0_because_it_is_an_enum : localOrExportSymbol.flags & 32 /* Class */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_class : localOrExportSymbol.flags & 1536 /* Module */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_namespace : localOrExportSymbol.flags & 16 /* Function */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_function : localOrExportSymbol.flags & 2097152 /* Alias */ ? Diagnostics.Cannot_assign_to_0_because_it_is_an_import : Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable; - error(node, assignmentError, symbolToString(symbol)); + error2(node, assignmentError, symbolToString(symbol)); return errorType; } if (isReadonlySymbol(localOrExportSymbol)) { if (localOrExportSymbol.flags & 3 /* Variable */) { - error(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_constant, symbolToString(symbol)); + error2(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_constant, symbolToString(symbol)); } else { - error(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(symbol)); + error2(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(symbol)); } return errorType; } @@ -68387,30 +68871,30 @@ ${lanes.join("\n")} return type; } type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 168 /* Parameter */; + const isParameter2 = getRootDeclaration(declaration).kind === 169 /* Parameter */; const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); const isModuleExports = symbol.flags & 134217728 /* ModuleExports */; const typeIsAutomatic = type === autoType || type === autoArrayType; - const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 234 /* NonNullExpression */; - while (flowContainer !== declarationContainer && (flowContainer.kind === 217 /* FunctionExpression */ || flowContainer.kind === 218 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { + const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 235 /* NonNullExpression */; + while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { flowContainer = getControlFlowContainer(flowContainer); } - const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 280 /* ExportSpecifier */) || node.parent.kind === 234 /* NonNullExpression */ || declaration.kind === 259 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */; + const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */; const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type); const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer); if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) { if (flowType === autoType || flowType === autoArrayType) { if (noImplicitAny) { - error(getNameOfDeclaration(declaration), Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType)); - error(node, Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); + error2(getNameOfDeclaration(declaration), Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType)); + error2(node, Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); } return convertAutoToAny(flowType); } } else if (!assumeInitialized && !containsUndefinedType(type) && containsUndefinedType(flowType)) { - error(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + error2(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); return type; } return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; @@ -68452,7 +68936,7 @@ ${lanes.join("\n")} )); } function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 298 /* CatchClause */) { + if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 299 /* CatchClause */) { return; } const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); @@ -68462,7 +68946,7 @@ ${lanes.join("\n")} if (isCaptured) { let capturesBlockScopeBindingInLoopBody = true; if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 260 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container) { const part = getPartOfForStatementContainingNode(node.parent, container); if (part) { @@ -68481,9 +68965,9 @@ ${lanes.join("\n")} } } if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 260 /* VariableDeclarationList */); + const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { - getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */; + getNodeLinks(symbol.valueDeclaration).flags |= 65536 /* NeedsLoopOutParameter */; } } getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */; @@ -68498,13 +68982,13 @@ ${lanes.join("\n")} } function isAssignedInBodyOfForStatement(node, container) { let current = node; - while (current.parent.kind === 216 /* ParenthesizedExpression */) { + while (current.parent.kind === 217 /* ParenthesizedExpression */) { current = current.parent; } let isAssigned = false; if (isAssignmentTarget(current)) { isAssigned = true; - } else if (current.parent.kind === 223 /* PrefixUnaryExpression */ || current.parent.kind === 224 /* PostfixUnaryExpression */) { + } else if (current.parent.kind === 224 /* PrefixUnaryExpression */ || current.parent.kind === 225 /* PostfixUnaryExpression */) { const expr = current.parent; isAssigned = expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; } @@ -68515,7 +68999,7 @@ ${lanes.join("\n")} } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 171 /* PropertyDeclaration */ || container.kind === 175 /* Constructor */) { + if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) { const classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } else { @@ -68540,13 +69024,13 @@ ${lanes.join("\n")} /*noCacheCheck*/ false )) { - error(node, diagnosticMessage); + error2(node, diagnosticMessage); } } } function checkThisInStaticClassFieldInitializerInDecoratedClass(thisExpression, container) { if (isPropertyDeclaration(container) && hasStaticModifier(container) && legacyDecorators && container.initializer && textRangeContainsPositionInclusive(container.initializer, thisExpression.pos) && hasDecorators(container.parent)) { - error(thisExpression, Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class); + error2(thisExpression, Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class); } } function checkThisExpression(node) { @@ -68560,11 +69044,11 @@ ${lanes.join("\n")} ); let capturedByArrowFunction = false; let thisInComputedPropertyName = false; - if (container.kind === 175 /* Constructor */) { + if (container.kind === 176 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); } while (true) { - if (container.kind === 218 /* ArrowFunction */) { + if (container.kind === 219 /* ArrowFunction */) { container = getThisContainer( container, /*includeArrowFunctions*/ @@ -68573,7 +69057,7 @@ ${lanes.join("\n")} ); capturedByArrowFunction = true; } - if (container.kind === 166 /* ComputedPropertyName */) { + if (container.kind === 167 /* ComputedPropertyName */) { container = getThisContainer( container, !capturedByArrowFunction, @@ -68587,18 +69071,18 @@ ${lanes.join("\n")} } checkThisInStaticClassFieldInitializerInDecoratedClass(node, container); if (thisInComputedPropertyName) { - error(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); + error2(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); } else { switch (container.kind) { - case 266 /* ModuleDeclaration */: - error(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); + case 267 /* ModuleDeclaration */: + error2(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); break; - case 265 /* EnumDeclaration */: - error(node, Diagnostics.this_cannot_be_referenced_in_current_location); + case 266 /* EnumDeclaration */: + error2(node, Diagnostics.this_cannot_be_referenced_in_current_location); break; - case 175 /* Constructor */: + case 176 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { - error(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); + error2(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; } @@ -68615,9 +69099,9 @@ ${lanes.join("\n")} if (noImplicitThis) { const globalThisType2 = getTypeOfSymbol(globalThisSymbol); if (type === globalThisType2 && capturedByArrowFunction) { - error(node, Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this); + error2(node, Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this); } else if (!type) { - const diag2 = error(node, Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation); + const diag2 = error2(node, Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation); if (!isSourceFile(container)) { const outsideThis = tryGetThisTypeAt(container); if (outsideThis && outsideThis !== globalThisType2) { @@ -68690,36 +69174,33 @@ ${lanes.join("\n")} } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 217 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { + if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { return container.parent.left.expression.expression; - } else if (container.kind === 173 /* MethodDeclaration */ && container.parent.kind === 209 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { return container.parent.parent.left.expression; - } else if (container.kind === 217 /* FunctionExpression */ && container.parent.kind === 302 /* PropertyAssignment */ && container.parent.parent.kind === 209 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { + } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 303 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 217 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { + } else if (container.kind === 218 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.parent.arguments[0].expression; } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { return container.parent.parent.arguments[0].expression; } } function getTypeForThisExpressionFromJSDoc(node) { - const jsdocType = getJSDocType(node); - if (jsdocType && jsdocType.kind === 323 /* JSDocFunctionType */) { - const jsDocFunctionType = jsdocType; - if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].name && jsDocFunctionType.parameters[0].name.escapedText === "this" /* This */) { - return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); - } - } const thisTag = getJSDocThisTag(node); if (thisTag && thisTag.typeExpression) { return getTypeFromTypeNode(thisTag.typeExpression); } + const signature = getSignatureOfTypeTag(node); + if (signature) { + return getThisTypeOfSignature(signature); + } } function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 168 /* Parameter */ && n.parent === constructorDecl); + return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl); } function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 212 /* CallExpression */ && node.parent.expression === node; + const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node; const immediateContainer = getSuperContainer( node, /*stopOnFunctions*/ @@ -68729,7 +69210,7 @@ ${lanes.join("\n")} let needToCaptureLexicalThis = false; let inAsyncFunction = false; if (!isCallExpression2) { - while (container && container.kind === 218 /* ArrowFunction */) { + while (container && container.kind === 219 /* ArrowFunction */) { if (hasSyntacticModifier(container, 512 /* Async */)) inAsyncFunction = true; container = getSuperContainer( @@ -68744,19 +69225,19 @@ ${lanes.join("\n")} } let nodeCheckFlag = 0; if (!container || !isLegalUsageOfSuperExpression(container)) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 166 /* ComputedPropertyName */); - if (current && current.kind === 166 /* ComputedPropertyName */) { - error(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); + const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 167 /* ComputedPropertyName */); + if (current && current.kind === 167 /* ComputedPropertyName */) { + error2(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression2) { - error(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 209 /* ObjectLiteralExpression */)) { - error(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); + error2(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); + } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 210 /* ObjectLiteralExpression */)) { + error2(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { - error(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); + error2(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); } return errorType; } - if (!isCallExpression2 && immediateContainer.kind === 175 /* Constructor */) { + if (!isCallExpression2 && immediateContainer.kind === 176 /* Constructor */) { checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); } if (isStatic(container) || isCallExpression2) { @@ -68764,7 +69245,7 @@ ${lanes.join("\n")} if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) { forEachEnclosingBlockScopeContainer(node.parent, (current) => { if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) { - getNodeLinks(current).flags |= 8388608 /* ContainsSuperPropertyInStaticInitializer */; + getNodeLinks(current).flags |= 2097152 /* ContainsSuperPropertyInStaticInitializer */; } }); } @@ -68772,7 +69253,7 @@ ${lanes.join("\n")} nodeCheckFlag = 16 /* SuperInstance */; } getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 173 /* MethodDeclaration */ && inAsyncFunction) { + if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) { if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */; } else { @@ -68782,9 +69263,9 @@ ${lanes.join("\n")} if (needToCaptureLexicalThis) { captureLexicalThis(node.parent, container); } - if (container.parent.kind === 209 /* ObjectLiteralExpression */) { + if (container.parent.kind === 210 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES2015 */) { - error(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); + error2(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return errorType; } else { return anyType; @@ -68792,7 +69273,7 @@ ${lanes.join("\n")} } const classLikeDeclaration = container.parent; if (!getClassExtendsHeritageElement(classLikeDeclaration)) { - error(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class); + error2(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class); return errorType; } const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration)); @@ -68800,20 +69281,20 @@ ${lanes.join("\n")} if (!baseClassType) { return errorType; } - if (container.kind === 175 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { - error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); + if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + error2(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return errorType; } return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType); function isLegalUsageOfSuperExpression(container2) { if (isCallExpression2) { - return container2.kind === 175 /* Constructor */; + return container2.kind === 176 /* Constructor */; } else { - if (isClassLike(container2.parent) || container2.parent.kind === 209 /* ObjectLiteralExpression */) { + if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) { if (isStatic(container2)) { - return container2.kind === 173 /* MethodDeclaration */ || container2.kind === 172 /* MethodSignature */ || container2.kind === 176 /* GetAccessor */ || container2.kind === 177 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 174 /* ClassStaticBlockDeclaration */; + return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */; } else { - return container2.kind === 173 /* MethodDeclaration */ || container2.kind === 172 /* MethodSignature */ || container2.kind === 176 /* GetAccessor */ || container2.kind === 177 /* SetAccessor */ || container2.kind === 171 /* PropertyDeclaration */ || container2.kind === 170 /* PropertySignature */ || container2.kind === 175 /* Constructor */; + return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 176 /* Constructor */; } } } @@ -68821,7 +69302,7 @@ ${lanes.join("\n")} } } function getContainingObjectLiteral(func) { - return (func.kind === 173 /* MethodDeclaration */ || func.kind === 176 /* GetAccessor */ || func.kind === 177 /* SetAccessor */) && func.parent.kind === 209 /* ObjectLiteralExpression */ ? func.parent : func.kind === 217 /* FunctionExpression */ && func.parent.kind === 302 /* PropertyAssignment */ ? func.parent.parent : void 0; + return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 303 /* PropertyAssignment */ ? func.parent.parent : void 0; } function getThisTypeArgument(type) { return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; @@ -68831,8 +69312,27 @@ ${lanes.join("\n")} return t.flags & 2097152 /* Intersection */ ? forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t); }); } + function getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType) { + let literal = containingLiteral; + let type = contextualType; + while (type) { + const thisType = getThisTypeFromContextualType(type); + if (thisType) { + return thisType; + } + if (literal.parent.kind !== 303 /* PropertyAssignment */) { + break; + } + literal = literal.parent.parent; + type = getApparentTypeOfContextualType( + literal, + /*contextFlags*/ + void 0 + ); + } + } function getContextualThisParameterType(func) { - if (func.kind === 218 /* ArrowFunction */) { + if (func.kind === 219 /* ArrowFunction */) { return void 0; } if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { @@ -68853,27 +69353,14 @@ ${lanes.join("\n")} /*contextFlags*/ void 0 ); - let literal = containingLiteral; - let type = contextualType; - while (type) { - const thisType = getThisTypeFromContextualType(type); - if (thisType) { - return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); - } - if (literal.parent.kind !== 302 /* PropertyAssignment */) { - break; - } - literal = literal.parent.parent; - type = getApparentTypeOfContextualType( - literal, - /*contextFlags*/ - void 0 - ); + const thisType = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); + if (thisType) { + return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); } return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */) { + if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -68928,11 +69415,11 @@ ${lanes.join("\n")} return getTypeFromTypeNode(typeNode); } switch (declaration.kind) { - case 168 /* Parameter */: + case 169 /* Parameter */: return getContextuallyTypedParameterType(declaration); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getContextualTypeForBindingElement(declaration, contextFlags); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isStatic(declaration)) { return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); } @@ -68941,10 +69428,10 @@ ${lanes.join("\n")} function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 207 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; - if (parent2.name.kind === 206 /* ArrayBindingPattern */) { + if (parent2.name.kind === 207 /* ArrayBindingPattern */) { const index = indexOfNode(declaration.parent.elements, declaration); if (index < 0) return void 0; @@ -69094,7 +69581,7 @@ ${lanes.join("\n")} return signature ? getOrCreateTypeFromSignature(signature) : void 0; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 214 /* TaggedTemplateExpression */) { + if (template.parent.kind === 215 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return void 0; @@ -69312,7 +69799,7 @@ ${lanes.join("\n")} } function getContextualTypeForObjectLiteralMethod(node, contextFlags) { Debug.assert(isObjectLiteralMethod(node)); - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } return getContextualTypeForObjectLiteralElement(node, contextFlags); @@ -69448,16 +69935,17 @@ ${lanes.join("\n")} case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: + case 228 /* TemplateExpression */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 80 /* Identifier */: case 157 /* UndefinedKeyword */: return true; - case 210 /* PropertyAccessExpression */: - case 216 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 217 /* ParenthesizedExpression */: return isPossiblyDiscriminantValue(node.expression); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return !node.expression || isPossiblyDiscriminantValue(node.expression); } return false; @@ -69467,7 +69955,7 @@ ${lanes.join("\n")} contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 302 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), + filter(node.properties, (p) => !!p.symbol && p.kind === 303 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -69487,7 +69975,7 @@ ${lanes.join("\n")} contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 290 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), + filter(node.properties, (p) => !!p.symbol && p.kind === 291 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] ), map( @@ -69552,7 +70040,7 @@ ${lanes.join("\n")} } function getContextualType2(node, contextFlags) { var _a; - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } const index = findContextualNode( @@ -69565,47 +70053,47 @@ ${lanes.join("\n")} } const { parent: parent2 } = node; switch (parent2.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 208 /* BindingElement */: return getContextualTypeForInitializerExpression(node, contextFlags); - case 218 /* ArrowFunction */: - case 252 /* ReturnStatement */: + case 219 /* ArrowFunction */: + case 253 /* ReturnStatement */: return getContextualTypeForReturnExpression(node, contextFlags); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return getContextualTypeForYieldOperand(parent2, contextFlags); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: return getContextualTypeForArgument(parent2, node); - case 169 /* Decorator */: + case 170 /* Decorator */: return getContextualTypeForDecorator(parent2); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return isConstTypeReference(parent2.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(parent2.type); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node, contextFlags); - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return getContextualType2(parent2.parent, contextFlags); - case 208 /* ArrayLiteralExpression */: { + case 209 /* ArrayLiteralExpression */: { const arrayLiteral = parent2; const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); const elementIndex = indexOfNode(arrayLiteral.elements, node); const spreadIndices = (_a = getNodeLinks(arrayLiteral)).spreadIndices ?? (_a.spreadIndices = getSpreadIndices(arrayLiteral.elements)); return getContextualTypeForElementExpression(type, elementIndex, arrayLiteral.elements.length, spreadIndices.first, spreadIndices.last); } - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node, contextFlags); - case 238 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 227 /* TemplateExpression */); + case 239 /* TemplateSpan */: + Debug.assert(parent2.parent.kind === 228 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 216 /* ParenthesizedExpression */: { + case 217 /* ParenthesizedExpression */: { if (isInJSFile(parent2)) { if (isJSDocSatisfiesExpression(parent2)) { return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2)); @@ -69617,19 +70105,19 @@ ${lanes.join("\n")} } return getContextualType2(parent2, contextFlags); } - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return getContextualType2(parent2, contextFlags); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return getTypeFromTypeNode(parent2.type); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return tryGetTypeFromEffectiveTypeNode(parent2); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return getContextualTypeForJsxExpression(parent2, contextFlags); - case 290 /* JsxAttribute */: - case 292 /* JsxSpreadAttribute */: + case 291 /* JsxAttribute */: + case 293 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return getContextualJsxElementAttributesType(parent2, contextFlags); } return void 0; @@ -69756,7 +70244,7 @@ ${lanes.join("\n")} let attributesType = forcedLookupLocation === void 0 ? getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType) : forcedLookupLocation === "" ? getReturnTypeOfSignature(sig) : getJsxPropsTypeForSignatureFromMember(sig, forcedLookupLocation); if (!attributesType) { if (!!forcedLookupLocation && !!length(context.attributes.properties)) { - error(context, Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, unescapeLeadingUnderscores(forcedLookupLocation)); + error2(context, Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, unescapeLeadingUnderscores(forcedLookupLocation)); } return unknownType; } @@ -69858,7 +70346,7 @@ ${lanes.join("\n")} /*resolvedTypePredicate*/ void 0, minArgCount, - (left.flags | right.flags) & 39 /* PropagatingFlags */ + (left.flags | right.flags) & 167 /* PropagatingFlags */ ); result.compositeKind = 2097152 /* Intersection */; result.compositeSignatures = concatenate(left.compositeKind === 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); @@ -69889,7 +70377,7 @@ ${lanes.join("\n")} return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; } function getContextualSignature(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const typeTagSignature = getSignatureOfTypeTag(node); if (typeTagSignature) { return typeTagSignature; @@ -69940,7 +70428,11 @@ ${lanes.join("\n")} return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; } function hasDefaultValue(node) { - return node.kind === 207 /* BindingElement */ && !!node.initializer || node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; + return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; + } + function isSpreadIntoCallOrNew(node) { + const parent2 = walkUpParenthesizedExpressions(node.parent); + return isSpreadElement(parent2) && isCallOrNewExpression(parent2.parent); } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -69949,18 +70441,17 @@ ${lanes.join("\n")} const elementFlags = []; pushCachedContextualType(node); const inDestructuringPattern = isAssignmentTarget(node); - const isSpreadIntoCallOrNew = isSpreadElement(node.parent) && isCallOrNewExpression(node.parent.parent); - const inConstContext = isSpreadIntoCallOrNew || isConstContext(node); + const inConstContext = isConstContext(node); const contextualType = getApparentTypeOfContextualType( node, /*contextFlags*/ void 0 ); - const inTupleContext = isSpreadIntoCallOrNew || !!contextualType && someType(contextualType, isTupleLikeType); + const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, isTupleLikeType); let hasOmittedExpression = false; for (let i = 0; i < elementCount; i++) { const e = elements[i]; - if (e.kind === 229 /* SpreadElement */) { + if (e.kind === 230 /* SpreadElement */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); } @@ -69984,7 +70475,7 @@ ${lanes.join("\n")} elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); elementFlags.push(4 /* Rest */); } - } else if (exactOptionalPropertyTypes && e.kind === 231 /* OmittedExpression */) { + } else if (exactOptionalPropertyTypes && e.kind === 232 /* OmittedExpression */) { hasOmittedExpression = true; elementTypes.push(undefinedOrMissingType); elementFlags.push(2 /* Optional */); @@ -70031,7 +70522,7 @@ ${lanes.join("\n")} } function isNumericName(name) { switch (name.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return isNumericComputedName(name); case 80 /* Identifier */: return isNumericLiteralName(name.escapedText); @@ -70048,7 +70539,7 @@ ${lanes.join("\n")} function checkComputedPropertyName(node) { const links = getNodeLinks(node.expression); if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 176 /* GetAccessor */ && node.parent.kind !== 177 /* SetAccessor */) { + if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* SetAccessor */) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -70062,7 +70553,7 @@ ${lanes.join("\n")} } } if (links.resolvedType.flags & 98304 /* Nullable */ || !isTypeAssignableToKind(links.resolvedType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */) && !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) { - error(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); + error2(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); } } return links.resolvedType; @@ -70117,7 +70608,7 @@ ${lanes.join("\n")} /*contextFlags*/ void 0 ); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 205 /* ObjectBindingPattern */ || contextualType.pattern.kind === 209 /* ObjectLiteralExpression */); + const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */); const inConstContext = isConstContext(node); const checkFlags = inConstContext ? 8 /* Readonly */ : 0; const isInJavascript = isInJSFile(node) && !isInJsonFile(node); @@ -70136,13 +70627,13 @@ ${lanes.join("\n")} let offset = 0; for (const memberDecl of node.properties) { let member = getSymbolOfDeclaration(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 166 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 302 /* PropertyAssignment */ || memberDecl.kind === 303 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 302 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( + const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; + if (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { + let type = memberDecl.kind === 303 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. // we don't want to say "could not find 'a'". - memberDecl.kind === 303 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) + memberDecl.kind === 304 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) ); if (isInJavascript) { const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); @@ -70160,7 +70651,7 @@ ${lanes.join("\n")} prop.links.nameType = nameType; } if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 302 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 303 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; + const isOptional = memberDecl.kind === 303 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; if (isOptional) { prop.flags |= 16777216 /* Optional */; } @@ -70169,7 +70660,7 @@ ${lanes.join("\n")} if (impliedProp) { prop.flags |= impliedProp.flags & 16777216 /* Optional */; } else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, stringType)) { - error( + error2( memberDecl.name, Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), @@ -70186,13 +70677,13 @@ ${lanes.join("\n")} prop.links.target = member; member = prop; allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 302 /* PropertyAssignment */ || memberDecl.kind === 173 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { + if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { const inferenceContext = getInferenceContext(node); Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 302 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; + const inferenceNode = memberDecl.kind === 303 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); } - } else if (memberDecl.kind === 304 /* SpreadAssignment */) { + } else if (memberDecl.kind === 305 /* SpreadAssignment */) { if (languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(memberDecl, 2 /* Assign */); } @@ -70216,12 +70707,12 @@ ${lanes.join("\n")} } spread = getSpreadType(spread, mergedType, node.symbol, objectFlags, inConstContext); } else { - error(memberDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types); + error2(memberDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types); spread = errorType; } continue; } else { - Debug.assert(memberDecl.kind === 176 /* GetAccessor */ || memberDecl.kind === 177 /* SetAccessor */); + Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */); checkNodeDeferred(memberDecl); } if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { @@ -70246,17 +70737,17 @@ ${lanes.join("\n")} if (contextualTypeHasPattern) { const rootPatternParent = findAncestor( contextualType.pattern.parent, - (n) => n.kind === 259 /* VariableDeclaration */ || n.kind === 225 /* BinaryExpression */ || n.kind === 168 /* Parameter */ + (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */ ); const spreadOrOutsideRootObject = findAncestor( node, - (n) => n === rootPatternParent || n.kind === 304 /* SpreadAssignment */ + (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */ ); - if (spreadOrOutsideRootObject.kind !== 304 /* SpreadAssignment */) { + if (spreadOrOutsideRootObject.kind !== 305 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { - error( + error2( prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value ); @@ -70331,7 +70822,7 @@ ${lanes.join("\n")} checkJsxOpeningLikeElementOrOpeningFragment(node.openingFragment); const nodeSourceFile = getSourceFileOfNode(node); if (getJSXTransformEnabled(compilerOptions) && (compilerOptions.jsxFactory || nodeSourceFile.pragmas.has("jsx")) && !compilerOptions.jsxFragmentFactory && !nodeSourceFile.pragmas.has("jsxfrag")) { - error(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments); + error2(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments); } checkJsxChildren(node); return getJsxElementTypeAt(node) || anyType; @@ -70387,7 +70878,7 @@ ${lanes.join("\n")} addIntraExpressionInferenceSite(inferenceContext, inferenceNode, exprType); } } else { - Debug.assert(attributeDecl.kind === 292 /* JsxSpreadAttribute */); + Debug.assert(attributeDecl.kind === 293 /* JsxSpreadAttribute */); if (attributesTable.size > 0) { spread = getSpreadType( spread, @@ -70416,7 +70907,7 @@ ${lanes.join("\n")} checkSpreadPropOverrides(exprType, allAttributesTable, attributeDecl); } } else { - error(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types); + error2(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types); typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType; } } @@ -70433,12 +70924,12 @@ ${lanes.join("\n")} ); } } - const parent2 = openingLikeElement.parent.kind === 283 /* JsxElement */ ? openingLikeElement.parent : void 0; + const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0; if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { if (explicitlySpecifyChildrenAttribute) { - error(attributes, Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, unescapeLeadingUnderscores(jsxChildrenPropertyName)); + error2(attributes, Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, unescapeLeadingUnderscores(jsxChildrenPropertyName)); } const contextualType2 = getApparentTypeOfContextualType( openingLikeElement.attributes, @@ -70492,7 +70983,7 @@ ${lanes.join("\n")} if (!child.containsOnlyTriviaWhiteSpaces) { childrenTypes.push(stringType); } - } else if (child.kind === 293 /* JsxExpression */ && !child.expression) { + } else if (child.kind === 294 /* JsxExpression */ && !child.expression) { continue; } else { childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); @@ -70505,7 +70996,7 @@ ${lanes.join("\n")} if (!(right.flags & 16777216 /* Optional */)) { const left = props.get(right.escapedName); if (left) { - const diagnostic = error(left.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(left.escapedName)); + const diagnostic = error2(left.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(left.escapedName)); addRelatedInfo(diagnostic, createDiagnosticForNode(spread, Diagnostics.This_spread_always_overwrites_this_property)); } } @@ -70537,11 +71028,11 @@ ${lanes.join("\n")} links.jsxFlags |= 2 /* IntrinsicIndexedElement */; return links.resolvedSymbol = intrinsicElementsType.symbol; } - error(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements); + error2(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements); return links.resolvedSymbol = unknownSymbol; } else { if (noImplicitAny) { - error(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, unescapeLeadingUnderscores(JsxNames.IntrinsicElements)); + error2(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, unescapeLeadingUnderscores(JsxNames.IntrinsicElements)); } return links.resolvedSymbol = unknownSymbol; } @@ -70624,7 +71115,7 @@ ${lanes.join("\n")} } else if (propertiesOfJsxElementAttribPropInterface.length === 1) { return propertiesOfJsxElementAttribPropInterface[0].escapedName; } else if (propertiesOfJsxElementAttribPropInterface.length > 1 && jsxElementAttribPropInterfaceSym.declarations) { - error(jsxElementAttribPropInterfaceSym.declarations[0], Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, unescapeLeadingUnderscores(nameOfAttribPropContainer)); + error2(jsxElementAttribPropInterfaceSym.declarations[0], Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, unescapeLeadingUnderscores(nameOfAttribPropContainer)); } } return void 0; @@ -70647,7 +71138,7 @@ ${lanes.join("\n")} } else if (elementType.flags & 128 /* StringLiteral */) { const intrinsicType = getIntrinsicAttributesTypeFromStringLiteralType(elementType, caller); if (!intrinsicType) { - error(caller, Diagnostics.Property_0_does_not_exist_on_type_1, elementType.value, "JSX." + JsxNames.IntrinsicElements); + error2(caller, Diagnostics.Property_0_does_not_exist_on_type_1, elementType.value, "JSX." + JsxNames.IntrinsicElements); return emptyArray; } else { const fakeSignature = createSignatureForJSXIntrinsic(caller, intrinsicType); @@ -70773,11 +71264,11 @@ ${lanes.join("\n")} } function checkJsxPreconditions(errorNode) { if ((compilerOptions.jsx || 0 /* None */) === 0 /* None */) { - error(errorNode, Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided); + error2(errorNode, Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided); } if (getJsxElementTypeAt(errorNode) === void 0) { if (noImplicitAny) { - error(errorNode, Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist); + error2(errorNode, Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist); } } } @@ -70869,7 +71360,7 @@ ${lanes.join("\n")} if (node.expression) { const type = checkExpression(node.expression, checkMode); if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) { - error(node, Diagnostics.JSX_spread_child_must_be_an_array_type); + error2(node, Diagnostics.JSX_spread_child_must_be_an_array_type); } return type; } else { @@ -70877,7 +71368,7 @@ ${lanes.join("\n")} } } function getDeclarationNodeFlagsFromSymbol(s) { - return s.valueDeclaration ? getCombinedNodeFlags(s.valueDeclaration) : 0; + return s.valueDeclaration ? getCombinedNodeFlagsCached(s.valueDeclaration) : 0; } function isPrototypeProperty(symbol) { if (symbol.flags & 8192 /* Method */ || getCheckFlags(symbol) & 4 /* SyntheticMethod */) { @@ -70889,7 +71380,7 @@ ${lanes.join("\n")} } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 165 /* QualifiedName */ ? node.right : node.kind === 204 /* ImportType */ ? node : node.kind === 207 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; + const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { @@ -70898,14 +71389,14 @@ ${lanes.join("\n")} if (languageVersion < 2 /* ES2015 */) { if (symbolHasNonMethodDeclaration(prop)) { if (errorNode) { - error(errorNode, Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); + error2(errorNode, Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); } return false; } } if (flags & 256 /* Abstract */) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), @@ -70919,7 +71410,7 @@ ${lanes.join("\n")} const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), @@ -70936,7 +71427,7 @@ ${lanes.join("\n")} const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (!isNodeWithinClass(location, declaringClassDeclaration)) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), @@ -70959,7 +71450,7 @@ ${lanes.join("\n")} enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing); if (flags & 32 /* Static */ || !enclosingClass) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), @@ -70977,7 +71468,7 @@ ${lanes.join("\n")} } if (!containingType || !hasBaseType(containingType, enclosingClass)) { if (errorNode) { - error( + error2( errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, symbolToString(prop), @@ -71025,28 +71516,28 @@ ${lanes.join("\n")} function reportObjectPossiblyNullOrUndefinedError(node, facts) { const nodeText2 = isEntityNameExpression(node) ? entityNameToString(node) : void 0; if (node.kind === 106 /* NullKeyword */) { - error(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); + error2(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); return; } if (nodeText2 !== void 0 && nodeText2.length < 100) { if (isIdentifier(node) && nodeText2 === "undefined") { - error(node, Diagnostics.The_value_0_cannot_be_used_here, "undefined"); + error2(node, Diagnostics.The_value_0_cannot_be_used_here, "undefined"); return; } - error( + error2( node, facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics._0_is_possibly_null_or_undefined : Diagnostics._0_is_possibly_undefined : Diagnostics._0_is_possibly_null, nodeText2 ); } else { - error( + error2( node, facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics.Object_is_possibly_null_or_undefined : Diagnostics.Object_is_possibly_undefined : Diagnostics.Object_is_possibly_null ); } } function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) { - error( + error2( node, facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : Diagnostics.Cannot_invoke_an_object_which_is_possibly_null ); @@ -71056,11 +71547,11 @@ ${lanes.join("\n")} if (isEntityNameExpression(node)) { const nodeText2 = entityNameToString(node); if (nodeText2.length < 100) { - error(node, Diagnostics._0_is_of_type_unknown, nodeText2); + error2(node, Diagnostics._0_is_of_type_unknown, nodeText2); return errorType; } } - error(node, Diagnostics.Object_is_of_type_unknown); + error2(node, Diagnostics.Object_is_of_type_unknown); return errorType; } const facts = getTypeFacts(type); @@ -71080,20 +71571,20 @@ ${lanes.join("\n")} if (isEntityNameExpression(node)) { const nodeText2 = entityNameToString(node); if (isIdentifier(node) && nodeText2 === "undefined") { - error(node, Diagnostics.The_value_0_cannot_be_used_here, nodeText2); + error2(node, Diagnostics.The_value_0_cannot_be_used_here, nodeText2); return nonNullType; } if (nodeText2.length < 100) { - error(node, Diagnostics._0_is_possibly_undefined, nodeText2); + error2(node, Diagnostics._0_is_possibly_undefined, nodeText2); return nonNullType; } } - error(node, Diagnostics.Object_is_possibly_undefined); + error2(node, Diagnostics.Object_is_possibly_undefined); } return nonNullType; } function checkPropertyAccessExpression(node, checkMode, writeOnly) { - return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); + return node.flags & 64 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); } function checkPropertyAccessChain(node, checkMode) { const leftType = checkExpression(node.expression); @@ -71105,13 +71596,13 @@ ${lanes.join("\n")} return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); } function isMethodAccessForCall(node) { - while (node.parent.kind === 216 /* ParenthesizedExpression */) { + while (node.parent.kind === 217 /* ParenthesizedExpression */) { node = node.parent; } return isCallOrNewExpression(node.parent) && node.parent.expression === node; } function lookupSymbolForPrivateIdentifierDeclaration(propName, location) { - for (let containingClass = getContainingClass(location); !!containingClass; containingClass = getContainingClass(containingClass)) { + for (let containingClass = getContainingClassExcludingClassDecorators(location); !!containingClass; containingClass = getContainingClass(containingClass)) { const { symbol } = containingClass; const name = getSymbolNameForPrivateIdentifier(symbol, propName); const prop = symbol.members && symbol.members.get(name) || symbol.exports && symbol.exports.get(name); @@ -71183,7 +71674,7 @@ ${lanes.join("\n")} const lexicalClass = getContainingClass(lexicalValueDecl); Debug.assert(!!lexicalClass); if (findAncestor(lexicalClass, (n) => typeClass === n)) { - const diagnostic = error( + const diagnostic = error2( right, Diagnostics.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling, diagName, @@ -71205,7 +71696,7 @@ ${lanes.join("\n")} return true; } } - error( + error2( right, Diagnostics.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier, diagName, @@ -71247,18 +71738,24 @@ ${lanes.join("\n")} if (lexicallyScopedSymbol) { return isErrorType(apparentType) ? errorType : apparentType; } - if (!getContainingClass(right)) { + if (getContainingClassExcludingClassDecorators(right) === void 0) { grammarErrorOnNode(right, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); return anyType; } } - prop = lexicallyScopedSymbol ? getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol) : void 0; - if (!prop && checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { - return errorType; + prop = lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol); + if (prop === void 0) { + if (checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { + return errorType; + } + const containingClass = getContainingClassExcludingClassDecorators(right); + if (containingClass && isPlainJsFile(getSourceFileOfNode(containingClass), compilerOptions.checkJs)) { + grammarErrorOnNode(right, Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class, idText(right)); + } } else { - const isSetonlyAccessor = prop && prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); + const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); if (isSetonlyAccessor && assignmentKind !== 1 /* Definite */) { - error(node, Diagnostics.Private_accessor_was_defined_without_a_getter); + error2(node, Diagnostics.Private_accessor_was_defined_without_a_getter); } } } else { @@ -71274,10 +71771,10 @@ ${lanes.join("\n")} /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ - node.kind === 165 /* QualifiedName */ + node.kind === 166 /* QualifiedName */ ); } - if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 305 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { + if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 306 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } let propType; @@ -71295,9 +71792,9 @@ ${lanes.join("\n")} } if (leftType.symbol === globalThisSymbol) { if (globalThisSymbol.exports.has(right.escapedText) && globalThisSymbol.exports.get(right.escapedText).flags & 418 /* BlockScoped */) { - error(right, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(right.escapedText), typeToString(leftType)); + error2(right, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(right.escapedText), typeToString(leftType)); } else if (noImplicitAny) { - error(right, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature, typeToString(leftType)); + error2(right, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature, typeToString(leftType)); } return anyType; } @@ -71307,13 +71804,13 @@ ${lanes.join("\n")} return errorType; } if (indexInfo.isReadonly && (isAssignmentTarget(node) || isDeleteTarget(node))) { - error(node, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(apparentType)); + error2(node, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(apparentType)); } propType = compilerOptions.noUncheckedIndexedAccess && !isAssignmentTarget(node) ? getUnionType([indexInfo.type, missingType]) : indexInfo.type; if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression(node)) { - error(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText)); + error2(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText)); } - if (indexInfo.declaration && getCombinedNodeFlags(indexInfo.declaration) & 268435456 /* Deprecated */) { + if (indexInfo.declaration && isDeprecatedDeclaration2(indexInfo.declaration)) { addDeprecatedSuggestion(right, [indexInfo.declaration], right.escapedText); } } else { @@ -71326,7 +71823,7 @@ ${lanes.join("\n")} getNodeLinks(node).resolvedSymbol = prop; checkPropertyAccessibility(node, left.kind === 108 /* SuperKeyword */, isWriteAccess(node), apparentType, prop); if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) { - error(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); + error2(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); return errorType; } propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writeOnly || isWriteOnlyAccess(node) ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); @@ -71361,7 +71858,7 @@ ${lanes.join("\n")} if (declaration && isPropertyWithoutInitializer(declaration)) { if (!isStatic(declaration)) { const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 175 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 16777216 /* Ambient */)) { + if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 33554432 /* Ambient */)) { assumeUninitialized = true; } } @@ -71371,7 +71868,7 @@ ${lanes.join("\n")} } const flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType); if (assumeUninitialized && !containsUndefinedType(propType) && containsUndefinedType(flowType)) { - error(errorNode, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop)); + error2(errorNode, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop)); return propType; } return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; @@ -71383,10 +71880,10 @@ ${lanes.join("\n")} } let diagnosticMessage; const declarationName = idText(right); - if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlags(valueDeclaration) & 32 /* Static */) && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { - diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); - } else if (valueDeclaration.kind === 262 /* ClassDeclaration */ && node.parent.kind !== 182 /* TypeReference */ && !(valueDeclaration.flags & 16777216 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { - diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); + if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { + diagnosticMessage = error2(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); + } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { + diagnosticMessage = error2(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { addRelatedInfo( @@ -71398,25 +71895,25 @@ ${lanes.join("\n")} function isInPropertyInitializerOrClassStaticBlock(node) { return !!findAncestor(node, (node2) => { switch (node2.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return true; - case 302 /* PropertyAssignment */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 304 /* SpreadAssignment */: - case 166 /* ComputedPropertyName */: - case 238 /* TemplateSpan */: - case 293 /* JsxExpression */: - case 290 /* JsxAttribute */: - case 291 /* JsxAttributes */: - case 292 /* JsxSpreadAttribute */: - case 285 /* JsxOpeningElement */: - case 232 /* ExpressionWithTypeArguments */: - case 297 /* HeritageClause */: + case 303 /* PropertyAssignment */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 305 /* SpreadAssignment */: + case 167 /* ComputedPropertyName */: + case 239 /* TemplateSpan */: + case 294 /* JsxExpression */: + case 291 /* JsxAttribute */: + case 292 /* JsxAttributes */: + case 293 /* JsxSpreadAttribute */: + case 286 /* JsxOpeningElement */: + case 233 /* ExpressionWithTypeArguments */: + case 298 /* HeritageClause */: return false; - case 218 /* ArrowFunction */: - case 243 /* ExpressionStatement */: + case 219 /* ArrowFunction */: + case 244 /* ExpressionStatement */: return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; default: return isExpressionNode(node2) ? false : "quit"; @@ -71661,9 +72158,9 @@ ${lanes.join("\n")} } function isValidPropertyAccess(node, propertyName) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return isValidPropertyAccessWithType(node, node.expression.kind === 108 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -71671,7 +72168,7 @@ ${lanes.join("\n")} propertyName, getWidenedType(checkExpression(node.left)) ); - case 204 /* ImportType */: + case 205 /* ImportType */: return isValidPropertyAccessWithType( node, /*isSuper*/ @@ -71684,7 +72181,7 @@ ${lanes.join("\n")} function isValidPropertyAccessForCompletions(node, type, property) { return isPropertyAccessible( node, - node.kind === 210 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, + node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, /*isWrite*/ false, type, @@ -71717,7 +72214,7 @@ ${lanes.join("\n")} } function getForInVariableSymbol(node) { const initializer = node.initializer; - if (initializer.kind === 260 /* VariableDeclarationList */) { + if (initializer.kind === 261 /* VariableDeclarationList */) { const variable = initializer.declarations[0]; if (variable && !isBindingPattern(variable.name)) { return getSymbolOfDeclaration(variable); @@ -71738,7 +72235,7 @@ ${lanes.join("\n")} let child = expr; let node = expr.parent; while (node) { - if (node.kind === 248 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { + if (node.kind === 249 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { return true; } child = node; @@ -71749,7 +72246,7 @@ ${lanes.join("\n")} return false; } function checkIndexedAccess(node, checkMode) { - return node.flags & 32 /* OptionalChain */ ? checkElementAccessChain(node, checkMode) : checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode); + return node.flags & 64 /* OptionalChain */ ? checkElementAccessChain(node, checkMode) : checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode); } function checkElementAccessChain(node, checkMode) { const exprType = checkExpression(node.expression); @@ -71764,7 +72261,7 @@ ${lanes.join("\n")} return objectType; } if (isConstEnumObjectType(objectType) && !isStringLiteralLike(indexExpression)) { - error(indexExpression, Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); + error2(indexExpression, Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); return errorType; } const effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType; @@ -71779,11 +72276,11 @@ ${lanes.join("\n")} if (callLikeExpressionMayHaveTypeArguments(node)) { forEach(node.typeArguments, checkSourceElement); } - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 169 /* Decorator */) { + } else if (node.kind !== 170 /* Decorator */) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -71828,7 +72325,7 @@ ${lanes.join("\n")} } } function isSpreadArgument(arg) { - return !!arg && (arg.kind === 229 /* SpreadElement */ || arg.kind === 236 /* SyntheticExpression */ && arg.isSpread); + return !!arg && (arg.kind === 230 /* SpreadElement */ || arg.kind === 237 /* SyntheticExpression */ && arg.isSpread); } function getSpreadArgumentIndex(args) { return findIndex(args, isSpreadArgument); @@ -71844,9 +72341,9 @@ ${lanes.join("\n")} let callIsIncomplete = false; let effectiveParameterCount = getParameterCount(signature); let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { argCount = args.length; - if (node.template.kind === 227 /* TemplateExpression */) { + if (node.template.kind === 228 /* TemplateExpression */) { const lastSpan = last(node.template.templateSpans); callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; } else { @@ -71854,7 +72351,7 @@ ${lanes.join("\n")} Debug.assert(templateLiteral.kind === 15 /* NoSubstitutionTemplateLiteral */); callIsIncomplete = !!templateLiteral.isUnterminated; } - } else if (node.kind === 169 /* Decorator */) { + } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; @@ -71865,7 +72362,7 @@ ${lanes.join("\n")} effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); } else if (!node.arguments) { - Debug.assert(node.kind === 213 /* NewExpression */); + Debug.assert(node.kind === 214 /* NewExpression */); return getMinArgumentCount(signature) === 0; } else { argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; @@ -71961,7 +72458,7 @@ ${lanes.join("\n")} if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 169 /* Decorator */) { + if (node.kind !== 170 /* Decorator */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -71998,7 +72495,7 @@ ${lanes.join("\n")} } for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 231 /* OmittedExpression */ && !(checkMode & 32 /* IsForStringLiteralArgumentCompletions */ && hasSkipDirectInferenceFlag(arg))) { + if (arg.kind !== 232 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); if (couldContainTypeVariables(paramType)) { const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); @@ -72026,11 +72523,11 @@ ${lanes.join("\n")} if (index >= argCount - 1) { const arg = args[argCount - 1]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 236 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); + const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); if (isArrayLikeType(spreadType)) { return getMutableArrayOrTupleType(spreadType); } - return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 229 /* SpreadElement */ ? arg.expression : arg), inConstContext); + return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext); } } const types = []; @@ -72039,12 +72536,12 @@ ${lanes.join("\n")} for (let i = index; i < argCount; i++) { const arg = args[i]; if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 236 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); + const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); if (isArrayLikeType(spreadType)) { types.push(spreadType); flags.push(8 /* Variadic */); } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 229 /* SpreadElement */ ? arg.expression : arg)); + types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg)); flags.push(4 /* Rest */); } } else { @@ -72054,7 +72551,7 @@ ${lanes.join("\n")} types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(1 /* Required */); } - if (arg.kind === 236 /* SyntheticExpression */ && arg.tupleNameSource) { + if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); } } @@ -72114,8 +72611,9 @@ ${lanes.join("\n")} void 0, checkMode ); + const checkAttributesType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(attributesType) : attributesType; return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate( - attributesType, + checkAttributesType, paramType, relation, reportErrors2 ? node.tagName : void 0, @@ -72231,7 +72729,7 @@ ${lanes.join("\n")} const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; for (let i = 0; i < argCount; i++) { const arg = args[i]; - if (arg.kind !== 231 /* OmittedExpression */) { + if (arg.kind !== 232 /* OmittedExpression */) { const paramType = getTypeAtPosition(signature, i); const argType = checkExpressionWithContextualType( arg, @@ -72289,7 +72787,7 @@ ${lanes.join("\n")} } } function getThisArgumentOfCall(node) { - const expression = node.kind === 212 /* CallExpression */ ? node.expression : node.kind === 214 /* TaggedTemplateExpression */ ? node.tag : void 0; + const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0; if (expression) { const callee = skipOuterExpressions(expression); if (isAccessExpression(callee)) { @@ -72304,17 +72802,17 @@ ${lanes.join("\n")} return result; } function getEffectiveCallArguments(node) { - if (node.kind === 214 /* TaggedTemplateExpression */) { + if (node.kind === 215 /* TaggedTemplateExpression */) { const template = node.template; const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 227 /* TemplateExpression */) { + if (template.kind === 228 /* TemplateExpression */) { forEach(template.templateSpans, (span) => { args2.push(span.expression); }); } return args2; } - if (node.kind === 169 /* Decorator */) { + if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } if (isJsxOpeningLikeElement(node)) { @@ -72326,7 +72824,7 @@ ${lanes.join("\n")} const effectiveArgs = args.slice(0, spreadIndex); for (let i = spreadIndex; i < args.length; i++) { const arg = args[i]; - const spreadType = arg.kind === 229 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); + const spreadType = arg.kind === 230 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); if (spreadType && isTupleType(spreadType)) { forEach(getElementTypes(spreadType), (t, i2) => { var _a; @@ -72365,16 +72863,16 @@ ${lanes.join("\n")} } function getLegacyDecoratorArgumentCount(node, signature) { switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return 1; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return hasAccessorModifier(node.parent) ? 3 : 2; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 168 /* Parameter */: + case 169 /* Parameter */: return 3; default: return Debug.fail(); @@ -72470,7 +72968,7 @@ ${lanes.join("\n")} if (isVoidPromiseError && isInJSFile(node)) { return getDiagnosticForCallNode(node, Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments); } - const error2 = isDecorator(node) ? hasRestParameter2 ? Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 : Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 : hasRestParameter2 ? Diagnostics.Expected_at_least_0_arguments_but_got_1 : isVoidPromiseError ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : Diagnostics.Expected_0_arguments_but_got_1; + const error3 = isDecorator(node) ? hasRestParameter2 ? Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 : Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 : hasRestParameter2 ? Diagnostics.Expected_at_least_0_arguments_but_got_1 : isVoidPromiseError ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : Diagnostics.Expected_0_arguments_but_got_1; if (min2 < args.length && args.length < max) { if (headMessage) { let chain = chainDiagnosticMessages( @@ -72491,14 +72989,14 @@ ${lanes.join("\n")} let chain = chainDiagnosticMessages( /*details*/ void 0, - error2, + error3, parameterRange, args.length ); chain = chainDiagnosticMessages(chain, headMessage); diagnostic = getDiagnosticForCallNode(node, chain); } else { - diagnostic = getDiagnosticForCallNode(node, error2, parameterRange, args.length); + diagnostic = getDiagnosticForCallNode(node, error3, parameterRange, args.length); } const parameter = (_a = closestSignature == null ? void 0 : closestSignature.declaration) == null ? void 0 : _a.parameters[closestSignature.thisParameter ? args.length + 1 : args.length]; if (parameter) { @@ -72519,14 +73017,14 @@ ${lanes.join("\n")} let chain = chainDiagnosticMessages( /*details*/ void 0, - error2, + error3, parameterRange, args.length ); chain = chainDiagnosticMessages(chain, headMessage); return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), errorSpan, chain); } - return createDiagnosticForNodeArray(getSourceFileOfNode(node), errorSpan, error2, parameterRange, args.length); + return createDiagnosticForNodeArray(getSourceFileOfNode(node), errorSpan, error3, parameterRange, args.length); } } function getTypeArgumentArityError(node, signatures, typeArguments, headMessage) { @@ -72588,8 +73086,8 @@ ${lanes.join("\n")} return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); } function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) { - const isTaggedTemplate = node.kind === 214 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 169 /* Decorator */; + const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; + const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; @@ -72601,21 +73099,15 @@ ${lanes.join("\n")} } const candidates = candidatesOutArray || []; reorderCandidates(signatures, candidates, callChainFlags); - if (!candidates.length) { - if (reportErrors2) { - diagnostics.add(getDiagnosticForCallNode(node, Diagnostics.Call_target_does_not_contain_any_signatures)); - } - return resolveErrorCall(node); - } + Debug.assert(candidates.length, "Revert #54442 and add a testcase with whatever triggered this"); const args = getEffectiveCallArguments(node); const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters; let argCheckMode = !isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? 4 /* SkipContextSensitive */ : 0 /* Normal */; - argCheckMode |= checkMode & 32 /* IsForStringLiteralArgumentCompletions */; let candidatesForArgumentError; let candidateForArgumentArityError; let candidateForTypeArgumentError; let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 212 /* CallExpression */ && node.arguments.hasTrailingComma; + const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma; if (candidates.length > 1) { result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); } @@ -72834,7 +73326,7 @@ ${lanes.join("\n")} continue; } if (argCheckMode) { - argCheckMode = checkMode & 32 /* IsForStringLiteralArgumentCompletions */; + argCheckMode = 0 /* Normal */; if (inferenceContext) { const typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext); checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext.inferredTypeParameters); @@ -72883,7 +73375,7 @@ ${lanes.join("\n")} parameters.push(createCombinedSymbolFromTypes(symbols, mapDefined(candidates, (candidate) => tryGetTypeAtPosition(candidate, i)))); } const restParameterSymbols = mapDefined(candidates, (c) => signatureHasRestParameter(c) ? last(c.parameters) : void 0); - let flags = 0 /* None */; + let flags = 128 /* IsSignatureCandidateForOverloadFailure */; if (restParameterSymbols.length !== 0) { const type = createArrayType(getUnionType(mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */)); parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); @@ -73008,13 +73500,13 @@ ${lanes.join("\n")} const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length; if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) { if (!isErrorType(funcType) && node.typeArguments) { - error(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); + error2(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); } return resolveUntypedCall(node); } if (!callSignatures.length) { if (numConstructSignatures) { - error(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); + error2(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); } else { let relatedInformation; if (node.arguments.length === 1) { @@ -73037,7 +73529,7 @@ ${lanes.join("\n")} return resolvingSignature; } if (callSignatures.some((sig) => isInJSFile(sig.declaration) && !!getJSDocClassTag(sig.declaration))) { - error(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); + error2(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); return resolveErrorCall(node); } return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags); @@ -73052,7 +73544,7 @@ ${lanes.join("\n")} if (node.arguments && languageVersion < 1 /* ES5 */) { const spreadIndex = getSpreadArgumentIndex(node.arguments); if (spreadIndex >= 0) { - error(node.arguments[spreadIndex], Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher); + error2(node.arguments[spreadIndex], Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher); } } let expressionType = checkNonNullExpression(node.expression); @@ -73065,7 +73557,7 @@ ${lanes.join("\n")} } if (isTypeAny(expressionType)) { if (node.typeArguments) { - error(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); + error2(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); } return resolveUntypedCall(node); } @@ -73075,12 +73567,12 @@ ${lanes.join("\n")} return resolveErrorCall(node); } if (someSignature(constructSignatures, (signature) => !!(signature.flags & 4 /* Abstract */))) { - error(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); + error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } const valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol); if (valueDecl && hasSyntacticModifier(valueDecl, 256 /* Abstract */)) { - error(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); + error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0 /* None */); @@ -73090,10 +73582,10 @@ ${lanes.join("\n")} const signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); if (!noImplicitAny) { if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) { - error(node, Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); + error2(node, Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); } if (getThisTypeOfSignature(signature) === voidType) { - error(node, Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void); + error2(node, Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void); } } return signature; @@ -73143,7 +73635,7 @@ ${lanes.join("\n")} } const declaration = signature.declaration; const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 175 /* Constructor */) { + if (!modifiers || declaration.kind !== 176 /* Constructor */) { return true; } const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); @@ -73157,10 +73649,10 @@ ${lanes.join("\n")} } } if (modifiers & 8 /* Private */) { - error(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); + error2(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } if (modifiers & 16 /* Protected */) { - error(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); + error2(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } return false; } @@ -73290,16 +73782,16 @@ ${lanes.join("\n")} } function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 168 /* Parameter */: + case 169 /* Parameter */: return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; default: return Debug.fail(); @@ -73322,7 +73814,7 @@ ${lanes.join("\n")} /*includeTrivia*/ false ); - error(node, Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, nodeStr); + error2(node, Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, nodeStr); return resolveErrorCall(node); } const headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); @@ -73412,7 +73904,7 @@ ${lanes.join("\n")} return resolveUntypedCall(node); } if (signatures.length === 0) { - error(node.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node.tagName)); + error2(node.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node.tagName)); return resolveErrorCall(node); } return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); @@ -73422,16 +73914,16 @@ ${lanes.join("\n")} } function resolveSignature(node, candidatesOutArray, checkMode) { switch (node.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: return resolveCallExpression(node, candidatesOutArray, checkMode); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return resolveNewExpression(node, candidatesOutArray, checkMode); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 169 /* Decorator */: + case 170 /* Decorator */: return resolveDecorator(node, candidatesOutArray, checkMode); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); } Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); @@ -73507,7 +73999,7 @@ ${lanes.join("\n")} let name; let decl; if (isVariableDeclaration(node.parent) && node.parent.initializer === node) { - if (!isInJSFile(node) && !(isVarConst(node.parent) && isFunctionLikeDeclaration(node))) { + if (!isInJSFile(node) && !(isVarConstLike(node.parent) && isFunctionLikeDeclaration(node))) { return void 0; } name = node.parent.name; @@ -73544,7 +74036,7 @@ ${lanes.join("\n")} return false; } let parent2 = node.parent; - while (parent2 && parent2.kind === 210 /* PropertyAccessExpression */) { + while (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { parent2 = parent2.parent; } if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 64 /* EqualsToken */) { @@ -73568,11 +74060,11 @@ ${lanes.join("\n")} if (node.expression.kind === 108 /* SuperKeyword */) { return voidType; } - if (node.kind === 213 /* NewExpression */) { + if (node.kind === 214 /* NewExpression */) { const declaration = signature.declaration; - if (declaration && declaration.kind !== 175 /* Constructor */ && declaration.kind !== 179 /* ConstructSignature */ && declaration.kind !== 184 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 175 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { + if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 176 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { if (noImplicitAny) { - error(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); + error2(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); } return anyType; } @@ -73584,11 +74076,11 @@ ${lanes.join("\n")} if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); } - if (node.kind === 212 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 243 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { + if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 244 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { if (!isDottedName(node.expression)) { - error(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); + error2(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); } else if (!getEffectsSignature(node)) { - const diagnostic = error(node.expression, Diagnostics.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation); + const diagnostic = error2(node.expression, Diagnostics.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation); getTypeOfDottedName(node.expression, diagnostic); } } @@ -73607,7 +74099,9 @@ ${lanes.join("\n")} return returnType; } function checkDeprecatedSignature(signature, node) { - if (signature.declaration && signature.declaration.flags & 268435456 /* Deprecated */) { + if (signature.flags & 128 /* IsSignatureCandidateForOverloadFailure */) + return; + if (signature.declaration && signature.declaration.flags & 536870912 /* Deprecated */) { const suggestionNode = getDeprecatedSuggestionNode(node); const name = tryGetPropertyAccessOrIdentifierToString(getInvokedExpression(node)); addDeprecatedSuggestionWithSignature(suggestionNode, signature.declaration, name, signatureToString(signature)); @@ -73616,20 +74110,20 @@ ${lanes.join("\n")} function getDeprecatedSuggestionNode(node) { node = skipParentheses(node); switch (node.kind) { - case 212 /* CallExpression */: - case 169 /* Decorator */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 170 /* Decorator */: + case 214 /* NewExpression */: return getDeprecatedSuggestionNode(node.expression); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return getDeprecatedSuggestionNode(node.tag); - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: return getDeprecatedSuggestionNode(node.tagName); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return node.argumentExpression; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.name; - case 182 /* TypeReference */: + case 183 /* TypeReference */: const typeReference = node; return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; default: @@ -73677,7 +74171,7 @@ ${lanes.join("\n")} checkExpressionCached(node.arguments[i]); } if (specifierType.flags & 32768 /* Undefined */ || specifierType.flags & 65536 /* Null */ || !isTypeAssignableTo(specifierType, stringType)) { - error(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); + error2(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); } if (optionsType) { const importCallOptionsType = getGlobalImportCallOptionsType( @@ -73789,10 +74283,10 @@ ${lanes.join("\n")} if (resolvedRequire.flags & 2097152 /* Alias */) { return false; } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 261 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 259 /* VariableDeclaration */ : 0 /* Unknown */; + const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 262 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 260 /* VariableDeclaration */ : 0 /* Unknown */; if (targetDeclarationKind !== 0 /* Unknown */) { const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); - return !!decl && !!(decl.flags & 16777216 /* Ambient */); + return !!decl && !!(decl.flags & 33554432 /* Ambient */); } return false; } @@ -73807,7 +74301,7 @@ ${lanes.join("\n")} return getReturnTypeOfSignature(signature); } function checkAssertion(node, checkMode) { - if (node.kind === 215 /* TypeAssertionExpression */) { + if (node.kind === 216 /* TypeAssertionExpression */) { const file = getSourceFileOfNode(node); if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) { grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); @@ -73823,18 +74317,18 @@ ${lanes.join("\n")} case 10 /* BigIntLiteral */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 227 /* TemplateExpression */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 228 /* TemplateExpression */: return true; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isValidConstAssertionArgument(node.expression); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const op = node.operator; const arg = node.operand; return op === 41 /* MinusToken */ && (arg.kind === 9 /* NumericLiteral */ || arg.kind === 10 /* BigIntLiteral */) || op === 40 /* PlusToken */ && arg.kind === 9 /* NumericLiteral */; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = skipParentheses(node.expression); const symbol = isEntityNameExpression(expr) ? resolveEntityName( expr, @@ -73851,7 +74345,7 @@ ${lanes.join("\n")} const exprType = checkExpression(expression, checkMode); if (isConstTypeReference(type)) { if (!isValidConstAssertionArgument(expression)) { - error(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals); + error2(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals); } return getRegularTypeOfLiteralType(exprType); } @@ -73865,12 +74359,12 @@ ${lanes.join("\n")} let type; let expression; switch (node.kind) { - case 233 /* AsExpression */: - case 215 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 216 /* TypeAssertionExpression */: type = node.type; expression = node.expression; break; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: type = getJSDocTypeAssertionType(node); expression = node.expression; break; @@ -73904,18 +74398,18 @@ ${lanes.join("\n")} return propagateOptionalTypeMarker(getNonNullableType(nonOptionalType), node, nonOptionalType !== leftType); } function checkNonNullAssertion(node) { - return node.flags & 32 /* OptionalChain */ ? checkNonNullChain(node) : getNonNullableType(checkExpression(node.expression)); + return node.flags & 64 /* OptionalChain */ ? checkNonNullChain(node) : getNonNullableType(checkExpression(node.expression)); } function checkExpressionWithTypeArguments(node) { checkGrammarExpressionWithTypeArguments(node); forEach(node.typeArguments, checkSourceElement); - if (node.kind === 232 /* ExpressionWithTypeArguments */) { + if (node.kind === 233 /* ExpressionWithTypeArguments */) { const parent2 = walkUpParenthesizedExpressions(node.parent); - if (parent2.kind === 225 /* BinaryExpression */ && parent2.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent2.right)) { - error(node, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); + if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent2.right)) { + error2(node, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); } } - const exprType = node.kind === 232 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); + const exprType = node.kind === 233 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); return getInstantiationExpressionType(exprType, node); } function getInstantiationExpressionType(exprType, node) { @@ -73999,7 +74493,7 @@ ${lanes.join("\n")} if (isErrorType(targetType)) { return targetType; } - const errorNode = findAncestor(target.parent, (n) => n.kind === 237 /* SatisfiesExpression */ || n.kind === 356 /* JSDocSatisfiesTag */); + const errorNode = findAncestor(target.parent, (n) => n.kind === 238 /* SatisfiesExpression */ || n.kind === 357 /* JSDocSatisfiesTag */); checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1); return exprType; } @@ -74027,9 +74521,9 @@ ${lanes.join("\n")} function checkNewTargetMetaProperty(node) { const container = getNewTargetContainer(node); if (!container) { - error(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); + error2(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); return errorType; - } else if (container.kind === 175 /* Constructor */) { + } else if (container.kind === 176 /* Constructor */) { const symbol = getSymbolOfDeclaration(container.parent); return getTypeOfSymbol(symbol); } else { @@ -74040,13 +74534,13 @@ ${lanes.join("\n")} function checkImportMetaProperty(node) { if (moduleKind === 100 /* Node16 */ || moduleKind === 199 /* NodeNext */) { if (getSourceFileOfNode(node).impliedNodeFormat !== 99 /* ESNext */) { - error(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output); + error2(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output); } } else if (moduleKind < 6 /* ES2020 */ && moduleKind !== 4 /* System */) { - error(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); + error2(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); } const file = getSourceFileOfNode(node); - Debug.assert(!!(file.flags & 4194304 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); + Debug.assert(!!(file.flags & 8388608 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType; } function getTypeOfParameter(symbol) { @@ -74059,7 +74553,10 @@ ${lanes.join("\n")} } return type; } - function getTupleElementLabel(d) { + function getTupleElementLabel(d, index, restParameterName = "arg") { + if (!d) { + return `${restParameterName}_${index}`; + } Debug.assert(isIdentifier(d.name)); return d.name.escapedText; } @@ -74073,22 +74570,28 @@ ${lanes.join("\n")} if (isTupleType(restType)) { const associatedNames = restType.target.labeledElementDeclarations; const index = pos - paramCount; - return associatedNames && getTupleElementLabel(associatedNames[index]) || restParameter.escapedName + "_" + index; + return getTupleElementLabel(associatedNames == null ? void 0 : associatedNames[index], index, restParameter.escapedName); } return restParameter.escapedName; } - function getParameterIdentifierNameAtPosition(signature, pos) { + function getParameterIdentifierInfoAtPosition(signature, pos) { var _a; - if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 323 /* JSDocFunctionType */) { + if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 324 /* JSDocFunctionType */) { return void 0; } const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); if (pos < paramCount) { const param = signature.parameters[pos]; - return isParameterDeclarationWithIdentifierName(param) ? [param.escapedName, false] : void 0; + const paramIdent = getParameterDeclarationIdentifier(param); + return paramIdent ? { + parameter: paramIdent, + parameterName: param.escapedName, + isRestParameter: false + } : void 0; } const restParameter = signature.parameters[paramCount] || unknownSymbol; - if (!isParameterDeclarationWithIdentifierName(restParameter)) { + const restIdent = getParameterDeclarationIdentifier(restParameter); + if (!restIdent) { return void 0; } const restType = getTypeOfSymbol(restParameter); @@ -74097,21 +74600,22 @@ ${lanes.join("\n")} const index = pos - paramCount; const associatedName = associatedNames == null ? void 0 : associatedNames[index]; const isRestTupleElement = !!(associatedName == null ? void 0 : associatedName.dotDotDotToken); - return associatedName ? [ - getTupleElementLabel(associatedName), - isRestTupleElement - ] : void 0; + if (associatedName) { + Debug.assert(isIdentifier(associatedName.name)); + return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement }; + } + return void 0; } if (pos === paramCount) { - return [restParameter.escapedName, true]; + return { parameter: restIdent, parameterName: restParameter.escapedName, isRestParameter: true }; } return void 0; } - function isParameterDeclarationWithIdentifierName(symbol) { - return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name); + function getParameterDeclarationIdentifier(symbol) { + return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name) && symbol.valueDeclaration.name; } function isValidDeclarationForTupleLabel(d) { - return d.kind === 201 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); + return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -74447,17 +74951,17 @@ ${lanes.join("\n")} if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const contextType = createClassDecoratorContextType(targetType); links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType); break; } - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74469,7 +74973,7 @@ ${lanes.join("\n")} links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); break; } - case 171 /* PropertyDeclaration */: { + case 172 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74491,8 +74995,8 @@ ${lanes.join("\n")} if (!links.decoratorSignature) { links.decoratorSignature = anySignature; switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: { + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: { const node = parent2; const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); const targetParam = createParameter("target", targetType); @@ -74506,7 +75010,7 @@ ${lanes.join("\n")} ); break; } - case 168 /* Parameter */: { + case 169 /* Parameter */: { const node = parent2; if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { break; @@ -74532,10 +75036,10 @@ ${lanes.join("\n")} ); break; } - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: { + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: { const node = parent2; if (!isClassLike(node.parent)) break; @@ -74600,13 +75104,13 @@ ${lanes.join("\n")} function createPromiseReturnType(func, promisedType) { const promiseType = createPromiseType(promisedType); if (promiseType === unknownType) { - error(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); + error2(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); return errorType; } else if (!getGlobalPromiseConstructorSymbol( /*reportErrors*/ true )) { - error(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); + error2(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } return promiseType; } @@ -74630,7 +75134,7 @@ ${lanes.join("\n")} let yieldType; let nextType; let fallbackReturnType = voidType; - if (func.body.kind !== 240 /* Block */) { + if (func.body.kind !== 241 /* Block */) { returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); if (isAsync) { returnType = unwrapAwaitedType(checkAwaitedType( @@ -74813,7 +75317,7 @@ ${lanes.join("\n")} return links.isExhaustive; } function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 220 /* TypeOfExpression */) { + if (node.expression.kind === 221 /* TypeOfExpression */) { const witnesses = getSwitchClauseTypeOfWitnesses(node); if (!witnesses) { return false; @@ -74846,7 +75350,7 @@ ${lanes.join("\n")} forEachReturnStatement(func.body, (returnStatement) => { const expr = returnStatement.expression; if (expr) { - if (expr.kind === 212 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { + if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { hasReturnOfTypeNever = true; return; } @@ -74878,11 +75382,11 @@ ${lanes.join("\n")} } function mayReturnNever(func) { switch (func.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; - case 173 /* MethodDeclaration */: - return func.parent.kind === 209 /* ObjectLiteralExpression */; + case 174 /* MethodDeclaration */: + return func.parent.kind === 210 /* ObjectLiteralExpression */; default: return false; } @@ -74896,17 +75400,17 @@ ${lanes.join("\n")} if (type && (maybeTypeOfKind(type, 16384 /* Void */) || type.flags & (1 /* Any */ | 32768 /* Undefined */))) { return; } - if (func.kind === 172 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 240 /* Block */ || !functionHasImplicitReturn(func)) { + if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 241 /* Block */ || !functionHasImplicitReturn(func)) { return; } - const hasExplicitReturn = func.flags & 512 /* HasExplicitReturn */; + const hasExplicitReturn = func.flags & 1024 /* HasExplicitReturn */; const errorNode = getEffectiveReturnTypeNode(func) || func; if (type && type.flags & 131072 /* Never */) { - error(errorNode, Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point); + error2(errorNode, Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point); } else if (type && !hasExplicitReturn) { - error(errorNode, Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value); + error2(errorNode, Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value); } else if (type && strictNullChecks && !isTypeAssignableTo(undefinedType, type)) { - error(errorNode, Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); + error2(errorNode, Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); } else if (compilerOptions.noImplicitReturns) { if (!type) { if (!hasExplicitReturn) { @@ -74917,12 +75421,12 @@ ${lanes.join("\n")} return; } } - error(errorNode, Diagnostics.Not_all_code_paths_return_a_value); + error2(errorNode, Diagnostics.Not_all_code_paths_return_a_value); } } } function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); checkNodeDeferred(node); if (isFunctionExpression(node)) { checkCollisionsForDeclarationName(node, node.name); @@ -74958,7 +75462,7 @@ ${lanes.join("\n")} return anyFunctionType; } const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 217 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) { checkGrammarForGenerator(node); } contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -75007,7 +75511,7 @@ ${lanes.join("\n")} } } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 173 /* MethodDeclaration */ || isObjectLiteralMethod(node)); + Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); const functionFlags = getFunctionFlags(node); const returnType = getReturnTypeFromAnnotation(node); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); @@ -75015,7 +75519,7 @@ ${lanes.join("\n")} if (!getEffectiveReturnTypeNode(node)) { getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 240 /* Block */) { + if (node.body.kind === 241 /* Block */) { checkSourceElement(node.body); } else { const exprType = checkExpression(node.body); @@ -75077,7 +75581,7 @@ ${lanes.join("\n")} return !setProp; } function isReadonlySymbol(symbol) { - return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); + return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); } function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) { var _a, _b; @@ -75087,7 +75591,7 @@ ${lanes.join("\n")} if (isReadonlySymbol(symbol)) { if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 110 /* ThisKeyword */) { const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 175 /* Constructor */ || isJSConstructor(ctor)))) { + if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) { return true; } if (symbol.valueDeclaration) { @@ -75108,7 +75612,7 @@ ${lanes.join("\n")} const symbol2 = getNodeLinks(node).resolvedSymbol; if (symbol2.flags & 2097152 /* Alias */) { const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 273 /* NamespaceImport */; + return !!declaration && declaration.kind === 274 /* NamespaceImport */; } } } @@ -75117,11 +75621,11 @@ ${lanes.join("\n")} function checkReferenceExpression(expr, invalidReferenceMessage, invalidOptionalChainMessage) { const node = skipOuterExpressions(expr, 6 /* Assertions */ | 1 /* Parentheses */); if (node.kind !== 80 /* Identifier */ && !isAccessExpression(node)) { - error(expr, invalidReferenceMessage); + error2(expr, invalidReferenceMessage); return false; } - if (node.flags & 32 /* OptionalChain */) { - error(expr, invalidOptionalChainMessage); + if (node.flags & 64 /* OptionalChain */) { + error2(expr, invalidOptionalChainMessage); return false; } return true; @@ -75130,17 +75634,17 @@ ${lanes.join("\n")} checkExpression(node.expression); const expr = skipParentheses(node.expression); if (!isAccessExpression(expr)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); return booleanType; } if (isPropertyAccessExpression(expr) && isPrivateIdentifier(expr.name)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_private_identifier); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_private_identifier); } const links = getNodeLinks(expr); const symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol); if (symbol) { if (isReadonlySymbol(symbol)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property); } checkDeleteExpressionMustBeOptional(expr, symbol); } @@ -75149,7 +75653,7 @@ ${lanes.join("\n")} function checkDeleteExpressionMustBeOptional(expr, symbol) { const type = getTypeOfSymbol(symbol); if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : getTypeFacts(type) & 16777216 /* IsUndefined */)) { - error(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional); + error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional); } } function checkTypeOfExpression(node) { @@ -75160,24 +75664,24 @@ ${lanes.join("\n")} checkExpression(node.expression); return undefinedWideningType; } - function checkAwaitExpressionGrammar(node) { + function checkAwaitGrammar(node) { + let hasError = false; const container = getContainingFunctionOrClassStaticBlock(node); if (container && isClassStaticBlockDeclaration(container)) { - error(node, Diagnostics.Await_expression_cannot_be_used_inside_a_class_static_block); - } else if (!(node.flags & 32768 /* AwaitContext */)) { + const message = isAwaitExpression(node) ? Diagnostics.await_expression_cannot_be_used_inside_a_class_static_block : Diagnostics.await_using_statements_cannot_be_used_inside_a_class_static_block; + error2(node, message); + hasError = true; + } else if (!(node.flags & 65536 /* AwaitContext */)) { if (isInTopLevelContext(node)) { const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { let span; if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - const diagnostic = createFileDiagnostic( - sourceFile, - span.start, - span.length, - Diagnostics.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 - ); + const message = isAwaitExpression(node) ? Diagnostics.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 : Diagnostics.await_using_statements_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; + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); diagnostics.add(diagnostic); + hasError = true; } switch (moduleKind) { case 100 /* Node16 */: @@ -75187,6 +75691,7 @@ ${lanes.join("\n")} diagnostics.add( createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) ); + hasError = true; break; } case 7 /* ES2022 */: @@ -75197,14 +75702,9 @@ ${lanes.join("\n")} } default: span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - diagnostics.add( - createFileDiagnostic( - sourceFile, - span.start, - span.length, - Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher - ) - ); + const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher : Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher; + diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message)); + hasError = true; break; } } @@ -75212,21 +75712,25 @@ ${lanes.join("\n")} const sourceFile = getSourceFileOfNode(node); if (!hasParseDiagnostics(sourceFile)) { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); - const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); - if (container && container.kind !== 175 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { + const message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules; + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); + if (container && container.kind !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); } diagnostics.add(diagnostic); + hasError = true; } } } - if (isInParameterInitializerBeforeContainingFunction(node)) { - error(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer); + if (isAwaitExpression(node) && isInParameterInitializerBeforeContainingFunction(node)) { + error2(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer); + hasError = true; } + return hasError; } function checkAwaitExpression(node) { - addLazyDiagnostic(() => checkAwaitExpressionGrammar(node)); + addLazyDiagnostic(() => checkAwaitGrammar(node)); const operandType = checkExpression(node.expression); const awaitedType = checkAwaitedType( operandType, @@ -75272,11 +75776,11 @@ ${lanes.join("\n")} case 55 /* TildeToken */: checkNonNullType(operandType, node.operand); if (maybeTypeOfKindConsideringBaseConstraint(operandType, 12288 /* ESSymbolLike */)) { - error(node.operand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(node.operator)); + error2(node.operand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(node.operator)); } if (node.operator === 40 /* PlusToken */) { if (maybeTypeOfKindConsideringBaseConstraint(operandType, 2112 /* BigIntLike */)) { - error(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType))); + error2(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType))); } return numberType; } @@ -75372,10 +75876,10 @@ ${lanes.join("\n")} return silentNeverType; } if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { - error(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); + error2(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { - error(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); + error2(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); } return booleanType; } @@ -75404,7 +75908,7 @@ ${lanes.join("\n")} } if (checkTypeAssignableTo(checkNonNullType(rightType, right), nonPrimitiveType, right)) { if (hasEmptyObjectIntersection(rightType)) { - error(right, Diagnostics.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, typeToString(rightType)); + error2(right, Diagnostics.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, typeToString(rightType)); } } return booleanType; @@ -75422,7 +75926,7 @@ ${lanes.join("\n")} function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { const properties = node.properties; const property = properties[propertyIndex]; - if (property.kind === 302 /* PropertyAssignment */ || property.kind === 303 /* ShorthandPropertyAssignment */) { + if (property.kind === 303 /* PropertyAssignment */ || property.kind === 304 /* ShorthandPropertyAssignment */) { const name = property.name; const exprType = getLiteralTypeFromPropertyName(name); if (isTypeUsableAsPropertyName(exprType)) { @@ -75443,10 +75947,10 @@ ${lanes.join("\n")} } const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 303 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 304 /* SpreadAssignment */) { + return checkDestructuringAssignment(property.kind === 304 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); + } else if (property.kind === 305 /* SpreadAssignment */) { if (propertyIndex < properties.length - 1) { - error(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); + error2(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { if (languageVersion < 99 /* ESNext */) { checkExternalEmitHelpers(property, 4 /* Rest */); @@ -75464,7 +75968,7 @@ ${lanes.join("\n")} return checkDestructuringAssignment(property.expression, type); } } else { - error(property, Diagnostics.Property_assignment_expected); + error2(property, Diagnostics.Property_assignment_expected); } } function checkArrayLiteralAssignment(node, sourceType, checkMode) { @@ -75476,7 +75980,7 @@ ${lanes.join("\n")} let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 229 /* SpreadElement */) { + if (node.elements[i].kind === 230 /* SpreadElement */) { type = inBoundsType = inBoundsType ?? (checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType); } checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); @@ -75486,8 +75990,8 @@ ${lanes.join("\n")} function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { const elements = node.elements; const element = elements[elementIndex]; - if (element.kind !== 231 /* OmittedExpression */) { - if (element.kind !== 229 /* SpreadElement */) { + if (element.kind !== 232 /* OmittedExpression */) { + if (element.kind !== 230 /* SpreadElement */) { const indexType = getNumberLiteralType(elementIndex); if (isArrayLikeType(sourceType)) { const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); @@ -75499,11 +76003,11 @@ ${lanes.join("\n")} return checkDestructuringAssignment(element, elementType, checkMode); } if (elementIndex < elements.length - 1) { - error(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); + error2(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); } else { const restExpression = element.expression; - if (restExpression.kind === 225 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { - error(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); + if (restExpression.kind === 226 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { + error2(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); } else { checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); const type = everyType(sourceType, isTupleType) ? mapType(sourceType, (t) => sliceTupleType(t, elementIndex)) : createArrayType(elementType); @@ -75515,7 +76019,7 @@ ${lanes.join("\n")} } function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { let target; - if (exprOrAssignment.kind === 303 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { @@ -75527,26 +76031,26 @@ ${lanes.join("\n")} } else { target = exprOrAssignment; } - if (target.kind === 225 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { + if (target.kind === 226 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { checkBinaryExpression(target, checkMode); target = target.left; if (strictNullChecks) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } } - if (target.kind === 209 /* ObjectLiteralExpression */) { + if (target.kind === 210 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, rightIsThis); } - if (target.kind === 208 /* ArrayLiteralExpression */) { + if (target.kind === 209 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, checkMode); } return checkReferenceAssignment(target, sourceType, checkMode); } function checkReferenceAssignment(target, sourceType, checkMode) { const targetType = checkExpression(target, checkMode); - const error2 = target.parent.kind === 304 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; - const optionalError = target.parent.kind === 304 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; - if (checkReferenceExpression(target, error2, optionalError)) { + const error3 = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; + const optionalError = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + if (checkReferenceExpression(target, error3, optionalError)) { checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target); } if (isPrivateIdentifierPropertyAccessExpression(target)) { @@ -75560,8 +76064,8 @@ ${lanes.join("\n")} case 80 /* Identifier */: case 11 /* StringLiteral */: case 14 /* RegularExpressionLiteral */: - case 214 /* TaggedTemplateExpression */: - case 227 /* TemplateExpression */: + case 215 /* TaggedTemplateExpression */: + case 228 /* TemplateExpression */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: @@ -75569,25 +76073,25 @@ ${lanes.join("\n")} case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 157 /* UndefinedKeyword */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 220 /* TypeOfExpression */: - case 234 /* NonNullExpression */: - case 284 /* JsxSelfClosingElement */: - case 283 /* JsxElement */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 221 /* TypeOfExpression */: + case 235 /* NonNullExpression */: + case 285 /* JsxSelfClosingElement */: + case 284 /* JsxElement */: return true; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isAssignmentOperator(node.operatorToken.kind)) { return false; } return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: switch (node.operator) { case 54 /* ExclamationToken */: case 40 /* PlusToken */: @@ -75596,9 +76100,9 @@ ${lanes.join("\n")} return true; } return false; - case 221 /* VoidExpression */: - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 222 /* VoidExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: default: return false; } @@ -75642,7 +76146,7 @@ ${lanes.join("\n")} } checkGrammarNullishCoalesceWithLogicalExpression(node); const operator = node.operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (node.left.kind === 209 /* ObjectLiteralExpression */ || node.left.kind === 208 /* ArrayLiteralExpression */)) { + if (operator === 64 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) { state.skip = true; setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 110 /* ThisKeyword */)); return state; @@ -75667,7 +76171,7 @@ ${lanes.join("\n")} const operator = operatorToken.kind; if (isLogicalOrCoalescingBinaryOperator(operator)) { let parent2 = node.parent; - while (parent2.kind === 216 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { + while (parent2.kind === 217 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { parent2 = parent2.parent; } if (operator === 56 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) { @@ -75691,7 +76195,7 @@ ${lanes.join("\n")} Debug.assertIsDefined(leftType); const rightType = getLastResult(state); Debug.assertIsDefined(rightType); - result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node); + result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, state.checkMode, node); } state.skip = false; setLeftType( @@ -75743,7 +76247,7 @@ ${lanes.join("\n")} } function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { const operator = operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (left.kind === 209 /* ObjectLiteralExpression */ || left.kind === 208 /* ArrayLiteralExpression */)) { + if (operator === 64 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 110 /* ThisKeyword */); } let leftType; @@ -75753,9 +76257,9 @@ ${lanes.join("\n")} leftType = checkExpression(left, checkMode); } const rightType = checkExpression(right, checkMode); - return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode); + return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode); } - function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, errorNode) { + function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode) { const operator = operatorToken.kind; switch (operator) { case 42 /* AsteriskToken */: @@ -75787,7 +76291,7 @@ ${lanes.join("\n")} rightType = checkNonNullType(rightType, right); let suggestedOperator; if (leftType.flags & 528 /* BooleanLike */ && rightType.flags & 528 /* BooleanLike */ && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== void 0) { - error(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator)); + error2(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator)); return numberType; } else { const leftOk = checkArithmeticOperandType( @@ -75817,7 +76321,7 @@ ${lanes.join("\n")} case 43 /* AsteriskAsteriskToken */: case 68 /* AsteriskAsteriskEqualsToken */: if (languageVersion < 3 /* ES2016 */) { - error(errorNode, Diagnostics.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later); + error2(errorNode, Diagnostics.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later); } } resultType2 = bigintType; @@ -75912,12 +76416,15 @@ ${lanes.join("\n")} case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - if (isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) { - const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; - error(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); + if (!(checkMode && checkMode & 128 /* TypeOnly */)) { + if ((isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && // only report for === and !== in JS, not == or != + (!isInJSFile(left) || (operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */))) { + const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; + error2(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); + } + checkNaNEquality(errorNode, operator, left, right); + reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); } - checkNaNEquality(errorNode, operator, left, right); - reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); return booleanType; case 104 /* InstanceOfKeyword */: return checkInstanceOfExpression(left, right, leftType, rightType); @@ -75970,7 +76477,7 @@ ${lanes.join("\n")} return textSpanContainsPosition(diag2, start); }); if (!isInDiag2657) - error(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); + error2(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); } return rightType; default: @@ -76004,13 +76511,13 @@ ${lanes.join("\n")} } } function isIndirectCall(node) { - return node.parent.kind === 216 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 214 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + return node.parent.kind === 217 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 215 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval"); } function checkForDisallowedESSymbolOperand(operator2) { const offendingSymbolOperand = maybeTypeOfKindConsideringBaseConstraint(leftType, 12288 /* ESSymbolLike */) ? left : maybeTypeOfKindConsideringBaseConstraint(rightType, 12288 /* ESSymbolLike */) ? right : void 0; if (offendingSymbolOperand) { - error(offendingSymbolOperand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(operator2)); + error2(offendingSymbolOperand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(operator2)); return false; } return true; @@ -76036,7 +76543,7 @@ ${lanes.join("\n")} } function checkAssignmentOperatorWorker() { let assigneeType = leftType; - if (isCompoundAssignment(operatorToken.kind) && left.kind === 210 /* PropertyAccessExpression */) { + if (isCompoundAssignment(operatorToken.kind) && left.kind === 211 /* PropertyAccessExpression */) { assigneeType = checkPropertyAccessExpression( left, /*checkMode*/ @@ -76131,7 +76638,7 @@ ${lanes.join("\n")} const isLeftNaN = isGlobalNaN(skipParentheses(left2)); const isRightNaN = isGlobalNaN(skipParentheses(right2)); if (isLeftNaN || isRightNaN) { - const err = error( + const err = error2( errorNode2, Diagnostics.This_condition_will_always_return_0, tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */) @@ -76212,23 +76719,23 @@ ${lanes.join("\n")} void 0 ); if (!contextualType || isTypeAny(contextualType)) { - error(node, Diagnostics.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation); + error2(node, Diagnostics.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation); } } }); } return type; function checkYieldExpressionGrammar() { - if (!(node.flags & 8192 /* YieldContext */)) { + if (!(node.flags & 16384 /* YieldContext */)) { grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { - error(node, Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer); + error2(node, Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer); } } } function checkConditionalExpression(node, checkMode) { - const type = checkTruthinessExpression(node.condition); + const type = checkTruthinessExpression(node.condition, checkMode); checkTestingKnownTruthyCallableOrAwaitableType(node.condition, type, node.whenTrue); const type1 = checkExpression(node.whenTrue, checkMode); const type2 = checkExpression(node.whenFalse, checkMode); @@ -76244,16 +76751,20 @@ ${lanes.join("\n")} for (const span of node.templateSpans) { const type = checkExpression(span.expression); if (maybeTypeOfKindConsideringBaseConstraint(type, 12288 /* ESSymbolLike */)) { - error(span.expression, Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String); + error2(span.expression, Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String); } texts.push(span.literal.text); types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType); } - return isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType2( + if (isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType2( node, /*contextFlags*/ void 0 - ) || unknownType, isTemplateLiteralContextualType) ? getTemplateLiteralType(texts, types) : stringType; + ) || unknownType, isTemplateLiteralContextualType)) { + return getTemplateLiteralType(texts, types); + } + const evaluated = node.parent.kind !== 215 /* TaggedTemplateExpression */ && evaluateTemplateExpression(node); + return evaluated ? getFreshTypeOfLiteralType(getStringLiteralType(evaluated)) : stringType; } function isTemplateLiteralContextualType(type) { return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */)); @@ -76309,7 +76820,7 @@ ${lanes.join("\n")} /*excludeJSDocTypeAssertions*/ true ); - return node.kind === 215 /* TypeAssertionExpression */ || node.kind === 233 /* AsExpression */ || isJSDocTypeAssertion(node); + return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 234 /* AsExpression */ || isJSDocTypeAssertion(node); } function checkDeclarationInitializer(declaration, checkMode, contextualType) { const initializer = getEffectiveInitializer(declaration); @@ -76326,7 +76837,7 @@ ${lanes.join("\n")} void 0, checkMode || 0 /* Normal */ ) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 206 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; + return isParameter(declaration) && declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; } function padTupleType(type, pattern) { const patternElements = pattern.elements; @@ -76334,7 +76845,7 @@ ${lanes.join("\n")} const elementFlags = type.target.elementFlags.slice(); for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) { const e = patternElements[i]; - if (i < patternElements.length - 1 || !(e.kind === 207 /* BindingElement */ && e.dotDotDotToken)) { + if (i < patternElements.length - 1 || !(e.kind === 208 /* BindingElement */ && e.dotDotDotToken)) { elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement( e, /*includePatternInType*/ @@ -76351,7 +76862,7 @@ ${lanes.join("\n")} return createTupleType(elementTypes, elementFlags, type.target.readonly); } function widenTypeInferredFromInitializer(declaration, type) { - const widened = getCombinedNodeFlags(declaration) & 2 /* Const */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); + const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); if (isInJSFile(declaration)) { if (isEmptyLiteralType(widened)) { reportImplicitAny(declaration, anyType); @@ -76395,14 +76906,14 @@ ${lanes.join("\n")} )); } function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpressionForMutableLocation(node.initializer, checkMode); } function checkObjectLiteralMethod(node, checkMode) { checkGrammarMethod(node); - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); @@ -76558,18 +77069,18 @@ ${lanes.join("\n")} if (quickType) { return quickType; } - if (node.flags & 134217728 /* TypeCached */ && flowTypeCache) { + if (node.flags & 268435456 /* TypeCached */ && flowTypeCache) { const cachedType = flowTypeCache[getNodeId(node)]; if (cachedType) { return cachedType; } } const startInvocationCount = flowInvocationCount; - const type = checkExpression(node); + const type = checkExpression(node, 128 /* TypeOnly */); if (flowInvocationCount !== startInvocationCount) { const cache = flowTypeCache || (flowTypeCache = []); cache[getNodeId(node)] = type; - setNodeFlags(node, node.flags | 134217728 /* TypeCached */); + setNodeFlags(node, node.flags | 268435456 /* TypeCached */); } return type; } @@ -76634,15 +77145,15 @@ ${lanes.join("\n")} return type; } function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 210 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 211 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 165 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 185 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 280 /* ExportSpecifier */; + const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 281 /* ExportSpecifier */; if (!ok) { - error(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); + error2(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query); } if (getIsolatedModules(compilerOptions)) { Debug.assert(!!(type.symbol.flags & 128 /* ConstEnum */)); const constEnumDeclaration = type.symbol.valueDeclaration; - if (constEnumDeclaration.flags & 16777216 /* Ambient */) { - error(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); + if (constEnumDeclaration.flags & 33554432 /* Ambient */ && !isValidTypeOnlyAliasUseSite(node)) { + error2(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); } } } @@ -76661,9 +77172,9 @@ ${lanes.join("\n")} const kind = node.kind; if (cancellationToken) { switch (kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -76680,7 +77191,7 @@ ${lanes.join("\n")} return nullWideningType; case 15 /* NoSubstitutionTemplateLiteral */: case 11 /* StringLiteral */: - return hasSkipDirectInferenceFlag(node) ? anyType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -76694,81 +77205,81 @@ ${lanes.join("\n")} return trueType; case 97 /* FalseKeyword */: return falseType; - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return checkTemplateExpression(node); case 14 /* RegularExpressionLiteral */: return globalRegExpType; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return checkArrayLiteral(node, checkMode, forceTuple); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return checkObjectLiteral(node, checkMode); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node, checkMode); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return checkQualifiedName(node, checkMode); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return checkIndexedAccess(node, checkMode); - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (node.expression.kind === 102 /* ImportKeyword */) { return checkImportCallExpression(node); } - case 213 /* NewExpression */: + case 214 /* NewExpression */: return checkCallExpression(node, checkMode); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return checkParenthesizedExpression(node, checkMode); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return checkClassExpression(node); - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return checkAssertion(node, checkMode); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return checkNonNullAssertion(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return checkExpressionWithTypeArguments(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return checkSatisfiesExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return checkMetaProperty(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return checkDeleteExpression(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return checkVoidExpression(node); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return checkAwaitExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return checkBinaryExpression(node, checkMode); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return checkConditionalExpression(node, checkMode); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return checkSpreadExpression(node, checkMode); - case 231 /* OmittedExpression */: + case 232 /* OmittedExpression */: return undefinedWideningType; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return checkYieldExpression(node); - case 236 /* SyntheticExpression */: + case 237 /* SyntheticExpression */: return checkSyntheticExpression(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return checkJsxExpression(node, checkMode); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return checkJsxElement(node, checkMode); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node, checkMode); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return checkJsxFragment(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return checkJsxAttributes(node, checkMode); - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return errorType; @@ -76783,7 +77294,7 @@ ${lanes.join("\n")} const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node)); getBaseConstraintOfType(typeParameter); if (!hasNonCircularTypeParameterDefault(typeParameter)) { - error(node.default, Diagnostics.Type_parameter_0_has_a_circular_default, typeToString(typeParameter)); + error2(node.default, Diagnostics.Type_parameter_0_has_a_circular_default, typeToString(typeParameter)); } const constraintType = getConstraintOfTypeParameter(typeParameter); const defaultType = getDefaultFromTypeParameter(typeParameter); @@ -76801,7 +77312,7 @@ ${lanes.join("\n")} if (modifiers) { const symbol = getSymbolOfDeclaration(node.parent); if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) { - error(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); + error2(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); } else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) { (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) }); const source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck); @@ -76820,38 +77331,38 @@ ${lanes.join("\n")} checkVariableLikeDeclaration(node); const func = getContainingFunction(node); if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 175 /* Constructor */ && nodeIsPresent(func.body))) { - error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); + if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { + error2(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 175 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { - error(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); + if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { + error2(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } if (!node.initializer && isOptionalDeclaration(node) && isBindingPattern(node.name) && func.body) { - error(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); + error2(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); } if (node.name && isIdentifier(node.name) && (node.name.escapedText === "this" || node.name.escapedText === "new")) { if (func.parameters.indexOf(node) !== 0) { - error(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); + error2(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } - if (func.kind === 175 /* Constructor */ || func.kind === 179 /* ConstructSignature */ || func.kind === 184 /* ConstructorType */) { - error(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); + if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) { + error2(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); } - if (func.kind === 218 /* ArrowFunction */) { - error(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); + if (func.kind === 219 /* ArrowFunction */) { + error2(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } - if (func.kind === 176 /* GetAccessor */ || func.kind === 177 /* SetAccessor */) { - error(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); + if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) { + error2(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); } } if (node.dotDotDotToken && !isBindingPattern(node.name) && !isTypeAssignableTo(getReducedType(getTypeOfSymbol(node.symbol)), anyReadonlyArrayType)) { - error(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type); + error2(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type); } } function checkTypePredicate(node) { const parent2 = getTypePredicateParent(node); if (!parent2) { - error(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + error2(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); return; } const signature = getSignatureFromDeclaration(parent2); @@ -76866,7 +77377,7 @@ ${lanes.join("\n")} } else { if (typePredicate.parameterIndex >= 0) { if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { - error(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); + error2(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { if (typePredicate.type) { const leadingError = () => chainDiagnosticMessages( @@ -76893,20 +77404,20 @@ ${lanes.join("\n")} } } if (!hasReportedError) { - error(node.parameterName, Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); + error2(node.parameterName, Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); } } } } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 218 /* ArrowFunction */: - case 178 /* CallSignature */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 219 /* ArrowFunction */: + case 179 /* CallSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: const parent2 = node.parent; if (node === parent2.type) { return parent2; @@ -76920,13 +77431,13 @@ ${lanes.join("\n")} } const name = element.name; if (name.kind === 80 /* Identifier */ && name.escapedText === predicateVariableName) { - error( + error2( predicateVariableNode, Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName ); return true; - } else if (name.kind === 206 /* ArrayBindingPattern */ || name.kind === 205 /* ObjectBindingPattern */) { + } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( name, predicateVariableNode, @@ -76938,9 +77449,9 @@ ${lanes.join("\n")} } } function checkSignatureDeclaration(node) { - if (node.kind === 180 /* IndexSignature */) { + if (node.kind === 181 /* IndexSignature */) { checkGrammarIndexSignature(node); - } else if (node.kind === 183 /* FunctionType */ || node.kind === 261 /* FunctionDeclaration */ || node.kind === 184 /* ConstructorType */ || node.kind === 178 /* CallSignature */ || node.kind === 175 /* Constructor */ || node.kind === 179 /* ConstructSignature */) { + } else if (node.kind === 184 /* FunctionType */ || node.kind === 262 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } const functionFlags = getFunctionFlags(node); @@ -76964,35 +77475,46 @@ ${lanes.join("\n")} addLazyDiagnostic(checkSignatureDeclarationDiagnostics); function checkSignatureDeclarationDiagnostics() { checkCollisionWithArgumentsInGeneratedCode(node); - const returnTypeNode = getEffectiveReturnTypeNode(node); + let returnTypeNode = getEffectiveReturnTypeNode(node); + let returnTypeErrorLocation = returnTypeNode; + if (isInJSFile(node)) { + const typeTag = getJSDocTypeTag(node); + if (typeTag && typeTag.typeExpression && isTypeReferenceNode(typeTag.typeExpression.type)) { + const signature = getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression)); + if (signature && signature.declaration) { + returnTypeNode = getEffectiveReturnTypeNode(signature.declaration); + returnTypeErrorLocation = typeTag.typeExpression.type; + } + } + } if (noImplicitAny && !returnTypeNode) { switch (node.kind) { - case 179 /* ConstructSignature */: - error(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); + case 180 /* ConstructSignature */: + error2(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 178 /* CallSignature */: - error(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); + case 179 /* CallSignature */: + error2(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } } - if (returnTypeNode) { + if (returnTypeNode && returnTypeErrorLocation) { const functionFlags2 = getFunctionFlags(node); if ((functionFlags2 & (4 /* Invalid */ | 1 /* Generator */)) === 1 /* Generator */) { const returnType = getTypeFromTypeNode(returnTypeNode); if (returnType === voidType) { - error(returnTypeNode, Diagnostics.A_generator_cannot_have_a_void_type_annotation); + error2(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation); } else { const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType; const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType; const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType; const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */)); - checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeNode); + checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation); } } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) { - checkAsyncFunctionReturnType(node, returnTypeNode); + checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation); } } - if (node.kind !== 180 /* IndexSignature */ && node.kind !== 323 /* JSDocFunctionType */) { + if (node.kind !== 181 /* IndexSignature */ && node.kind !== 324 /* JSDocFunctionType */) { registerForUnusedIdentifiersCheck(node); } } @@ -77002,7 +77524,7 @@ ${lanes.join("\n")} const staticNames = /* @__PURE__ */ new Map(); const privateIdentifiers = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 175 /* Constructor */) { + if (member.kind === 176 /* Constructor */) { for (const param of member.parameters) { if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); @@ -77020,16 +77542,16 @@ ${lanes.join("\n")} const memberName = name && getPropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); break; } @@ -77040,16 +77562,16 @@ ${lanes.join("\n")} const prev = names.get(name); if (prev) { if ((prev & 16 /* PrivateStatic */) !== (meaning & 16 /* PrivateStatic */)) { - error(location, Diagnostics.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, getTextOfNode(location)); + error2(location, Diagnostics.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, getTextOfNode(location)); } else { const prevIsMethod = !!(prev & 8 /* Method */); const isMethod = !!(meaning & 8 /* Method */); if (prevIsMethod || isMethod) { if (prevIsMethod !== isMethod) { - error(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); + error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); } } else if (prev & meaning & ~16 /* PrivateStatic */) { - error(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); + error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); } else { names.set(name, prev | meaning); } @@ -77070,10 +77592,13 @@ ${lanes.join("\n")} case "length": case "caller": case "arguments": + if (useDefineForClassFields) { + break; + } case "prototype": const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1; const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node)); - error(memberNameNode, message, memberName, className); + error2(memberNameNode, message, memberName, className); break; } } @@ -77082,7 +77607,7 @@ ${lanes.join("\n")} function checkObjectTypeForDuplicateDeclarations(node) { const names = /* @__PURE__ */ new Map(); for (const member of node.members) { - if (member.kind === 170 /* PropertySignature */) { + if (member.kind === 171 /* PropertySignature */) { let memberName; const name = member.name; switch (name.kind) { @@ -77097,8 +77622,8 @@ ${lanes.join("\n")} continue; } if (names.get(memberName)) { - error(getNameOfDeclaration(member.symbol.valueDeclaration), Diagnostics.Duplicate_identifier_0, memberName); - error(member.name, Diagnostics.Duplicate_identifier_0, memberName); + error2(getNameOfDeclaration(member.symbol.valueDeclaration), Diagnostics.Duplicate_identifier_0, memberName); + error2(member.name, Diagnostics.Duplicate_identifier_0, memberName); } else { names.set(memberName, true); } @@ -77106,7 +77631,7 @@ ${lanes.join("\n")} } } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 263 /* InterfaceDeclaration */) { + if (node.kind === 264 /* InterfaceDeclaration */) { const nodeSymbol = getSymbolOfDeclaration(node); if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { return; @@ -77130,7 +77655,7 @@ ${lanes.join("\n")} indexSignatureMap.forEach((entry) => { if (entry.declarations.length > 1) { for (const declaration of entry.declarations) { - error(declaration, Diagnostics.Duplicate_index_signature_for_type_0, typeToString(entry.type)); + error2(declaration, Diagnostics.Duplicate_index_signature_for_type_0, typeToString(entry.type)); } } }); @@ -77141,13 +77666,13 @@ ${lanes.join("\n")} checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 171 /* PropertyDeclaration */ && node.initializer) { - error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { + error2(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } function checkPropertySignature(node) { if (isPrivateIdentifier(node.name)) { - error(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + error2(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); } return checkPropertyDeclaration(node); } @@ -77155,21 +77680,21 @@ ${lanes.join("\n")} if (!checkGrammarMethod(node)) checkGrammarComputedPropertyName(node.name); if (isMethodDeclaration(node) && node.asteriskToken && isIdentifier(node.name) && idText(node.name) === "constructor") { - error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); + error2(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 173 /* MethodDeclaration */ && node.body) { - error(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); + if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + error2(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { - error(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); + error2(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); } setNodeLinksForPrivateIdentifierScope(node); } function setNodeLinksForPrivateIdentifierScope(node) { if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) { for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) { - getNodeLinks(lexicalScope).flags |= 4194304 /* ContainsClassWithPrivateIdentifiers */; + getNodeLinks(lexicalScope).flags |= 1048576 /* ContainsClassWithPrivateIdentifiers */; } if (isClassExpression(node.parent)) { const enclosingIterationStatement = getEnclosingIterationStatement(node.parent); @@ -77203,7 +77728,7 @@ ${lanes.join("\n")} if (isPrivateIdentifierClassElementDeclaration(n)) { return true; } - return n.kind === 171 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; + return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; } function checkConstructorDeclarationDiagnostics() { const containingClassDecl = node.parent; @@ -77213,12 +77738,12 @@ ${lanes.join("\n")} const superCall = findFirstSuperCall(node.body); if (superCall) { if (classExtendsNull) { - error(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); + error2(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); } - const superCallShouldBeRootLevel = (getEmitScriptTarget(compilerOptions) !== 99 /* ESNext */ || !useDefineForClassFields) && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); + const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); if (superCallShouldBeRootLevel) { if (!superCallIsRootLevelInConstructor(superCall, node.body)) { - error(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); + error2(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); } else { let superCallStatement; for (const statement of node.body.statements) { @@ -77231,12 +77756,12 @@ ${lanes.join("\n")} } } if (superCallStatement === void 0) { - error(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers); + error2(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers); } } } } else if (!classExtendsNull) { - error(node, Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); + error2(node, Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); } } } @@ -77256,7 +77781,7 @@ ${lanes.join("\n")} } function checkAccessorDeclaration(node) { if (isIdentifier(node.name) && idText(node.name) === "constructor" && isClassLike(node.parent)) { - error(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); + error2(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); } addLazyDiagnostic(checkAccessorDeclarationDiagnostics); checkSourceElement(node.body); @@ -77266,36 +77791,36 @@ ${lanes.join("\n")} checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 176 /* GetAccessor */) { - if (!(node.flags & 16777216 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 256 /* HasImplicitReturn */) { - if (!(node.flags & 512 /* HasExplicitReturn */)) { - error(node.name, Diagnostics.A_get_accessor_must_return_a_value); + if (node.kind === 177 /* GetAccessor */) { + if (!(node.flags & 33554432 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 512 /* HasImplicitReturn */) { + if (!(node.flags & 1024 /* HasExplicitReturn */)) { + error2(node.name, Diagnostics.A_get_accessor_must_return_a_value); } } } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { const symbol = getSymbolOfDeclaration(node); - const getter = getDeclarationOfKind(symbol, 176 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 177 /* SetAccessor */); + const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); + const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); const setterFlags = getEffectiveModifierFlags(setter); if ((getterFlags & 256 /* Abstract */) !== (setterFlags & 256 /* Abstract */)) { - error(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); - error(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); + error2(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); + error2(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); } if (getterFlags & 16 /* Protected */ && !(setterFlags & (16 /* Protected */ | 8 /* Private */)) || getterFlags & 8 /* Private */ && !(setterFlags & 8 /* Private */)) { - error(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); - error(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); + error2(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); + error2(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); } } } const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node)); - if (node.kind === 176 /* GetAccessor */) { + if (node.kind === 177 /* GetAccessor */) { checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); } } @@ -77356,7 +77881,7 @@ ${lanes.join("\n")} } function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 182 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { + if (node.kind === 183 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { const sourceFile = getSourceFileOfNode(node); if (scanTokenAtPosition(sourceFile, node.typeName.end) === 25 /* DotToken */) { grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); @@ -77378,7 +77903,7 @@ ${lanes.join("\n")} } const symbol = getNodeLinks(node).resolvedSymbol; if (symbol) { - if (some(symbol.declarations, (d) => isTypeDeclaration(d) && !!(d.flags & 268435456 /* Deprecated */))) { + if (some(symbol.declarations, (d) => isTypeDeclaration(d) && !!(d.flags & 536870912 /* Deprecated */))) { addDeprecatedSuggestion( getDeprecatedSuggestionNode(node), symbol.declarations, @@ -77418,17 +77943,12 @@ ${lanes.join("\n")} const elementTypes = node.elements; let seenOptionalElement = false; let seenRestElement = false; - const hasNamedElement = some(elementTypes, isNamedTupleMember); for (const e of elementTypes) { - if (e.kind !== 201 /* NamedTupleMember */ && hasNamedElement) { - grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); - break; - } const flags = getTupleElementFlags(e); if (flags & 8 /* Variadic */) { const type = getTypeFromTypeNode(e.type); if (!isArrayLikeType(type)) { - error(e, Diagnostics.A_rest_element_type_must_be_an_array_type); + error2(e, Diagnostics.A_rest_element_type_must_be_an_array_type); break; } if (isArrayType(type) || isTupleType(type) && type.target.combinedFlags & 4 /* Rest */) { @@ -77465,8 +77985,8 @@ ${lanes.join("\n")} const objectType = type.objectType; const indexType = type.indexType; if (isTypeAssignableTo(indexType, getIndexType(objectType, 0 /* None */))) { - if (accessNode.kind === 211 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { - error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); + if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { + error2(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); } return type; } @@ -77479,12 +77999,12 @@ ${lanes.join("\n")} if (propertyName) { const propertySymbol = forEachType(apparentObjectType, (t) => getPropertyOfType(t, propertyName)); if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 24 /* NonPublicAccessibilityModifier */) { - error(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName)); + error2(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName)); return errorType; } } } - error(accessNode, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType)); + error2(accessNode, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType)); return errorType; } function checkIndexedAccessType(node) { @@ -77526,7 +78046,7 @@ ${lanes.join("\n")} forEachChild(node, checkSourceElement); } function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 193 /* ConditionalType */ && n.parent.extendsType === n)) { + if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) { grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); } checkSourceElement(node.typeParameter); @@ -77536,11 +78056,11 @@ ${lanes.join("\n")} if (!links.typeParametersChecked) { links.typeParametersChecked = true; const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 167 /* TypeParameter */); + const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */); if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { const name = symbolToString(symbol); for (const declaration of declarations) { - error(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_constraints, name); + error2(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_constraints, name); } } } @@ -77574,22 +78094,23 @@ ${lanes.join("\n")} if (node.dotDotDotToken && node.questionToken) { grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); } - if (node.type.kind === 189 /* OptionalType */) { + if (node.type.kind === 190 /* OptionalType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type); } - if (node.type.kind === 190 /* RestType */) { + if (node.type.kind === 191 /* RestType */) { grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type); } checkSourceElement(node.type); getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 16777216 /* Ambient */); + return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { - let flags = getCombinedModifierFlags(n); - if (n.parent.kind !== 263 /* InterfaceDeclaration */ && n.parent.kind !== 262 /* ClassDeclaration */ && n.parent.kind !== 230 /* ClassExpression */ && n.flags & 16777216 /* Ambient */) { - if (!(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { + let flags = getCombinedModifierFlagsCached(n); + if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) { + const container = getEnclosingContainer(n); + if (container && container.flags & 128 /* ExportContext */ && !(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { flags |= 1 /* Export */; } flags |= 2 /* Ambient */; @@ -77611,13 +78132,13 @@ ${lanes.join("\n")} forEach(overloads, (o) => { const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags; if (deviation & 1 /* Export */) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); } else if (deviation & 2 /* Ambient */) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); } else if (deviation & (8 /* Private */ | 16 /* Protected */)) { - error(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); + error2(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); } else if (deviation & 256 /* Abstract */) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); } }); } @@ -77628,7 +78149,7 @@ ${lanes.join("\n")} forEach(overloads, (o) => { const deviation = hasQuestionToken(o) !== canonicalHasQuestionToken; if (deviation) { - error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_optional_or_required); + error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_optional_or_required); } }); } @@ -77664,27 +78185,27 @@ ${lanes.join("\n")} (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || // Both are computed property names isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) && isTypeIdenticalTo(checkComputedPropertyName(node.name), checkComputedPropertyName(subsequentName)) || // Both are literal property names that are the same. isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); + const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); if (reportError) { const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; - error(errorNode2, diagnostic); + error2(errorNode2, diagnostic); } return; } if (nodeIsPresent(subsequentNode.body)) { - error(errorNode2, Diagnostics.Function_implementation_name_must_be_0, declarationNameToString(node.name)); + error2(errorNode2, Diagnostics.Function_implementation_name_must_be_0, declarationNameToString(node.name)); return; } } } const errorNode = node.name || node; if (isConstructor) { - error(errorNode, Diagnostics.Constructor_implementation_is_missing); + error2(errorNode, Diagnostics.Constructor_implementation_is_missing); } else { if (hasSyntacticModifier(node, 256 /* Abstract */)) { - error(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive); + error2(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive); } else { - error(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); + error2(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); } } } @@ -77695,15 +78216,15 @@ ${lanes.join("\n")} if (declarations) { for (const current of declarations) { const node = current; - const inAmbientContext = node.flags & 16777216 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 263 /* InterfaceDeclaration */ || node.parent.kind === 186 /* TypeLiteral */) || inAmbientContext; + const inAmbientContext = node.flags & 33554432 /* Ambient */; + const inAmbientContextOrInterface = node.parent && (node.parent.kind === 264 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext; if (inAmbientContextOrInterface) { previousDeclaration = void 0; } - if ((node.kind === 262 /* ClassDeclaration */ || node.kind === 230 /* ClassExpression */) && !inAmbientContext) { + if ((node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */) && !inAmbientContext) { hasNonAmbientClass = true; } - if (node.kind === 261 /* FunctionDeclaration */ || node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */ || node.kind === 175 /* Constructor */) { + if (node.kind === 262 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) { functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; @@ -77747,21 +78268,21 @@ ${lanes.join("\n")} } if (multipleConstructorImplementation) { forEach(functionDeclarations, (declaration) => { - error(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed); + error2(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed); }); } if (duplicateFunctionDeclaration) { forEach(functionDeclarations, (declaration) => { - error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_function_implementation); + error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_function_implementation); }); } if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 262 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); + const relatedDiagnostics = filter(declarations, (d) => d.kind === 263 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 262 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 261 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + const diagnostic = declaration.kind === 263 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 262 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; if (diagnostic) { addRelatedInfo( - error(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), + error2(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), ...relatedDiagnostics ); } @@ -77782,7 +78303,7 @@ ${lanes.join("\n")} if (!isImplementationCompatibleWithOverload(bodySignature, signature)) { const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration; addRelatedInfo( - error(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature), + error2(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature), createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here) ); break; @@ -77829,54 +78350,54 @@ ${lanes.join("\n")} const declarationSpaces = getDeclarationSpaces(d); const name = getNameOfDeclaration(d); if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) { - error(name, Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, declarationNameToString(name)); + error2(name, Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, declarationNameToString(name)); } else if (declarationSpaces & commonDeclarationSpacesForExportsAndLocals) { - error(name, Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, declarationNameToString(name)); + error2(name, Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, declarationNameToString(name)); } } } function getDeclarationSpaces(decl) { let d = decl; switch (d.kind) { - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return 2 /* ExportType */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: return 2 /* ExportType */ | 1 /* ExportValue */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 276 /* ExportAssignment */: - case 225 /* BinaryExpression */: + case 277 /* ExportAssignment */: + case 226 /* BinaryExpression */: const node2 = d; const expression = isExportAssignment(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1 /* ExportValue */; } d = expression; - case 270 /* ImportEqualsDeclaration */: - case 273 /* NamespaceImport */: - case 272 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 274 /* NamespaceImport */: + case 273 /* ImportClause */: let result = 0 /* None */; const target = resolveAlias(getSymbolOfDeclaration(d)); forEach(target.declarations, (d2) => { result |= getDeclarationSpaces(d2); }); return result; - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: - case 261 /* FunctionDeclaration */: - case 275 /* ImportSpecifier */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 262 /* FunctionDeclaration */: + case 276 /* ImportSpecifier */: case 80 /* Identifier */: return 1 /* ExportValue */; - case 172 /* MethodSignature */: - case 170 /* PropertySignature */: + case 173 /* MethodSignature */: + case 171 /* PropertySignature */: return 2 /* ExportType */; default: return Debug.failBadSyntaxKind(d); @@ -77911,7 +78432,7 @@ ${lanes.join("\n")} const thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0 /* Call */) : emptyArray; if (thenSignatures.length === 0) { if (errorNode) { - error(errorNode, Diagnostics.A_promise_must_have_a_then_method); + error2(errorNode, Diagnostics.A_promise_must_have_a_then_method); } return void 0; } @@ -77931,7 +78452,7 @@ ${lanes.join("\n")} thisTypeForErrorOut.value = thisTypeForError; } if (errorNode) { - error(errorNode, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForError)); + error2(errorNode, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForError)); } return void 0; } @@ -77942,7 +78463,7 @@ ${lanes.join("\n")} const onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0 /* Call */); if (onfulfilledParameterSignatures.length === 0) { if (errorNode) { - error(errorNode, Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback); + error2(errorNode, Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback); } return void 0; } @@ -78023,7 +78544,7 @@ ${lanes.join("\n")} if (type.flags & 1048576 /* Union */) { if (awaitedTypeStack.lastIndexOf(type.id) >= 0) { if (errorNode) { - error(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); + error2(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); } return void 0; } @@ -78046,7 +78567,7 @@ ${lanes.join("\n")} if (promisedType) { if (type.id === promisedType.id || awaitedTypeStack.lastIndexOf(promisedType.id) >= 0) { if (errorNode) { - error(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); + error2(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); } return void 0; } @@ -78072,7 +78593,7 @@ ${lanes.join("\n")} } return typeAsAwaitable.awaitedTypeOfType = type; } - function checkAsyncFunctionReturnType(node, returnTypeNode) { + function checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation) { const returnType = getTypeFromTypeNode(returnTypeNode); if (languageVersion >= 2 /* ES2015 */) { if (isErrorType(returnType)) { @@ -78083,7 +78604,7 @@ ${lanes.join("\n")} true ); if (globalPromiseType !== emptyGenericType && !isReferenceToType2(returnType, globalPromiseType)) { - error(returnTypeNode, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); + reportErrorForInvalidReturnType(Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, returnTypeNode, returnTypeErrorLocation, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); return; } } else { @@ -78093,7 +78614,7 @@ ${lanes.join("\n")} } const promiseConstructorName = getEntityNameFromTypeNode(returnTypeNode); if (promiseConstructorName === void 0) { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, typeToString(returnType)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, typeToString(returnType)); return; } const promiseConstructorSymbol = resolveEntityName( @@ -78108,9 +78629,9 @@ ${lanes.join("\n")} /*reportErrors*/ false )) { - error(returnTypeNode, Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); + error2(returnTypeErrorLocation, Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option); } else { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); } return; } @@ -78119,21 +78640,22 @@ ${lanes.join("\n")} true ); if (globalPromiseConstructorLikeType === emptyObjectType) { - error(returnTypeNode, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + reportErrorForInvalidReturnType(Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); return; } - if (!checkTypeAssignableTo( - promiseConstructorType, - globalPromiseConstructorLikeType, - returnTypeNode, - Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value - )) { + const headMessage = Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value; + const errorInfo = () => returnTypeNode === returnTypeErrorLocation ? void 0 : chainDiagnosticMessages( + /*details*/ + void 0, + Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type + ); + if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeErrorLocation, headMessage, errorInfo)) { return; } const rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); const collidingSymbol = getSymbol2(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { - error( + error2( collidingSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, idText(rootName), @@ -78149,6 +78671,14 @@ ${lanes.join("\n")} node, Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member ); + function reportErrorForInvalidReturnType(message, returnTypeNode2, returnTypeErrorLocation2, typeName) { + if (returnTypeNode2 === returnTypeErrorLocation2) { + error2(returnTypeErrorLocation2, message, typeName); + } else { + const diag2 = error2(returnTypeErrorLocation2, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); + addRelatedInfo(diag2, createDiagnosticForNode(returnTypeNode2, message, typeName)); + } + } } function checkDecorator(node) { const signature = getResolvedSignature(node); @@ -78163,21 +78693,21 @@ ${lanes.join("\n")} let headMessage; const expectedReturnType = decoratorSignature.resolvedReturnType; switch (node.parent.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!legacyDecorators) { headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; } - case 168 /* Parameter */: + case 169 /* Parameter */: headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; break; default: @@ -78246,7 +78776,7 @@ ${lanes.join("\n")} if (canCollectSymbolAliasAccessabilityData && symbolIsValue(rootSymbol) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) && !getTypeOnlyAliasDeclaration(rootSymbol)) { markAliasSymbolAsReferenced(rootSymbol); } else if (forDecoratorMetadata && getIsolatedModules(compilerOptions) && getEmitModuleKind(compilerOptions) >= 5 /* ES2015 */ && !symbolIsValue(rootSymbol) && !some(rootSymbol.declarations, isTypeOnlyImportOrExportDeclaration)) { - const diag2 = error(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled); + const diag2 = error2(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled); const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration2); if (aliasDeclaration) { addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName))); @@ -78267,15 +78797,15 @@ ${lanes.join("\n")} function getEntityNameForDecoratorMetadata(node) { if (node) { switch (node.kind) { - case 192 /* IntersectionType */: - case 191 /* UnionType */: + case 193 /* IntersectionType */: + case 192 /* UnionType */: return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 195 /* ParenthesizedType */: - case 201 /* NamedTupleMember */: + case 196 /* ParenthesizedType */: + case 202 /* NamedTupleMember */: return getEntityNameForDecoratorMetadata(node.type); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return node.typeName; } } @@ -78283,13 +78813,13 @@ ${lanes.join("\n")} function getEntityNameForDecoratorMetadataFromTypeList(types) { let commonEntityName; for (let typeNode of types) { - while (typeNode.kind === 195 /* ParenthesizedType */ || typeNode.kind === 201 /* NamedTupleMember */) { + while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) { typeNode = typeNode.type; } if (typeNode.kind === 146 /* NeverKeyword */) { continue; } - if (!strictNullChecks && (typeNode.kind === 200 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { + if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { continue; } const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); @@ -78320,7 +78850,7 @@ ${lanes.join("\n")} } if (legacyDecorators) { checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { checkExternalEmitHelpers(firstDecorator, 32 /* Param */); } } else if (languageVersion < 99 /* ESNext */) { @@ -78346,7 +78876,7 @@ ${lanes.join("\n")} if (compilerOptions.emitDecoratorMetadata) { checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const constructor = getFirstConstructorWithBody(node); if (constructor) { for (const parameter of constructor.parameters) { @@ -78354,27 +78884,28 @@ ${lanes.join("\n")} } } break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - const otherKind = node.kind === 176 /* GetAccessor */ ? 177 /* SetAccessor */ : 176 /* GetAccessor */; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind); markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: for (const parameter of node.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); break; - case 168 /* Parameter */: + case 169 /* Parameter */: markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); const containingSignature = node.parent; for (const parameter of containingSignature.parameters) { markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); } + markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(containingSignature)); break; } } @@ -78394,7 +78925,7 @@ ${lanes.join("\n")} } function checkJSDocTypeAliasTag(node) { if (!node.typeExpression) { - error(node.name, Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags); + error2(node.name, Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags); } if (node.name) { checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); @@ -78419,7 +78950,7 @@ ${lanes.join("\n")} if (length(tags) > 1) { for (let i = 1; i < length(tags); i++) { const tagName = tags[i].tagName; - error(tagName, Diagnostics._0_tag_already_specified, idText(tagName)); + error2(tagName, Diagnostics._0_tag_already_specified, idText(tagName)); } } } @@ -78451,40 +78982,40 @@ ${lanes.join("\n")} function checkJSDocImplementsTag(node) { const classLike = getEffectiveJSDocHost(node); if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { - error(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); + error2(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); } } function checkJSDocAugmentsTag(node) { const classLike = getEffectiveJSDocHost(node); if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { - error(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); + error2(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); return; } const augmentsTags = getJSDocTags(classLike).filter(isJSDocAugmentsTag); Debug.assert(augmentsTags.length > 0); if (augmentsTags.length > 1) { - error(augmentsTags[1], Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); + error2(augmentsTags[1], Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); } const name = getIdentifierFromEntityNameExpression(node.class.expression); const extend2 = getClassExtendsHeritageElement(classLike); if (extend2) { const className = getIdentifierFromEntityNameExpression(extend2.expression); if (className && name.escapedText !== className.escapedText) { - error(name, Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause, idText(node.tagName), idText(name), idText(className)); + error2(name, Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause, idText(node.tagName), idText(name), idText(className)); } } } function checkJSDocAccessibilityModifiers(node) { const host2 = getJSDocHost(node); if (host2 && isPrivateIdentifierClassElementDeclaration(host2)) { - error(node, Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + error2(node, Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); } } function getIdentifierFromEntityNameExpression(node) { switch (node.kind) { case 80 /* Identifier */: return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return node.name; default: return void 0; @@ -78495,7 +79026,7 @@ ${lanes.join("\n")} checkDecorators(node); checkSignatureDeclaration(node); const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (hasBindableName(node)) { @@ -78503,7 +79034,7 @@ ${lanes.join("\n")} const localSymbol = node.localSymbol || symbol; const firstDeclaration = (_a = localSymbol.declarations) == null ? void 0 : _a.find( // Get first non javascript function declaration - (declaration) => declaration.kind === node.kind && !(declaration.flags & 262144 /* JavaScriptFile */) + (declaration) => declaration.kind === node.kind && !(declaration.flags & 524288 /* JavaScriptFile */) ); if (node === firstDeclaration) { checkFunctionOrConstructorSymbol(localSymbol); @@ -78512,14 +79043,14 @@ ${lanes.join("\n")} checkFunctionOrConstructorSymbol(symbol); } } - const body = node.kind === 172 /* MethodSignature */ ? void 0 : node.body; + const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body; checkSourceElement(body); checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); if (isInJSFile(node)) { const typeTag = getJSDocTypeTag(node); if (typeTag && typeTag.typeExpression && !getContextualCallSignature(getTypeFromTypeNode(typeTag.typeExpression), node)) { - error(typeTag.typeExpression.type, Diagnostics.The_type_of_a_function_declaration_must_match_the_function_s_signature); + error2(typeTag.typeExpression.type, Diagnostics.The_type_of_a_function_declaration_must_match_the_function_s_signature); } } function checkFunctionOrMethodDeclarationDiagnostics() { @@ -78548,42 +79079,42 @@ ${lanes.join("\n")} function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { for (const node of potentiallyUnusedIdentifiers) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: checkUnusedClassMembers(node, addDiagnostic); checkUnusedTypeParameters(node, addDiagnostic); break; - case 311 /* SourceFile */: - case 266 /* ModuleDeclaration */: - case 240 /* Block */: - case 268 /* CaseBlock */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 312 /* SourceFile */: + case 267 /* ModuleDeclaration */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: checkUnusedLocalsAndParameters(node, addDiagnostic); break; - case 175 /* Constructor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (node.body) { checkUnusedLocalsAndParameters(node, addDiagnostic); } checkUnusedTypeParameters(node, addDiagnostic); break; - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: checkUnusedTypeParameters(node, addDiagnostic); break; - case 194 /* InferType */: + case 195 /* InferType */: checkUnusedInferTypeParameter(node, addDiagnostic); break; default: @@ -78602,28 +79133,28 @@ ${lanes.join("\n")} function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { switch (member.kind) { - case 173 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - if (member.kind === 177 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { break; } const symbol = getSymbolOfDeclaration(member); - if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 16777216 /* Ambient */)) { + if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; - case 175 /* Constructor */: + case 176 /* Constructor */: for (const parameter of member.parameters) { if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } break; - case 180 /* IndexSignature */: - case 239 /* SemicolonClassElement */: - case 174 /* ClassStaticBlockDeclaration */: + case 181 /* IndexSignature */: + case 240 /* SemicolonClassElement */: + case 175 /* ClassStaticBlockDeclaration */: break; default: Debug.fail("Unexpected class member"); @@ -78647,7 +79178,7 @@ ${lanes.join("\n")} continue; const name = idText(typeParameter.name); const { parent: parent2 } = typeParameter; - if (parent2.kind !== 194 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { + if (parent2.kind !== 195 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { const sourceFile = getSourceFileOfNode(parent2); const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); @@ -78705,7 +79236,11 @@ ${lanes.join("\n")} addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId); } } else if (isVariableDeclaration(declaration)) { - addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); + const blockScopeKind = getCombinedNodeFlagsCached(declaration) & 7 /* BlockScoped */; + const name = getNameOfDeclaration(declaration); + if (blockScopeKind !== 4 /* Using */ && blockScopeKind !== 6 /* AwaitUsing */ || !name || !isIdentifierThatStartsWithUnderscore(name)) { + addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); + } } else { const parameter = local.valueDeclaration && tryGetRootParameterDeclaration(local.valueDeclaration); const name = local.valueDeclaration && getNameOfDeclaration(local.valueDeclaration); @@ -78726,7 +79261,7 @@ ${lanes.join("\n")} }); unusedImports.forEach(([importClause, unuseds]) => { const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 273 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); + const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 274 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); } else { @@ -78737,7 +79272,7 @@ ${lanes.join("\n")} unusedDestructures.forEach(([bindingPattern, bindingElements]) => { const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */; if (bindingPattern.elements.length === bindingElements.length) { - if (bindingElements.length === 1 && bindingPattern.parent.kind === 259 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 260 /* VariableDeclarationList */) { + if (bindingElements.length === 1 && bindingPattern.parent.kind === 260 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 261 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); @@ -78750,7 +79285,7 @@ ${lanes.join("\n")} }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 242 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -78779,21 +79314,21 @@ ${lanes.join("\n")} switch (name.kind) { case 80 /* Identifier */: return idText(name); - case 206 /* ArrayBindingPattern */: - case 205 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: return bindingNameText(cast(first(name.elements), isBindingElement).name); default: return Debug.assertNever(name); } } function isImportedDeclaration(node) { - return node.kind === 272 /* ImportClause */ || node.kind === 275 /* ImportSpecifier */ || node.kind === 273 /* NamespaceImport */; + return node.kind === 273 /* ImportClause */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 274 /* NamespaceImport */; } function importClauseFromImported(decl) { - return decl.kind === 272 /* ImportClause */ ? decl : decl.kind === 273 /* NamespaceImport */ ? decl.parent : decl.parent.parent; + return decl.kind === 273 /* ImportClause */ ? decl : decl.kind === 274 /* NamespaceImport */ ? decl.parent : decl.parent.parent; } function checkBlock(node) { - if (node.kind === 240 /* Block */) { + if (node.kind === 241 /* Block */) { checkGrammarStatementInAmbientContext(node); } if (isFunctionOrModuleBlock(node)) { @@ -78808,7 +79343,7 @@ ${lanes.join("\n")} } } function checkCollisionWithArgumentsInGeneratedCode(node) { - if (languageVersion >= 2 /* ES2015 */ || !hasRestParameter(node) || node.flags & 16777216 /* Ambient */ || nodeIsMissing(node.body)) { + if (languageVersion >= 2 /* ES2015 */ || !hasRestParameter(node) || node.flags & 33554432 /* Ambient */ || nodeIsMissing(node.body)) { return; } forEach(node.parameters, (p) => { @@ -78821,10 +79356,10 @@ ${lanes.join("\n")} if ((identifier == null ? void 0 : identifier.escapedText) !== name) { return false; } - if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 173 /* MethodDeclaration */ || node.kind === 172 /* MethodSignature */ || node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */ || node.kind === 302 /* PropertyAssignment */) { + if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 303 /* PropertyAssignment */) { return false; } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return false; } if (isImportClause(node) || isImportEqualsDeclaration(node) || isImportSpecifier(node)) { @@ -78843,9 +79378,9 @@ ${lanes.join("\n")} if (getNodeCheckFlags(current) & 4 /* CaptureThis */) { const isDeclaration2 = node.kind !== 80 /* Identifier */; if (isDeclaration2) { - error(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); + error2(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); } else { - error(node, Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference); + error2(node, Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference); } return true; } @@ -78857,9 +79392,9 @@ ${lanes.join("\n")} if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) { const isDeclaration2 = node.kind !== 80 /* Identifier */; if (isDeclaration2) { - error(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); + error2(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); } else { - error(node, Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference); + error2(node, Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference); } return true; } @@ -78877,7 +79412,7 @@ ${lanes.join("\n")} return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { + if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { errorSkippedOn( "noEmit", name, @@ -78895,7 +79430,7 @@ ${lanes.join("\n")} return; } const parent2 = getDeclarationContainer(node); - if (parent2.kind === 311 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 2048 /* HasAsyncFunctions */) { + if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 4096 /* HasAsyncFunctions */) { errorSkippedOn( "noEmit", name, @@ -78912,7 +79447,7 @@ ${lanes.join("\n")} } function checkWeakMapSetCollision(node) { const enclosingBlockScope = getEnclosingBlockScopeContainer(node); - if (getNodeCheckFlags(enclosingBlockScope) & 4194304 /* ContainsClassWithPrivateIdentifiers */) { + if (getNodeCheckFlags(enclosingBlockScope) & 1048576 /* ContainsClassWithPrivateIdentifiers */) { Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier"); errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText); } @@ -78926,18 +79461,18 @@ ${lanes.join("\n")} let hasCollision = false; if (isClassExpression(node)) { for (const member of node.members) { - if (getNodeCheckFlags(member) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (getNodeCheckFlags(member) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; break; } } } else if (isFunctionExpression(node)) { - if (getNodeCheckFlags(node) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (getNodeCheckFlags(node) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; } } else { const container = getEnclosingBlockScopeContainer(node); - if (container && getNodeCheckFlags(container) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) { + if (container && getNodeCheckFlags(container) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { hasCollision = true; } } @@ -78961,7 +79496,7 @@ ${lanes.join("\n")} recordPotentialCollisionWithReflectInGeneratedCode(node, name); if (isClassLike(node)) { checkTypeNameIsReserved(name, Diagnostics.Class_name_cannot_be_0); - if (!(node.flags & 16777216 /* Ambient */)) { + if (!(node.flags & 33554432 /* Ambient */)) { checkClassNameCollisionWithObject(name); } } else if (isEnumDeclaration(node)) { @@ -78969,10 +79504,7 @@ ${lanes.join("\n")} } } function checkVarDeclaredNamesNotShadowed(node) { - if ((getCombinedNodeFlags(node) & 3 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { - return; - } - if (node.kind === 259 /* VariableDeclaration */ && !node.initializer) { + if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { return; } const symbol = getSymbolOfDeclaration(node); @@ -78991,13 +79523,13 @@ ${lanes.join("\n")} false ); if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { - if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 260 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 242 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 240 /* Block */ && isFunctionLike(container.parent) || container.kind === 267 /* ModuleBlock */ || container.kind === 266 /* ModuleDeclaration */ || container.kind === 311 /* SourceFile */); + if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 7 /* BlockScoped */) { + const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 261 /* VariableDeclarationList */); + const container = varDeclList.parent.kind === 243 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; + const namesShareScope = container && (container.kind === 241 /* Block */ && isFunctionLike(container.parent) || container.kind === 268 /* ModuleBlock */ || container.kind === 267 /* ModuleDeclaration */ || container.kind === 312 /* SourceFile */); if (!namesShareScope) { const name = symbolToString(localDeclarationSymbol); - error(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); + error2(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); } } } @@ -79015,7 +79547,7 @@ ${lanes.join("\n")} if (!node.name) { return; } - if (node.name.kind === 166 /* ComputedPropertyName */) { + if (node.name.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (hasOnlyExpressionInitializer(node) && node.initializer) { checkExpressionCached(node.initializer); @@ -79029,7 +79561,7 @@ ${lanes.join("\n")} if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { checkExternalEmitHelpers(node, 4 /* Rest */); } - if (node.propertyName && node.propertyName.kind === 166 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; @@ -79062,20 +79594,20 @@ ${lanes.join("\n")} } } if (isBindingPattern(node.name)) { - if (node.name.kind === 206 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { + if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { checkExternalEmitHelpers(node, 512 /* Read */); } forEach(node.name.elements, checkSourceElement); } if (isParameter(node) && node.initializer && nodeIsMissing(getContainingFunction(node).body)) { - error(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); + error2(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } if (isBindingPattern(node.name)) { if (isInAmbientOrTypeNode(node)) { return; } - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 248 /* ForInStatement */; + const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 249 /* ForInStatement */; const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); if (needCheckInitializer || needCheckWidenedType) { const widenedType = getWidenedTypeForVariableLikeDeclaration(node); @@ -79107,20 +79639,45 @@ ${lanes.join("\n")} const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); if (initializer) { const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a = symbol.exports) == null ? void 0 : _a.size); - if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 248 /* ForInStatement */) { + if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 249 /* ForInStatement */) { + const initializerType = checkExpressionCached(initializer); checkTypeAssignableToAndOptionallyElaborate( - checkExpressionCached(initializer), + initializerType, type, node, initializer, /*headMessage*/ void 0 ); + const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */; + if (blockScopeKind === 6 /* AwaitUsing */) { + const globalAsyncDisposableType = getGlobalAsyncDisposableType( + /*reportErrors*/ + true + ); + const globalDisposableType = getGlobalDisposableType( + /*reportErrors*/ + true + ); + if (globalAsyncDisposableType !== emptyObjectType && globalDisposableType !== emptyObjectType) { + const optionalDisposableType = getUnionType([globalAsyncDisposableType, globalDisposableType, nullType, undefinedType]); + checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); + } + } else if (blockScopeKind === 4 /* Using */) { + const globalDisposableType = getGlobalDisposableType( + /*reportErrors*/ + true + ); + if (globalDisposableType !== emptyObjectType) { + const optionalDisposableType = getUnionType([globalDisposableType, nullType, undefinedType]); + checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); + } + } } } if (symbol.declarations && symbol.declarations.length > 1) { if (some(symbol.declarations, (d) => d !== node && isVariableLike(d) && !areDeclarationFlagsIdentical(d, node))) { - error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); + error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } } else { @@ -79139,12 +79696,12 @@ ${lanes.join("\n")} ); } if (symbol.valueDeclaration && !areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) { - error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); + error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } } - if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */) { + if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */) { checkExportsOnMergedDeclarations(node); - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionsForDeclarationName(node, node.name); @@ -79152,9 +79709,9 @@ ${lanes.join("\n")} } function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 171 /* PropertyDeclaration */ || nextDeclaration.kind === 170 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; + const message = nextDeclaration.kind === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; const declName = declarationNameToString(nextDeclarationName); - const err = error( + const err = error2( nextDeclarationName, message, declName, @@ -79169,7 +79726,7 @@ ${lanes.join("\n")} } } function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 168 /* Parameter */ && right.kind === 259 /* VariableDeclaration */ || left.kind === 259 /* VariableDeclaration */ && right.kind === 168 /* Parameter */) { + if (left.kind === 169 /* Parameter */ && right.kind === 260 /* VariableDeclaration */ || left.kind === 260 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) { return true; } if (hasQuestionToken(left) !== hasQuestionToken(right)) { @@ -79189,10 +79746,17 @@ ${lanes.join("\n")} checkGrammarBindingElement(node); return checkVariableLikeDeclaration(node); } + function checkVariableDeclarationList(node) { + const blockScopeKind = getCombinedNodeFlags(node) & 7 /* BlockScoped */; + if (blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */) { + checkExternalEmitHelpers(node, 33554432 /* AddDisposableResourceAndDisposeResources */); + } + forEach(node.declarations, checkSourceElement); + } function checkVariableStatement(node) { if (!checkGrammarModifiers(node) && !checkGrammarVariableDeclarationList(node.declarationList)) - checkGrammarForDisallowedLetOrConstStatement(node); - forEach(node.declarationList.declarations, checkSourceElement); + checkGrammarForDisallowedBlockScopedVariableStatement(node); + checkVariableDeclarationList(node.declarationList); } function checkExpressionStatement(node) { checkGrammarStatementInAmbientContext(node); @@ -79203,8 +79767,8 @@ ${lanes.join("\n")} const type = checkTruthinessExpression(node.expression); checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 241 /* EmptyStatement */) { - error(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); + if (node.thenStatement.kind === 242 /* EmptyStatement */) { + error2(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); } @@ -79254,7 +79818,7 @@ ${lanes.join("\n")} getTypeNameForErrorDisplay(type) ); } else { - error(location, Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead); + error2(location, Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead); } } } @@ -79320,7 +79884,7 @@ ${lanes.join("\n")} } function checkTruthinessOfType(type, node) { if (type.flags & 16384 /* Void */) { - error(node, Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); + error2(node, Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); } return type; } @@ -79329,13 +79893,13 @@ ${lanes.join("\n")} } function checkForStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 260 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 261 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 260 /* VariableDeclarationList */) { - forEach(node.initializer.declarations, checkVariableDeclaration); + if (node.initializer.kind === 261 /* VariableDeclarationList */) { + checkVariableDeclarationList(node.initializer); } else { checkExpression(node.initializer); } @@ -79354,7 +79918,7 @@ ${lanes.join("\n")} const container = getContainingFunctionOrClassStaticBlock(node); if (node.awaitModifier) { if (container && isClassStaticBlockDeclaration(container)) { - grammarErrorOnNode(node.awaitModifier, Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block); + grammarErrorOnNode(node.awaitModifier, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block); } else { const functionFlags = getFunctionFlags(container); if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < 99 /* ESNext */) { @@ -79364,12 +79928,12 @@ ${lanes.join("\n")} } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); } - if (node.initializer.kind === 260 /* VariableDeclarationList */) { - checkForInOrForOfVariableDeclaration(node); + if (node.initializer.kind === 261 /* VariableDeclarationList */) { + checkVariableDeclarationList(node.initializer); } else { const varExpr = node.initializer; const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 208 /* ArrayLiteralExpression */ || varExpr.kind === 209 /* ObjectLiteralExpression */) { + if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { checkDestructuringAssignment(varExpr, iteratedType || errorType); } else { const leftType = checkExpression(varExpr); @@ -79391,19 +79955,19 @@ ${lanes.join("\n")} function checkForInStatement(node) { checkGrammarForInOrForOfStatement(node); const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 260 /* VariableDeclarationList */) { + if (node.initializer.kind === 261 /* VariableDeclarationList */) { const variable = node.initializer.declarations[0]; if (variable && isBindingPattern(variable.name)) { - error(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); + error2(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } - checkForInOrForOfVariableDeclaration(node); + checkVariableDeclarationList(node.initializer); } else { const varExpr = node.initializer; const leftType = checkExpression(varExpr); - if (varExpr.kind === 208 /* ArrayLiteralExpression */ || varExpr.kind === 209 /* ObjectLiteralExpression */) { - error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); + if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { + error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { - error(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); + error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); } else { checkReferenceExpression( varExpr, @@ -79413,20 +79977,13 @@ ${lanes.join("\n")} } } if (rightType === neverType || !isTypeAssignableToKind(rightType, 67108864 /* NonPrimitive */ | 58982400 /* InstantiableNonPrimitive */)) { - error(node.expression, Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType)); + error2(node.expression, Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType)); } checkSourceElement(node.statement); if (node.locals) { registerForUnusedIdentifiersCheck(node); } } - function checkForInOrForOfVariableDeclaration(iterationStatement) { - const variableDeclarationList = iterationStatement.initializer; - if (variableDeclarationList.declarations.length >= 1) { - const decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); - } - } function checkRightHandSideOfForOf(statement) { const use = statement.awaitModifier ? 15 /* ForAwaitOf */ : 13 /* ForOf */; return checkIteratedTypeOrElementType(use, checkNonNullExpression(statement.expression), undefinedType, statement.expression); @@ -79484,7 +80041,7 @@ ${lanes.join("\n")} if (hasStringConstituent) { if (languageVersion < 1 /* ES5 */) { if (errorNode) { - error(errorNode, Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); + error2(errorNode, Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); reportedError = true; } } @@ -79944,7 +80501,7 @@ ${lanes.join("\n")} errorOutputContainer.errors ?? (errorOutputContainer.errors = []); errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, diagnostic, methodName)); } else { - error(errorNode, diagnostic, methodName); + error2(errorNode, diagnostic, methodName); } } return methodName === "next" ? noIterationTypes : void 0; @@ -79999,7 +80556,7 @@ ${lanes.join("\n")} errorOutputContainer.errors ?? (errorOutputContainer.errors = []); errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, resolver.mustHaveAValueDiagnostic, methodName)); } else { - error(errorNode, resolver.mustHaveAValueDiagnostic, methodName); + error2(errorNode, resolver.mustHaveAValueDiagnostic, methodName); } } yieldType = anyType; @@ -80083,13 +80640,13 @@ ${lanes.join("\n")} const functionFlags = getFunctionFlags(container); if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 177 /* SetAccessor */) { + if (container.kind === 178 /* SetAccessor */) { if (node.expression) { - error(node, Diagnostics.Setters_cannot_return_a_value); + error2(node, Diagnostics.Setters_cannot_return_a_value); } - } else if (container.kind === 175 /* Constructor */) { + } else if (container.kind === 176 /* Constructor */) { if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) { - error(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); + error2(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } } else if (getReturnTypeFromAnnotation(container)) { const unwrappedReturnType = unwrapReturnType(returnType, functionFlags) ?? returnType; @@ -80104,13 +80661,13 @@ ${lanes.join("\n")} checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); } } - } else if (container.kind !== 175 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { - error(node, Diagnostics.Not_all_code_paths_return_a_value); + } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { + error2(node, Diagnostics.Not_all_code_paths_return_a_value); } } function checkWithStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (node.flags & 32768 /* AwaitContext */) { + if (node.flags & 65536 /* AwaitContext */) { grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block); } } @@ -80128,7 +80685,7 @@ ${lanes.join("\n")} let hasDuplicateDefaultClause = false; const expressionType = checkExpression(node.expression); forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 296 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 297 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === void 0) { firstDefaultClause = clause; } else { @@ -80136,12 +80693,12 @@ ${lanes.join("\n")} hasDuplicateDefaultClause = true; } } - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); } forEach(clause.statements, checkSourceElement); if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) { - error(clause, Diagnostics.Fallthrough_case_in_switch); + error2(clause, Diagnostics.Fallthrough_case_in_switch); } function createLazyCaseClauseDiagnostics(clause2) { return () => { @@ -80168,7 +80725,7 @@ ${lanes.join("\n")} if (isFunctionLike(current)) { return "quit"; } - if (current.kind === 255 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { + if (current.kind === 256 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); return true; } @@ -80258,8 +80815,8 @@ ${lanes.join("\n")} return; } const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 263 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 225 /* BinaryExpression */ || name && name.kind === 166 /* ComputedPropertyName */ ? declaration : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; + const propDeclaration = declaration && declaration.kind === 226 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0; const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; for (const info of indexInfos) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; @@ -80283,7 +80840,7 @@ ${lanes.join("\n")} function checkIndexConstraintForIndexSignature(type, checkInfo) { const declaration = checkInfo.declaration; const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 263 /* InterfaceDeclaration */) : void 0; + const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0; for (const info of indexInfos) { if (info === checkInfo) @@ -80291,7 +80848,7 @@ ${lanes.join("\n")} const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; const errorNode = localCheckDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getIndexInfoOfType(base, checkInfo.keyType) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); if (errorNode && !isTypeAssignableTo(checkInfo.type, info.type)) { - error( + error2( errorNode, Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, typeToString(checkInfo.keyType), @@ -80314,12 +80871,12 @@ ${lanes.join("\n")} case "symbol": case "void": case "object": - error(name, message, name.escapedText); + error2(name, message, name.escapedText); } } function checkClassNameCollisionWithObject(name) { if (languageVersion >= 1 /* ES5 */ && name.escapedText === "Object" && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(name).impliedNodeFormat === 1 /* CommonJS */)) { - error(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]); + error2(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]); } } function checkUnmatchedJSDocParameters(node) { @@ -80342,7 +80899,7 @@ ${lanes.join("\n")} const lastJSDocParamIndex = jsdocParameters.length - 1; const lastJSDocParam = jsdocParameters[lastJSDocParamIndex]; if (isJs && lastJSDocParam && isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression && lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !excludedParameters.has(lastJSDocParamIndex) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) { - error(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name)); + error2(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name)); } } else { forEach(jsdocParameters, ({ name, isNameFirst }, index) => { @@ -80351,7 +80908,7 @@ ${lanes.join("\n")} } if (isQualifiedName(name)) { if (isJs) { - error(name, Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, entityNameToString(name), entityNameToString(name.left)); + error2(name, Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, entityNameToString(name), entityNameToString(name.left)); } } else { if (!isNameFirst) { @@ -80376,11 +80933,11 @@ ${lanes.join("\n")} seenDefault = true; checkTypeParametersNotReferenced(node.default, typeParameterDeclarations, i); } else if (seenDefault) { - error(node, Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters); + error2(node, Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters); } for (let j = 0; j < i; j++) { if (typeParameterDeclarations[j].symbol === node.symbol) { - error(node.name, Diagnostics.Duplicate_identifier_0, declarationNameToString(node.name)); + error2(node.name, Diagnostics.Duplicate_identifier_0, declarationNameToString(node.name)); } } }; @@ -80389,12 +80946,12 @@ ${lanes.join("\n")} function checkTypeParametersNotReferenced(root, typeParameters, index) { visit(root); function visit(node) { - if (node.kind === 182 /* TypeReference */) { + if (node.kind === 183 /* TypeReference */) { const type = getTypeFromTypeReference(node); if (type.flags & 262144 /* TypeParameter */) { for (let i = index; i < typeParameters.length; i++) { if (type.symbol === getSymbolOfDeclaration(typeParameters[i])) { - error(node, Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters); + error2(node, Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters); } } } @@ -80417,7 +80974,7 @@ ${lanes.join("\n")} if (!areTypeParametersIdentical(declarations, type.localTypeParameters, getEffectiveTypeParameterDeclarations)) { const name = symbolToString(symbol); for (const declaration of declarations) { - error(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name); + error2(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name); } } } @@ -80459,7 +81016,7 @@ ${lanes.join("\n")} node ); const willTransformPrivateElementsOrClassStaticBlocks = languageVersion <= 9 /* ES2022 */; - const willTransformInitializers = !useDefineForClassFields || languageVersion < 9 /* ES2022 */; + const willTransformInitializers = !emitStandardClassFields; if (willTransformStaticElementsOfDecoratedClass || willTransformPrivateElementsOrClassStaticBlocks) { for (const member of node.members) { if (willTransformStaticElementsOfDecoratedClass && classElementOrClassElementParameterIsDecorated( @@ -80540,7 +81097,7 @@ ${lanes.join("\n")} checkTypeParameterListsIdentical(symbol); checkFunctionOrConstructorSymbol(symbol); checkClassForDuplicateDeclarations(node); - const nodeInAmbientContext = !!(node.flags & 16777216 /* Ambient */); + const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); if (!nodeInAmbientContext) { checkClassForStaticPropertyNameConflicts(node); } @@ -80588,18 +81145,18 @@ ${lanes.join("\n")} } if (baseConstructorType.flags & 8650752 /* TypeVariable */) { if (!isMixinConstructorType(staticType)) { - error(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any); + error2(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any); } else { const constructSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 256 /* Abstract */)) { - error(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract); + error2(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract); } } } if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32 /* Class */) && !(baseConstructorType.flags & 8650752 /* TypeVariable */)) { const constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); if (forEach(constructors, (sig) => !isJSConstructor(sig.declaration) && !isTypeIdenticalTo(getReturnTypeOfSignature(sig), baseType))) { - error(baseTypeNode.expression, Diagnostics.Base_constructors_must_all_have_the_same_return_type); + error2(baseTypeNode.expression, Diagnostics.Base_constructors_must_all_have_the_same_return_type); } } checkKindsOfPropertyMemberOverrides(type, baseType); @@ -80611,7 +81168,7 @@ ${lanes.join("\n")} if (implementedTypeNodes) { for (const typeRefNode of implementedTypeNodes) { if (!isEntityNameExpression(typeRefNode.expression) || isOptionalChain(typeRefNode.expression)) { - error(typeRefNode.expression, Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments); + error2(typeRefNode.expression, Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments); } checkTypeReferenceNode(typeRefNode); addLazyDiagnostic(createImplementsDiagnostics(typeRefNode)); @@ -80644,7 +81201,7 @@ ${lanes.join("\n")} issueMemberSpecificError(node, typeWithThis, baseWithThis, genericDiag); } } else { - error(typeRefNode, Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members); + error2(typeRefNode, Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members); } } }; @@ -80711,7 +81268,7 @@ ${lanes.join("\n")} } function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, memberName, errorNode) { const isJs = isInJSFile(node); - const nodeInAmbientContext = !!(node.flags & 16777216 /* Ambient */); + const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) { const memberEscapedName = escapeLeadingUnderscores(memberName); const thisType = memberIsStatic ? staticType : typeWithThis; @@ -80722,12 +81279,12 @@ ${lanes.join("\n")} if (prop && !baseProp && memberHasOverrideModifier) { if (errorNode) { const suggestion = getSuggestedSymbolForNonexistentClassMember(memberName, baseType); - suggestion ? error( + suggestion ? error2( errorNode, isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, baseClassName, symbolToString(suggestion) - ) : error( + ) : error2( errorNode, isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, baseClassName @@ -80742,12 +81299,12 @@ ${lanes.join("\n")} if (!baseHasAbstract) { if (errorNode) { const diag2 = memberIsParameterProperty ? isJs ? Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 : isJs ? Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0; - error(errorNode, diag2, baseClassName); + error2(errorNode, diag2, baseClassName); } return 1 /* NeedsOverride */; } else if (memberHasAbstractModifier && baseHasAbstract) { if (errorNode) { - error(errorNode, Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, baseClassName); + error2(errorNode, Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, baseClassName); } return 1 /* NeedsOverride */; } @@ -80755,7 +81312,7 @@ ${lanes.join("\n")} } else if (memberHasOverrideModifier) { if (errorNode) { const className = typeToString(type); - error( + error2( errorNode, isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, className @@ -80808,7 +81365,7 @@ ${lanes.join("\n")} if (declaration && hasEffectiveModifier(declaration, 8 /* Private */)) { const typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); if (!isNodeWithinClass(node, typeClassDeclaration)) { - error(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); + error2(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); } } } @@ -80845,7 +81402,7 @@ ${lanes.join("\n")} return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s; } function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 262 /* ClassDeclaration */ || d.kind === 263 /* InterfaceDeclaration */); + return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */); } function checkKindsOfPropertyMemberOverrides(type, baseType) { var _a, _b, _c, _d; @@ -80877,14 +81434,14 @@ ${lanes.join("\n")} } } if (!inheritedAbstractMemberNotImplementedError) { - inheritedAbstractMemberNotImplementedError = error( + inheritedAbstractMemberNotImplementedError = error2( derivedClassDecl, Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1, typeToString(type), typeToString(baseType) ); } - if (derivedClassDecl.kind === 230 /* ClassExpression */) { + if (derivedClassDecl.kind === 231 /* ClassExpression */) { addRelatedInfo( inheritedAbstractMemberNotImplementedError, createDiagnosticForNode( @@ -80923,15 +81480,15 @@ ${lanes.join("\n")} const overriddenInstanceAccessor = basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */; if (overriddenInstanceProperty || overriddenInstanceAccessor) { const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; - error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); + error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { - const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 171 /* PropertyDeclaration */ && !d.initializer); - if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) { + const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer); + if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { const errorMessage2 = Diagnostics.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; - error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType)); + error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType)); } } } @@ -80948,7 +81505,7 @@ ${lanes.join("\n")} } else { errorMessage = Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function; } - error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); + error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); } } } @@ -81013,7 +81570,7 @@ ${lanes.join("\n")} return ok; } function checkPropertyInitialization(node) { - if (!strictNullChecks || !strictPropertyInitialization || node.flags & 16777216 /* Ambient */) { + if (!strictNullChecks || !strictPropertyInitialization || node.flags & 33554432 /* Ambient */) { return; } const constructor = findConstructorDeclaration(node); @@ -81027,7 +81584,7 @@ ${lanes.join("\n")} const type = getTypeOfSymbol(getSymbolOfDeclaration(member)); if (!(type.flags & 3 /* AnyOrUnknown */ || containsUndefinedType(type))) { if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) { - error(member.name, Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, declarationNameToString(propName)); + error2(member.name, Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, declarationNameToString(propName)); } } } @@ -81035,7 +81592,7 @@ ${lanes.join("\n")} } } function isPropertyWithoutInitializer(node) { - return node.kind === 171 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; + return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { @@ -81069,7 +81626,7 @@ ${lanes.join("\n")} checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfDeclaration(node); checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 263 /* InterfaceDeclaration */); + const firstInterfaceDecl = getDeclarationOfKind(symbol, 264 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); @@ -81084,7 +81641,7 @@ ${lanes.join("\n")} }); forEach(getInterfaceBaseTypeNodes(node), (heritageElement) => { if (!isEntityNameExpression(heritageElement.expression) || isOptionalChain(heritageElement.expression)) { - error(heritageElement.expression, Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments); + error2(heritageElement.expression, Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments); } checkTypeReferenceNode(heritageElement); }); @@ -81101,7 +81658,7 @@ ${lanes.join("\n")} checkTypeParameters(node.typeParameters); if (node.type.kind === 141 /* IntrinsicKeyword */) { if (!intrinsicTypeKinds.has(node.name.escapedText) || length(node.typeParameters) !== 1) { - error(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); + error2(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); } } else { checkSourceElement(node.type); @@ -81122,23 +81679,23 @@ ${lanes.join("\n")} } function computeMemberValue(member, autoValue) { if (isComputedNonLiteralName(member.name)) { - error(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums); + error2(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums); } else { const text = getTextOfPropertyName(member.name); if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) { - error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); + error2(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); } } if (member.initializer) { return computeConstantValue(member); } - if (member.parent.flags & 16777216 /* Ambient */ && !isEnumConst(member.parent)) { + if (member.parent.flags & 33554432 /* Ambient */ && !isEnumConst(member.parent)) { return void 0; } if (autoValue !== void 0) { return autoValue; } - error(member.name, Diagnostics.Enum_member_must_have_initializer); + error2(member.name, Diagnostics.Enum_member_must_have_initializer); return void 0; } function computeConstantValue(member) { @@ -81147,12 +81704,12 @@ ${lanes.join("\n")} const value = evaluate(initializer, member); if (value !== void 0) { if (isConstEnum && typeof value === "number" && !isFinite(value)) { - error(initializer, isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); + error2(initializer, isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); } } else if (isConstEnum) { - error(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); - } else if (member.parent.flags & 16777216 /* Ambient */) { - error(initializer, Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression); + error2(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); + } else if (member.parent.flags & 33554432 /* Ambient */) { + error2(initializer, Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression); } else { checkTypeAssignableTo(checkExpression(initializer), numberType, initializer, Diagnostics.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values); } @@ -81160,7 +81717,7 @@ ${lanes.join("\n")} } function evaluate(expr, location) { switch (expr.kind) { - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: const value = evaluate(expr.operand, location); if (typeof value === "number") { switch (expr.operator) { @@ -81173,7 +81730,7 @@ ${lanes.join("\n")} } } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const left = evaluate(expr.left, location); const right = evaluate(expr.right, location); if (typeof left === "number" && typeof right === "number") { @@ -81210,18 +81767,30 @@ ${lanes.join("\n")} case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return expr.text; - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return evaluateTemplateExpression(expr, location); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(expr); return +expr.text; - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return evaluate(expr.expression, location); - case 80 /* Identifier */: - if (isInfinityOrNaNString(expr.escapedText)) { - return +expr.escapedText; + case 80 /* Identifier */: { + const identifier = expr; + if (isInfinityOrNaNString(identifier.escapedText) && resolveEntityName( + identifier, + 111551 /* Value */, + /*ignoreErrors*/ + true + ) === getGlobalSymbol( + identifier.escapedText, + 111551 /* Value */, + /*diagnostic*/ + void 0 + )) { + return +identifier.escapedText; } - case 210 /* PropertyAccessExpression */: + } + case 211 /* PropertyAccessExpression */: if (isEntityNameExpression(expr)) { const symbol = resolveEntityName( expr, @@ -81231,18 +81800,18 @@ ${lanes.join("\n")} ); if (symbol) { if (symbol.flags & 8 /* EnumMember */) { - return evaluateEnumMember(expr, symbol, location); + return location ? evaluateEnumMember(expr, symbol, location) : getEnumMemberValue(symbol.valueDeclaration); } - if (isConstVariable(symbol)) { + if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; - if (declaration && !declaration.type && declaration.initializer && declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location)) { + if (declaration && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { return evaluate(declaration.initializer, declaration); } } } } break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const root = expr.expression; if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { const rootSymbol = resolveEntityName( @@ -81255,7 +81824,7 @@ ${lanes.join("\n")} const name = escapeLeadingUnderscores(expr.argumentExpression.text); const member = rootSymbol.exports.get(name); if (member) { - return evaluateEnumMember(expr, member, location); + return location ? evaluateEnumMember(expr, member, location) : getEnumMemberValue(member.valueDeclaration); } } } @@ -81266,11 +81835,11 @@ ${lanes.join("\n")} function evaluateEnumMember(expr, symbol, location) { const declaration = symbol.valueDeclaration; if (!declaration || declaration === location) { - error(expr, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(symbol)); + error2(expr, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(symbol)); return void 0; } if (!isBlockScopedNameDeclaredBeforeUse(declaration, location)) { - error(expr, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums); + error2(expr, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums); return 0; } return getEnumMemberValue(declaration); @@ -81303,13 +81872,13 @@ ${lanes.join("\n")} const enumIsConst = isEnumConst(node); forEach(enumSymbol.declarations, (decl) => { if (isEnumDeclaration(decl) && isEnumConst(decl) !== enumIsConst) { - error(getNameOfDeclaration(decl), Diagnostics.Enum_declarations_must_all_be_const_or_non_const); + error2(getNameOfDeclaration(decl), Diagnostics.Enum_declarations_must_all_be_const_or_non_const); } }); } let seenEnumMissingInitialInitializer = false; forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 265 /* EnumDeclaration */) { + if (declaration.kind !== 266 /* EnumDeclaration */) { return false; } const enumDeclaration = declaration; @@ -81319,7 +81888,7 @@ ${lanes.join("\n")} const firstEnumMember = enumDeclaration.members[0]; if (!firstEnumMember.initializer) { if (seenEnumMissingInitialInitializer) { - error(firstEnumMember.name, Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element); + error2(firstEnumMember.name, Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element); } else { seenEnumMissingInitialInitializer = true; } @@ -81329,7 +81898,7 @@ ${lanes.join("\n")} } function checkEnumMember(node) { if (isPrivateIdentifier(node.name)) { - error(node, Diagnostics.An_enum_member_cannot_be_named_with_a_private_identifier); + error2(node, Diagnostics.An_enum_member_cannot_be_named_with_a_private_identifier); } if (node.initializer) { checkExpression(node.initializer); @@ -81339,7 +81908,7 @@ ${lanes.join("\n")} const declarations = symbol.declarations; if (declarations) { for (const declaration of declarations) { - if ((declaration.kind === 262 /* ClassDeclaration */ || declaration.kind === 261 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 16777216 /* Ambient */)) { + if ((declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 262 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 33554432 /* Ambient */)) { return declaration; } } @@ -81368,9 +81937,9 @@ ${lanes.join("\n")} function checkModuleDeclarationDiagnostics() { var _a, _b; const isGlobalAugmentation = isGlobalScopeAugmentation(node); - const inAmbientContext = node.flags & 16777216 /* Ambient */; + const inAmbientContext = node.flags & 33554432 /* Ambient */; if (isGlobalAugmentation && !inAmbientContext) { - error(node.name, Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); + error2(node.name, Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); } const isAmbientExternalModule = isAmbientModule(node); const contextErrorMessage = isAmbientExternalModule ? Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : Diagnostics.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module; @@ -81389,26 +81958,26 @@ ${lanes.join("\n")} const symbol = getSymbolOfDeclaration(node); if (symbol.flags & 512 /* ValueModule */ && !inAmbientContext && isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions))) { if (getIsolatedModules(compilerOptions) && !getSourceFileOfNode(node).externalModuleIndicator) { - error(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName); + error2(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName); } if (((_a = symbol.declarations) == null ? void 0 : _a.length) > 1) { const firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (firstNonAmbientClassOrFunc) { if (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc)) { - error(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); + error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); } else if (node.pos < firstNonAmbientClassOrFunc.pos) { - error(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); + error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - const mergedClass = getDeclarationOfKind(symbol, 262 /* ClassDeclaration */); + const mergedClass = getDeclarationOfKind(symbol, 263 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; } } - if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 311 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 95 /* ExportKeyword */); if (exportModifier) { - error(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + error2(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } } @@ -81422,15 +81991,15 @@ ${lanes.join("\n")} } } else if (isGlobalSourceFile(node.parent)) { if (isGlobalAugmentation) { - error(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + error2(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); } else if (isExternalModuleNameRelative(getTextOfIdentifierOrLiteral(node.name))) { - error(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); + error2(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); } } else { if (isGlobalAugmentation) { - error(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); + error2(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); } else { - error(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + error2(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); } } } @@ -81438,21 +82007,21 @@ ${lanes.join("\n")} } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: for (const decl of node.declarationList.declarations) { checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 207 /* BindingElement */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 260 /* VariableDeclaration */: const name = node.name; if (isBindingPattern(name)) { for (const el of name.elements) { @@ -81460,12 +82029,12 @@ ${lanes.join("\n")} } break; } - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 261 /* FunctionDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 262 /* FunctionDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 265 /* TypeAliasDeclaration */: if (isGlobalAugmentation) { return; } @@ -81476,12 +82045,12 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return node; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: do { node = node.left; } while (node.kind !== 80 /* Identifier */); return node; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: do { if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { return node.name; @@ -81497,17 +82066,17 @@ ${lanes.join("\n")} return false; } if (!isStringLiteral(moduleName)) { - error(moduleName, Diagnostics.String_literal_expected); + error2(moduleName, Diagnostics.String_literal_expected); return false; } - const inAmbientExternalModule = node.parent.kind === 267 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 311 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 277 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule) { + error2(moduleName, node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { if (!isTopLevelInExternalModuleAugmentation(node)) { - error(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); + error2(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); return false; } } @@ -81516,7 +82085,7 @@ ${lanes.join("\n")} for (const clause of node.assertClause.elements) { if (!isStringLiteral(clause.value)) { hasError = true; - error(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions); + error2(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions); } } return !hasError; @@ -81531,9 +82100,9 @@ ${lanes.join("\n")} symbol = getMergedSymbol(symbol.exportSymbol || symbol); if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) { const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node; - Debug.assert(node.kind !== 279 /* NamespaceExport */); - if (node.kind === 280 /* ExportSpecifier */) { - const diag2 = error(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); + Debug.assert(node.kind !== 280 /* NamespaceExport */); + if (node.kind === 281 /* ExportSpecifier */) { + const diag2 = error2(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); const alreadyExportedSymbol = (_b = (_a = getSourceFileOfNode(node).symbol) == null ? void 0 : _a.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText); if (alreadyExportedSymbol === target) { const exportingDeclaration = (_c = alreadyExportedSymbol.declarations) == null ? void 0 : _c.find(isJSDocNode); @@ -81546,11 +82115,11 @@ ${lanes.join("\n")} } } } else { - Debug.assert(node.kind !== 259 /* VariableDeclaration */); + Debug.assert(node.kind !== 260 /* VariableDeclaration */); const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)); const moduleSpecifier = (importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) ?? "..."; const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName); - error( + error2( errorNode, Diagnostics._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation, importedIdentifier, @@ -81559,47 +82128,47 @@ ${lanes.join("\n")} } return; } - const targetFlags = getAllSymbolFlags(target); + const targetFlags = getSymbolFlags(target); const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (targetFlags & excludedMeanings) { - const message = node.kind === 280 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; - error(node, message, symbolToString(symbol)); + const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; + error2(node, message, symbolToString(symbol)); } - if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 16777216 /* Ambient */)) { + if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */)) { const typeOnlyAlias = getTypeOnlyAliasDeclaration(symbol); const isType = !(targetFlags & 111551 /* Value */); if (isType || typeOnlyAlias) { switch (node.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 270 /* ImportEqualsDeclaration */: { + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 271 /* ImportEqualsDeclaration */: { if (compilerOptions.preserveValueImports || compilerOptions.verbatimModuleSyntax) { Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? compilerOptions.verbatimModuleSyntax ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled : compilerOptions.verbatimModuleSyntax ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled; - const name = idText(node.kind === 275 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); + const name = idText(node.kind === 276 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); addTypeOnlyDeclarationRelatedInfo( - error(node, message, name), + error2(node, message, name), isType ? void 0 : typeOnlyAlias, name ); } - if (isType && node.kind === 270 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { - error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); + if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + error2(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; } - case 280 /* ExportSpecifier */: { + case 281 /* ExportSpecifier */: { if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { const name = idText(node.propertyName || node.name); - const diagnostic = isType ? error(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); + const diagnostic = isType ? error2(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error2(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); addTypeOnlyDeclarationRelatedInfo(diagnostic, isType ? void 0 : typeOnlyAlias, name); break; } } } } - if (compilerOptions.verbatimModuleSyntax && node.kind !== 270 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { - error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + if (compilerOptions.verbatimModuleSyntax && node.kind !== 271 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } } if (isImportSpecifier(node)) { @@ -81641,7 +82210,7 @@ ${lanes.join("\n")} function checkImportBinding(node) { checkCollisionsForDeclarationName(node, node.name); checkAliasSymbol(node); - if (node.kind === 275 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (node.kind === 276 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } @@ -81688,7 +82257,7 @@ ${lanes.join("\n")} checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { checkExternalEmitHelpers(node, 65536 /* ImportStar */); @@ -81714,14 +82283,14 @@ ${lanes.join("\n")} if (hasSyntacticModifier(node, 1 /* Export */)) { markExportAsReferenced(node); } - if (node.moduleReference.kind !== 282 /* ExternalModuleReference */) { + if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { const target = resolveAlias(getSymbolOfDeclaration(node)); if (target !== unknownSymbol) { - const targetFlags = getAllSymbolFlags(target); + const targetFlags = getSymbolFlags(target); if (targetFlags & 111551 /* Value */) { const moduleName = getFirstIdentifier(node.moduleReference); if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { - error(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName)); + error2(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName)); } } if (targetFlags & 788968 /* Type */) { @@ -81732,7 +82301,7 @@ ${lanes.join("\n")} grammarErrorOnNode(node, Diagnostics.An_import_alias_cannot_use_import_type); } } else { - if (moduleKind >= 5 /* ES2015 */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 16777216 /* Ambient */)) { + if (moduleKind >= 5 /* ES2015 */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 33554432 /* Ambient */)) { grammarErrorOnNode(node, Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead); } } @@ -81752,15 +82321,15 @@ ${lanes.join("\n")} if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { if (node.exportClause && !isNamespaceExport(node.exportClause)) { forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 267 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 267 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 16777216 /* Ambient */; - if (node.parent.kind !== 311 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { - error(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); + const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); + const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 268 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 33554432 /* Ambient */; + if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { + error2(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } else { const moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) { - error(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); + error2(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); } else if (node.exportClause) { checkAliasSymbol(node.exportClause); } @@ -81779,13 +82348,13 @@ ${lanes.join("\n")} } function checkGrammarExportDeclaration(node) { var _a; - if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 278 /* NamedExports */) { + if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 279 /* NamedExports */) { return checkGrammarNamedImportsOrExports(node.exportClause); } return false; } function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 311 /* SourceFile */ || node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 266 /* ModuleDeclaration */; + const isInAppropriateContext = node.parent.kind === 312 /* SourceFile */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 267 /* ModuleDeclaration */; if (!isInAppropriateContext) { grammarErrorOnFirstToken(node, errorMessage); } @@ -81821,7 +82390,7 @@ ${lanes.join("\n")} } for (const statement of sourceFile.statements) { if (canConvertImportDeclarationToTypeOnly(statement) || canConvertImportEqualsDeclarationToTypeOnly(statement)) { - error( + error2( statement, Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error ); @@ -81851,13 +82420,13 @@ ${lanes.join("\n")} true ); if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || symbol.declarations && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { - error(exportedName, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, idText(exportedName)); + error2(exportedName, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, idText(exportedName)); } else { if (!node.isTypeOnly && !node.parent.parent.isTypeOnly) { markExportAsReferenced(node); } const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol); - if (!target || getAllSymbolFlags(target) & 111551 /* Value */) { + if (!target || getSymbolFlags(target) & 111551 /* Value */) { checkExpressionCached(node.propertyName || node.name); } } @@ -81872,12 +82441,12 @@ ${lanes.join("\n")} if (checkGrammarModuleElementContext(node, illegalContextMessage)) { return; } - const container = node.parent.kind === 311 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 266 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { if (node.isExportEquals) { - error(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); + error2(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); } else { - error(node, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + error2(node, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); } return; } @@ -81888,7 +82457,7 @@ ${lanes.join("\n")} if (typeAnnotationNode) { checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression); } - const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */); + const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */); if (node.expression.kind === 80 /* Identifier */) { const id = node.expression; const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName( @@ -81902,17 +82471,17 @@ ${lanes.join("\n")} )); if (sym) { markAliasReferenced(sym, id); - if (getAllSymbolFlags(sym) & 111551 /* Value */) { + if (getSymbolFlags(sym) & 111551 /* Value */) { checkExpressionCached(id); - if (!isIllegalExportDefaultInCJS && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) { - error( + if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) { + error2( id, node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : Diagnostics.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration, idText(id) ); } - } else if (!isIllegalExportDefaultInCJS && !(node.flags & 16777216 /* Ambient */) && compilerOptions.verbatimModuleSyntax) { - error( + } else if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax) { + error2( id, node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type : Diagnostics.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type, idText(id) @@ -81932,16 +82501,16 @@ ${lanes.join("\n")} checkExpressionCached(node.expression); } if (isIllegalExportDefaultInCJS) { - error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } checkExternalModuleExports(container); - if (node.flags & 16777216 /* Ambient */ && !isEntityNameExpression(node.expression)) { + if (node.flags & 33554432 /* Ambient */ && !isEntityNameExpression(node.expression)) { grammarErrorOnNode(node.expression, Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context); } if (node.isExportEquals) { - if (moduleKind >= 5 /* ES2015 */ && (node.flags & 16777216 /* Ambient */ && getSourceFileOfNode(node).impliedNodeFormat === 99 /* ESNext */ || !(node.flags & 16777216 /* Ambient */) && getSourceFileOfNode(node).impliedNodeFormat !== 1 /* CommonJS */)) { + if (moduleKind >= 5 /* ES2015 */ && (node.flags & 33554432 /* Ambient */ && getSourceFileOfNode(node).impliedNodeFormat === 99 /* ESNext */ || !(node.flags & 33554432 /* Ambient */) && getSourceFileOfNode(node).impliedNodeFormat !== 1 /* CommonJS */)) { grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead); - } else if (moduleKind === 4 /* System */ && !(node.flags & 16777216 /* Ambient */)) { + } else if (moduleKind === 4 /* System */ && !(node.flags & 33554432 /* Ambient */)) { grammarErrorOnNode(node, Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system); } } @@ -81957,7 +82526,7 @@ ${lanes.join("\n")} if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { const declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; if (declaration && !isTopLevelInExternalModuleAugmentation(declaration) && !isInJSFile(declaration)) { - error(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + error2(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); } } const exports = getExportsOfModule(moduleSymbol); @@ -82014,182 +82583,182 @@ ${lanes.join("\n")} const kind = node.kind; if (cancellationToken) { switch (kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } - if (kind >= 242 /* FirstStatement */ && kind <= 258 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { + if (kind >= 243 /* FirstStatement */ && kind <= 259 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); } switch (kind) { - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return checkTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return checkParameter(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return checkPropertyDeclaration(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checkPropertySignature(node); - case 184 /* ConstructorType */: - case 183 /* FunctionType */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: + case 185 /* ConstructorType */: + case 184 /* FunctionType */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: return checkSignatureDeclaration(node); - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return checkMethodDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return checkClassStaticBlockDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return checkConstructorDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return checkAccessorDeclaration(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return checkTypeReferenceNode(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return checkTypePredicate(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return checkTypeQuery(node); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return checkTypeLiteral(node); - case 187 /* ArrayType */: + case 188 /* ArrayType */: return checkArrayType(node); - case 188 /* TupleType */: + case 189 /* TupleType */: return checkTupleType(node); - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 195 /* ParenthesizedType */: - case 189 /* OptionalType */: - case 190 /* RestType */: + case 196 /* ParenthesizedType */: + case 190 /* OptionalType */: + case 191 /* RestType */: return checkSourceElement(node.type); - case 196 /* ThisType */: + case 197 /* ThisType */: return checkThisType(node); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return checkTypeOperator(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return checkConditionalType(node); - case 194 /* InferType */: + case 195 /* InferType */: return checkInferType(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return checkTemplateLiteralType(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return checkImportType(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return checkNamedTupleMember(node); - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return checkJSDocAugmentsTag(node); - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return checkJSDocImplementsTag(node); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 346 /* JSDocEnumTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 347 /* JSDocEnumTag */: return checkJSDocTypeAliasTag(node); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return checkJSDocTemplateTag(node); - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return checkJSDocTypeTag(node); - case 330 /* JSDocLink */: - case 331 /* JSDocLinkCode */: - case 332 /* JSDocLinkPlain */: + case 331 /* JSDocLink */: + case 332 /* JSDocLinkCode */: + case 333 /* JSDocLinkPlain */: return checkJSDocLinkLikeTag(node); - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return checkJSDocParameterTag(node); - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return checkJSDocPropertyTag(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: checkJSDocFunctionType(node); - case 321 /* JSDocNonNullableType */: - case 320 /* JSDocNullableType */: - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: - case 328 /* JSDocTypeLiteral */: + case 322 /* JSDocNonNullableType */: + case 321 /* JSDocNullableType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: + case 329 /* JSDocTypeLiteral */: checkJSDocTypeIsInJsFile(node); forEachChild(node, checkSourceElement); return; - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: checkJSDocVariadicType(node); return; - case 315 /* JSDocTypeExpression */: + case 316 /* JSDocTypeExpression */: return checkSourceElement(node.type); - case 339 /* JSDocPublicTag */: - case 341 /* JSDocProtectedTag */: - case 340 /* JSDocPrivateTag */: + case 340 /* JSDocPublicTag */: + case 342 /* JSDocProtectedTag */: + case 341 /* JSDocPrivateTag */: return checkJSDocAccessibilityModifiers(node); - case 356 /* JSDocSatisfiesTag */: + case 357 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return checkIndexedAccessType(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return checkMappedType(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 240 /* Block */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 268 /* ModuleBlock */: return checkBlock(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return checkVariableStatement(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return checkExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return checkIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return checkDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return checkWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return checkForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return checkForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return checkForOfStatement(node); - case 250 /* ContinueStatement */: - case 251 /* BreakStatement */: + case 251 /* ContinueStatement */: + case 252 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return checkReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return checkWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return checkSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return checkLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return checkThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return checkTryStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return checkBindingElement(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return checkClassDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return checkImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return checkExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return checkExportAssignment(node); - case 241 /* EmptyStatement */: - case 258 /* DebuggerStatement */: + case 242 /* EmptyStatement */: + case 259 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -82223,16 +82792,16 @@ ${lanes.join("\n")} const { parent: parent2 } = node; if (isParameter(parent2) && isJSDocFunctionType(parent2.parent)) { if (last(parent2.parent.parameters) !== parent2) { - error(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); + error2(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); } return; } if (!isJSDocTypeExpression(parent2)) { - error(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); + error2(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); } const paramTag = node.parent.parent; if (!isJSDocParameterTag(paramTag)) { - error(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); + error2(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); return; } const param = getParameterSymbolFromJSDoc(paramTag); @@ -82241,7 +82810,7 @@ ${lanes.join("\n")} } const host2 = getHostSignatureFromJSDoc(paramTag); if (!host2 || last(host2.parameters).symbol !== param) { - error(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); + error2(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); } } function getTypeFromJSDocVariadicType(node) { @@ -82288,38 +82857,38 @@ ${lanes.join("\n")} currentNode = node; instantiationCount = 0; switch (node.kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 214 /* TaggedTemplateExpression */: - case 169 /* Decorator */: - case 285 /* JsxOpeningElement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 215 /* TaggedTemplateExpression */: + case 170 /* Decorator */: + case 286 /* JsxOpeningElement */: resolveUntypedCall(node); break; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: checkAccessorDeclaration(node); break; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: checkClassExpressionDeferred(node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: checkTypeParameterDeferred(node); break; - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: checkJsxSelfClosingElementDeferred(node); break; - case 283 /* JsxElement */: + case 284 /* JsxElement */: checkJsxElementDeferred(node); break; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: - case 216 /* ParenthesizedExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 217 /* ParenthesizedExpression */: checkAssertionDeferred(node); } currentNode = saveCurrentNode; @@ -82377,7 +82946,7 @@ ${lanes.join("\n")} addLazyDiagnostic(() => { if (!node.isDeclarationFile && (compilerOptions.noUnusedLocals || compilerOptions.noUnusedParameters)) { checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(node), (containingNode, kind, diag2) => { - if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 16777216 /* Ambient */))) { + if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) { diagnostics.add(diag2); } }); @@ -82456,7 +83025,7 @@ ${lanes.join("\n")} return diagnostics.getGlobalDiagnostics(); } function getSymbolsInScope(location, meaning) { - if (location.flags & 33554432 /* InWithStatement */) { + if (location.flags & 67108864 /* InWithStatement */) { return []; } const symbols = createSymbolTable(); @@ -82470,27 +83039,27 @@ ${lanes.join("\n")} copySymbols(location.locals, meaning); } switch (location.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (!isExternalModule(location)) break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */); break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */); break; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: const className = location.name; if (className) { copySymbol(location.symbol, meaning); } - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: if (!isStaticSymbol) { copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */); } break; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: const funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -82523,7 +83092,7 @@ ${lanes.join("\n")} function copyLocallyVisibleExportSymbols(source, meaning2) { if (meaning2) { source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 280 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 279 /* NamespaceExport */)) { + if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) { copySymbol(symbol, meaning2); } }); @@ -82534,16 +83103,16 @@ ${lanes.join("\n")} return name.kind === 80 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; } function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 182 /* TypeReference */; + return node.parent.kind === 183 /* TypeReference */; } function isInNameOfExpressionWithTypeArguments(node) { - while (node.parent.kind === 210 /* PropertyAccessExpression */) { + while (node.parent.kind === 211 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent.kind === 232 /* ExpressionWithTypeArguments */; + return node.parent.kind === 233 /* ExpressionWithTypeArguments */; } function forEachEnclosingClass(node, callback) { let result; @@ -82569,13 +83138,13 @@ ${lanes.join("\n")} return !!forEachEnclosingClass(node, (n) => n === classDeclaration); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 165 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 270 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 271 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } - if (nodeOnRightSide.parent.kind === 276 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 277 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; } return void 0; @@ -82601,7 +83170,7 @@ ${lanes.join("\n")} node = parent2; parent2 = parent2.parent; } - if (parent2 && parent2.kind === 204 /* ImportType */ && parent2.qualifier === node) { + if (parent2 && parent2.kind === 205 /* ImportType */ && parent2.qualifier === node) { return parent2; } return void 0; @@ -82623,7 +83192,7 @@ ${lanes.join("\n")} /*contextFlags*/ void 0 ); - const type = contextualType && getThisTypeFromContextualType(contextualType); + const type = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); return type && !isTypeAny(type); } } @@ -82633,7 +83202,7 @@ ${lanes.join("\n")} if (isDeclarationName(name)) { return getSymbolOfNode(name.parent); } - if (isInJSFile(name) && name.parent.kind === 210 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { + if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { if (!isPrivateIdentifier(name) && !isJSDocMemberName(name) && !isThisPropertyAndThisTyped(name.parent)) { const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); if (specialPropertyAssignmentSymbol) { @@ -82641,7 +83210,7 @@ ${lanes.join("\n")} } } } - if (name.parent.kind === 276 /* ExportAssignment */ && isEntityNameExpression(name)) { + if (name.parent.kind === 277 /* ExportAssignment */ && isEntityNameExpression(name)) { const success = resolveEntityName( name, /*all meanings*/ @@ -82653,7 +83222,7 @@ ${lanes.join("\n")} return success; } } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 270 /* ImportEqualsDeclaration */); + const importEqualsDeclaration = getAncestor(name, 271 /* ImportEqualsDeclaration */); Debug.assert(importEqualsDeclaration !== void 0); return getSymbolOfPartOfRightHandSideOfImportEquals( name, @@ -82674,7 +83243,7 @@ ${lanes.join("\n")} } if (isInNameOfExpressionWithTypeArguments(name)) { let meaning = 0 /* None */; - if (name.parent.kind === 232 /* ExpressionWithTypeArguments */) { + if (name.parent.kind === 233 /* ExpressionWithTypeArguments */) { meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */; if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { meaning |= 111551 /* Value */; @@ -82693,10 +83262,10 @@ ${lanes.join("\n")} return entityNameSymbol; } } - if (name.parent.kind === 347 /* JSDocParameterTag */) { + if (name.parent.kind === 348 /* JSDocParameterTag */) { return getParameterSymbolFromJSDoc(name.parent); } - if (name.parent.kind === 167 /* TypeParameter */ && name.parent.parent.kind === 351 /* JSDocTemplateTag */) { + if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 352 /* JSDocTemplateTag */) { Debug.assert(!isInJSFile(name)); const typeParameter = getTypeParameterFromJsDoc(name.parent); return typeParameter && typeParameter.symbol; @@ -82749,12 +83318,12 @@ ${lanes.join("\n")} return result; } else if (isPrivateIdentifier(name)) { return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 210 /* PropertyAccessExpression */ || name.kind === 165 /* QualifiedName */) { + } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) { const links = getNodeLinks(name); if (links.resolvedSymbol) { return links.resolvedSymbol; } - if (name.kind === 210 /* PropertyAccessExpression */) { + if (name.kind === 211 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { const expressionType = checkExpressionCached(name.expression); @@ -82794,7 +83363,7 @@ ${lanes.join("\n")} return resolveJSDocMemberName(name); } } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 182 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; + const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; const symbol = resolveEntityName( name, meaning, @@ -82805,7 +83374,7 @@ ${lanes.join("\n")} ); return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); } - if (name.parent.kind === 181 /* TypePredicate */) { + if (name.parent.kind === 182 /* TypePredicate */) { return resolveEntityName( name, /*meaning*/ @@ -82846,7 +83415,7 @@ ${lanes.join("\n")} } const { parent: parent2 } = node; const grandParent = parent2.parent; - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return void 0; } if (isDeclarationNameOrImportPropertyName(node)) { @@ -82858,7 +83427,7 @@ ${lanes.join("\n")} if (node.kind === 80 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 207 /* BindingElement */ && grandParent.kind === 205 /* ObjectBindingPattern */ && node === parent2.propertyName) { + } else if (parent2.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent2.propertyName) { const typeOfPattern = getTypeOfNode(grandParent); const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); if (propertyDeclaration) { @@ -82877,8 +83446,8 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: case 81 /* PrivateIdentifier */: - case 210 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: if (!isThisInTypeQuery(node)) { return getSymbolOfNameOrPropertyAccessExpression(node); } @@ -82899,19 +83468,19 @@ ${lanes.join("\n")} if (isInExpressionContext(node)) { return checkExpression(node).symbol; } - case 196 /* ThisType */: + case 197 /* ThisType */: return getTypeFromThisTypeNode(node).symbol; case 108 /* SuperKeyword */: return checkExpression(node).symbol; case 137 /* ConstructorKeyword */: const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 175 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) { return constructorDeclaration.parent.symbol; } return void 0; case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 271 /* ImportDeclaration */ || node.parent.kind === 277 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( + if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 272 /* ImportDeclaration */ || node.parent.kind === 278 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( node.parent, /*requireStringLiteralLikeArgument*/ false @@ -82929,16 +83498,16 @@ ${lanes.join("\n")} case 39 /* EqualsGreaterThanToken */: case 86 /* ClassKeyword */: return getSymbolOfNode(node.parent); - case 204 /* ImportType */: + case 205 /* ImportType */: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; case 95 /* ExportKeyword */: return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; case 102 /* ImportKeyword */: case 105 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return checkExpression(node).symbol; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) { const symbol = getIntrinsicTagSymbol(node.parent); return symbol === unknownSymbol ? void 0 : symbol; @@ -82957,7 +83526,7 @@ ${lanes.join("\n")} return void 0; } function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 303 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 304 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); } return void 0; @@ -82973,7 +83542,7 @@ ${lanes.join("\n")} if (isSourceFile(node) && !isExternalModule(node)) { return errorType; } - if (node.flags & 33554432 /* InWithStatement */) { + if (node.flags & 67108864 /* InWithStatement */) { return errorType; } const classDecl = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); @@ -83037,16 +83606,16 @@ ${lanes.join("\n")} return errorType; } function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 209 /* ObjectLiteralExpression */ || expr.kind === 208 /* ArrayLiteralExpression */); - if (expr.parent.kind === 249 /* ForOfStatement */) { + Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */); + if (expr.parent.kind === 250 /* ForOfStatement */) { const iteratedType = checkRightHandSideOfForOf(expr.parent); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 225 /* BinaryExpression */) { + if (expr.parent.kind === 226 /* BinaryExpression */) { const iteratedType = getTypeOfExpression(expr.parent.right); return checkDestructuringAssignment(expr, iteratedType || errorType); } - if (expr.parent.kind === 302 /* PropertyAssignment */) { + if (expr.parent.kind === 303 /* PropertyAssignment */) { const node2 = cast(expr.parent.parent, isObjectLiteralExpression); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); @@ -83079,7 +83648,7 @@ ${lanes.join("\n")} case 9 /* NumericLiteral */: case 11 /* StringLiteral */: return getStringLiteralType(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: const nameType = checkComputedPropertyName(name); return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; default: @@ -83149,7 +83718,7 @@ ${lanes.join("\n")} return symbolLinks2.exportsSomeValue; function isValue(s) { s = resolveSymbol(s); - return s && !!(getAllSymbolFlags(s) & 111551 /* Value */); + return s && !!(getSymbolFlags(s) & 111551 /* Value */); } } function isNameOfModuleOrEnumDeclaration(node) { @@ -83174,7 +83743,7 @@ ${lanes.join("\n")} } const parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 311 /* SourceFile */) { + if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 312 /* SourceFile */) { const symbolFile = parentSymbol.valueDeclaration; const referenceFile = getSourceFileOfNode(node); const symbolIsUmdExport = symbolFile !== referenceFile; @@ -83204,7 +83773,7 @@ ${lanes.join("\n")} return void 0; } function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 298 /* CatchClause */; + return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 299 /* CatchClause */; } function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { @@ -83232,7 +83801,7 @@ ${lanes.join("\n")} /*lookInLabeledStatements*/ false ); - const inLoopBodyBlock = container.kind === 240 /* Block */ && isIterationStatement( + const inLoopBodyBlock = container.kind === 241 /* Block */ && isIterationStatement( container.parent, /*lookInLabeledStatements*/ false @@ -83272,31 +83841,35 @@ ${lanes.join("\n")} function isValueAliasDeclaration(node) { Debug.assert(canCollectSymbolAliasAccessabilityData); switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return isAliasResolvedToValue(getSymbolOfDeclaration(node)); - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: const symbol = getSymbolOfDeclaration(node); - return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */); - case 277 /* ExportDeclaration */: + return !!symbol && isAliasResolvedToValue( + symbol, + /*excludeTypeOnlyValues*/ + true + ); + case 278 /* ExportDeclaration */: const exportClause = node.exportClause; return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfDeclaration(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(nodeIn) { const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 311 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { + if (node === void 0 || node.parent.kind !== 312 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { return false; } const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node)); return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference); } - function isAliasResolvedToValue(symbol) { + function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) { if (!symbol) { return false; } @@ -83304,7 +83877,12 @@ ${lanes.join("\n")} if (target === unknownSymbol) { return true; } - return !!((getAllSymbolFlags(target) ?? -1) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target)); + return !!(getSymbolFlags( + symbol, + excludeTypeOnlyValues, + /*excludeLocalMeanings*/ + true + ) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target)); } function isConstEnumOrConstEnumOnlyModule(s) { return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; @@ -83318,7 +83896,7 @@ ${lanes.join("\n")} return true; } const target = getSymbolLinks(symbol).aliasTarget; - if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getAllSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { + if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { return true; } } @@ -83380,15 +83958,15 @@ ${lanes.join("\n")} } function canHaveConstantValue(node) { switch (node.kind) { - case 305 /* EnumMember */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 306 /* EnumMember */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return true; } return false; } function getConstantValue2(node) { - if (node.kind === 305 /* EnumMember */) { + if (node.kind === 306 /* EnumMember */) { return getEnumMemberValue(node); } const symbol = getNodeLinks(node).resolvedSymbol; @@ -83588,24 +84166,24 @@ ${lanes.join("\n")} if (symbol) { return filter(getExportSymbolOfValueSymbolIfExported(symbol).declarations, (declaration) => { switch (declaration.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 305 /* EnumMember */: - case 209 /* ObjectLiteralExpression */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 265 /* EnumDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 266 /* ModuleDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 306 /* EnumMember */: + case 210 /* ObjectLiteralExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 266 /* EnumDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 267 /* ModuleDeclaration */: return true; } return false; @@ -83616,7 +84194,7 @@ ${lanes.join("\n")} return void 0; } function isLiteralConstDeclaration(node) { - if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { + if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node)) { return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } return false; @@ -83734,12 +84312,12 @@ ${lanes.join("\n")} getJsxFragmentFactoryEntity, getAllAccessorDeclarations(accessor) { accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 177 /* SetAccessor */ ? 176 /* GetAccessor */ : 177 /* SetAccessor */; + const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */; const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind); const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 177 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 176 /* GetAccessor */ ? accessor : otherAccessor; + const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor; + const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor; return { firstAccessor, secondAccessor, @@ -83760,7 +84338,7 @@ ${lanes.join("\n")} }, getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 311 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + Debug.assert(n && n.kind === 312 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfDeclaration(node); if (!sym) { return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); @@ -83795,18 +84373,18 @@ ${lanes.join("\n")} return false; } function isInHeritageClause(node) { - return node.parent && node.parent.kind === 232 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 297 /* HeritageClause */; + return node.parent && node.parent.kind === 233 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 298 /* HeritageClause */; } function getTypeReferenceDirectivesForEntityName(node) { if (!fileToDirective) { return void 0; } let meaning; - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } else { meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 80 /* Identifier */ && isInTypeQuery(node) || node.kind === 210 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { + if (node.kind === 80 /* Identifier */ && isInTypeQuery(node) || node.kind === 211 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { meaning = 111551 /* Value */ | 1048576 /* ExportValue */; } } @@ -83849,7 +84427,7 @@ ${lanes.join("\n")} break; } } - if (current.valueDeclaration && current.valueDeclaration.kind === 311 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + if (current.valueDeclaration && current.valueDeclaration.kind === 312 /* SourceFile */ && current.flags & 512 /* ValueModule */) { return false; } for (const decl of symbol.declarations) { @@ -83874,7 +84452,7 @@ ${lanes.join("\n")} } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 266 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); + const specifier = declaration.kind === 267 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker( specifier, specifier, @@ -83884,7 +84462,7 @@ ${lanes.join("\n")} if (!moduleSymbol) { return void 0; } - return getDeclarationOfKind(moduleSymbol, 311 /* SourceFile */); + return getDeclarationOfKind(moduleSymbol, 312 /* SourceFile */); } function initializeTypeChecker() { for (const file of host.getSourceFiles()) { @@ -84066,11 +84644,11 @@ ${lanes.join("\n")} function checkExternalEmitHelpers(location, helpers) { if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) { const sourceFile = getSourceFileOfNode(location); - if (isEffectiveExternalModule(sourceFile, compilerOptions) && !(location.flags & 16777216 /* Ambient */)) { + if (isEffectiveExternalModule(sourceFile, compilerOptions) && !(location.flags & 33554432 /* Ambient */)) { const helpersModule = resolveHelpersModule(sourceFile, location); if (helpersModule !== unknownSymbol) { const uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (let helper = 1 /* FirstEmitHelper */; helper <= 16777216 /* LastEmitHelper */; helper <<= 1) { + for (let helper = 1 /* FirstEmitHelper */; helper <= 33554432 /* LastEmitHelper */; helper <<= 1) { if (uncheckedHelpers & helper) { for (const name of getHelperNames(helper)) { if (requestedExternalEmitHelperNames.has(name)) @@ -84078,18 +84656,18 @@ ${lanes.join("\n")} requestedExternalEmitHelperNames.add(name); const symbol = resolveSymbol(getSymbol2(getExportsOfModule(helpersModule), escapeLeadingUnderscores(name), 111551 /* Value */)); if (!symbol) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name); } else if (helper & 524288 /* ClassPrivateFieldGet */) { if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 3)) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 4); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 4); } } else if (helper & 1048576 /* ClassPrivateFieldSet */) { if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 4)) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 5); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 5); } } else if (helper & 1024 /* SpreadArray */) { if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 2)) { - error(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 3); + error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 3); } } } @@ -84152,6 +84730,8 @@ ${lanes.join("\n")} return ["__setFunctionName"]; case 16777216 /* PropKey */: return ["__propKey"]; + case 33554432 /* AddDisposableResourceAndDisposeResources */: + return ["__addDisposableResource", "__disposeResources"]; default: return Debug.fail("Unrecognized helper"); } @@ -84170,6 +84750,7 @@ ${lanes.join("\n")} if (isParameter(node) && parameterIsThisKeyword(node)) { return grammarErrorOnFirstToken(node, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters); } + const blockScopeKind = isVariableStatement(node) ? node.declarationList.flags & 7 /* BlockScoped */ : 0 /* None */; let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator; let flags = 0 /* None */; let sawExportBeforeDecorators = false; @@ -84177,12 +84758,12 @@ ${lanes.join("\n")} for (const modifier of node.modifiers) { if (isDecorator(modifier)) { if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - if (node.kind === 173 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { + if (node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); } - } else if (legacyDecorators && (node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */)) { + } else if (legacyDecorators && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */)) { const accessors = getAllAccessorDeclarations(node.parent.members, node); if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -84196,7 +84777,7 @@ ${lanes.join("\n")} const sourceFile = getSourceFileOfNode(modifier); if (!hasParseDiagnostics(sourceFile)) { addRelatedInfo( - error(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), + error2(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), createDiagnosticForNode(firstDecorator, Diagnostics.Decorator_used_before_export_here) ); return true; @@ -84212,29 +84793,29 @@ ${lanes.join("\n")} firstDecorator ?? (firstDecorator = modifier); } else { if (modifier.kind !== 148 /* ReadonlyKeyword */) { - if (node.kind === 170 /* PropertySignature */ || node.kind === 172 /* MethodSignature */) { + if (node.kind === 171 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); } - if (node.kind === 180 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { + if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); } } if (modifier.kind !== 103 /* InKeyword */ && modifier.kind !== 147 /* OutKeyword */ && modifier.kind !== 87 /* ConstKeyword */) { - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); } } switch (modifier.kind) { case 87 /* ConstKeyword */: - if (node.kind !== 265 /* EnumDeclaration */ && node.kind !== 167 /* TypeParameter */) { + if (node.kind !== 266 /* EnumDeclaration */ && node.kind !== 168 /* TypeParameter */) { return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(87 /* ConstKeyword */)); } const parent2 = node.parent; - if (node.kind === 167 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { + if (node.kind === 168 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind)); } break; - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: if (flags & 16384 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); } else if (flags & 2 /* Ambient */) { @@ -84265,7 +84846,7 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); } else if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); - } else if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 256 /* Abstract */) { if (modifier.kind === 123 /* PrivateKeyword */) { @@ -84287,9 +84868,9 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); - } else if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); @@ -84306,7 +84887,7 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); } else if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); - } else if (node.kind !== 171 /* PropertyDeclaration */) { + } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } flags |= 128 /* Accessor */; @@ -84314,7 +84895,7 @@ ${lanes.join("\n")} case 148 /* ReadonlyKeyword */: if (flags & 64 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 170 /* PropertySignature */ && node.kind !== 180 /* IndexSignature */ && node.kind !== 168 /* Parameter */) { + } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); } else if (flags & 128 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); @@ -84322,8 +84903,8 @@ ${lanes.join("\n")} flags |= 64 /* Readonly */; break; case 95 /* ExportKeyword */: - if (compilerOptions.verbatimModuleSyntax && !(node.flags & 16777216 /* Ambient */) && node.kind !== 264 /* TypeAliasDeclaration */ && node.kind !== 263 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later - node.kind !== 266 /* ModuleDeclaration */ && node.parent.kind === 311 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { + if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later + node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } if (flags & 1 /* Export */) { @@ -84336,15 +84917,23 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "export"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); } flags |= 1 /* Export */; break; case 90 /* DefaultKeyword */: - const container = node.parent.kind === 311 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 266 /* ModuleDeclaration */ && !isAmbientModule(container)) { + const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); } else if (!(flags & 1 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); } else if (sawExportBeforeDecorators) { @@ -84361,9 +84950,13 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (node.parent.flags & 16777216 /* Ambient */ && node.parent.kind === 267 /* ModuleBlock */) { + } else if (blockScopeKind === 4 /* Using */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "declare"); + } else if (blockScopeKind === 6 /* AwaitUsing */) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "declare"); + } else if (node.parent.flags & 33554432 /* Ambient */ && node.parent.kind === 268 /* ModuleBlock */) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); @@ -84377,12 +84970,12 @@ ${lanes.join("\n")} if (flags & 256 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 262 /* ClassDeclaration */ && node.kind !== 184 /* ConstructorType */) { - if (node.kind !== 173 /* MethodDeclaration */ && node.kind !== 171 /* PropertyDeclaration */ && node.kind !== 176 /* GetAccessor */ && node.kind !== 177 /* SetAccessor */) { + if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { + if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 262 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { - const message = node.kind === 171 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; + if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; return grammarErrorOnNode(modifier, message); } if (flags & 32 /* Static */) { @@ -84409,9 +85002,9 @@ ${lanes.join("\n")} case 134 /* AsyncKeyword */: if (flags & 512 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); - } else if (flags & 2 /* Ambient */ || node.parent.flags & 16777216 /* Ambient */) { + } else if (flags & 2 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (node.kind === 168 /* Parameter */) { + } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } if (flags & 256 /* Abstract */) { @@ -84424,7 +85017,7 @@ ${lanes.join("\n")} case 147 /* OutKeyword */: const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 167 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { + if (node.kind !== 168 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); } if (flags & inOutFlag) { @@ -84438,7 +85031,7 @@ ${lanes.join("\n")} } } } - if (node.kind === 175 /* Constructor */) { + if (node.kind === 176 /* Constructor */) { if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } @@ -84449,11 +85042,11 @@ ${lanes.join("\n")} return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 271 /* ImportDeclaration */ || node.kind === 270 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 168 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 512 /* Async */) { @@ -84473,46 +85066,47 @@ ${lanes.join("\n")} } function findFirstIllegalModifier(node) { switch (node.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 266 /* ModuleDeclaration */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 267 /* ModuleDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return void 0; - case 174 /* ClassStaticBlockDeclaration */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 269 /* NamespaceExportDeclaration */: - case 281 /* MissingDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 270 /* NamespaceExportDeclaration */: + case 282 /* MissingDeclaration */: return find(node.modifiers, isModifier); default: - if (node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return void 0; } switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return findFirstModifierExcept(node, 134 /* AsyncKeyword */); - case 262 /* ClassDeclaration */: - case 184 /* ConstructorType */: + case 263 /* ClassDeclaration */: + case 185 /* ConstructorType */: return findFirstModifierExcept(node, 128 /* AbstractKeyword */); - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 242 /* VariableStatement */: - case 264 /* TypeAliasDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return find(node.modifiers, isModifier); - case 265 /* EnumDeclaration */: + case 243 /* VariableStatement */: + return node.declarationList.flags & 4 /* Using */ ? findFirstModifierExcept(node, 135 /* AwaitKeyword */) : find(node.modifiers, isModifier); + case 266 /* EnumDeclaration */: return findFirstModifierExcept(node, 87 /* ConstKeyword */); default: Debug.assertNever(node); @@ -84528,10 +85122,10 @@ ${lanes.join("\n")} } function checkGrammarAsyncModifier(node, asyncModifier) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return false; } return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); @@ -84559,7 +85153,7 @@ ${lanes.join("\n")} if (i !== parameterCount - 1) { return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); } - if (!(parameter.flags & 16777216 /* Ambient */)) { + if (!(parameter.flags & 33554432 /* Ambient */)) { checkGrammarForDisallowedTrailingComma(parameters, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); } if (parameter.questionToken) { @@ -84589,12 +85183,12 @@ ${lanes.join("\n")} if (length(nonSimpleParameters)) { forEach(nonSimpleParameters, (parameter) => { addRelatedInfo( - error(parameter, Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive), + error2(parameter, Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive), createDiagnosticForNode(useStrictDirective, Diagnostics.use_strict_directive_used_here) ); }); const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here) : createDiagnosticForNode(parameter, Diagnostics.and_here)); - addRelatedInfo(error(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2); + addRelatedInfo(error2(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2); return true; } } @@ -84676,7 +85270,7 @@ ${lanes.join("\n")} return checkGrammarForDisallowedTrailingComma(typeArguments) || checkGrammarForAtLeastOneTypeArgument(node, typeArguments); } function checkGrammarTaggedTemplateChain(node) { - if (node.questionDotToken || node.flags & 32 /* OptionalChain */) { + if (node.questionDotToken || node.flags & 64 /* OptionalChain */) { return grammarErrorOnNode(node.template, Diagnostics.Tagged_template_expressions_are_not_permitted_in_an_optional_chain); } return false; @@ -84744,11 +85338,11 @@ ${lanes.join("\n")} return false; } function checkGrammarComputedPropertyName(node) { - if (node.kind !== 166 /* ComputedPropertyName */) { + if (node.kind !== 167 /* ComputedPropertyName */) { return false; } const computedPropertyName = node; - if (computedPropertyName.expression.kind === 225 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { + if (computedPropertyName.expression.kind === 226 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } return false; @@ -84756,9 +85350,9 @@ ${lanes.join("\n")} function checkGrammarForGenerator(node) { if (node.asteriskToken) { Debug.assert( - node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */ || node.kind === 173 /* MethodDeclaration */ + node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */ ); - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } if (!node.body) { @@ -84775,7 +85369,7 @@ ${lanes.join("\n")} function checkGrammarObjectLiteralExpression(node, inDestructuring) { const seen = /* @__PURE__ */ new Map(); for (const prop of node.properties) { - if (prop.kind === 304 /* SpreadAssignment */) { + if (prop.kind === 305 /* SpreadAssignment */) { if (inDestructuring) { const expression = skipParentheses(prop.expression); if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { @@ -84785,10 +85379,10 @@ ${lanes.join("\n")} continue; } const name = prop.name; - if (name.kind === 166 /* ComputedPropertyName */) { + if (name.kind === 167 /* ComputedPropertyName */) { checkGrammarComputedPropertyName(name); } - if (prop.kind === 303 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 304 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { grammarErrorOnNode(prop.equalsToken, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern); } if (name.kind === 81 /* PrivateIdentifier */) { @@ -84796,7 +85390,7 @@ ${lanes.join("\n")} } if (canHaveModifiers(prop) && prop.modifiers) { for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 173 /* MethodDeclaration */)) { + if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) { grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); } } @@ -84809,8 +85403,8 @@ ${lanes.join("\n")} } let currentKind; switch (prop.kind) { - case 303 /* ShorthandPropertyAssignment */: - case 302 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); if (name.kind === 9 /* NumericLiteral */) { @@ -84818,13 +85412,13 @@ ${lanes.join("\n")} } currentKind = 4 /* PropertyAssignment */; break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: currentKind = 8 /* Method */; break; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: currentKind = 1 /* GetAccessor */; break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: currentKind = 2 /* SetAccessor */; break; default: @@ -84861,7 +85455,7 @@ ${lanes.join("\n")} checkGrammarTypeArguments(node, node.typeArguments); const seen = /* @__PURE__ */ new Map(); for (const attr of node.attributes.properties) { - if (attr.kind === 292 /* JsxSpreadAttribute */) { + if (attr.kind === 293 /* JsxSpreadAttribute */) { continue; } const { name, initializer } = attr; @@ -84871,7 +85465,7 @@ ${lanes.join("\n")} } else { return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } - if (initializer && initializer.kind === 293 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 294 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -84893,8 +85487,8 @@ ${lanes.join("\n")} if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.kind === 249 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { - if (!(forInOrOfStatement.flags & 32768 /* AwaitContext */)) { + if (forInOrOfStatement.kind === 250 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { + if (!(forInOrOfStatement.flags & 65536 /* AwaitContext */)) { const sourceFile = getSourceFileOfNode(forInOrOfStatement); if (isInTopLevelContext(forInOrOfStatement)) { if (!hasParseDiagnostics(sourceFile)) { @@ -84933,7 +85527,7 @@ ${lanes.join("\n")} if (!hasParseDiagnostics(sourceFile)) { const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); const func = getContainingFunction(forInOrOfStatement); - if (func && func.kind !== 175 /* Constructor */) { + if (func && func.kind !== 176 /* Constructor */) { Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); @@ -84945,11 +85539,11 @@ ${lanes.join("\n")} return false; } } - if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 32768 /* AwaitContext */) && isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { + if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 65536 /* AwaitContext */) && isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } - if (forInOrOfStatement.initializer.kind === 260 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 261 /* VariableDeclarationList */) { const variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { const declarations = variableList.declarations; @@ -84957,16 +85551,16 @@ ${lanes.join("\n")} return false; } if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } const firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - const diagnostic = forInOrOfStatement.kind === 248 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); } } @@ -84974,7 +85568,7 @@ ${lanes.join("\n")} return false; } function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 16777216 /* Ambient */) && accessor.parent.kind !== 186 /* TypeLiteral */ && accessor.parent.kind !== 263 /* InterfaceDeclaration */) { + if (!(accessor.flags & 33554432 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 264 /* InterfaceDeclaration */) { if (languageVersion < 1 /* ES5 */) { return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); } @@ -84989,7 +85583,7 @@ ${lanes.join("\n")} if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } - if (accessor.parent.kind === 186 /* TypeLiteral */ || accessor.parent.kind === 263 /* InterfaceDeclaration */) { + if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) { return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } } @@ -84999,10 +85593,10 @@ ${lanes.join("\n")} if (!doesAccessorHaveCorrectParameterCount(accessor)) { return grammarErrorOnNode( accessor.name, - accessor.kind === 176 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter + accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter ); } - if (accessor.kind === 177 /* SetAccessor */) { + if (accessor.kind === 178 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } @@ -85020,10 +85614,10 @@ ${lanes.join("\n")} return false; } function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 176 /* GetAccessor */ ? 0 : 1); + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1); } function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 176 /* GetAccessor */ ? 1 : 2)) { + if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) { return getThisParameter(accessor); } } @@ -85040,7 +85634,7 @@ ${lanes.join("\n")} } } switch (parent2.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: const decl = parent2; if (decl.name.kind !== 80 /* Identifier */) { return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); @@ -85052,12 +85646,12 @@ ${lanes.join("\n")} return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (!isStatic(parent2) || !hasEffectiveReadonlyModifier(parent2)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); } break; - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (!hasSyntacticModifier(parent2, 64 /* Readonly */)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } @@ -85066,7 +85660,7 @@ ${lanes.join("\n")} return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); } } else if (node.operator === 148 /* ReadonlyKeyword */) { - if (node.type.kind !== 187 /* ArrayType */ && node.type.kind !== 188 /* TupleType */) { + if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) { return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(155 /* SymbolKeyword */)); } } @@ -85080,8 +85674,8 @@ ${lanes.join("\n")} if (checkGrammarFunctionLikeDeclaration(node)) { return true; } - if (node.kind === 173 /* MethodDeclaration */) { - if (node.parent.kind === 209 /* ObjectLiteralExpression */) { + if (node.kind === 174 /* MethodDeclaration */) { + if (node.parent.kind === 210 /* ObjectLiteralExpression */) { if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 134 /* AsyncKeyword */)) { return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) { @@ -85100,14 +85694,14 @@ ${lanes.join("\n")} if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) { return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.kind === 173 /* MethodDeclaration */ && !node.body) { + } else if (node.kind === 174 /* MethodDeclaration */ && !node.body) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } - } else if (node.parent.kind === 263 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.parent.kind === 186 /* TypeLiteral */) { + } else if (node.parent.kind === 187 /* TypeLiteral */) { return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); } } @@ -85118,9 +85712,9 @@ ${lanes.join("\n")} return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 250 /* ContinueStatement */ && !isIterationStatement( + const isMisplacedContinueLabel = node.kind === 251 /* ContinueStatement */ && !isIterationStatement( current.statement, /*lookInLabeledStatements*/ true @@ -85131,8 +85725,8 @@ ${lanes.join("\n")} return false; } break; - case 254 /* SwitchStatement */: - if (node.kind === 251 /* BreakStatement */ && !node.label) { + case 255 /* SwitchStatement */: + if (node.kind === 252 /* BreakStatement */ && !node.label) { return false; } break; @@ -85149,10 +85743,10 @@ ${lanes.join("\n")} current = current.parent; } if (node.label) { - const message = node.kind === 251 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - const message = node.kind === 251 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } } @@ -85172,10 +85766,10 @@ ${lanes.join("\n")} } } function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 223 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; + return isStringOrNumericLiteralLike(expr) || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; } function isBigIntLiteralExpression(expr) { - return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 223 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; + return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; } function isSimpleLiteralEnumReference(expr) { if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { @@ -85186,7 +85780,7 @@ ${lanes.join("\n")} const initializer = node.initializer; if (initializer) { const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 112 /* TrueKeyword */ || initializer.kind === 97 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); - const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node); + const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { return grammarErrorOnNode(initializer, Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); @@ -85197,27 +85791,41 @@ ${lanes.join("\n")} } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 248 /* ForInStatement */ && node.parent.parent.kind !== 249 /* ForOfStatement */) { - if (node.flags & 16777216 /* Ambient */) { + const nodeFlags = getCombinedNodeFlagsCached(node); + const blockScopeKind = nodeFlags & 7 /* BlockScoped */; + if (isBindingPattern(node.name)) { + switch (blockScopeKind) { + case 6 /* AwaitUsing */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "await using"); + case 4 /* Using */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "using"); + } + } + if (node.parent.parent.kind !== 249 /* ForInStatement */ && node.parent.parent.kind !== 250 /* ForOfStatement */) { + if (nodeFlags & 33554432 /* Ambient */) { checkAmbientInitializer(node); } else if (!node.initializer) { if (isBindingPattern(node.name) && !isBindingPattern(node.parent)) { return grammarErrorOnNode(node, Diagnostics.A_destructuring_declaration_must_have_an_initializer); } - if (isVarConst(node)) { - return grammarErrorOnNode(node, Diagnostics.const_declarations_must_be_initialized); + switch (blockScopeKind) { + case 6 /* AwaitUsing */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "await using"); + case 4 /* Using */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "using"); + case 2 /* Const */: + return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "const"); } } } - if (node.exclamationToken && (node.parent.parent.kind !== 242 /* VariableStatement */ || !node.type || node.initializer || node.flags & 16777216 /* Ambient */)) { + if (node.exclamationToken && (node.parent.parent.kind !== 243 /* VariableStatement */ || !node.type || node.initializer || nodeFlags & 33554432 /* Ambient */)) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } - if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 16777216 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { + if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { checkESModuleMarker(node.name); } - const checkLetConstNames = isLet(node) || isVarConst(node); - return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name); + return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name); } function checkESModuleMarker(name) { if (name.kind === 80 /* Identifier */) { @@ -85257,29 +85865,39 @@ ${lanes.join("\n")} if (!declarationList.declarations.length) { return grammarErrorAtPos(declarationList, declarations.pos, declarations.end - declarations.pos, Diagnostics.Variable_declaration_list_cannot_be_empty); } + const blockScopeFlags = declarationList.flags & 7 /* BlockScoped */; + if ((blockScopeFlags === 4 /* Using */ || blockScopeFlags === 6 /* AwaitUsing */) && isForInStatement(declarationList.parent)) { + return grammarErrorOnNode( + declarationList, + blockScopeFlags === 4 /* Using */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration + ); + } + if (blockScopeFlags === 6 /* AwaitUsing */) { + return checkAwaitGrammar(declarationList); + } return false; } function allowLetAndConstDeclarations(parent2) { switch (parent2.kind) { - case 244 /* IfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 245 /* IfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: return false; - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return allowLetAndConstDeclarations(parent2.parent); } return true; } - function checkGrammarForDisallowedLetOrConstStatement(node) { + function checkGrammarForDisallowedBlockScopedVariableStatement(node) { if (!allowLetAndConstDeclarations(node.parent)) { - if (isLet(node.declarationList)) { - return grammarErrorOnNode(node, Diagnostics.let_declarations_can_only_be_declared_inside_a_block); - } else if (isVarConst(node.declarationList)) { - return grammarErrorOnNode(node, Diagnostics.const_declarations_can_only_be_declared_inside_a_block); + const blockScopeKind = getCombinedNodeFlagsCached(node.declarationList) & 7 /* BlockScoped */; + if (blockScopeKind) { + const keyword = blockScopeKind === 1 /* Let */ ? "let" : blockScopeKind === 2 /* Const */ ? "const" : blockScopeKind === 4 /* Using */ ? "using" : blockScopeKind === 6 /* AwaitUsing */ ? "await using" : Debug.fail("Unknown BlockScope flag"); + return grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword); } } } @@ -85368,7 +85986,7 @@ ${lanes.join("\n")} if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { return true; } - } else if (node.parent.kind === 263 /* InterfaceDeclaration */) { + } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } @@ -85385,23 +86003,23 @@ ${lanes.join("\n")} return grammarErrorOnNode(node.initializer, Diagnostics.A_type_literal_property_cannot_have_an_initializer); } } - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { checkAmbientInitializer(node); } - if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & 16777216 /* Ambient */ || isStatic(node) || hasAbstractModifier(node))) { + if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & 33554432 /* Ambient */ || isStatic(node) || hasAbstractModifier(node))) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 263 /* InterfaceDeclaration */ || node.kind === 264 /* TypeAliasDeclaration */ || node.kind === 271 /* ImportDeclaration */ || node.kind === 270 /* ImportEqualsDeclaration */ || node.kind === 277 /* ExportDeclaration */ || node.kind === 276 /* ExportAssignment */ || node.kind === 269 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); } function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (const decl of file.statements) { - if (isDeclaration(decl) || decl.kind === 242 /* VariableStatement */) { + if (isDeclaration(decl) || decl.kind === 243 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -85410,15 +86028,15 @@ ${lanes.join("\n")} return false; } function checkGrammarSourceFile(node) { - return !!(node.flags & 16777216 /* Ambient */) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); + return !!(node.flags & 33554432 /* Ambient */) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); } function checkGrammarStatementInAmbientContext(node) { - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { const links = getNodeLinks(node); if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) { return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); } - if (node.parent.kind === 240 /* Block */ || node.parent.kind === 267 /* ModuleBlock */ || node.parent.kind === 311 /* SourceFile */) { + if (node.parent.kind === 241 /* Block */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { const links2 = getNodeLinks(node.parent); if (!links2.hasReportedStatementInAmbientContext) { return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); @@ -85487,7 +86105,7 @@ ${lanes.join("\n")} if (node.isTypeOnly && node.name && node.namedBindings) { return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); } - if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 274 /* NamedImports */) { + if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */) { return checkGrammarNamedImportsOrExports(node.namedBindings); } return false; @@ -85497,7 +86115,7 @@ ${lanes.join("\n")} if (specifier.isTypeOnly) { return grammarErrorOnFirstToken( specifier, - specifier.kind === 275 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + specifier.kind === 276 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement ); } }); @@ -85611,17 +86229,37 @@ ${lanes.join("\n")} const name = getPropertyNameForPropertyNameNode(node); return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0; } + function getCombinedModifierFlagsCached(node) { + if (lastGetCombinedModifierFlagsNode === node) { + return lastGetCombinedModifierFlagsResult; + } + lastGetCombinedModifierFlagsNode = node; + lastGetCombinedModifierFlagsResult = getCombinedModifierFlags(node); + return lastGetCombinedModifierFlagsResult; + } + function getCombinedNodeFlagsCached(node) { + if (lastGetCombinedNodeFlagsNode === node) { + return lastGetCombinedNodeFlagsResult; + } + lastGetCombinedNodeFlagsNode = node; + lastGetCombinedNodeFlagsResult = getCombinedNodeFlags(node); + return lastGetCombinedNodeFlagsResult; + } + function isVarConstLike(node) { + const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */; + return blockScopeKind === 2 /* Const */ || blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */; + } } function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 261 /* FunctionDeclaration */ && declaration.kind !== 173 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 262 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; } function isDeclarationNameOrImportPropertyName(name) { switch (name.parent.kind) { - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: return isIdentifier(name); default: return isDeclarationName(name); @@ -85772,6 +86410,7 @@ ${lanes.join("\n")} CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; CheckMode3[CheckMode3["IsForStringLiteralArgumentCompletions"] = 32] = "IsForStringLiteralArgumentCompletions"; CheckMode3[CheckMode3["RestBindingElement"] = 64] = "RestBindingElement"; + CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly"; return CheckMode3; })(CheckMode || {}); SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => { @@ -85805,13 +86444,13 @@ ${lanes.join("\n")} JsxNames2.IntrinsicClassAttributes = "IntrinsicClassAttributes"; JsxNames2.LibraryManagedAttributes = "LibraryManagedAttributes"; })(JsxNames || (JsxNames = {})); - SymbolTrackerImpl = class { + SymbolTrackerImpl = class _SymbolTrackerImpl { constructor(context, tracker, moduleResolverHost) { this.moduleResolverHost = void 0; this.inner = void 0; this.disableTrackSymbol = false; var _a; - while (tracker instanceof SymbolTrackerImpl) { + while (tracker instanceof _SymbolTrackerImpl) { tracker = tracker.inner; } this.inner = tracker; @@ -86180,21 +86819,21 @@ ${lanes.join("\n")} "use strict"; init_ts2(); visitEachChildTable = { - [165 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [166 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [167 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86203,7 +86842,7 @@ ${lanes.join("\n")} nodeVisitor(node.default, visitor, isTypeNode) ); }, - [168 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86214,14 +86853,14 @@ ${lanes.join("\n")} nodeVisitor(node.initializer, visitor, isExpression) ); }, - [169 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [170 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86230,7 +86869,7 @@ ${lanes.join("\n")} nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertyDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86241,7 +86880,7 @@ ${lanes.join("\n")} nodeVisitor(node.initializer, visitor, isExpression) ); }, - [172 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86252,7 +86891,7 @@ ${lanes.join("\n")} nodeVisitor(node.type, visitor, isTypeNode) ); }, - [173 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86265,7 +86904,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86273,7 +86912,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86283,7 +86922,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86292,7 +86931,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [174 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -86300,7 +86939,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [178 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -86308,7 +86947,7 @@ ${lanes.join("\n")} nodeVisitor(node.type, visitor, isTypeNode) ); }, - [179 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -86316,7 +86955,7 @@ ${lanes.join("\n")} nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86325,7 +86964,7 @@ ${lanes.join("\n")} ); }, // Types - [181 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -86333,14 +86972,14 @@ ${lanes.join("\n")} nodeVisitor(node.type, visitor, isTypeNode) ); }, - [182 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [183 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -86348,7 +86987,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [184 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86357,56 +86996,56 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [185 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [186 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [187 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [188 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [189 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [190 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [191 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [192 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -86415,13 +87054,13 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [194 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [204 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -86431,14 +87070,14 @@ ${lanes.join("\n")} node.isTypeOf ); }, - [301 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [201 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -86447,26 +87086,26 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [195 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [197 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [198 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [199 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -86477,20 +87116,20 @@ ${lanes.join("\n")} nodesVisitor(node.members, visitor, isTypeElement) ); }, - [200 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [202 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [203 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -86498,19 +87137,19 @@ ${lanes.join("\n")} ); }, // Binding patterns - [205 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [206 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [207 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -86520,19 +87159,19 @@ ${lanes.join("\n")} ); }, // Expression - [208 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [209 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [210 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86544,7 +87183,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [211 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86556,7 +87195,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [212 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86570,7 +87209,7 @@ ${lanes.join("\n")} nodesVisitor(node.arguments, visitor, isExpression) ); }, - [213 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86578,7 +87217,7 @@ ${lanes.join("\n")} nodesVisitor(node.arguments, visitor, isExpression) ); }, - [214 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -86586,20 +87225,20 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [215 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [216 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [217 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86611,7 +87250,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [218 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86622,43 +87261,43 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [220 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [220 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [222 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [223 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [224 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [225 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [226 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -86666,7 +87305,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [226 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -86676,27 +87315,27 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [227 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [228 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [229 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [229 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [230 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [230 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86706,28 +87345,28 @@ ${lanes.join("\n")} nodesVisitor(node.members, visitor, isClassElement) ); }, - [232 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [233 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [237 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [238 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [234 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [235 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -86736,14 +87375,14 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [235 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [238 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86751,26 +87390,26 @@ ${lanes.join("\n")} ); }, // Element - [240 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [241 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [242 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [243 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [243 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [244 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -86778,21 +87417,21 @@ ${lanes.join("\n")} nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [245 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [246 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [247 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -86801,7 +87440,7 @@ ${lanes.join("\n")} visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -86809,7 +87448,7 @@ ${lanes.join("\n")} visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [250 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -86818,52 +87457,52 @@ ${lanes.join("\n")} visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [251 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [252 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [253 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [254 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [255 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [256 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [257 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -86871,7 +87510,7 @@ ${lanes.join("\n")} nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [259 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [260 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -86880,13 +87519,13 @@ ${lanes.join("\n")} nodeVisitor(node.initializer, visitor, isExpression) ); }, - [260 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [261 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [261 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [262 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -86898,7 +87537,7 @@ ${lanes.join("\n")} visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [262 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [263 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86908,7 +87547,7 @@ ${lanes.join("\n")} nodesVisitor(node.members, visitor, isClassElement) ); }, - [263 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86918,7 +87557,7 @@ ${lanes.join("\n")} nodesVisitor(node.members, visitor, isTypeElement) ); }, - [264 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86927,7 +87566,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [265 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86935,7 +87574,7 @@ ${lanes.join("\n")} nodesVisitor(node.members, visitor, isEnumMember) ); }, - [266 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86943,25 +87582,25 @@ ${lanes.join("\n")} nodeVisitor(node.body, visitor, isModuleBody) ); }, - [267 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [268 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [268 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [269 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [269 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [270 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [270 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86970,7 +87609,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [271 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -86979,21 +87618,21 @@ ${lanes.join("\n")} nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [299 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [300 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [272 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -87001,25 +87640,25 @@ ${lanes.join("\n")} nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [273 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [279 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [280 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [274 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [275 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [275 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -87027,14 +87666,14 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [276 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [277 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -87044,13 +87683,13 @@ ${lanes.join("\n")} nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [278 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [280 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -87059,14 +87698,14 @@ ${lanes.join("\n")} ); }, // Module references - [282 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [283 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -87074,7 +87713,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [284 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -87082,7 +87721,7 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [285 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -87090,20 +87729,20 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [286 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [294 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxNamespacedName( node, Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [287 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [288 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -87111,52 +87750,52 @@ ${lanes.join("\n")} Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [290 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isJsxAttributeName)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [291 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [292 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [292 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [293 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [295 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [296 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [297 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [297 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [298 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -87164,28 +87803,28 @@ ${lanes.join("\n")} ); }, // Property assignments - [302 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [303 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [304 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [305 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [305 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -87193,20 +87832,20 @@ ${lanes.join("\n")} ); }, // Top-level nodes - [311 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [312 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [359 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [360 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [360 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [361 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -87499,13 +88138,13 @@ ${lanes.join("\n")} let sourceLine = 0; let sourceCharacter = 0; let nameIndex = 0; - let error; + let error2; return { get pos() { return pos; }, get error() { - return error; + return error2; }, get state() { return captureMapping( @@ -87590,8 +88229,8 @@ ${lanes.join("\n")} return { value: void 0, done: true }; } function setError(message) { - if (error === void 0) { - error = message; + if (error2 === void 0) { + error2 = message; } } function setErrorAndStopIterating(message) { @@ -87599,7 +88238,7 @@ ${lanes.join("\n")} return stopIterating(); } function hasReportedError() { - return error !== void 0; + return error2 !== void 0; } function isSourceMappingSegmentEnd() { return pos === mappings.length || mappings.charCodeAt(pos) === 44 /* comma */ || mappings.charCodeAt(pos) === 59 /* semicolon */; @@ -87807,7 +88446,7 @@ ${lanes.join("\n")} function chainBundle(context, transformSourceFile) { return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - return node.kind === 311 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 312 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -87837,9 +88476,11 @@ ${lanes.join("\n")} function getImportNeedsImportDefaultHelper(node) { return !getImportNeedsImportStarHelper(node) && (isDefaultImport(node) || !!node.importClause && isNamedImports(node.importClause.namedBindings) && containsDefaultReference(node.importClause.namedBindings)); } - function collectExternalModuleInfo(context, sourceFile, resolver, compilerOptions) { + function collectExternalModuleInfo(context, sourceFile) { + const resolver = context.getEmitResolver(); + const compilerOptions = context.getCompilerOptions(); const externalImports = []; - const exportSpecifiers = createMultiMap(); + const exportSpecifiers = new IdentifierNameMultiMap(); const exportedBindings = []; const uniqueExports = /* @__PURE__ */ new Map(); let exportedNames; @@ -87850,7 +88491,7 @@ ${lanes.join("\n")} let hasImportDefault = false; for (const node of sourceFile.statements) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: externalImports.push(node); if (!hasImportStar && getImportNeedsImportStarHelper(node)) { hasImportStar = true; @@ -87859,12 +88500,12 @@ ${lanes.join("\n")} hasImportDefault = true; } break; - case 270 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 282 /* ExternalModuleReference */) { + case 271 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 283 /* ExternalModuleReference */) { externalImports.push(node); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { externalImports.push(node); @@ -87887,19 +88528,19 @@ ${lanes.join("\n")} addExportedNamesForExportDeclaration(node); } break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { exportEquals = node; } break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (hasSyntacticModifier(node, 1 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings); } } break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -87916,7 +88557,7 @@ ${lanes.join("\n")} } } break; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: if (hasSyntacticModifier(node, 1 /* Export */)) { if (hasSyntacticModifier(node, 1024 /* Default */)) { if (!hasExportDefault) { @@ -87945,7 +88586,7 @@ ${lanes.join("\n")} if (!uniqueExports.get(idText(specifier.name))) { const name = specifier.propertyName || specifier.name; if (!node.moduleSpecifier) { - exportSpecifiers.add(idText(name), specifier); + exportSpecifiers.add(name, specifier); } const decl = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); if (decl) { @@ -88035,14 +88676,23 @@ ${lanes.join("\n")} const expression = skipParentheses(statement.expression); return isSuperCall(expression) ? expression : void 0; } - function findSuperStatementIndex(statements, indexAfterLastPrologueStatement) { - for (let i = indexAfterLastPrologueStatement; i < statements.length; i += 1) { + function findSuperStatementIndexPathWorker(statements, start, indices) { + for (let i = start; i < statements.length; i += 1) { const statement = statements[i]; if (getSuperCallFromStatement(statement)) { - return i; + indices.unshift(i); + return true; + } else if (isTryStatement(statement) && findSuperStatementIndexPathWorker(statement.tryBlock.statements, 0, indices)) { + indices.unshift(i); + return true; } } - return -1; + return false; + } + function findSuperStatementIndexPath(statements, start) { + const indices = []; + findSuperStatementIndexPathWorker(statements, start, indices); + return indices; } function getProperties(node, requireInitializer, isStatic2) { return filter(node.members, (m) => isInitializedOrStaticProperty(m, requireInitializer, isStatic2)); @@ -88060,7 +88710,7 @@ ${lanes.join("\n")} return isPropertyDeclaration(member) && hasStaticModifier(member); } function isInitializedProperty(member) { - return member.kind === 171 /* PropertyDeclaration */ && member.initializer !== void 0; + return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0; } function isNonStaticMethodOrAccessorWithPrivateName(member) { return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); @@ -88097,15 +88747,15 @@ ${lanes.join("\n")} } function getAllDecoratorsOfClassElement(member, parent2, useLegacyDecorators) { switch (member.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (!useLegacyDecorators) { return getAllDecoratorsOfMethod(member); } return getAllDecoratorsOfAccessors(member, parent2); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return getAllDecoratorsOfMethod(member); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return getAllDecoratorsOfProperty(member); default: return void 0; @@ -88177,10 +88827,90 @@ ${lanes.join("\n")} function accessPrivateIdentifier(env, name) { return walkUpLexicalEnvironments(env, (env2) => getPrivateIdentifier(env2.privateEnv, name)); } + var IdentifierNameMap, IdentifierNameMultiMap; var init_utilities3 = __esm({ "src/compiler/transformers/utilities.ts"() { "use strict"; init_ts2(); + IdentifierNameMap = class _IdentifierNameMap { + constructor() { + this._map = /* @__PURE__ */ new Map(); + } + get size() { + return this._map.size; + } + has(key) { + return this._map.has(_IdentifierNameMap.toKey(key)); + } + get(key) { + return this._map.get(_IdentifierNameMap.toKey(key)); + } + set(key, value) { + this._map.set(_IdentifierNameMap.toKey(key), value); + return this; + } + delete(key) { + var _a; + return ((_a = this._map) == null ? void 0 : _a.delete(_IdentifierNameMap.toKey(key))) ?? false; + } + clear() { + this._map.clear(); + } + values() { + return this._map.values(); + } + static toKey(name) { + if (isGeneratedPrivateIdentifier(name) || isGeneratedIdentifier(name)) { + const autoGenerate = name.emitNode.autoGenerate; + if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) { + const node = getNodeForGeneratedName(name); + const baseName = isMemberName(node) && node !== name ? _IdentifierNameMap.toKey(node) : `(generated@${getNodeId(node)})`; + return formatGeneratedName( + /*privateName*/ + false, + autoGenerate.prefix, + baseName, + autoGenerate.suffix, + _IdentifierNameMap.toKey + ); + } else { + const baseName = `(auto@${autoGenerate.id})`; + return formatGeneratedName( + /*privateName*/ + false, + autoGenerate.prefix, + baseName, + autoGenerate.suffix, + _IdentifierNameMap.toKey + ); + } + } + if (isPrivateIdentifier(name)) { + return idText(name).slice(1); + } + return idText(name); + } + }; + IdentifierNameMultiMap = class extends IdentifierNameMap { + add(key, value) { + let values = this.get(key); + if (values) { + values.push(value); + } else { + this.set(key, values = [value]); + } + return values; + } + remove(key, value) { + const values = this.get(key); + if (values) { + unorderedRemoveItem(values, value); + if (!values.length) { + this.delete(key); + } + } + } + }; } }); @@ -88652,6 +89382,287 @@ ${lanes.join("\n")} } }); + // src/compiler/transformers/classThis.ts + function createClassThisAssignmentBlock(factory2, classThis, thisExpression = factory2.createThis()) { + const expression = factory2.createAssignment(classThis, thisExpression); + const statement = factory2.createExpressionStatement(expression); + const body = factory2.createBlock( + [statement], + /*multiLine*/ + false + ); + const block = factory2.createClassStaticBlockDeclaration(body); + getOrCreateEmitNode(block).classThis = classThis; + return block; + } + function isClassThisAssignmentBlock(node) { + var _a; + if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { + return false; + } + const statement = node.body.statements[0]; + return isExpressionStatement(statement) && isAssignmentExpression( + statement.expression, + /*excludeCompoundAssignment*/ + true + ) && isIdentifier(statement.expression.left) && ((_a = node.emitNode) == null ? void 0 : _a.classThis) === statement.expression.left && statement.expression.right.kind === 110 /* ThisKeyword */; + } + function classHasClassThisAssignment(node) { + var _a; + return !!((_a = node.emitNode) == null ? void 0 : _a.classThis) && some(node.members, isClassThisAssignmentBlock); + } + function injectClassThisAssignmentIfMissing(factory2, node, classThis, thisExpression) { + if (classHasClassThisAssignment(node)) { + return node; + } + const staticBlock = createClassThisAssignmentBlock(factory2, classThis, thisExpression); + if (node.name) { + setSourceMapRange(staticBlock.body.statements[0], node.name); + } + const members = factory2.createNodeArray([staticBlock, ...node.members]); + setTextRange(members, node.members); + const updatedNode = isClassDeclaration(node) ? factory2.updateClassDeclaration( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ) : factory2.updateClassExpression( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ); + getOrCreateEmitNode(updatedNode).classThis = classThis; + return updatedNode; + } + var init_classThis = __esm({ + "src/compiler/transformers/classThis.ts"() { + "use strict"; + init_ts2(); + } + }); + + // src/compiler/transformers/namedEvaluation.ts + function getAssignedNameOfIdentifier(factory2, name, expression) { + const original = getOriginalNode(skipOuterExpressions(expression)); + if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 1024 /* Default */)) { + return factory2.createStringLiteral("default"); + } + return factory2.createStringLiteralFromNode(name); + } + function getAssignedNameOfPropertyName(context, name, assignedNameText) { + const { factory: factory2 } = context; + if (assignedNameText !== void 0) { + const assignedName2 = factory2.createStringLiteral(assignedNameText); + return { assignedName: assignedName2, name }; + } + if (isPropertyNameLiteral(name) || isPrivateIdentifier(name)) { + const assignedName2 = factory2.createStringLiteralFromNode(name); + return { assignedName: assignedName2, name }; + } + if (isPropertyNameLiteral(name.expression) && !isIdentifier(name.expression)) { + const assignedName2 = factory2.createStringLiteralFromNode(name.expression); + return { assignedName: assignedName2, name }; + } + const assignedName = factory2.getGeneratedNameForNode(name); + context.hoistVariableDeclaration(assignedName); + const key = context.getEmitHelperFactory().createPropKeyHelper(name.expression); + const assignment = factory2.createAssignment(assignedName, key); + const updatedName = factory2.updateComputedPropertyName(name, assignment); + return { assignedName, name: updatedName }; + } + function createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression = context.factory.createThis()) { + const { factory: factory2 } = context; + const expression = context.getEmitHelperFactory().createSetFunctionNameHelper(thisExpression, assignedName); + const statement = factory2.createExpressionStatement(expression); + const body = factory2.createBlock( + [statement], + /*multiLine*/ + false + ); + const block = factory2.createClassStaticBlockDeclaration(body); + getOrCreateEmitNode(block).assignedName = assignedName; + return block; + } + function isClassNamedEvaluationHelperBlock(node) { + var _a; + if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { + return false; + } + const statement = node.body.statements[0]; + return isExpressionStatement(statement) && isCallToHelper(statement.expression, "___setFunctionName") && statement.expression.arguments.length >= 2 && statement.expression.arguments[1] === ((_a = node.emitNode) == null ? void 0 : _a.assignedName); + } + function classHasExplicitlyAssignedName(node) { + var _a; + return !!((_a = node.emitNode) == null ? void 0 : _a.assignedName) && some(node.members, isClassNamedEvaluationHelperBlock); + } + function classHasDeclaredOrExplicitlyAssignedName(node) { + return !!node.name || classHasExplicitlyAssignedName(node); + } + function injectClassNamedEvaluationHelperBlockIfMissing(context, node, assignedName, thisExpression) { + if (classHasExplicitlyAssignedName(node)) { + return node; + } + const { factory: factory2 } = context; + const namedEvaluationBlock = createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression); + if (node.name) { + setSourceMapRange(namedEvaluationBlock.body.statements[0], node.name); + } + const insertionIndex = findIndex(node.members, isClassThisAssignmentBlock) + 1; + const leading = node.members.slice(0, insertionIndex); + const trailing = node.members.slice(insertionIndex); + const members = factory2.createNodeArray([...leading, namedEvaluationBlock, ...trailing]); + setTextRange(members, node.members); + node = isClassDeclaration(node) ? factory2.updateClassDeclaration( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ) : factory2.updateClassExpression( + node, + node.modifiers, + node.name, + node.typeParameters, + node.heritageClauses, + members + ); + getOrCreateEmitNode(node).assignedName = assignedName; + return node; + } + function finishTransformNamedEvaluation(context, expression, assignedName, ignoreEmptyStringLiteral) { + if (ignoreEmptyStringLiteral && isStringLiteral(assignedName) && isEmptyStringLiteral(assignedName)) { + return expression; + } + const { factory: factory2 } = context; + const innerExpression = skipOuterExpressions(expression); + const updatedExpression = isClassExpression(innerExpression) ? cast(injectClassNamedEvaluationHelperBlockIfMissing(context, innerExpression, assignedName), isClassExpression) : context.getEmitHelperFactory().createSetFunctionNameHelper(innerExpression, assignedName); + return factory2.restoreOuterExpressions(expression, updatedExpression); + } + function transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updatePropertyAssignment( + node, + name, + initializer + ); + } + function transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.objectAssignmentInitializer); + const objectAssignmentInitializer = finishTransformNamedEvaluation(context, node.objectAssignmentInitializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateShorthandPropertyAssignment( + node, + node.name, + objectAssignmentInitializer + ); + } + function transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateVariableDeclaration( + node, + node.name, + node.exclamationToken, + node.type, + initializer + ); + } + function transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateParameterDeclaration( + node, + node.modifiers, + node.dotDotDotToken, + node.name, + node.questionToken, + node.type, + initializer + ); + } + function transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updateBindingElement( + node, + node.dotDotDotToken, + node.propertyName, + node.name, + initializer + ); + } + function transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); + const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); + return factory2.updatePropertyDeclaration( + node, + node.modifiers, + name, + node.questionToken ?? node.exclamationToken, + node.type, + initializer + ); + } + function transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.left, node.right); + const right = finishTransformNamedEvaluation(context, node.right, assignedName, ignoreEmptyStringLiteral); + return factory2.updateBinaryExpression( + node, + node.left, + node.operatorToken, + right + ); + } + function transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) { + const { factory: factory2 } = context; + const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : factory2.createStringLiteral(node.isExportEquals ? "" : "default"); + const expression = finishTransformNamedEvaluation(context, node.expression, assignedName, ignoreEmptyStringLiteral); + return factory2.updateExportAssignment( + node, + node.modifiers, + expression + ); + } + function transformNamedEvaluation(context, node, ignoreEmptyStringLiteral, assignedName) { + switch (node.kind) { + case 303 /* PropertyAssignment */: + return transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedName); + case 304 /* ShorthandPropertyAssignment */: + return transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedName); + case 260 /* VariableDeclaration */: + return transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 169 /* Parameter */: + return transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 208 /* BindingElement */: + return transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedName); + case 172 /* PropertyDeclaration */: + return transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); + case 226 /* BinaryExpression */: + return transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedName); + case 277 /* ExportAssignment */: + return transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedName); + } + } + var init_namedEvaluation = __esm({ + "src/compiler/transformers/namedEvaluation.ts"() { + "use strict"; + init_ts2(); + } + }); + // src/compiler/transformers/taggedTemplate.ts function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) { const tag = visitNode(node.tag, visitor, isExpression); @@ -88750,8 +89761,8 @@ ${lanes.join("\n")} const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); let currentSourceFile; let currentNamespace; let currentNamespaceContainerName; @@ -88762,14 +89773,14 @@ ${lanes.join("\n")} let applicableSubstitutions; return transformSourceFileOrBundle; function transformSourceFileOrBundle(node) { - if (node.kind === 312 /* Bundle */) { + if (node.kind === 313 /* Bundle */) { return transformBundle(node); } return transformSourceFile(node); } function transformBundle(node) { return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 314 /* InputFiles */) { + if (prepend.kind === 315 /* InputFiles */) { return createUnparsedSourceFile(prepend, "js"); } return prepend; @@ -88800,22 +89811,22 @@ ${lanes.join("\n")} } function onBeforeVisitNode(node) { switch (node.kind) { - case 311 /* SourceFile */: - case 268 /* CaseBlock */: - case 267 /* ModuleBlock */: - case 240 /* Block */: + case 312 /* SourceFile */: + case 269 /* CaseBlock */: + case 268 /* ModuleBlock */: + case 241 /* Block */: currentLexicalScope = node; currentScopeFirstDeclarationsOfName = void 0; break; - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: if (hasSyntacticModifier(node, 2 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 262 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); } break; } @@ -88834,10 +89845,10 @@ ${lanes.join("\n")} } function sourceElementVisitorWorker(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: return visitElidableStatement(node); default: return visitorWorker(node); @@ -88852,13 +89863,13 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return visitExportDeclaration(node); default: Debug.fail("Unhandled ellided statement"); @@ -88868,7 +89879,7 @@ ${lanes.join("\n")} return saveStateAndInvoke(node, namespaceElementVisitorWorker); } function namespaceElementVisitorWorker(node) { - if (node.kind === 277 /* ExportDeclaration */ || node.kind === 271 /* ImportDeclaration */ || node.kind === 272 /* ImportClause */ || node.kind === 270 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) { return void 0; } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { return visitTypeScript(node); @@ -88880,21 +89891,21 @@ ${lanes.join("\n")} } function classElementVisitorWorker(node, parent2) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructor(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node, parent2); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return visitEachChild(node, visitor, context); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return node; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return; default: return Debug.failBadSyntaxKind(node); @@ -88905,15 +89916,15 @@ ${lanes.join("\n")} } function objectLiteralElementVisitorWorker(node, parent2) { switch (node.kind) { - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return visitor(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessor(node, parent2); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessor(node, parent2); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node, parent2); default: return Debug.failBadSyntaxKind(node); @@ -88947,19 +89958,19 @@ ${lanes.join("\n")} case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: case 128 /* AbstractKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 87 /* ConstKeyword */: case 138 /* DeclareKeyword */: case 148 /* ReadonlyKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: - case 187 /* ArrayType */: - case 188 /* TupleType */: - case 189 /* OptionalType */: - case 190 /* RestType */: - case 186 /* TypeLiteral */: - case 181 /* TypePredicate */: - case 167 /* TypeParameter */: + case 188 /* ArrayType */: + case 189 /* TupleType */: + case 190 /* OptionalType */: + case 191 /* RestType */: + case 187 /* TypeLiteral */: + case 182 /* TypePredicate */: + case 168 /* TypeParameter */: case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: case 136 /* BooleanKeyword */: @@ -88968,80 +89979,80 @@ ${lanes.join("\n")} case 146 /* NeverKeyword */: case 116 /* VoidKeyword */: case 155 /* SymbolKeyword */: - case 184 /* ConstructorType */: - case 183 /* FunctionType */: - case 185 /* TypeQuery */: - case 182 /* TypeReference */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 193 /* ConditionalType */: - case 195 /* ParenthesizedType */: - case 196 /* ThisType */: - case 197 /* TypeOperator */: - case 198 /* IndexedAccessType */: - case 199 /* MappedType */: - case 200 /* LiteralType */: - case 180 /* IndexSignature */: + case 185 /* ConstructorType */: + case 184 /* FunctionType */: + case 186 /* TypeQuery */: + case 183 /* TypeReference */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 194 /* ConditionalType */: + case 196 /* ParenthesizedType */: + case 197 /* ThisType */: + case 198 /* TypeOperator */: + case 199 /* IndexedAccessType */: + case 200 /* MappedType */: + case 201 /* LiteralType */: + case 181 /* IndexSignature */: return void 0; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return factory2.createNotEmittedStatement(node); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return void 0; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return factory2.createNotEmittedStatement(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return visitHeritageClause(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArguments(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 175 /* ClassStaticBlockDeclaration */: return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return visitArrowFunction(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node); - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: return visitAssertionExpression(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return visitSatisfiesExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return visitNonNullExpression(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return visitEnumDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return visitModuleDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement(node); - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: return visitJsxJsxOpeningElement(node); default: return visitEachChild(node, visitor, context); @@ -89151,25 +90162,25 @@ ${lanes.join("\n")} insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); const iife = factory2.createImmediatelyInvokedArrowFunction(statements); setInternalEmitFlags(iife, 1 /* TypeScriptClassWrapper */); - const modifiers2 = facts & 16 /* IsNamedExternalExport */ ? factory2.createModifiersFromModifierFlags(1 /* Export */) : void 0; + const varDecl = factory2.createVariableDeclaration( + factory2.getLocalName( + node, + /*allowComments*/ + false, + /*allowSourceMaps*/ + false + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + iife + ); + setOriginalNode(varDecl, node); const varStatement = factory2.createVariableStatement( - modifiers2, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - false - ), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - iife - ) - ], 1 /* Let */) + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([varDecl], 1 /* Let */) ); setOriginalNode(varStatement, node); setCommentRange(varStatement, node); @@ -89198,10 +90209,10 @@ ${lanes.join("\n")} )) ]; } - if (facts & 16 /* IsNamedExternalExport */ && !promoteToIIFE) { + if (facts & 16 /* IsNamedExternalExport */) { return [ statement, - factory2.createExternalModuleExport(factory2.getLocalName( + factory2.createExternalModuleExport(factory2.getDeclarationName( node, /*allowComments*/ false, @@ -89365,19 +90376,19 @@ ${lanes.join("\n")} } function shouldAddTypeMetadata(node) { const kind = node.kind; - return kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 171 /* PropertyDeclaration */; + return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */; } function shouldAddReturnTypeMetadata(node) { - return node.kind === 173 /* MethodDeclaration */; + return node.kind === 174 /* MethodDeclaration */; } function shouldAddParamTypesMetadata(node) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return getFirstConstructorWithBody(node) !== void 0; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; } return false; @@ -89426,7 +90437,7 @@ ${lanes.join("\n")} return !nodeIsMissing(node.body); } function visitPropertyDeclaration(node, parent2) { - const isAmbient = node.flags & 16777216 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); + const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); if (isAmbient && !(legacyDecorators && hasDecorators(node))) { return void 0; } @@ -89468,6 +90479,35 @@ ${lanes.join("\n")} transformConstructorBody(node.body, node) ); } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } function transformConstructorBody(body, constructor) { const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor)); if (!some(parametersWithPropertyAssignments)) { @@ -89482,25 +90522,22 @@ ${lanes.join("\n")} false, visitor ); - const superStatementIndex = findSuperStatementIndex(body.statements, prologueStatementCount); - if (superStatementIndex >= 0) { - addRange( + const superPath = findSuperStatementIndexPath(body.statements, prologueStatementCount); + const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment); + if (superPath.length) { + transformConstructorBodyWorker( statements, - visitNodes2(body.statements, visitor, isStatement, prologueStatementCount, superStatementIndex + 1 - prologueStatementCount) + body.statements, + prologueStatementCount, + superPath, + /*superPathDepth*/ + 0, + parameterPropertyAssignments ); - } - const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment); - if (superStatementIndex >= 0) { - addRange(statements, parameterPropertyAssignments); } else { - statements = [ - ...statements.slice(0, prologueStatementCount), - ...parameterPropertyAssignments, - ...statements.slice(prologueStatementCount) - ]; + addRange(statements, parameterPropertyAssignments); + addRange(statements, visitNodes2(body.statements, visitor, isStatement, prologueStatementCount)); } - const start = superStatementIndex >= 0 ? superStatementIndex + 1 : prologueStatementCount; - addRange(statements, visitNodes2(body.statements, visitor, isStatement, start)); statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); const block = factory2.createBlock( setTextRange(factory2.createNodeArray(statements), body.statements), @@ -89996,7 +91033,7 @@ ${lanes.join("\n")} /*allowSourceMaps*/ true )); - const varFlags = currentLexicalScope.kind === 311 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; + const varFlags = currentLexicalScope.kind === 312 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; const statement = factory2.createVariableStatement( visitNodes2(node.modifiers, modifierVisitor, isModifier), factory2.createVariableDeclarationList([varDecl], varFlags) @@ -90007,7 +91044,7 @@ ${lanes.join("\n")} setOriginalNode(statement, node); recordEmittedDeclarationInScope(node); if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 265 /* EnumDeclaration */) { + if (node.kind === 266 /* EnumDeclaration */) { setSourceMapRange(statement.declarationList, node); } else { setSourceMapRange(statement, node); @@ -90115,7 +91152,7 @@ ${lanes.join("\n")} let statementsLocation; let blockLocation; if (node.body) { - if (node.body.kind === 267 /* ModuleBlock */) { + if (node.body.kind === 268 /* ModuleBlock */) { saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); statementsLocation = node.body.statements; blockLocation = node.body; @@ -90146,13 +91183,13 @@ ${lanes.join("\n")} true ); setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 267 /* ModuleBlock */) { + if (!node.body || node.body.kind !== 268 /* ModuleBlock */) { setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */); } return block; } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 266 /* ModuleDeclaration */) { + if (moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -90187,7 +91224,7 @@ ${lanes.join("\n")} ) : void 0; } function visitNamedImportBindings(node) { - if (node.kind === 273 /* NamespaceImport */) { + if (node.kind === 274 /* NamespaceImport */) { return shouldEmitAliasDeclaration(node) ? node : void 0; } else { const allowEmpty = compilerOptions.verbatimModuleSyntax || compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); @@ -90385,15 +91422,15 @@ ${lanes.join("\n")} if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { enabledSubstitutions |= 2 /* NamespaceExports */; context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(266 /* ModuleDeclaration */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(267 /* ModuleDeclaration */); } } function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 266 /* ModuleDeclaration */; + return getOriginalNode(node).kind === 267 /* ModuleDeclaration */; } function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 265 /* EnumDeclaration */; + return getOriginalNode(node).kind === 266 /* EnumDeclaration */; } function onEmitNode(hint, node, emitCallback) { const savedApplicableSubstitutions = applicableSubstitutions; @@ -90438,9 +91475,9 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); } return node; @@ -90455,8 +91492,8 @@ ${lanes.join("\n")} /*prefixLocals*/ false ); - if (container && container.kind !== 311 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 266 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 265 /* EnumDeclaration */; + if (container && container.kind !== 312 /* SourceFile */) { + const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 267 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 266 /* EnumDeclaration */; if (substitute) { return setTextRange( factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), @@ -90481,7 +91518,7 @@ ${lanes.join("\n")} const constantValue = tryGetConstEnumValue(node); if (constantValue !== void 0) { setConstantValue(node, constantValue); - const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : factory2.createNumericLiteral(constantValue); + const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue); if (!compilerOptions.removeComments) { const originalNode = getOriginalNode(node, isAccessExpression); addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `); @@ -90544,8 +91581,9 @@ ${lanes.join("\n")} let pendingStatements; let lexicalEnvironment; const lexicalEnvironmentMap = /* @__PURE__ */ new Map(); + const noSubstitution = /* @__PURE__ */ new Set(); let currentClassContainer; - let currentStaticPropertyDeclarationOrStaticBlock; + let currentClassElement; let shouldSubstituteThisWithClassThis = false; let previousShouldSubstituteThisWithClassThis = false; return chainBundle(context, transformSourceFile); @@ -90577,76 +91615,77 @@ ${lanes.join("\n")} switch (node.kind) { case 129 /* AccessorKeyword */: return Debug.fail("Use `modifierVisitor` instead."); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: - return visitClassExpression( - node, - /*referencedName*/ - void 0 - ); - case 174 /* ClassStaticBlockDeclaration */: - case 171 /* PropertyDeclaration */: + case 231 /* ClassExpression */: + return visitClassExpression(node); + case 175 /* ClassStaticBlockDeclaration */: + case 172 /* PropertyDeclaration */: return Debug.fail("Use `classElementVisitor` instead."); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return visitBindingElement(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); case 81 /* PrivateIdentifier */: return visitPrivateIdentifier(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ + case 110 /* ThisKeyword */: + return visitThisExpression(node); + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + return setCurrentClassElementAnd( + /*classElement*/ void 0, fallbackVisitor, node ); + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { + return setCurrentClassElementAnd( + node, + fallbackVisitor, + node + ); } default: return fallbackVisitor(node); @@ -90655,56 +91694,32 @@ ${lanes.join("\n")} function fallbackVisitor(node) { return visitEachChild(node, visitor, context); } - function namedEvaluationVisitor(node, referencedName) { - switch (node.kind) { - case 359 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 216 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 230 /* ClassExpression */: - return visitClassExpression(node, referencedName); - default: - return visitor(node); - } - } function discardedValueVisitor(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - true, - /*referencedName*/ - void 0 + true ); default: return visitor(node); @@ -90712,9 +91727,9 @@ ${lanes.join("\n")} } function heritageClauseVisitor(node) { switch (node.kind) { - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return visitEachChild(node, heritageClauseVisitor, context); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return visitExpressionWithTypeArgumentsInHeritageClause(node); default: return visitor(node); @@ -90722,8 +91737,8 @@ ${lanes.join("\n")} } function assignmentTargetVisitor(node) { switch (node.kind) { - case 209 /* ObjectLiteralExpression */: - case 208 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitAssignmentPattern(node); default: return visitor(node); @@ -90731,29 +91746,35 @@ ${lanes.join("\n")} } function classElementVisitor(node) { switch (node.kind) { - case 175 /* Constructor */: - return visitConstructorDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ - void 0, + case 176 /* Constructor */: + return setCurrentClassElementAnd( + node, + visitConstructorDeclaration, + node + ); + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + return setCurrentClassElementAnd( + node, visitMethodOrAccessorDeclaration, node ); - case 171 /* PropertyDeclaration */: - return setCurrentStaticPropertyDeclarationOrStaticBlockAnd( - /*current*/ - void 0, + case 172 /* PropertyDeclaration */: + return setCurrentClassElementAnd( + node, visitPropertyDeclaration, node ); - case 174 /* ClassStaticBlockDeclaration */: - return visitClassStaticBlockDeclaration(node); - case 166 /* ComputedPropertyName */: + case 175 /* ClassStaticBlockDeclaration */: + return setCurrentClassElementAnd( + node, + visitClassStaticBlockDeclaration, + node + ); + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return node; default: return isModifierLike(node) ? modifierVisitor(node) : visitor(node); @@ -90761,7 +91782,7 @@ ${lanes.join("\n")} } function propertyNameVisitor(node) { switch (node.kind) { - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); default: return visitor(node); @@ -90769,10 +91790,10 @@ ${lanes.join("\n")} } function accessorFieldResultVisitor(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return transformFieldInitializer(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return classElementVisitor(node); default: Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); @@ -90801,9 +91822,7 @@ ${lanes.join("\n")} } function visitPropertyAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updatePropertyAssignment(node, name, initializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } @@ -90815,71 +91834,33 @@ ${lanes.join("\n")} pendingStatements = savedPendingStatements; return statement; } - function getAssignedNameOfIdentifier(name, initializer) { - const originalClass = getOriginalNode(initializer, isClassLike); - return originalClass && !originalClass.name && hasSyntacticModifier(originalClass, 1024 /* Default */) ? factory2.createStringLiteral("default") : factory2.createStringLiteralFromNode(name); - } function visitVariableDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateVariableDeclaration( - node, - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitParameterDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitBindingElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const propertyName = visitNode(node.propertyName, visitor, isPropertyName); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBindingElement( - node, - /*dotDotDotToken*/ - void 0, - propertyName, - name, - initializer - ); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } function visitExportAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = factory2.createStringLiteral(node.isExportEquals ? "" : "default"); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const expression = visitNode(node.expression, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateExportAssignment(node, modifiers, expression); + node = transformNamedEvaluation( + context, + node, + /*ignoreEmptyStringLiteral*/ + true, + node.isExportEquals ? "" : "default" + ); } return visitEachChild(node, visitor, context); } @@ -90944,12 +91925,15 @@ ${lanes.join("\n")} } return void 0; } - function setCurrentStaticPropertyDeclarationOrStaticBlockAnd(current, visitor2, arg) { - const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; - currentStaticPropertyDeclarationOrStaticBlock = current; - const result = visitor2(arg); - currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock; - return result; + function setCurrentClassElementAnd(classElement, visitor2, arg) { + if (classElement !== currentClassElement) { + const savedCurrentClassElement = currentClassElement; + currentClassElement = classElement; + const result = visitor2(arg); + currentClassElement = savedCurrentClassElement; + return result; + } + return visitor2(arg); } function getHoistedFunctionName(node) { Debug.assert(isPrivateIdentifier(node.name)); @@ -90967,6 +91951,11 @@ ${lanes.join("\n")} } } } + function getClassThis() { + const lex = getClassLexicalEnvironment(); + const classThis = lex.classThis ?? lex.classConstructor ?? (currentClassContainer == null ? void 0 : currentClassContainer.name); + return Debug.checkDefined(classThis); + } function transformAutoAccessor(node) { const commentRange = getCommentRange(node); const sourceMapRange = getSourceMapRange(node); @@ -90993,11 +91982,13 @@ ${lanes.join("\n")} setOriginalNode(backingField, node); setEmitFlags(backingField, 3072 /* NoComments */); setSourceMapRange(backingField, sourceMapRange); - const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName); + const receiver = isStatic(node) ? getClassThis() : factory2.createThis(); + const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName, receiver); setOriginalNode(getter, node); setCommentRange(getter, commentRange); setSourceMapRange(getter, sourceMapRange); - const setter = createAccessorPropertySetRedirector(factory2, node, modifiers, setterName); + const setterModifiers = factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers)); + const setter = createAccessorPropertySetRedirector(factory2, node, setterModifiers, setterName, receiver); setOriginalNode(setter, node); setEmitFlags(setter, 3072 /* NoComments */); setSourceMapRange(setter, sourceMapRange); @@ -91036,17 +92027,7 @@ ${lanes.join("\n")} ); } if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - return factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - name, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, (child) => namedEvaluationVisitor(child, referencedName), isExpression) - ); + node = transformNamedEvaluation(context, node); } return factory2.updatePropertyDeclaration( node, @@ -91064,9 +92045,7 @@ ${lanes.join("\n")} const expr = getPropertyNameExpressionIfNeeded( node.name, /*shouldHoist*/ - !!node.initializer || useDefineForClassFields, - /*captureReferencedName*/ - isNamedEvaluation(node, isAnonymousClassNeedingAssignedName) + !!node.initializer || useDefineForClassFields ); if (expr) { getPendingExpressions().push(...flattenCommaList(expr)); @@ -91111,8 +92090,21 @@ ${lanes.join("\n")} } return transformFieldInitializer(node); } + function shouldForceDynamicThis() { + return !!currentClassElement && hasStaticModifier(currentClassElement) && isAccessor(currentClassElement) && isAutoAccessorPropertyDeclaration(getOriginalNode(currentClassElement)); + } + function ensureDynamicThisIfNeeded(node) { + if (shouldForceDynamicThis()) { + const innerExpression = skipOuterExpressions(node); + if (innerExpression.kind === 110 /* ThisKeyword */) { + noSubstitution.add(innerExpression); + } + } + } function createPrivateIdentifierAccess(info, receiver) { - return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression)); + receiver = visitNode(receiver, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); + return createPrivateIdentifierAccessHelper(info, receiver); } function createPrivateIdentifierAccessHelper(info, receiver) { setCommentRange(receiver, moveRangePos(receiver, -1)); @@ -91157,7 +92149,7 @@ ${lanes.join("\n")} ); } } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && isIdentifier(node.name) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isIdentifier(node.name) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -91176,7 +92168,7 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitElementAccessExpression(node) { - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -91201,6 +92193,7 @@ ${lanes.join("\n")} let info; if (info = accessPrivateIdentifier2(operand.name)) { const receiver = visitNode(operand.expression, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); let expression = createPrivateIdentifierAccess(info, readExpression); const temp = isPrefixUnaryExpression(node) || discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); @@ -91219,7 +92212,7 @@ ${lanes.join("\n")} } return expression; } - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(operand) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(operand) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { const expression = visitInvalidSuperProperty(operand); @@ -91276,6 +92269,9 @@ ${lanes.join("\n")} } function createCopiableReceiverExpr(receiver) { const clone2 = nodeIsSynthesized(receiver) ? receiver : factory2.cloneNode(receiver); + if (receiver.kind === 110 /* ThisKeyword */ && noSubstitution.has(receiver)) { + noSubstitution.add(clone2); + } if (isSimpleInlineableExpression(receiver)) { return { readExpression: clone2, initializeExpression: void 0 }; } @@ -91306,7 +92302,7 @@ ${lanes.join("\n")} [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)] ); } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.expression) && currentStaticPropertyDeclarationOrStaticBlock && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.expression) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { const invocation = factory2.createFunctionCallCall( visitNode(node.expression, visitor, isExpression), lexicalEnvironment.data.classConstructor, @@ -91335,7 +92331,7 @@ ${lanes.join("\n")} visitNode(node.template, visitor, isTemplateLiteral) ); } - if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.tag) && currentStaticPropertyDeclarationOrStaticBlock && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.tag) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { const invocation = factory2.createFunctionBindCall( visitNode(node.tag, visitor, isExpression), lexicalEnvironment.data.classConstructor, @@ -91358,30 +92354,40 @@ ${lanes.join("\n")} lexicalEnvironmentMap.set(getOriginalNode(node), lexicalEnvironment); } if (shouldTransformPrivateElementsOrClassStaticBlocks) { + if (isClassThisAssignmentBlock(node)) { + const result = visitNode(node.body.statements[0].expression, visitor, isExpression); + if (isAssignmentExpression( + result, + /*excludeCompoundAssignment*/ + true + ) && result.left === result.right) { + return void 0; + } + return result; + } + if (isClassNamedEvaluationHelperBlock(node)) { + return visitNode(node.body.statements[0].expression, visitor, isExpression); + } startLexicalEnvironment(); - let statements = setCurrentStaticPropertyDeclarationOrStaticBlockAnd( + let statements = setCurrentClassElementAnd( node, (statements2) => visitNodes2(statements2, visitor, isStatement), node.body.statements ); statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); const iife = factory2.createImmediatelyInvokedArrowFunction(statements); + setOriginalNode(skipParentheses(iife.expression), node); + addEmitFlags(skipParentheses(iife.expression), 4 /* AdviseOnEmitNode */); setOriginalNode(iife, node); setTextRange(iife, node); - addEmitFlags(iife, 4 /* AdviseOnEmitNode */); return iife; } } function isAnonymousClassNeedingAssignedName(node) { if (isClassExpression(node) && !node.name) { const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - const classStaticBlock = find(staticPropertiesOrClassStaticBlocks, isClassStaticBlockDeclaration); - if (classStaticBlock) { - for (const statement of classStaticBlock.body.statements) { - if (isExpressionStatement(statement) && isCallToHelper(statement.expression, "___setFunctionName")) { - return false; - } - } + if (some(staticPropertiesOrClassStaticBlocks, isClassNamedEvaluationHelperBlock)) { + return false; } const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || !!(getInternalEmitFlags(node) && 32 /* TransformPrivateStaticElements */)) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2)); return hasTransformableStatics; @@ -91404,10 +92410,8 @@ ${lanes.join("\n")} } if (isAssignmentExpression(node)) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const left2 = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left2, node.operatorToken, right); + node = transformNamedEvaluation(context, node); + Debug.assertNode(node, isAssignmentExpression); } const left = skipOuterExpressions(node.left, 8 /* PartiallyEmittedExpressions */ | 1 /* Parentheses */); if (isPrivateIdentifierPropertyAccessExpression(left)) { @@ -91421,7 +92425,7 @@ ${lanes.join("\n")} node ); } - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(node.left) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.left) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return factory2.updateBinaryExpression( @@ -91486,36 +92490,15 @@ ${lanes.join("\n")} const elements = discarded ? visitCommaListElements(node.elements, discardedValueVisitor) : visitCommaListElements(node.elements, visitor, discardedValueVisitor); return factory2.updateCommaListExpression(node, elements); } - function visitParenthesizedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitParenthesizedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updateParenthesizedExpression(node, expression); } - function visitPartiallyEmittedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; - const expression = visitNode(node.expression, visitorFunc, isExpression); - return factory2.updatePartiallyEmittedExpression(node, expression); - } - function visitReferencedPropertyName(node) { - if (isPropertyNameLiteral(node) || isPrivateIdentifier(node)) { - const referencedName2 = factory2.createStringLiteralFromNode(node); - const name2 = visitNode(node, visitor, isPropertyName); - return { referencedName: referencedName2, name: name2 }; - } - if (isPropertyNameLiteral(node.expression) && !isIdentifier(node.expression)) { - const referencedName2 = factory2.createStringLiteralFromNode(node.expression); - const name2 = visitNode(node, visitor, isPropertyName); - return { referencedName: referencedName2, name: name2 }; - } - const referencedName = factory2.createTempVariable(hoistVariableDeclaration); - const key = emitHelpers().createPropKeyHelper(visitNode(node.expression, visitor, isExpression)); - const assignment = factory2.createAssignment(referencedName, key); - const name = factory2.updateComputedPropertyName(node, injectPendingExpressions(assignment)); - return { referencedName, name }; - } function createPrivateIdentifierAssignment(info, receiver, right, operator) { receiver = visitNode(receiver, visitor, isExpression); right = visitNode(right, visitor, isExpression); + ensureDynamicThisIfNeeded(receiver); if (isCompoundAssignment(operator)) { const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); receiver = initializeExpression || readExpression; @@ -91562,11 +92545,15 @@ ${lanes.join("\n")} return filter(node.members, isNonStaticMethodOrAccessorWithPrivateName); } function getClassFacts(node) { + var _a; let facts = 0 /* None */; const original = getOriginalNode(node); if (isClassDeclaration(original) && classOrConstructorParameterIsDecorated(legacyDecorators, original)) { facts |= 1 /* ClassWasDecorated */; } + if (shouldTransformPrivateElementsOrClassStaticBlocks && (classHasClassThisAssignment(node) || classHasExplicitlyAssignedName(node))) { + facts |= 2 /* NeedsClassConstructorReference */; + } let containsPublicInstanceFields = false; let containsInitializedPublicInstanceFields = false; let containsInstancePrivateElements = false; @@ -91575,6 +92562,8 @@ ${lanes.join("\n")} if (isStatic(member)) { if (member.name && (isPrivateIdentifier(member.name) || isAutoAccessorPropertyDeclaration(member)) && shouldTransformPrivateElementsOrClassStaticBlocks) { facts |= 2 /* NeedsClassConstructorReference */; + } else if (isAutoAccessorPropertyDeclaration(member) && shouldTransformAutoAccessors === -1 /* True */ && !node.name && !((_a = node.emitNode) == null ? void 0 : _a.classThis)) { + facts |= 2 /* NeedsClassConstructorReference */; } if (isPropertyDeclaration(member) || isClassStaticBlockDeclaration(member)) { if (shouldTransformThisInStaticInitializers && member.transformFlags & 16384 /* ContainsLexicalThis */) { @@ -91595,6 +92584,9 @@ ${lanes.join("\n")} containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member)); } else if (isPrivateIdentifierClassElementDeclaration(member)) { containsInstancePrivateElements = true; + if (resolver.getNodeCheckFlags(member) & 262144 /* ContainsConstructorReference */) { + facts |= 2 /* NeedsClassConstructorReference */; + } } else if (isPropertyDeclaration(member)) { containsPublicInstanceFields = true; containsInitializedPublicInstanceFields || (containsInitializedPublicInstanceFields = !!member.initializer); @@ -91629,7 +92621,8 @@ ${lanes.join("\n")} } return visitEachChild(node, visitor, context); } - function visitInNewClassLexicalEnvironment(node, referencedName, visitor2) { + function visitInNewClassLexicalEnvironment(node, visitor2) { + var _a; const savedCurrentClassContainer = currentClassContainer; const savedPendingExpressions = pendingExpressions; const savedLexicalEnvironment = lexicalEnvironment; @@ -91641,6 +92634,15 @@ ${lanes.join("\n")} const name = getNameOfDeclaration(node); if (name && isIdentifier(name)) { getPrivateIdentifierEnvironment().data.className = name; + } else if ((_a = node.emitNode) == null ? void 0 : _a.assignedName) { + if (isStringLiteral(node.emitNode.assignedName)) { + if (node.emitNode.assignedName.textSourceNode && isIdentifier(node.emitNode.assignedName.textSourceNode)) { + getPrivateIdentifierEnvironment().data.className = node.emitNode.assignedName.textSourceNode; + } else if (isIdentifierText(node.emitNode.assignedName.text, languageVersion)) { + const prefixName = factory2.createIdentifier(node.emitNode.assignedName.text); + getPrivateIdentifierEnvironment().data.className = prefixName; + } + } } } if (shouldTransformPrivateElementsOrClassStaticBlocks) { @@ -91659,7 +92661,7 @@ ${lanes.join("\n")} if (facts & 8 /* NeedsSubstitutionForThisInClassStaticField */) { enableSubstitutionForClassStaticThisOrSuperReference(); } - const result = visitor2(node, facts, referencedName); + const result = visitor2(node, facts); endClassLexicalEnvironment(); Debug.assert(lexicalEnvironment === savedLexicalEnvironment); currentClassContainer = savedCurrentClassContainer; @@ -91667,12 +92669,7 @@ ${lanes.join("\n")} return result; } function visitClassDeclaration(node) { - return visitInNewClassLexicalEnvironment( - node, - /*referencedName*/ - void 0, - visitClassDeclarationInNewClassLexicalEnvironment - ); + return visitInNewClassLexicalEnvironment(node, visitClassDeclarationInNewClassLexicalEnvironment); } function visitClassDeclarationInNewClassLexicalEnvironment(node, facts) { var _a, _b; @@ -91690,10 +92687,11 @@ ${lanes.join("\n")} getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp); pendingClassReferenceAssignment = factory2.createAssignment(temp, factory2.getInternalName(node)); } - if ((_b = node.emitNode) == null ? void 0 : _b.classThis) { - getClassLexicalEnvironment().classThis = node.emitNode.classThis; - } } + if ((_b = node.emitNode) == null ? void 0 : _b.classThis) { + getClassLexicalEnvironment().classThis = node.emitNode.classThis; + } + const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */; const isExport = hasSyntacticModifier(node, 1 /* Export */); const isDefault = hasSyntacticModifier(node, 1024 /* Default */); let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); @@ -91728,6 +92726,11 @@ ${lanes.join("\n")} ) )); } + const alias = getClassLexicalEnvironment().classConstructor; + if (isClassWithConstructorReference && alias) { + enableSubstitutionForClassAliases(); + classAliases[getOriginalNodeId(node)] = alias; + } const classDecl = factory2.updateClassDeclaration( node, modifiers, @@ -91743,24 +92746,27 @@ ${lanes.join("\n")} } return statements; } - function visitClassExpression(node, referencedName) { - return visitInNewClassLexicalEnvironment(node, referencedName, visitClassExpressionInNewClassLexicalEnvironment); + function visitClassExpression(node) { + return visitInNewClassLexicalEnvironment(node, visitClassExpressionInNewClassLexicalEnvironment); } - function visitClassExpressionInNewClassLexicalEnvironment(node, facts, referencedName) { - var _a, _b, _c, _d; + function visitClassExpressionInNewClassLexicalEnvironment(node, facts) { + var _a, _b, _c; const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */); const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */; + const classCheckFlags = resolver.getNodeCheckFlags(node); + const isClassWithConstructorReference = classCheckFlags & 262144 /* ContainsConstructorReference */; let temp; function createClassTempVar() { var _a2; if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a2 = node.emitNode) == null ? void 0 : _a2.classThis)) { return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis; } - const classCheckFlags = resolver.getNodeCheckFlags(node); - const isClassWithConstructorReference2 = classCheckFlags & 1048576 /* ClassWithConstructorReference */; const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */; - const temp2 = factory2.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference2); + const temp2 = factory2.createTempVariable( + requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, + /*reservedInNestedScopes*/ + true + ); getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp2); return temp2; } @@ -91773,7 +92779,7 @@ ${lanes.join("\n")} const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause); const { members, prologue } = transformClassMembers(node); - let classExpression = factory2.updateClassExpression( + const classExpression = factory2.updateClassExpression( node, modifiers, node.name, @@ -91787,41 +92793,18 @@ ${lanes.join("\n")} expressions.push(prologue); } const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2)); - if (hasTransformableStatics || some(pendingExpressions) || referencedName) { + if (hasTransformableStatics || some(pendingExpressions)) { if (isDecoratedClassDeclaration) { Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); if (some(pendingExpressions)) { addRange(pendingStatements, map(pendingExpressions, factory2.createExpressionStatement)); } - if (referencedName) { - if (shouldTransformPrivateElementsOrClassStaticBlocks) { - const setNameExpression = emitHelpers().createSetFunctionNameHelper(temp ?? ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node), referencedName); - pendingStatements.push(factory2.createExpressionStatement(setNameExpression)); - } else { - const setNameExpression = emitHelpers().createSetFunctionNameHelper(factory2.createThis(), referencedName); - classExpression = factory2.updateClassExpression( - classExpression, - classExpression.modifiers, - classExpression.name, - classExpression.typeParameters, - classExpression.heritageClauses, - [ - factory2.createClassStaticBlockDeclaration( - factory2.createBlock([ - factory2.createExpressionStatement(setNameExpression) - ]) - ), - ...classExpression.members - ] - ); - } - } if (some(staticPropertiesOrClassStaticBlocks)) { - addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_c = node.emitNode) == null ? void 0 : _c.classThis) ?? factory2.getInternalName(node)); + addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node)); } if (temp) { expressions.push(factory2.createAssignment(temp, classExpression)); - } else if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_d = node.emitNode) == null ? void 0 : _d.classThis)) { + } else if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_c = node.emitNode) == null ? void 0 : _c.classThis)) { expressions.push(factory2.createAssignment(node.emitNode.classThis, classExpression)); } else { expressions.push(classExpression); @@ -91836,9 +92819,6 @@ ${lanes.join("\n")} } expressions.push(factory2.createAssignment(temp, classExpression)); addRange(expressions, pendingExpressions); - if (referencedName) { - expressions.push(emitHelpers().createSetFunctionNameHelper(temp, referencedName)); - } addRange(expressions, generateInitializedPropertyExpressionsOrClassStaticBlock(staticPropertiesOrClassStaticBlocks, temp)); expressions.push(factory2.cloneNode(temp)); } @@ -91857,6 +92837,13 @@ ${lanes.join("\n")} } return void 0; } + function visitThisExpression(node) { + if (shouldTransformThisInStaticInitializers && currentClassElement && isClassStaticBlockDeclaration(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + const { classThis, classConstructor } = lexicalEnvironment.data; + return classThis ?? classConstructor ?? node; + } + return node; + } function transformClassMembers(node) { const shouldTransformPrivateStaticElementsInClass = !!(getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */); if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformPrivateStaticElementsInFile) { @@ -91936,9 +92923,14 @@ ${lanes.join("\n")} } if (syntheticConstructor || syntheticStaticBlock) { let membersArray; + const classThisAssignmentBlock = find(members, isClassThisAssignmentBlock); + const classNamedEvaluationHelperBlock = find(members, isClassNamedEvaluationHelperBlock); + membersArray = append(membersArray, classThisAssignmentBlock); + membersArray = append(membersArray, classNamedEvaluationHelperBlock); membersArray = append(membersArray, syntheticConstructor); membersArray = append(membersArray, syntheticStaticBlock); - membersArray = addRange(membersArray, members); + const remainingMembers = classThisAssignmentBlock || classNamedEvaluationHelperBlock ? filter(members, (member) => member !== classThisAssignmentBlock && member !== classNamedEvaluationHelperBlock) : members; + membersArray = addRange(membersArray, remainingMembers); members = setTextRange( factory2.createNodeArray(membersArray), /*location*/ @@ -91999,8 +92991,46 @@ ${lanes.join("\n")} ) ); } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements, constructor) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + statementOffset = superStatementIndex + 1; + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements, + constructor + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + while (statementOffset < statementsIn.length) { + const statement = statementsIn[statementOffset]; + if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { + statementOffset++; + } else { + break; + } + } + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset)); + } function transformConstructorBody(node, constructor, isDerivedClass) { - var _a; const instanceProperties = getProperties( node, /*requireInitializer*/ @@ -92024,68 +93054,65 @@ ${lanes.join("\n")} } resumeLexicalEnvironment(); const needsSyntheticConstructor = !constructor && isDerivedClass; - let indexOfFirstStatementAfterSuperAndPrologue = 0; - let prologueStatementCount = 0; - let superStatementIndex = -1; + let statementOffset = 0; let statements = []; - if ((_a = constructor == null ? void 0 : constructor.body) == null ? void 0 : _a.statements) { - prologueStatementCount = factory2.copyPrologue( + const initializerStatements = []; + const receiver = factory2.createThis(); + addInstanceMethodStatements(initializerStatements, privateMethodsAndAccessors, receiver); + if (constructor) { + const parameterProperties = filter(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); + const nonParameterProperties = filter(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); + addPropertyOrClassStaticBlockStatements(initializerStatements, parameterProperties, receiver); + addPropertyOrClassStaticBlockStatements(initializerStatements, nonParameterProperties, receiver); + } else { + addPropertyOrClassStaticBlockStatements(initializerStatements, properties, receiver); + } + if (constructor == null ? void 0 : constructor.body) { + statementOffset = factory2.copyPrologue( constructor.body.statements, statements, /*ensureUseStrict*/ false, visitor ); - superStatementIndex = findSuperStatementIndex(constructor.body.statements, prologueStatementCount); - if (superStatementIndex >= 0) { - indexOfFirstStatementAfterSuperAndPrologue = superStatementIndex + 1; - statements = [ - ...statements.slice(0, prologueStatementCount), - ...visitNodes2(constructor.body.statements, visitor, isStatement, prologueStatementCount, indexOfFirstStatementAfterSuperAndPrologue - prologueStatementCount), - ...statements.slice(prologueStatementCount) - ]; - } else if (prologueStatementCount >= 0) { - indexOfFirstStatementAfterSuperAndPrologue = prologueStatementCount; - } - } - if (needsSyntheticConstructor) { - statements.push( - factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createSuper(), - /*typeArguments*/ - void 0, - [factory2.createSpreadElement(factory2.createIdentifier("arguments"))] - ) - ) - ); - } - let parameterPropertyDeclarationCount = 0; - if (constructor == null ? void 0 : constructor.body) { - for (let i = indexOfFirstStatementAfterSuperAndPrologue; i < constructor.body.statements.length; i++) { - const statement = constructor.body.statements[i]; - if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { - parameterPropertyDeclarationCount++; - } else { - break; + const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, statementOffset); + if (superStatementIndices.length) { + transformConstructorBodyWorker( + statements, + constructor.body.statements, + statementOffset, + superStatementIndices, + /*superPathDepth*/ + 0, + initializerStatements, + constructor + ); + } else { + while (statementOffset < constructor.body.statements.length) { + const statement = constructor.body.statements[statementOffset]; + if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { + statementOffset++; + } else { + break; + } } + addRange(statements, initializerStatements); + addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, statementOffset)); } - if (parameterPropertyDeclarationCount > 0) { - indexOfFirstStatementAfterSuperAndPrologue += parameterPropertyDeclarationCount; - } - } - const receiver = factory2.createThis(); - addInstanceMethodStatements(statements, privateMethodsAndAccessors, receiver); - if (constructor) { - const parameterProperties = filter(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - const nonParameterProperties = filter(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - addPropertyOrClassStaticBlockStatements(statements, parameterProperties, receiver); - addPropertyOrClassStaticBlockStatements(statements, nonParameterProperties, receiver); } else { - addPropertyOrClassStaticBlockStatements(statements, properties, receiver); - } - if (constructor) { - addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, indexOfFirstStatementAfterSuperAndPrologue)); + if (needsSyntheticConstructor) { + statements.push( + factory2.createExpressionStatement( + factory2.createCallExpression( + factory2.createSuper(), + /*typeArguments*/ + void 0, + [factory2.createSpreadElement(factory2.createIdentifier("arguments"))] + ) + ) + ); + } + addRange(statements, initializerStatements); } statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); if (statements.length === 0 && !constructor) { @@ -92118,7 +93145,7 @@ ${lanes.join("\n")} } } function transformPropertyOrClassStaticBlock(property, receiver) { - const expression = isClassStaticBlockDeclaration(property) ? transformClassStaticBlockDeclaration(property) : transformProperty(property, receiver); + const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : transformProperty(property, receiver); if (!expression) { return void 0; } @@ -92143,7 +93170,12 @@ ${lanes.join("\n")} function generateInitializedPropertyExpressionsOrClassStaticBlock(propertiesOrClassStaticBlocks, receiver) { const expressions = []; for (const property of propertiesOrClassStaticBlocks) { - const expression = isClassStaticBlockDeclaration(property) ? transformClassStaticBlockDeclaration(property) : transformProperty(property, receiver); + const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : setCurrentClassElementAnd( + property, + () => transformProperty(property, receiver), + /*arg*/ + void 0 + ); if (!expression) { continue; } @@ -92158,7 +93190,7 @@ ${lanes.join("\n")} } function transformProperty(property, receiver) { var _a; - const savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock; + const savedCurrentClassElement = currentClassElement; const transformed = transformPropertyWorker(property, receiver); if (transformed && hasStaticModifier(property) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.facts)) { setOriginalNode(transformed, property); @@ -92166,26 +93198,18 @@ ${lanes.join("\n")} setSourceMapRange(transformed, getSourceMapRange(property.name)); lexicalEnvironmentMap.set(getOriginalNode(property), lexicalEnvironment); } - currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock; + currentClassElement = savedCurrentClassElement; return transformed; } function transformPropertyWorker(property, receiver) { const emitAssignment = !useDefineForClassFields; - let referencedName; if (isNamedEvaluation(property, isAnonymousClassNeedingAssignedName)) { - if (isPropertyNameLiteral(property.name) || isPrivateIdentifier(property.name)) { - referencedName = factory2.createStringLiteralFromNode(property.name); - } else if (isPropertyNameLiteral(property.name.expression) && !isIdentifier(property.name.expression)) { - referencedName = factory2.createStringLiteralFromNode(property.name.expression); - } else { - referencedName = factory2.getGeneratedNameForNode(property.name); - } + property = transformNamedEvaluation(context, property); } const propertyName = hasAccessorModifier(property) ? factory2.getGeneratedPrivateNameForNode(property.name) : isComputedPropertyName(property.name) && !isSimpleInlineableExpression(property.name.expression) ? factory2.updateComputedPropertyName(property.name, factory2.getGeneratedNameForNode(property.name)) : property.name; if (hasStaticModifier(property)) { - currentStaticPropertyDeclarationOrStaticBlock = property; + currentClassElement = property; } - const initializerVisitor = referencedName ? (child) => namedEvaluationVisitor(child, referencedName) : visitor; if (isPrivateIdentifier(propertyName) && shouldTransformClassElementToWeakMap(property)) { const privateIdentifierInfo = accessPrivateIdentifier2(propertyName); if (privateIdentifierInfo) { @@ -92194,14 +93218,14 @@ ${lanes.join("\n")} return createPrivateInstanceFieldInitializer( factory2, receiver, - visitNode(property.initializer, initializerVisitor, isExpression), + visitNode(property.initializer, visitor, isExpression), privateIdentifierInfo.brandCheckIdentifier ); } else { return createPrivateStaticFieldInitializer( factory2, privateIdentifierInfo.variableName, - visitNode(property.initializer, initializerVisitor, isExpression) + visitNode(property.initializer, visitor, isExpression) ); } } else { @@ -92218,7 +93242,7 @@ ${lanes.join("\n")} if (hasSyntacticModifier(propertyOriginalNode, 256 /* Abstract */)) { return void 0; } - let initializer = visitNode(property.initializer, initializerVisitor, isExpression); + let initializer = visitNode(property.initializer, visitor, isExpression); if (isParameterPropertyDeclaration(propertyOriginalNode, propertyOriginalNode.parent) && isIdentifier(propertyName)) { const localName = factory2.cloneNode(propertyName); if (initializer) { @@ -92263,14 +93287,14 @@ ${lanes.join("\n")} if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(261 /* FunctionDeclaration */); - context.enableEmitNotification(217 /* FunctionExpression */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(171 /* PropertyDeclaration */); - context.enableEmitNotification(166 /* ComputedPropertyName */); + context.enableEmitNotification(262 /* FunctionDeclaration */); + context.enableEmitNotification(218 /* FunctionExpression */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(172 /* PropertyDeclaration */); + context.enableEmitNotification(167 /* ComputedPropertyName */); } } function addInstanceMethodStatements(statements, methods, receiver) { @@ -92296,10 +93320,10 @@ ${lanes.join("\n")} visitNode(node.argumentExpression, visitor, isExpression) ); } - function getPropertyNameExpressionIfNeeded(name, shouldHoist, captureReferencedName) { + function getPropertyNameExpressionIfNeeded(name, shouldHoist) { if (isComputedPropertyName(name)) { const cacheAssignment = findComputedPropertyNameCacheAssignment(name); - let expression = visitNode(name.expression, visitor, isExpression); + const expression = visitNode(name.expression, visitor, isExpression); const innerExpression = skipPartiallyEmittedExpressions(expression); const inlinable = isSimpleInlineableExpression(innerExpression); const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left); @@ -92310,9 +93334,6 @@ ${lanes.join("\n")} } else { hoistVariableDeclaration(generatedName); } - if (captureReferencedName) { - expression = emitHelpers().createPropKeyHelper(expression); - } return factory2.createAssignment(generatedName, expression); } return inlinable || isIdentifier(innerExpression) ? void 0 : expression; @@ -92508,7 +93529,7 @@ ${lanes.join("\n")} } if (isPrivateIdentifierPropertyAccessExpression(node)) { return wrapPrivateIdentifierForDestructuringTarget(node); - } else if (shouldTransformSuperInStaticInitializers && isSuperProperty(node) && currentStaticPropertyDeclarationOrStaticBlock && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1 /* ClassWasDecorated */) { return visitInvalidSuperProperty(node); @@ -92535,10 +93556,7 @@ ${lanes.join("\n")} } function visitAssignmentElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const left = visitDestructuringAssignmentTarget(node.left); - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); + node = transformNamedEvaluation(context, node); } if (isAssignmentExpression( node, @@ -92585,9 +93603,7 @@ ${lanes.join("\n")} } function visitShorthandAssignmentProperty(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.objectAssignmentInitializer); - const objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateShorthandPropertyAssignment(node, node.name, objectAssignmentInitializer); + node = transformNamedEvaluation(context, node); } return visitEachChild(node, visitor, context); } @@ -92637,16 +93653,16 @@ ${lanes.join("\n")} return; } switch (node.kind) { - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) { break; } - case 261 /* FunctionDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - case 171 /* PropertyDeclaration */: { + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { const savedLexicalEnvironment = lexicalEnvironment; const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; lexicalEnvironment = void 0; @@ -92658,7 +93674,7 @@ ${lanes.join("\n")} lexicalEnvironment = savedLexicalEnvironment; return; } - case 166 /* ComputedPropertyName */: { + case 167 /* ComputedPropertyName */: { const savedLexicalEnvironment = lexicalEnvironment; const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; @@ -92688,11 +93704,8 @@ ${lanes.join("\n")} return node; } function substituteThisExpression(node) { - if (enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */ && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */ && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) && !noSubstitution.has(node)) { const { facts, classConstructor, classThis } = lexicalEnvironment.data; - if (facts & 1 /* ClassWasDecorated */ && legacyDecorators) { - return factory2.createParenthesizedExpression(factory2.createVoidZero()); - } const substituteThis = shouldSubstituteThisWithClassThis ? classThis ?? classConstructor : classConstructor; if (substituteThis) { return setTextRange( @@ -92703,6 +93716,9 @@ ${lanes.join("\n")} node ); } + if (facts & 1 /* ClassWasDecorated */ && legacyDecorators) { + return factory2.createParenthesizedExpression(factory2.createVoidZero()); + } } return node; } @@ -92711,7 +93727,7 @@ ${lanes.join("\n")} } function trySubstituteClassAlias(node) { if (enabledSubstitutions & 1 /* ClassAliases */) { - if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) { + if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) { const declaration = resolver.getReferencedValueDeclaration(node); if (declaration) { const classAlias = classAliases[declaration.id]; @@ -92757,6 +93773,12 @@ ${lanes.join("\n")} function isPrivateIdentifierInExpression(node) { return isPrivateIdentifier(node.left) && node.operatorToken.kind === 103 /* InKeyword */; } + function isStaticPropertyDeclaration2(node) { + return isPropertyDeclaration(node) && hasStaticModifier(node); + } + function isStaticPropertyDeclarationOrClassStaticBlock(node) { + return isClassStaticBlockDeclaration(node) || isStaticPropertyDeclaration2(node); + } var init_classFields = __esm({ "src/compiler/transformers/classFields.ts"() { "use strict"; @@ -92798,15 +93820,15 @@ ${lanes.join("\n")} } function serializeTypeOfNode(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: return serializeTypeNode(node.type); - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: return serializeTypeNode(getAccessorTypeNode(node)); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 173 /* MethodDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 174 /* MethodDeclaration */: return factory2.createIdentifier("Function"); default: return factory2.createVoidZero(); @@ -92833,7 +93855,7 @@ ${lanes.join("\n")} return factory2.createArrayLiteralExpression(expressions); } function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 176 /* GetAccessor */) { + if (container && node.kind === 177 /* GetAccessor */) { const { setAccessor } = getAllAccessorDeclarations(container.members, node); if (setAccessor) { return setAccessor.parameters; @@ -92859,72 +93881,72 @@ ${lanes.join("\n")} case 157 /* UndefinedKeyword */: case 146 /* NeverKeyword */: return factory2.createVoidZero(); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return factory2.createIdentifier("Function"); - case 187 /* ArrayType */: - case 188 /* TupleType */: + case 188 /* ArrayType */: + case 189 /* TupleType */: return factory2.createIdentifier("Array"); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean"); case 136 /* BooleanKeyword */: return factory2.createIdentifier("Boolean"); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: case 154 /* StringKeyword */: return factory2.createIdentifier("String"); case 151 /* ObjectKeyword */: return factory2.createIdentifier("Object"); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return serializeLiteralOfLiteralTypeNode(node.literal); case 150 /* NumberKeyword */: return factory2.createIdentifier("Number"); - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: return getGlobalConstructor("BigInt", 7 /* ES2020 */); case 155 /* SymbolKeyword */: return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return serializeTypeReferenceNode(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ true ); - case 191 /* UnionType */: + case 192 /* UnionType */: return serializeUnionOrIntersectionConstituents( node.types, /*isIntersection*/ false ); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return serializeUnionOrIntersectionConstituents( [node.trueType, node.falseType], /*isIntersection*/ false ); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: if (node.operator === 148 /* ReadonlyKeyword */) { return serializeTypeNode(node.type); } break; - case 185 /* TypeQuery */: - case 198 /* IndexedAccessType */: - case 199 /* MappedType */: - case 186 /* TypeLiteral */: + case 186 /* TypeQuery */: + case 199 /* IndexedAccessType */: + case 200 /* MappedType */: + case 187 /* TypeLiteral */: case 133 /* AnyKeyword */: case 159 /* UnknownKeyword */: - case 196 /* ThisType */: - case 204 /* ImportType */: + case 197 /* ThisType */: + case 205 /* ImportType */: break; - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: - case 323 /* JSDocFunctionType */: - case 324 /* JSDocVariadicType */: - case 325 /* JSDocNamepathType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: + case 324 /* JSDocFunctionType */: + case 325 /* JSDocVariadicType */: + case 326 /* JSDocNamepathType */: break; - case 320 /* JSDocNullableType */: - case 321 /* JSDocNonNullableType */: - case 322 /* JSDocOptionalType */: + case 321 /* JSDocNullableType */: + case 322 /* JSDocNonNullableType */: + case 323 /* JSDocOptionalType */: return serializeTypeNode(node.type); default: return Debug.failBadSyntaxKind(node); @@ -92936,7 +93958,7 @@ ${lanes.join("\n")} case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return factory2.createIdentifier("String"); - case 223 /* PrefixUnaryExpression */: { + case 224 /* PrefixUnaryExpression */: { const operand = node.operand; switch (operand.kind) { case 9 /* NumericLiteral */: @@ -93095,7 +94117,7 @@ ${lanes.join("\n")} name.original = void 0; setParent(name, getParseTreeNode(currentLexicalScope)); return name; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return serializeQualifiedNameAsExpression(node); } } @@ -93151,23 +94173,23 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructorDeclaration(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); default: return visitEachChild(node, visitor, context); @@ -93307,39 +94329,36 @@ ${lanes.join("\n")} ); setOriginalNode(classExpression, node); setTextRange(classExpression, location); + const varInitializer = classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression; const varDecl = factory2.createVariableDeclaration( declName, /*exclamationToken*/ void 0, /*type*/ void 0, - classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression + varInitializer ); setOriginalNode(varDecl, node); - let varModifiers; - if (isExport && !isDefault) { - varModifiers = factory2.createModifiersFromModifierFlags(1 /* Export */); - } - const statement = factory2.createVariableStatement( - varModifiers, - factory2.createVariableDeclarationList([ - varDecl - ], 1 /* Let */) + const varDeclList = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); + const varStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + varDeclList ); - setOriginalNode(statement, node); - setTextRange(statement, location); - setCommentRange(statement, node); - const statements = [statement]; + setOriginalNode(varStatement, node); + setTextRange(varStatement, location); + setCommentRange(varStatement, node); + const statements = [varStatement]; addRange(statements, decorationStatements); addConstructorDecorationStatement(statements, node); - if (isExport && isDefault) { - statements.push(factory2.createExportAssignment( - /*modifiers*/ - void 0, - /*isExportEquals*/ - false, - declName - )); + if (isExport) { + if (isDefault) { + const exportStatement = factory2.createExportDefault(declName); + statements.push(exportStatement); + } else { + const exportStatement = factory2.createExternalModuleExport(factory2.getDeclarationName(node)); + statements.push(exportStatement); + } } return statements; } @@ -93406,7 +94425,7 @@ ${lanes.join("\n")} ), node); } function visitPropertyDeclaration(node) { - if (node.flags & 16777216 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { + if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { return void 0; } return finishClassElement(factory2.updatePropertyDeclaration( @@ -93574,7 +94593,7 @@ ${lanes.join("\n")} } } function getClassAliasIfNeeded(node) { - if (resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */) { + if (resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */) { enableSubstitutionForClassAliases(); const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default"); classAliases[getOriginalNodeId(node)] = classAlias; @@ -93607,7 +94626,7 @@ ${lanes.join("\n")} } function trySubstituteClassAlias(node) { if (classAliases) { - if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) { + if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) { const declaration = resolver.getReferencedValueDeclaration(node); if (declaration) { const classAlias = classAliases[declaration.id]; @@ -93639,8 +94658,7 @@ ${lanes.join("\n")} endLexicalEnvironment, hoistVariableDeclaration } = context; - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); + const languageVersion = getEmitScriptTarget(context.getCompilerOptions()); let top; let classInfo; let classThis; @@ -93752,86 +94770,78 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return Debug.fail("Use `modifierVisitor` instead."); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: - return visitClassExpression( - node, - /*referencedName*/ - void 0 - ); - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 174 /* ClassStaticBlockDeclaration */: + case 231 /* ClassExpression */: + return visitClassExpression(node); + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return Debug.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameterDeclaration(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ false ); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return visitPropertyAssignment(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return visitBindingElement(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); case 110 /* ThisKeyword */: return visitThisExpression(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ false ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression( node, /*discarded*/ - false, - /*referencedName*/ - void 0 + false ); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ false ); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return visitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 173 /* MethodDeclaration */: - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: { + case 174 /* MethodDeclaration */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: { enterOther(); const result = visitEachChild(node, fallbackVisitor, context); exitOther(); @@ -93843,7 +94853,7 @@ ${lanes.join("\n")} } function fallbackVisitor(node) { switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; default: return visitor(node); @@ -93851,7 +94861,7 @@ ${lanes.join("\n")} } function modifierVisitor(node) { switch (node.kind) { - case 169 /* Decorator */: + case 170 /* Decorator */: return void 0; default: return node; @@ -93859,72 +94869,48 @@ ${lanes.join("\n")} } function classElementVisitor(node) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return visitConstructorDeclaration(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return visitGetAccessorDeclaration(node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return visitSetAccessorDeclaration(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return visitPropertyDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return visitClassStaticBlockDeclaration(node); default: return visitor(node); } } - function namedEvaluationVisitor(node, referencedName) { - switch (node.kind) { - case 359 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 216 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - false, - referencedName - ); - case 230 /* ClassExpression */: - return visitClassExpression(node, referencedName); - default: - return visitor(node); - } - } function discardedValueVisitor(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression( node, /*discarded*/ true ); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression( node, /*discarded*/ true ); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression( node, /*discarded*/ true ); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression( node, /*discarded*/ - true, - /*referencedName*/ - void 0 + true ); default: return visitor(node); @@ -93962,6 +94948,7 @@ ${lanes.join("\n")} ); } function createClassInfo(node) { + const metadataReference = factory2.createUniqueName("_metadata", 16 /* Optimistic */ | 32 /* FileLevel */); let instanceExtraInitializersName; let staticExtraInitializersName; let hasStaticInitializers = false; @@ -93975,13 +94962,15 @@ ${lanes.join("\n")} node )) { if (hasStaticModifier(member)) { - staticExtraInitializersName ?? (staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */)); + staticExtraInitializersName ?? (staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); } else { - instanceExtraInitializersName ?? (instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */)); + instanceExtraInitializersName ?? (instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); } } if (isClassStaticBlockDeclaration(member)) { - hasStaticInitializers = true; + if (!isClassNamedEvaluationHelperBlock(member)) { + hasStaticInitializers = true; + } } else if (isPropertyDeclaration(member)) { if (hasStaticModifier(member)) { hasStaticInitializers || (hasStaticInitializers = !!member.initializer || hasDecorators(member)); @@ -93998,6 +94987,7 @@ ${lanes.join("\n")} } return { class: node, + metadataReference, instanceExtraInitializersName, staticExtraInitializersName, hasStaticInitializers, @@ -94005,19 +94995,15 @@ ${lanes.join("\n")} hasStaticPrivateClassElements }; } - function containsLexicalSuperInStaticInitializer(node) { - for (const member of node.members) { - if (isClassStaticBlockDeclaration(member) || isPropertyDeclaration(member) && hasStaticModifier(member)) { - if (member.transformFlags & 134217728 /* ContainsLexicalSuper */) { - return true; - } - } - } - return false; - } - function transformClassLike(node, className) { - var _a; + function transformClassLike(node) { startLexicalEnvironment(); + if (!classHasDeclaredOrExplicitlyAssignedName(node) && classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + node + )) { + node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, factory2.createStringLiteral("")); + } const classReference = factory2.getLocalName( node, /*allowComments*/ @@ -94036,10 +95022,11 @@ ${lanes.join("\n")} let shouldTransformPrivateStaticElementsInClass = false; const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(node)); if (classDecorators) { - classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */); - classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */); - classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */); - classInfo2.classThis = factory2.createUniqueName("_classThis", 16 /* Optimistic */); + classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */); + const needsUniqueClassThis = some(node.members, (member) => (isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)); + classInfo2.classThis = factory2.createUniqueName("_classThis", needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */); classDefinitionStatements.push( createLet(classInfo2.classDecoratorsName, factory2.createArrayLiteralExpression(classDecorators)), createLet(classInfo2.classDescriptorName), @@ -94051,34 +95038,26 @@ ${lanes.join("\n")} shouldTransformPrivateStaticElementsInFile = true; } } - if (classDecorators && containsLexicalSuperInStaticInitializer(node)) { - const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); - const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); - const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); - if (extendsExpression) { - classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */); - const unwrapped = skipOuterExpressions(extendsExpression); - const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; - classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression)); - const updatedExtendsElement = factory2.updateExpressionWithTypeArguments( - extendsElement, - classInfo2.classSuper, - /*typeArguments*/ - void 0 - ); - const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]); - heritageClauses = factory2.createNodeArray([updatedExtendsClause]); - } - } else { - heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); + const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); + const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); + const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); + if (extendsExpression) { + classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */ | 32 /* FileLevel */); + const unwrapped = skipOuterExpressions(extendsExpression); + const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; + classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression)); + const updatedExtendsElement = factory2.updateExpressionWithTypeArguments( + extendsElement, + classInfo2.classSuper, + /*typeArguments*/ + void 0 + ); + const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]); + heritageClauses = factory2.createNodeArray([updatedExtendsClause]); } const renamedClassThis = classInfo2.classThis ?? factory2.createThis(); - const needsSetNameHelper = !((_a = getOriginalNode(node, isClassLike)) == null ? void 0 : _a.name) && (classDecorators || !isStringLiteral(className) || !isEmptyStringLiteral(className)); - if (needsSetNameHelper) { - const setNameExpr = emitHelpers().createSetFunctionNameHelper(factory2.createThis(), className); - leadingBlockStatements = append(leadingBlockStatements, factory2.createExpressionStatement(setNameExpr)); - } enterClass(classInfo2); + leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo2.metadataReference, classInfo2.classSuper)); let members = visitNodes2(node.members, classElementVisitor, isClassElement); if (pendingExpressions) { let outerThis; @@ -94176,15 +95155,15 @@ ${lanes.join("\n")} leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.nonStaticFieldDecorationStatements); if (classInfo2.classDescriptorName && classInfo2.classDecoratorsName && classInfo2.classExtraInitializersName && classInfo2.classThis) { leadingBlockStatements ?? (leadingBlockStatements = []); - const valueProperty = factory2.createPropertyAssignment("value", factory2.createThis()); + const valueProperty = factory2.createPropertyAssignment("value", renamedClassThis); const classDescriptor = factory2.createObjectLiteralExpression([valueProperty]); const classDescriptorAssignment = factory2.createAssignment(classInfo2.classDescriptorName, classDescriptor); - const classNameReference = factory2.createPropertyAccessExpression(factory2.createThis(), "name"); + const classNameReference = factory2.createPropertyAccessExpression(renamedClassThis, "name"); const esDecorateHelper2 = emitHelpers().createESDecorateHelper( factory2.createNull(), classDescriptorAssignment, classInfo2.classDecoratorsName, - { kind: "class", name: classNameReference }, + { kind: "class", name: classNameReference, metadata: classInfo2.metadataReference }, factory2.createNull(), classInfo2.classExtraInitializersName ); @@ -94196,6 +95175,7 @@ ${lanes.join("\n")} const classReferenceAssignment = factory2.createAssignment(classReference, classThisAssignment); leadingBlockStatements.push(factory2.createExpressionStatement(classReferenceAssignment)); } + leadingBlockStatements.push(createSymbolMetadata(renamedClassThis, classInfo2.metadataReference)); if (classInfo2.staticExtraInitializersName) { const runStaticInitializersHelper = emitHelpers().createRunInitializersHelper(renamedClassThis, classInfo2.staticExtraInitializersName); const runStaticInitializersStatement = factory2.createExpressionStatement(runStaticInitializersHelper); @@ -94212,32 +95192,35 @@ ${lanes.join("\n")} addRange(leadingBlockStatements, trailingBlockStatements); trailingBlockStatements = void 0; } - let newMembers = members; - if (leadingBlockStatements) { - const leadingStaticBlockBody = factory2.createBlock( - leadingBlockStatements, - /*multiLine*/ - true - ); - const leadingStaticBlock = factory2.createClassStaticBlockDeclaration(leadingStaticBlockBody); - if (shouldTransformPrivateStaticElementsInClass) { - setInternalEmitFlags(leadingStaticBlock, 32 /* TransformPrivateStaticElements */); - } - newMembers = [leadingStaticBlock, ...newMembers]; - } - if (syntheticConstructor) { - newMembers = [...newMembers, syntheticConstructor]; - } - if (trailingBlockStatements) { - const trailingStaticBlockBody = factory2.createBlock( - trailingBlockStatements, - /*multiLine*/ - true - ); - const trailingStaticBlock = factory2.createClassStaticBlockDeclaration(trailingStaticBlockBody); - newMembers = [...newMembers, trailingStaticBlock]; + const leadingStaticBlock = leadingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock( + leadingBlockStatements, + /*multiLine*/ + true + )); + if (leadingStaticBlock && shouldTransformPrivateStaticElementsInClass) { + setInternalEmitFlags(leadingStaticBlock, 32 /* TransformPrivateStaticElements */); } - if (newMembers !== members) { + const trailingStaticBlock = trailingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock( + trailingBlockStatements, + /*multiLine*/ + true + )); + if (leadingStaticBlock || syntheticConstructor || trailingStaticBlock) { + const newMembers = []; + const existingNamedEvaluationHelperBlockIndex = members.findIndex(isClassNamedEvaluationHelperBlock); + if (leadingStaticBlock) { + addRange(newMembers, members, 0, existingNamedEvaluationHelperBlockIndex + 1); + newMembers.push(leadingStaticBlock); + addRange(newMembers, members, existingNamedEvaluationHelperBlockIndex + 1); + } else { + addRange(newMembers, members); + } + if (syntheticConstructor) { + newMembers.push(syntheticConstructor); + } + if (trailingStaticBlock) { + newMembers.push(trailingStaticBlock); + } members = setTextRange(factory2.createNodeArray(newMembers), members); } const lexicalEnvironment = endLexicalEnvironment(); @@ -94253,6 +95236,9 @@ ${lanes.join("\n")} heritageClauses, members ); + if (classInfo2.classThis) { + classExpression = injectClassThisAssignmentIfMissing(factory2, classExpression, classInfo2.classThis); + } const classReferenceDeclaration = factory2.createVariableDeclaration( classReference, /*exclamationToken*/ @@ -94292,7 +95278,6 @@ ${lanes.join("\n")} } } setOriginalNode(classExpression, node); - getOrCreateEmitNode(classExpression).classThis = classInfo2.classThis; return factory2.createImmediatelyInvokedArrowFunction(factory2.mergeLexicalEnvironment(classDefinitionStatements, lexicalEnvironment)); } function isDecoratedClassLike(node) { @@ -94308,26 +95293,51 @@ ${lanes.join("\n")} } function visitClassDeclaration(node) { if (isDecoratedClassLike(node)) { - if (hasSyntacticModifier(node, 1 /* Export */) && hasSyntacticModifier(node, 1024 /* Default */)) { - const originalClass = getOriginalNode(node, isClassLike) ?? node; - const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); - const iife = transformClassLike(node, className); - const statement = factory2.createExportDefault(iife); - setOriginalNode(statement, node); - setCommentRange(statement, getCommentRange(node)); - setSourceMapRange(statement, moveRangePastDecorators(node)); - return statement; + const statements = []; + const originalClass = getOriginalNode(node, isClassLike) ?? node; + const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); + const isExport = hasSyntacticModifier(node, 1 /* Export */); + const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + if (!node.name) { + node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className); + } + if (isExport && isDefault) { + const iife = transformClassLike(node); + if (node.name) { + const varDecl = factory2.createVariableDeclaration( + factory2.getLocalName(node), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + iife + ); + setOriginalNode(varDecl, node); + const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); + const varStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + varDecls + ); + statements.push(varStatement); + const exportStatement = factory2.createExportDefault(factory2.getDeclarationName(node)); + setOriginalNode(exportStatement, node); + setCommentRange(exportStatement, getCommentRange(node)); + setSourceMapRange(exportStatement, moveRangePastDecorators(node)); + statements.push(exportStatement); + } else { + const exportStatement = factory2.createExportDefault(iife); + setOriginalNode(exportStatement, node); + setCommentRange(exportStatement, getCommentRange(node)); + setSourceMapRange(exportStatement, moveRangePastDecorators(node)); + statements.push(exportStatement); + } } else { Debug.assertIsDefined(node.name, "A class declaration that is not a default export must have a name."); - const iife = transformClassLike(node, factory2.createStringLiteralFromNode(node.name)); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const declName = languageVersion <= 2 /* ES2015 */ ? factory2.getInternalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ) : factory2.getLocalName( + const iife = transformClassLike(node); + const modifierVisitorNoExport = isExport ? (node2) => isExportModifier(node2) ? void 0 : modifierVisitor(node2) : modifierVisitor; + const modifiers = visitNodes2(node.modifiers, modifierVisitorNoExport, isModifier); + const declName = factory2.getLocalName( node, /*allowComments*/ false, @@ -94344,11 +95354,17 @@ ${lanes.join("\n")} ); setOriginalNode(varDecl, node); const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); - const statement = factory2.createVariableStatement(modifiers, varDecls); - setOriginalNode(statement, node); - setCommentRange(statement, getCommentRange(node)); - return statement; + const varStatement = factory2.createVariableStatement(modifiers, varDecls); + setOriginalNode(varStatement, node); + setCommentRange(varStatement, getCommentRange(node)); + statements.push(varStatement); + if (isExport) { + const exportStatement = factory2.createExternalModuleExport(declName); + setOriginalNode(exportStatement, node); + statements.push(exportStatement); + } } + return singleOrMany(statements); } else { const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); @@ -94369,10 +95385,9 @@ ${lanes.join("\n")} ); } } - function visitClassExpression(node, referencedName) { + function visitClassExpression(node) { if (isDecoratedClassLike(node)) { - const className = node.name ? factory2.createStringLiteralFromNode(node.name) : referencedName ?? factory2.createStringLiteral(""); - const iife = transformClassLike(node, className); + const iife = transformClassLike(node); setOriginalNode(iife, node); return iife; } else { @@ -94409,6 +95424,35 @@ ${lanes.join("\n")} return statements; } } + function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) { + const superStatementIndex = superPath[superPathDepth]; + const superStatement = statementsIn[superStatementIndex]; + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); + if (isTryStatement(superStatement)) { + const tryBlockStatements = []; + transformConstructorBodyWorker( + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + initializerStatements + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); + addRange(statementsOut, initializerStatements); + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } function visitConstructorDeclaration(node) { enterClassElement(node); const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); @@ -94425,11 +95469,9 @@ ${lanes.join("\n")} false, visitor ); - const superStatementIndex = findSuperStatementIndex(node.body.statements, nonPrologueStart); - if (superStatementIndex >= 0) { - addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, nonPrologueStart, superStatementIndex + 1 - nonPrologueStart)); - addRange(statements, initializerStatements); - addRange(statements, visitNodes2(node.body.statements, visitor, isStatement, superStatementIndex + 1)); + const superStatementIndices = findSuperStatementIndexPath(node.body.statements, nonPrologueStart); + if (superStatementIndices.length > 0) { + transformConstructorBodyWorker(statements, node.body.statements, nonPrologueStart, superStatementIndices, 0, initializerStatements); } else { addRange(statements, initializerStatements); addRange(statements, visitNodes2(node.body.statements, visitor, isStatement)); @@ -94454,7 +95496,7 @@ ${lanes.join("\n")} } return updated; } - function partialTransformClassElement(member, useNamedEvaluation, classInfo2, createDescriptor) { + function partialTransformClassElement(member, classInfo2, createDescriptor) { let referencedName; let name; let initializersName; @@ -94463,11 +95505,7 @@ ${lanes.join("\n")} if (!classInfo2) { const modifiers2 = visitNodes2(member.modifiers, modifierVisitor, isModifier); enterName(); - if (useNamedEvaluation) { - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - } else { - name = visitPropertyName(member.name); - } + name = visitPropertyName(member.name); exitName(); return { modifiers: modifiers2, referencedName, name, initializersName, descriptorName, thisArg }; } @@ -94516,9 +95554,10 @@ ${lanes.join("\n")} get: isPropertyDeclaration(member) || isGetAccessorDeclaration(member) || isMethodDeclaration(member), // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ... set: isPropertyDeclaration(member) || isSetAccessorDeclaration(member) - } + }, + metadata: classInfo2.metadataReference }; - const extraInitializers = isStatic(member) ? classInfo2.staticExtraInitializersName ?? (classInfo2.staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */)) : classInfo2.instanceExtraInitializersName ?? (classInfo2.instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */)); + const extraInitializers = isStatic(member) ? classInfo2.staticExtraInitializersName ?? (classInfo2.staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)) : classInfo2.instanceExtraInitializersName ?? (classInfo2.instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); if (isMethodOrAccessor(member)) { let descriptor; if (isPrivateIdentifierClassElementDeclaration(member) && createDescriptor) { @@ -94560,11 +95599,7 @@ ${lanes.join("\n")} } if (name === void 0) { enterName(); - if (useNamedEvaluation) { - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - } else { - name = visitPropertyName(member.name); - } + name = visitPropertyName(member.name); exitName(); } if (!some(modifiers) && (isMethodDeclaration(member) || isPropertyDeclaration(member))) { @@ -94574,13 +95609,7 @@ ${lanes.join("\n")} } function visitMethodDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createMethodDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createMethodDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createMethodDescriptorForwarder(modifiers, name, descriptorName), node); @@ -94606,13 +95635,7 @@ ${lanes.join("\n")} } function visitGetAccessorDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createGetAccessorDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createGetAccessorDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createGetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); @@ -94633,13 +95656,7 @@ ${lanes.join("\n")} } function visitSetAccessorDeclaration(node) { enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement( - node, - /*useNamedEvaluation*/ - false, - classInfo, - createSetAccessorDescriptorObject - ); + const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createSetAccessorDescriptorObject); if (descriptorName) { exitClassElement(); return finishClassElement(createSetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); @@ -94652,19 +95669,31 @@ ${lanes.join("\n")} } function visitClassStaticBlockDeclaration(node) { enterClassElement(node); - if (classInfo) - classInfo.hasStaticInitializers = true; - const result = visitEachChild(node, visitor, context); + let result; + if (isClassNamedEvaluationHelperBlock(node)) { + result = visitEachChild(node, visitor, context); + } else if (isClassThisAssignmentBlock(node)) { + const savedClassThis = classThis; + classThis = void 0; + result = visitEachChild(node, visitor, context); + classThis = savedClassThis; + } else { + if (classInfo) + classInfo.hasStaticInitializers = true; + result = visitEachChild(node, visitor, context); + } exitClassElement(); return result; } function visitPropertyDeclaration(node) { + if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); + } enterClassElement(node); Debug.assert(!isAmbientPropertyDeclaration(node), "Not yet implemented."); - const useNamedEvaluation = isNamedEvaluation(node, isAnonymousClassNeedingAssignedName); - const { modifiers, name, referencedName, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, useNamedEvaluation, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : void 0); + const { modifiers, name, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : void 0); startLexicalEnvironment(); - let initializer = referencedName ? visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression) : visitNode(node.initializer, visitor, isExpression); + let initializer = visitNode(node.initializer, visitor, isExpression); if (initializersName) { initializer = emitHelpers().createRunInitializersHelper( thisArg ?? factory2.createThis(), @@ -94794,38 +95823,21 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitParameterDeclaration(node) { - let updated; if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - updated = factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - initializer - ); - } else { - updated = factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - node.dotDotDotToken, - visitNode(node.name, visitor, isBindingName), - /*questionToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } + const updated = factory2.updateParameterDeclaration( + node, + /*modifiers*/ + void 0, + node.dotDotDotToken, + visitNode(node.name, visitor, isBindingName), + /*questionToken*/ + void 0, + /*type*/ + void 0, + visitNode(node.initializer, visitor, isExpression) + ); if (updated !== node) { setCommentRange(updated, node); setTextRange(updated, moveRangePastModifiers(node)); @@ -94837,6 +95849,14 @@ ${lanes.join("\n")} function isAnonymousClassNeedingAssignedName(node) { return isClassExpression(node) && !node.name && isDecoratedClassLike(node); } + function canIgnoreEmptyStringLiteralInAssignedName(node) { + const innerExpression = skipOuterExpressions(node); + return isClassExpression(innerExpression) && !innerExpression.name && !classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + innerExpression + ); + } function visitForStatement(node) { return factory2.updateForStatement( node, @@ -94857,10 +95877,8 @@ ${lanes.join("\n")} } if (isAssignmentExpression(node)) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - const left = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); + return visitEachChild(node, visitor, context); } if (isSuperProperty(node.left) && classThis && classSuper) { let setterName = isElementAccessExpression(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0; @@ -94980,43 +95998,19 @@ ${lanes.join("\n")} } function visitPropertyAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const { referencedName, name } = visitReferencedPropertyName(node.name); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updatePropertyAssignment(node, name, initializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } function visitVariableDeclaration(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateVariableDeclaration( - node, - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } function visitBindingElement(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.initializer); - const propertyName = visitNode(node.propertyName, visitor, isPropertyName); - const name = visitNode(node.name, visitor, isBindingName); - const initializer = visitNode(node.initializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateBindingElement( - node, - /*dotDotDotToken*/ - void 0, - propertyName, - name, - initializer - ); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); } return visitEachChild(node, visitor, context); } @@ -95053,14 +96047,11 @@ ${lanes.join("\n")} /*excludeCompoundAssignment*/ true )) { - const assignmentTarget = visitDestructuringAssignmentTarget(node.left); - let initializer; if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.left, node.right); - initializer = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - } else { - initializer = visitNode(node.right, visitor, isExpression); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); } + const assignmentTarget = visitDestructuringAssignmentTarget(node.left); + const initializer = visitNode(node.right, visitor, isExpression); return factory2.updateBinaryExpression(node, assignmentTarget, node.operatorToken, initializer); } else { return visitDestructuringAssignmentTarget(node); @@ -95099,10 +96090,7 @@ ${lanes.join("\n")} } function visitShorthandAssignmentProperty(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const assignedName = getAssignedNameOfIdentifier(node.name, node.objectAssignmentInitializer); - const name = visitNode(node.name, visitor, isIdentifier); - const objectAssignmentInitializer = visitNode(node.objectAssignmentInitializer, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression); - return factory2.updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.objectAssignmentInitializer)); } return visitEachChild(node, visitor, context); } @@ -95134,20 +96122,17 @@ ${lanes.join("\n")} } function visitExportAssignment(node) { if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - const referencedName = factory2.createStringLiteral(node.isExportEquals ? "" : "default"); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const expression = visitNode(node.expression, (node2) => namedEvaluationVisitor(node2, referencedName), isExpression); - return factory2.updateExportAssignment(node, modifiers, expression); + node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.expression)); } return visitEachChild(node, visitor, context); } - function visitParenthesizedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitParenthesizedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updateParenthesizedExpression(node, expression); } - function visitPartiallyEmittedExpression(node, discarded, referencedName) { - const visitorFunc = discarded ? discardedValueVisitor : referencedName ? (node2) => namedEvaluationVisitor(node2, referencedName) : visitor; + function visitPartiallyEmittedExpression(node, discarded) { + const visitorFunc = discarded ? discardedValueVisitor : visitor; const expression = visitNode(node.expression, visitorFunc, isExpression); return factory2.updatePartiallyEmittedExpression(node, expression); } @@ -95175,6 +96160,17 @@ ${lanes.join("\n")} function transformDecorator(decorator) { const expression = visitNode(decorator.expression, visitor, isExpression); setEmitFlags(expression, 3072 /* NoComments */); + const innerExpression = skipOuterExpressions(expression); + if (isAccessExpression(innerExpression)) { + const { target, thisArg } = factory2.createCallBinding( + expression, + hoistVariableDeclaration, + languageVersion, + /*cacheIdentifiers*/ + true + ); + return factory2.restoreOuterExpressions(expression, factory2.createFunctionBindCall(target, thisArg, [])); + } return expression; } function createDescriptorMethod(original, name, modifiers, asteriskToken, kind, parameters, body) { @@ -95360,9 +96356,59 @@ ${lanes.join("\n")} ]) ); } - function getAssignedNameOfIdentifier(name, initializer) { - const originalClass = getOriginalNode(initializer, isClassLike); - return originalClass && !originalClass.name && hasSyntacticModifier(originalClass, 1024 /* Default */) ? factory2.createStringLiteral("default") : factory2.createStringLiteralFromNode(name); + function createMetadata(name, classSuper2) { + const varDecl = factory2.createVariableDeclaration( + name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + factory2.createConditionalExpression( + factory2.createLogicalAnd( + factory2.createTypeCheck(factory2.createIdentifier("Symbol"), "function"), + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata") + ), + factory2.createToken(58 /* QuestionToken */), + factory2.createCallExpression( + factory2.createPropertyAccessExpression(factory2.createIdentifier("Object"), "create"), + /*typeArguments*/ + void 0, + [classSuper2 ? createSymbolMetadataReference(classSuper2) : factory2.createNull()] + ), + factory2.createToken(59 /* ColonToken */), + factory2.createVoidZero() + ) + ); + return factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([varDecl], 2 /* Const */) + ); + } + function createSymbolMetadata(target, value) { + const defineProperty = factory2.createObjectDefinePropertyCall( + target, + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata"), + factory2.createPropertyDescriptor( + { configurable: true, writable: true, enumerable: true, value }, + /*singleLine*/ + true + ) + ); + return setEmitFlags( + factory2.createIfStatement(value, factory2.createExpressionStatement(defineProperty)), + 1 /* SingleLine */ + ); + } + function createSymbolMetadataReference(classSuper2) { + return factory2.createBinaryExpression( + factory2.createElementAccessExpression( + classSuper2, + factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata") + ), + 61 /* QuestionQuestionToken */, + factory2.createNull() + ); } } var init_esDecorators = __esm({ @@ -95446,34 +96492,34 @@ ${lanes.join("\n")} switch (node.kind) { case 134 /* AsyncKeyword */: return void 0; - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return visitAwaitExpression(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 175 /* Constructor */: + case 176 /* Constructor */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); default: return visitEachChild(node, visitor, context); @@ -95482,27 +96528,27 @@ ${lanes.join("\n")} function asyncBodyVisitor(node) { if (isNodeWithPossibleHoistedDeclaration(node)) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatementInAsyncBody(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatementInAsyncBody(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatementInAsyncBody(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatementInAsyncBody(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClauseInAsyncBody(node); - case 240 /* Block */: - case 254 /* SwitchStatement */: - case 268 /* CaseBlock */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: - case 257 /* TryStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 244 /* IfStatement */: - case 253 /* WithStatement */: - case 255 /* LabeledStatement */: + case 241 /* Block */: + case 255 /* SwitchStatement */: + case 269 /* CaseBlock */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: + case 258 /* TryStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 245 /* IfStatement */: + case 254 /* WithStatement */: + case 256 /* LabeledStatement */: return visitEachChild(node, asyncBodyVisitor, context); default: return Debug.assertNever(node, "Unhandled node."); @@ -95695,7 +96741,7 @@ ${lanes.join("\n")} } } function isVariableDeclarationListWithCollidingName(node) { - return !!node && isVariableDeclarationList(node) && !(node.flags & 3 /* BlockScoped */) && node.declarations.some(collidesWithParameterName); + return !!node && isVariableDeclarationList(node) && !(node.flags & 7 /* BlockScoped */) && node.declarations.some(collidesWithParameterName); } function visitVariableDeclarationListWithCollidingNames(node, hasReceiver) { hoistVariableDeclarationList(node); @@ -95779,7 +96825,7 @@ ${lanes.join("\n")} const original = getOriginalNode(node, isFunctionLike); const nodeType = original.type; const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 218 /* ArrowFunction */; + const isArrowFunction2 = node.kind === 219 /* ArrowFunction */; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0; const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; enclosingFunctionParameterNames = /* @__PURE__ */ new Set(); @@ -95878,15 +96924,15 @@ ${lanes.join("\n")} function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); - context.enableEmitNotification(262 /* ClassDeclaration */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(242 /* VariableStatement */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableEmitNotification(263 /* ClassDeclaration */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(243 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -95917,11 +96963,11 @@ ${lanes.join("\n")} } function substituteExpression(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -95965,7 +97011,7 @@ ${lanes.join("\n")} } function isSuperContainer(node) { const kind = node.kind; - return kind === 262 /* ClassDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -96211,119 +97257,119 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return visitAwaitExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 248 /* ForInStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 249 /* ForInStatement */: return doWithHierarchyFacts( visitDefault, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return doWithHierarchyFacts( visitForStatement, node, 0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */ ); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return visitVoidExpression(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return doWithHierarchyFacts( visitConstructorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return doWithHierarchyFacts( visitMethodDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return doWithHierarchyFacts( visitGetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return doWithHierarchyFacts( visitSetAccessorDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return doWithHierarchyFacts( visitFunctionDeclaration, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return doWithHierarchyFacts( visitFunctionExpression, node, 2 /* ClassOrFunctionExcludes */, 1 /* ClassOrFunctionIncludes */ ); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return doWithHierarchyFacts( visitArrowFunction, node, 2 /* ArrowFunctionExcludes */, 0 /* ArrowFunctionIncludes */ ); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { hasSuperElementAccess = true; } return visitEachChild(node, visitor, context); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return doWithHierarchyFacts( visitDefault, node, @@ -96408,7 +97454,7 @@ ${lanes.join("\n")} function visitLabeledStatement(node) { if (enclosingFunctionFlags & 2 /* Async */) { const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 249 /* ForOfStatement */ && statement.awaitModifier) { + if (statement.kind === 250 /* ForOfStatement */ && statement.awaitModifier) { return visitForOfStatement(statement, node); } return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); @@ -96419,7 +97465,7 @@ ${lanes.join("\n")} let chunkObject; const objects = []; for (const e of elements) { - if (e.kind === 304 /* SpreadAssignment */) { + if (e.kind === 305 /* SpreadAssignment */) { if (chunkObject) { objects.push(factory2.createObjectLiteralExpression(chunkObject)); chunkObject = void 0; @@ -96427,7 +97473,7 @@ ${lanes.join("\n")} const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 302 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append(chunkObject, e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); } } if (chunkObject) { @@ -96438,7 +97484,7 @@ ${lanes.join("\n")} function visitObjectLiteralExpression(node) { if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 209 /* ObjectLiteralExpression */) { + if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) { objects.unshift(factory2.createObjectLiteralExpression()); } let expression = objects[0]; @@ -97207,15 +98253,15 @@ ${lanes.join("\n")} function enableSubstitutionForAsyncMethodsWithSuper() { if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(211 /* ElementAccessExpression */); - context.enableEmitNotification(262 /* ClassDeclaration */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(242 /* VariableStatement */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(212 /* ElementAccessExpression */); + context.enableEmitNotification(263 /* ClassDeclaration */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(243 /* VariableStatement */); } } function onEmitNode(hint, node, emitCallback) { @@ -97246,11 +98292,11 @@ ${lanes.join("\n")} } function substituteExpression(node) { switch (node.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return substitutePropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return substituteElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); } return node; @@ -97294,7 +98340,7 @@ ${lanes.join("\n")} } function isSuperContainer(node) { const kind = node.kind; - return kind === 262 /* ClassDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function createSuperElementAccessInAsyncMethod(argumentExpression, location) { if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { @@ -97345,7 +98391,7 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); default: return visitEachChild(node, visitor, context); @@ -97390,7 +98436,7 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 212 /* CallExpression */: { + case 213 /* CallExpression */: { const updated = visitNonOptionalCallExpression( node, /*captureThisArg*/ @@ -97399,8 +98445,8 @@ ${lanes.join("\n")} Debug.assertNotNode(updated, isSyntheticReference); return updated; } - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (isOptionalChain(node)) { const updated = visitOptionalExpression( node, @@ -97413,12 +98459,12 @@ ${lanes.join("\n")} return updated; } return visitEachChild(node, visitor, context); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (node.operatorToken.kind === 61 /* QuestionQuestionToken */) { return transformNullishCoalescingExpression(node); } return visitEachChild(node, visitor, context); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return visitDeleteExpression(node); default: return visitEachChild(node, visitor, context); @@ -97456,7 +98502,7 @@ ${lanes.join("\n")} thisArg = expression; } } - expression = node.kind === 210 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -97492,12 +98538,12 @@ ${lanes.join("\n")} } function visitNonOptionalExpression(node, captureThisArg, isDelete) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitNonOptionalCallExpression(node, captureThisArg); default: return visitNode(node, visitor, isExpression); @@ -97523,8 +98569,8 @@ ${lanes.join("\n")} for (let i = 0; i < chain.length; i++) { const segment = chain[i]; switch (segment.kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: if (i === chain.length - 1 && captureThisArg) { if (!isSimpleCopiableExpression(rightExpression)) { thisArg = factory2.createTempVariable(hoistVariableDeclaration); @@ -97533,9 +98579,9 @@ ${lanes.join("\n")} thisArg = rightExpression; } } - rightExpression = segment.kind === 210 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (i === 0 && leftThisArg) { if (!isGeneratedIdentifier(leftThisArg)) { leftThisArg = factory2.cloneNode(leftThisArg); @@ -97718,22 +98764,636 @@ ${lanes.join("\n")} // src/compiler/transformers/esnext.ts function transformESNext(context) { + const { + factory: factory2, + getEmitHelperFactory: emitHelpers, + hoistVariableDeclaration, + startLexicalEnvironment, + endLexicalEnvironment + } = context; + let exportBindings; + let exportVars; + let defaultExportBinding; + let exportEqualsBinding; return chainBundle(context, transformSourceFile); function transformSourceFile(node) { if (node.isDeclarationFile) { return node; } - return visitEachChild(node, visitor, context); + const visited = visitNode(node, visitor, isSourceFile); + addEmitHelpers(visited, context.readEmitHelpers()); + exportVars = void 0; + exportBindings = void 0; + defaultExportBinding = void 0; + return visited; } function visitor(node) { if ((node.transformFlags & 4 /* ContainsESNext */) === 0) { return node; } switch (node.kind) { + case 312 /* SourceFile */: + return visitSourceFile(node); + case 241 /* Block */: + return visitBlock(node); + case 248 /* ForStatement */: + return visitForStatement(node); + case 250 /* ForOfStatement */: + return visitForOfStatement(node); + case 255 /* SwitchStatement */: + return visitSwitchStatement(node); default: return visitEachChild(node, visitor, context); } } + function visitSourceFile(node) { + const usingKind = getUsingKindOfStatements(node.statements); + if (usingKind) { + startLexicalEnvironment(); + exportBindings = new IdentifierNameMap(); + exportVars = []; + const prologueCount = countPrologueStatements(node.statements); + const topLevelStatements = []; + addRange(topLevelStatements, visitArray(node.statements, visitor, isStatement, 0, prologueCount)); + let pos = prologueCount; + while (pos < node.statements.length) { + const statement = node.statements[pos]; + if (getUsingKind(statement) !== 0 /* None */) { + if (pos > prologueCount) { + addRange(topLevelStatements, visitNodes2(node.statements, visitor, isStatement, prologueCount, pos - prologueCount)); + } + break; + } + pos++; + } + Debug.assert(pos < node.statements.length, "Should have encountered at least one 'using' statement."); + const envBinding = createEnvBinding(); + const bodyStatements = transformUsingDeclarations(node.statements, pos, node.statements.length, envBinding, topLevelStatements); + if (exportBindings.size) { + append(topLevelStatements, factory2.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory2.createNamedExports(arrayFrom(exportBindings.values())) + )); + } + addRange(topLevelStatements, endLexicalEnvironment()); + if (exportVars.length) { + topLevelStatements.push(factory2.createVariableStatement( + factory2.createModifiersFromModifierFlags(1 /* Export */), + factory2.createVariableDeclarationList( + exportVars, + 1 /* Let */ + ) + )); + } + addRange(topLevelStatements, createDownlevelUsingStatements(bodyStatements, envBinding, usingKind === 2 /* Async */)); + if (exportEqualsBinding) { + topLevelStatements.push(factory2.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + true, + exportEqualsBinding + )); + } + return factory2.updateSourceFile(node, topLevelStatements); + } + return visitEachChild(node, visitor, context); + } + function visitBlock(node) { + const usingKind = getUsingKindOfStatements(node.statements); + if (usingKind) { + const prologueCount = countPrologueStatements(node.statements); + const envBinding = createEnvBinding(); + return factory2.updateBlock( + node, + [ + ...visitArray(node.statements, visitor, isStatement, 0, prologueCount), + ...createDownlevelUsingStatements( + transformUsingDeclarations( + node.statements, + prologueCount, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ), + envBinding, + usingKind === 2 /* Async */ + ) + ] + ); + } + return visitEachChild(node, visitor, context); + } + function visitForStatement(node) { + if (node.initializer && isUsingVariableDeclarationList(node.initializer)) { + return visitNode( + factory2.createBlock([ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + node.initializer + ), + factory2.updateForStatement( + node, + /*initializer*/ + void 0, + node.condition, + node.incrementor, + node.statement + ) + ]), + visitor, + isStatement + ); + } + return visitEachChild(node, visitor, context); + } + function visitForOfStatement(node) { + if (isUsingVariableDeclarationList(node.initializer)) { + const forInitializer = node.initializer; + Debug.assertNode(forInitializer, isUsingVariableDeclarationList); + Debug.assert(forInitializer.declarations.length === 1, "ForInitializer may only have one declaration"); + const forDecl = forInitializer.declarations[0]; + Debug.assert(!forDecl.initializer, "ForInitializer may not have an initializer"); + const isAwaitUsing = getUsingKindOfVariableDeclarationList(forInitializer) === 2 /* Async */; + const temp = factory2.getGeneratedNameForNode(forDecl.name); + const usingVar = factory2.updateVariableDeclaration( + forDecl, + forDecl.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + temp + ); + const usingVarList = factory2.createVariableDeclarationList([usingVar], isAwaitUsing ? 6 /* AwaitUsing */ : 4 /* Using */); + const usingVarStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + usingVarList + ); + return visitNode( + factory2.updateForOfStatement( + node, + node.awaitModifier, + factory2.createVariableDeclarationList([ + factory2.createVariableDeclaration(temp) + ], 2 /* Const */), + node.expression, + isBlock(node.statement) ? factory2.updateBlock(node.statement, [ + usingVarStatement, + ...node.statement.statements + ]) : factory2.createBlock( + [ + usingVarStatement, + node.statement + ], + /*multiLine*/ + true + ) + ), + visitor, + isStatement + ); + } + return visitEachChild(node, visitor, context); + } + function visitCaseOrDefaultClause(node, envBinding) { + if (getUsingKindOfStatements(node.statements) !== 0 /* None */) { + if (isCaseClause(node)) { + return factory2.updateCaseClause( + node, + visitNode(node.expression, visitor, isExpression), + transformUsingDeclarations( + node.statements, + /*start*/ + 0, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ) + ); + } else { + return factory2.updateDefaultClause( + node, + transformUsingDeclarations( + node.statements, + /*start*/ + 0, + node.statements.length, + envBinding, + /*topLevelStatements*/ + void 0 + ) + ); + } + } + return visitEachChild(node, visitor, context); + } + function visitSwitchStatement(node) { + const usingKind = getUsingKindOfCaseOrDefaultClauses(node.caseBlock.clauses); + if (usingKind) { + const envBinding = createEnvBinding(); + return createDownlevelUsingStatements( + [ + factory2.updateSwitchStatement( + node, + visitNode(node.expression, visitor, isExpression), + factory2.updateCaseBlock( + node.caseBlock, + node.caseBlock.clauses.map((clause) => visitCaseOrDefaultClause(clause, envBinding)) + ) + ) + ], + envBinding, + usingKind === 2 /* Async */ + ); + } + return visitEachChild(node, visitor, context); + } + function transformUsingDeclarations(statementsIn, start, end, envBinding, topLevelStatements) { + const statements = []; + for (let i = start; i < end; i++) { + const statement = statementsIn[i]; + const usingKind = getUsingKind(statement); + if (usingKind) { + Debug.assertNode(statement, isVariableStatement); + const declarations = []; + for (let declaration of statement.declarationList.declarations) { + if (!isIdentifier(declaration.name)) { + declarations.length = 0; + break; + } + if (isNamedEvaluation(declaration)) { + declaration = transformNamedEvaluation(context, declaration); + } + const initializer = visitNode(declaration.initializer, visitor, isExpression) ?? factory2.createVoidZero(); + declarations.push(factory2.updateVariableDeclaration( + declaration, + declaration.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + emitHelpers().createAddDisposableResourceHelper( + envBinding, + initializer, + usingKind === 2 /* Async */ + ) + )); + } + if (declarations.length) { + const varList = factory2.createVariableDeclarationList(declarations, 2 /* Const */); + setOriginalNode(varList, statement.declarationList); + setTextRange(varList, statement.declarationList); + hoistOrAppendNode(factory2.updateVariableStatement( + statement, + /*modifiers*/ + void 0, + varList + )); + continue; + } + } + const result = visitor(statement); + if (isArray(result)) { + result.forEach(hoistOrAppendNode); + } else if (result) { + hoistOrAppendNode(result); + } + } + return statements; + function hoistOrAppendNode(node) { + Debug.assertNode(node, isStatement); + append(statements, hoist(node)); + } + function hoist(node) { + if (!topLevelStatements) + return node; + switch (node.kind) { + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 262 /* FunctionDeclaration */: + return hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements); + case 277 /* ExportAssignment */: + return hoistExportAssignment(node); + case 263 /* ClassDeclaration */: + return hoistClassDeclaration(node); + case 243 /* VariableStatement */: + return hoistVariableStatement(node); + } + return node; + } + } + function hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements) { + topLevelStatements.push(node); + return void 0; + } + function hoistExportAssignment(node) { + return node.isExportEquals ? hoistExportEquals(node) : hoistExportDefault(node); + } + function hoistExportDefault(node) { + if (defaultExportBinding) { + return node; + } + defaultExportBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistBindingIdentifier( + defaultExportBinding, + /*isExport*/ + true, + "default", + node + ); + let expression = node.expression; + let innerExpression = skipOuterExpressions(expression); + if (isNamedEvaluation(innerExpression)) { + innerExpression = transformNamedEvaluation( + context, + innerExpression, + /*ignoreEmptyStringLiteral*/ + false, + "default" + ); + expression = factory2.restoreOuterExpressions(expression, innerExpression); + } + const assignment = factory2.createAssignment(defaultExportBinding, expression); + return factory2.createExpressionStatement(assignment); + } + function hoistExportEquals(node) { + if (exportEqualsBinding) { + return node; + } + exportEqualsBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistVariableDeclaration(exportEqualsBinding); + const assignment = factory2.createAssignment(exportEqualsBinding, node.expression); + return factory2.createExpressionStatement(assignment); + } + function hoistClassDeclaration(node) { + if (!node.name && defaultExportBinding) { + return node; + } + const isExported2 = hasSyntacticModifier(node, 1 /* Export */); + const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + let expression = factory2.converters.convertToClassExpression(node); + if (node.name) { + hoistBindingIdentifier( + factory2.getLocalName(node), + isExported2 && !isDefault, + /*exportAlias*/ + void 0, + node + ); + expression = factory2.createAssignment(factory2.getDeclarationName(node), expression); + if (isNamedEvaluation(expression)) { + expression = transformNamedEvaluation( + context, + expression, + /*ignoreEmptyStringLiteral*/ + false + ); + } + setOriginalNode(expression, node); + setSourceMapRange(expression, node); + setCommentRange(expression, node); + } + if (isDefault && !defaultExportBinding) { + defaultExportBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); + hoistBindingIdentifier( + defaultExportBinding, + /*isExport*/ + true, + "default", + node + ); + expression = factory2.createAssignment(defaultExportBinding, expression); + if (isNamedEvaluation(expression)) { + expression = transformNamedEvaluation( + context, + expression, + /*ignoreEmptyStringLiteral*/ + false, + "default" + ); + } + setOriginalNode(expression, node); + } + return factory2.createExpressionStatement(expression); + } + function hoistVariableStatement(node) { + let expressions; + const isExported2 = hasSyntacticModifier(node, 1 /* Export */); + for (const variable of node.declarationList.declarations) { + hoistBindingElement(variable, isExported2, variable); + if (variable.initializer) { + expressions = append(expressions, hoistInitializedVariable(variable)); + } + } + if (expressions) { + const statement = factory2.createExpressionStatement(factory2.inlineExpressions(expressions)); + setOriginalNode(statement, node); + setCommentRange(statement, node); + setSourceMapRange(statement, node); + return statement; + } + return void 0; + } + function hoistInitializedVariable(node) { + Debug.assertIsDefined(node.initializer); + let target; + if (isIdentifier(node.name)) { + target = factory2.cloneNode(node.name); + setEmitFlags(target, getEmitFlags(target) & ~(32768 /* LocalName */ | 16384 /* ExportName */ | 65536 /* InternalName */)); + } else { + target = factory2.converters.convertToAssignmentPattern(node.name); + } + const assignment = factory2.createAssignment(target, node.initializer); + setOriginalNode(assignment, node); + setCommentRange(assignment, node); + setSourceMapRange(assignment, node); + return assignment; + } + function hoistBindingElement(node, isExportedDeclaration, original) { + if (isBindingPattern(node.name)) { + for (const element of node.name.elements) { + if (!isOmittedExpression(element)) { + hoistBindingElement(element, isExportedDeclaration, original); + } + } + } else { + hoistBindingIdentifier( + node.name, + isExportedDeclaration, + /*exportAlias*/ + void 0, + original + ); + } + } + function hoistBindingIdentifier(node, isExport, exportAlias, original) { + const name = isGeneratedIdentifier(node) ? node : factory2.cloneNode(node); + if (isExport) { + if (exportAlias === void 0 && !isLocalName(name)) { + const varDecl = factory2.createVariableDeclaration(name); + if (original) { + setOriginalNode(varDecl, original); + } + exportVars.push(varDecl); + return; + } + const localName = exportAlias !== void 0 ? name : void 0; + const exportName = exportAlias !== void 0 ? exportAlias : name; + const specifier = factory2.createExportSpecifier( + /*isTypeOnly*/ + false, + localName, + exportName + ); + if (original) { + setOriginalNode(specifier, original); + } + exportBindings.set(name, specifier); + } + hoistVariableDeclaration(name); + } + function createEnvBinding() { + return factory2.createUniqueName("env"); + } + function createDownlevelUsingStatements(bodyStatements, envBinding, async) { + const statements = []; + const envObject = factory2.createObjectLiteralExpression([ + factory2.createPropertyAssignment("stack", factory2.createArrayLiteralExpression()), + factory2.createPropertyAssignment("error", factory2.createVoidZero()), + factory2.createPropertyAssignment("hasError", factory2.createFalse()) + ]); + const envVar = factory2.createVariableDeclaration( + envBinding, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + envObject + ); + const envVarList = factory2.createVariableDeclarationList([envVar], 2 /* Const */); + const envVarStatement = factory2.createVariableStatement( + /*modifiers*/ + void 0, + envVarList + ); + statements.push(envVarStatement); + const tryBlock = factory2.createBlock( + bodyStatements, + /*multiLine*/ + true + ); + const bodyCatchBinding = factory2.createUniqueName("e"); + const catchClause = factory2.createCatchClause( + bodyCatchBinding, + factory2.createBlock( + [ + factory2.createExpressionStatement( + factory2.createAssignment( + factory2.createPropertyAccessExpression(envBinding, "error"), + bodyCatchBinding + ) + ), + factory2.createExpressionStatement( + factory2.createAssignment( + factory2.createPropertyAccessExpression(envBinding, "hasError"), + factory2.createTrue() + ) + ) + ], + /*multiLine*/ + true + ) + ); + let finallyBlock; + if (async) { + const result = factory2.createUniqueName("result"); + finallyBlock = factory2.createBlock( + [ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList([ + factory2.createVariableDeclaration( + result, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + emitHelpers().createDisposeResourcesHelper(envBinding) + ) + ], 2 /* Const */) + ), + factory2.createIfStatement(result, factory2.createExpressionStatement(factory2.createAwaitExpression(result))) + ], + /*multiLine*/ + true + ); + } else { + finallyBlock = factory2.createBlock( + [ + factory2.createExpressionStatement( + emitHelpers().createDisposeResourcesHelper(envBinding) + ) + ], + /*multiLine*/ + true + ); + } + const tryStatement = factory2.createTryStatement(tryBlock, catchClause, finallyBlock); + statements.push(tryStatement); + return statements; + } + } + function countPrologueStatements(statements) { + for (let i = 0; i < statements.length; i++) { + if (!isPrologueDirective(statements[i]) && !isCustomPrologue(statements[i])) { + return i; + } + } + return 0; + } + function isUsingVariableDeclarationList(node) { + return isVariableDeclarationList(node) && getUsingKindOfVariableDeclarationList(node) !== 0 /* None */; + } + function getUsingKindOfVariableDeclarationList(node) { + return (node.flags & 7 /* BlockScoped */) === 6 /* AwaitUsing */ ? 2 /* Async */ : (node.flags & 7 /* BlockScoped */) === 4 /* Using */ ? 1 /* Sync */ : 0 /* None */; + } + function getUsingKindOfVariableStatement(node) { + return getUsingKindOfVariableDeclarationList(node.declarationList); + } + function getUsingKind(statement) { + return isVariableStatement(statement) ? getUsingKindOfVariableStatement(statement) : 0 /* None */; + } + function getUsingKindOfStatements(statements) { + let result = 0 /* None */; + for (const statement of statements) { + const usingKind = getUsingKind(statement); + if (usingKind === 2 /* Async */) + return 2 /* Async */; + if (usingKind > result) + result = usingKind; + } + return result; + } + function getUsingKindOfCaseOrDefaultClauses(clauses) { + let result = 0 /* None */; + for (const clause of clauses) { + const usingKind = getUsingKindOfStatements(clause.statements); + if (usingKind === 2 /* Async */) + return 2 /* Async */; + if (usingKind > result) + result = usingKind; + } + return result; } var init_esnext = __esm({ "src/compiler/transformers/esnext.ts"() { @@ -97893,25 +99553,25 @@ ${lanes.join("\n")} } function visitorWorker(node) { switch (node.kind) { - case 283 /* JsxElement */: + case 284 /* JsxElement */: return visitJsxElement( node, /*isChild*/ false ); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ false ); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ false ); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return visitJsxExpression(node); default: return visitEachChild(node, visitor, context); @@ -97921,21 +99581,21 @@ ${lanes.join("\n")} switch (node.kind) { case 12 /* JsxText */: return visitJsxText(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return visitJsxExpression(node); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return visitJsxElement( node, /*isChild*/ true ); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return visitJsxSelfClosingElement( node, /*isChild*/ true ); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return visitJsxFragment( node, /*isChild*/ @@ -98143,10 +99803,10 @@ ${lanes.join("\n")} for (const prop of attr.expression.properties) { if (isSpreadAssignment(prop)) { finishObjectLiteralIfNeeded(); - expressions.push(prop.expression); + expressions.push(Debug.checkDefined(visitNode(prop.expression, visitor, isExpression))); continue; } - properties.push(prop); + properties.push(Debug.checkDefined(visitNode(prop, visitor))); } continue; } @@ -98185,7 +99845,7 @@ ${lanes.join("\n")} const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); return setTextRange(literal, node); } - if (node.kind === 293 /* JsxExpression */) { + if (node.kind === 294 /* JsxExpression */) { if (node.expression === void 0) { return factory2.createTrue(); } @@ -98259,7 +99919,7 @@ ${lanes.join("\n")} return decoded === text ? void 0 : decoded; } function getTagName(node) { - if (node.kind === 283 /* JsxElement */) { + if (node.kind === 284 /* JsxElement */) { return getTagName(node.openingElement); } else { const tagName = node.tagName; @@ -98566,7 +100226,7 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node); default: return visitEachChild(node, visitor, context); @@ -98700,7 +100360,7 @@ ${lanes.join("\n")} hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 252 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -98767,85 +100427,85 @@ ${lanes.join("\n")} switch (node.kind) { case 126 /* StaticKeyword */: return void 0; - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return visitClassExpression(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return visitParameter(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return visitArrowFunction(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return visitVariableDeclaration(node); case 80 /* Identifier */: return visitIdentifier(node); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return visitVariableDeclarationList(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock( node, /*isFunctionBody*/ false ); - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: return visitBreakOrContinueStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return visitDoOrWhileStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement( node, /*outermostLabeledStatement*/ void 0 ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return visitShorthandPropertyAssignment(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return visitComputedPropertyName(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node, expressionResultIsUnused2); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node, expressionResultIsUnused2); case 15 /* NoSubstitutionTemplateLiteral */: case 16 /* TemplateHead */: @@ -98856,13 +100516,13 @@ ${lanes.join("\n")} return visitStringLiteral(node); case 9 /* NumericLiteral */: return visitNumericLiteral(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return visitTaggedTemplateExpression(node); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return visitTemplateExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return visitSpreadElement(node); case 108 /* SuperKeyword */: return visitSuperKeyword( @@ -98871,18 +100531,18 @@ ${lanes.join("\n")} ); case 110 /* ThisKeyword */: return visitThisKeyword(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return visitMetaProperty(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return visitMethodDeclaration(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return visitAccessorDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return visitVoidExpression(node); default: return visitEachChild(node, visitor, context); @@ -98980,7 +100640,7 @@ ${lanes.join("\n")} return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments")); } } - if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) { + if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { return setOriginalNode(setTextRange( factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), node @@ -98990,13 +100650,13 @@ ${lanes.join("\n")} } function visitBreakOrContinueStatement(node) { if (convertedLoopState) { - const jump = node.kind === 251 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + const jump = node.kind === 252 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump; if (!canUseBreakOrContinue) { let labelMarker; const label = node.label; if (!label) { - if (node.kind === 251 /* BreakStatement */) { + if (node.kind === 252 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; labelMarker = "break"; } else { @@ -99004,7 +100664,7 @@ ${lanes.join("\n")} labelMarker = "continue"; } } else { - if (node.kind === 251 /* BreakStatement */) { + if (node.kind === 252 /* BreakStatement */) { labelMarker = `break-${label.escapedText}`; setLabeledJump( convertedLoopState, @@ -99210,6 +100870,104 @@ ${lanes.join("\n")} setEmitFlags(block, 3072 /* NoComments */); return block; } + function transformConstructorBodyWorker(prologueOut, statementsOut, statementsIn, statementOffset, superPath, superPathDepth, constructor, isDerivedClass, hasSynthesizedSuper, isFirstStatement) { + let mayReplaceThis = false; + const superStatementIndex = superPathDepth < superPath.length ? superPath[superPathDepth] : -1; + const leadingStatementsEnd = superStatementIndex >= 0 ? superStatementIndex : statementsIn.length; + if (isFirstStatement && superStatementIndex >= 0) { + let firstMaterialIndex = statementOffset; + while (isFirstStatement && firstMaterialIndex < superStatementIndex) { + const statement = constructor.body.statements[firstMaterialIndex]; + if (!isUninitializedVariableStatement(statement) && !isUsingDeclarationStateVariableStatement(statement)) + break; + firstMaterialIndex++; + } + isFirstStatement = superStatementIndex === firstMaterialIndex; + } + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, leadingStatementsEnd - statementOffset)); + const superStatement = superStatementIndex >= 0 ? statementsIn[superStatementIndex] : void 0; + if (superStatement && isTryStatement(superStatement)) { + const tryBlockStatements = []; + mayReplaceThis = transformConstructorBodyWorker( + prologueOut, + tryBlockStatements, + superStatement.tryBlock.statements, + /*statementOffset*/ + 0, + superPath, + superPathDepth + 1, + constructor, + isDerivedClass, + hasSynthesizedSuper, + isFirstStatement + ); + const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); + setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); + statementsOut.push(factory2.updateTryStatement( + superStatement, + factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), + visitNode(superStatement.catchClause, visitor, isCatchClause), + visitNode(superStatement.finallyBlock, visitor, isBlock) + )); + } else { + const superCall = superStatement && getSuperCallFromStatement(superStatement); + let superCallExpression; + if (hasSynthesizedSuper) { + superCallExpression = createDefaultSuperCallOrThis(); + hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + } else if (superCall) { + superCallExpression = visitSuperCallInBody(superCall); + hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + } + if (isDerivedClass || superCallExpression) { + if (superCallExpression && superStatementIndex === statementsIn.length - 1 && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { + const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); + const returnStatement = factory2.createReturnStatement(superCallExpression); + setCommentRange(returnStatement, getCommentRange(superCall2)); + setEmitFlags(superCall2, 3072 /* NoComments */); + statementsOut.push(returnStatement); + return false; + } else { + if (isFirstStatement) { + insertCaptureThisForNode(statementsOut, constructor, superCallExpression || createActualThis()); + } else { + insertCaptureThisForNode(prologueOut, constructor, createActualThis()); + if (superCallExpression) { + addSuperThisCaptureThisForNode(statementsOut, superCallExpression); + } + } + mayReplaceThis = true; + } + } else { + insertCaptureThisForNodeIfNeeded(prologueOut, constructor); + } + } + if (superStatementIndex >= 0) { + addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); + } + return mayReplaceThis; + } + function isUninitializedVariableStatement(node) { + return isVariableStatement(node) && every(node.declarationList.declarations, (decl) => isIdentifier(decl.name) && !decl.initializer); + } + function isUsingDeclarationStateVariableStatement(node) { + if (!isVariableStatement(node) || node.declarationList.declarations.length !== 1) + return false; + const varDecl = node.declarationList.declarations[0]; + if (!isIdentifier(varDecl.name) || !varDecl.initializer) + return false; + const initializer = varDecl.initializer; + if (!isObjectLiteralExpression(initializer) || initializer.properties.length !== 3) + return false; + const [stackProp, errorProp, hasErrorProp] = initializer.properties; + if (!isPropertyAssignment(stackProp) || !isIdentifier(stackProp.name) || idText(stackProp.name) !== "stack" || !isArrayLiteralExpression(stackProp.initializer)) + return false; + if (!isPropertyAssignment(errorProp) || !isIdentifier(errorProp.name) || idText(errorProp.name) !== "error" || !isVoidExpression(errorProp.initializer) || !isNumericLiteral(errorProp.initializer.expression)) + return false; + if (!isPropertyAssignment(hasErrorProp) || !isIdentifier(hasErrorProp.name) || idText(hasErrorProp.name) !== "hasError" || hasErrorProp.initializer.kind !== 97 /* FalseKeyword */) + return false; + return true; + } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */; if (!constructor) @@ -99217,82 +100975,43 @@ ${lanes.join("\n")} const prologue = []; const statements = []; resumeLexicalEnvironment(); - const existingPrologue = takeWhile(constructor.body.statements, isPrologueDirective); - const { superCall, superStatementIndex } = findSuperCallAndStatementIndex(constructor.body.statements, existingPrologue); - const postSuperStatementsStart = superStatementIndex === -1 ? existingPrologue.length : superStatementIndex + 1; - let statementOffset = postSuperStatementsStart; - if (!hasSynthesizedSuper) - statementOffset = factory2.copyStandardPrologue( - constructor.body.statements, - prologue, - statementOffset, - /*ensureUseStrict*/ - false - ); - if (!hasSynthesizedSuper) - statementOffset = factory2.copyCustomPrologue( - constructor.body.statements, - statements, - statementOffset, - visitor, - /*filter*/ - void 0 - ); - let superCallExpression; - if (hasSynthesizedSuper) { - superCallExpression = createDefaultSuperCallOrThis(); - } else if (superCall) { - superCallExpression = visitSuperCallInBody(superCall); - } - if (superCallExpression) { + const standardPrologueEnd = factory2.copyStandardPrologue( + constructor.body.statements, + prologue, + /*statementOffset*/ + 0 + ); + const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, standardPrologueEnd); + if (hasSynthesizedSuper || superStatementIndices.length > 0) { hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; } - addDefaultValueAssignmentsIfNeeded2(prologue, constructor); - addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); - addRange(statements, visitNodes2( - constructor.body.statements, - visitor, - isStatement, - /*start*/ - statementOffset - )); - factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded( + const mayReplaceThis = transformConstructorBodyWorker( prologue, + statements, + constructor.body.statements, + standardPrologueEnd, + superStatementIndices, + /*superPathDepth*/ + 0, constructor, - /*copyOnWrite*/ - false + isDerivedClass, + hasSynthesizedSuper, + /*isFirstStatement*/ + true + // NOTE: this will be recalculated inside of transformConstructorBodyWorker ); - if (isDerivedClass || superCallExpression) { - if (superCallExpression && postSuperStatementsStart === constructor.body.statements.length && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { - const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); - const returnStatement = factory2.createReturnStatement(superCallExpression); - setCommentRange(returnStatement, getCommentRange(superCall2)); - setEmitFlags(superCall2, 3072 /* NoComments */); - statements.push(returnStatement); - } else { - if (superStatementIndex <= existingPrologue.length) { - insertCaptureThisForNode(statements, constructor, superCallExpression || createActualThis()); - } else { - insertCaptureThisForNode(prologue, constructor, createActualThis()); - if (superCallExpression) { - insertSuperThisCaptureThisForNode(statements, superCallExpression); - } - } - if (!isSufficientlyCoveredByReturnStatements(constructor.body)) { - statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); - } - } - } else { - insertCaptureThisForNodeIfNeeded(prologue, constructor); + addDefaultValueAssignmentsIfNeeded2(prologue, constructor); + addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); + insertCaptureNewTargetIfNeeded(prologue, constructor); + factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); + if (mayReplaceThis && !isSufficientlyCoveredByReturnStatements(constructor.body)) { + statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); } const body = factory2.createBlock( setTextRange( factory2.createNodeArray( [ - ...existingPrologue, ...prologue, - ...superStatementIndex <= existingPrologue.length ? emptyArray : visitNodes2(constructor.body.statements, visitor, isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length), ...statements ] ), @@ -99305,29 +101024,15 @@ ${lanes.join("\n")} setTextRange(body, constructor.body); return body; } - function findSuperCallAndStatementIndex(originalBodyStatements, existingPrologue) { - for (let i = existingPrologue.length; i < originalBodyStatements.length; i += 1) { - const superCall = getSuperCallFromStatement(originalBodyStatements[i]); - if (superCall) { - return { - superCall, - superStatementIndex: i - }; - } - } - return { - superStatementIndex: -1 - }; - } function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 252 /* ReturnStatement */) { + if (statement.kind === 253 /* ReturnStatement */) { return true; - } else if (statement.kind === 244 /* IfStatement */) { + } else if (statement.kind === 245 /* IfStatement */) { const ifStatement = statement; if (ifStatement.elseStatement) { return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); } - } else if (statement.kind === 240 /* Block */) { + } else if (statement.kind === 241 /* Block */) { const lastStatement = lastOrUndefined(statement.statements); if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { return true; @@ -99601,13 +101306,13 @@ ${lanes.join("\n")} return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 218 /* ArrowFunction */) { + if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } return false; } - function insertSuperThisCaptureThisForNode(statements, superExpression) { + function addSuperThisCaptureThisForNode(statements, superExpression) { enableSubstitutionsForCapturedThis(); const assignSuperExpression = factory2.createExpressionStatement( factory2.createBinaryExpression( @@ -99616,7 +101321,7 @@ ${lanes.join("\n")} superExpression ) ); - insertStatementAfterCustomPrologue(statements, assignSuperExpression); + statements.push(assignSuperExpression); setCommentRange(assignSuperExpression, getOriginalNode(superExpression).parent); } function insertCaptureThisForNode(statements, node, initializer) { @@ -99639,25 +101344,25 @@ ${lanes.join("\n")} setSourceMapRange(captureThisStatement, node); insertStatementAfterCustomPrologue(statements, captureThisStatement); } - function insertCaptureNewTargetIfNeeded(statements, node, copyOnWrite) { + function insertCaptureNewTargetIfNeeded(statements, node) { if (hierarchyFacts & 32768 /* NewTarget */) { let newTarget; switch (node.kind) { - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return statements; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: newTarget = factory2.createVoidZero(); break; - case 175 /* Constructor */: + case 176 /* Constructor */: newTarget = factory2.createPropertyAccessExpression( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), "constructor" ); break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: newTarget = factory2.createConditionalExpression( factory2.createLogicalAnd( setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), @@ -99696,9 +101401,6 @@ ${lanes.join("\n")} ]) ); setEmitFlags(captureNewTargetStatement, 3072 /* NoComments */ | 2097152 /* CustomPrologue */); - if (copyOnWrite) { - statements = statements.slice(); - } insertStatementAfterCustomPrologue(statements, captureNewTargetStatement); } return statements; @@ -99706,21 +101408,21 @@ ${lanes.join("\n")} function addClassMembers(statements, node) { for (const member of node.members) { switch (member.kind) { - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: statements.push(transformSemicolonClassElementToStatement(member)); break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); } break; - case 175 /* Constructor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: break; default: Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); @@ -99927,7 +101629,7 @@ ${lanes.join("\n")} const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 261 /* FunctionDeclaration */ || node.kind === 217 /* FunctionExpression */)) { + if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); @@ -99988,7 +101690,7 @@ ${lanes.join("\n")} multiLine = true; } } else { - Debug.assert(node.kind === 218 /* ArrowFunction */); + Debug.assert(node.kind === 219 /* ArrowFunction */); statementsLocation = moveRangeEnd(body, -1); const equalsGreaterThanToken = node.equalsGreaterThanToken; if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { @@ -100007,12 +101709,7 @@ ${lanes.join("\n")} closeBraceLocation = body; } factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded( - prologue, - node, - /*copyOnWrite*/ - false - ); + insertCaptureNewTargetIfNeeded(prologue, node); insertCaptureThisForNodeIfNeeded(prologue, node); if (some(prologue)) { multiLine = true; @@ -100090,7 +101787,7 @@ ${lanes.join("\n")} function visitVariableStatement(node) { const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); let updated; - if (convertedLoopState && (node.declarationList.flags & 3 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { + if (convertedLoopState && (node.declarationList.flags & 7 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { let assignments; for (const decl of node.declarationList.declarations) { hoistVariableDeclarationDeclaredInConvertedLoop(convertedLoopState, decl); @@ -100122,8 +101819,8 @@ ${lanes.join("\n")} return updated; } function visitVariableDeclarationList(node) { - if (node.flags & 3 /* BlockScoped */ || node.transformFlags & 524288 /* ContainsBindingPattern */) { - if (node.flags & 3 /* BlockScoped */) { + if (node.flags & 7 /* BlockScoped */ || node.transformFlags & 524288 /* ContainsBindingPattern */) { + if (node.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration); @@ -100214,14 +101911,14 @@ ${lanes.join("\n")} } function visitIterationStatement(node, outermostLabeledStatement) { switch (node.kind) { - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node, outermostLabeledStatement); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node, outermostLabeledStatement); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node, outermostLabeledStatement); } } @@ -100277,7 +101974,7 @@ ${lanes.join("\n")} const statements = []; const initializer = node.initializer; if (isVariableDeclarationList(initializer)) { - if (node.initializer.flags & 3 /* BlockScoped */) { + if (node.initializer.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } const firstOriginalDeclaration = firstOrUndefined(initializer.declarations); @@ -100571,7 +102268,7 @@ ${lanes.join("\n")} let numInitialProperties = -1, hasComputed = false; for (let i = 0; i < properties.length; i++) { const property = properties[i]; - if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 166 /* ComputedPropertyName */)) { + if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) { numInitialProperties = i; break; } @@ -100693,15 +102390,15 @@ ${lanes.join("\n")} } function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return convertForStatement(node, initializerFunction, convertedLoopBody); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return convertForInStatement(node, convertedLoopBody); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return convertForOfStatement(node, convertedLoopBody); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return convertDoStatement(node, convertedLoopBody); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return convertWhileStatement(node, convertedLoopBody); default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); @@ -100753,18 +102450,18 @@ ${lanes.join("\n")} function createConvertedLoopState(node) { let loopInitializer; switch (node.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: const initializer = node.initializer; - if (initializer && initializer.kind === 260 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 261 /* VariableDeclarationList */) { loopInitializer = initializer; } break; } const loopParameters = []; const loopOutParameters = []; - if (loopInitializer && getCombinedNodeFlags(loopInitializer) & 3 /* BlockScoped */) { + if (loopInitializer && getCombinedNodeFlags(loopInitializer) & 7 /* BlockScoped */) { const hasCapturedBindingsInForHead = shouldConvertInitializerOfForStatement(node) || shouldConvertConditionOfForStatement(node) || shouldConvertIncrementorOfForStatement(node); for (const decl of loopInitializer.declarations) { processLoopVariableDeclaration(node, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForHead); @@ -101172,10 +102869,10 @@ ${lanes.join("\n")} name )); const checkFlags = resolver.getNodeCheckFlags(decl); - if (checkFlags & 262144 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) { + if (checkFlags & 65536 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) { const outParamName = factory2.createUniqueName("out_" + idText(name)); let flags = 0 /* None */; - if (checkFlags & 262144 /* NeedsLoopOutParameter */) { + if (checkFlags & 65536 /* NeedsLoopOutParameter */) { flags |= 1 /* Body */; } if (isForStatement(container)) { @@ -101196,20 +102893,20 @@ ${lanes.join("\n")} for (let i = start; i < numProperties; i++) { const property = properties[i]; switch (property.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: const accessors = getAllAccessorDeclarations(node.properties, property); if (property === accessors.firstAccessor) { expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); } break; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); break; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); break; default: @@ -101335,7 +103032,7 @@ ${lanes.join("\n")} let updated; const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); - if (node.kind === 176 /* GetAccessor */) { + if (node.kind === 177 /* GetAccessor */) { updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); @@ -101699,13 +103396,13 @@ ${lanes.join("\n")} if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { enabledSubstitutions |= 1 /* CapturedThis */; context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(175 /* Constructor */); - context.enableEmitNotification(173 /* MethodDeclaration */); - context.enableEmitNotification(176 /* GetAccessor */); - context.enableEmitNotification(177 /* SetAccessor */); - context.enableEmitNotification(218 /* ArrowFunction */); - context.enableEmitNotification(217 /* FunctionExpression */); - context.enableEmitNotification(261 /* FunctionDeclaration */); + context.enableEmitNotification(176 /* Constructor */); + context.enableEmitNotification(174 /* MethodDeclaration */); + context.enableEmitNotification(177 /* GetAccessor */); + context.enableEmitNotification(178 /* SetAccessor */); + context.enableEmitNotification(219 /* ArrowFunction */); + context.enableEmitNotification(218 /* FunctionExpression */); + context.enableEmitNotification(262 /* FunctionDeclaration */); } } function onSubstituteNode(hint, node) { @@ -101729,10 +103426,10 @@ ${lanes.join("\n")} } function isNameOfDeclarationWithCollidingName(node) { switch (node.parent.kind) { - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 260 /* VariableDeclaration */: return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); } return false; @@ -101789,11 +103486,11 @@ ${lanes.join("\n")} return false; } const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 243 /* ExpressionStatement */) { + if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 244 /* ExpressionStatement */) { return false; } const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 212 /* CallExpression */) { + if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) { return false; } const callTarget = statementExpression.expression; @@ -101801,7 +103498,7 @@ ${lanes.join("\n")} return false; } const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 229 /* SpreadElement */) { + if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 230 /* SpreadElement */) { return false; } const expression = callArgument.expression; @@ -101824,24 +103521,24 @@ ${lanes.join("\n")} if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { previousOnEmitNode = context.onEmitNode; context.onEmitNode = onEmitNode; - context.enableEmitNotification(285 /* JsxOpeningElement */); - context.enableEmitNotification(286 /* JsxClosingElement */); - context.enableEmitNotification(284 /* JsxSelfClosingElement */); + context.enableEmitNotification(286 /* JsxOpeningElement */); + context.enableEmitNotification(287 /* JsxClosingElement */); + context.enableEmitNotification(285 /* JsxSelfClosingElement */); noSubstitution = []; } const previousOnSubstituteNode = context.onSubstituteNode; context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(210 /* PropertyAccessExpression */); - context.enableSubstitution(302 /* PropertyAssignment */); + context.enableSubstitution(211 /* PropertyAccessExpression */); + context.enableSubstitution(303 /* PropertyAssignment */); return chainBundle(context, transformSourceFile); function transformSourceFile(node) { return node; } function onEmitNode(hint, node, emitCallback) { switch (node.kind) { - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: + case 285 /* JsxSelfClosingElement */: const tagName = node.tagName; noSubstitution[getOriginalNodeId(tagName)] = true; break; @@ -101973,13 +103670,13 @@ ${lanes.join("\n")} } function visitJavaScriptInStatementContainingYield(node) { switch (node.kind) { - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); default: return visitJavaScriptInGeneratorFunctionBody(node); @@ -101987,24 +103684,24 @@ ${lanes.join("\n")} } function visitJavaScriptInGeneratorFunctionBody(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return visitAccessorDeclaration(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return visitBreakStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return visitContinueStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return visitReturnStatement(node); default: if (node.transformFlags & 1048576 /* ContainsYield */) { @@ -102018,23 +103715,23 @@ ${lanes.join("\n")} } function visitJavaScriptContainingYield(node) { switch (node.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return visitBinaryExpression(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return visitCommaListExpression(node); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return visitConditionalExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return visitYieldExpression(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return visitArrayLiteralExpression(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return visitObjectLiteralExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return visitElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return visitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return visitNewExpression(node); default: return visitEachChild(node, visitor, context); @@ -102042,9 +103739,9 @@ ${lanes.join("\n")} } function visitGenerator(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return visitFunctionExpression(node); default: return Debug.failBadSyntaxKind(node); @@ -102229,14 +103926,14 @@ ${lanes.join("\n")} if (containsYield(right)) { let target; switch (left.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: target = factory2.updatePropertyAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), left.name ); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: target = factory2.updateElementAccessExpression( left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), @@ -102569,35 +104266,35 @@ ${lanes.join("\n")} } function transformAndEmitStatementWorker(node) { switch (node.kind) { - case 240 /* Block */: + case 241 /* Block */: return transformAndEmitBlock(node); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return transformAndEmitExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return transformAndEmitIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return transformAndEmitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return transformAndEmitWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return transformAndEmitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return transformAndEmitForInStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return transformAndEmitContinueStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return transformAndEmitBreakStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return transformAndEmitReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return transformAndEmitWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return transformAndEmitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return transformAndEmitLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return transformAndEmitThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return transformAndEmitTryStatement(node); default: return emitStatement(visitNode(node, visitor, isStatement)); @@ -102949,7 +104646,7 @@ ${lanes.join("\n")} for (let i = 0; i < numClauses; i++) { const clause = caseBlock.clauses[i]; clauseLabels.push(defineLabel()); - if (clause.kind === 296 /* DefaultClause */ && defaultClauseIndex === -1) { + if (clause.kind === 297 /* DefaultClause */ && defaultClauseIndex === -1) { defaultClauseIndex = i; } } @@ -102959,7 +104656,7 @@ ${lanes.join("\n")} let defaultClausesSkipped = 0; for (let i = clausesWritten; i < numClauses; i++) { const clause = caseBlock.clauses[i]; - if (clause.kind === 295 /* CaseClause */) { + if (clause.kind === 296 /* CaseClause */) { if (containsYield(clause.expression) && pendingClauses.length > 0) { break; } @@ -103932,12 +105629,12 @@ ${lanes.join("\n")} const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(212 /* CallExpression */); - context.enableSubstitution(214 /* TaggedTemplateExpression */); + context.enableSubstitution(213 /* CallExpression */); + context.enableSubstitution(215 /* TaggedTemplateExpression */); context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(225 /* BinaryExpression */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(226 /* BinaryExpression */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableEmitNotification(312 /* SourceFile */); const moduleInfoMap = []; let currentSourceFile; let currentModuleInfo; @@ -103949,7 +105646,7 @@ ${lanes.join("\n")} return node; } currentSourceFile = node; - currentModuleInfo = collectExternalModuleInfo(context, node, resolver, compilerOptions); + currentModuleInfo = collectExternalModuleInfo(context, node); moduleInfoMap[getOriginalNodeId(node)] = currentModuleInfo; const transformModule2 = getTransformModuleDelegate(moduleKind); const updated = transformModule2(node); @@ -104349,63 +106046,59 @@ ${lanes.join("\n")} } function topLevelVisitor(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: - return visitImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: - return visitExportDeclaration(node); - case 276 /* ExportAssignment */: - return visitExportAssignment(node); - case 261 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: - return visitClassDeclaration(node); + case 272 /* ImportDeclaration */: + return visitTopLevelImportDeclaration(node); + case 271 /* ImportEqualsDeclaration */: + return visitTopLevelImportEqualsDeclaration(node); + case 278 /* ExportDeclaration */: + return visitTopLevelExportDeclaration(node); + case 277 /* ExportAssignment */: + return visitTopLevelExportAssignment(node); default: return topLevelNestedVisitor(node); } } function topLevelNestedVisitor(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return visitWithStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return visitIfStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return visitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return visitDefaultClause(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return visitTryStatement(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock(node); default: return visitor(node); @@ -104416,30 +106109,30 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { return visitImportCallExpression(node); } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -104462,24 +106155,24 @@ ${lanes.join("\n")} if (isObjectLiteralExpression(node)) { for (const elem of node.properties) { switch (elem.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (destructuringNeedsFlattening(elem.initializer)) { return true; } break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: if (destructuringNeedsFlattening(elem.name)) { return true; } break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: if (destructuringNeedsFlattening(elem.expression)) { return true; } break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return false; default: Debug.assertNever(elem, "Unhandled object member kind"); @@ -104507,7 +106200,7 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitForStatement(node, isTopLevel) { - if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -104548,7 +106241,7 @@ ${lanes.join("\n")} ); } function visitForInStatement(node) { - if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -104576,7 +106269,7 @@ ${lanes.join("\n")} ); } function visitForOfStatement(node) { - if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) { + if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { const exportStatements = appendExportsOfVariableDeclarationList( /*statements*/ void 0, @@ -104956,7 +106649,7 @@ ${lanes.join("\n")} } return innerExpr; } - function visitImportDeclaration(node) { + function visitTopLevelImportDeclaration(node) { let statements; const namespaceDeclaration = getNamespaceDeclarationNode(node); if (moduleKind !== 2 /* AMD */) { @@ -105065,7 +106758,7 @@ ${lanes.join("\n")} args ); } - function visitImportEqualsDeclaration(node) { + function visitTopLevelImportEqualsDeclaration(node) { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); let statements; if (moduleKind !== 2 /* AMD */) { @@ -105133,7 +106826,7 @@ ${lanes.join("\n")} statements = appendExportsOfImportEqualsDeclaration(statements, node); return singleOrMany(statements); } - function visitExportDeclaration(node) { + function visitTopLevelExportDeclaration(node) { if (!node.moduleSpecifier) { return void 0; } @@ -105235,7 +106928,7 @@ ${lanes.join("\n")} ); } } - function visitExportAssignment(node) { + function visitTopLevelExportAssignment(node) { if (node.isExportEquals) { return void 0; } @@ -105439,19 +107132,21 @@ ${lanes.join("\n")} if (!importClause) { return statements; } + const seen = new IdentifierNameMap(); if (importClause.name) { - statements = appendExportsOfDeclaration(statements, importClause); + statements = appendExportsOfDeclaration(statements, seen, importClause); } const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: - statements = appendExportsOfDeclaration(statements, namedBindings); + case 274 /* NamespaceImport */: + statements = appendExportsOfDeclaration(statements, seen, namedBindings); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration( statements, + seen, importBinding, /*liveBinding*/ true @@ -105466,7 +107161,7 @@ ${lanes.join("\n")} if (currentModuleInfo.exportEquals) { return statements; } - return appendExportsOfDeclaration(statements, decl); + return appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); } function appendExportsOfVariableStatement(statements, node) { return appendExportsOfVariableDeclarationList( @@ -105496,7 +107191,7 @@ ${lanes.join("\n")} } } } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer || isForInOrOfInitializer)) { - statements = appendExportsOfDeclaration(statements, decl); + statements = appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); } return statements; } @@ -105504,10 +107199,12 @@ ${lanes.join("\n")} if (currentModuleInfo.exportEquals) { return statements; } + const seen = new IdentifierNameMap(); if (hasSyntacticModifier(decl, 1 /* Export */)) { const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); statements = appendExportStatement( statements, + seen, exportName, factory2.getLocalName(decl), /*location*/ @@ -105515,17 +107212,18 @@ ${lanes.join("\n")} ); } if (decl.name) { - statements = appendExportsOfDeclaration(statements, decl); + statements = appendExportsOfDeclaration(statements, seen, decl); } return statements; } - function appendExportsOfDeclaration(statements, decl, liveBinding) { + function appendExportsOfDeclaration(statements, seen, decl, liveBinding) { const name = factory2.getDeclarationName(decl); - const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(idText(name)); + const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { statements = appendExportStatement( statements, + seen, exportSpecifier.name, name, /*location*/ @@ -105538,8 +107236,11 @@ ${lanes.join("\n")} } return statements; } - function appendExportStatement(statements, exportName, expression, location, allowComments, liveBinding) { - statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); + function appendExportStatement(statements, seen, exportName, expression, location, allowComments, liveBinding) { + if (!seen.has(exportName)) { + seen.set(exportName, true); + statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); + } return statements; } function createUnderscoreUnderscoreESModule() { @@ -105634,7 +107335,7 @@ ${lanes.join("\n")} return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { currentSourceFile = node; currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; previousOnEmitNode(hint, node, emitCallback); @@ -105672,11 +107373,11 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return substituteCallExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return substituteTaggedTemplateExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return substituteBinaryExpression(node); } return node; @@ -105729,7 +107430,7 @@ ${lanes.join("\n")} return node; } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 311 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 312 /* SourceFile */) { return setTextRange( factory2.createPropertyAccessExpression( factory2.createIdentifier("exports"), @@ -105766,7 +107467,7 @@ ${lanes.join("\n")} return node; } function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && !isGeneratedIdentifier(node.left) && !isLocalName(node.left)) { + if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { let expression = node; @@ -105805,6 +107506,15 @@ ${lanes.join("\n")} return arrayFrom(bindingsSet); } } + } else if (isFileLevelReservedGeneratedIdentifier(name)) { + const exportSpecifiers = currentModuleInfo == null ? void 0 : currentModuleInfo.exportSpecifiers.get(name); + if (exportSpecifiers) { + const exportedNames = []; + for (const exportSpecifier of exportSpecifiers) { + exportedNames.push(exportSpecifier.name); + } + return exportedNames; + } } } } @@ -105838,10 +107548,10 @@ ${lanes.join("\n")} context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(303 /* ShorthandPropertyAssignment */); - context.enableSubstitution(225 /* BinaryExpression */); - context.enableSubstitution(235 /* MetaProperty */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(304 /* ShorthandPropertyAssignment */); + context.enableSubstitution(226 /* BinaryExpression */); + context.enableSubstitution(236 /* MetaProperty */); + context.enableEmitNotification(312 /* SourceFile */); const moduleInfoMap = []; const exportFunctionsMap = []; const noSubstitutionMap = []; @@ -105861,7 +107571,7 @@ ${lanes.join("\n")} const id = getOriginalNodeId(node); currentSourceFile = node; enclosingBlockScopedContainer = node; - moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node, resolver, compilerOptions); + moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node); exportFunction = factory2.createUniqueName("exports"); exportFunctionsMap[id] = exportFunction; contextObject = contextObjectMap[id] = factory2.createUniqueName("context"); @@ -106028,7 +107738,7 @@ ${lanes.join("\n")} if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { let hasExportDeclarationWithExportClause = false; for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 277 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 278 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -106176,11 +107886,11 @@ ${lanes.join("\n")} for (const entry of group2.externalImports) { const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); switch (entry.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: if (!entry.importClause) { break; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: Debug.assert(importVariableName !== void 0); statements.push( factory2.createExpressionStatement( @@ -106203,7 +107913,7 @@ ${lanes.join("\n")} ); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { if (isNamedExports(entry.exportClause)) { @@ -106298,13 +108008,13 @@ ${lanes.join("\n")} } function topLevelVisitor(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return visitImportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return visitImportEqualsDeclaration(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return visitExportDeclaration(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); default: return topLevelNestedVisitor(node); @@ -106401,18 +108111,43 @@ ${lanes.join("\n")} if (!shouldHoistVariableDeclarationList(node.declarationList)) { return visitNode(node, visitor, isStatement); } - let expressions; - const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); - for (const variable of node.declarationList.declarations) { - if (variable.initializer) { - expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); - } else { - hoistBindingElement(variable); - } - } let statements; - if (expressions) { - statements = append(statements, setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node)); + if (isVarUsing(node.declarationList) || isVarAwaitUsing(node.declarationList)) { + const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifierLike); + const declarations = []; + for (const variable of node.declarationList.declarations) { + declarations.push(factory2.updateVariableDeclaration( + variable, + factory2.getGeneratedNameForNode(variable.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + transformInitializedVariable( + variable, + /*isExportedDeclaration*/ + false + ) + )); + } + const declarationList = factory2.updateVariableDeclarationList( + node.declarationList, + declarations + ); + statements = append(statements, factory2.updateVariableStatement(node, modifiers, declarationList)); + } else { + let expressions; + const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); + for (const variable of node.declarationList.declarations) { + if (variable.initializer) { + expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); + } else { + hoistBindingElement(variable); + } + } + if (expressions) { + statements = append(statements, setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node)); + } } statements = appendExportsOfVariableStatement( statements, @@ -106434,7 +108169,7 @@ ${lanes.join("\n")} } } function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 311 /* SourceFile */ || (getOriginalNode(node).flags & 3 /* BlockScoped */) === 0); + return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 312 /* SourceFile */ || (getOriginalNode(node).flags & 7 /* BlockScoped */) === 0); } function transformInitializedVariable(node, isExportedDeclaration) { const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; @@ -106484,10 +108219,10 @@ ${lanes.join("\n")} const namedBindings = importClause.namedBindings; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: statements = appendExportsOfDeclaration(statements, namedBindings); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: for (const importBinding of namedBindings.elements) { statements = appendExportsOfDeclaration(statements, importBinding); } @@ -106553,7 +108288,7 @@ ${lanes.join("\n")} return statements; } const name = factory2.getDeclarationName(decl); - const exportSpecifiers = moduleInfo.exportSpecifiers.get(idText(name)); + const exportSpecifiers = moduleInfo.exportSpecifiers.get(name); if (exportSpecifiers) { for (const exportSpecifier of exportSpecifiers) { if (exportSpecifier.name.escapedText !== excludeName) { @@ -106587,45 +108322,45 @@ ${lanes.join("\n")} } function topLevelNestedVisitor(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return visitVariableStatement(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return visitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return visitClassDeclaration(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ true ); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return visitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return visitForOfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return visitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return visitWhileStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return visitLabeledStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return visitWithStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return visitIfStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return visitSwitchStatement(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return visitCaseBlock(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return visitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return visitDefaultClause(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return visitTryStatement(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return visitCatchClause(node); - case 240 /* Block */: + case 241 /* Block */: return visitBlock(node); default: return visitor(node); @@ -106779,30 +108514,30 @@ ${lanes.join("\n")} return node; } switch (node.kind) { - case 247 /* ForStatement */: + case 248 /* ForStatement */: return visitForStatement( node, /*isTopLevel*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return visitExpressionStatement(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return visitParenthesizedExpression(node, valueIsDiscarded); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (isDestructuringAssignment(node)) { return visitDestructuringAssignment(node, valueIsDiscarded); } break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(node)) { return visitImportCallExpression(node); } break; - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); } return visitEachChild(node, visitor, context); @@ -106875,7 +108610,7 @@ ${lanes.join("\n")} return hasExportedReferenceInDestructuringTarget(node.initializer); } else if (isIdentifier(node)) { const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 311 /* SourceFile */; + return container !== void 0 && container.kind === 312 /* SourceFile */; } else { return false; } @@ -106919,7 +108654,7 @@ ${lanes.join("\n")} return node; } function onEmitNode(hint, node, emitCallback) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { const id = getOriginalNodeId(node); currentSourceFile = node; moduleInfo = moduleInfoMap[id]; @@ -106953,7 +108688,7 @@ ${lanes.join("\n")} } function substituteUnspecified(node) { switch (node.kind) { - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return substituteShorthandPropertyAssignment(node); } return node; @@ -106997,9 +108732,9 @@ ${lanes.join("\n")} switch (node.kind) { case 80 /* Identifier */: return substituteExpressionIdentifier(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return substituteBinaryExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return substituteMetaProperty(node); } return node; @@ -107040,7 +108775,7 @@ ${lanes.join("\n")} return node; } function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && !isGeneratedIdentifier(node.left) && !isLocalName(node.left)) { + if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { let expression = node; @@ -107067,10 +108802,19 @@ ${lanes.join("\n")} /*prefixLocals*/ false ); - if (exportContainer && exportContainer.kind === 311 /* SourceFile */) { + if (exportContainer && exportContainer.kind === 312 /* SourceFile */) { exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); } exportedNames = addRange(exportedNames, moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); + } else if (isGeneratedIdentifier(name) && isFileLevelReservedGeneratedIdentifier(name)) { + const exportSpecifiers = moduleInfo == null ? void 0 : moduleInfo.exportSpecifiers.get(name); + if (exportSpecifiers) { + const exportedNames2 = []; + for (const exportSpecifier of exportSpecifiers) { + exportedNames2.push(exportSpecifier.name); + } + return exportedNames2; + } } return exportedNames; } @@ -107123,7 +108867,7 @@ ${lanes.join("\n")} const previousOnSubstituteNode = context.onSubstituteNode; context.onEmitNode = onEmitNode; context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(311 /* SourceFile */); + context.enableEmitNotification(312 /* SourceFile */); context.enableSubstitution(80 /* Identifier */); let helperNameSubstitutions; let currentSourceFile; @@ -107171,11 +108915,11 @@ ${lanes.join("\n")} } function visitor(node) { switch (node.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return visitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDecl = node; return visitExportDeclaration(exportDecl); } @@ -107386,8 +109130,8 @@ ${lanes.join("\n")} const cjsOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(311 /* SourceFile */); - context.enableEmitNotification(311 /* SourceFile */); + context.enableSubstitution(312 /* SourceFile */); + context.enableEmitNotification(312 /* SourceFile */); let currentSourceFile; return transformSourceFileOrBundle; function onSubstituteNode(hint, node) { @@ -107430,7 +109174,7 @@ ${lanes.join("\n")} return result; } function transformSourceFileOrBundle(node) { - return node.kind === 311 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); + return node.kind === 312 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); } function transformBundle(node) { return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); @@ -107466,7 +109210,7 @@ ${lanes.join("\n")} function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -107483,7 +109227,7 @@ ${lanes.join("\n")} function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; @@ -107514,12 +109258,12 @@ ${lanes.join("\n")} return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`); } function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 171 /* PropertyDeclaration */ || node.kind === 210 /* PropertyAccessExpression */ || node.kind === 211 /* ElementAccessExpression */ || node.kind === 225 /* BinaryExpression */ || node.kind === 170 /* PropertySignature */ || node.kind === 168 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 262 /* ClassDeclaration */ || node.kind === 168 /* Parameter */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; @@ -107536,7 +109280,7 @@ ${lanes.join("\n")} } function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; - if (node.kind === 177 /* SetAccessor */) { + if (node.kind === 178 /* SetAccessor */) { if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1; } else { @@ -107558,26 +109302,26 @@ ${lanes.join("\n")} function getReturnTypeVisibilityError(symbolAccessibilityResult) { let diagnosticMessage; switch (node.kind) { - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 178 /* CallSignature */: + case 179 /* CallSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node)) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } else if (node.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.kind === 263 /* ClassDeclaration */) { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; break; default: @@ -107598,29 +109342,29 @@ ${lanes.join("\n")} } function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 179 /* ConstructSignature */: - case 184 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 185 /* ConstructorType */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 178 /* CallSignature */: + case 179 /* CallSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node.parent)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 261 /* FunctionDeclaration */: - case 183 /* FunctionType */: + case 262 /* FunctionDeclaration */: + case 184 /* FunctionType */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - case 177 /* SetAccessor */: - case 176 /* GetAccessor */: + case 178 /* SetAccessor */: + case 177 /* GetAccessor */: return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1; default: return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`); @@ -107629,40 +109373,40 @@ ${lanes.join("\n")} function getTypeParameterConstraintVisibilityError() { let diagnosticMessage; switch (node.parent.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 199 /* MappedType */: + case 200 /* MappedType */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; break; - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 178 /* CallSignature */: + case 179 /* CallSignature */: diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isStatic(node.parent)) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 262 /* ClassDeclaration */) { + } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 183 /* FunctionType */: - case 261 /* FunctionDeclaration */: + case 184 /* FunctionType */: + case 262 /* FunctionDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; - case 194 /* InferType */: + case 195 /* InferType */: diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; break; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; break; default: @@ -107730,7 +109474,7 @@ ${lanes.join("\n")} } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 168 /* Parameter */) { + if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; const text = currentSourceFile.text; @@ -107961,10 +109705,10 @@ ${lanes.join("\n")} return result; } function transformRoot(node) { - if (node.kind === 311 /* SourceFile */ && node.isDeclarationFile) { + if (node.kind === 312 /* SourceFile */ && node.isDeclarationFile) { return node; } - if (node.kind === 312 /* Bundle */) { + if (node.kind === 313 /* Bundle */) { isBundledEmit = true; refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); @@ -108031,7 +109775,7 @@ ${lanes.join("\n")} ); } ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 314 /* InputFiles */) { + if (prepend.kind === 315 /* InputFiles */) { const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; collectReferences(sourceFile, refs); @@ -108199,14 +109943,14 @@ ${lanes.join("\n")} if (name.kind === 80 /* Identifier */) { return name; } else { - if (name.kind === 206 /* ArrayBindingPattern */) { + if (name.kind === 207 /* ArrayBindingPattern */) { return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement)); } else { return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement)); } } function visitBindingElement(elem) { - if (elem.kind === 231 /* OmittedExpression */) { + if (elem.kind === 232 /* OmittedExpression */) { return elem; } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { @@ -108270,14 +110014,14 @@ ${lanes.join("\n")} if (shouldPrintWithInitializer(node)) { return; } - const shouldUseResolverType = node.kind === 168 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); + const shouldUseResolverType = node.kind === 169 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); if (type && !shouldUseResolverType) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } if (!getParseTreeNode(node)) { return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */); } - if (node.kind === 177 /* SetAccessor */) { + if (node.kind === 178 /* SetAccessor */) { return factory2.createKeywordTypeNode(133 /* AnyKeyword */); } errorNameNode = node.name; @@ -108286,10 +110030,10 @@ ${lanes.join("\n")} oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); } - if (node.kind === 259 /* VariableDeclaration */ || node.kind === 207 /* BindingElement */) { + if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); } - if (node.kind === 168 /* Parameter */ || node.kind === 171 /* PropertyDeclaration */ || node.kind === 170 /* PropertySignature */) { + if (node.kind === 169 /* Parameter */ || node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */) { if (isPropertySignature(node) || !node.initializer) return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); @@ -108306,21 +110050,21 @@ ${lanes.join("\n")} function isDeclarationAndNotVisible(node) { node = getParseTreeNode(node); switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: return !resolver.isDeclarationVisible(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return !getBindingNameVisible(node); - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: return false; - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return true; } return false; @@ -108408,7 +110152,7 @@ ${lanes.join("\n")} function rewriteModuleSpecifier(parent2, input) { if (!input) return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 266 /* ModuleDeclaration */ && parent2.kind !== 204 /* ImportType */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 267 /* ModuleDeclaration */ && parent2.kind !== 205 /* ImportType */; if (isStringLiteralLike(input)) { if (isBundledEmit) { const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); @@ -108427,7 +110171,7 @@ ${lanes.join("\n")} function transformImportEqualsDeclaration(decl) { if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === 282 /* ExternalModuleReference */) { + if (decl.moduleReference.kind === 283 /* ExternalModuleReference */) { const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); return factory2.updateImportEqualsDeclaration( decl, @@ -108464,7 +110208,7 @@ ${lanes.join("\n")} void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); } - if (decl.importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 @@ -108567,7 +110311,7 @@ ${lanes.join("\n")} const oldDiag = getSymbolAccessibilityDiagnostic; const canProduceDiagnostic = canProduceDiagnostics(input); const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 186 /* TypeLiteral */ || input.kind === 199 /* MappedType */) && input.parent.kind !== 264 /* TypeAliasDeclaration */; + let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, 8 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) @@ -108595,26 +110339,26 @@ ${lanes.join("\n")} } if (isProcessedComponent(input)) { switch (input.kind) { - case 232 /* ExpressionWithTypeArguments */: { + case 233 /* ExpressionWithTypeArguments */: { if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) { checkEntityNameVisibility(input.expression, enclosingDeclaration); } const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); } - case 182 /* TypeReference */: { + case 183 /* TypeReference */: { checkEntityNameVisibility(input.typeName, enclosingDeclaration); const node = visitEachChild(input, visitDeclarationSubtree, context); return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); } - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return cleanup(factory2.updateConstructSignature( input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type) )); - case 175 /* Constructor */: { + case 176 /* Constructor */: { const ctor = factory2.createConstructorDeclaration( /*modifiers*/ ensureModifiers(input), @@ -108624,7 +110368,7 @@ ${lanes.join("\n")} ); return cleanup(ctor); } - case 173 /* MethodDeclaration */: { + case 174 /* MethodDeclaration */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108645,7 +110389,7 @@ ${lanes.join("\n")} ); return cleanup(sig); } - case 176 /* GetAccessor */: { + case 177 /* GetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108663,7 +110407,7 @@ ${lanes.join("\n")} void 0 )); } - case 177 /* SetAccessor */: { + case 178 /* SetAccessor */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108679,7 +110423,7 @@ ${lanes.join("\n")} void 0 )); } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108694,7 +110438,7 @@ ${lanes.join("\n")} ensureType(input, input.type), ensureNoInitializer(input) )); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108708,7 +110452,7 @@ ${lanes.join("\n")} input.questionToken, ensureType(input, input.type) )); - case 172 /* MethodSignature */: { + case 173 /* MethodSignature */: { if (isPrivateIdentifier(input.name)) { return cleanup( /*returnValue*/ @@ -108725,7 +110469,7 @@ ${lanes.join("\n")} ensureType(input, input.type) )); } - case 178 /* CallSignature */: { + case 179 /* CallSignature */: { return cleanup(factory2.updateCallSignature( input, ensureTypeParams(input, input.typeParameters), @@ -108733,7 +110477,7 @@ ${lanes.join("\n")} ensureType(input, input.type) )); } - case 180 /* IndexSignature */: { + case 181 /* IndexSignature */: { return cleanup(factory2.updateIndexSignature( input, ensureModifiers(input), @@ -108741,7 +110485,7 @@ ${lanes.join("\n")} visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(133 /* AnyKeyword */) )); } - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { if (isBindingPattern(input.name)) { return recreateBindingPattern(input.name); } @@ -108756,7 +110500,7 @@ ${lanes.join("\n")} ensureNoInitializer(input) )); } - case 167 /* TypeParameter */: { + case 168 /* TypeParameter */: { if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { return cleanup(factory2.updateTypeParameterDeclaration( input, @@ -108770,7 +110514,7 @@ ${lanes.join("\n")} } return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); } - case 193 /* ConditionalType */: { + case 194 /* ConditionalType */: { const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); const oldEnclosingDecl = enclosingDeclaration; @@ -108784,13 +110528,13 @@ ${lanes.join("\n")} Debug.assert(falseType); return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); } - case 183 /* FunctionType */: { + case 184 /* FunctionType */: { return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 184 /* ConstructorType */: { + case 185 /* ConstructorType */: { return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); } - case 204 /* ImportType */: { + case 205 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); return cleanup(factory2.updateImportTypeNode( @@ -108830,7 +110574,7 @@ ${lanes.join("\n")} } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 173 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -108839,7 +110583,7 @@ ${lanes.join("\n")} if (shouldStripInternal(input)) return; switch (input.kind) { - case 277 /* ExportDeclaration */: { + case 278 /* ExportDeclaration */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -108853,7 +110597,7 @@ ${lanes.join("\n")} getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 ); } - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { if (isSourceFile(input.parent)) { resultHasExternalModuleIndicator = true; } @@ -108894,6 +110638,21 @@ ${lanes.join("\n")} const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (258047 /* All */ ^ 1 /* Export */)); return factory2.updateModifiers(statement, modifiers); } + function updateModuleDeclarationAndKeyword(node, modifiers, name, body) { + const updated = factory2.updateModuleDeclaration(node, modifiers, name, body); + if (isAmbientModule(updated) || updated.flags & 32 /* Namespace */) { + return updated; + } + const fixed = factory2.createModuleDeclaration( + updated.modifiers, + updated.name, + updated.body, + updated.flags | 32 /* Namespace */ + ); + setOriginalNode(fixed, updated); + setTextRange(fixed, updated); + return fixed; + } function transformTopLevelDeclaration(input) { if (lateMarkedStatements) { while (orderedRemoveItem(lateMarkedStatements, input)) @@ -108902,10 +110661,10 @@ ${lanes.join("\n")} if (shouldStripInternal(input)) return; switch (input.kind) { - case 270 /* ImportEqualsDeclaration */: { + case 271 /* ImportEqualsDeclaration */: { return transformImportEqualsDeclaration(input); } - case 271 /* ImportDeclaration */: { + case 272 /* ImportDeclaration */: { return transformImportDeclaration(input); } } @@ -108925,7 +110684,7 @@ ${lanes.join("\n")} } const previousNeedsDeclare = needsDeclare; switch (input.kind) { - case 264 /* TypeAliasDeclaration */: { + case 265 /* TypeAliasDeclaration */: { needsDeclare = false; const clean2 = cleanup(factory2.updateTypeAliasDeclaration( input, @@ -108937,7 +110696,7 @@ ${lanes.join("\n")} needsDeclare = previousNeedsDeclare; return clean2; } - case 263 /* InterfaceDeclaration */: { + case 264 /* InterfaceDeclaration */: { return cleanup(factory2.updateInterfaceDeclaration( input, ensureModifiers(input), @@ -108947,7 +110706,7 @@ ${lanes.join("\n")} visitNodes2(input.members, visitDeclarationSubtree, isTypeElement) )); } - case 261 /* FunctionDeclaration */: { + case 262 /* FunctionDeclaration */: { const clean2 = cleanup(factory2.updateFunctionDeclaration( input, ensureModifiers(input), @@ -108967,7 +110726,7 @@ ${lanes.join("\n")} void 0, clean2.name || factory2.createIdentifier("_default"), factory2.createModuleBlock([]), - 16 /* Namespace */ + 32 /* Namespace */ ); setParent(fakespace, enclosingDeclaration); fakespace.locals = createSymbolTable(props); @@ -109017,7 +110776,7 @@ ${lanes.join("\n")} })) )); } - const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 16 /* Namespace */); + const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 32 /* Namespace */); if (!hasEffectiveModifier(clean2, 1024 /* Default */)) { return [clean2, namespaceDecl]; } @@ -109056,17 +110815,17 @@ ${lanes.join("\n")} return clean2; } } - case 266 /* ModuleDeclaration */: { + case 267 /* ModuleDeclaration */: { needsDeclare = false; const inner = input.body; - if (inner && inner.kind === 267 /* ModuleBlock */) { + if (inner && inner.kind === 268 /* ModuleBlock */) { const oldNeedsScopeFix = needsScopeFixMarker; const oldHasScopeFix = resultHasScopeMarker; resultHasScopeMarker = false; needsScopeFixMarker = false; const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement); let lateStatements = transformAndReplaceLatePaintedStatements(statements); - if (input.flags & 16777216 /* Ambient */) { + if (input.flags & 33554432 /* Ambient */) { needsScopeFixMarker = false; } if (!isGlobalScopeAugmentation(input) && !hasScopeMarker2(lateStatements) && !resultHasScopeMarker) { @@ -109081,7 +110840,7 @@ ${lanes.join("\n")} needsScopeFixMarker = oldNeedsScopeFix; resultHasScopeMarker = oldHasScopeFix; const mods = ensureModifiers(input); - return cleanup(factory2.updateModuleDeclaration( + return cleanup(updateModuleDeclarationAndKeyword( input, mods, isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, @@ -109095,7 +110854,7 @@ ${lanes.join("\n")} const id = getOriginalNodeId(inner); const body = lateStatementReplacementMap.get(id); lateStatementReplacementMap.delete(id); - return cleanup(factory2.updateModuleDeclaration( + return cleanup(updateModuleDeclarationAndKeyword( input, mods, input.name, @@ -109103,7 +110862,7 @@ ${lanes.join("\n")} )); } } - case 262 /* ClassDeclaration */: { + case 263 /* ClassDeclaration */: { errorNameNode = input.name; errorFallbackNode = input; const modifiers = factory2.createNodeArray(ensureModifiers(input)); @@ -109219,10 +110978,10 @@ ${lanes.join("\n")} )); } } - case 242 /* VariableStatement */: { + case 243 /* VariableStatement */: { return cleanup(transformVariableStatement(input)); } - case 265 /* EnumDeclaration */: { + case 266 /* EnumDeclaration */: { return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { if (shouldStripInternal(m)) return; @@ -109239,7 +110998,7 @@ ${lanes.join("\n")} if (canProdiceDiagnostic) { getSymbolAccessibilityDiagnostic = oldDiag; } - if (input.kind === 266 /* ModuleDeclaration */) { + if (input.kind === 267 /* ModuleDeclaration */) { needsDeclare = previousNeedsDeclare; } if (node === input) { @@ -109256,13 +111015,23 @@ ${lanes.join("\n")} const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration); if (!length(nodes)) return; - return factory2.updateVariableStatement(input, factory2.createNodeArray(ensureModifiers(input)), factory2.updateVariableDeclarationList(input.declarationList, nodes)); + const modifiers = factory2.createNodeArray(ensureModifiers(input)); + let declList; + if (isVarUsing(input.declarationList) || isVarAwaitUsing(input.declarationList)) { + declList = factory2.createVariableDeclarationList(nodes, 2 /* Const */); + setOriginalNode(declList, input.declarationList); + setTextRange(declList, input.declarationList); + setCommentRange(declList, input.declarationList); + } else { + declList = factory2.updateVariableDeclarationList(input.declarationList, nodes); + } + return factory2.updateVariableStatement(input, modifiers, declList); } function recreateBindingPattern(d) { return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); } function recreateBindingElement(e) { - if (e.kind === 231 /* OmittedExpression */) { + if (e.kind === 232 /* OmittedExpression */) { return; } if (e.name) { @@ -109322,7 +111091,7 @@ ${lanes.join("\n")} function ensureModifierFlags(node) { let mask2 = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; - const parentIsFile = node.parent.kind === 311 /* SourceFile */; + const parentIsFile = node.parent.kind === 312 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { mask2 ^= 2 /* Ambient */; additions = 0 /* None */; @@ -109348,7 +111117,7 @@ ${lanes.join("\n")} } } function isAlwaysType(node) { - if (node.kind === 263 /* InterfaceDeclaration */) { + if (node.kind === 264 /* InterfaceDeclaration */) { return true; } return false; @@ -109368,57 +111137,57 @@ ${lanes.join("\n")} } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 176 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; + return accessor.kind === 177 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; } } function canHaveLiteralInitializer(node) { switch (node.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return !hasEffectiveModifier(node, 8 /* Private */); - case 168 /* Parameter */: - case 259 /* VariableDeclaration */: + case 169 /* Parameter */: + case 260 /* VariableDeclaration */: return true; } return false; } function isPreservedDeclarationStatement(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 266 /* ModuleDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 263 /* InterfaceDeclaration */: - case 262 /* ClassDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 242 /* VariableStatement */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: + case 262 /* FunctionDeclaration */: + case 267 /* ModuleDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 264 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 243 /* VariableStatement */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: return true; } return false; } function isProcessedComponent(node) { switch (node.kind) { - case 179 /* ConstructSignature */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 180 /* IndexSignature */: - case 259 /* VariableDeclaration */: - case 167 /* TypeParameter */: - case 232 /* ExpressionWithTypeArguments */: - case 182 /* TypeReference */: - case 193 /* ConditionalType */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 204 /* ImportType */: + case 180 /* ConstructSignature */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 181 /* IndexSignature */: + case 260 /* VariableDeclaration */: + case 168 /* TypeParameter */: + case 233 /* ExpressionWithTypeArguments */: + case 183 /* TypeReference */: + case 194 /* ConditionalType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 205 /* ImportType */: return true; } return false; @@ -109467,16 +111236,17 @@ ${lanes.join("\n")} transformers.push(transformTypeScript); if (compilerOptions.experimentalDecorators) { transformers.push(transformLegacyDecorators); - } else if (languageVersion < 99 /* ESNext */ || !useDefineForClassFields) { - transformers.push(transformESDecorators); } - transformers.push(transformClassFields); if (getJSXTransformEnabled(compilerOptions)) { transformers.push(transformJsx); } if (languageVersion < 99 /* ESNext */) { transformers.push(transformESNext); } + if (!compilerOptions.experimentalDecorators && (languageVersion < 99 /* ESNext */ || !useDefineForClassFields)) { + transformers.push(transformESDecorators); + } + transformers.push(transformClassFields); if (languageVersion < 8 /* ES2021 */) { transformers.push(transformES2021); } @@ -109535,7 +111305,7 @@ ${lanes.join("\n")} } function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { var _a, _b; - const enabledSyntaxKindFeatures = new Array(362 /* Count */); + const enabledSyntaxKindFeatures = new Array(363 /* Count */); let lexicalEnvironmentVariableDeclarations; let lexicalEnvironmentFunctionDeclarations; let lexicalEnvironmentStatements; @@ -109614,7 +111384,7 @@ ${lanes.join("\n")} state = 1 /* Initialized */; const transformed = []; for (const node of nodes) { - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 311 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 312 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); (_b = tracing) == null ? void 0 : _b.pop(); } @@ -109942,7 +111712,7 @@ ${lanes.join("\n")} } function getOutputPathsFor(sourceFile, host, forceDtsPaths) { const options = host.getCompilerOptions(); - if (sourceFile.kind === 312 /* Bundle */) { + if (sourceFile.kind === 313 /* Bundle */) { return getOutputPathsForBundle(options, forceDtsPaths); } else { const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); @@ -110334,8 +112104,8 @@ ${lanes.join("\n")} } function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, mapOptions) { const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 312 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 311 /* SourceFile */ ? sourceFileOrBundle : void 0; + const bundle = sourceFileOrBundle.kind === 313 /* Bundle */ ? sourceFileOrBundle : void 0; + const sourceFile = sourceFileOrBundle.kind === 312 /* SourceFile */ ? sourceFileOrBundle : void 0; const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; let sourceMapGenerator; if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { @@ -110397,7 +112167,7 @@ ${lanes.join("\n")} writer.clear(); } function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 311 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); + return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 312 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); } function getSourceRoot(mapOptions) { const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); @@ -110717,11 +112487,11 @@ ${lanes.join("\n")} break; } switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return printFile(node); - case 312 /* Bundle */: + case 313 /* Bundle */: return printBundle(node); - case 313 /* UnparsedSource */: + case 314 /* UnparsedSource */: return printUnparsedSource(node); } writeNode(hint, node, sourceFile, beginPrint()); @@ -111100,301 +112870,301 @@ ${lanes.join("\n")} return emitIdentifier(node); case 81 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: return emitQualifiedName(node); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return emitTypeParameter(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return emitParameter(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return emitDecorator(node); - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return emitPropertySignature(node); - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return emitPropertyDeclaration(node); - case 172 /* MethodSignature */: + case 173 /* MethodSignature */: return emitMethodSignature(node); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return emitMethodDeclaration(node); - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: return emitClassStaticBlockDeclaration(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return emitConstructor(node); - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return emitAccessorDeclaration(node); - case 178 /* CallSignature */: + case 179 /* CallSignature */: return emitCallSignature(node); - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return emitConstructSignature(node); - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return emitIndexSignature(node); - case 181 /* TypePredicate */: + case 182 /* TypePredicate */: return emitTypePredicate(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return emitTypeReference(node); - case 183 /* FunctionType */: + case 184 /* FunctionType */: return emitFunctionType(node); - case 184 /* ConstructorType */: + case 185 /* ConstructorType */: return emitConstructorType(node); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return emitTypeQuery(node); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return emitTypeLiteral(node); - case 187 /* ArrayType */: + case 188 /* ArrayType */: return emitArrayType(node); - case 188 /* TupleType */: + case 189 /* TupleType */: return emitTupleType(node); - case 189 /* OptionalType */: + case 190 /* OptionalType */: return emitOptionalType(node); - case 191 /* UnionType */: + case 192 /* UnionType */: return emitUnionType(node); - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return emitIntersectionType(node); - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return emitConditionalType(node); - case 194 /* InferType */: + case 195 /* InferType */: return emitInferType(node); - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return emitParenthesizedType(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 196 /* ThisType */: + case 197 /* ThisType */: return emitThisType(); - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return emitTypeOperator(node); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: return emitIndexedAccessType(node); - case 199 /* MappedType */: + case 200 /* MappedType */: return emitMappedType(node); - case 200 /* LiteralType */: + case 201 /* LiteralType */: return emitLiteralType(node); - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return emitNamedTupleMember(node); - case 202 /* TemplateLiteralType */: + case 203 /* TemplateLiteralType */: return emitTemplateType(node); - case 203 /* TemplateLiteralTypeSpan */: + case 204 /* TemplateLiteralTypeSpan */: return emitTemplateTypeSpan(node); - case 204 /* ImportType */: + case 205 /* ImportType */: return emitImportTypeNode(node); - case 205 /* ObjectBindingPattern */: + case 206 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return emitBindingElement(node); - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return emitTemplateSpan(node); - case 239 /* SemicolonClassElement */: + case 240 /* SemicolonClassElement */: return emitSemicolonClassElement(); - case 240 /* Block */: + case 241 /* Block */: return emitBlock(node); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return emitVariableStatement(node); - case 241 /* EmptyStatement */: + case 242 /* EmptyStatement */: return emitEmptyStatement( /*isEmbeddedStatement*/ false ); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return emitExpressionStatement(node); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return emitIfStatement(node); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return emitDoStatement(node); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return emitWhileStatement(node); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return emitForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return emitForInStatement(node); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return emitForOfStatement(node); - case 250 /* ContinueStatement */: + case 251 /* ContinueStatement */: return emitContinueStatement(node); - case 251 /* BreakStatement */: + case 252 /* BreakStatement */: return emitBreakStatement(node); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return emitReturnStatement(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return emitWithStatement(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return emitSwitchStatement(node); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return emitLabeledStatement(node); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return emitThrowStatement(node); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return emitTryStatement(node); - case 258 /* DebuggerStatement */: + case 259 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return emitVariableDeclarationList(node); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return emitFunctionDeclaration(node); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return emitClassDeclaration(node); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return emitTypeAliasDeclaration(node); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return emitModuleBlock(node); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return emitCaseBlock(node); - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: return emitNamespaceExportDeclaration(node); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return emitImportDeclaration(node); - case 272 /* ImportClause */: + case 273 /* ImportClause */: return emitImportClause(node); - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: return emitNamespaceImport(node); - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: return emitNamespaceExport(node); - case 274 /* NamedImports */: + case 275 /* NamedImports */: return emitNamedImports(node); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return emitImportSpecifier(node); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return emitExportAssignment(node); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return emitExportDeclaration(node); - case 278 /* NamedExports */: + case 279 /* NamedExports */: return emitNamedExports(node); - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: return emitExportSpecifier(node); - case 299 /* AssertClause */: + case 300 /* AssertClause */: return emitAssertClause(node); - case 300 /* AssertEntry */: + case 301 /* AssertEntry */: return emitAssertEntry(node); - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return; - case 282 /* ExternalModuleReference */: + case 283 /* ExternalModuleReference */: return emitExternalModuleReference(node); case 12 /* JsxText */: return emitJsxText(node); - case 285 /* JsxOpeningElement */: - case 288 /* JsxOpeningFragment */: + case 286 /* JsxOpeningElement */: + case 289 /* JsxOpeningFragment */: return emitJsxOpeningElementOrFragment(node); - case 286 /* JsxClosingElement */: - case 289 /* JsxClosingFragment */: + case 287 /* JsxClosingElement */: + case 290 /* JsxClosingFragment */: return emitJsxClosingElementOrFragment(node); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return emitJsxAttribute(node); - case 291 /* JsxAttributes */: + case 292 /* JsxAttributes */: return emitJsxAttributes(node); - case 292 /* JsxSpreadAttribute */: + case 293 /* JsxSpreadAttribute */: return emitJsxSpreadAttribute(node); - case 293 /* JsxExpression */: + case 294 /* JsxExpression */: return emitJsxExpression(node); - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return emitJsxNamespacedName(node); - case 295 /* CaseClause */: + case 296 /* CaseClause */: return emitCaseClause(node); - case 296 /* DefaultClause */: + case 297 /* DefaultClause */: return emitDefaultClause(node); - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: return emitHeritageClause(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return emitCatchClause(node); - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return emitSpreadAssignment(node); - case 305 /* EnumMember */: + case 306 /* EnumMember */: return emitEnumMember(node); - case 306 /* UnparsedPrologue */: + case 307 /* UnparsedPrologue */: return writeUnparsedNode(node); - case 313 /* UnparsedSource */: - case 307 /* UnparsedPrepend */: + case 314 /* UnparsedSource */: + case 308 /* UnparsedPrepend */: return emitUnparsedSourceOrPrepend(node); - case 308 /* UnparsedText */: - case 309 /* UnparsedInternalText */: + case 309 /* UnparsedText */: + case 310 /* UnparsedInternalText */: return emitUnparsedTextLike(node); - case 310 /* UnparsedSyntheticReference */: + case 311 /* UnparsedSyntheticReference */: return emitUnparsedSyntheticReference(node); - case 311 /* SourceFile */: + case 312 /* SourceFile */: return emitSourceFile(node); - case 312 /* Bundle */: + case 313 /* Bundle */: return Debug.fail("Bundles should be printed using printBundle"); - case 314 /* InputFiles */: + case 315 /* InputFiles */: return Debug.fail("InputFiles should not be printed"); - case 315 /* JSDocTypeExpression */: + case 316 /* JSDocTypeExpression */: return emitJSDocTypeExpression(node); - case 316 /* JSDocNameReference */: + case 317 /* JSDocNameReference */: return emitJSDocNameReference(node); - case 318 /* JSDocAllType */: + case 319 /* JSDocAllType */: return writePunctuation("*"); - case 319 /* JSDocUnknownType */: + case 320 /* JSDocUnknownType */: return writePunctuation("?"); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return emitJSDocNullableType(node); - case 321 /* JSDocNonNullableType */: + case 322 /* JSDocNonNullableType */: return emitJSDocNonNullableType(node); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return emitJSDocOptionalType(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return emitJSDocFunctionType(node); - case 190 /* RestType */: - case 324 /* JSDocVariadicType */: + case 191 /* RestType */: + case 325 /* JSDocVariadicType */: return emitRestOrJSDocVariadicType(node); - case 325 /* JSDocNamepathType */: + case 326 /* JSDocNamepathType */: return; - case 326 /* JSDoc */: + case 327 /* JSDoc */: return emitJSDoc(node); - case 328 /* JSDocTypeLiteral */: + case 329 /* JSDocTypeLiteral */: return emitJSDocTypeLiteral(node); - case 329 /* JSDocSignature */: + case 330 /* JSDocSignature */: return emitJSDocSignature(node); - case 333 /* JSDocTag */: - case 338 /* JSDocClassTag */: - case 343 /* JSDocOverrideTag */: + case 334 /* JSDocTag */: + case 339 /* JSDocClassTag */: + case 344 /* JSDocOverrideTag */: return emitJSDocSimpleTag(node); - case 334 /* JSDocAugmentsTag */: - case 335 /* JSDocImplementsTag */: + case 335 /* JSDocAugmentsTag */: + case 336 /* JSDocImplementsTag */: return emitJSDocHeritageTag(node); - case 336 /* JSDocAuthorTag */: - case 337 /* JSDocDeprecatedTag */: + case 337 /* JSDocAuthorTag */: + case 338 /* JSDocDeprecatedTag */: return; - case 339 /* JSDocPublicTag */: - case 340 /* JSDocPrivateTag */: - case 341 /* JSDocProtectedTag */: - case 342 /* JSDocReadonlyTag */: + case 340 /* JSDocPublicTag */: + case 341 /* JSDocPrivateTag */: + case 342 /* JSDocProtectedTag */: + case 343 /* JSDocReadonlyTag */: return; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: return emitJSDocCallbackTag(node); - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return emitJSDocOverloadTag(node); - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: return emitJSDocPropertyLikeTag(node); - case 346 /* JSDocEnumTag */: - case 348 /* JSDocReturnTag */: - case 349 /* JSDocThisTag */: - case 350 /* JSDocTypeTag */: - case 355 /* JSDocThrowsTag */: - case 356 /* JSDocSatisfiesTag */: + case 347 /* JSDocEnumTag */: + case 349 /* JSDocReturnTag */: + case 350 /* JSDocThisTag */: + case 351 /* JSDocTypeTag */: + case 356 /* JSDocThrowsTag */: + case 357 /* JSDocSatisfiesTag */: return emitJSDocSimpleTypedTag(node); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return emitJSDocTemplateTag(node); - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return emitJSDocTypedefTag(node); - case 353 /* JSDocSeeTag */: + case 354 /* JSDocSeeTag */: return emitJSDocSeeTag(node); - case 358 /* NotEmittedStatement */: + case 359 /* NotEmittedStatement */: return; } if (isExpression(node)) { @@ -111427,83 +113197,83 @@ ${lanes.join("\n")} return emitIdentifier(node); case 81 /* PrivateIdentifier */: return emitPrivateIdentifier(node); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return emitArrayLiteralExpression(node); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return emitObjectLiteralExpression(node); - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return emitPropertyAccessExpression(node); - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return emitElementAccessExpression(node); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return emitCallExpression(node); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return emitNewExpression(node); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return emitTypeAssertionExpression(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return emitParenthesizedExpression(node); - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: return emitFunctionExpression(node); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return emitArrowFunction(node); - case 219 /* DeleteExpression */: + case 220 /* DeleteExpression */: return emitDeleteExpression(node); - case 220 /* TypeOfExpression */: + case 221 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 221 /* VoidExpression */: + case 222 /* VoidExpression */: return emitVoidExpression(node); - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: return emitAwaitExpression(node); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return emitBinaryExpression(node); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return emitConditionalExpression(node); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return emitTemplateExpression(node); - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return emitYieldExpression(node); - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return emitSpreadElement(node); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return emitClassExpression(node); - case 231 /* OmittedExpression */: + case 232 /* OmittedExpression */: return; - case 233 /* AsExpression */: + case 234 /* AsExpression */: return emitAsExpression(node); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return emitNonNullExpression(node); - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(node); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return emitSatisfiesExpression(node); - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return emitMetaProperty(node); - case 236 /* SyntheticExpression */: + case 237 /* SyntheticExpression */: return Debug.fail("SyntheticExpression should never be printed."); - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return; - case 283 /* JsxElement */: + case 284 /* JsxElement */: return emitJsxElement(node); - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: return emitJsxSelfClosingElement(node); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return emitJsxFragment(node); - case 357 /* SyntaxList */: + case 358 /* SyntaxList */: return Debug.fail("SyntaxList should not be printed"); - case 358 /* NotEmittedStatement */: + case 359 /* NotEmittedStatement */: return; - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return emitPartiallyEmittedExpression(node); - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return emitCommaList(node); - case 361 /* SyntheticReferenceExpression */: + case 362 /* SyntheticReferenceExpression */: return Debug.fail("SyntheticReferenceExpression should not be printed"); } } @@ -111549,7 +113319,7 @@ ${lanes.join("\n")} } function emitHelpers(node) { let helpersEmitted = false; - const bundle = node.kind === 312 /* Bundle */ ? node : void 0; + const bundle = node.kind === 313 /* Bundle */ ? node : void 0; if (bundle && moduleKind === 0 /* None */) { return; } @@ -111624,7 +113394,7 @@ ${lanes.join("\n")} updateOrPushBundleFileTextLike( pos, writer.getTextPos(), - unparsed.kind === 308 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ + unparsed.kind === 309 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ ); } } @@ -111660,7 +113430,7 @@ ${lanes.join("\n")} } function emitTabStop(hint, node, snippet) { Debug.assert( - node.kind === 241 /* EmptyStatement */, + node.kind === 242 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` ); Debug.assert( @@ -111732,7 +113502,7 @@ ${lanes.join("\n")} emit(node.dotDotDotToken); emitNodeWithWriter(node.name, writeParameter); emit(node.questionToken); - if (node.parent && node.parent.kind === 323 /* JSDocFunctionType */ && !node.name) { + if (node.parent && node.parent.kind === 324 /* JSDocFunctionType */ && !node.name) { emit(node.type); } else { emitTypeAnnotation(node.type); @@ -111808,7 +113578,7 @@ ${lanes.join("\n")} /*allowDecorators*/ true ); - const token = node.kind === 176 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; + const token = node.kind === 177 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; emitTokenWithComment(token, pos, writeKeyword, node); writeSpace(); emit(node.name); @@ -112162,7 +113932,7 @@ ${lanes.join("\n")} return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */)); } else if (isAccessExpression(expression)) { const constantValue = getConstantValue(expression); - return typeof constantValue === "number" && isFinite(constantValue) && Math.floor(constantValue) === constantValue; + return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue; } } function emitElementAccessExpression(node) { @@ -112273,7 +114043,7 @@ ${lanes.join("\n")} } function shouldEmitWhitespaceBeforeOperand(node) { const operand = node.operand; - return operand.kind === 223 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); + return operand.kind === 224 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); } function emitPostfixUnaryExpression(node) { emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary); @@ -112532,7 +114302,7 @@ ${lanes.join("\n")} if (node.elseStatement) { writeLineOrSpace(node, node.thenStatement, node.elseStatement); emitTokenWithComment(93 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 244 /* IfStatement */) { + if (node.elseStatement.kind === 245 /* IfStatement */) { writeSpace(); emit(node.elseStatement); } else { @@ -112599,7 +114369,7 @@ ${lanes.join("\n")} emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); emitForBinding(node.initializer); writeSpace(); - emitTokenWithComment(164 /* OfKeyword */, node.initializer.end, writeKeyword, node); + emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node); writeSpace(); emitExpression(node.expression); emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node); @@ -112607,7 +114377,7 @@ ${lanes.join("\n")} } function emitForBinding(node) { if (node !== void 0) { - if (node.kind === 260 /* VariableDeclarationList */) { + if (node.kind === 261 /* VariableDeclarationList */) { emit(node); } else { emitExpression(node); @@ -112643,7 +114413,7 @@ ${lanes.join("\n")} } pos = writeTokenText(token, writer2, pos); if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 293 /* JsxExpression */; + const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */; emitTrailingCommentsOfPosition( pos, /*prefixSpace*/ @@ -112755,7 +114525,14 @@ ${lanes.join("\n")} emitInitializer(node.initializer, ((_a = node.type) == null ? void 0 : _a.end) ?? ((_c = (_b = node.name.emitNode) == null ? void 0 : _b.typeNode) == null ? void 0 : _c.end) ?? node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma); } function emitVariableDeclarationList(node) { - writeKeyword(isLet(node) ? "let" : isVarConst(node) ? "const" : "var"); + if (isVarAwaitUsing(node)) { + writeKeyword("await"); + writeSpace(); + writeKeyword("using"); + } else { + const head = isLet(node) ? "let" : isVarConst(node) ? "const" : isVarUsing(node) ? "using" : "var"; + writeKeyword(head); + } writeSpace(); emitList(node, node.declarations, 528 /* VariableDeclarationList */); } @@ -112964,8 +114741,8 @@ ${lanes.join("\n")} /*allowDecorators*/ false ); - if (~node.flags & 1024 /* GlobalAugmentation */) { - writeKeyword(node.flags & 16 /* Namespace */ ? "namespace" : "module"); + if (~node.flags & 2048 /* GlobalAugmentation */) { + writeKeyword(node.flags & 32 /* Namespace */ ? "namespace" : "module"); writeSpace(); } emit(node.name); @@ -113041,7 +114818,7 @@ ${lanes.join("\n")} if (node.importClause) { emit(node.importClause); writeSpace(); - emitTokenWithComment(160 /* FromKeyword */, node.importClause.end, writeKeyword, node); + emitTokenWithComment(161 /* FromKeyword */, node.importClause.end, writeKeyword, node); writeSpace(); } emitExpression(node.moduleSpecifier); @@ -113108,7 +114885,7 @@ ${lanes.join("\n")} if (node.moduleSpecifier) { writeSpace(); const fromPos = node.exportClause ? node.exportClause.end : nextPos; - emitTokenWithComment(160 /* FromKeyword */, fromPos, writeKeyword, node); + emitTokenWithComment(161 /* FromKeyword */, fromPos, writeKeyword, node); writeSpace(); emitExpression(node.moduleSpecifier); } @@ -113363,7 +115140,7 @@ ${lanes.join("\n")} } } if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 350 /* JSDocTypeTag */ && !node.comment) { + if (node.tags.length === 1 && node.tags[0].kind === 351 /* JSDocTypeTag */ && !node.comment) { writeSpace(); emit(node.tags[0]); } else { @@ -113407,7 +115184,7 @@ ${lanes.join("\n")} function emitJSDocTypedefTag(tag) { emitJSDocTagName(tag.tagName); if (tag.typeExpression) { - if (tag.typeExpression.kind === 315 /* JSDocTypeExpression */) { + if (tag.typeExpression.kind === 316 /* JSDocTypeExpression */) { emitJSDocTypeExpression(tag.typeExpression); } else { writeSpace(); @@ -113425,7 +115202,7 @@ ${lanes.join("\n")} emit(tag.fullName); } emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 328 /* JSDocTypeLiteral */) { + if (tag.typeExpression && tag.typeExpression.kind === 329 /* JSDocTypeLiteral */) { emitJSDocTypeLiteral(tag.typeExpression); } } @@ -114308,7 +116085,7 @@ ${lanes.join("\n")} return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); } function skipSynthesizedParentheses(node) { - while (node.kind === 216 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { + while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { node = node.expression; } return node; @@ -114395,84 +116172,84 @@ ${lanes.join("\n")} if (!node) return; switch (node.kind) { - case 240 /* Block */: + case 241 /* Block */: forEach(node.statements, generateNames); break; - case 255 /* LabeledStatement */: - case 253 /* WithStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 256 /* LabeledStatement */: + case 254 /* WithStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: generateNames(node.statement); break; - case 244 /* IfStatement */: + case 245 /* IfStatement */: generateNames(node.thenStatement); generateNames(node.elseStatement); break; - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: generateNames(node.initializer); generateNames(node.statement); break; - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: generateNames(node.caseBlock); break; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: forEach(node.clauses, generateNames); break; - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: forEach(node.statements, generateNames); break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: generateNames(node.tryBlock); generateNames(node.catchClause); generateNames(node.finallyBlock); break; - case 298 /* CatchClause */: + case 299 /* CatchClause */: generateNames(node.variableDeclaration); generateNames(node.block); break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: generateNames(node.declarationList); break; - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: forEach(node.declarations, generateNames); break; - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: generateNameIfNeeded(node.name); break; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: generateNameIfNeeded(node.name); if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { forEach(node.parameters, generateNames); generateNames(node.body); } break; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: forEach(node.elements, generateNames); break; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: generateNames(node.importClause); break; - case 272 /* ImportClause */: + case 273 /* ImportClause */: generateNameIfNeeded(node.name); generateNames(node.namedBindings); break; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: generateNameIfNeeded(node.name); break; - case 279 /* NamespaceExport */: + case 280 /* NamespaceExport */: generateNameIfNeeded(node.name); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: forEach(node.elements, generateNames); break; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: generateNameIfNeeded(node.propertyName || node.name); break; } @@ -114481,12 +116258,12 @@ ${lanes.join("\n")} if (!node) return; switch (node.kind) { - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: generateNameIfNeeded(node.name); break; } @@ -114744,16 +116521,16 @@ ${lanes.join("\n")} prefix, suffix ); - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForModuleOrEnum(node); - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForImportOrExportDeclaration(node); - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: { + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: { Debug.assert(!prefix && !suffix && !privateName); const name = node.name; if (name && !isGeneratedIdentifier(name)) { @@ -114768,17 +116545,17 @@ ${lanes.join("\n")} } return generateNameForExportDefault(); } - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForExportDefault(); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: Debug.assert(!prefix && !suffix && !privateName); return generateNameForClassExpression(); - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return makeTempVariableName( 0 /* Auto */, /*reservedInNestedScopes*/ @@ -114872,7 +116649,7 @@ ${lanes.join("\n")} emitLeadingComments( pos, /*isEmittedNode*/ - node.kind !== 358 /* NotEmittedStatement */ + node.kind !== 359 /* NotEmittedStatement */ ); } if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) { @@ -114880,7 +116657,7 @@ ${lanes.join("\n")} } if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) { containerEnd = end; - if (node.kind === 260 /* VariableDeclarationList */) { + if (node.kind === 261 /* VariableDeclarationList */) { declarationListContainerEnd = end; } } @@ -114896,7 +116673,7 @@ ${lanes.join("\n")} containerPos = savedContainerPos; containerEnd = savedContainerEnd; declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 358 /* NotEmittedStatement */) { + if (!skipTrailingComments && node.kind !== 359 /* NotEmittedStatement */) { emitTrailingComments(end); } } @@ -115168,7 +116945,7 @@ ${lanes.join("\n")} } } else { const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { + if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); } if (emitFlags & 128 /* NoNestedSourceMaps */) { @@ -115183,7 +116960,7 @@ ${lanes.join("\n")} if (emitFlags & 128 /* NoNestedSourceMaps */) { sourceMapsDisabled = false; } - if (node.kind !== 358 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { + if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); } } @@ -115350,14 +117127,14 @@ ${lanes.join("\n")} }); // src/compiler/watchUtilities.ts - function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames) { + function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) { if (!host.getDirectories || !host.readDirectory) { return void 0; } const cachedReadDirectoryResult = /* @__PURE__ */ new Map(); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); return { - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, fileExists, readFile: (path, encoding) => host.readFile(path, encoding), directoryExists: host.directoryExists && directoryExists, @@ -115479,7 +117256,7 @@ ${lanes.join("\n")} const rootResult = tryReadDirectory2(rootDir, rootDirPath); let rootSymLinkResult; if (rootResult !== void 0) { - return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath); + return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath); } return host.readDirectory(rootDir, extensions, excludes, includes, depth); function getFileSystemEntries(dir) { @@ -115674,7 +117451,7 @@ ${lanes.join("\n")} program, extraFileExtensions, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 }) { @@ -115690,7 +117467,7 @@ ${lanes.join("\n")} writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`); return true; } - if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) { + if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) { writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`); return true; } @@ -115747,7 +117524,7 @@ ${lanes.join("\n")} function createExcludeHandlingAddWatch(key) { return (file, cb, flags, options, detailInfo1, detailInfo2) => { var _a; - return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call( + return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call( /*thisArgs*/ void 0, file, @@ -115759,7 +117536,7 @@ ${lanes.join("\n")} ) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2); }; } - function useCaseSensitiveFileNames() { + function useCaseSensitiveFileNames2() { return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames(); } function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) { @@ -117260,13 +119037,13 @@ ${lanes.join("\n")} sourceFileOptions, /*onError*/ void 0, - shouldCreateNewSourceFile || sourceFileOptions.impliedNodeFormat !== oldSourceFile.impliedNodeFormat + shouldCreateNewSourceFile ) : host.getSourceFile( oldSourceFile.fileName, sourceFileOptions, /*onError*/ void 0, - shouldCreateNewSourceFile || sourceFileOptions.impliedNodeFormat !== oldSourceFile.impliedNodeFormat + shouldCreateNewSourceFile ); if (!newSourceFile) { return 0 /* Not */; @@ -117317,7 +119094,7 @@ ${lanes.join("\n")} structureIsReused = 1 /* SafeModules */; } else if (!arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) { structureIsReused = 1 /* SafeModules */; - } else if ((oldSourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */) !== (newSourceFile.flags & 6291456 /* PermanentlySetIncrementalFlags */)) { + } else if ((oldSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */) !== (newSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */)) { structureIsReused = 1 /* SafeModules */; } else if (!arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) { structureIsReused = 1 /* SafeModules */; @@ -117708,89 +119485,97 @@ ${lanes.join("\n")} return diagnostics; function walk(node, parent2) { switch (parent2.kind) { - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: if (parent2.questionToken === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); return "skip"; } - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 259 /* VariableDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 260 /* VariableDeclaration */: if (parent2.type === node) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); return "skip"; } } switch (node.kind) { - case 272 /* ImportClause */: + case 273 /* ImportClause */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); return "skip"; } break; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: if (node.isTypeOnly) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? "import...type" : "export...type")); return "skip"; } break; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); return "skip"; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 297 /* HeritageClause */: + case 298 /* HeritageClause */: const heritageClause = node; if (heritageClause.token === 119 /* ImplementsKeyword */) { diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: const interfaceKeyword = tokenToString(120 /* InterfaceKeyword */); Debug.assertIsDefined(interfaceKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); return "skip"; - case 266 /* ModuleDeclaration */: - const moduleKeyword = node.flags & 16 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */); + case 267 /* ModuleDeclaration */: + const moduleKeyword = node.flags & 32 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */); Debug.assertIsDefined(moduleKeyword); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); return "skip"; - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); return "skip"; - case 265 /* EnumDeclaration */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + if (!node.body) { + diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Signature_declarations_can_only_be_used_in_TypeScript_files)); + return "skip"; + } + return; + case 266 /* EnumDeclaration */: const enumKeyword = Debug.checkDefined(tokenToString(94 /* EnumKeyword */)); diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); return "skip"; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 233 /* AsExpression */: + case 234 /* AsExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); return "skip"; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: Debug.fail(); } } @@ -117825,26 +119610,26 @@ ${lanes.join("\n")} } } switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: if (nodes === parent2.typeParameters) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); return "skip"; } - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 242 /* VariableStatement */); + checkModifiers(parent2.modifiers, parent2.kind === 243 /* VariableStatement */); return "skip"; } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (nodes === parent2.modifiers) { for (const modifier of nodes) { if (isModifier(modifier) && modifier.kind !== 126 /* StaticKeyword */ && modifier.kind !== 129 /* AccessorKeyword */) { @@ -117854,18 +119639,18 @@ ${lanes.join("\n")} return "skip"; } break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (nodes === parent2.modifiers && some(nodes, isModifier)) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); return "skip"; } break; - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: - case 214 /* TaggedTemplateExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 215 /* TaggedTemplateExpression */: if (nodes === parent2.typeArguments) { diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); return "skip"; @@ -117886,7 +119671,7 @@ ${lanes.join("\n")} case 148 /* ReadonlyKeyword */: case 138 /* DeclareKeyword */: case 128 /* AbstractKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); @@ -117984,8 +119769,8 @@ ${lanes.join("\n")} addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */); setParent(externalHelpersModuleReference, importDecl); setParent(importDecl, file); - externalHelpersModuleReference.flags &= ~8 /* Synthesized */; - importDecl.flags &= ~8 /* Synthesized */; + externalHelpersModuleReference.flags &= ~16 /* Synthesized */; + importDecl.flags &= ~16 /* Synthesized */; return externalHelpersModuleReference; } function collectExternalModuleReferences(file) { @@ -118014,7 +119799,7 @@ ${lanes.join("\n")} ); } const shouldProcessRequires = isJavaScriptFile && shouldResolveJsRequire(options); - if (file.flags & 2097152 /* PossiblyContainsDynamicImport */ || shouldProcessRequires) { + if (file.flags & 4194304 /* PossiblyContainsDynamicImport */ || shouldProcessRequires) { collectDynamicImportOrRequireCalls(file); } file.imports = imports || emptyArray; @@ -118222,7 +120007,7 @@ ${lanes.join("\n")} return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 }; } function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) { - var _a2, _b2; + var _a2; const path = toPath3(fileName); if (useSourceOfProjectReferenceRedirect) { let source = getSourceOfProjectReferenceRedirect(path); @@ -118301,7 +120086,7 @@ ${lanes.join("\n")} Diagnostics.Cannot_read_file_0_Colon_1, [fileName, hostErrorMessage] ), - shouldCreateNewSourceFile || ((_a2 = oldProgram == null ? void 0 : oldProgram.getSourceFileByPath(toPath3(fileName))) == null ? void 0 : _a2.impliedNodeFormat) !== sourceFileOptions.impliedNodeFormat + shouldCreateNewSourceFile ); if (packageId) { const packageIdKey = packageIdToString(packageId); @@ -118326,7 +120111,7 @@ ${lanes.join("\n")} file.path = path; file.resolvedPath = toPath3(fileName); file.originalFileName = originalFileName; - file.packageJsonLocations = ((_b2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _b2.length) ? sourceFileOptions.packageJsonLocations : void 0; + file.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0; file.packageJsonScope = sourceFileOptions.packageJsonScope; addFileIncludeReason(file, reason); if (host.useCaseSensitiveFileNames()) { @@ -118636,7 +120421,7 @@ ${lanes.join("\n")} currentNodeModulesDepth++; } const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth; - const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index]) || !(file.imports[index].flags & 8388608 /* JSDoc */)); + const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index]) || !(file.imports[index].flags & 16777216 /* JSDoc */)); if (elideImport) { modulesWithElidedImports.set(file.path, true); } else if (shouldAddFile) { @@ -118995,6 +120780,13 @@ ${lanes.join("\n")} if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind)) { createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later, "bundler"); } + if (ModuleKind[moduleKind] && (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) && !(3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) { + const moduleKindName = ModuleKind[moduleKind]; + createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleKindName, moduleKindName); + } else if (ModuleResolutionKind[moduleResolution] && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */) && !(100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */)) { + const moduleResolutionName = ModuleResolutionKind[moduleResolution]; + createOptionValueDiagnostic("module", Diagnostics.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, moduleResolutionName, moduleResolutionName); + } if (!options.noEmit && !options.suppressOutputPathCheck) { const emitHost = getEmitHost(); const emitFilesSeen = /* @__PURE__ */ new Set(); @@ -119684,6 +121476,9 @@ ${lanes.join("\n")} return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); }, readFile: (f) => directoryStructureHost.readFile(f), + directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists), + getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories), + realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(), getCurrentDirectory: () => host.getCurrentDirectory(), onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined, @@ -119860,7 +121655,7 @@ ${lanes.join("\n")} Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code, Diagnostics.Duplicate_label_0.code, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, - Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block.code, + Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code, @@ -119890,14 +121685,17 @@ ${lanes.join("\n")} Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind.code, Diagnostics._0_modifier_cannot_be_used_here.code, Diagnostics._0_modifier_must_precede_1_modifier.code, - Diagnostics.const_declarations_can_only_be_declared_inside_a_block.code, - Diagnostics.const_declarations_must_be_initialized.code, + Diagnostics._0_declarations_can_only_be_declared_inside_a_block.code, + Diagnostics._0_declarations_must_be_initialized.code, Diagnostics.extends_clause_already_seen.code, - Diagnostics.let_declarations_can_only_be_declared_inside_a_block.code, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code, Diagnostics.Class_constructor_may_not_be_a_generator.code, Diagnostics.Class_constructor_may_not_be_an_accessor.code, - Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code + Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class.code, + // Type errors + Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code ]); emitSkippedWithNoDiagnostics = { diagnostics: emptyArray, sourceMaps: void 0, emittedFiles: void 0, emitSkipped: true }; } @@ -122733,17 +124531,17 @@ ${lanes.join("\n")} function getWatchErrorSummaryDiagnosticMessage(errorCount) { return errorCount === 1 ? Diagnostics.Found_1_error_Watching_for_file_changes : Diagnostics.Found_0_errors_Watching_for_file_changes; } - function prettyPathForFileError(error, cwd) { - const line = formatColorAndReset(":" + error.line, "\x1B[90m" /* Grey */); - if (pathIsAbsolute(error.fileName) && pathIsAbsolute(cwd)) { + function prettyPathForFileError(error2, cwd) { + const line = formatColorAndReset(":" + error2.line, "\x1B[90m" /* Grey */); + if (pathIsAbsolute(error2.fileName) && pathIsAbsolute(cwd)) { return getRelativePathFromDirectory( cwd, - error.fileName, + error2.fileName, /*ignoreCase*/ false ) + line; } - return error.fileName + line; + return error2.fileName + line; } function getErrorSummaryText(errorCount, filesInError, newLine, host) { if (errorCount === 0) @@ -122876,12 +124674,12 @@ ${lanes.join("\n")} return true; const isJsonFile = fileExtensionIs(fileName, ".json" /* Json */); const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory())); - const useCaseSensitiveFileNames = program.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames(); return find((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => { if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */)) return false; const pattern = getPatternFromSpec(includeSpec, basePath, "files"); - return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames).test(fileName); + return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName); }); } function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) { @@ -123085,7 +124883,7 @@ ${lanes.join("\n")} return result; } function createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) { - const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames(); const compilerHost = { getSourceFile: createGetSourceFile( (fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding), @@ -123101,8 +124899,8 @@ ${lanes.join("\n")} (path) => host.directoryExists(path) ), getCurrentDirectory: memoize(() => host.getCurrentDirectory()), - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, - getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames), + useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, + getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2), getNewLine: () => getNewLineCharacter(getCompilerOptions()), fileExists: (f) => host.fileExists(f), readFile: (f) => host.readFile(f), @@ -123383,7 +125181,7 @@ ${lanes.join("\n")} const sourceFilesCache = /* @__PURE__ */ new Map(); let missingFilePathsRequestedForRelease; let hasChangedCompilerOptions = false; - const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames(); + const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames(); const currentDirectory = host.getCurrentDirectory(); const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host; let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host; @@ -123391,7 +125189,7 @@ ${lanes.join("\n")} let configFileParsingDiagnostics; let canConfigFileJsonReportNoInputFiles = false; let hasChangedConfigFileParsingErrors = false; - const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames); + const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2); const directoryStructureHost = cachedDirectoryStructureHost || host; const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost); let newLine = updateNewLine(); @@ -123409,8 +125207,8 @@ ${lanes.join("\n")} Debug.assert(compilerOptions); Debug.assert(rootFileNames); const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); - writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); + writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`); let configFileWatcher; if (configFileName) { configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile); @@ -123519,7 +125317,6 @@ ${lanes.join("\n")} if (hasChangedCompilerOptions) { newLine = updateNewLine(); if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) { - debugger; resolutionCache.onChangesAffectModuleResolution(); } } @@ -123624,7 +125421,8 @@ ${lanes.join("\n")} if (isFileMissingOnHost(hostSourceFile)) { return void 0; } - if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile)) { + const impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : void 0; + if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile) || hostSourceFile.sourceFile.impliedNodeFormat !== impliedNodeFormat) { const sourceFile = getNewSourceFile(fileName, languageVersionOrOptions, onError); if (hostSourceFile) { if (sourceFile) { @@ -123915,7 +125713,7 @@ ${lanes.join("\n")} options: compilerOptions, program: getCurrentBuilderProgram() || rootFileNames, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 })) @@ -124005,7 +125803,7 @@ ${lanes.join("\n")} options: config.parsedCommandLine.options, program: config.parsedCommandLine.fileNames, currentDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, toPath: toPath3 })) @@ -126125,6 +127923,8 @@ ${lanes.join("\n")} init_sourcemap(); init_utilities3(); init_destructuring(); + init_classThis(); + init_namedEvaluation(); init_taggedTemplate(); init_ts(); init_classFields(); @@ -126781,6 +128581,8 @@ ${lanes.join("\n")} ScriptElementKind2["enumMemberElement"] = "enum member"; ScriptElementKind2["variableElement"] = "var"; ScriptElementKind2["localVariableElement"] = "local var"; + ScriptElementKind2["variableUsingElement"] = "using"; + ScriptElementKind2["variableAwaitUsingElement"] = "await using"; ScriptElementKind2["functionElement"] = "function"; ScriptElementKind2["localFunctionElement"] = "local function"; ScriptElementKind2["memberFunctionElement"] = "method"; @@ -126894,36 +128696,36 @@ ${lanes.join("\n")} // src/services/utilities.ts function getMeaningFromDeclaration(node) { switch (node.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 298 /* CatchClause */: - case 290 /* JsxAttribute */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 299 /* CatchClause */: + case 291 /* JsxAttribute */: return 1 /* Value */; - case 167 /* TypeParameter */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 186 /* TypeLiteral */: + case 168 /* TypeParameter */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 187 /* TypeLiteral */: return 2 /* Type */; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 305 /* EnumMember */: - case 262 /* ClassDeclaration */: + case 306 /* EnumMember */: + case 263 /* ClassDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { @@ -126931,15 +128733,15 @@ ${lanes.join("\n")} } else { return 4 /* Namespace */; } - case 265 /* EnumDeclaration */: - case 274 /* NamedImports */: - case 275 /* ImportSpecifier */: - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: + case 266 /* EnumDeclaration */: + case 275 /* NamedImports */: + case 276 /* ImportSpecifier */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: return 7 /* All */; - case 311 /* SourceFile */: + case 312 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 7 /* All */; @@ -126947,7 +128749,7 @@ ${lanes.join("\n")} function getMeaningFromLocation(node) { node = getAdjustedReferenceLocation(node); const parent2 = node.parent; - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return 1 /* Value */; } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7 /* All */; @@ -126971,11 +128773,11 @@ ${lanes.join("\n")} } } function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 165 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 270 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; + const name = node.kind === 166 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; + return name && name.parent.kind === 271 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; } function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 165 /* QualifiedName */) { + while (node.parent.kind === 166 /* QualifiedName */) { node = node.parent; } return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -126986,26 +128788,26 @@ ${lanes.join("\n")} function isQualifiedNameNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 165 /* QualifiedName */) { - while (root.parent && root.parent.kind === 165 /* QualifiedName */) { + if (root.parent.kind === 166 /* QualifiedName */) { + while (root.parent && root.parent.kind === 166 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 182 /* TypeReference */ && !isLastClause; + return root.parent.kind === 183 /* TypeReference */ && !isLastClause; } function isPropertyAccessNamespaceReference(node) { let root = node; let isLastClause = true; - if (root.parent.kind === 210 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 210 /* PropertyAccessExpression */) { + if (root.parent.kind === 211 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 211 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 232 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 297 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 233 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 298 /* HeritageClause */) { const decl = root.parent.parent.parent; - return decl.kind === 262 /* ClassDeclaration */ && root.parent.parent.token === 119 /* ImplementsKeyword */ || decl.kind === 263 /* InterfaceDeclaration */ && root.parent.parent.token === 96 /* ExtendsKeyword */; + return decl.kind === 263 /* ClassDeclaration */ && root.parent.parent.token === 119 /* ImplementsKeyword */ || decl.kind === 264 /* InterfaceDeclaration */ && root.parent.parent.token === 96 /* ExtendsKeyword */; } return false; } @@ -127016,15 +128818,15 @@ ${lanes.join("\n")} switch (node.kind) { case 110 /* ThisKeyword */: return !isExpressionNode(node); - case 196 /* ThisType */: + case 197 /* ThisType */: return true; } switch (node.parent.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return true; - case 204 /* ImportType */: + case 205 /* ImportType */: return !node.parent.isTypeOf; - case 232 /* ExpressionWithTypeArguments */: + case 233 /* ExpressionWithTypeArguments */: return isPartOfTypeNode(node.parent); } return false; @@ -127071,7 +128873,7 @@ ${lanes.join("\n")} } function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 255 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { + if (referenceNode.kind === 256 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -127121,22 +128923,22 @@ ${lanes.join("\n")} } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 302 /* PropertyAssignment */: - case 305 /* EnumMember */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 266 /* ModuleDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 303 /* PropertyAssignment */: + case 306 /* EnumMember */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 267 /* ModuleDeclaration */: return getNameOfDeclaration(node.parent) === node; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: return node.parent.argumentExpression === node; - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: return true; - case 200 /* LiteralType */: - return node.parent.parent.kind === 198 /* IndexedAccessType */; + case 201 /* LiteralType */: + return node.parent.parent.kind === 199 /* IndexedAccessType */; default: return false; } @@ -127154,83 +128956,83 @@ ${lanes.join("\n")} return void 0; } switch (node.kind) { - case 311 /* SourceFile */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 266 /* ModuleDeclaration */: + case 312 /* SourceFile */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: return node; } } } function getNodeKind(node) { switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return "module" /* moduleElement */; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return "class" /* classElement */; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return "interface" /* interfaceElement */; - case 264 /* TypeAliasDeclaration */: - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: + case 265 /* TypeAliasDeclaration */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: return "type" /* typeElement */; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return "enum" /* enumElement */; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return getKindOfVariableDeclaration(node); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return "function" /* functionElement */; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return "getter" /* memberGetAccessorElement */; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return "setter" /* memberSetAccessorElement */; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return "method" /* memberFunctionElement */; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: const { initializer } = node; return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return "property" /* memberVariableElement */; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return "index" /* indexSignatureElement */; - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return "construct" /* constructSignatureElement */; - case 178 /* CallSignature */: + case 179 /* CallSignature */: return "call" /* callSignatureElement */; - case 175 /* Constructor */: - case 174 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: return "constructor" /* constructorImplementationElement */; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: return "type parameter" /* typeParameterElement */; - case 305 /* EnumMember */: + case 306 /* EnumMember */: return "enum member" /* enumMemberElement */; - case 168 /* Parameter */: + case 169 /* Parameter */: return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: - case 273 /* NamespaceImport */: - case 279 /* NamespaceExport */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: + case 274 /* NamespaceImport */: + case 280 /* NamespaceExport */: return "alias" /* alias */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: const kind = getAssignmentDeclarationKind(node); const { right } = node; switch (kind) { @@ -127258,7 +129060,7 @@ ${lanes.join("\n")} } case 80 /* Identifier */: return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: const scriptKind = getNodeKind(node.expression); return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; default: @@ -127273,7 +129075,7 @@ ${lanes.join("\n")} case 110 /* ThisKeyword */: return true; case 80 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 168 /* Parameter */; + return identifierIsThisKeyword(node) && node.parent.kind === 169 /* Parameter */; default: return false; } @@ -127321,41 +129123,41 @@ ${lanes.join("\n")} return false; } switch (n.kind) { - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 205 /* ObjectBindingPattern */: - case 186 /* TypeLiteral */: - case 240 /* Block */: - case 267 /* ModuleBlock */: - case 268 /* CaseBlock */: - case 274 /* NamedImports */: - case 278 /* NamedExports */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 187 /* TypeLiteral */: + case 241 /* Block */: + case 268 /* ModuleBlock */: + case 269 /* CaseBlock */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: return nodeEndsWith(n, 20 /* CloseBraceToken */, sourceFile); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 213 /* NewExpression */: + case 214 /* NewExpression */: if (!n.arguments) { return true; } - case 212 /* CallExpression */: - case 216 /* ParenthesizedExpression */: - case 195 /* ParenthesizedType */: + case 213 /* CallExpression */: + case 217 /* ParenthesizedExpression */: + case 196 /* ParenthesizedType */: return nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 179 /* ConstructSignature */: - case 178 /* CallSignature */: - case 218 /* ArrowFunction */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 180 /* ConstructSignature */: + case 179 /* CallSignature */: + case 219 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -127363,60 +129165,60 @@ ${lanes.join("\n")} return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 22 /* CloseParenToken */, sourceFile); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return !!n.body && isCompletedNode(n.body, sourceFile); - case 244 /* IfStatement */: + case 245 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 27 /* SemicolonToken */, sourceFile); - case 208 /* ArrayLiteralExpression */: - case 206 /* ArrayBindingPattern */: - case 211 /* ElementAccessExpression */: - case 166 /* ComputedPropertyName */: - case 188 /* TupleType */: + case 209 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 212 /* ElementAccessExpression */: + case 167 /* ComputedPropertyName */: + case 189 /* TupleType */: return nodeEndsWith(n, 24 /* CloseBracketToken */, sourceFile); - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 24 /* CloseBracketToken */, sourceFile); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return false; - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 246 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 247 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return hasChildOfKind(n, 117 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 220 /* TypeOfExpression */: - case 219 /* DeleteExpression */: - case 221 /* VoidExpression */: - case 228 /* YieldExpression */: - case 229 /* SpreadElement */: + case 221 /* TypeOfExpression */: + case 220 /* DeleteExpression */: + case 222 /* VoidExpression */: + case 229 /* YieldExpression */: + case 230 /* SpreadElement */: const unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: const lastSpan = lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 238 /* TemplateSpan */: + case 239 /* TemplateSpan */: return nodeIsPresent(n.literal); - case 277 /* ExportDeclaration */: - case 271 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: return nodeIsPresent(n.moduleSpecifier); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -127507,7 +129309,7 @@ ${lanes.join("\n")} return lastTypeNode; } function getContextualTypeFromParentOrAncestorTypeNode(node, checker) { - if (node.flags & (8388608 /* JSDoc */ & ~262144 /* JavaScriptFile */)) + if (node.flags & (16777216 /* JSDoc */ & ~524288 /* JavaScriptFile */)) return void 0; const contextualType = getContextualTypeFromParent(node, checker); if (contextualType) @@ -127518,13 +129320,13 @@ ${lanes.join("\n")} function getAdjustedLocationForDeclaration(node, forRename) { if (!forRename) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return getAdjustedLocationForClass(node); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return getAdjustedLocationForFunction(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return node; } } @@ -127633,7 +129435,7 @@ ${lanes.join("\n")} if (node.kind === 149 /* RequireKeyword */ && isExternalModuleReference(parent2)) { return parent2.expression; } - if (node.kind === 160 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { + if (node.kind === 161 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { return parent2.moduleSpecifier; } if ((node.kind === 96 /* ExtendsKeyword */ || node.kind === 119 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) { @@ -127674,7 +129476,7 @@ ${lanes.join("\n")} if (node.kind === 130 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { return parent2.type.typeName; } - if (node.kind === 103 /* InKeyword */ && isForInStatement(parent2) || node.kind === 164 /* OfKeyword */ && isForOfStatement(parent2)) { + if (node.kind === 103 /* InKeyword */ && isForInStatement(parent2) || node.kind === 165 /* OfKeyword */ && isForOfStatement(parent2)) { return skipOuterExpressions(parent2.expression); } } @@ -127867,7 +129669,7 @@ ${lanes.join("\n")} } } } - Debug.assert(startNode2 !== void 0 || n.kind === 311 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); + Debug.assert(startNode2 !== void 0 || n.kind === 312 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); const candidate = findRightmostChildNodeWithTokens( children, /*exclusiveStartPosition*/ @@ -127902,7 +129704,7 @@ ${lanes.join("\n")} for (let i = exclusiveStartPosition - 1; i >= 0; i--) { const child = children[i]; if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 12 /* JsxText */ || parentKind === 284 /* JsxSelfClosingElement */)) { + if (i === 0 && (parentKind === 12 /* JsxText */ || parentKind === 285 /* JsxSelfClosingElement */)) { Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); } } else if (nodeHasTokens(children[i], sourceFile)) { @@ -127934,13 +129736,13 @@ ${lanes.join("\n")} if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 12 /* JsxText */) { return true; } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 293 /* JsxExpression */) { + if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 294 /* JsxExpression */) { return true; } - if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 293 /* JsxExpression */) { + if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 294 /* JsxExpression */) { return true; } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 286 /* JsxClosingElement */) { + if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 287 /* JsxClosingElement */) { return true; } return false; @@ -127968,9 +129770,9 @@ ${lanes.join("\n")} function isInsideJsxElement(sourceFile, position) { function isInsideJsxElementTraversal(node) { while (node) { - if (node.kind >= 284 /* JsxSelfClosingElement */ && node.kind <= 293 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) { + if (node.kind >= 285 /* JsxSelfClosingElement */ && node.kind <= 294 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) { node = node.parent; - } else if (node.kind === 283 /* JsxElement */) { + } else if (node.kind === 284 /* JsxElement */) { if (position > node.getStart(sourceFile)) return true; node = node.parent; @@ -128140,17 +129942,17 @@ ${lanes.join("\n")} result.push("export" /* exportedModifier */); if (flags & 8192 /* Deprecated */) result.push("deprecated" /* deprecatedModifier */); - if (node.flags & 16777216 /* Ambient */) + if (node.flags & 33554432 /* Ambient */) result.push("declare" /* ambientModifier */); - if (node.kind === 276 /* ExportAssignment */) + if (node.kind === 277 /* ExportAssignment */) result.push("export" /* exportedModifier */); return result.length > 0 ? result.join(",") : "" /* none */; } function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 182 /* TypeReference */ || node.kind === 212 /* CallExpression */) { + if (node.kind === 183 /* TypeReference */ || node.kind === 213 /* CallExpression */) { return node.typeArguments; } - if (isFunctionLike(node) || node.kind === 262 /* ClassDeclaration */ || node.kind === 263 /* InterfaceDeclaration */) { + if (isFunctionLike(node) || node.kind === 263 /* ClassDeclaration */ || node.kind === 264 /* InterfaceDeclaration */) { return node.typeParameters; } return void 0; @@ -128192,14 +129994,14 @@ ${lanes.join("\n")} return result; } function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 208 /* ArrayLiteralExpression */ || node.kind === 209 /* ObjectLiteralExpression */) { - if (node.parent.kind === 225 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) { + if (node.kind === 209 /* ArrayLiteralExpression */ || node.kind === 210 /* ObjectLiteralExpression */) { + if (node.parent.kind === 226 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) { return true; } - if (node.parent.kind === 249 /* ForOfStatement */ && node.parent.initializer === node) { + if (node.parent.kind === 250 /* ForOfStatement */ && node.parent.initializer === node) { return true; } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 302 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 303 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -128297,7 +130099,7 @@ ${lanes.join("\n")} return type.isTypeParameter() ? type.getConstraint() || type : type; } function getNameFromPropertyName(name) { - return name.kind === 166 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); + return name.kind === 167 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); } function programContainsModules(program) { return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!(s.externalModuleIndicator || s.commonJsModuleIndicator)); @@ -128419,7 +130221,7 @@ ${lanes.join("\n")} } function insertImports(changes, sourceFile, imports, blankLineBetween, preferences) { const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 242 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; + const importKindPredicate = decl.kind === 243 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; const existingImportStatements = filter(sourceFile.statements, importKindPredicate); let sortKind = isArray(imports) ? ts_OrganizeImports_exports.detectImportDeclarationSorting(imports, preferences) : 3 /* Both */; const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); @@ -128989,13 +130791,13 @@ ${lanes.join("\n")} function getContextualTypeFromParent(node, checker, contextFlags) { const parent2 = walkUpParenthesizedExpressions(node.parent); switch (parent2.kind) { - case 213 /* NewExpression */: + case 214 /* NewExpression */: return checker.getContextualType(parent2, contextFlags); - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const { left, operatorToken, right } = parent2; return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node, contextFlags); } - case 295 /* CaseClause */: + case 296 /* CaseClause */: return getSwitchedType(parent2, checker); default: return checker.getContextualType(node, contextFlags); @@ -129021,8 +130823,8 @@ ${lanes.join("\n")} switch (node.kind) { case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: - case 214 /* TaggedTemplateExpression */: + case 228 /* TemplateExpression */: + case 215 /* TaggedTemplateExpression */: return true; default: return false; @@ -129057,16 +130859,16 @@ ${lanes.join("\n")} return typeIsAccessible ? res : void 0; } function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 178 /* CallSignature */ || kind === 179 /* ConstructSignature */ || kind === 180 /* IndexSignature */ || kind === 170 /* PropertySignature */ || kind === 172 /* MethodSignature */; + return kind === 179 /* CallSignature */ || kind === 180 /* ConstructSignature */ || kind === 181 /* IndexSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */; } function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 261 /* FunctionDeclaration */ || kind === 175 /* Constructor */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 266 /* ModuleDeclaration */; + return kind === 267 /* ModuleDeclaration */; } function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 242 /* VariableStatement */ || kind === 243 /* ExpressionStatement */ || kind === 245 /* DoStatement */ || kind === 250 /* ContinueStatement */ || kind === 251 /* BreakStatement */ || kind === 252 /* ReturnStatement */ || kind === 256 /* ThrowStatement */ || kind === 258 /* DebuggerStatement */ || kind === 171 /* PropertyDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 276 /* ExportAssignment */; + return kind === 243 /* VariableStatement */ || kind === 244 /* ExpressionStatement */ || kind === 246 /* DoStatement */ || kind === 251 /* ContinueStatement */ || kind === 252 /* BreakStatement */ || kind === 253 /* ReturnStatement */ || kind === 257 /* ThrowStatement */ || kind === 259 /* DebuggerStatement */ || kind === 172 /* PropertyDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 277 /* ExportAssignment */; } function nodeIsASICandidate(node, sourceFile) { const lastToken = node.getLastToken(sourceFile); @@ -129090,7 +130892,7 @@ ${lanes.join("\n")} } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { return false; } - if (node.kind === 245 /* DoStatement */) { + if (node.kind === 246 /* DoStatement */) { return true; } const topNode = findAncestor(node, (ancestor) => !ancestor.parent); @@ -129468,13 +131270,16 @@ ${lanes.join("\n")} return !(symbol.flags & 33554432 /* Transient */) && (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */); } function getDefaultLikeExportNameFromDeclaration(symbol) { - return firstDefined( - symbol.declarations, - (d) => { - var _a, _b; - return isExportAssignment(d) ? (_a = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a.text : (_b = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _b.text; + return firstDefined(symbol.declarations, (d) => { + var _a, _b, _c; + if (isExportAssignment(d)) { + return (_a = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a.text; } - ); + if (isExportSpecifier(d) && d.symbol.flags === 2097152 /* Alias */) { + return (_b = tryCast(d.propertyName, isIdentifier)) == null ? void 0 : _b.text; + } + return (_c = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _c.text; + }); } function getSymbolParentOrFail(symbol) { var _a; @@ -129654,7 +131459,7 @@ ${lanes.join("\n")} typeKeywords = [ 133 /* AnyKeyword */, 131 /* AssertsKeyword */, - 162 /* BigIntKeyword */, + 163 /* BigIntKeyword */, 136 /* BooleanKeyword */, 97 /* FalseKeyword */, 140 /* InferKeyword */, @@ -129914,10 +131719,10 @@ ${lanes.join("\n")} } function forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) { var _a, _b; - const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host); + const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); const excludePatterns = preferences.autoImportFileExcludePatterns && mapDefined(preferences.autoImportFileExcludePatterns, (spec) => { const pattern = getPatternFromSpec(spec, "", "exclude"); - return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames) : void 0; + return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0; }); forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, (module2, file) => cb( module2, @@ -130452,13 +132257,13 @@ ${lanes.join("\n")} } function checkForClassificationCancellation(cancellationToken, kind) { switch (kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } } @@ -130674,49 +132479,49 @@ ${lanes.join("\n")} pos = tag.tagName.end; let commentStart = tag.tagName.end; switch (tag.kind) { - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: const param = tag; processJSDocParameterTag(param); commentStart = param.isNameFirst && ((_a = param.typeExpression) == null ? void 0 : _a.end) || param.name.end; break; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: const prop = tag; commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; break; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); pos = tag.end; commentStart = tag.typeParameters.end; break; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 315 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; + commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 316 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; break; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: commentStart = tag.typeExpression.end; break; - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = tag.typeExpression.end; break; - case 349 /* JSDocThisTag */: - case 346 /* JSDocEnumTag */: + case 350 /* JSDocThisTag */: + case 347 /* JSDocEnumTag */: commentStart = tag.typeExpression.end; break; - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; break; - case 353 /* JSDocSeeTag */: + case 354 /* JSDocSeeTag */: commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; break; - case 334 /* JSDocAugmentsTag */: - case 335 /* JSDocImplementsTag */: + case 335 /* JSDocAugmentsTag */: + case 336 /* JSDocImplementsTag */: commentStart = tag.class.end; break; - case 355 /* JSDocThrowsTag */: + case 356 /* JSDocThrowsTag */: processElement(tag.typeExpression); pos = tag.end; commentStart = ((_h = tag.typeExpression) == null ? void 0 : _h.end) || commentStart; @@ -130861,22 +132666,22 @@ ${lanes.join("\n")} } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 285 /* JsxOpeningElement */: + case 286 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 286 /* JsxClosingElement */: + case 287 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 284 /* JsxSelfClosingElement */: + case 285 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -130897,11 +132702,11 @@ ${lanes.join("\n")} if (token) { const parent2 = token.parent; if (tokenKind === 64 /* EqualsToken */) { - if (parent2.kind === 259 /* VariableDeclaration */ || parent2.kind === 171 /* PropertyDeclaration */ || parent2.kind === 168 /* Parameter */ || parent2.kind === 290 /* JsxAttribute */) { + if (parent2.kind === 260 /* VariableDeclaration */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 169 /* Parameter */ || parent2.kind === 291 /* JsxAttribute */) { return 5 /* operator */; } } - if (parent2.kind === 225 /* BinaryExpression */ || parent2.kind === 223 /* PrefixUnaryExpression */ || parent2.kind === 224 /* PostfixUnaryExpression */ || parent2.kind === 226 /* ConditionalExpression */) { + if (parent2.kind === 226 /* BinaryExpression */ || parent2.kind === 224 /* PrefixUnaryExpression */ || parent2.kind === 225 /* PostfixUnaryExpression */ || parent2.kind === 227 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -130911,7 +132716,7 @@ ${lanes.join("\n")} } else if (tokenKind === 10 /* BigIntLiteral */) { return 25 /* bigintLiteral */; } else if (tokenKind === 11 /* StringLiteral */) { - return token && token.parent.kind === 290 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + return token && token.parent.kind === 291 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 14 /* RegularExpressionLiteral */) { return 6 /* stringLiteral */; } else if (isTemplateLiteralKind(tokenKind)) { @@ -130921,32 +132726,32 @@ ${lanes.join("\n")} } else if (tokenKind === 80 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 168 /* Parameter */: + case 169 /* Parameter */: if (token.parent.name === token) { return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; } @@ -131131,7 +132936,7 @@ ${lanes.join("\n")} let child = throwStatement; while (child.parent) { const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 311 /* SourceFile */) { + if (isFunctionBlock(parent2) || parent2.kind === 312 /* SourceFile */) { return parent2; } if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { @@ -131161,15 +132966,15 @@ ${lanes.join("\n")} function getBreakOrContinueOwner(statement) { return findAncestor(statement, (node) => { switch (node.kind) { - case 254 /* SwitchStatement */: - if (statement.kind === 250 /* ContinueStatement */) { + case 255 /* SwitchStatement */: + if (statement.kind === 251 /* ContinueStatement */) { return false; } - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 246 /* WhileStatement */: - case 245 /* DoStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 247 /* WhileStatement */: + case 246 /* DoStatement */: return !statement.label || isLabeledBy(node, statement.label.escapedText); default: return isFunctionLike(node) && "quit"; @@ -131182,24 +132987,24 @@ ${lanes.join("\n")} function getNodesToSearchForModifier(declaration, modifierFlag) { const container = declaration.parent; switch (container.kind) { - case 267 /* ModuleBlock */: - case 311 /* SourceFile */: - case 240 /* Block */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 268 /* ModuleBlock */: + case 312 /* SourceFile */: + case 241 /* Block */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; } - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 261 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 186 /* TypeLiteral */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 187 /* TypeLiteral */: const nodes = container.members; if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); @@ -131210,7 +133015,7 @@ ${lanes.join("\n")} return [...nodes, container]; } return nodes; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return void 0; default: Debug.assertNever(container, "Invalid container kind."); @@ -131226,7 +133031,7 @@ ${lanes.join("\n")} function getLoopBreakContinueOccurrences(loopNode) { const keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 99 /* ForKeyword */, 117 /* WhileKeyword */, 92 /* DoKeyword */)) { - if (loopNode.kind === 245 /* DoStatement */) { + if (loopNode.kind === 246 /* DoStatement */) { const loopTokens = loopNode.getChildren(); for (let i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 117 /* WhileKeyword */)) { @@ -131246,13 +133051,13 @@ ${lanes.join("\n")} const owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -131413,12 +133218,12 @@ ${lanes.join("\n")} function isDocumentRegistryEntry(entry) { return !!entry.sourceFile; } - function createDocumentRegistry(useCaseSensitiveFileNames, currentDirectory) { - return createDocumentRegistryInternal(useCaseSensitiveFileNames, currentDirectory); + function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) { + return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory); } - function createDocumentRegistryInternal(useCaseSensitiveFileNames, currentDirectory = "", externalCache) { + function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) { const buckets = /* @__PURE__ */ new Map(); - const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); + const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2); function reportStats() { const bucketInfoArray = arrayFrom(buckets.keys()).filter((name) => name && name.charAt(0) === "_").map((name) => { const entries = buckets.get(name); @@ -131599,13 +133404,6 @@ ${lanes.join("\n")} } } } - function getLanguageServiceRefCounts(path, scriptKind) { - return arrayFrom(buckets.entries(), ([key, bucket]) => { - const bucketEntry = bucket.get(path); - const entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind); - return [key, entry && entry.languageServiceRefCount]; - }); - } return { acquireDocument, acquireDocumentWithKey, @@ -131613,9 +133411,10 @@ ${lanes.join("\n")} updateDocumentWithKey, releaseDocument, releaseDocumentWithKey, - getLanguageServiceRefCounts, + getKeyForCompilationSettings, + getDocumentRegistryBucketKeyWithMode, reportStats, - getKeyForCompilationSettings + getBuckets: () => buckets }; } function getKeyForCompilationSettings(settings) { @@ -131633,12 +133432,12 @@ ${lanes.join("\n")} // src/services/getEditsForFileRename.ts function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) { - const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const oldToNew = getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper); const newToOld = getPathUpdater(newFileOrDirPath, oldFileOrDirPath, getCanonicalFileName, sourceMapper); return ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => { - updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames); + updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames2); updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName); }); } @@ -131660,7 +133459,7 @@ ${lanes.join("\n")} const rel = getRelativePathFromFile(a0, b0, getCanonicalFileName); return combinePathsSafe(getDirectoryPath(a1), rel); } - function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames) { + function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames2) { const { configFile } = program.getCompilerOptions(); if (!configFile) return; @@ -131684,10 +133483,10 @@ ${lanes.join("\n")} /*excludes*/ [], includes, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, currentDirectory ); - if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames).test(newFileOrDirPath)) { + if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(newFileOrDirPath)) { changeTracker.insertNodeAfter(configFile, last(property.initializer.elements), factory.createStringLiteral(relativePath(newFileOrDirPath))); } return; @@ -131735,7 +133534,7 @@ ${lanes.join("\n")} configDir, path, /*ignoreCase*/ - !useCaseSensitiveFileNames + !useCaseSensitiveFileNames2 ); } } @@ -132282,7 +134081,7 @@ ${lanes.join("\n")} if (token === 156 /* TypeKeyword */) { const skipTypeKeyword = scanner.lookAhead(() => { const token2 = scanner.scan(); - return token2 !== 160 /* FromKeyword */ && (token2 === 42 /* AsteriskToken */ || token2 === 19 /* OpenBraceToken */ || token2 === 80 /* Identifier */ || isKeyword(token2)); + return token2 !== 161 /* FromKeyword */ && (token2 === 42 /* AsteriskToken */ || token2 === 19 /* OpenBraceToken */ || token2 === 80 /* Identifier */ || isKeyword(token2)); }); if (skipTypeKeyword) { token = nextToken(); @@ -132290,7 +134089,7 @@ ${lanes.join("\n")} } if (token === 80 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -132316,7 +134115,7 @@ ${lanes.join("\n")} } if (token === 20 /* CloseBraceToken */) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -132329,7 +134128,7 @@ ${lanes.join("\n")} token = nextToken(); if (token === 80 /* Identifier */ || isKeyword(token)) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -132364,7 +134163,7 @@ ${lanes.join("\n")} } if (token === 20 /* CloseBraceToken */) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -132373,7 +134172,7 @@ ${lanes.join("\n")} } } else if (token === 42 /* AsteriskToken */) { token = nextToken(); - if (token === 160 /* FromKeyword */) { + if (token === 161 /* FromKeyword */) { token = nextToken(); if (token === 11 /* StringLiteral */) { recordModuleName(); @@ -132687,7 +134486,7 @@ ${lanes.join("\n")} "src/services/sourcemaps.ts"() { "use strict"; init_ts4(); - base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/; + base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/; } }); @@ -132735,8 +134534,8 @@ ${lanes.join("\n")} diags.push(createDiagnosticForNode(init, Diagnostics.require_call_may_be_converted_to_an_import)); } } - const jsdocTypedefNode = ts_codefix_exports.getJSDocTypedefNode(node); - if (jsdocTypedefNode) { + const jsdocTypedefNodes = ts_codefix_exports.getJSDocTypedefNodes(node); + for (const jsdocTypedefNode of jsdocTypedefNodes) { diags.push(createDiagnosticForNode(jsdocTypedefNode, Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type)); } if (ts_codefix_exports.parameterShouldGetTypeFromJSDoc(node)) { @@ -132752,13 +134551,13 @@ ${lanes.join("\n")} function containsTopLevelCommonjs(sourceFile) { return sourceFile.statements.some((statement) => { switch (statement.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall( propertyAccessLeftHandSide(decl.initializer), /*requireStringLiteralLikeArgument*/ true )); - case 243 /* ExpressionStatement */: { + case 244 /* ExpressionStatement */: { const { expression } = statement; if (!isBinaryExpression(expression)) return isRequireCall( @@ -132779,10 +134578,10 @@ ${lanes.join("\n")} } function importNameForConvertToDefaultImport(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 273 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 270 /* ImportEqualsDeclaration */: + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 274 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; + case 271 /* ImportEqualsDeclaration */: return node.name; default: return void 0; @@ -132846,18 +134645,18 @@ ${lanes.join("\n")} } function isFixablePromiseArgument(arg, checker) { switch (arg.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: const functionFlags = getFunctionFlags(arg); if (functionFlags & 1 /* Generator */) { return false; } - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); case 106 /* NullKeyword */: return true; case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: { + case 211 /* PropertyAccessExpression */: { const symbol = checker.getSymbolAtLocation(arg); if (!symbol) { return false; @@ -132891,10 +134690,10 @@ ${lanes.join("\n")} } function canBeConvertedToAsync(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: return false; @@ -133077,9 +134876,9 @@ ${lanes.join("\n")} } function shouldKeepItem(declaration, checker) { switch (declaration.kind) { - case 272 /* ImportClause */: - case 275 /* ImportSpecifier */: - case 270 /* ImportEqualsDeclaration */: + case 273 /* ImportClause */: + case 276 /* ImportSpecifier */: + case 271 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); return importer.escapedName !== imported.escapedName; @@ -133089,7 +134888,7 @@ ${lanes.join("\n")} } function tryAddSingleDeclarationName(declaration, containers) { const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 166 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); + return !!name && (pushLiteral(name, containers) || name.kind === 167 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); } function tryAddComputedPropertyName(expression, containers) { return pushLiteral(expression, containers) || isPropertyAccessExpression(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers); @@ -133100,7 +134899,7 @@ ${lanes.join("\n")} function getContainers(declaration) { const containers = []; const name = getNameOfDeclaration(declaration); - if (name && name.kind === 166 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { + if (name && name.kind === 167 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { return emptyArray; } containers.shift(); @@ -133273,7 +135072,7 @@ ${lanes.join("\n")} } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 225 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + return !hasDynamicName(node) || node.kind !== 226 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -133281,7 +135080,7 @@ ${lanes.join("\n")} return; } switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: const ctr = node; addNodeWithRecursiveChild(ctr, ctr.body); for (const param of ctr.parameters) { @@ -133290,32 +135089,32 @@ ${lanes.join("\n")} } } break; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 173 /* MethodSignature */: if (hasNavigationBarName(node)) { addNodeWithRecursiveChild(node, node.body); } break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: if (hasNavigationBarName(node)) { addNodeWithRecursiveInitializer(node); } break; - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: if (hasNavigationBarName(node)) { addLeafNode(node); } break; - case 272 /* ImportClause */: + case 273 /* ImportClause */: const importClause = node; if (importClause.name) { addLeafNode(importClause.name); } const { namedBindings } = importClause; if (namedBindings) { - if (namedBindings.kind === 273 /* NamespaceImport */) { + if (namedBindings.kind === 274 /* NamespaceImport */) { addLeafNode(namedBindings); } else { for (const element of namedBindings.elements) { @@ -133324,16 +135123,16 @@ ${lanes.join("\n")} } } break; - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: addNodeWithRecursiveChild(node, node.name); break; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: const { expression } = node; isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; - case 207 /* BindingElement */: - case 302 /* PropertyAssignment */: - case 259 /* VariableDeclaration */: { + case 208 /* BindingElement */: + case 303 /* PropertyAssignment */: + case 260 /* VariableDeclaration */: { const child = node; if (isBindingPattern(child.name)) { addChildrenRecursively(child.name); @@ -133342,18 +135141,18 @@ ${lanes.join("\n")} } break; } - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: const nameNode = node.name; if (nameNode && isIdentifier(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); break; - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: addNodeWithRecursiveChild(node, node.body); break; - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: startNode(node); for (const member of node.members) { if (!isComputedProperty(member)) { @@ -133362,19 +135161,19 @@ ${lanes.join("\n")} } endNode(); break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: startNode(node); for (const member of node.members) { addChildrenRecursively(member); } endNode(); break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: addNodeWithRecursiveChild(node, getInteriorModule(node).body); break; - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const expression2 = node.expression; const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; if (child) { @@ -133386,16 +135185,16 @@ ${lanes.join("\n")} } break; } - case 280 /* ExportSpecifier */: - case 270 /* ImportEqualsDeclaration */: - case 180 /* IndexSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 264 /* TypeAliasDeclaration */: + case 281 /* ExportSpecifier */: + case 271 /* ImportEqualsDeclaration */: + case 181 /* IndexSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 265 /* TypeAliasDeclaration */: addLeafNode(node); break; - case 212 /* CallExpression */: - case 225 /* BinaryExpression */: { + case 213 /* CallExpression */: + case 226 /* BinaryExpression */: { const special = getAssignmentDeclarationKind(node); switch (special) { case 1 /* ExportsProperty */: @@ -133605,19 +135404,19 @@ ${lanes.join("\n")} return false; } switch (a.kind) { - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return isStatic(a) === isStatic(b); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); default: return true; } } function isSynthesized(node) { - return !!(node.flags & 8 /* Synthesized */); + return !!(node.flags & 16 /* Synthesized */); } function isOwnChild(n, parent2) { const par = isModuleBlock(n.parent) ? n.parent.parent : n.parent; @@ -133627,7 +135426,7 @@ ${lanes.join("\n")} if (!a.body || !b.body) { return a.body === b.body; } - return a.body.kind === b.body.kind && (a.body.kind !== 266 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); + return a.body.kind === b.body.kind && (a.body.kind !== 267 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); } function merge(target, source) { target.additionalNodes = target.additionalNodes || []; @@ -133648,7 +135447,7 @@ ${lanes.join("\n")} return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); } function tryGetName(node) { - if (node.kind === 266 /* ModuleDeclaration */) { + if (node.kind === 267 /* ModuleDeclaration */) { return getModuleName(node); } const declName = getNameOfDeclaration(node); @@ -133657,16 +135456,16 @@ ${lanes.join("\n")} return propertyName && unescapeLeadingUnderscores(propertyName); } switch (node.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 230 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 231 /* ClassExpression */: return getFunctionOrClassName(node); default: return void 0; } } function getItemName(node, name) { - if (node.kind === 266 /* ModuleDeclaration */) { + if (node.kind === 267 /* ModuleDeclaration */) { return cleanText(getModuleName(node)); } if (name) { @@ -133676,27 +135475,27 @@ ${lanes.join("\n")} } } switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: if (getSyntacticModifierFlags(node) & 1024 /* Default */) { return "default"; } return getFunctionOrClassName(node); - case 175 /* Constructor */: + case 176 /* Constructor */: return "constructor"; - case 179 /* ConstructSignature */: + case 180 /* ConstructSignature */: return "new()"; - case 178 /* CallSignature */: + case 179 /* CallSignature */: return "()"; - case 180 /* IndexSignature */: + case 181 /* IndexSignature */: return "[]"; default: return ""; @@ -133721,19 +135520,19 @@ ${lanes.join("\n")} return true; } switch (navigationBarNodeKind(item)) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 265 /* EnumDeclaration */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 311 /* SourceFile */: - case 264 /* TypeAliasDeclaration */: - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 266 /* EnumDeclaration */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 312 /* SourceFile */: + case 265 /* TypeAliasDeclaration */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: return true; - case 218 /* ArrowFunction */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: return isTopLevelFunctionDeclaration(item); default: return false; @@ -133743,10 +135542,10 @@ ${lanes.join("\n")} return false; } switch (navigationBarNodeKind(item2.parent)) { - case 267 /* ModuleBlock */: - case 311 /* SourceFile */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: + case 268 /* ModuleBlock */: + case 312 /* SourceFile */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: return true; default: return false; @@ -133805,7 +135604,7 @@ ${lanes.join("\n")} } function getFullyQualifiedModuleName(moduleDeclaration) { const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 266 /* ModuleDeclaration */) { + while (moduleDeclaration.body && moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { moduleDeclaration = moduleDeclaration.body; result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } @@ -133815,13 +135614,13 @@ ${lanes.join("\n")} return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; } function isComputedProperty(member) { - return !member.name || member.name.kind === 166 /* ComputedPropertyName */; + return !member.name || member.name.kind === 167 /* ComputedPropertyName */; } function getNodeSpan(node) { - return node.kind === 311 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); + return node.kind === 312 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); } function getModifiers2(node) { - if (node.parent && node.parent.kind === 259 /* VariableDeclaration */) { + if (node.parent && node.parent.kind === 260 /* VariableDeclaration */) { node = node.parent; } return getNodeModifiers(node); @@ -133866,9 +135665,9 @@ ${lanes.join("\n")} } function isFunctionOrClassExpression(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: - case 230 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 231 /* ClassExpression */: return true; default: return false; @@ -133926,8 +135725,8 @@ ${lanes.join("\n")} return context.cancellationToken && context.cancellationToken.isCancellationRequested() || !((_a = refactor.kinds) == null ? void 0 : _a.some((kind) => refactorKindBeginsWith(kind, context.kind))) ? void 0 : refactor.getAvailableActions(context, includeInteractiveActions); })); } - function getEditsForRefactor(context, refactorName13, actionName2, interactiveRefactorArguments) { - const refactor = refactors.get(refactorName13); + function getEditsForRefactor(context, refactorName14, actionName2, interactiveRefactorArguments) { + const refactor = refactors.get(refactorName14); return refactor && refactor.getEditsForAction(context, actionName2, interactiveRefactorArguments); } var refactors; @@ -133958,18 +135757,18 @@ ${lanes.join("\n")} } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 266 /* ModuleDeclaration */: { + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 267 /* ModuleDeclaration */: { const node = exportNode; if (!node.name) return void 0; return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; } - case 242 /* VariableStatement */: { + case 243 /* VariableStatement */: { const vs = exportNode; if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { return void 0; @@ -133980,7 +135779,7 @@ ${lanes.join("\n")} Debug.assert(!wasDefault, "Can't have a default flag here"); return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; } - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const node = exportNode; if (node.isExportEquals) return void 0; @@ -134012,20 +135811,20 @@ ${lanes.join("\n")} } else { const exportKeyword = Debug.checkDefined(findModifier(exportNode, 95 /* ExportKeyword */), "Should find an export keyword in modifier list"); switch (exportNode.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(90 /* DefaultKeyword */)); break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: const decl = first(exportNode.declarationList.declarations); if (!ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile) && !decl.type) { changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(decl.initializer, "Initializer was previously known to be present"))); break; } - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 266 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 267 /* ModuleDeclaration */: changes.deleteModifier(exportingSourceFile, exportKeyword); changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); break; @@ -134051,23 +135850,23 @@ ${lanes.join("\n")} function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { const { parent: parent2 } = ref; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); break; - case 275 /* ImportSpecifier */: - case 280 /* ExportSpecifier */: { + case 276 /* ImportSpecifier */: + case 281 /* ExportSpecifier */: { const spec = parent2; changes.replaceNode(importingSourceFile, spec, makeImportSpecifier(exportName, spec.name.text)); break; } - case 272 /* ImportClause */: { + case 273 /* ImportClause */: { const clause = parent2; Debug.assert(clause.name === ref, "Import clause name should match provided ref"); const spec = makeImportSpecifier(exportName, ref.text); const { namedBindings } = clause; if (!namedBindings) { changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec])); - } else if (namedBindings.kind === 273 /* NamespaceImport */) { + } else if (namedBindings.kind === 274 /* NamespaceImport */) { changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) }); const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1 /* Double */; const newImport = makeImport( @@ -134084,7 +135883,7 @@ ${lanes.join("\n")} } break; } - case 204 /* ImportType */: + case 205 /* ImportType */: const importTypeNode = parent2; changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; @@ -134095,10 +135894,10 @@ ${lanes.join("\n")} function changeNamedToDefaultImport(importingSourceFile, ref, changes) { const parent2 = ref.parent; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); break; - case 275 /* ImportSpecifier */: { + case 276 /* ImportSpecifier */: { const defaultImport = factory.createIdentifier(parent2.name.text); if (parent2.parent.elements.length === 1) { changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); @@ -134108,7 +135907,7 @@ ${lanes.join("\n")} } break; } - case 280 /* ExportSpecifier */: { + case 281 /* ExportSpecifier */: { changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); break; } @@ -134151,12 +135950,12 @@ ${lanes.join("\n")} refactorName = "Convert export"; defaultToNamedAction = { name: "Convert default export to named export", - description: Diagnostics.Convert_default_export_to_named_export.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), kind: "refactor.rewrite.export.named" }; namedToDefaultAction = { name: "Convert named export to default export", - description: Diagnostics.Convert_named_export_to_default_export.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_export_to_default_export), kind: "refactor.rewrite.export.default" }; registerRefactor(refactorName, { @@ -134174,7 +135973,7 @@ ${lanes.join("\n")} } if (context.preferences.provideRefactorNotApplicableReason) { return [ - { name: refactorName, description: Diagnostics.Convert_default_export_to_named_export.message, actions: [ + { name: refactorName, description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), actions: [ { ...defaultToNamedAction, notApplicableReason: info.error }, { ...namedToDefaultAction, notApplicableReason: info.error } ] } @@ -134212,7 +136011,7 @@ ${lanes.join("\n")} if (!importClause.namedBindings) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; } - if (importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { return { convertTo: 0 /* Named */, import: importClause.namedBindings }; } const shouldUseDefault = getShouldUseDefault(context.program, importClause); @@ -134376,17 +136175,17 @@ ${lanes.join("\n")} actions = { [0 /* Named */]: { name: "Convert namespace import to named imports", - description: Diagnostics.Convert_namespace_import_to_named_imports.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_namespace_import_to_named_imports), kind: "refactor.rewrite.import.named" }, [2 /* Namespace */]: { name: "Convert named imports to namespace import", - description: Diagnostics.Convert_named_imports_to_namespace_import.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_namespace_import), kind: "refactor.rewrite.import.namespace" }, [1 /* Default */]: { name: "Convert named imports to default import", - description: Diagnostics.Convert_named_imports_to_default_import.message, + description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_default_import), kind: "refactor.rewrite.import.default" } }; @@ -134733,6 +136532,158 @@ ${lanes.join("\n")} } }); + // src/services/refactors/inlineVariable.ts + function getInliningInfo(file, startPosition, tryWithReferenceToken, program) { + var _a, _b; + const checker = program.getTypeChecker(); + const token = getTouchingPropertyName(file, startPosition); + const parent2 = token.parent; + if (!isIdentifier(token)) { + return void 0; + } + if (isInitializedVariable(parent2) && isVariableDeclarationInVariableStatement(parent2) && isIdentifier(parent2.name)) { + if (((_a = checker.getMergedSymbol(parent2.symbol).declarations) == null ? void 0 : _a.length) !== 1) { + return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; + } + if (isDeclarationExported(parent2)) { + return void 0; + } + const references = getReferenceNodes(parent2, checker, file); + return references && { references, declaration: parent2, replacement: parent2.initializer }; + } + if (tryWithReferenceToken) { + let definition = checker.resolveName( + token.text, + token, + 111551 /* Value */, + /*excludeGlobals*/ + false + ); + definition = definition && checker.getMergedSymbol(definition); + if (((_b = definition == null ? void 0 : definition.declarations) == null ? void 0 : _b.length) !== 1) { + return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; + } + const declaration = definition.declarations[0]; + if (!isInitializedVariable(declaration) || !isVariableDeclarationInVariableStatement(declaration) || !isIdentifier(declaration.name)) { + return void 0; + } + if (isDeclarationExported(declaration)) { + return void 0; + } + const references = getReferenceNodes(declaration, checker, file); + return references && { references, declaration, replacement: declaration.initializer }; + } + return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_variable_to_inline) }; + } + function isDeclarationExported(declaration) { + const variableStatement = cast(declaration.parent.parent, isVariableStatement); + return some(variableStatement.modifiers, isExportModifier); + } + function getReferenceNodes(declaration, checker, file) { + const references = []; + const cannotInline = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(declaration.name, checker, file, (ref) => { + if (ts_FindAllReferences_exports.isWriteAccessForReference(ref)) { + return true; + } + if (isExportSpecifier(ref.parent) || isExportAssignment(ref.parent)) { + return true; + } + if (isTypeQueryNode(ref.parent)) { + return true; + } + if (textRangeContainsPositionInclusive(declaration, ref.pos)) { + return true; + } + references.push(ref); + }); + return references.length === 0 || cannotInline ? void 0 : references; + } + function getReplacementExpression(reference, replacement) { + replacement = getSynthesizedDeepClone(replacement); + const { parent: parent2 } = reference; + if (isExpression(parent2) && (getExpressionPrecedence(replacement) < getExpressionPrecedence(parent2) || needsParentheses(parent2))) { + return factory.createParenthesizedExpression(replacement); + } + if (isFunctionLike(replacement) && (isCallLikeExpression(parent2) || isPropertyAccessExpression(parent2))) { + return factory.createParenthesizedExpression(replacement); + } + if (isPropertyAccessExpression(parent2) && (isNumericLiteral(replacement) || isObjectLiteralExpression(replacement))) { + return factory.createParenthesizedExpression(replacement); + } + return replacement; + } + var refactorName4, refactorDescription, inlineVariableAction; + var init_inlineVariable = __esm({ + "src/services/refactors/inlineVariable.ts"() { + "use strict"; + init_ts4(); + init_ts_refactor(); + refactorName4 = "Inline variable"; + refactorDescription = getLocaleSpecificMessage(Diagnostics.Inline_variable); + inlineVariableAction = { + name: refactorName4, + description: refactorDescription, + kind: "refactor.inline.variable" + }; + registerRefactor(refactorName4, { + kinds: [inlineVariableAction.kind], + getAvailableActions(context) { + const { + file, + program, + preferences, + startPosition, + triggerReason + } = context; + const info = getInliningInfo(file, startPosition, triggerReason === "invoked", program); + if (!info) { + return emptyArray; + } + if (!ts_refactor_exports.isRefactorErrorInfo(info)) { + return [{ + name: refactorName4, + description: refactorDescription, + actions: [inlineVariableAction] + }]; + } + if (preferences.provideRefactorNotApplicableReason) { + return [{ + name: refactorName4, + description: refactorDescription, + actions: [{ + ...inlineVariableAction, + notApplicableReason: info.error + }] + }]; + } + return emptyArray; + }, + getEditsForAction(context, actionName2) { + Debug.assert(actionName2 === refactorName4, "Unexpected refactor invoked"); + const { file, program, startPosition } = context; + const info = getInliningInfo( + file, + startPosition, + /*tryWithReferenceToken*/ + true, + program + ); + if (!info || ts_refactor_exports.isRefactorErrorInfo(info)) { + return void 0; + } + const { references, declaration, replacement } = info; + const edits = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => { + for (const node of references) { + tracker.replaceNode(file, node, getReplacementExpression(node, replacement)); + } + tracker.delete(file, declaration); + }); + return { edits }; + } + }); + } + }); + // src/services/refactors/moveToNewFile.ts function doChange3(oldFile, program, toMove, changes, host, preferences, context) { const checker = program.getTypeChecker(); @@ -134814,29 +136765,29 @@ ${lanes.join("\n")} append(copiedOldImports, makeImportOrRequire(oldFile, oldFileDefault, oldFileNamedImports, getBaseFileName(oldFile.fileName), program, host, useEsModuleSyntax, quotePreference)); return copiedOldImports; } - var refactorName4, description, moveToNewFileAction; + var refactorName5, description, moveToNewFileAction; var init_moveToNewFile = __esm({ "src/services/refactors/moveToNewFile.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName4 = "Move to a new file"; + refactorName5 = "Move to a new file"; description = getLocaleSpecificMessage(Diagnostics.Move_to_a_new_file); moveToNewFileAction = { - name: refactorName4, + name: refactorName5, description, kind: "refactor.move.newFile" }; - registerRefactor(refactorName4, { + registerRefactor(refactorName5, { kinds: [moveToNewFileAction.kind], getAvailableActions: function getRefactorActionsToMoveToNewFile(context) { const statements = getStatementsToMove(context); if (context.preferences.allowTextChangesInNewFiles && statements) { - return [{ name: refactorName4, description, actions: [moveToNewFileAction] }]; + return [{ name: refactorName5, description, actions: [moveToNewFileAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName4, + name: refactorName5, description, actions: [{ ...moveToNewFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] }]; @@ -134844,7 +136795,7 @@ ${lanes.join("\n")} return emptyArray; }, getEditsForAction: function getRefactorEditsToMoveToNewFile(context, actionName2) { - Debug.assert(actionName2 === refactorName4, "Wrong refactor invoked"); + Debug.assert(actionName2 === refactorName5, "Wrong refactor invoked"); const statements = Debug.checkDefined(getStatementsToMove(context)); const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange3(context.file, context.program, statements, t, context.host, context.preferences, context)); return { edits, renameFilename: void 0, renameLocation: void 0 }; @@ -134854,6 +136805,9 @@ ${lanes.join("\n")} }); // src/services/refactors/moveToFile.ts + function error(notApplicableReason) { + return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason }; + } function doChange4(context, oldFile, targetFile, program, toMove, changes, host, preferences) { const checker = program.getTypeChecker(); const usage = getUsageInfo(oldFile, toMove.all, checker); @@ -134894,7 +136848,7 @@ ${lanes.join("\n")} const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromTargetFile, useEsModuleSyntax); if (typeof targetFile !== "string") { if (targetFile.statements.length > 0) { - changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], body); + moveStatementsToTargetFile(changes, program, body, targetFile, toMove); } else { changes.insertNodesAtEndOfFile( targetFile, @@ -134915,7 +136869,7 @@ ${lanes.join("\n")} } } if (importAdder) { - importAdder.writeFixes(changes); + importAdder.writeFixes(changes, quotePreference); } if (imports.length && body.length) { return [ @@ -135045,11 +136999,11 @@ ${lanes.join("\n")} } function getNamespaceLikeImport(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 273 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 274 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; + case 271 /* ImportEqualsDeclaration */: return node.name; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return tryCast(node.name, isIdentifier); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); @@ -135085,7 +137039,7 @@ ${lanes.join("\n")} const newNamespaceId = factory.createIdentifier(newNamespaceName); const newModuleString = makeStringLiteral(newModuleSpecifier, quotePreference); switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return factory.createImportDeclaration( /*modifiers*/ void 0, @@ -135100,7 +137054,7 @@ ${lanes.join("\n")} /*assertClause*/ void 0 ); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return factory.createImportEqualsDeclaration( /*modifiers*/ void 0, @@ -135109,7 +137063,7 @@ ${lanes.join("\n")} newNamespaceId, factory.createExternalModuleReference(newModuleString) ); - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return factory.createVariableDeclaration( newNamespaceId, /*exclamationToken*/ @@ -135131,7 +137085,7 @@ ${lanes.join("\n")} ); } function moduleSpecifierFromImport(i) { - return i.kind === 271 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 270 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; + return i.kind === 272 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 271 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { if (isImportDeclaration(statement)) { @@ -135229,15 +137183,15 @@ ${lanes.join("\n")} } function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { switch (importDecl.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused); break; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: if (isUnused(importDecl.name)) { changes.delete(sourceFile, importDecl); } break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused); break; default: @@ -135249,7 +137203,7 @@ ${lanes.join("\n")} return; const { name, namedBindings } = importDecl.importClause; const defaultUnused = !name || isUnused(name); - const namedBindingsUnused = !namedBindings || (namedBindings.kind === 273 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); + const namedBindingsUnused = !namedBindings || (namedBindings.kind === 274 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); if (defaultUnused && namedBindingsUnused) { changes.delete(sourceFile, importDecl); } else { @@ -135269,7 +137223,7 @@ ${lanes.join("\n")} void 0 ) ); - } else if (namedBindings.kind === 274 /* NamedImports */) { + } else if (namedBindings.kind === 275 /* NamedImports */) { for (const element of namedBindings.elements) { if (isUnused(element.name)) changes.delete(sourceFile, element); @@ -135297,9 +137251,9 @@ ${lanes.join("\n")} } } break; - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: break; - case 205 /* ObjectBindingPattern */: + case 206 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { changes.delete( sourceFile, @@ -135325,24 +137279,24 @@ ${lanes.join("\n")} function addEs6Export(d) { const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(95 /* ExportKeyword */)], getModifiers(d)) : void 0; switch (d.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const decorators = canHaveDecorators(d) ? getDecorators(d) : void 0; return factory.updateClassDeclaration(d, concatenate(decorators, modifiers), d.name, d.typeParameters, d.heritageClauses, d.members); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 264 /* TypeAliasDeclaration */: + case 265 /* TypeAliasDeclaration */: return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return Debug.fail(); default: return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); @@ -135362,18 +137316,18 @@ ${lanes.join("\n")} } function getNamesToExportInCommonJS(decl) { switch (decl.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: return [decl.name.text]; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 271 /* ImportEqualsDeclaration */: return emptyArray; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return Debug.fail("Can't export an ExpressionStatement"); default: return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); @@ -135381,7 +137335,7 @@ ${lanes.join("\n")} } function filterImport(i, moduleSpecifier, keep) { switch (i.kind) { - case 271 /* ImportDeclaration */: { + case 272 /* ImportDeclaration */: { const clause = i.importClause; if (!clause) return void 0; @@ -135396,9 +137350,9 @@ ${lanes.join("\n")} void 0 ) : void 0; } - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return keep(i.name) ? i : void 0; - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { const name = filterBindingName(i.name, keep); return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; } @@ -135407,7 +137361,7 @@ ${lanes.join("\n")} } } function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 273 /* NamespaceImport */) { + if (namedBindings.kind === 274 /* NamespaceImport */) { return keep(namedBindings.name) ? namedBindings : void 0; } else { const newElements = namedBindings.elements.filter((e) => keep(e.name)); @@ -135418,9 +137372,9 @@ ${lanes.join("\n")} switch (name.kind) { case 80 /* Identifier */: return keep(name) ? name : void 0; - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: return name; - case 205 /* ObjectBindingPattern */: { + case 206 /* ObjectBindingPattern */: { const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } @@ -135431,9 +137385,9 @@ ${lanes.join("\n")} } function getTopLevelDeclarationStatement(d) { switch (d.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return d.parent.parent; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getTopLevelDeclarationStatement( cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) ); @@ -135481,21 +137435,25 @@ ${lanes.join("\n")} const { file } = context; const range = createTextRangeFromSpan(getRefactorContextSpan(context)); const { statements } = file; - const startNodeIndex = findIndex(statements, (s) => s.end > range.pos); + let startNodeIndex = findIndex(statements, (s) => s.end > range.pos); if (startNodeIndex === -1) return void 0; const startStatement = statements[startNodeIndex]; - if (isNamedDeclaration(startStatement) && startStatement.name && rangeContainsRange(startStatement.name, range)) { - return { toMove: [statements[startNodeIndex]], afterLast: statements[startNodeIndex + 1] }; + const overloadRangeToMove = getOverloadRangeToMove(file, startStatement); + if (overloadRangeToMove) { + startNodeIndex = overloadRangeToMove.start; + } + let endNodeIndex = findIndex(statements, (s) => s.end >= range.end, startNodeIndex); + if (endNodeIndex !== -1 && range.end <= statements[endNodeIndex].getStart()) { + endNodeIndex--; + } + const endingOverloadRangeToMove = getOverloadRangeToMove(file, statements[endNodeIndex]); + if (endingOverloadRangeToMove) { + endNodeIndex = endingOverloadRangeToMove.end; } - if (range.pos > startStatement.getStart(file)) - return void 0; - const afterEndNodeIndex = findIndex(statements, (s) => s.end > range.end, startNodeIndex); - if (afterEndNodeIndex !== -1 && (afterEndNodeIndex === 0 || statements[afterEndNodeIndex].getStart(file) < range.end)) - return void 0; return { - toMove: statements.slice(startNodeIndex, afterEndNodeIndex === -1 ? statements.length : afterEndNodeIndex), - afterLast: afterEndNodeIndex === -1 ? void 0 : statements[afterEndNodeIndex] + toMove: statements.slice(startNodeIndex, endNodeIndex === -1 ? statements.length : endNodeIndex + 1), + afterLast: endNodeIndex === -1 ? void 0 : statements[endNodeIndex + 1] }; } function getStatementsToMove(context) { @@ -135517,11 +137475,11 @@ ${lanes.join("\n")} } function isPureImport(node) { switch (node.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return true; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return !hasSyntacticModifier(node, 1 /* Export */); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall( d.initializer, /*requireStringLiteralLikeArgument*/ @@ -135614,17 +137572,17 @@ ${lanes.join("\n")} } function forEachTopLevelDeclaration(statement, cb) { switch (statement.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 271 /* ImportEqualsDeclaration */: return cb(statement); - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 243 /* ExpressionStatement */: { + case 244 /* ExpressionStatement */: { const { expression } = statement; return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; } @@ -135632,14 +137590,14 @@ ${lanes.join("\n")} } function isInImport(decl) { switch (decl.kind) { - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: return true; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return isVariableDeclarationInImport(decl); - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); default: return false; @@ -135662,8 +137620,8 @@ ${lanes.join("\n")} switch (name.kind) { case 80 /* Identifier */: return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 206 /* ArrayBindingPattern */: - case 205 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); default: return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); @@ -135671,18 +137629,94 @@ ${lanes.join("\n")} } function isNonVariableTopLevelDeclaration(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 263 /* InterfaceDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 271 /* ImportEqualsDeclaration */: return true; default: return false; } } + function moveStatementsToTargetFile(changes, program, statements, targetFile, toMove) { + var _a; + const removedExports = /* @__PURE__ */ new Set(); + const targetExports = (_a = targetFile.symbol) == null ? void 0 : _a.exports; + if (targetExports) { + const checker = program.getTypeChecker(); + const targetToSourceExports = /* @__PURE__ */ new Map(); + for (const node of toMove.all) { + if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 1 /* Export */)) { + forEachTopLevelDeclaration(node, (declaration) => { + var _a2; + const targetDeclarations = canHaveSymbol(declaration) ? (_a2 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a2.declarations : void 0; + const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0); + if (exportDeclaration && exportDeclaration.moduleSpecifier) { + targetToSourceExports.set( + exportDeclaration, + (targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration) + ); + } + }); + } + } + for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) { + if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) { + const elements = exportDeclaration.exportClause.elements; + const updatedElements = filter(elements, (elem) => find(skipAlias(elem.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0); + if (length(updatedElements) === 0) { + changes.deleteNode(targetFile, exportDeclaration); + removedExports.add(exportDeclaration); + continue; + } + if (length(updatedElements) < length(elements)) { + changes.replaceNode( + targetFile, + exportDeclaration, + factory.updateExportDeclaration( + exportDeclaration, + exportDeclaration.modifiers, + exportDeclaration.isTypeOnly, + factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), + exportDeclaration.moduleSpecifier, + exportDeclaration.assertClause + ) + ); + } + } + } + } + const lastReExport = findLast(targetFile.statements, (n) => isExportDeclaration(n) && !!n.moduleSpecifier && !removedExports.has(n)); + if (lastReExport) { + changes.insertNodesBefore( + targetFile, + lastReExport, + statements, + /*blankLineBetween*/ + true + ); + } else { + changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], statements); + } + } + function getOverloadRangeToMove(sourceFile, statement) { + if (isFunctionLikeDeclaration(statement)) { + const declarations = statement.symbol.declarations; + if (declarations === void 0 || length(declarations) <= 1 || !contains(declarations, statement)) { + return void 0; + } + const firstDecl = declarations[0]; + const lastDecl = declarations[length(declarations) - 1]; + const statementsToMove = mapDefined(declarations, (d) => getSourceFileOfNode(d) === sourceFile && isStatement(d) ? d : void 0); + const end = findIndex(sourceFile.statements, (s) => s.end >= lastDecl.end); + const start = findIndex(sourceFile.statements, (s) => s.end >= firstDecl.end); + return { toMove: statementsToMove, start, end }; + } + return void 0; + } var refactorNameForMoveToFile, description2, moveToFileAction; var init_moveToFile = __esm({ "src/services/refactors/moveToFile.ts"() { @@ -135719,13 +137753,17 @@ ${lanes.join("\n")} getEditsForAction: function getRefactorEditsToMoveToFile(context, actionName2, interactiveRefactorArguments) { Debug.assert(actionName2 === refactorNameForMoveToFile, "Wrong refactor invoked"); const statements = Debug.checkDefined(getStatementsToMove(context)); + const { host, program } = context; Debug.assert(interactiveRefactorArguments, "No interactive refactor arguments available"); const targetFile = interactiveRefactorArguments.targetFile; if (hasJSFileExtension(targetFile) || hasTSFileExtension(targetFile)) { + if (host.fileExists(targetFile) && program.getSourceFile(targetFile) === void 0) { + return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_statements_to_the_selected_file)); + } const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences)); return { edits, renameFilename: void 0, renameLocation: void 0 }; } - return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid) }; + return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid)); } }); } @@ -135738,8 +137776,8 @@ ${lanes.join("\n")} if (!info) return emptyArray; return [{ - name: refactorName5, - description: refactorDescription, + name: refactorName6, + description: refactorDescription2, actions: [functionOverloadAction] }]; } @@ -135752,7 +137790,7 @@ ${lanes.join("\n")} const lastDeclaration = signatureDecls[signatureDecls.length - 1]; let updated = lastDeclaration; switch (lastDeclaration.kind) { - case 172 /* MethodSignature */: { + case 173 /* MethodSignature */: { updated = factory.updateMethodSignature( lastDeclaration, lastDeclaration.modifiers, @@ -135764,7 +137802,7 @@ ${lanes.join("\n")} ); break; } - case 173 /* MethodDeclaration */: { + case 174 /* MethodDeclaration */: { updated = factory.updateMethodDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -135778,7 +137816,7 @@ ${lanes.join("\n")} ); break; } - case 178 /* CallSignature */: { + case 179 /* CallSignature */: { updated = factory.updateCallSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -135787,7 +137825,7 @@ ${lanes.join("\n")} ); break; } - case 175 /* Constructor */: { + case 176 /* Constructor */: { updated = factory.updateConstructorDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -135796,7 +137834,7 @@ ${lanes.join("\n")} ); break; } - case 179 /* ConstructSignature */: { + case 180 /* ConstructSignature */: { updated = factory.updateConstructSignature( lastDeclaration, lastDeclaration.typeParameters, @@ -135805,7 +137843,7 @@ ${lanes.join("\n")} ); break; } - case 261 /* FunctionDeclaration */: { + case 262 /* FunctionDeclaration */: { updated = factory.updateFunctionDeclaration( lastDeclaration, lastDeclaration.modifiers, @@ -135878,12 +137916,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConvertableSignatureDeclaration(d) { switch (d.kind) { - case 172 /* MethodSignature */: - case 173 /* MethodDeclaration */: - case 178 /* CallSignature */: - case 175 /* Constructor */: - case 179 /* ConstructSignature */: - case 261 /* FunctionDeclaration */: + case 173 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 179 /* CallSignature */: + case 176 /* Constructor */: + case 180 /* ConstructSignature */: + case 262 /* FunctionDeclaration */: return true; } return false; @@ -135930,20 +137968,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return signatureDecls; } - var refactorName5, refactorDescription, functionOverloadAction; + var refactorName6, refactorDescription2, functionOverloadAction; var init_convertOverloadListToSingleSignature = __esm({ "src/services/refactors/convertOverloadListToSingleSignature.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName5 = "Convert overload list to single signature"; - refactorDescription = Diagnostics.Convert_overload_list_to_single_signature.message; + refactorName6 = "Convert overload list to single signature"; + refactorDescription2 = getLocaleSpecificMessage(Diagnostics.Convert_overload_list_to_single_signature); functionOverloadAction = { - name: refactorName5, - description: refactorDescription, + name: refactorName6, + description: refactorDescription2, kind: "refactor.rewrite.function.overloadList" }; - registerRefactor(refactorName5, { + registerRefactor(refactorName6, { kinds: [functionOverloadAction.kind], getEditsForAction: getRefactorEditsToConvertOverloadsToOneSignature, getAvailableActions: getRefactorActionsToConvertOverloadsToOneSignature @@ -135959,8 +137997,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return emptyArray; if (!isRefactorErrorInfo(info)) { return [{ - name: refactorName6, - description: refactorDescription2, + name: refactorName7, + description: refactorDescription3, actions: [ info.addBraces ? addBracesAction : removeBracesAction ] @@ -135968,8 +138006,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName6, - description: refactorDescription2, + name: refactorName7, + description: refactorDescription3, actions: [ { ...addBracesAction, notApplicableReason: info.error }, { ...removeBracesAction, notApplicableReason: info.error } @@ -136060,25 +138098,25 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return void 0; } - var refactorName6, refactorDescription2, addBracesAction, removeBracesAction; + var refactorName7, refactorDescription3, addBracesAction, removeBracesAction; var init_addOrRemoveBracesToArrowFunction = __esm({ "src/services/refactors/addOrRemoveBracesToArrowFunction.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName6 = "Add or remove braces in an arrow function"; - refactorDescription2 = Diagnostics.Add_or_remove_braces_in_an_arrow_function.message; + refactorName7 = "Add or remove braces in an arrow function"; + refactorDescription3 = getLocaleSpecificMessage(Diagnostics.Add_or_remove_braces_in_an_arrow_function); addBracesAction = { name: "Add braces to arrow function", - description: Diagnostics.Add_braces_to_arrow_function.message, + description: getLocaleSpecificMessage(Diagnostics.Add_braces_to_arrow_function), kind: "refactor.rewrite.arrow.braces.add" }; removeBracesAction = { name: "Remove braces from arrow function", - description: Diagnostics.Remove_braces_from_arrow_function.message, + description: getLocaleSpecificMessage(Diagnostics.Remove_braces_from_arrow_function), kind: "refactor.rewrite.arrow.braces.remove" }; - registerRefactor(refactorName6, { + registerRefactor(refactorName7, { kinds: [removeBracesAction.kind], getEditsForAction: getRefactorEditsToRemoveFunctionBraces, getAvailableActions: getRefactorActionsToRemoveFunctionBraces @@ -136106,32 +138144,32 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const possibleActions = []; const errors = []; if (refactorKindBeginsWith(toNamedFunctionAction.kind, kind)) { - const error = selectedVariableDeclaration || isArrowFunction(func) && isVariableDeclaration(func.parent) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function); - if (error) { - errors.push({ ...toNamedFunctionAction, notApplicableReason: error }); + const error2 = selectedVariableDeclaration || isArrowFunction(func) && isVariableDeclaration(func.parent) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function); + if (error2) { + errors.push({ ...toNamedFunctionAction, notApplicableReason: error2 }); } else { possibleActions.push(toNamedFunctionAction); } } if (refactorKindBeginsWith(toAnonymousFunctionAction.kind, kind)) { - const error = !selectedVariableDeclaration && isArrowFunction(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function); - if (error) { - errors.push({ ...toAnonymousFunctionAction, notApplicableReason: error }); + const error2 = !selectedVariableDeclaration && isArrowFunction(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function); + if (error2) { + errors.push({ ...toAnonymousFunctionAction, notApplicableReason: error2 }); } else { possibleActions.push(toAnonymousFunctionAction); } } if (refactorKindBeginsWith(toArrowFunctionAction.kind, kind)) { - const error = isFunctionExpression(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function); - if (error) { - errors.push({ ...toArrowFunctionAction, notApplicableReason: error }); + const error2 = isFunctionExpression(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function); + if (error2) { + errors.push({ ...toArrowFunctionAction, notApplicableReason: error2 }); } else { possibleActions.push(toArrowFunctionAction); } } return [{ - name: refactorName7, - description: refactorDescription3, + name: refactorName8, + description: refactorDescription4, actions: possibleActions.length === 0 && context.preferences.provideRefactorNotApplicableReason ? errors : possibleActions }]; } @@ -136291,14 +138329,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isFunctionReferencedInFile(sourceFile, typeChecker, node) { return !!node.name && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(node.name, typeChecker, sourceFile); } - var refactorName7, refactorDescription3, toAnonymousFunctionAction, toNamedFunctionAction, toArrowFunctionAction; + var refactorName8, refactorDescription4, toAnonymousFunctionAction, toNamedFunctionAction, toArrowFunctionAction; var init_convertArrowFunctionOrFunctionExpression = __esm({ "src/services/refactors/convertArrowFunctionOrFunctionExpression.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName7 = "Convert arrow function or function expression"; - refactorDescription3 = getLocaleSpecificMessage(Diagnostics.Convert_arrow_function_or_function_expression); + refactorName8 = "Convert arrow function or function expression"; + refactorDescription4 = getLocaleSpecificMessage(Diagnostics.Convert_arrow_function_or_function_expression); toAnonymousFunctionAction = { name: "Convert to anonymous function", description: getLocaleSpecificMessage(Diagnostics.Convert_to_anonymous_function), @@ -136314,7 +138352,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} description: getLocaleSpecificMessage(Diagnostics.Convert_to_arrow_function), kind: "refactor.rewrite.function.arrow" }; - registerRefactor(refactorName7, { + registerRefactor(refactorName8, { kinds: [ toAnonymousFunctionAction.kind, toNamedFunctionAction.kind, @@ -136345,13 +138383,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!functionDeclaration) return emptyArray; return [{ - name: refactorName8, - description: refactorDescription4, + name: refactorName9, + description: refactorDescription5, actions: [toDestructuredAction] }]; } function getRefactorEditsToConvertParametersToDestructuredObject(context, actionName2) { - Debug.assert(actionName2 === refactorName8, "Unexpected action name"); + Debug.assert(actionName2 === refactorName9, "Unexpected action name"); const { file, startPosition, program, cancellationToken, host } = context; const functionDeclaration = getFunctionDeclarationAtPosition(file, startPosition, program.getTypeChecker()); if (!functionDeclaration || !cancellationToken) @@ -136537,14 +138575,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const functionReference = entry.node; const parent2 = functionReference.parent; switch (parent2.kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); if (callOrNewExpression && callOrNewExpression.expression === functionReference) { return callOrNewExpression; } break; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); @@ -136553,7 +138591,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); @@ -136571,13 +138609,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const reference = entry.node; const parent2 = reference.parent; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const elementAccessExpression = tryCast(parent2, isElementAccessExpression); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; @@ -136619,22 +138657,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) return false; switch (functionDeclaration.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: if (isObjectLiteralExpression(functionDeclaration.parent)) { const contextualSymbol = getSymbolForContextualType(functionDeclaration.name, checker); return ((_a = contextualSymbol == null ? void 0 : contextualSymbol.declarations) == null ? void 0 : _a.length) === 1 && isSingleImplementation(functionDeclaration, checker); } return isSingleImplementation(functionDeclaration, checker); - case 175 /* Constructor */: + case 176 /* Constructor */: if (isClassDeclaration(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); } - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return isValidVariableDeclaration(functionDeclaration.parent); } return false; @@ -136811,7 +138849,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getClassNames(constructorDeclaration) { switch (constructorDeclaration.parent.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const classDeclaration = constructorDeclaration.parent; if (classDeclaration.name) return [classDeclaration.name]; @@ -136820,7 +138858,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} "Nameless class declaration should be a default export" ); return [defaultModifier]; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: const classExpression = constructorDeclaration.parent; const variableDeclaration = constructorDeclaration.parent.parent; const className = classExpression.name; @@ -136831,7 +138869,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getFunctionNames(functionDeclaration) { switch (functionDeclaration.kind) { - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: if (functionDeclaration.name) return [functionDeclaration.name]; const defaultModifier = Debug.checkDefined( @@ -136839,21 +138877,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} "Nameless function declaration should be a default export" ); return [defaultModifier]; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return [functionDeclaration.name]; - case 175 /* Constructor */: + case 176 /* Constructor */: const ctrKeyword = Debug.checkDefined( findChildOfKind(functionDeclaration, 137 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), "Constructor declaration should have constructor keyword" ); - if (functionDeclaration.parent.kind === 230 /* ClassExpression */) { + if (functionDeclaration.parent.kind === 231 /* ClassExpression */) { const variableDeclaration = functionDeclaration.parent.parent; return [variableDeclaration.name, ctrKeyword]; } return [ctrKeyword]; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return [functionDeclaration.parent.name]; - case 217 /* FunctionExpression */: + case 218 /* FunctionExpression */: if (functionDeclaration.name) return [functionDeclaration.name, functionDeclaration.parent.name]; return [functionDeclaration.parent.name]; @@ -136861,21 +138899,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return Debug.assertNever(functionDeclaration, `Unexpected function declaration kind ${functionDeclaration.kind}`); } } - var refactorName8, minimumParameterLength, refactorDescription4, toDestructuredAction; + var refactorName9, minimumParameterLength, refactorDescription5, toDestructuredAction; var init_convertParamsToDestructuredObject = __esm({ "src/services/refactors/convertParamsToDestructuredObject.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName8 = "Convert parameters to destructured object"; + refactorName9 = "Convert parameters to destructured object"; minimumParameterLength = 1; - refactorDescription4 = getLocaleSpecificMessage(Diagnostics.Convert_parameters_to_destructured_object); + refactorDescription5 = getLocaleSpecificMessage(Diagnostics.Convert_parameters_to_destructured_object); toDestructuredAction = { - name: refactorName8, - description: refactorDescription4, + name: refactorName9, + description: refactorDescription5, kind: "refactor.rewrite.parameters.toDestructured" }; - registerRefactor(refactorName8, { + registerRefactor(refactorName9, { kinds: [toDestructuredAction.kind], getEditsForAction: getRefactorEditsToConvertParametersToDestructuredObject, getAvailableActions: getRefactorActionsToConvertParametersToDestructuredObject @@ -136897,7 +138935,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { file, startPosition } = context; const node = getNodeOrParentOfParentheses(file, startPosition); const maybeBinary = getParentBinaryExpression(node); - const refactorInfo = { name: refactorName9, description: refactorDescription5, actions: [] }; + const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] }; if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) { refactorInfo.actions.push(convertStringAction); return [refactorInfo]; @@ -136923,7 +138961,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { file, startPosition } = context; const node = getNodeOrParentOfParentheses(file, startPosition); switch (actionName2) { - case refactorDescription5: + case refactorDescription6: return { edits: getEditsForToTemplateLiteral(context, node) }; default: return Debug.fail("invalid action"); @@ -136946,16 +138984,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function isNotEqualsOperator(node) { - return node.operatorToken.kind !== 64 /* EqualsToken */; + return !(node.operatorToken.kind === 64 /* EqualsToken */ || node.operatorToken.kind === 65 /* PlusEqualsToken */); } function getParentBinaryExpression(expr) { const container = findAncestor(expr.parent, (n) => { switch (n.kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return false; - case 227 /* TemplateExpression */: - case 225 /* BinaryExpression */: + case 228 /* TemplateExpression */: + case 226 /* BinaryExpression */: return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; @@ -137074,20 +139112,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return node; } - var refactorName9, refactorDescription5, convertStringAction, copyTrailingOperatorComments, copyCommentFromMultiNode; + var refactorName10, refactorDescription6, convertStringAction, copyTrailingOperatorComments, copyCommentFromMultiNode; var init_convertStringOrTemplateLiteral = __esm({ "src/services/refactors/convertStringOrTemplateLiteral.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName9 = "Convert to template string"; - refactorDescription5 = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string); + refactorName10 = "Convert to template string"; + refactorDescription6 = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string); convertStringAction = { - name: refactorName9, - description: refactorDescription5, + name: refactorName10, + description: refactorDescription6, kind: "refactor.rewrite.string" }; - registerRefactor(refactorName9, { + registerRefactor(refactorName10, { kinds: [convertStringAction.kind], getEditsForAction: getRefactorEditsToConvertToTemplateString, getAvailableActions: getRefactorActionsToConvertToTemplateString @@ -137137,14 +139175,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return emptyArray; if (!isRefactorErrorInfo(info)) { return [{ - name: refactorName10, + name: refactorName11, description: convertToOptionalChainExpressionMessage, actions: [toOptionalChainAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName10, + name: refactorName11, description: convertToOptionalChainExpressionMessage, actions: [{ ...toOptionalChainAction, notApplicableReason: info.error }] }]; @@ -137328,20 +139366,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } } - var refactorName10, convertToOptionalChainExpressionMessage, toOptionalChainAction; + var refactorName11, convertToOptionalChainExpressionMessage, toOptionalChainAction; var init_convertToOptionalChainExpression = __esm({ "src/services/refactors/convertToOptionalChainExpression.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName10 = "Convert to optional chain expression"; + refactorName11 = "Convert to optional chain expression"; convertToOptionalChainExpressionMessage = getLocaleSpecificMessage(Diagnostics.Convert_to_optional_chain_expression); toOptionalChainAction = { - name: refactorName10, + name: refactorName11, description: convertToOptionalChainExpressionMessage, kind: "refactor.rewrite.expression.optionalChain" }; - registerRefactor(refactorName10, { + registerRefactor(refactorName11, { kinds: [toOptionalChainAction.kind], getEditsForAction: getRefactorEditsToConvertToOptionalChain, getAvailableActions: getRefactorActionsToConvertToOptionalChain @@ -137370,14 +139408,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const errors = []; if (refactorKindBeginsWith(extractFunctionAction.kind, requestedRefactor)) { errors.push({ - name: refactorName11, + name: refactorName12, description: extractFunctionAction.description, actions: [{ ...extractFunctionAction, notApplicableReason: getStringError(rangeToExtract.errors) }] }); } if (refactorKindBeginsWith(extractConstantAction.kind, requestedRefactor)) { errors.push({ - name: refactorName11, + name: refactorName12, description: extractConstantAction.description, actions: [{ ...extractConstantAction, notApplicableReason: getStringError(rangeToExtract.errors) }] }); @@ -137441,37 +139479,37 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const infos = []; if (functionActions.length) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_function), actions: functionActions }); } else if (context.preferences.provideRefactorNotApplicableReason && innermostErrorFunctionAction) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_function), actions: [innermostErrorFunctionAction] }); } if (constantActions.length) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_constant), actions: constantActions }); } else if (context.preferences.provideRefactorNotApplicableReason && innermostErrorConstantAction) { infos.push({ - name: refactorName11, + name: refactorName12, description: getLocaleSpecificMessage(Diagnostics.Extract_constant), actions: [innermostErrorConstantAction] }); } return infos.length ? infos : emptyArray; function getStringError(errors) { - let error = errors[0].messageText; - if (typeof error !== "string") { - error = error.messageText; + let error2 = errors[0].messageText; + if (typeof error2 !== "string") { + error2 = error2.messageText; } - return error; + return error2; } } function getRefactorEditsToExtractSymbol(context, actionName2) { @@ -137507,7 +139545,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!start || !end) { return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] }; } - if (start.flags & 8388608 /* JSDoc */) { + if (start.flags & 16777216 /* JSDoc */) { return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractJSDoc)] }; } if (start.parent !== end.parent) { @@ -137578,18 +139616,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function checkForStaticContext(nodeToCheck, containingClass) { let current = nodeToCheck; while (current !== containingClass) { - if (current.kind === 171 /* PropertyDeclaration */) { + if (current.kind === 172 /* PropertyDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 168 /* Parameter */) { + } else if (current.kind === 169 /* Parameter */) { const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 175 /* Constructor */) { + if (ctorOrMethod.kind === 176 /* Constructor */) { rangeFacts |= 32 /* InStaticRegion */; } break; - } else if (current.kind === 173 /* MethodDeclaration */) { + } else if (current.kind === 174 /* MethodDeclaration */) { if (isStatic(current)) { rangeFacts |= 32 /* InStaticRegion */; } @@ -137610,7 +139648,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!isStatement(nodeToCheck) && !(isExpressionNode(nodeToCheck) && isExtractableExpression(nodeToCheck)) && !isStringLiteralJsxAttribute(nodeToCheck)) { return [createDiagnosticForNode(nodeToCheck, Messages.statementOrExpressionExpected)]; } - if (nodeToCheck.flags & 16777216 /* Ambient */) { + if (nodeToCheck.flags & 33554432 /* Ambient */) { return [createDiagnosticForNode(nodeToCheck, Messages.cannotExtractAmbientBlock)]; } const containingClass = getContainingClass(nodeToCheck); @@ -137629,7 +139667,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} /*includeClassComputedPropertyName*/ false ); - if (container.kind === 261 /* FunctionDeclaration */ || container.kind === 173 /* MethodDeclaration */ && container.parent.kind === 209 /* ObjectLiteralExpression */ || container.kind === 217 /* FunctionExpression */) { + if (container.kind === 262 /* FunctionDeclaration */ || container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ || container.kind === 218 /* FunctionExpression */) { rangeFacts |= 16 /* UsesThisInFunction */; } } @@ -137639,21 +139677,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return true; } if (isDeclaration(node2)) { - const declaringNode = node2.kind === 259 /* VariableDeclaration */ ? node2.parent.parent : node2; + const declaringNode = node2.kind === 260 /* VariableDeclaration */ ? node2.parent.parent : node2; if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } } switch (node2.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); return true; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; case 108 /* SuperKeyword */: - if (node2.parent.kind === 212 /* CallExpression */) { + if (node2.parent.kind === 213 /* CallExpression */) { const containingClass2 = getContainingClass(node2); if (containingClass2 === void 0 || containingClass2.pos < span.start || containingClass2.end >= span.start + span.length) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractSuper)); @@ -137664,7 +139702,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} thisNode = node2; } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: forEachChild(node2, function check(n) { if (isThis(n)) { rangeFacts |= 8 /* UsesThis */; @@ -137675,34 +139713,34 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} forEachChild(n, check); } }); - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); } - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return false; } const savedPermittedJumps = permittedJumps; switch (node2.kind) { - case 244 /* IfStatement */: + case 245 /* IfStatement */: permittedJumps &= ~4 /* Return */; break; - case 257 /* TryStatement */: + case 258 /* TryStatement */: permittedJumps = 0 /* None */; break; - case 240 /* Block */: - if (node2.parent && node2.parent.kind === 257 /* TryStatement */ && node2.parent.finallyBlock === node2) { + case 241 /* Block */: + if (node2.parent && node2.parent.kind === 258 /* TryStatement */ && node2.parent.finallyBlock === node2) { permittedJumps = 4 /* Return */; } break; - case 296 /* DefaultClause */: - case 295 /* CaseClause */: + case 297 /* DefaultClause */: + case 296 /* CaseClause */: permittedJumps |= 1 /* Break */; break; default: @@ -137716,39 +139754,39 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; } switch (node2.kind) { - case 196 /* ThisType */: + case 197 /* ThisType */: case 110 /* ThisKeyword */: rangeFacts |= 8 /* UsesThis */; thisNode = node2; break; - case 255 /* LabeledStatement */: { + case 256 /* LabeledStatement */: { const label = node2.label; (seenLabels || (seenLabels = [])).push(label.escapedText); forEachChild(node2, visit); seenLabels.pop(); break; } - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: { + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: { const label = node2.label; if (label) { if (!contains(seenLabels, label.escapedText)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { - if (!(permittedJumps & (node2.kind === 251 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { + if (!(permittedJumps & (node2.kind === 252 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; } - case 222 /* AwaitExpression */: + case 223 /* AwaitExpression */: rangeFacts |= 4 /* IsAsyncFunction */; break; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: rangeFacts |= 2 /* IsGenerator */; break; - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: if (permittedJumps & 4 /* Return */) { rangeFacts |= 1 /* HasReturn */; } else { @@ -137798,12 +139836,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const scopes = []; while (true) { current = current.parent; - if (current.kind === 168 /* Parameter */) { + if (current.kind === 169 /* Parameter */) { current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; } if (isScope(current)) { scopes.push(current); - if (current.kind === 311 /* SourceFile */) { + if (current.kind === 312 /* SourceFile */) { return scopes; } } @@ -137879,28 +139917,28 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getDescriptionForFunctionLikeDeclaration(scope) { switch (scope.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: return "constructor"; - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return "arrow function"; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return `method '${scope.name.getText()}'`; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return `'get ${scope.name.getText()}'`; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return `'set ${scope.name.getText()}'`; default: Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); } } function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 262 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; + return scope.kind === 263 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; } function getDescriptionForModuleLikeDeclaration(scope) { - return scope.kind === 267 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; + return scope.kind === 268 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; } function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParameterUsages, substitutions }, exposedVariableDeclarations, range, context) { const checker = context.program.getTypeChecker(); @@ -138277,7 +140315,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); const localReference = factory.createIdentifier(localNameText); changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 243 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { + } else if (node.parent.kind === 244 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { const newVariableStatement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -138307,7 +140345,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} false ); } - if (node.parent.kind === 243 /* ExpressionStatement */) { + if (node.parent.kind === 244 /* ExpressionStatement */) { changeTracker.delete(context.file, node.parent); } else { let localReference = factory.createIdentifier(localNameText); @@ -138859,27 +140897,27 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isExtractableExpression(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 305 /* EnumMember */: + case 306 /* EnumMember */: return false; } switch (node.kind) { case 11 /* StringLiteral */: - return parent2.kind !== 271 /* ImportDeclaration */ && parent2.kind !== 275 /* ImportSpecifier */; - case 229 /* SpreadElement */: - case 205 /* ObjectBindingPattern */: - case 207 /* BindingElement */: + return parent2.kind !== 272 /* ImportDeclaration */ && parent2.kind !== 276 /* ImportSpecifier */; + case 230 /* SpreadElement */: + case 206 /* ObjectBindingPattern */: + case 208 /* BindingElement */: return false; case 80 /* Identifier */: - return parent2.kind !== 207 /* BindingElement */ && parent2.kind !== 275 /* ImportSpecifier */ && parent2.kind !== 280 /* ExportSpecifier */; + return parent2.kind !== 208 /* BindingElement */ && parent2.kind !== 276 /* ImportSpecifier */ && parent2.kind !== 281 /* ExportSpecifier */; } return true; } function isBlockLike(node) { switch (node.kind) { - case 240 /* Block */: - case 311 /* SourceFile */: - case 267 /* ModuleBlock */: - case 295 /* CaseClause */: + case 241 /* Block */: + case 312 /* SourceFile */: + case 268 /* ModuleBlock */: + case 296 /* CaseClause */: return true; default: return false; @@ -138891,13 +140929,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isStringLiteralJsxAttribute(node) { return isStringLiteral(node) && node.parent && isJsxAttribute(node.parent); } - var refactorName11, extractConstantAction, extractFunctionAction, Messages, RangeFacts; + var refactorName12, extractConstantAction, extractFunctionAction, Messages, RangeFacts; var init_extractSymbol = __esm({ "src/services/refactors/extractSymbol.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName11 = "Extract Symbol"; + refactorName12 = "Extract Symbol"; extractConstantAction = { name: "Extract Constant", description: getLocaleSpecificMessage(Diagnostics.Extract_constant), @@ -138908,7 +140946,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} description: getLocaleSpecificMessage(Diagnostics.Extract_function), kind: "refactor.extract.function" }; - registerRefactor(refactorName11, { + registerRefactor(refactorName12, { kinds: [ extractConstantAction.kind, extractFunctionAction.kind @@ -138981,7 +141019,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} init_ts4(); init_ts_refactor(); actionName = "Generate 'get' and 'set' accessors"; - actionDescription = Diagnostics.Generate_get_and_set_accessors.message; + actionDescription = getLocaleSpecificMessage(Diagnostics.Generate_get_and_set_accessors); generateGetSetAction = { name: actionName, description: actionDescription, @@ -139059,15 +141097,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return emptyArray; if (!isRefactorErrorInfo(info)) { return [{ - name: refactorName12, - description: refactorDescription6, + name: refactorName13, + description: refactorDescription7, actions: [inferReturnTypeAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { return [{ - name: refactorName12, - description: refactorDescription6, + name: refactorName13, + description: refactorDescription7, actions: [{ ...inferReturnTypeAction, notApplicableReason: info.error }] }]; } @@ -139105,10 +141143,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConvertibleDeclaration(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: return true; default: return false; @@ -139126,20 +141164,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return typeChecker.getReturnTypeOfSignature(signature); } } - var refactorName12, refactorDescription6, inferReturnTypeAction; + var refactorName13, refactorDescription7, inferReturnTypeAction; var init_inferFunctionReturnType = __esm({ "src/services/refactors/inferFunctionReturnType.ts"() { "use strict"; init_ts4(); init_ts_refactor(); - refactorName12 = "Infer function return type"; - refactorDescription6 = Diagnostics.Infer_function_return_type.message; + refactorName13 = "Infer function return type"; + refactorDescription7 = getLocaleSpecificMessage(Diagnostics.Infer_function_return_type); inferReturnTypeAction = { - name: refactorName12, - description: refactorDescription6, + name: refactorName13, + description: refactorDescription7, kind: "refactor.rewrite.function.returnType" }; - registerRefactor(refactorName12, { + registerRefactor(refactorName13, { kinds: [inferReturnTypeAction.kind], getEditsForAction: getRefactorEditsToInferReturnType, getAvailableActions: getRefactorActionsToInferReturnType @@ -139200,6 +141238,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} init_convertImport(); init_extractType(); init_helpers(); + init_inlineVariable(); init_moveToNewFile(); init_moveToFile(); init_ts_refactor_addOrRemoveBracesToArrowFunction(); @@ -139248,13 +141287,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let inJSXElement = false; function visit(node) { switch (node.kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { @@ -139425,25 +141464,25 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return TokenModifier2; })(TokenModifier || {}); tokenFromDeclarationMapping = /* @__PURE__ */ new Map([ - [259 /* VariableDeclaration */, 7 /* variable */], - [168 /* Parameter */, 6 /* parameter */], - [171 /* PropertyDeclaration */, 9 /* property */], - [266 /* ModuleDeclaration */, 3 /* namespace */], - [265 /* EnumDeclaration */, 1 /* enum */], - [305 /* EnumMember */, 8 /* enumMember */], - [262 /* ClassDeclaration */, 0 /* class */], - [173 /* MethodDeclaration */, 11 /* member */], - [261 /* FunctionDeclaration */, 10 /* function */], - [217 /* FunctionExpression */, 10 /* function */], - [172 /* MethodSignature */, 11 /* member */], - [176 /* GetAccessor */, 9 /* property */], - [177 /* SetAccessor */, 9 /* property */], - [170 /* PropertySignature */, 9 /* property */], - [263 /* InterfaceDeclaration */, 2 /* interface */], - [264 /* TypeAliasDeclaration */, 5 /* type */], - [167 /* TypeParameter */, 4 /* typeParameter */], - [302 /* PropertyAssignment */, 9 /* property */], - [303 /* ShorthandPropertyAssignment */, 9 /* property */] + [260 /* VariableDeclaration */, 7 /* variable */], + [169 /* Parameter */, 6 /* parameter */], + [172 /* PropertyDeclaration */, 9 /* property */], + [267 /* ModuleDeclaration */, 3 /* namespace */], + [266 /* EnumDeclaration */, 1 /* enum */], + [306 /* EnumMember */, 8 /* enumMember */], + [263 /* ClassDeclaration */, 0 /* class */], + [174 /* MethodDeclaration */, 11 /* member */], + [262 /* FunctionDeclaration */, 10 /* function */], + [218 /* FunctionExpression */, 10 /* function */], + [173 /* MethodSignature */, 11 /* member */], + [177 /* GetAccessor */, 9 /* property */], + [178 /* SetAccessor */, 9 /* property */], + [171 /* PropertySignature */, 9 /* property */], + [264 /* InterfaceDeclaration */, 2 /* interface */], + [265 /* TypeAliasDeclaration */, 5 /* type */], + [168 /* TypeParameter */, 4 /* typeParameter */], + [303 /* PropertyAssignment */, 9 /* property */], + [304 /* ShorthandPropertyAssignment */, 9 /* property */] ]); } }); @@ -139452,7 +141491,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function createNode(kind, pos, end, parent2) { const node = isNodeKind(kind) ? new NodeObject(kind, pos, end) : kind === 80 /* Identifier */ ? new IdentifierObject(80 /* Identifier */, pos, end) : kind === 81 /* PrivateIdentifier */ ? new PrivateIdentifierObject(81 /* PrivateIdentifier */, pos, end) : new TokenObject(kind, pos, end); node.parent = parent2; - node.flags = parent2.flags & 50720768 /* ContextFlags */; + node.flags = parent2.flags & 101441536 /* ContextFlags */; return node; } function createChildren(node, sourceFile) { @@ -139506,7 +141545,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function createSyntaxList(nodes, parent2) { - const list = createNode(357 /* SyntaxList */, nodes.pos, nodes.end, parent2); + const list = createNode(358 /* SyntaxList */, nodes.pos, nodes.end, parent2); list._children = []; let pos = nodes.pos; for (const node of nodes) { @@ -139531,7 +141570,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} var _a; if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 176 /* GetAccessor */ || declaration.kind === 177 /* SetAccessor */) { + if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { return symbol.getContextualJsDocTags(declaration, checker); } return ((_a = symbol.declarations) == null ? void 0 : _a.length) === 1 ? symbol.getJsDocTags() : void 0; @@ -139554,7 +141593,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { if (!seenSymbols.has(symbol)) { seenSymbols.add(symbol); - if (declaration.kind === 176 /* GetAccessor */ || declaration.kind === 177 /* SetAccessor */) { + if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { return symbol.getContextualDocumentationComment(declaration, checker); } return symbol.getDocumentationComment(checker); @@ -139568,7 +141607,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function findBaseOfDeclaration(checker, declaration, cb) { var _a; - const classOrInterfaceDeclaration = ((_a = declaration.parent) == null ? void 0 : _a.kind) === 175 /* Constructor */ ? declaration.parent.parent : declaration.parent; + const classOrInterfaceDeclaration = ((_a = declaration.parent) == null ? void 0 : _a.kind) === 176 /* Constructor */ ? declaration.parent.parent : declaration.parent; if (!classOrInterfaceDeclaration) return; const isStaticMember = hasStaticModifier(declaration); @@ -139700,10 +141739,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} host.log(message); } } - const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames(host); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const sourceMapper = getSourceMapper({ - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, + useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, getCurrentDirectory: () => currentDirectory, getProgram, fileExists: maybeBind(host, host.fileExists), @@ -139715,9 +141754,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getValidSourceFile(fileName) { const sourceFile = program.getSourceFile(fileName); if (!sourceFile) { - const error = new Error(`Could not find source file: '${fileName}'.`); - error.ProgramFiles = program.getSourceFiles().map((f) => f.fileName); - throw error; + const error2 = new Error(`Could not find source file: '${fileName}'.`); + error2.ProgramFiles = program.getSourceFiles().map((f) => f.fileName); + throw error2; } return sourceFile; } @@ -139751,7 +141790,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} getSourceFileByPath: getOrCreateSourceFileByPath, getCancellationToken: () => cancellationToken, getCanonicalFileName, - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames, + useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, getNewLine: () => getNewLineCharacter(newSettings), getDefaultLibFileName: (options2) => host.getDefaultLibFileName(options2), writeFile: noop, @@ -139795,9 +141834,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} compilerHost.getSourceFile = getSourceFileWithCache; (_c = host.setCompilerHost) == null ? void 0 : _c.call(host, compilerHost); const parseConfigHost = { - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, fileExists: (fileName) => compilerHost.fileExists(fileName), readFile: (fileName) => compilerHost.readFile(fileName), + directoryExists: (f) => compilerHost.directoryExists(f), + getDirectories: (f) => compilerHost.getDirectories(f), + realpath: compilerHost.realpath, readDirectory: (...args) => compilerHost.readDirectory(...args), trace: compilerHost.trace, getCurrentDirectory: compilerHost.getCurrentDirectory, @@ -139950,14 +141992,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function cleanupSemanticCache() { - program = void 0; - } - function dispose() { if (program) { const key = documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions()); forEach(program.getSourceFiles(), (f) => documentRegistry.releaseDocumentWithKey(f.resolvedPath, key, f.scriptKind, f.impliedNodeFormat)); program = void 0; } + } + function dispose() { + cleanupSemanticCache(); host = void 0; } function getSyntacticDiagnostics(fileName) { @@ -140076,15 +142118,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} switch (node.kind) { case 80 /* Identifier */: return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 210 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: return !isInComment(sourceFile, position); case 110 /* ThisKeyword */: - case 196 /* ThisType */: + case 197 /* ThisType */: case 108 /* SuperKeyword */: - case 201 /* NamedTupleMember */: + case 202 /* NamedTupleMember */: return true; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: return isImportMeta(node); default: return false; @@ -140184,15 +142226,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } switch (node.kind) { - case 210 /* PropertyAccessExpression */: - case 165 /* QualifiedName */: + case 211 /* PropertyAccessExpression */: + case 166 /* QualifiedName */: case 11 /* StringLiteral */: case 97 /* FalseKeyword */: case 112 /* TrueKeyword */: case 106 /* NullKeyword */: case 108 /* SuperKeyword */: case 110 /* ThisKeyword */: - case 196 /* ThisType */: + case 197 /* ThisType */: case 80 /* Identifier */: break; default: @@ -140203,7 +142245,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { nodeForStartPos = nodeForStartPos.parent; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 266 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { + if (nodeForStartPos.parent.parent.kind === 267 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { nodeForStartPos = nodeForStartPos.parent.parent.name; } else { break; @@ -140380,7 +142422,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getLinkedEditingRangeAtPosition(fileName, position) { const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); const token = findPrecedingToken(position, sourceFile); - if (!token || token.parent.kind === 311 /* SourceFile */) + if (!token || token.parent.kind === 312 /* SourceFile */) return void 0; const jsxTagWordPattern = "[a-zA-Z0-9:\\-\\._$]*"; if (isJsxFragment(token.parent.parent)) { @@ -140628,7 +142670,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return !tagNamesAreEquivalent(openingElement.tagName, closingElement.tagName) || isJsxElement(parent2) && tagNamesAreEquivalent(openingElement.tagName, parent2.openingElement.tagName) && isUnclosedTag(parent2); } function isUnclosedFragment({ closingFragment, parent: parent2 }) { - return !!(closingFragment.flags & 131072 /* ThisNodeHasError */) || isJsxFragment(parent2) && isUnclosedFragment(parent2); + return !!(closingFragment.flags & 262144 /* ThisNodeHasError */) || isJsxFragment(parent2) && isUnclosedFragment(parent2); } function getSpanOfEnclosingComment(fileName, position, onlyMultiLine) { const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); @@ -140670,7 +142712,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return result; function escapeRegExp(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&"); } function getTodoCommentsRegExp() { const singleLineCommentStart = /(?:\/\/+\s*)/.source; @@ -140738,10 +142780,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const newFileName = createNewFileName(sourceFile, program, getRefactorContext(sourceFile, positionOrRange, preferences, emptyOptions), host); return { newFileName, files }; } - function getEditsForRefactor2(fileName, formatOptions, positionOrRange, refactorName13, actionName2, preferences = emptyOptions, interactiveRefactorArguments) { + function getEditsForRefactor2(fileName, formatOptions, positionOrRange, refactorName14, actionName2, preferences = emptyOptions, interactiveRefactorArguments) { synchronizeHostData(); const file = getValidSourceFile(fileName); - return ts_refactor_exports.getEditsForRefactor(getRefactorContext(file, positionOrRange, preferences, formatOptions), refactorName13, actionName2, interactiveRefactorArguments); + return ts_refactor_exports.getEditsForRefactor(getRefactorContext(file, positionOrRange, preferences, formatOptions), refactorName14, actionName2, interactiveRefactorArguments); } function toLineColumnOffset(fileName, position) { if (position === 0) { @@ -140889,7 +142931,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); } function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 282 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); + return isDeclarationName(node) || node.parent.kind === 283 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); @@ -140900,11 +142942,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: - if (node.parent.kind === 166 /* ComputedPropertyName */) { + if (node.parent.kind === 167 /* ComputedPropertyName */) { return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; } case 80 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 209 /* ObjectLiteralExpression */ || node.parent.parent.kind === 291 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; + return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.parent.kind === 292 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; } return void 0; } @@ -140945,7 +142987,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return discriminatedPropertySymbols; } function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 211 /* ElementAccessExpression */ && node.parent.argumentExpression === node; + return node && node.parent && node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } function getDefaultLibFilePath(options) { if (sys) { @@ -141031,8 +143073,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!children.length) { return void 0; } - const child = find(children, (kid) => kid.kind < 315 /* FirstJSDocNode */ || kid.kind > 356 /* LastJSDocNode */); - return child.kind < 165 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + const child = find(children, (kid) => kid.kind < 316 /* FirstJSDocNode */ || kid.kind > 357 /* LastJSDocNode */); + return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile); } getLastToken(sourceFile) { this.assertHasRealPosition(); @@ -141041,7 +143083,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!child) { return void 0; } - return child.kind < 165 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 166 /* FirstNode */ ? child : child.getLastToken(sourceFile); } forEachChild(cbNode, cbNodeArray) { return forEachChild(this, cbNode, cbNodeArray); @@ -141342,7 +143384,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} SourceFileObject = class extends NodeObject { constructor(kind, pos, end) { super(kind, pos, end); - this.kind = 311 /* SourceFile */; + this.kind = 312 /* SourceFile */; } update(newText, textChangeRange) { return updateSourceFile(this, newText, textChangeRange); @@ -141398,10 +143440,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function visit(node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: const functionDeclaration = node; const declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -141417,29 +143459,29 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } forEachChild(node, visit); break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 265 /* EnumDeclaration */: - case 266 /* ModuleDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 280 /* ExportSpecifier */: - case 275 /* ImportSpecifier */: - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 186 /* TypeLiteral */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 266 /* EnumDeclaration */: + case 267 /* ModuleDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 281 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 187 /* TypeLiteral */: addDeclaration(node); forEachChild(node, visit); break; - case 168 /* Parameter */: + case 169 /* Parameter */: if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { break; } - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: { + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: { const decl = node; if (isBindingPattern(decl.name)) { forEachChild(decl.name, visit); @@ -141449,12 +143491,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} visit(decl.initializer); } } - case 305 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 306 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: addDeclaration(node); break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: const exportDeclaration = node; if (exportDeclaration.exportClause) { if (isNamedExports(exportDeclaration.exportClause)) { @@ -141464,14 +143506,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } break; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: const importClause = node.importClause; if (importClause) { if (importClause.name) { addDeclaration(importClause.name); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 273 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { forEach(importClause.namedBindings.elements, visit); @@ -141479,7 +143521,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (getAssignmentDeclarationKind(node) !== 0 /* None */) { addDeclaration(node); } @@ -142615,7 +144657,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } tokenAtLocation = preceding; } - if (tokenAtLocation.flags & 16777216 /* Ambient */) { + if (tokenAtLocation.flags & 33554432 /* Ambient */) { return void 0; } return spanInNode(tokenAtLocation); @@ -142658,89 +144700,89 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (node) { const { parent: parent2 } = node; switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 259 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 260 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return spanInVariableDeclaration(node); - case 168 /* Parameter */: + case 169 /* Parameter */: return spanInParameterDeclaration(node); - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 240 /* Block */: + case 241 /* Block */: if (isFunctionBlock(node)) { return spanInFunctionBlock(node); } - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return spanInBlock(node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return spanInBlock(node.block); - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: return textSpan(node.expression); - case 252 /* ReturnStatement */: + case 253 /* ReturnStatement */: return textSpan(node.getChildAt(0), node.expression); - case 246 /* WhileStatement */: + case 247 /* WhileStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 245 /* DoStatement */: + case 246 /* DoStatement */: return spanInNode(node.statement); - case 258 /* DebuggerStatement */: + case 259 /* DebuggerStatement */: return textSpan(node.getChildAt(0)); - case 244 /* IfStatement */: + case 245 /* IfStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 255 /* LabeledStatement */: + case 256 /* LabeledStatement */: return spanInNode(node.statement); - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: return textSpan(node.getChildAt(0), node.label); - case 247 /* ForStatement */: + case 248 /* ForStatement */: return spanInForStatement(node); - case 248 /* ForInStatement */: + case 249 /* ForInStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 249 /* ForOfStatement */: + case 250 /* ForOfStatement */: return spanInInitializerOfForLike(node); - case 254 /* SwitchStatement */: + case 255 /* SwitchStatement */: return textSpanEndingAtNextToken(node, node.expression); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return spanInNode(node.statements[0]); - case 257 /* TryStatement */: + case 258 /* TryStatement */: return spanInBlock(node.tryBlock); - case 256 /* ThrowStatement */: + case 257 /* ThrowStatement */: return textSpan(node, node.expression); - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: return textSpan(node, node.expression); - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return textSpan(node, node.moduleReference); - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: return textSpan(node, node.moduleSpecifier); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (getModuleInstanceState(node) !== 1 /* Instantiated */) { return void 0; } - case 262 /* ClassDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 207 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 208 /* BindingElement */: return textSpan(node); - case 253 /* WithStatement */: + case 254 /* WithStatement */: return spanInNode(node.statement); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return spanInBindingPattern(node); - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return void 0; case 27 /* SemicolonToken */: case 1 /* EndOfFileToken */: @@ -142768,16 +144810,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 85 /* CatchKeyword */: case 98 /* FinallyKeyword */: return spanInNextNode(node); - case 164 /* OfKeyword */: + case 165 /* OfKeyword */: return spanInOfKeyword(node); default: if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } - if ((node.kind === 80 /* Identifier */ || node.kind === 229 /* SpreadElement */ || node.kind === 302 /* PropertyAssignment */ || node.kind === 303 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { + if ((node.kind === 80 /* Identifier */ || node.kind === 230 /* SpreadElement */ || node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { return textSpan(node); } - if (node.kind === 225 /* BinaryExpression */) { + if (node.kind === 226 /* BinaryExpression */) { const { left, operatorToken } = node; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern( @@ -142793,19 +144835,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (isExpressionNode(node)) { switch (parent2.kind) { - case 245 /* DoStatement */: + case 246 /* DoStatement */: return spanInPreviousNode(node); - case 169 /* Decorator */: + case 170 /* Decorator */: return spanInNode(node.parent); - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: return textSpan(node); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (node.parent.operatorToken.kind === 28 /* CommaToken */) { return textSpan(node); } break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: if (node.parent.body === node) { return textSpan(node); } @@ -142813,25 +144855,25 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } switch (node.parent.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } break; - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: if (node.parent.type === node) { return spanInNextNode(node.parent.type); } break; - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: { + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: { const { initializer, type } = node.parent; if (initializer === node || type === node || isAssignmentOperator(node.kind)) { return spanInPreviousNode(node); } break; } - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const { left } = node.parent; if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { return spanInPreviousNode(node); @@ -142854,14 +144896,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 248 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 249 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } const parent2 = variableDeclaration.parent; if (isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } - if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 249 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 250 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -142888,7 +144930,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 262 /* ClassDeclaration */ && functionDeclaration.kind !== 175 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 263 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -142908,22 +144950,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function spanInBlock(block) { switch (block.parent.kind) { - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return void 0; } - case 246 /* WhileStatement */: - case 244 /* IfStatement */: - case 248 /* ForInStatement */: + case 247 /* WhileStatement */: + case 245 /* IfStatement */: + case 249 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } return spanInNode(block.statements[0]); } function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 260 /* VariableDeclarationList */) { + if (forLikeStatement.initializer.kind === 261 /* VariableDeclarationList */) { const variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); @@ -142946,64 +144988,64 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function spanInBindingPattern(bindingPattern) { const firstBindingElement = forEach( bindingPattern.elements, - (element) => element.kind !== 231 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - if (bindingPattern.parent.kind === 207 /* BindingElement */) { + if (bindingPattern.parent.kind === 208 /* BindingElement */) { return textSpan(bindingPattern.parent); } return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 206 /* ArrayBindingPattern */ && node2.kind !== 205 /* ObjectBindingPattern */); - const elements = node2.kind === 208 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; + Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */); + const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; const firstBindingElement = forEach( elements, - (element) => element.kind !== 231 /* OmittedExpression */ ? element : void 0 + (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 ); if (firstBindingElement) { return spanInNode(firstBindingElement); } - return textSpan(node2.parent.kind === 225 /* BinaryExpression */ ? node2.parent : node2); + return textSpan(node2.parent.kind === 226 /* BinaryExpression */ ? node2.parent : node2); } function spanInOpenBraceToken(node2) { switch (node2.parent.kind) { - case 265 /* EnumDeclaration */: + case 266 /* EnumDeclaration */: const enumDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: const classDeclaration = node2.parent; return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); } return spanInNode(node2.parent); } function spanInCloseBraceToken(node2) { switch (node2.parent.kind) { - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { return void 0; } - case 265 /* EnumDeclaration */: - case 262 /* ClassDeclaration */: + case 266 /* EnumDeclaration */: + case 263 /* ClassDeclaration */: return textSpan(node2); - case 240 /* Block */: + case 241 /* Block */: if (isFunctionBlock(node2.parent)) { return textSpan(node2); } - case 298 /* CatchClause */: + case 299 /* CatchClause */: return spanInNode(lastOrUndefined(node2.parent.statements)); - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: const caseBlock = node2.parent; const lastClause = lastOrUndefined(caseBlock.clauses); if (lastClause) { return spanInNode(lastOrUndefined(lastClause.statements)); } return void 0; - case 205 /* ObjectBindingPattern */: + case 206 /* ObjectBindingPattern */: const bindingPattern = node2.parent; return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -143016,7 +145058,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function spanInCloseBracketToken(node2) { switch (node2.parent.kind) { - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: const bindingPattern = node2.parent; return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); default: @@ -143028,57 +145070,57 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function spanInOpenParenToken(node2) { - if (node2.parent.kind === 245 /* DoStatement */ || // Go to while keyword and do action instead - node2.parent.kind === 212 /* CallExpression */ || node2.parent.kind === 213 /* NewExpression */) { + if (node2.parent.kind === 246 /* DoStatement */ || // Go to while keyword and do action instead + node2.parent.kind === 213 /* CallExpression */ || node2.parent.kind === 214 /* NewExpression */) { return spanInPreviousNode(node2); } - if (node2.parent.kind === 216 /* ParenthesizedExpression */) { + if (node2.parent.kind === 217 /* ParenthesizedExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInCloseParenToken(node2) { switch (node2.parent.kind) { - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 175 /* Constructor */: - case 246 /* WhileStatement */: - case 245 /* DoStatement */: - case 247 /* ForStatement */: - case 249 /* ForOfStatement */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 216 /* ParenthesizedExpression */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 176 /* Constructor */: + case 247 /* WhileStatement */: + case 246 /* DoStatement */: + case 248 /* ForStatement */: + case 250 /* ForOfStatement */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 217 /* ParenthesizedExpression */: return spanInPreviousNode(node2); default: return spanInNode(node2.parent); } } function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 302 /* PropertyAssignment */ || node2.parent.kind === 168 /* Parameter */) { + if (isFunctionLike(node2.parent) || node2.parent.kind === 303 /* PropertyAssignment */ || node2.parent.kind === 169 /* Parameter */) { return spanInPreviousNode(node2); } return spanInNode(node2.parent); } function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 215 /* TypeAssertionExpression */) { + if (node2.parent.kind === 216 /* TypeAssertionExpression */) { return spanInNextNode(node2); } return spanInNode(node2.parent); } function spanInWhileKeyword(node2) { - if (node2.parent.kind === 245 /* DoStatement */) { + if (node2.parent.kind === 246 /* DoStatement */) { return textSpanEndingAtNextToken(node2, node2.parent.expression); } return spanInNode(node2.parent); } function spanInOfKeyword(node2) { - if (node2.parent.kind === 249 /* ForOfStatement */) { + if (node2.parent.kind === 250 /* ForOfStatement */) { return spanInNextNode(node2); } return spanInNode(node2.parent); @@ -143176,16 +145218,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } switch (node.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: - if (node.parent.kind === 209 /* ObjectLiteralExpression */) { + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + if (node.parent.kind === 210 /* ObjectLiteralExpression */) { return (_a = getAssignedName(node.parent)) == null ? void 0 : _a.getText(); } return (_b = getNameOfDeclaration(node.parent)) == null ? void 0 : _b.getText(); - case 261 /* FunctionDeclaration */: - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: + case 262 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { return node.parent.parent.name.getText(); } @@ -143387,7 +145429,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function collect(node) { if (!node) return; - if (node.flags & 16777216 /* Ambient */) { + if (node.flags & 33554432 /* Ambient */) { return; } if (isValidCallHierarchyDeclaration(node)) { @@ -143402,55 +145444,55 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } switch (node.kind) { case 80 /* Identifier */: - case 270 /* ImportEqualsDeclaration */: - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return; - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: recordCallSite(node); return; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: collect(node.expression); return; - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: collect(node.name); collect(node.initializer); return; - case 212 /* CallExpression */: + case 213 /* CallExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 213 /* NewExpression */: + case 214 /* NewExpression */: recordCallSite(node); collect(node.expression); forEach(node.arguments, collect); return; - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: recordCallSite(node); collect(node.tag); collect(node.template); return; - case 285 /* JsxOpeningElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: recordCallSite(node); collect(node.tagName); collect(node.attributes); return; - case 169 /* Decorator */: + case 170 /* Decorator */: recordCallSite(node); collect(node.expression); return; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: recordCallSite(node); forEachChild(node, collect); break; - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: collect(node.expression); return; } @@ -143503,25 +145545,25 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const callSites = []; const collect = createCallSiteCollector(program, callSites); switch (node.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: collectCallSitesOfSourceFile(node, collect); break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: collectCallSitesOfModuleDeclaration(node, collect); break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: collectCallSitesOfClassLikeDeclaration(node, collect); break; - case 174 /* ClassStaticBlockDeclaration */: + case 175 /* ClassStaticBlockDeclaration */: collectCallSitesOfClassStaticBlockDeclaration(node, collect); break; default: @@ -143536,7 +145578,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return createCallHierarchyOutgoingCall(createCallHierarchyItem(program, entries[0].declaration), map(entries, (entry) => createTextSpanFromRange(entry.range))); } function getOutgoingCalls(program, declaration) { - if (declaration.flags & 16777216 /* Ambient */ || isMethodSignature(declaration)) { + if (declaration.flags & 33554432 /* Ambient */ || isMethodSignature(declaration)) { return []; } return group(collectCallSites(program, declaration), getCallSiteGroupKey, (entries) => convertCallSiteGroupToOutgoingCall(program, entries)); @@ -143613,9 +145655,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { fixName: fixName8, description: description3, changes, fixId: fixId52, fixAllDescription, commands: command ? [command] : void 0 }; } function registerCodeFix(reg) { - for (const error of reg.errorCodes) { + for (const error2 of reg.errorCodes) { errorCodeToFixesArray = void 0; - errorCodeToFixes.add(String(error), reg); + errorCodeToFixes.add(String(error2), reg); } if (reg.fixIds) { for (const fixId52 of reg.fixIds) { @@ -143731,6 +145773,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} registerCodeFix({ errorCodes: [ Diagnostics.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.code, + Diagnostics.await_using_statements_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.code, Diagnostics.for_await_loops_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.code ], getCodeActions: function getCodeActionsToAddEmptyExportDeclaration(context) { @@ -143882,7 +145925,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 242 /* VariableStatement */); + const variableStatement = getAncestor(declaration, 243 /* VariableStatement */); if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; @@ -143941,7 +145984,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} checker.getTypeAtLocation(errorNode).flags & 1 /* Any */; } function isInsideAwaitableBody(node) { - return node.kind & 32768 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 261 /* FunctionDeclaration */ || ancestor.parent.kind === 217 /* FunctionExpression */ || ancestor.parent.kind === 218 /* ArrowFunction */ || ancestor.parent.kind === 173 /* MethodDeclaration */)); + return node.kind & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 262 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -144107,10 +146150,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isPossiblyPartOfDestructuring(node) { switch (node.kind) { case 80 /* Identifier */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return true; default: return false; @@ -144127,7 +146170,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isPossiblyPartOfCommaSeperatedInitializer(node) { switch (node.kind) { case 80 /* Identifier */: - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: case 28 /* CommaToken */: return true; default: @@ -144178,7 +146221,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } const declaration = token.parent; - if (declaration.kind === 171 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { + if (declaration.kind === 172 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { changeTracker.insertModifierBefore(sourceFile, 138 /* DeclareKeyword */, declaration); } } @@ -144345,7 +146388,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const d = add.valueDeclaration; if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ - ...d.type.kind === 191 /* UnionType */ ? d.type.types : [d.type], + ...d.type.kind === 192 /* UnionType */ ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") ]); changes.replaceNode(d.getSourceFile(), d.type, t); @@ -144422,26 +146465,26 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 259 /* VariableDeclaration */ || node.kind === 170 /* PropertySignature */ || node.kind === 171 /* PropertyDeclaration */; + return isFunctionLikeDeclaration(node) || node.kind === 260 /* VariableDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 172 /* PropertyDeclaration */; } function transformJSDocType(node) { switch (node.kind) { - case 318 /* JSDocAllType */: - case 319 /* JSDocUnknownType */: + case 319 /* JSDocAllType */: + case 320 /* JSDocUnknownType */: return factory.createTypeReferenceNode("any", emptyArray); - case 322 /* JSDocOptionalType */: + case 323 /* JSDocOptionalType */: return transformJSDocOptionalType(node); - case 321 /* JSDocNonNullableType */: + case 322 /* JSDocNonNullableType */: return transformJSDocType(node.type); - case 320 /* JSDocNullableType */: + case 321 /* JSDocNullableType */: return transformJSDocNullableType(node); - case 324 /* JSDocVariadicType */: + case 325 /* JSDocVariadicType */: return transformJSDocVariadicType(node); - case 323 /* JSDocFunctionType */: + case 324 /* JSDocFunctionType */: return transformJSDocFunctionType(node); - case 182 /* TypeReference */: + case 183 /* TypeReference */: return transformJSDocTypeReference(node); - case 328 /* JSDocTypeLiteral */: + case 329 /* JSDocTypeLiteral */: return transformJSDocTypeLiteral(node); default: const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); @@ -144474,7 +146517,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function transformJSDocParameter(node) { const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 324 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; + const isRest = node.type.kind === 325 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; const name = node.name || (isRest ? "rest" : "arg" + index); const dotdotdot = isRest ? factory.createToken(26 /* DotDotDotToken */) : node.dotDotDotToken; return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer); @@ -144656,7 +146699,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} })) { return; } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 243 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; + const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 244 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; changes.delete(sourceFile, nodeToDelete); if (!assignmentExpr) { members.push(factory.createPropertyDeclaration( @@ -144741,7 +146784,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function createArrowFunctionExpressionMember(members2, arrowFunction, name) { const arrowFunctionBody = arrowFunction.body; let bodyBlock; - if (arrowFunctionBody.kind === 240 /* Block */) { + if (arrowFunctionBody.kind === 241 /* Block */) { bodyBlock = arrowFunctionBody; } else { bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); @@ -145304,7 +147347,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} switch (func.kind) { case 106 /* NullKeyword */: break; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: case 80 /* Identifier */: if (!inputArgName) { break; @@ -145329,8 +147372,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); } return varDeclOrAssignment; - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: { + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: { const funcBody = func.body; const returnType2 = (_a = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a.getReturnType(); if (isBlock(funcBody)) { @@ -145572,7 +147615,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const importNode = importFromModuleSpecifier(moduleSpecifier); switch (importNode.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: changes.replaceNode(importingFile, importNode, makeImport( importNode.name, /*namedImports*/ @@ -145581,7 +147624,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} quotePreference )); break; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isRequireCall( importNode, /*requireStringLiteralLikeArgument*/ @@ -145650,13 +147693,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) { switch (statement.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); return false; - case 243 /* ExpressionStatement */: { + case 244 /* ExpressionStatement */: { const { expression } = statement; switch (expression.kind) { - case 212 /* CallExpression */: { + case 213 /* CallExpression */: { if (isRequireCall( expression, /*requireStringLiteralLikeArgument*/ @@ -145673,7 +147716,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return false; } - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const { operatorToken } = expression; return operatorToken.kind === 64 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify); } @@ -145727,8 +147770,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: { + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: { const tmp = makeUniqueName(propertyName, identifiers); return convertedImports([ makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), @@ -145776,14 +147819,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function tryChangeModuleExportsObject(object, useSitesToUnqualify) { const statements = mapAllOrFail(object.properties, (prop) => { switch (prop.kind) { - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: return void 0; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(95 /* ExportKeyword */)], prop, useSitesToUnqualify); default: Debug.assertNever(prop, `Convert to ES6 got invalid prop kind ${prop.kind}`); @@ -145861,15 +147904,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { const modifiers = [factory.createToken(95 /* ExportKeyword */)]; switch (exported.kind) { - case 217 /* FunctionExpression */: { + case 218 /* FunctionExpression */: { const { name: expressionName } = exported; if (expressionName && expressionName.text !== name) { return exportConst(); } } - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); default: return exportConst(); @@ -145894,7 +147937,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} replaceNode ); function replaceNode(original) { - if (original.kind === 210 /* PropertyAccessExpression */) { + if (original.kind === 211 /* PropertyAccessExpression */) { const replacement = useSitesToUnqualify.get(original); useSitesToUnqualify.delete(original); return replacement; @@ -145903,7 +147946,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: { + case 206 /* ObjectBindingPattern */: { const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier(e.propertyName) || !isIdentifier(e.name) ? void 0 : makeImportSpecifier2(e.propertyName && e.propertyName.text, e.name.text)); if (importSpecifiers) { return convertedImports([makeImport( @@ -145915,7 +147958,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} )]); } } - case 206 /* ArrayBindingPattern */: { + case 207 /* ArrayBindingPattern */: { const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); return convertedImports([ makeImport( @@ -146002,11 +148045,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isFreeIdentifier(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return parent2.name !== node; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return parent2.propertyName !== node; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return parent2.propertyName !== node; default: return true; @@ -146247,7 +148290,27 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { parent: parent2 } = getTokenAtPosition(sourceFile, pos); return isImportSpecifier(parent2) || isImportDeclaration(parent2) && parent2.importClause ? parent2 : void 0; } + function canConvertImportDeclarationForSpecifier(specifier, sourceFile, program) { + if (specifier.parent.parent.name) { + return false; + } + const nonTypeOnlySpecifiers = specifier.parent.elements.filter((e) => !e.isTypeOnly); + if (nonTypeOnlySpecifiers.length === 1) { + return true; + } + const checker = program.getTypeChecker(); + for (const specifier2 of nonTypeOnlySpecifiers) { + const isUsedAsValue = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(specifier2.name, checker, sourceFile, (usage) => { + return !isValidTypeOnlyAliasUseSite(usage); + }); + if (isUsedAsValue) { + return false; + } + } + return true; + } function doChange11(changes, sourceFile, declaration) { + var _a; if (isImportSpecifier(declaration)) { changes.replaceNode(sourceFile, declaration, factory.updateImportSpecifier( declaration, @@ -146318,6 +148381,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ) ]); } else { + const newNamedBindings = ((_a = importClause.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */ ? factory.updateNamedImports( + importClause.namedBindings, + sameMap(importClause.namedBindings.elements, (e) => factory.updateImportSpecifier( + e, + /*isTypeOnly*/ + false, + e.propertyName, + e.name + )) + ) : importClause.namedBindings; const importDeclaration = factory.updateImportDeclaration( declaration, declaration.modifiers, @@ -146326,7 +148399,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} /*isTypeOnly*/ true, importClause.name, - importClause.namedBindings + newNamedBindings ), declaration.moduleSpecifier, declaration.assertClause @@ -146349,19 +148422,41 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} registerCodeFix({ errorCodes: errorCodes14, getCodeActions: function getCodeActionsToConvertToTypeOnlyImport(context) { + var _a; const declaration = getDeclaration2(context.sourceFile, context.span.start); if (declaration) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration)); - return [createCodeFixAction(fixId13, changes, Diagnostics.Convert_to_type_only_import, fixId13, Diagnostics.Convert_all_imports_not_used_as_a_value_to_type_only_imports)]; + const importDeclarationChanges = declaration.kind === 276 /* ImportSpecifier */ && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0; + const mainAction = createCodeFixAction( + fixId13, + changes, + declaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Use_type_0, ((_a = declaration.propertyName) == null ? void 0 : _a.text) ?? declaration.name.text] : Diagnostics.Use_import_type, + fixId13, + Diagnostics.Fix_all_with_type_only_imports + ); + if (some(importDeclarationChanges)) { + return [ + createCodeFixActionWithoutFixAll(fixId13, importDeclarationChanges, Diagnostics.Use_import_type), + mainAction + ]; + } + return [mainAction]; } return void 0; }, fixIds: [fixId13], getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyImport(context) { + const fixedImportDeclarations = /* @__PURE__ */ new Set(); return codeFixAll(context, errorCodes14, (changes, diag2) => { - const declaration = getDeclaration2(diag2.file, diag2.start); - if (declaration) { - doChange11(changes, diag2.file, declaration); + const errorDeclaration = getDeclaration2(diag2.file, diag2.start); + if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 272 /* ImportDeclaration */ && !fixedImportDeclarations.has(errorDeclaration)) { + doChange11(changes, diag2.file, errorDeclaration); + fixedImportDeclarations.add(errorDeclaration); + } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */ && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) { + doChange11(changes, diag2.file, errorDeclaration.parent.parent.parent); + fixedImportDeclarations.add(errorDeclaration.parent.parent.parent); + } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */) { + doChange11(changes, diag2.file, errorDeclaration); } }); } @@ -146370,23 +148465,60 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); // src/services/codefixes/convertTypedefToType.ts - function doChange12(changes, node, sourceFile) { - if (isJSDocTypedefTag(node)) { - fixSingleTypeDef(changes, node, sourceFile); - } - } - function fixSingleTypeDef(changes, typeDefNode, sourceFile) { - if (!typeDefNode) + function doChange12(changes, node, sourceFile, newLine, fixAll = false) { + if (!isJSDocTypedefTag(node)) return; - const declaration = createDeclaration(typeDefNode); + const declaration = createDeclaration(node); if (!declaration) return; - const comment = typeDefNode.parent; - changes.replaceNode( - sourceFile, - comment, - declaration + const commentNode = node.parent; + const { leftSibling, rightSibling } = getLeftAndRightSiblings(node); + let pos = commentNode.getStart(); + let prefix = ""; + if (!leftSibling && commentNode.comment) { + pos = findEndOfTextBetween(commentNode, commentNode.getStart(), node.getStart()); + prefix = `${newLine} */${newLine}`; + } + if (leftSibling) { + if (fixAll && isJSDocTypedefTag(leftSibling)) { + pos = node.getStart(); + prefix = ""; + } else { + pos = findEndOfTextBetween(commentNode, leftSibling.getStart(), node.getStart()); + prefix = `${newLine} */${newLine}`; + } + } + let end = commentNode.getEnd(); + let suffix = ""; + if (rightSibling) { + if (fixAll && isJSDocTypedefTag(rightSibling)) { + end = rightSibling.getStart(); + suffix = `${newLine}${newLine}`; + } else { + end = rightSibling.getStart(); + suffix = `${newLine}/**${newLine} * `; + } + } + changes.replaceRange(sourceFile, { pos, end }, declaration, { prefix, suffix }); + } + function getLeftAndRightSiblings(typedefNode) { + const commentNode = typedefNode.parent; + const maxChildIndex = commentNode.getChildCount() - 1; + const currentNodeIndex = commentNode.getChildren().findIndex( + (n) => n.getStart() === typedefNode.getStart() && n.getEnd() === typedefNode.getEnd() ); + const leftSibling = currentNodeIndex > 0 ? commentNode.getChildAt(currentNodeIndex - 1) : void 0; + const rightSibling = currentNodeIndex < maxChildIndex ? commentNode.getChildAt(currentNodeIndex + 1) : void 0; + return { leftSibling, rightSibling }; + } + function findEndOfTextBetween(jsDocComment, from, to) { + const comment = jsDocComment.getText().substring(from - jsDocComment.getStart(), to - jsDocComment.getStart()); + for (let i = comment.length; i > 0; i--) { + if (!/[*/\s]/g.test(comment.substring(i - 1, i))) { + return from + i; + } + } + return to; } function createDeclaration(tag) { var _a; @@ -146396,10 +148528,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const typeName = (_a = tag.name) == null ? void 0 : _a.getText(); if (!typeName) return; - if (typeExpression.kind === 328 /* JSDocTypeLiteral */) { + if (typeExpression.kind === 329 /* JSDocTypeLiteral */) { return createInterfaceForTypeLiteral(typeName, typeExpression); } - if (typeExpression.kind === 315 /* JSDocTypeExpression */) { + if (typeExpression.kind === 316 /* JSDocTypeExpression */) { return createTypeAliasForTypeExpression(typeName, typeExpression); } } @@ -146407,7 +148539,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const propertySignatures = createSignatureFromTypeLiteral(typeLiteral); if (!some(propertySignatures)) return; - const interfaceDeclaration = factory.createInterfaceDeclaration( + return factory.createInterfaceDeclaration( /*modifiers*/ void 0, typeName, @@ -146417,13 +148549,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} void 0, propertySignatures ); - return interfaceDeclaration; } function createTypeAliasForTypeExpression(typeName, typeExpression) { const typeReference = getSynthesizedDeepClone(typeExpression.type); if (!typeReference) return; - const declaration = factory.createTypeAliasDeclaration( + return factory.createTypeAliasDeclaration( /*modifiers*/ void 0, factory.createIdentifier(typeName), @@ -146431,7 +148562,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} void 0, typeReference ); - return declaration; } function createSignatureFromTypeLiteral(typeLiteral) { const propertyTags = typeLiteral.jsDocPropertyTags; @@ -146451,30 +148581,28 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (typeReference && name) { const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; - const prop = factory.createPropertySignature( + return factory.createPropertySignature( /*modifiers*/ void 0, name, questionToken, typeReference ); - return prop; } }; - const props = mapDefined(propertyTags, getSignature); - return props; + return mapDefined(propertyTags, getSignature); } function getPropertyName(tag) { return tag.name.kind === 80 /* Identifier */ ? tag.name.text : tag.name.right.text; } - function getJSDocTypedefNode(node) { + function getJSDocTypedefNodes(node) { if (hasJSDocNodes(node)) { - return forEach(node.jsDoc, (node2) => { + return flatMap(node.jsDoc, (doc) => { var _a; - return (_a = node2.tags) == null ? void 0 : _a.find(isJSDocTypedefTag); + return (_a = doc.tags) == null ? void 0 : _a.filter((tag) => isJSDocTypedefTag(tag)); }); } - return void 0; + return []; } var fixId14, errorCodes15; var init_convertTypedefToType = __esm({ @@ -146488,13 +148616,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} fixIds: [fixId14], errorCodes: errorCodes15, getCodeActions(context) { + const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); const node = getTokenAtPosition( context.sourceFile, context.span.start ); if (!node) return; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange12(t, node, context.sourceFile)); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange12(t, node, context.sourceFile, newLineCharacter)); if (changes.length > 0) { return [ createCodeFixAction( @@ -146507,11 +148636,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ]; } }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes15, (changes, diag2) => { - const node = getTokenAtPosition(diag2.file, diag2.start); - if (node) - doChange12(changes, node, diag2.file); - }) + getAllCodeActions: (context) => codeFixAll( + context, + errorCodes15, + (changes, diag2) => { + const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); + const node = getTokenAtPosition(diag2.file, diag2.start); + const fixAll = true; + if (node) + doChange12(changes, node, diag2.file, newLineCharacter, fixAll); + } + ) }); } }); @@ -146824,8 +148959,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return `${topLevelTypeOnly ? 1 : 0}|${moduleSpecifier}`; } } - function writeFixes(changeTracker) { - const quotePreference = getQuotePreference(sourceFile, preferences); + function writeFixes(changeTracker, oldFileQuotePreference) { + let quotePreference; + if (sourceFile.imports.length === 0 && oldFileQuotePreference !== void 0) { + quotePreference = oldFileQuotePreference; + } else { + quotePreference = getQuotePreference(sourceFile, preferences); + } for (const fix of addToNamespace) { addNamespaceQualifier(changeTracker, sourceFile, fix); } @@ -147013,11 +149153,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getNamespaceLikeImportText(declaration) { var _a, _b, _c; switch (declaration.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return (_a = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a.text; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return declaration.name.text; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); @@ -147049,11 +149189,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return best; function getAddToExistingImportFix({ declaration, importKind, symbol, targetFlags }) { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 270 /* ImportEqualsDeclaration */) { + if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 271 /* ImportEqualsDeclaration */) { return void 0; } - if (declaration.kind === 259 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 205 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; + if (declaration.kind === 260 /* VariableDeclaration */) { + return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 206 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; } const { importClause } = declaration; if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier)) { @@ -147076,7 +149216,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addAsTypeOnly === 2 /* Required */ && namedBindings)) { return void 0; } - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 273 /* NamespaceImport */) { + if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 274 /* NamespaceImport */) { return void 0; } return { @@ -147097,7 +149237,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); } - } else if (i.kind === 271 /* ImportDeclaration */ || i.kind === 270 /* ImportEqualsDeclaration */) { + } else if (i.kind === 272 /* ImportDeclaration */ || i.kind === 271 /* ImportEqualsDeclaration */) { const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); if (moduleSymbol) { (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); @@ -147128,6 +149268,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (compilerOptions.configFile) { return getEmitModuleKind(compilerOptions) < 5 /* ES2015 */; } + if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) + return true; + if (sourceFile.impliedNodeFormat === 99 /* ESNext */) + return false; for (const otherFile of program.getSourceFiles()) { if (otherFile === sourceFile || !isSourceFileJS(otherFile) || program.isSourceFileFromExternalLibrary(otherFile)) continue; @@ -147549,7 +149693,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile, preferences); - return promotedDeclaration.kind === 275 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; + return promotedDeclaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; } default: return Debug.assertNever(fix, `Unexpected fix kind ${fix.kind}`); @@ -147557,12 +149701,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getModuleSpecifierText(promotedDeclaration) { var _a, _b; - return promotedDeclaration.kind === 270 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; + return promotedDeclaration.kind === 271 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; } function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceFile, preferences) { const convertExistingToTypeOnly = importNameElisionDisabled(compilerOptions); switch (aliasDeclaration.kind) { - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences); if (aliasDeclaration.parent.elements.length > 1 && sortKind) { @@ -147586,13 +149730,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} promoteImportClause(aliasDeclaration.parent.parent); return aliasDeclaration.parent.parent; } - case 272 /* ImportClause */: + case 273 /* ImportClause */: promoteImportClause(aliasDeclaration); return aliasDeclaration; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: promoteImportClause(aliasDeclaration.parent); return aliasDeclaration.parent; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); return aliasDeclaration; default: @@ -147600,10 +149744,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function promoteImportClause(importClause) { changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile)); + if (!compilerOptions.allowImportingTsExtensions) { + const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent); + const resolvedModule = moduleSpecifier && getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier)); + if (resolvedModule == null ? void 0 : resolvedModule.resolvedUsingTsExtension) { + const changedExtension = changeAnyExtension(moduleSpecifier.text, getOutputExtension(moduleSpecifier.text, compilerOptions)); + changes.replaceNode(sourceFile, moduleSpecifier, factory.createStringLiteral(changedExtension)); + } + } if (convertExistingToTypeOnly) { const namedImports = tryCast(importClause.namedBindings, isNamedImports); if (namedImports && namedImports.elements.length > 1) { - if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 275 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { + if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 276 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { changes.delete(sourceFile, aliasDeclaration); changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); } @@ -147618,7 +149770,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, preferences) { var _a; - if (clause.kind === 205 /* ObjectBindingPattern */) { + if (clause.kind === 206 /* ObjectBindingPattern */) { if (defaultImport) { addElementToBindingPattern(clause, defaultImport.name, "default"); } @@ -148054,7 +150206,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const lastDecorator = findLast(modifiers, isDecorator); const modifierPos = abstractModifier ? abstractModifier.end : staticModifier ? staticModifier.end : accessibilityModifier ? accessibilityModifier.end : lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : classElement.getStart(sourceFile); const options = accessibilityModifier || staticModifier || abstractModifier ? { prefix: " " } : { suffix: " " }; - changeTracker.insertModifierAt(sourceFile, modifierPos, 163 /* OverrideKeyword */, options); + changeTracker.insertModifierAt(sourceFile, modifierPos, 164 /* OverrideKeyword */, options); } function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { const classElement = findContainerClassElementLike(sourceFile, pos); @@ -148068,13 +150220,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isClassElementLikeHasJSDoc(node) { switch (node.kind) { - case 175 /* Constructor */: - case 171 /* PropertyDeclaration */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 172 /* PropertyDeclaration */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; - case 168 /* Parameter */: + case 169 /* Parameter */: return isParameterPropertyDeclaration(node, node.parent); default: return false; @@ -148480,7 +150632,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // src/services/codefixes/fixIncorrectNamedTupleSyntax.ts function getNamedTupleMember(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 201 /* NamedTupleMember */); + return findAncestor(token, (t) => t.kind === 202 /* NamedTupleMember */); } function doChange17(changes, sourceFile, namedTupleMember) { if (!namedTupleMember) { @@ -148489,10 +150641,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let unwrappedType = namedTupleMember.type; let sawOptional = false; let sawRest = false; - while (unwrappedType.kind === 189 /* OptionalType */ || unwrappedType.kind === 190 /* RestType */ || unwrappedType.kind === 195 /* ParenthesizedType */) { - if (unwrappedType.kind === 189 /* OptionalType */) { + while (unwrappedType.kind === 190 /* OptionalType */ || unwrappedType.kind === 191 /* RestType */ || unwrappedType.kind === 196 /* ParenthesizedType */) { + if (unwrappedType.kind === 190 /* OptionalType */) { sawOptional = true; - } else if (unwrappedType.kind === 190 /* RestType */) { + } else if (unwrappedType.kind === 191 /* RestType */) { sawRest = true; } unwrappedType = unwrappedType.type; @@ -148544,7 +150696,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isPropertyAccessExpression(parent2) && parent2.name === node) { Debug.assert(isMemberName(node), "Expected an identifier for spelling (property access)"); let containingType = checker.getTypeAtLocation(parent2.expression); - if (parent2.flags & 32 /* OptionalChain */) { + if (parent2.flags & 64 /* OptionalChain */) { containingType = checker.getNonNullableType(containingType); } suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); @@ -148777,6 +150929,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!declaration || !isCallExpression(declaration.parent) || !declaration.body) return void 0; const pos = declaration.parent.arguments.indexOf(declaration); + if (pos === -1) + return void 0; const type = checker.getContextualTypeForArgumentAtIndex(declaration.parent, pos); if (!type) return void 0; @@ -148805,19 +150959,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getVariableLikeInitializer(declaration) { switch (declaration.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: - case 171 /* PropertyDeclaration */: - case 302 /* PropertyAssignment */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: + case 172 /* PropertyDeclaration */: + case 303 /* PropertyAssignment */: return declaration.initializer; - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 303 /* ShorthandPropertyAssignment */: - case 170 /* PropertySignature */: - case 305 /* EnumMember */: - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: + case 304 /* ShorthandPropertyAssignment */: + case 171 /* PropertySignature */: + case 306 /* EnumMember */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: return void 0; } } @@ -149045,7 +151199,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { const tokenName = token.text; if (makeStatic) { - if (classDeclaration.kind === 230 /* ClassExpression */) { + if (classDeclaration.kind === 231 /* ClassExpression */) { return; } const className = classDeclaration.name.getText(); @@ -149098,7 +151252,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getTypeNode2(checker, node, token) { let typeNode; - if (token.parent.parent.kind === 225 /* BinaryExpression */) { + if (token.parent.parent.kind === 226 /* BinaryExpression */) { const binaryExpression = token.parent.parent; const otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left; const widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression))); @@ -149176,9 +151330,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (call === void 0) { return void 0; } - if (isPrivateIdentifier(token)) { - return void 0; - } const methodName = token.text; const addMethodDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addMethodDeclaration(context, t, call, token, modifierFlags2, parentDeclaration, declSourceFile)); const actions2 = [createCodeFixAction(fixMissingMember, addMethodDeclarationChanges(modifierFlags & 32 /* Static */), [modifierFlags & 32 /* Static */ ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, methodName], fixMissingMember, Diagnostics.Add_all_missing_members)]; @@ -149189,7 +151340,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 173 /* MethodDeclaration */ : 172 /* MethodSignature */; + const kind = isClassLike(parentDeclaration) ? 174 /* MethodDeclaration */ : 173 /* MethodSignature */; const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); if (containingMethodDeclaration) { @@ -149218,8 +151369,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function addFunctionDeclaration(changes, context, info) { const quotePreference = getQuotePreference(context.sourceFile, context.preferences); const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(261 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( - 261 /* FunctionDeclaration */, + const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(262 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( + 262 /* FunctionDeclaration */, context, quotePreference, info.signature, @@ -149368,7 +151519,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (signature === void 0) return createUndefined(); const func = createSignatureDeclarationFromSignature( - 217 /* FunctionExpression */, + 218 /* FunctionExpression */, context, quotePreference, signature[0], @@ -149876,7 +152027,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } function getSuggestion(messageText) { - const [_, suggestion] = flattenDiagnosticMessageText(messageText, "\n", 0).match(/\'(.*)\'/) || []; + const [_, suggestion] = flattenDiagnosticMessageText(messageText, "\n", 0).match(/'(.*)'/) || []; return suggestion; } var fixId28, errorCodes34; @@ -149922,6 +152073,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} registerCodeFix({ errorCodes: [ Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, + Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code ], getCodeActions: function getCodeActionsToFixModuleAndTarget(context) { @@ -150245,18 +152397,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts function getImportDeclaration(sourceFile, program, start) { const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier); - if (!identifier || identifier.parent.kind !== 182 /* TypeReference */) + if (!identifier || identifier.parent.kind !== 183 /* TypeReference */) return; const checker = program.getTypeChecker(); const symbol = checker.getSymbolAtLocation(identifier); return find((symbol == null ? void 0 : symbol.declarations) || emptyArray, or(isImportClause, isImportSpecifier, isImportEqualsDeclaration)); } function doTypeOnlyImportChange(changes, sourceFile, importDeclaration, program) { - if (importDeclaration.kind === 270 /* ImportEqualsDeclaration */) { + if (importDeclaration.kind === 271 /* ImportEqualsDeclaration */) { changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, importDeclaration.name); return; } - const importClause = importDeclaration.kind === 272 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; + const importClause = importDeclaration.kind === 273 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; if (importClause.name && importClause.namedBindings) { return; } @@ -150287,14 +152439,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); if (!importDeclaration) return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 275 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); + const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 276 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); const typeOnlyChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => doTypeOnlyImportChange(t, context.sourceFile, importDeclaration, context.program)); let actions2; if (namespaceChanges.length) { actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, namespaceChanges, Diagnostics.Convert_named_imports_to_namespace_import)); } if (typeOnlyChanges.length) { - actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, typeOnlyChanges, Diagnostics.Convert_to_type_only_import)); + actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, typeOnlyChanges, Diagnostics.Use_import_type)); } return actions2; }, @@ -150314,7 +152466,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); } function isImport(token) { - return token.kind === 102 /* ImportKeyword */ || token.kind === 80 /* Identifier */ && (token.parent.kind === 275 /* ImportSpecifier */ || token.parent.kind === 272 /* ImportClause */); + return token.kind === 102 /* ImportKeyword */ || token.kind === 80 /* Identifier */ && (token.parent.kind === 276 /* ImportSpecifier */ || token.parent.kind === 273 /* ImportClause */); } function tryGetFullImport(token) { return token.kind === 102 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; @@ -150323,7 +152475,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return isVariableDeclarationList(token.parent) && first(token.parent.getChildren(sourceFile)) === token; } function deleteEntireVariableStatement(changes, sourceFile, node) { - changes.delete(sourceFile, node.parent.kind === 242 /* VariableStatement */ ? node.parent : node); + changes.delete(sourceFile, node.parent.kind === 243 /* VariableStatement */ ? node.parent : node); } function deleteDestructuringElements(changes, sourceFile, node) { forEach(node.elements, (n) => changes.delete(sourceFile, n)); @@ -150365,14 +152517,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function canPrefix(token) { switch (token.parent.kind) { - case 168 /* Parameter */: - case 167 /* TypeParameter */: + case 169 /* Parameter */: + case 168 /* TypeParameter */: return true; - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { const varDecl = token.parent; switch (varDecl.parent.parent.kind) { - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: return true; } } @@ -150421,8 +152573,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { const { parent: parent2 } = parameter; switch (parent2.kind) { - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: const index = parent2.parameters.indexOf(parameter); const referent = isMethodDeclaration(parent2) ? parent2.name : parent2; const entries = ts_FindAllReferences_exports.Core.getReferencedSymbolsForNode(parent2.pos, referent, program, sourceFiles, cancellationToken); @@ -150440,18 +152592,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } return true; - case 261 /* FunctionDeclaration */: { + case 262 /* FunctionDeclaration */: { if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { return isLastParameter(parent2, parameter, isFixAll); } return true; } - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return isLastParameter(parent2, parameter, isFixAll); - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return false; - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return true; default: return Debug.failBadSyntaxKind(parent2); @@ -150664,7 +152816,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const container = (isBlock(statement.parent) ? statement.parent : statement).parent; if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { - case 244 /* IfStatement */: + case 245 /* IfStatement */: if (container.elseStatement) { if (isBlock(statement.parent)) { break; @@ -150673,8 +152825,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return; } - case 246 /* WhileStatement */: - case 247 /* ForStatement */: + case 247 /* WhileStatement */: + case 248 /* ForStatement */: changes.delete(sourceFile, container); return; } @@ -150770,22 +152922,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isTypeContainer(node) { switch (node.kind) { - case 233 /* AsExpression */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 261 /* FunctionDeclaration */: - case 176 /* GetAccessor */: - case 180 /* IndexSignature */: - case 199 /* MappedType */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 168 /* Parameter */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 177 /* SetAccessor */: - case 264 /* TypeAliasDeclaration */: - case 215 /* TypeAssertionExpression */: - case 259 /* VariableDeclaration */: + case 234 /* AsExpression */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 262 /* FunctionDeclaration */: + case 177 /* GetAccessor */: + case 181 /* IndexSignature */: + case 200 /* MappedType */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 169 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 178 /* SetAccessor */: + case 265 /* TypeAliasDeclaration */: + case 216 /* TypeAssertionExpression */: + case 260 /* VariableDeclaration */: return true; default: return false; @@ -150827,7 +152979,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { typeNode, type } = info; const original = typeNode.getText(sourceFile); const actions2 = [fix(type, fixIdPlain, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)]; - if (typeNode.kind === 320 /* JSDocNullableType */) { + if (typeNode.kind === 321 /* JSDocNullableType */) { actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); } return actions2; @@ -150845,7 +152997,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!info) return; const { typeNode, type } = info; - const fixedType = typeNode.kind === 320 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; + const fixedType = typeNode.kind === 321 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; doChange28(changes, sourceFile, typeNode, fixedType, checker); }); } @@ -150918,14 +153070,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } let insertBefore; switch (containingFunction.kind) { - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: insertBefore = containingFunction.name; break; - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: insertBefore = findChildOfKind(containingFunction, 100 /* FunctionKeyword */, sourceFile); break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: const kind = containingFunction.typeParameters ? 30 /* LessThanToken */ : 21 /* OpenParenToken */; insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); break; @@ -150955,6 +153107,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} fixId36 = "fixAwaitInSyncFunction"; errorCodes46 = [ Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code ]; @@ -151232,7 +153385,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 170 /* PropertySignature */) { + if (isInJSFile(sourceFile) && declaration.kind !== 171 /* PropertySignature */) { const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; if (!parent2) { return; @@ -151343,17 +153496,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { let searchToken; switch (containingFunction.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: searchToken = findChildOfKind(containingFunction, 137 /* ConstructorKeyword */, sourceFile); break; - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: const parent2 = containingFunction.parent; searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; break; - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: searchToken = containingFunction.name; break; } @@ -151489,44 +153642,44 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} node = node.parent; } switch (node.parent.kind) { - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: inferTypeFromExpressionStatement(node, usage); break; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: usage.isNumber = true; break; - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: inferTypeFromPrefixUnaryExpression(node.parent, usage); break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: inferTypeFromBinaryExpression(node, node.parent, usage); break; - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: inferTypeFromSwitchStatementLabel(node.parent, usage); break; - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: if (node.parent.expression === node) { inferTypeFromCallExpression(node.parent, usage); } else { inferTypeFromContextualType(node, usage); } break; - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: inferTypeFromPropertyAccessExpression(node.parent, usage); break; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: inferTypeFromPropertyElementExpression(node.parent, node, usage); break; - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: inferTypeFromPropertyAssignment(node.parent, usage); break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: inferTypeFromPropertyDeclaration(node.parent, usage); break; - case 259 /* VariableDeclaration */: { + case 260 /* VariableDeclaration */: { const { name, initializer } = node.parent; if (node === name) { if (initializer) { @@ -151626,7 +153779,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; case 57 /* BarBarToken */: case 61 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 259 /* VariableDeclaration */ || isAssignmentExpression( + if (node === parent2.left && (node.parent.parent.kind === 260 /* VariableDeclaration */ || isAssignmentExpression( node.parent.parent, /*excludeCompoundAssignment*/ true @@ -151654,7 +153807,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 212 /* CallExpression */) { + if (parent2.kind === 213 /* CallExpression */) { (usage.calls || (usage.calls = [])).push(call); } else { (usage.constructs || (usage.constructs = [])).push(call); @@ -152203,28 +154356,25 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, preserveOptional = 3 /* All */, isAmbient = false) { const declarations = symbol.getDeclarations(); - const declaration = declarations == null ? void 0 : declarations[0]; + const declaration = firstOrUndefined(declarations); const checker = context.program.getTypeChecker(); const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); - const kind = (declaration == null ? void 0 : declaration.kind) ?? 170 /* PropertySignature */; - const declarationName = getSynthesizedDeepClone( - getNameOfDeclaration(declaration), - /*includeTrivia*/ - false - ); + const kind = (declaration == null ? void 0 : declaration.kind) ?? 171 /* PropertySignature */; + const declarationName = createDeclarationName(symbol, declaration); const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */; - let modifierFlags = effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; + let modifierFlags = effectiveModifierFlags & 32 /* Static */; + modifierFlags |= effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; if (declaration && isAutoAccessorPropertyDeclaration(declaration)) { modifierFlags |= 128 /* Accessor */; } const modifiers = createModifiers(); const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); const optional = !!(symbol.flags & 16777216 /* Optional */); - const ambient = !!(enclosingDeclaration.flags & 16777216 /* Ambient */) || isAmbient; + const ambient = !!(enclosingDeclaration.flags & 33554432 /* Ambient */) || isAmbient; const quotePreference = getQuotePreference(sourceFile, preferences); switch (kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: const flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : void 0; let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { @@ -152243,8 +154393,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} void 0 )); break; - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: { + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: { Debug.assertIsDefined(declarations); let typeNode2 = checker.typeToTypeNode( type, @@ -152292,8 +154442,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } break; } - case 172 /* MethodSignature */: - case 173 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 174 /* MethodDeclaration */: Debug.assertIsDefined(declarations); const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); if (!some(signatures)) { @@ -152320,7 +154470,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; } function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(173 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); + const method = createSignatureDeclarationFromSignature(174 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); if (method) addClassElement(method); } @@ -152330,7 +154480,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} modifiers2 = combine(modifiers2, factory.createModifiersFromModifierFlags(modifierFlags)); } if (shouldAddOverrideKeyword()) { - modifiers2 = append(modifiers2, factory.createToken(163 /* OverrideKeyword */)); + modifiers2 = append(modifiers2, factory.createToken(164 /* OverrideKeyword */)); } return modifiers2 && factory.createNodeArray(modifiers2); } @@ -152361,6 +154511,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} false ); } + function createDeclarationName(symbol2, declaration2) { + if (getCheckFlags(symbol2) & 262144 /* Mapped */) { + const nameType = symbol2.links.nameType; + if (nameType && isTypeUsableAsPropertyName(nameType)) { + return factory.createIdentifier(unescapeLeadingUnderscores(getPropertyNameFromType(nameType))); + } + } + return getSynthesizedDeepClone( + getNameOfDeclaration(declaration2), + /*includeTrivia*/ + false + ); + } } function createSignatureDeclarationFromSignature(kind, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder) { const program = context.program; @@ -152468,8 +154631,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} instanceTypes, contextNode, scriptTarget, - /*flags*/ - void 0, + 1 /* NoTruncation */, tracker ); const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0; @@ -152491,7 +154653,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} tracker ); switch (kind) { - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: return factory.createMethodDeclaration( modifiers, asteriskToken, @@ -152503,7 +154665,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} type, createStubbedMethodBody(quotePreference) ); - case 172 /* MethodSignature */: + case 173 /* MethodSignature */: return factory.createMethodSignature( modifiers, name, @@ -152513,7 +154675,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} parameters, type === void 0 ? factory.createKeywordTypeNode(159 /* UnknownKeyword */) : type ); - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: + Debug.assert(typeof name === "string" || isIdentifier(name), "Unexpected name"); return factory.createFunctionDeclaration( modifiers, asteriskToken, @@ -152918,7 +155081,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} isStatic: hasStaticModifier(declaration), isReadonly: hasEffectiveReadonlyModifier(declaration), type: getDeclarationType(declaration, program), - container: declaration.kind === 168 /* Parameter */ ? declaration.parent.parent : declaration.parent, + container: declaration.kind === 169 /* Parameter */ ? declaration.parent.parent : declaration.parent, originalName: declaration.name.text, declaration, fieldName, @@ -153090,7 +155253,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getActionsForUsageOfInvalidImport(context) { const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 212 /* CallExpression */ : 213 /* NewExpression */; + const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 213 /* CallExpression */ : 214 /* NewExpression */; const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); if (!node) { return []; @@ -153495,7 +155658,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getImportTypeNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); Debug.assert(token.kind === 102 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 204 /* ImportType */, "Token parent should be an ImportType"); + Debug.assert(token.parent.kind === 205 /* ImportType */, "Token parent should be an ImportType"); return token.parent; } function doChange36(changes, sourceFile, importType) { @@ -153802,8 +155965,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return [createCodeFixAction(fixId48, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId48, Diagnostics.Split_all_invalid_type_only_imports)]; } }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes60, (changes, error) => { - splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error), context); + getAllCodeActions: (context) => codeFixAll(context, errorCodes60, (changes, error2) => { + splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error2), context); }) }); } @@ -154016,7 +156179,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} getFixes: () => getFixes, getImportCompletionAction: () => getImportCompletionAction, getImportKind: () => getImportKind, - getJSDocTypedefNode: () => getJSDocTypedefNode, + getJSDocTypedefNodes: () => getJSDocTypedefNodes, getNoopSymbolTrackerWithResolver: () => getNoopSymbolTrackerWithResolver, getPromoteTypeOnlyCompletionAction: () => getPromoteTypeOnlyCompletionAction, getSupportedErrorCodes: () => getSupportedErrorCodes, @@ -154861,14 +157024,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function typeNodeToExpression(typeNode, languageVersion, quotePreference) { switch (typeNode.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: const typeName = typeNode.typeName; return entityNameToExpression(typeName, languageVersion, quotePreference); - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: const objectExpression = typeNodeToExpression(typeNode.objectType, languageVersion, quotePreference); const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference); return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression); - case 200 /* LiteralType */: + case 201 /* LiteralType */: const literal = typeNode.literal; switch (literal.kind) { case 11 /* StringLiteral */: @@ -154877,12 +157040,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return factory.createNumericLiteral(literal.text, literal.numericLiteralFlags); } return void 0; - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference); return exp && (isIdentifier(exp) ? exp : factory.createParenthesizedExpression(exp)); - case 185 /* TypeQuery */: + case 186 /* TypeQuery */: return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference); - case 204 /* ImportType */: + case 205 /* ImportType */: Debug.fail(`We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.`); } return void 0; @@ -154917,12 +157080,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getJsxClosingTagCompletion(location, sourceFile) { const jsxClosingElement = findAncestor(location, (node) => { switch (node.kind) { - case 286 /* JsxClosingElement */: + case 287 /* JsxClosingElement */: return true; case 44 /* SlashToken */: case 32 /* GreaterThanToken */: case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return false; default: return "quit"; @@ -154969,7 +157132,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; } function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol) { + var _a, _b; let insertText; + let filterText; let replacementSpan = getReplacementSpanForContextToken(replacementToken); let data; let isSnippet; @@ -155026,13 +157191,23 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if ((origin == null ? void 0 : origin.kind) === 64 /* TypeOnlyAlias */) { hasAction = true; } + if (completionKind === 0 /* ObjectPropertyDeclaration */ && contextToken && ((_a = findPrecedingToken(contextToken.pos, sourceFile, contextToken)) == null ? void 0 : _a.kind) !== 28 /* CommaToken */) { + if (isMethodDeclaration(contextToken.parent.parent) || isGetAccessorDeclaration(contextToken.parent.parent) || isSetAccessorDeclaration(contextToken.parent.parent) || isSpreadAssignment(contextToken.parent) || ((_b = findAncestor(contextToken.parent, isPropertyAssignment)) == null ? void 0 : _b.getLastToken(sourceFile)) === contextToken || isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) { + source = "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */; + hasAction = true; + } + } if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === 3 /* MemberLike */ && isClassLikeMemberCompletion(symbol, location, sourceFile)) { let importAdder; - ({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext)); - sortText = SortText.ClassMemberSnippets; - if (importAdder == null ? void 0 : importAdder.hasFixes()) { - hasAction = true; - source = "ClassMemberSnippet/" /* ClassMemberSnippet */; + const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext); + if (memberCompletionEntry) { + ({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry); + if (importAdder == null ? void 0 : importAdder.hasFixes()) { + hasAction = true; + source = "ClassMemberSnippet/" /* ClassMemberSnippet */; + } + } else { + return void 0; } } if (origin && originIsObjectLiteralMethod(origin)) { @@ -155067,6 +157242,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} data = originToCompletionEntryData(origin); hasAction = !importStatementCompletion; } + const parentNamedImportOrExport = findAncestor(location, isNamedImportsOrExports); + if ((parentNamedImportOrExport == null ? void 0 : parentNamedImportOrExport.kind) === 275 /* NamedImports */) { + const possibleToken = stringToToken(name); + if (parentNamedImportOrExport && possibleToken && (possibleToken === 135 /* AwaitKeyword */ || isNonContextualKeyword(possibleToken))) { + insertText = `${name} as ${name}_`; + } + } return { name, kind: ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, location), @@ -155076,6 +157258,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} hasAction: hasAction ? true : void 0, isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || void 0, insertText, + filterText, replacementSpan, sourceDisplay, labelDetails, @@ -155096,11 +157279,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) { const classLikeDeclaration = findAncestor(location, isClassLike); if (!classLikeDeclaration) { - return { insertText: name }; + return void 0; } let isSnippet; - let replacementSpan; let insertText = name; + const filterText = name; const checker = program.getTypeChecker(); const sourceFile = location.getSourceFile(); const printer = createSnippetPrinter({ @@ -155129,9 +157312,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } let modifiers = 0 /* None */; - const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position); - const isAbstract = !!(presentModifiers & 256 /* Abstract */); - const completionNodes = []; + const { modifiers: presentModifiers, range: eraseRange, decorators: presentDecorators } = getPresentModifiers(contextToken, sourceFile, position); + const isAbstract = presentModifiers & 256 /* Abstract */ && classLikeDeclaration.modifierFlagsCache & 256 /* Abstract */; + let completionNodes = []; ts_codefix_exports.addNewNodeForMemberSymbol( symbol, classLikeDeclaration, @@ -155155,18 +157338,42 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} requiredModifiers |= 16384 /* Override */; } if (!completionNodes.length) { - modifiers = node.modifierFlagsCache | requiredModifiers | presentModifiers; + modifiers = node.modifierFlagsCache | requiredModifiers; } node = factory.updateModifiers(node, modifiers); completionNodes.push(node); }, body, ts_codefix_exports.PreserveOptionalFlags.Property, - isAbstract + !!isAbstract ); if (completionNodes.length) { + const isMethod = symbol.flags & 8192 /* Method */; + let allowedModifiers = modifiers | 16384 /* Override */ | 4 /* Public */; + if (!isMethod) { + allowedModifiers |= 2 /* Ambient */ | 64 /* Readonly */; + } else { + allowedModifiers |= 512 /* Async */; + } + const allowedAndPresent = presentModifiers & allowedModifiers; + if (presentModifiers & ~allowedModifiers) { + return void 0; + } + if (modifiers & 16 /* Protected */ && allowedAndPresent & 4 /* Public */) { + modifiers &= ~16 /* Protected */; + } + if (allowedAndPresent !== 0 /* None */ && !(allowedAndPresent & 4 /* Public */)) { + modifiers &= ~4 /* Public */; + } + modifiers |= allowedAndPresent; + completionNodes = completionNodes.map((node) => factory.updateModifiers(node, modifiers)); + if (presentDecorators == null ? void 0 : presentDecorators.length) { + const lastNode = completionNodes[completionNodes.length - 1]; + if (canHaveDecorators(lastNode)) { + completionNodes[completionNodes.length - 1] = factory.updateModifierLike(lastNode, presentDecorators.concat(getModifiers(lastNode) || [])); + } + } const format = 1 /* MultiLine */ | 131072 /* NoTrailingNewLine */; - replacementSpan = modifiersSpan; if (formatContext) { insertText = printer.printAndFormatSnippetList( format, @@ -155182,24 +157389,29 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } } - return { insertText, isSnippet, importAdder, replacementSpan }; + return { insertText, filterText, isSnippet, importAdder, eraseRange }; } function getPresentModifiers(contextToken, sourceFile, position) { if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) { return { modifiers: 0 /* None */ }; } let modifiers = 0 /* None */; - let span; + let decorators; let contextMod; - if (contextMod = isModifierLike2(contextToken)) { - modifiers |= modifierToFlag(contextMod); - span = createTextSpanFromNode(contextToken); - } - if (isPropertyDeclaration(contextToken.parent)) { + const range = { pos: position, end: position }; + if (isPropertyDeclaration(contextToken.parent) && contextToken.parent.modifiers) { modifiers |= modifiersToFlags(contextToken.parent.modifiers) & 126975 /* Modifier */; - span = createTextSpanFromNode(contextToken.parent); + decorators = contextToken.parent.modifiers.filter(isDecorator) || []; + range.pos = Math.min(range.pos, contextToken.parent.modifiers.pos); } - return { modifiers, span }; + if (contextMod = isModifierLike2(contextToken)) { + const contextModifierFlag = modifierToFlag(contextMod); + if (!(modifiers & contextModifierFlag)) { + modifiers |= contextModifierFlag; + range.pos = Math.min(range.pos, contextToken.pos); + } + } + return { modifiers, decorators, range: range.pos !== position ? range : void 0 }; } function isModifierLike2(node) { if (isModifier(node)) { @@ -155276,10 +157488,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const quotePreference = getQuotePreference(sourceFile, preferences); const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); switch (declaration.kind) { - case 170 /* PropertySignature */: - case 171 /* PropertyDeclaration */: - case 172 /* MethodSignature */: - case 173 /* MethodDeclaration */: { + case 171 /* PropertySignature */: + case 172 /* PropertyDeclaration */: + case 173 /* MethodSignature */: + case 174 /* MethodDeclaration */: { let effectiveType = type.flags & 1048576 /* Union */ && type.types.length < 10 ? checker.getUnionType(type.types, 2 /* Subtype */) : type; if (effectiveType.flags & 1048576 /* Union */) { const functionTypes = filter(effectiveType.types, (type2) => checker.getSignaturesOfType(type2, 0 /* Call */).length > 0); @@ -155722,7 +157934,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return firstDefined(symbols, (symbol, index) => { const origin = symbolToOriginInfoMap[index]; const info = getCompletionEntryDisplayNameForSymbol(symbol, getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected); - return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0; + return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source || entryId.source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0; }) || { type: "none" }; } function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) { @@ -155817,12 +158029,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken, origin, symbol, program, host, compilerOptions, sourceFile, position, previousToken, formatContext, preferences, data, source, cancellationToken) { if (data == null ? void 0 : data.moduleSpecifier) { - if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken).replacementSpan) { + if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken, sourceFile).replacementSpan) { return { codeActions: void 0, sourceDisplay: [textPart(data.moduleSpecifier)] }; } } if (source === "ClassMemberSnippet/" /* ClassMemberSnippet */) { - const { importAdder } = getEntryForMemberCompletion( + const { importAdder, eraseRange } = getEntryForMemberCompletion( host, program, compilerOptions, @@ -155834,10 +158046,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} contextToken, formatContext ); - if (importAdder) { + if (importAdder || eraseRange) { const changes = ts_textChanges_exports.ChangeTracker.with( { host, formatContext, preferences }, - importAdder.writeFixes + (tracker) => { + if (importAdder) { + importAdder.writeFixes(tracker); + } + if (eraseRange) { + tracker.deleteRange(sourceFile, eraseRange); + } + } ); return { sourceDisplay: void 0, @@ -155860,6 +158079,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} Debug.assertIsDefined(codeAction2, "Expected to have a code action for promoting type-only alias"); return { codeActions: [codeAction2], sourceDisplay: void 0 }; } + if (source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */ && contextToken) { + const changes = ts_textChanges_exports.ChangeTracker.with( + { host, formatContext, preferences }, + (tracker) => tracker.insertText(sourceFile, contextToken.end, ",") + ); + if (changes) { + return { + sourceDisplay: void 0, + codeActions: [{ + changes, + description: diagnosticToString([Diagnostics.Add_missing_comma_for_object_member_completion_0, name]) + }] + }; + } + } if (!origin || !(originIsExport(origin) || originIsResolvedExport(origin))) { return { codeActions: void 0, sourceDisplay: void 0 }; } @@ -155901,11 +158135,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return getContextualTypeFromParent(previousToken, checker); case 64 /* EqualsToken */: switch (parent2.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return checker.getContextualType(parent2.initializer); - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return checker.getTypeAtLocation(parent2.left); - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: return checker.getContextualTypeForJsxAttribute(parent2); default: return void 0; @@ -155943,7 +158177,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isModuleSymbol(symbol) { var _a; - return !!((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d.kind === 311 /* SourceFile */)); + return !!((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d.kind === 312 /* SourceFile */)); } function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { const typeChecker = program.getTypeChecker(); @@ -155962,7 +158196,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { kind: 1 /* JsDocTagName */ }; } else { const lineStart = getLineStartPositionForPosition(position, sourceFile); - if (!/[^\*|\s(/)]/.test(sourceFile.text.substring(lineStart, position))) { + if (!/[^*|\s(/)]/.test(sourceFile.text.substring(lineStart, position))) { return { kind: 2 /* JsDocTag */ }; } } @@ -155975,7 +158209,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const typeExpression = tryGetTypeExpressionFromTag(tag); if (typeExpression) { currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 354 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { + if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 355 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); } } @@ -156008,7 +158242,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let isNewIdentifierLocation = false; let flags = 0 /* None */; if (contextToken) { - const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken); + const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken, sourceFile); if (importStatementCompletionInfo.keywordCompletion) { if (importStatementCompletionInfo.isKeywordOnlyCompletion) { return { @@ -156033,7 +158267,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} isRightOfDot = contextToken.kind === 25 /* DotToken */; isRightOfQuestionDot = contextToken.kind === 29 /* QuestionDotToken */; switch (parent2.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); @@ -156041,16 +158275,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } break; - case 165 /* QualifiedName */: + case 166 /* QualifiedName */: node = parent2.left; break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: node = parent2.name; break; - case 204 /* ImportType */: + case 205 /* ImportType */: node = parent2; break; - case 235 /* MetaProperty */: + case 236 /* MetaProperty */: node = parent2.getFirstToken(sourceFile); Debug.assert(node.kind === 102 /* ImportKeyword */ || node.kind === 105 /* NewKeyword */); break; @@ -156058,51 +158292,51 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 210 /* PropertyAccessExpression */) { + if (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { contextToken = parent2; parent2 = parent2.parent; } if (currentToken.parent === location) { switch (currentToken.kind) { case 32 /* GreaterThanToken */: - if (currentToken.parent.kind === 283 /* JsxElement */ || currentToken.parent.kind === 285 /* JsxOpeningElement */) { + if (currentToken.parent.kind === 284 /* JsxElement */ || currentToken.parent.kind === 286 /* JsxOpeningElement */) { location = currentToken; } break; case 44 /* SlashToken */: - if (currentToken.parent.kind === 284 /* JsxSelfClosingElement */) { + if (currentToken.parent.kind === 285 /* JsxSelfClosingElement */) { location = currentToken; } break; } } switch (parent2.kind) { - case 286 /* JsxClosingElement */: + case 287 /* JsxClosingElement */: if (contextToken.kind === 44 /* SlashToken */) { isStartingCloseTag = true; location = contextToken; } break; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: if (!binaryExpressionMayBeOpenTag(parent2)) { break; } - case 284 /* JsxSelfClosingElement */: - case 283 /* JsxElement */: - case 285 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: + case 284 /* JsxElement */: + case 286 /* JsxOpeningElement */: isJsxIdentifierExpected = true; if (contextToken.kind === 30 /* LessThanToken */) { isRightOfOpenTag = true; location = contextToken; } break; - case 293 /* JsxExpression */: - case 292 /* JsxSpreadAttribute */: - if (previousToken.kind === 20 /* CloseBraceToken */ || previousToken.kind === 80 /* Identifier */ && previousToken.parent.kind === 290 /* JsxAttribute */) { + case 294 /* JsxExpression */: + case 293 /* JsxSpreadAttribute */: + if (previousToken.kind === 20 /* CloseBraceToken */ || previousToken.kind === 80 /* Identifier */ && previousToken.parent.kind === 291 /* JsxAttribute */) { isJsxIdentifierExpected = true; } break; - case 290 /* JsxAttribute */: + case 291 /* JsxAttribute */: if (parent2.initializer === previousToken && previousToken.end < position) { isJsxIdentifierExpected = true; break; @@ -156190,15 +158424,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }; function isTagWithTypeExpression(tag) { switch (tag.kind) { - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: - case 348 /* JSDocReturnTag */: - case 350 /* JSDocTypeTag */: - case 352 /* JSDocTypedefTag */: - case 355 /* JSDocThrowsTag */: - case 356 /* JSDocSatisfiesTag */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: + case 349 /* JSDocReturnTag */: + case 351 /* JSDocTypeTag */: + case 353 /* JSDocTypedefTag */: + case 356 /* JSDocThrowsTag */: + case 357 /* JSDocSatisfiesTag */: return true; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return !!tag.constraint; default: return false; @@ -156207,7 +158441,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function tryGetTypeExpressionFromTag(tag) { if (isTagWithTypeExpression(tag)) { const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 315 /* JSDocTypeExpression */ ? typeExpression : void 0; + return typeExpression && typeExpression.kind === 316 /* JSDocTypeExpression */ ? typeExpression : void 0; } if (isJSDocAugmentsTag(tag) || isJSDocImplementsTag(tag)) { return tag.class; @@ -156243,7 +158477,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} symbols.push(exportedSymbol); } } - if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 311 /* SourceFile */ && d.kind !== 266 /* ModuleDeclaration */ && d.kind !== 265 /* EnumDeclaration */)) { + if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 312 /* SourceFile */ && d.kind !== 267 /* ModuleDeclaration */ && d.kind !== 266 /* EnumDeclaration */)) { let type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); let insertQuestionDot = false; if (type.isNullableType()) { @@ -156255,30 +158489,40 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } } - addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); + addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot); } return; } } } - if (!isTypeLocation) { + if (!isTypeLocation || isInTypeQuery(node)) { typeChecker.tryGetThisTypeAt( node, /*includeGlobalThis*/ false ); let type = typeChecker.getTypeAtLocation(node).getNonOptionalType(); - let insertQuestionDot = false; - if (type.isNullableType()) { - const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false; - if (canCorrectToQuestionDot || isRightOfQuestionDot) { - type = type.getNonNullableType(); - if (canCorrectToQuestionDot) { - insertQuestionDot = true; + if (!isTypeLocation) { + let insertQuestionDot = false; + if (type.isNullableType()) { + const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false; + if (canCorrectToQuestionDot || isRightOfQuestionDot) { + type = type.getNonNullableType(); + if (canCorrectToQuestionDot) { + insertQuestionDot = true; + } } } + addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot); + } else { + addTypeProperties( + type.getNonNullableType(), + /*insertAwait*/ + false, + /*insertQuestionDot*/ + false + ); } - addTypeProperties(type, !!(node.flags & 32768 /* AwaitContext */), insertQuestionDot); } } function addTypeProperties(type, insertAwait, insertQuestionDot) { @@ -156286,7 +158530,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isRightOfQuestionDot && some(type.getCallSignatures())) { isNewIdentifierLocation = true; } - const propertyAccess = node.kind === 204 /* ImportType */ ? node : node.parent; + const propertyAccess = node.kind === 205 /* ImportType */ ? node : node.parent; if (inCheckedFile) { for (const symbol of type.getApparentProperties()) { if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) { @@ -156324,7 +158568,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const leftMostName = getLeftMostName(computedPropertyName.expression); const nameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName); const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker); - if (firstAccessibleSymbol && addToSeen(seenPropertySymbols, getSymbolId(firstAccessibleSymbol))) { + const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol); + if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) { const index = symbols.length; symbols.push(firstAccessibleSymbol); const moduleSymbol = firstAccessibleSymbol.parent; @@ -156354,6 +158599,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } } else if (preferences.includeCompletionsWithInsertText) { + if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) { + return; + } addSymbolOriginInfo(symbol); addSymbolSortInfo(symbol); symbols.push(symbol); @@ -156442,7 +158690,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 311 /* SourceFile */) { + if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 312 /* SourceFile */) { const thisType = typeChecker.tryGetThisTypeAt( scopeNode, /*includeGlobalThis*/ @@ -156477,10 +158725,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isSnippetScope(scopeNode) { switch (scopeNode.kind) { - case 311 /* SourceFile */: - case 227 /* TemplateExpression */: - case 293 /* JsxExpression */: - case 240 /* Block */: + case 312 /* SourceFile */: + case 228 /* TemplateExpression */: + case 294 /* JsxExpression */: + case 241 /* Block */: return true; default: return isStatement(scopeNode); @@ -156490,24 +158738,24 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); } function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 185 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 181 /* TypePredicate */); + return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */); } function isContextTokenTypeLocation(contextToken2) { if (contextToken2) { const parentKind = contextToken2.parent.kind; switch (contextToken2.kind) { case 59 /* ColonToken */: - return parentKind === 171 /* PropertyDeclaration */ || parentKind === 170 /* PropertySignature */ || parentKind === 168 /* Parameter */ || parentKind === 259 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); + return parentKind === 172 /* PropertyDeclaration */ || parentKind === 171 /* PropertySignature */ || parentKind === 169 /* Parameter */ || parentKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); case 64 /* EqualsToken */: - return parentKind === 264 /* TypeAliasDeclaration */; + return parentKind === 265 /* TypeAliasDeclaration */; case 130 /* AsKeyword */: - return parentKind === 233 /* AsExpression */; + return parentKind === 234 /* AsExpression */; case 30 /* LessThanToken */: - return parentKind === 182 /* TypeReference */ || parentKind === 215 /* TypeAssertionExpression */; + return parentKind === 183 /* TypeReference */ || parentKind === 216 /* TypeAssertionExpression */; case 96 /* ExtendsKeyword */: - return parentKind === 167 /* TypeParameter */; + return parentKind === 168 /* TypeParameter */; case 152 /* SatisfiesKeyword */: - return parentKind === 237 /* SatisfiesExpression */; + return parentKind === 238 /* SatisfiesExpression */; } } return false; @@ -156685,14 +158933,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return true; } if (contextToken2.kind === 32 /* GreaterThanToken */ && contextToken2.parent) { - if (location === contextToken2.parent && (location.kind === 285 /* JsxOpeningElement */ || location.kind === 284 /* JsxSelfClosingElement */)) { + if (location === contextToken2.parent && (location.kind === 286 /* JsxOpeningElement */ || location.kind === 285 /* JsxSelfClosingElement */)) { return false; } - if (contextToken2.parent.kind === 285 /* JsxOpeningElement */) { - return location.parent.kind !== 285 /* JsxOpeningElement */; + if (contextToken2.parent.kind === 286 /* JsxOpeningElement */) { + return location.parent.kind !== 286 /* JsxOpeningElement */; } - if (contextToken2.parent.kind === 286 /* JsxClosingElement */ || contextToken2.parent.kind === 284 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 283 /* JsxElement */; + if (contextToken2.parent.kind === 287 /* JsxClosingElement */ || contextToken2.parent.kind === 285 /* JsxSelfClosingElement */) { + return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 284 /* JsxElement */; } } return false; @@ -156703,29 +158951,29 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const tokenKind = keywordForNode(contextToken); switch (tokenKind) { case 28 /* CommaToken */: - return containingNodeKind === 212 /* CallExpression */ || containingNodeKind === 175 /* Constructor */ || containingNodeKind === 213 /* NewExpression */ || containingNodeKind === 208 /* ArrayLiteralExpression */ || containingNodeKind === 225 /* BinaryExpression */ || containingNodeKind === 183 /* FunctionType */ || containingNodeKind === 209 /* ObjectLiteralExpression */; + return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 226 /* BinaryExpression */ || containingNodeKind === 184 /* FunctionType */ || containingNodeKind === 210 /* ObjectLiteralExpression */; case 21 /* OpenParenToken */: - return containingNodeKind === 212 /* CallExpression */ || containingNodeKind === 175 /* Constructor */ || containingNodeKind === 213 /* NewExpression */ || containingNodeKind === 216 /* ParenthesizedExpression */ || containingNodeKind === 195 /* ParenthesizedType */; + return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 217 /* ParenthesizedExpression */ || containingNodeKind === 196 /* ParenthesizedType */; case 23 /* OpenBracketToken */: - return containingNodeKind === 208 /* ArrayLiteralExpression */ || containingNodeKind === 180 /* IndexSignature */ || containingNodeKind === 166 /* ComputedPropertyName */; + return containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 181 /* IndexSignature */ || containingNodeKind === 167 /* ComputedPropertyName */; case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: case 102 /* ImportKeyword */: return true; case 25 /* DotToken */: - return containingNodeKind === 266 /* ModuleDeclaration */; + return containingNodeKind === 267 /* ModuleDeclaration */; case 19 /* OpenBraceToken */: - return containingNodeKind === 262 /* ClassDeclaration */ || containingNodeKind === 209 /* ObjectLiteralExpression */; + return containingNodeKind === 263 /* ClassDeclaration */ || containingNodeKind === 210 /* ObjectLiteralExpression */; case 64 /* EqualsToken */: - return containingNodeKind === 259 /* VariableDeclaration */ || containingNodeKind === 225 /* BinaryExpression */; + return containingNodeKind === 260 /* VariableDeclaration */ || containingNodeKind === 226 /* BinaryExpression */; case 16 /* TemplateHead */: - return containingNodeKind === 227 /* TemplateExpression */; + return containingNodeKind === 228 /* TemplateExpression */; case 17 /* TemplateMiddle */: - return containingNodeKind === 238 /* TemplateSpan */; + return containingNodeKind === 239 /* TemplateSpan */; case 134 /* AsyncKeyword */: - return containingNodeKind === 173 /* MethodDeclaration */ || containingNodeKind === 303 /* ShorthandPropertyAssignment */; + return containingNodeKind === 174 /* MethodDeclaration */ || containingNodeKind === 304 /* ShorthandPropertyAssignment */; case 42 /* AsteriskToken */: - return containingNodeKind === 173 /* MethodDeclaration */; + return containingNodeKind === 174 /* MethodDeclaration */; } if (isClassMemberCompletionKeyword(tokenKind)) { return true; @@ -156757,16 +159005,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function tryGetObjectLikeCompletionSymbols() { const symbolsStartIndex = symbols.length; - const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken); + const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile); if (!objectLikeContainer) return 0 /* Continue */; completionKind = 0 /* ObjectPropertyDeclaration */; let typeMembers; let existingMembers; - if (objectLikeContainer.kind === 209 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */) { const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker); if (instantiatedType === void 0) { - if (objectLikeContainer.flags & 33554432 /* InWithStatement */) { + if (objectLikeContainer.flags & 67108864 /* InWithStatement */) { return 2 /* Fail */; } isNonContextualObjectLiteral = true; @@ -156785,16 +159033,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } } else { - Debug.assert(objectLikeContainer.kind === 205 /* ObjectBindingPattern */); + Debug.assert(objectLikeContainer.kind === 206 /* ObjectBindingPattern */); isNewIdentifierLocation = false; const rootDeclaration = getRootDeclaration(objectLikeContainer.parent); if (!isVariableLike(rootDeclaration)) return Debug.fail("Root declaration is not variable-like."); - let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 249 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 168 /* Parameter */) { + let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 250 /* ForOfStatement */; + if (!canGetType && rootDeclaration.kind === 169 /* Parameter */) { if (isExpression(rootDeclaration.parent)) { canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 173 /* MethodDeclaration */ || rootDeclaration.parent.kind === 177 /* SetAccessor */) { + } else if (rootDeclaration.parent.kind === 174 /* MethodDeclaration */ || rootDeclaration.parent.kind === 178 /* SetAccessor */) { canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); } } @@ -156820,7 +159068,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); symbols = concatenate(symbols, filteredMembers); setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 209 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { + if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { transformObjectLiteralMembersSortText(symbolsStartIndex); collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); } @@ -156836,10 +159084,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!isTypeKeywordTokenOrIdentifier(contextToken)) { keywordFilters = 8 /* TypeKeyword */; } - const { moduleSpecifier } = namedImportsOrExports.kind === 274 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; + const { moduleSpecifier } = namedImportsOrExports.kind === 275 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; if (!moduleSpecifier) { isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 274 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; + return namedImportsOrExports.kind === 275 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; } const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); if (!moduleSpecifierSymbol) { @@ -156964,11 +159212,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 31 /* LessThanSlashToken */: case 44 /* SlashToken */: case 80 /* Identifier */: - case 210 /* PropertyAccessExpression */: - case 291 /* JsxAttributes */: - case 290 /* JsxAttribute */: - case 292 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 284 /* JsxSelfClosingElement */ || parent2.kind === 285 /* JsxOpeningElement */)) { + case 211 /* PropertyAccessExpression */: + case 292 /* JsxAttributes */: + case 291 /* JsxAttribute */: + case 293 /* JsxSpreadAttribute */: + if (parent2 && (parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 286 /* JsxOpeningElement */)) { if (contextToken2.kind === 32 /* GreaterThanToken */) { const precedingToken = findPrecedingToken( contextToken2.pos, @@ -156980,20 +159228,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; } return parent2; - } else if (parent2.kind === 290 /* JsxAttribute */) { + } else if (parent2.kind === 291 /* JsxAttribute */) { return parent2.parent.parent; } break; case 11 /* StringLiteral */: - if (parent2 && (parent2.kind === 290 /* JsxAttribute */ || parent2.kind === 292 /* JsxSpreadAttribute */)) { + if (parent2 && (parent2.kind === 291 /* JsxAttribute */ || parent2.kind === 293 /* JsxSpreadAttribute */)) { return parent2.parent.parent; } break; case 20 /* CloseBraceToken */: - if (parent2 && parent2.kind === 293 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 290 /* JsxAttribute */) { + if (parent2 && parent2.kind === 294 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 291 /* JsxAttribute */) { return parent2.parent.parent.parent; } - if (parent2 && parent2.kind === 292 /* JsxSpreadAttribute */) { + if (parent2 && parent2.kind === 293 /* JsxSpreadAttribute */) { return parent2.parent.parent; } break; @@ -157006,44 +159254,44 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const containingNodeKind = parent2.kind; switch (contextToken2.kind) { case 28 /* CommaToken */: - return containingNodeKind === 259 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 242 /* VariableStatement */ || containingNodeKind === 265 /* EnumDeclaration */ || // enum a { foo, | - isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 263 /* InterfaceDeclaration */ || // interface A= contextToken2.pos; case 25 /* DotToken */: - return containingNodeKind === 206 /* ArrayBindingPattern */; + return containingNodeKind === 207 /* ArrayBindingPattern */; case 59 /* ColonToken */: - return containingNodeKind === 207 /* BindingElement */; + return containingNodeKind === 208 /* BindingElement */; case 23 /* OpenBracketToken */: - return containingNodeKind === 206 /* ArrayBindingPattern */; + return containingNodeKind === 207 /* ArrayBindingPattern */; case 21 /* OpenParenToken */: - return containingNodeKind === 298 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); + return containingNodeKind === 299 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); case 19 /* OpenBraceToken */: - return containingNodeKind === 265 /* EnumDeclaration */; + return containingNodeKind === 266 /* EnumDeclaration */; case 30 /* LessThanToken */: - return containingNodeKind === 262 /* ClassDeclaration */ || // class A< | - containingNodeKind === 230 /* ClassExpression */ || // var C = class D< | - containingNodeKind === 263 /* InterfaceDeclaration */ || // interface A< | - containingNodeKind === 264 /* TypeAliasDeclaration */ || // type List< | + return containingNodeKind === 263 /* ClassDeclaration */ || // class A< | + containingNodeKind === 231 /* ClassExpression */ || // var C = class D< | + containingNodeKind === 264 /* InterfaceDeclaration */ || // interface A< | + containingNodeKind === 265 /* TypeAliasDeclaration */ || // type List< | isFunctionLikeKind(containingNodeKind); case 126 /* StaticKeyword */: - return containingNodeKind === 171 /* PropertyDeclaration */ && !isClassLike(parent2.parent); + return containingNodeKind === 172 /* PropertyDeclaration */ && !isClassLike(parent2.parent); case 26 /* DotDotDotToken */: - return containingNodeKind === 168 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 206 /* ArrayBindingPattern */; + return containingNodeKind === 169 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 207 /* ArrayBindingPattern */; case 125 /* PublicKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: - return containingNodeKind === 168 /* Parameter */ && !isConstructorDeclaration(parent2.parent); + return containingNodeKind === 169 /* Parameter */ && !isConstructorDeclaration(parent2.parent); case 130 /* AsKeyword */: - return containingNodeKind === 275 /* ImportSpecifier */ || containingNodeKind === 280 /* ExportSpecifier */ || containingNodeKind === 273 /* NamespaceImport */; + return containingNodeKind === 276 /* ImportSpecifier */ || containingNodeKind === 281 /* ExportSpecifier */ || containingNodeKind === 274 /* NamespaceImport */; case 139 /* GetKeyword */: case 153 /* SetKeyword */: return !isFromObjectTypeDeclaration(contextToken2); case 80 /* Identifier */: - if (containingNodeKind === 275 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { + if (containingNodeKind === 276 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { return false; } break; @@ -157058,7 +159306,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 140 /* InferKeyword */: return true; case 156 /* TypeKeyword */: - return containingNodeKind !== 275 /* ImportSpecifier */; + return containingNodeKind !== 276 /* ImportSpecifier */; case 42 /* AsteriskToken */: return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); } @@ -157092,7 +159340,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { return false; } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 171 /* PropertyDeclaration */); + const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 172 /* PropertyDeclaration */); if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { return false; @@ -157106,7 +159354,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return contextToken2.kind !== 64 /* EqualsToken */ && (contextToken2.kind === 27 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); } function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 175 /* Constructor */; + return isFunctionLikeKind(kind) && kind !== 176 /* Constructor */; } function isDotOfNumericLiteral(contextToken2) { if (contextToken2.kind === 9 /* NumericLiteral */) { @@ -157116,7 +159364,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return false; } function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 260 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); + return node2.parent.kind === 261 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); } function filterObjectMembersList(contextualMemberSymbols, existingMembers) { if (existingMembers.length === 0) { @@ -157125,7 +159373,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set(); const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 302 /* PropertyAssignment */ && m.kind !== 303 /* ShorthandPropertyAssignment */ && m.kind !== 207 /* BindingElement */ && m.kind !== 173 /* MethodDeclaration */ && m.kind !== 176 /* GetAccessor */ && m.kind !== 177 /* SetAccessor */ && m.kind !== 304 /* SpreadAssignment */) { + if (m.kind !== 303 /* PropertyAssignment */ && m.kind !== 304 /* ShorthandPropertyAssignment */ && m.kind !== 208 /* BindingElement */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */ && m.kind !== 305 /* SpreadAssignment */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -157203,7 +159451,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { const existingMemberNames = /* @__PURE__ */ new Set(); for (const m of existingMembers) { - if (m.kind !== 171 /* PropertyDeclaration */ && m.kind !== 173 /* MethodDeclaration */ && m.kind !== 176 /* GetAccessor */ && m.kind !== 177 /* SetAccessor */) { + if (m.kind !== 172 /* PropertyDeclaration */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */) { continue; } if (isCurrentlyEditingNode(m)) { @@ -157229,7 +159477,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isCurrentlyEditingNode(attr)) { continue; } - if (attr.kind === 290 /* JsxAttribute */) { + if (attr.kind === 291 /* JsxAttribute */) { seenNames.add(getEscapedTextOfJsxAttributeName(attr.name)); } else if (isJsxSpreadAttribute(attr)) { setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); @@ -157243,7 +159491,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return node2.getStart(sourceFile) <= position && position <= node2.getEnd(); } } - function tryGetObjectLikeCompletionContainer(contextToken) { + function tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile) { + var _a; if (contextToken) { const { parent: parent2 } = contextToken; switch (contextToken.kind) { @@ -157258,7 +159507,29 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 134 /* AsyncKeyword */: return tryCast(parent2.parent, isObjectLiteralExpression); case 80 /* Identifier */: - return contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent) ? contextToken.parent.parent : void 0; + if (contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent)) { + return contextToken.parent.parent; + } else { + if (isObjectLiteralExpression(contextToken.parent.parent) && (isSpreadAssignment(contextToken.parent) || isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line)) { + return contextToken.parent.parent; + } + const ancestorNode2 = findAncestor(parent2, isPropertyAssignment); + if ((ancestorNode2 == null ? void 0 : ancestorNode2.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression(ancestorNode2.parent)) { + return ancestorNode2.parent; + } + } + break; + default: + if (((_a = parent2.parent) == null ? void 0 : _a.parent) && (isMethodDeclaration(parent2.parent) || isGetAccessorDeclaration(parent2.parent) || isSetAccessorDeclaration(parent2.parent)) && isObjectLiteralExpression(parent2.parent.parent)) { + return parent2.parent.parent; + } + if (isSpreadAssignment(parent2) && isObjectLiteralExpression(parent2.parent)) { + return parent2.parent; + } + const ancestorNode = findAncestor(parent2, isPropertyAssignment); + if (contextToken.kind !== 59 /* ColonToken */ && (ancestorNode == null ? void 0 : ancestorNode.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression(ancestorNode.parent)) { + return ancestorNode.parent; + } } } return void 0; @@ -157353,11 +159624,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} switch (kind) { case 128 /* AbstractKeyword */: case 133 /* AnyKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 138 /* DeclareKeyword */: case 94 /* EnumKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: case 119 /* ImplementsKeyword */: case 140 /* InferKeyword */: case 120 /* InterfaceKeyword */: @@ -157368,7 +159639,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 146 /* NeverKeyword */: case 150 /* NumberKeyword */: case 151 /* ObjectKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: case 125 /* PublicKeyword */: @@ -157395,7 +159666,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 153 /* SetKeyword */: case 134 /* AsyncKeyword */: case 138 /* DeclareKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return true; default: return isClassMemberModifier(kind); @@ -157452,7 +159723,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { switch (location.kind) { - case 357 /* SyntaxList */: + case 358 /* SyntaxList */: return tryCast(location.parent, isObjectTypeDeclaration); case 1 /* EndOfFileToken */: const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration); @@ -157460,6 +159731,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return cls; } break; + case 81 /* PrivateIdentifier */: + if (tryCast(location.parent, isPropertyDeclaration)) { + return findAncestor(location, isClassLike); + } + break; case 80 /* Identifier */: { const originalKeywordKind = identifierToKeywordKind(location); if (originalKeywordKind) { @@ -157511,7 +159787,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 27 /* SemicolonToken */: case 28 /* CommaToken */: case 80 /* Identifier */: - if (parent2.kind === 170 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 171 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { return parent2.parent; } break; @@ -157528,11 +159804,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!t) return void 0; switch (node.kind) { - case 170 /* PropertySignature */: + case 171 /* PropertySignature */: return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 192 /* IntersectionType */: - case 186 /* TypeLiteral */: - case 191 /* UnionType */: + case 193 /* IntersectionType */: + case 187 /* TypeLiteral */: + case 192 /* UnionType */: return t; } } @@ -157555,7 +159831,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 311 /* SourceFile */; + return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 312 /* SourceFile */; default: return Debug.assertNever(triggerCharacter); } @@ -157616,7 +159892,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return void 0; } - function getImportStatementCompletionInfo(contextToken) { + function getImportStatementCompletionInfo(contextToken, sourceFile) { var _a, _b, _c; let keywordCompletion; let isKeywordOnlyCompletion = false; @@ -157632,6 +159908,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getCandidate() { const parent2 = contextToken.parent; if (isImportEqualsDeclaration(parent2)) { + const lastToken = parent2.getLastToken(sourceFile); + if (isIdentifier(contextToken) && lastToken !== contextToken) { + keywordCompletion = 161 /* FromKeyword */; + isKeywordOnlyCompletion = true; + return void 0; + } keywordCompletion = contextToken.kind === 156 /* TypeKeyword */ ? void 0 : 156 /* TypeKeyword */; return isModuleSpecifierMissingOrEmpty(parent2.moduleReference) ? parent2 : void 0; } @@ -157645,7 +159927,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (canCompleteFromNamedBindings(parent2)) { if (contextToken.kind === 20 /* CloseBraceToken */ || contextToken.kind === 80 /* Identifier */) { isKeywordOnlyCompletion = true; - keywordCompletion = 160 /* FromKeyword */; + keywordCompletion = 161 /* FromKeyword */; } else { return parent2.parent.parent; } @@ -157672,8 +159954,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); } - Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 275 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 271 /* ImportDeclaration */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference; + Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 276 /* ImportSpecifier */); + const potentialSplitPoint = top.kind === 272 /* ImportDeclaration */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference; const withoutModuleSpecifier = { pos: top.getFirstToken().getStart(), end: potentialSplitPoint.pos @@ -157801,6 +160083,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} CompletionSource2["TypeOnlyAlias"] = "TypeOnlyAlias/"; CompletionSource2["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/"; CompletionSource2["SwitchCases"] = "SwitchCases/"; + CompletionSource2["ObjectLiteralMemberWithComma"] = "ObjectLiteralMemberWithComma/"; return CompletionSource2; })(CompletionSource || {}); SymbolOriginInfoKind = /* @__PURE__ */ ((SymbolOriginInfoKind2) => { @@ -157830,7 +160113,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} _keywordCompletions = []; allKeywordsCompletions = memoize(() => { const res = []; - for (let i = 83 /* FirstKeyword */; i <= 164 /* LastKeyword */; i++) { + for (let i = 83 /* FirstKeyword */; i <= 165 /* LastKeyword */; i++) { res.push({ name: tokenToString(i), kind: "keyword" /* keyword */, @@ -158000,37 +160283,37 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getStringLiteralCompletionEntries(sourceFile, node, position, typeChecker, compilerOptions, host, preferences) { const parent2 = walkUpParentheses(node.parent); switch (parent2.kind) { - case 200 /* LiteralType */: { + case 201 /* LiteralType */: { const grandParent = walkUpParentheses(parent2.parent); - if (grandParent.kind === 204 /* ImportType */) { + if (grandParent.kind === 205 /* ImportType */) { return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; } return fromUnionableLiteralType(grandParent); } - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker, parent2.parent); } return fromContextualType() || fromContextualType(0 /* None */); - case 211 /* ElementAccessExpression */: { + case 212 /* ElementAccessExpression */: { const { expression, argumentExpression } = parent2; if (node === skipParentheses(argumentExpression)) { return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression)); } return void 0; } - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 290 /* JsxAttribute */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 291 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 290 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); - return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */); + const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 291 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); + return argumentInfo && (getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker, 0 /* Normal */)) || fromContextualType(0 /* None */); } - case 271 /* ImportDeclaration */: - case 277 /* ExportDeclaration */: - case 282 /* ExternalModuleReference */: + case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: + case 283 /* ExternalModuleReference */: return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - case 295 /* CaseClause */: + case 296 /* CaseClause */: const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses); const contextualTypes = fromContextualType(); if (!contextualTypes) { @@ -158043,21 +160326,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function fromUnionableLiteralType(grandParent) { switch (grandParent.kind) { - case 232 /* ExpressionWithTypeArguments */: - case 182 /* TypeReference */: { + case 233 /* ExpressionWithTypeArguments */: + case 183 /* TypeReference */: { const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); if (typeArgument) { return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; } return void 0; } - case 198 /* IndexedAccessType */: + case 199 /* IndexedAccessType */: const { indexType, objectType } = grandParent; if (!rangeContainsPosition(indexType, position)) { return void 0; } return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType)); - case 191 /* UnionType */: { + case 192 /* UnionType */: { const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent)); if (!result) { return void 0; @@ -158082,9 +160365,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function walkUpParentheses(node) { switch (node.kind) { - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return walkUpParenthesizedTypes(node); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return walkUpParenthesizedExpressions(node); default: return node; @@ -158093,12 +160376,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getAlreadyUsedTypesInStringLiteralUnion(union, current) { return mapDefined(union.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : void 0); } - function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) { + function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) { let isNewIdentifier = false; const uniques = /* @__PURE__ */ new Map(); const candidates = []; const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg; - checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates); + checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates, checkMode); const types = flatMap(candidates, (candidate) => { if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return; @@ -158198,7 +160481,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} extensionOptions, host, /*moduleSpecifierIsRelative*/ - false, + true, scriptPath ).values()); } @@ -158459,7 +160742,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const keys = getOwnKeys(exports); const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); - const conditions = mode === 99 /* ESNext */ ? ["node", "import", "types"] : ["node", "require", "types"]; + const conditions = getConditions(compilerOptions, mode === 99 /* ESNext */); addCompletionEntriesFromPathsOrExports( result, fragmentSubpath, @@ -158530,16 +160813,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0; const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory; const normalizedSuffix = normalizePath(parsed.suffix); + const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix); + const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix]; const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory)); const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase; - const includeGlob = normalizedSuffix ? "**/*" + normalizedSuffix : "./*"; + const includeGlobs = normalizedSuffix ? matchingSuffixes.map((suffix) => "**/*" + suffix) : ["./*"]; const matches = mapDefined(tryReadDirectory( host, baseDirectory, extensionOptions.extensionsToSearch, /*exclude*/ void 0, - [includeGlob] + includeGlobs ), (match) => { const trimmedWithPattern = trimPrefixAndSuffix(match); if (trimmedWithPattern) { @@ -158553,8 +160838,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const directories = normalizedSuffix ? emptyArray : mapDefined(tryGetDirectories(host, baseDirectory), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir)); return [...matches, ...directories]; function trimPrefixAndSuffix(path) { - const inner = withoutStartAndEnd(normalizePath(path), completePrefix, normalizedSuffix); - return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner); + return firstDefined(matchingSuffixes, (suffix) => { + const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix); + return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner); + }); } } function withoutStartAndEnd(s, start, end) { @@ -158778,14 +161065,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (cancellationToken) cancellationToken.throwIfCancellationRequested(); switch (direct.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (isImportCall(direct)) { handleImportCall(direct); break; } if (!isAvailableThroughGlobal) { const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 259 /* VariableDeclaration */) { + if (exportKind === 2 /* ExportEquals */ && parent2.kind === 260 /* VariableDeclaration */) { const { name } = parent2; if (name.kind === 80 /* Identifier */) { directImports.push(name); @@ -158796,7 +161083,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; case 80 /* Identifier */: break; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: handleNamespaceImport( direct, direct.name, @@ -158805,10 +161092,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} false ); break; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: directImports.push(direct); const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 273 /* NamespaceImport */) { + if (namedBindings && namedBindings.kind === 274 /* NamespaceImport */) { handleNamespaceImport( direct, namedBindings.name, @@ -158821,10 +161108,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); } break; - case 277 /* ExportDeclaration */: + case 278 /* ExportDeclaration */: if (!direct.exportClause) { handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 279 /* NamespaceExport */) { + } else if (direct.exportClause.kind === 280 /* NamespaceExport */) { addIndirectUser( getSourceFileLikeForImportDeclaration(direct), /*addTransitiveDependencies*/ @@ -158834,7 +161121,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} directImports.push(direct); } break; - case 204 /* ImportType */: + case 205 /* ImportType */: if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { addIndirectUser( direct.getSourceFile(), @@ -158875,7 +161162,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} directImports.push(importDeclaration); } else if (!isAvailableThroughGlobal) { const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 311 /* SourceFile */ || sourceFileLike.kind === 266 /* ModuleDeclaration */); + Debug.assert(sourceFileLike.kind === 312 /* SourceFile */ || sourceFileLike.kind === 267 /* ModuleDeclaration */); if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { addIndirectUser( sourceFileLike, @@ -158929,7 +161216,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return { importSearches, singleReferences }; function handleImport(decl) { - if (decl.kind === 270 /* ImportEqualsDeclaration */) { + if (decl.kind === 271 /* ImportEqualsDeclaration */) { if (isExternalModuleImportEquals(decl)) { handleNamespaceImportLike(decl.name); } @@ -158939,7 +161226,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} handleNamespaceImportLike(decl); return; } - if (decl.kind === 204 /* ImportType */) { + if (decl.kind === 205 /* ImportType */) { if (decl.qualifier) { const firstIdentifier = getFirstIdentifier(decl.qualifier); if (firstIdentifier.escapedText === symbolName(exportSymbol)) { @@ -158953,7 +161240,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (decl.moduleSpecifier.kind !== 11 /* StringLiteral */) { return; } - if (decl.kind === 277 /* ExportDeclaration */) { + if (decl.kind === 278 /* ExportDeclaration */) { if (decl.exportClause && isNamedExports(decl.exportClause)) { searchForNamedImport(decl.exportClause); } @@ -158962,10 +161249,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; if (namedBindings) { switch (namedBindings.kind) { - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: handleNamespaceImportLike(namedBindings.name); break; - case 274 /* NamedImports */: + case 275 /* NamedImports */: if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { searchForNamedImport(namedBindings); } @@ -158999,7 +161286,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addSearch(name, checker.getSymbolAtLocation(name)); } } else { - const localSymbol = element.kind === 280 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); + const localSymbol = element.kind === 281 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); addSearch(name, localSymbol); } } @@ -159023,7 +161310,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const checker = program.getTypeChecker(); for (const referencingFile of sourceFiles) { const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 311 /* SourceFile */) { + if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 312 /* SourceFile */) { for (const ref of referencingFile.referencedFiles) { if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { refs.push({ kind: "reference", referencingFile, ref }); @@ -159065,7 +161352,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return map2; } function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 311 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( + return forEach(sourceFileLike.kind === 312 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( // TODO: GH#18217 action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action) )); @@ -159078,15 +161365,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else { forEachPossibleImportOrExportStatement(sourceFile, (statement) => { switch (statement.kind) { - case 277 /* ExportDeclaration */: - case 271 /* ImportDeclaration */: { + case 278 /* ExportDeclaration */: + case 272 /* ImportDeclaration */: { const decl = statement; if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; } - case 270 /* ImportEqualsDeclaration */: { + case 271 /* ImportEqualsDeclaration */: { const decl = statement; if (isExternalModuleImportEquals(decl)) { action(decl, decl.moduleReference.expression); @@ -159104,7 +161391,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { parent: parent2 } = node; const grandparent = parent2.parent; if (symbol.exportSymbol) { - if (parent2.kind === 210 /* PropertyAccessExpression */) { + if (parent2.kind === 211 /* PropertyAccessExpression */) { return ((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport( grandparent, /*useLhsSymbol*/ @@ -159221,15 +161508,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isNodeImport(node) { const { parent: parent2 } = node; switch (parent2.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return parent2.name === node && isExternalModuleImportEquals(parent2); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return !parent2.propertyName; - case 272 /* ImportClause */: - case 273 /* NamespaceImport */: + case 273 /* ImportClause */: + case 274 /* NamespaceImport */: Debug.assert(parent2.name === node); return true; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); default: return false; @@ -159260,21 +161547,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); } function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 212 /* CallExpression */) { + if (node.kind === 213 /* CallExpression */) { return node.getSourceFile(); } const { parent: parent2 } = node; - if (parent2.kind === 311 /* SourceFile */) { + if (parent2.kind === 312 /* SourceFile */) { return parent2; } - Debug.assert(parent2.kind === 267 /* ModuleBlock */); + Debug.assert(parent2.kind === 268 /* ModuleBlock */); return cast(parent2.parent, isAmbientModuleDeclaration); } function isAmbientModuleDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */ && node.name.kind === 11 /* StringLiteral */; + return node.kind === 267 /* ModuleDeclaration */ && node.name.kind === 11 /* StringLiteral */; } function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 282 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 11 /* StringLiteral */; + return eq.moduleReference.kind === 283 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 11 /* StringLiteral */; } var ExportKind2, ImportExport; var init_importTracker = __esm({ @@ -159348,28 +161635,28 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!node) return void 0; switch (node.kind) { - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent; - case 207 /* BindingElement */: + case 208 /* BindingElement */: return getContextNode(node.parent.parent); - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: return node.parent.parent.parent; - case 280 /* ExportSpecifier */: - case 273 /* NamespaceImport */: + case 281 /* ExportSpecifier */: + case 274 /* NamespaceImport */: return node.parent.parent; - case 272 /* ImportClause */: - case 279 /* NamespaceExport */: + case 273 /* ImportClause */: + case 280 /* NamespaceExport */: return node.parent; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return isExpressionStatement(node.parent) ? node.parent : node; - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: return { start: node.initializer, end: node.expression }; - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( findAncestor( node.parent, @@ -159408,7 +161695,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const node = getTouchingPropertyName(sourceFile, position); let referenceEntries; const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 210 /* PropertyAccessExpression */ || node.parent.kind === 207 /* BindingElement */ || node.parent.kind === 211 /* ElementAccessExpression */ || node.kind === 108 /* SuperKeyword */) { + if (node.parent.kind === 211 /* PropertyAccessExpression */ || node.parent.kind === 208 /* BindingElement */ || node.parent.kind === 212 /* ElementAccessExpression */ || node.kind === 108 /* SuperKeyword */) { referenceEntries = entries && [...entries]; } else if (entries) { const queue = createQueue(entries); @@ -159429,11 +161716,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return void 0; } const checker = program.getTypeChecker(); - if (node.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { const result = []; Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); return result; @@ -159628,12 +161915,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); if (symbol) { return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 209 /* ObjectLiteralExpression */) { + } else if (node.kind === 210 /* ObjectLiteralExpression */) { return { kind: "interface" /* interfaceElement */, displayParts: [punctuationPart(21 /* OpenParenToken */), textPart("object literal"), punctuationPart(22 /* CloseParenToken */)] }; - } else if (node.kind === 230 /* ClassExpression */) { + } else if (node.kind === 231 /* ClassExpression */) { return { kind: "local class" /* localClassElement */, displayParts: [punctuationPart(21 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(22 /* CloseParenToken */)] @@ -159688,49 +161975,49 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return !!(source && ((_a = target.declarations) == null ? void 0 : _a.some((d) => d === source || d === commonjsSource))); } function declarationIsWriteAccess(decl) { - if (!!(decl.flags & 16777216 /* Ambient */)) + if (!!(decl.flags & 33554432 /* Ambient */)) return true; switch (decl.kind) { - case 225 /* BinaryExpression */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 226 /* BinaryExpression */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: case 90 /* DefaultKeyword */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 280 /* ExportSpecifier */: - case 272 /* ImportClause */: - case 270 /* ImportEqualsDeclaration */: - case 275 /* ImportSpecifier */: - case 263 /* InterfaceDeclaration */: - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: - case 290 /* JsxAttribute */: - case 266 /* ModuleDeclaration */: - case 269 /* NamespaceExportDeclaration */: - case 273 /* NamespaceImport */: - case 279 /* NamespaceExport */: - case 168 /* Parameter */: - case 303 /* ShorthandPropertyAssignment */: - case 264 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 281 /* ExportSpecifier */: + case 273 /* ImportClause */: + case 271 /* ImportEqualsDeclaration */: + case 276 /* ImportSpecifier */: + case 264 /* InterfaceDeclaration */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 291 /* JsxAttribute */: + case 267 /* ModuleDeclaration */: + case 270 /* NamespaceExportDeclaration */: + case 274 /* NamespaceImport */: + case 280 /* NamespaceExport */: + case 169 /* Parameter */: + case 304 /* ShorthandPropertyAssignment */: + case 265 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: return true; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 175 /* Constructor */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 176 /* Constructor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return !!decl.body; - case 259 /* VariableDeclaration */: - case 171 /* PropertyDeclaration */: + case 260 /* VariableDeclaration */: + case 172 /* PropertyDeclaration */: return !!decl.initializer || isCatchClause(decl.parent); - case 172 /* MethodSignature */: - case 170 /* PropertySignature */: - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: + case 173 /* MethodSignature */: + case 171 /* PropertySignature */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: return false; default: return Debug.failBadSyntaxKind(decl); @@ -159983,9 +162270,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (symbol.declarations) { for (const decl of symbol.declarations) { switch (decl.kind) { - case 311 /* SourceFile */: + case 312 /* SourceFile */: break; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { references.push(nodeEntry(decl.name)); } @@ -160109,7 +162396,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getSpecialSearchKind(node) { switch (node.kind) { - case 175 /* Constructor */: + case 176 /* Constructor */: case 137 /* ConstructorKeyword */: return 1 /* Constructor */; case 80 /* Identifier */: @@ -160318,7 +162605,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getSymbolScope(symbol) { const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 217 /* FunctionExpression */ || valueDeclaration.kind === 230 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 218 /* FunctionExpression */ || valueDeclaration.kind === 231 /* ClassExpression */)) { return valueDeclaration; } if (!declarations) { @@ -160327,7 +162614,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (flags & (4 /* Property */ | 8192 /* Method */)) { const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { - return getAncestor(privateDeclaration, 262 /* ClassDeclaration */); + return getAncestor(privateDeclaration, 263 /* ClassDeclaration */); } return void 0; } @@ -160344,7 +162631,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (scope && scope !== container) { return void 0; } - if (!container || container.kind === 311 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { + if (!container || container.kind === 312 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { return void 0; } scope = container; @@ -160422,7 +162709,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } Core2.someSignatureUsage = someSignatureUsage; function getPossibleSymbolReferenceNodes(sourceFile, symbolName2, container = sourceFile) { - return getPossibleSymbolReferencePositions(sourceFile, symbolName2, container).map((pos) => getTouchingPropertyName(sourceFile, pos)); + return mapDefined(getPossibleSymbolReferencePositions(sourceFile, symbolName2, container), (pos) => { + const referenceLocation = getTouchingPropertyName(sourceFile, pos); + return referenceLocation === sourceFile ? void 0 : referenceLocation; + }); } function getPossibleSymbolReferencePositions(sourceFile, symbolName2, container = sourceFile) { const positions = []; @@ -160691,14 +162981,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (constructorSymbol && constructorSymbol.declarations) { for (const decl of constructorSymbol.declarations) { const ctrKeyword = findChildOfKind(decl, 137 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 175 /* Constructor */ && !!ctrKeyword); + Debug.assert(decl.kind === 176 /* Constructor */ && !!ctrKeyword); addNode(ctrKeyword); } } if (classSymbol.exports) { classSymbol.exports.forEach((member) => { const decl = member.valueDeclaration; - if (decl && decl.kind === 173 /* MethodDeclaration */) { + if (decl && decl.kind === 174 /* MethodDeclaration */) { const body = decl.body; if (body) { forEachDescendantOfKind(body, 110 /* ThisKeyword */, (thisKeyword) => { @@ -160720,7 +163010,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 175 /* Constructor */); + Debug.assert(decl.kind === 176 /* Constructor */); const body = decl.body; if (body) { forEachDescendantOfKind(body, 108 /* SuperKeyword */, (node) => { @@ -160755,12 +163045,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (refNode.kind !== 80 /* Identifier */) { return; } - if (refNode.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (refNode.parent.kind === 304 /* ShorthandPropertyAssignment */) { getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); } - const containingClass = getContainingClassIfInHeritageClause(refNode); - if (containingClass) { - addReference2(containingClass); + const containingNode = getContainingNodeIfInHeritageClause(refNode); + if (containingNode) { + addReference2(containingNode); return; } const typeNode = findAncestor(refNode, (a) => !isQualifiedName(a.parent) && !isTypeNode(a.parent) && !isTypeElement(a.parent)); @@ -160770,7 +163060,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addIfImplementation(typeHavingNode.initializer); } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { const body = typeHavingNode.body; - if (body.kind === 240 /* Block */) { + if (body.kind === 241 /* Block */) { forEachReturnStatement(body, (returnStatement) => { if (returnStatement.expression) addIfImplementation(returnStatement.expression); @@ -160787,18 +163077,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addReference2(e); } } - function getContainingClassIfInHeritageClause(node) { - return isIdentifier(node) || isPropertyAccessExpression(node) ? getContainingClassIfInHeritageClause(node.parent) : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, isClassLike) : void 0; + function getContainingNodeIfInHeritageClause(node) { + return isIdentifier(node) || isPropertyAccessExpression(node) ? getContainingNodeIfInHeritageClause(node.parent) : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, or(isClassLike, isInterfaceDeclaration)) : void 0; } function isImplementationExpression(node) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return isImplementationExpression(node.expression); - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 208 /* ArrayLiteralExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 209 /* ArrayLiteralExpression */: return true; default: return false; @@ -160832,13 +163122,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; @@ -160860,7 +163150,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; } function isParameterName(node) { - return node.kind === 80 /* Identifier */ && node.parent.kind === 168 /* Parameter */ && node.parent.name === node; + return node.kind === 80 /* Identifier */ && node.parent.kind === 169 /* Parameter */ && node.parent.name === node; } function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { let searchSpaceNode = getThisContainer( @@ -160872,32 +163162,32 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); let staticFlag = 32 /* Static */; switch (searchSpaceNode.kind) { - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: if (isObjectLiteralMethod(searchSpaceNode)) { staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; } - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: staticFlag &= getSyntacticModifierFlags(searchSpaceNode); searchSpaceNode = searchSpaceNode.parent; break; - case 311 /* SourceFile */: + case 312 /* SourceFile */: if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { return void 0; } - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: break; default: return void 0; } - const references = flatMap(searchSpaceNode.kind === 311 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { + const references = flatMap(searchSpaceNode.kind === 312 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { cancellationToken.throwIfCancellationRequested(); return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { if (!isThis(node)) { @@ -160913,18 +163203,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!canHaveSymbol(container)) return false; switch (searchSpaceNode.kind) { - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return searchSpaceNode.symbol === container.symbol; - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 230 /* ClassExpression */: - case 262 /* ClassDeclaration */: - case 209 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 210 /* ObjectLiteralExpression */: return container.parent && canHaveSymbol(container.parent) && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 311 /* SourceFile */: - return container.kind === 311 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); + case 312 /* SourceFile */: + return container.kind === 312 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); } }); }).map((n) => nodeEntry(n)); @@ -161048,7 +163338,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} Debug.assert(paramProps.length === 2 && !!(paramProps[0].flags & 1 /* FunctionScopedVariable */) && !!(paramProps[1].flags & 4 /* Property */)); return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); } - const exportSpecifier = getDeclarationOfKind(symbol, 280 /* ExportSpecifier */); + const exportSpecifier = getDeclarationOfKind(symbol, 281 /* ExportSpecifier */); if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); if (localSymbol) { @@ -161089,7 +163379,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ) || (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */) && allowBaseTypes(rootSymbol) ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, (base) => cbSymbol(sym, rootSymbol, base, kind)) : void 0)); } function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol2, checker2) { - const bindingElement = getDeclarationOfKind(symbol2, 207 /* BindingElement */); + const bindingElement = getDeclarationOfKind(symbol2, 208 /* BindingElement */); if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { return getPropertySymbolFromBindingElement(checker2, bindingElement); } @@ -161155,7 +163445,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } Core2.getIntersectingMeaningFromDeclarations = getIntersectingMeaningFromDeclarations; function isImplementation(node) { - return !!(node.flags & 16777216 /* Ambient */) ? !(isInterfaceDeclaration(node) || isTypeAliasDeclaration(node)) : isVariableLike(node) ? hasInitializer(node) : isFunctionLikeDeclaration(node) ? !!node.body : isClassLike(node) || isModuleOrEnumDeclaration(node); + return !!(node.flags & 33554432 /* Ambient */) ? !(isInterfaceDeclaration(node) || isTypeAliasDeclaration(node)) : isVariableLike(node) ? hasInitializer(node) : isFunctionLikeDeclaration(node) ? !!node.body : isClassLike(node) || isModuleOrEnumDeclaration(node); } function getReferenceEntriesForShorthandPropertyAssignment(node, checker, addReference2) { const refSymbol = checker.getSymbolAtLocation(node); @@ -161214,6 +163504,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} getTextSpanOfEntry: () => getTextSpanOfEntry, isContextWithStartAndEndNode: () => isContextWithStartAndEndNode, isDeclarationOfSymbol: () => isDeclarationOfSymbol, + isWriteAccessForReference: () => isWriteAccessForReference, nodeEntry: () => nodeEntry, toContextSpan: () => toContextSpan, toHighlightSpan: () => toHighlightSpan, @@ -161242,7 +163533,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const { parent: parent2 } = node; const typeChecker = program.getTypeChecker(); - if (node.kind === 163 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { + if (node.kind === 164 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { return getDefinitionFromOverriddenMember(typeChecker, node) || emptyArray; } if (isJumpStatementTarget(node)) { @@ -161333,7 +163624,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return node.kind === 108 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; } } - if (node.parent.kind === 303 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { const shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo( decl, @@ -161434,6 +163725,55 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return void 0; } + function shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type) { + const referenceName = type.symbol.name; + if (!typesWithUnwrappedTypeArguments.has(referenceName)) { + return false; + } + const globalType = typeChecker.resolveName( + referenceName, + /*location*/ + void 0, + 788968 /* Type */, + /*excludeGlobals*/ + false + ); + return !!globalType && globalType === type.target.symbol; + } + function shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) { + if (!type.aliasSymbol) { + return false; + } + const referenceName = type.aliasSymbol.name; + if (!typesWithUnwrappedTypeArguments.has(referenceName)) { + return false; + } + const globalType = typeChecker.resolveName( + referenceName, + /*location*/ + void 0, + 788968 /* Type */, + /*excludeGlobals*/ + false + ); + return !!globalType && globalType === type.aliasSymbol; + } + function getFirstTypeArgumentDefinitions(typeChecker, type, node, failedAliasResolution) { + var _a, _b; + if (!!(getObjectFlags(type) & 4 /* Reference */) && shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type)) { + return definitionFromType(typeChecker.getTypeArguments(type)[0], typeChecker, node, failedAliasResolution); + } + if (shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) && type.aliasTypeArguments) { + return definitionFromType(type.aliasTypeArguments[0], typeChecker, node, failedAliasResolution); + } + if (getObjectFlags(type) & 32 /* Mapped */ && type.target && shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type.target)) { + const declaration = (_b = (_a = type.aliasSymbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b[0]; + if (declaration && isTypeAliasDeclaration(declaration) && isTypeReferenceNode(declaration.type) && declaration.type.typeArguments) { + return definitionFromType(typeChecker.getTypeAtLocation(declaration.type.typeArguments[0]), typeChecker, node, failedAliasResolution); + } + } + return []; + } function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) { const node = getTouchingPropertyName(sourceFile, position); if (node === sourceFile) { @@ -161459,8 +163799,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node); const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker); const fromReturnType = returnType && definitionFromType(returnType, typeChecker, node, failedAliasResolution); - const typeDefinitions = fromReturnType && fromReturnType.length !== 0 ? fromReturnType : definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution); - return typeDefinitions.length ? typeDefinitions : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0; + const [resolvedType, typeDefinitions] = fromReturnType && fromReturnType.length !== 0 ? [returnType, fromReturnType] : [typeAtLocation, definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution)]; + return typeDefinitions.length ? [...getFirstTypeArgumentDefinitions(typeChecker, resolvedType, node, failedAliasResolution), ...typeDefinitions] : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0; } function definitionFromType(type, checker, node, failedAliasResolution) { return flatMap(type.isUnion() && !(type.flags & 32 /* Enum */) ? type.types : [type], (t) => t.symbol && getDefinitionFromSymbol(checker, t.symbol, node, failedAliasResolution)); @@ -161510,7 +163850,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (node.parent === declaration) { return true; } - if (declaration.kind === 273 /* NamespaceImport */) { + if (declaration.kind === 274 /* NamespaceImport */) { return false; } return true; @@ -161600,7 +163940,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ts_FindAllReferences_exports.getContextNode(declaration) ), isLocal: !isDefinitionVisible(checker, declaration), - isAmbient: !!(declaration.flags & 16777216 /* Ambient */), + isAmbient: !!(declaration.flags & 33554432 /* Ambient */), unverified, failedAliasResolution }; @@ -161613,19 +163953,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) return isDefinitionVisible(checker, declaration.parent); switch (declaration.kind) { - case 171 /* PropertyDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 173 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: if (hasEffectiveModifier(declaration, 8 /* Private */)) return false; - case 175 /* Constructor */: - case 302 /* PropertyAssignment */: - case 303 /* ShorthandPropertyAssignment */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 218 /* ArrowFunction */: - case 217 /* FunctionExpression */: + case 176 /* Constructor */: + case 303 /* PropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: return isDefinitionVisible(checker, declaration.parent); default: return false; @@ -161669,18 +164009,40 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConstructorLike(node) { switch (node.kind) { - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: return true; default: return false; } } + var typesWithUnwrappedTypeArguments; var init_goToDefinition = __esm({ "src/services/goToDefinition.ts"() { "use strict"; init_ts4(); + typesWithUnwrappedTypeArguments = /* @__PURE__ */ new Set([ + "Array", + "ArrayLike", + "ReadonlyArray", + "Promise", + "PromiseLike", + "Iterable", + "IterableIterator", + "AsyncIterable", + "Set", + "WeakSet", + "ReadonlySet", + "Map", + "WeakMap", + "ReadonlyMap", + "Partial", + "Required", + "Readonly", + "Pick", + "Omit" + ]); } }); @@ -161708,6 +164070,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function shouldShowLiteralParameterNameHintsOnly(preferences) { return preferences.includeInlayParameterNameHints === "literals"; } + function shouldUseInteractiveInlayHints(preferences) { + return preferences.interactiveInlayHints === true; + } function provideInlayHints(context) { const { file, program, span, cancellationToken, preferences } = context; const sourceFileText = file.text; @@ -161721,14 +164086,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } switch (node.kind) { - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 218 /* ArrowFunction */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 219 /* ArrowFunction */: cancellationToken.throwIfCancellationRequested(); } if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { @@ -161758,17 +164123,26 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isSignatureSupportingReturnAnnotation(node) { return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node); } - function addParameterHints(text, position, isFirstVariadicArgument) { + function addParameterHints(text, parameter, position, isFirstVariadicArgument) { + let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`; + let displayParts; + if (shouldUseInteractiveInlayHints(preferences)) { + displayParts = [getNodeDisplayPart(hintText, parameter), { text: ":" }]; + hintText = ""; + } else { + hintText += ":"; + } result.push({ - text: `${isFirstVariadicArgument ? "..." : ""}${truncation(text, maxHintsLength)}:`, + text: hintText, position, kind: "Parameter" /* Parameter */, - whitespaceAfter: true + whitespaceAfter: true, + displayParts }); } function addTypeHints(text, position) { result.push({ - text: `: ${truncation(text, maxHintsLength)}`, + text: `: ${text.length > maxTypeHintLength ? text.substr(0, maxTypeHintLength - "...".length) + "..." : text}`, position, kind: "Type" /* Type */, whitespaceBefore: true @@ -161776,7 +164150,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function addEnumMemberValueHints(text, position) { result.push({ - text: `= ${truncation(text, maxHintsLength)}`, + text: `= ${text}`, position, kind: "Enum" /* Enum */, whitespaceBefore: true @@ -161825,15 +164199,31 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!signature || !candidates.length) { return; } - for (let i = 0; i < args.length; ++i) { - const originalArg = args[i]; + let signatureParamPos = 0; + for (const originalArg of args) { const arg = skipParentheses(originalArg); if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) { continue; } - const identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i); - if (identifierNameInfo) { - const [parameterName, isFirstVariadicArgument] = identifierNameInfo; + let spreadArgs = 0; + if (isSpreadElement(arg)) { + const spreadType = checker.getTypeAtLocation(arg.expression); + if (checker.isTupleType(spreadType)) { + const { elementFlags, fixedLength } = spreadType.target; + if (fixedLength === 0) { + continue; + } + const firstOptionalIndex = findIndex(elementFlags, (f) => !(f & 1 /* Required */)); + const requiredArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex; + if (requiredArgs > 0) { + spreadArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex; + } + } + } + const identifierInfo = checker.getParameterIdentifierInfoAtPosition(signature, signatureParamPos); + signatureParamPos = signatureParamPos + (spreadArgs || 1); + if (identifierInfo) { + const { parameter, parameterName, isRestParameter: isFirstVariadicArgument } = identifierInfo; const isParameterNameNotSameAsArgument = preferences.includeInlayParameterNameHintsWhenArgumentMatchesName || !identifierOrAccessExpressionPostfixMatchesParameterName(arg, parameterName); if (!isParameterNameNotSameAsArgument && !isFirstVariadicArgument) { continue; @@ -161842,7 +164232,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (leadingCommentsContainsParameterName(arg, name)) { continue; } - addParameterHints(name, originalArg.getStart(), isFirstVariadicArgument); + addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument); } } } @@ -161868,7 +164258,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isHintableLiteral(node) { switch (node.kind) { - case 223 /* PrefixUnaryExpression */: { + case 224 /* PrefixUnaryExpression */: { const operand = node.operand; return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); } @@ -161876,7 +164266,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: return true; case 80 /* Identifier */: { const name = node.escapedText; @@ -161948,12 +164338,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return printTypeInSingleLine(signatureParamType); } - function truncation(text, maxLength2) { - if (text.length > maxLength2) { - return text.substr(0, maxLength2 - "...".length) + "..."; - } - return text; - } function printTypeInSingleLine(type) { const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; const printer = createPrinterWithRemoveComments(); @@ -161984,13 +164368,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return true; } + function getNodeDisplayPart(text, node) { + const sourceFile = node.getSourceFile(); + return { + text, + span: createTextSpanFromNode(node, sourceFile), + file: sourceFile.fileName + }; + } } - var maxHintsLength, leadingParameterNameCommentRegexFactory; + var maxTypeHintLength, leadingParameterNameCommentRegexFactory; var init_inlayHints = __esm({ "src/services/inlayHints.ts"() { "use strict"; init_ts4(); - maxHintsLength = 30; + maxTypeHintLength = 30; leadingParameterNameCommentRegexFactory = (name) => { return new RegExp(`^\\s?/\\*\\*?\\s?${name}\\s?\\*\\/\\s?$`); }; @@ -162014,8 +164406,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const parts = []; forEachUnique(declarations, (declaration) => { for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 333 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 352 /* JSDocTypedefTag */ && declaration.kind !== 344 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 352 /* JSDocTypedefTag */ || t.kind === 344 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 347 /* JSDocParameterTag */ || t.kind === 348 /* JSDocReturnTag */)) { + const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 334 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); + if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 353 /* JSDocTypedefTag */ && declaration.kind !== 345 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 353 /* JSDocTypedefTag */ || t.kind === 345 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 348 /* JSDocParameterTag */ || t.kind === 349 /* JSDocReturnTag */)) { continue; } let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; @@ -162034,11 +164426,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getCommentHavingNodes(declaration) { switch (declaration.kind) { - case 347 /* JSDocParameterTag */: - case 354 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: + case 355 /* JSDocPropertyTag */: return [declaration]; - case 344 /* JSDocCallbackTag */: - case 352 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: return [declaration, declaration.parent]; default: return getJSDocCommentsAndTags(declaration); @@ -162048,7 +164440,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const infos = []; forEachUnique(declarations, (declaration) => { const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 352 /* JSDocTypedefTag */ || t.kind === 344 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 347 /* JSDocParameterTag */ || t.kind === 348 /* JSDocReturnTag */)) { + if (tags.some((t) => t.kind === 353 /* JSDocTypedefTag */ || t.kind === 345 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 348 /* JSDocParameterTag */ || t.kind === 349 /* JSDocReturnTag */)) { return; } for (const tag of tags) { @@ -162063,21 +164455,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return flatMap( comment, - (node) => node.kind === 327 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) + (node) => node.kind === 328 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) ); } function getCommentDisplayParts(tag, checker) { const { comment, kind } = tag; const namePart = getTagNameDisplayPart(kind); switch (kind) { - case 355 /* JSDocThrowsTag */: + case 356 /* JSDocThrowsTag */: const typeExpression = tag.typeExpression; return typeExpression ? withNode(typeExpression) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return withNode(tag.class); - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return withNode(tag.class); - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: const templateTag = tag; const displayParts = []; if (templateTag.constraint) { @@ -162099,14 +164491,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); } return displayParts; - case 350 /* JSDocTypeTag */: - case 356 /* JSDocSatisfiesTag */: + case 351 /* JSDocTypeTag */: + case 357 /* JSDocSatisfiesTag */: return withNode(tag.typeExpression); - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: - case 353 /* JSDocSeeTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: + case 354 /* JSDocSeeTag */: const { name } = tag; return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); default: @@ -162129,14 +164521,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getTagNameDisplayPart(kind) { switch (kind) { - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return parameterNamePart; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return propertyNamePart; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return typeParameterNamePart; - case 352 /* JSDocTypedefTag */: - case 344 /* JSDocCallbackTag */: + case 353 /* JSDocTypedefTag */: + case 345 /* JSDocCallbackTag */: return typeAliasNamePart; default: return textPart; @@ -162229,7 +164621,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const tags = (parameters ? parameterDocComments(parameters || [], isJavaScriptFile, indentationStr, newLine) : "") + (hasReturn2 ? returnsDocComment(indentationStr, newLine) : ""); const openComment = "/**"; const closeComment = " */"; - const hasTag = (commentOwnerJsDoc || []).some((jsDoc) => !!jsDoc.tags); + const hasTag = length(getJSDocTags(commentOwner)) > 0; if (tags && !hasTag) { const preamble = openComment + newLine + indentationStr + " * "; const endLine = tokenStart === position ? newLine + indentationStr : ""; @@ -162261,46 +164653,46 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getCommentOwnerInfoWorker(commentOwner, options) { switch (commentOwner.kind) { - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 172 /* MethodSignature */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 173 /* MethodSignature */: + case 219 /* ArrowFunction */: const host = commentOwner; return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 264 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 265 /* TypeAliasDeclaration */: return { commentOwner }; - case 170 /* PropertySignature */: { + case 171 /* PropertySignature */: { const host2 = commentOwner; return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; } - case 242 /* VariableStatement */: { + case 243 /* VariableStatement */: { const varStatement = commentOwner; const varDeclarations = varStatement.declarationList.declarations; const host2 = varDeclarations.length === 1 && varDeclarations[0].initializer ? getRightHandSideOfAssignment(varDeclarations[0].initializer) : void 0; return host2 ? { commentOwner, parameters: host2.parameters, hasReturn: hasReturn(host2, options) } : { commentOwner }; } - case 311 /* SourceFile */: + case 312 /* SourceFile */: return "quit"; - case 266 /* ModuleDeclaration */: - return commentOwner.parent.kind === 266 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 243 /* ExpressionStatement */: + case 267 /* ModuleDeclaration */: + return commentOwner.parent.kind === 267 /* ModuleDeclaration */ ? void 0 : { commentOwner }; + case 244 /* ExpressionStatement */: return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const be = commentOwner; if (getAssignmentDeclarationKind(be) === 0 /* None */) { return "quit"; } return isFunctionLike(be.right) ? { commentOwner, parameters: be.right.parameters, hasReturn: hasReturn(be.right, options) } : { commentOwner }; } - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: const init = commentOwner.initializer; if (init && (isFunctionExpression(init) || isArrowFunction(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; @@ -162311,14 +164703,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock(node.body) && !!forEachReturnStatement(node.body, (n) => n)); } function getRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 216 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 217 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return rightHandSide; - case 230 /* ClassExpression */: + case 231 /* ClassExpression */: return find(rightHandSide.members, isConstructorDeclaration); } } @@ -162472,7 +164864,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (length(oldImportDecls) === 0) { return; } - suppressLeadingTrivia(oldImportDecls[0]); + setEmitFlags(oldImportDecls[0], 1024 /* NoLeadingComments */); const oldImportGroups = shouldCombine ? group(oldImportDecls, (importDecl) => getExternalModuleName2(importDecl.moduleSpecifier)) : [oldImportDecls]; const sortedImportGroups = shouldSort ? stableSort(oldImportGroups, (group1, group2) => compareModuleSpecifiersWorker(group1[0].moduleSpecifier, group2[0].moduleSpecifier, comparer)) : oldImportGroups; const newImportDecls = flatMap(sortedImportGroups, (importGroup) => getExternalModuleName2(importGroup[0].moduleSpecifier) || importGroup[0].moduleSpecifier === void 0 ? coalesce(importGroup) : importGroup); @@ -162795,11 +165187,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getModuleSpecifierExpression(declaration) { var _a; switch (declaration.kind) { - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return (_a = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression; - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: return declaration.moduleSpecifier; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return declaration.declarationList.declarations[0].initializer.arguments[0]; } } @@ -162899,19 +165291,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getImportKindOrder(s1) { var _a; switch (s1.kind) { - case 271 /* ImportDeclaration */: + case 272 /* ImportDeclaration */: if (!s1.importClause) return 0; if (s1.importClause.isTypeOnly) return 1; - if (((_a = s1.importClause.namedBindings) == null ? void 0 : _a.kind) === 273 /* NamespaceImport */) + if (((_a = s1.importClause.namedBindings) == null ? void 0 : _a.kind) === 274 /* NamespaceImport */) return 2; if (s1.importClause.name) return 3; return 4; - case 270 /* ImportEqualsDeclaration */: + case 271 /* ImportEqualsDeclaration */: return 5; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: return 6; } } @@ -163219,21 +165611,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getOutliningSpanForNode(n, sourceFile) { switch (n.kind) { - case 240 /* Block */: + case 241 /* Block */: if (isFunctionLike(n.parent)) { return functionSpan(n.parent, n, sourceFile); } switch (n.parent.kind) { - case 245 /* DoStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 244 /* IfStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 298 /* CatchClause */: + case 246 /* DoStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 245 /* IfStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 299 /* CatchClause */: return spanForNode(n.parent); - case 257 /* TryStatement */: + case 258 /* TryStatement */: const tryStatement = n.parent; if (tryStatement.tryBlock === n) { return spanForNode(n.parent); @@ -163245,17 +165637,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} default: return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); } - case 267 /* ModuleBlock */: + case 268 /* ModuleBlock */: return spanForNode(n.parent); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 268 /* CaseBlock */: - case 186 /* TypeLiteral */: - case 205 /* ObjectBindingPattern */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 269 /* CaseBlock */: + case 187 /* TypeLiteral */: + case 206 /* ObjectBindingPattern */: return spanForNode(n); - case 188 /* TupleType */: + case 189 /* TupleType */: return spanForNode( n, /*autoCollapse*/ @@ -163264,24 +165656,24 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} !isTupleTypeNode(n.parent), 23 /* OpenBracketToken */ ); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return spanForNodeArray(n.statements); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return spanForObjectOrArrayLiteral(n); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return spanForObjectOrArrayLiteral(n, 23 /* OpenBracketToken */); - case 283 /* JsxElement */: + case 284 /* JsxElement */: return spanForJSXElement(n); - case 287 /* JsxFragment */: + case 288 /* JsxFragment */: return spanForJSXFragment(n); - case 284 /* JsxSelfClosingElement */: - case 285 /* JsxOpeningElement */: + case 285 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: return spanForJSXAttributes(n.attributes); - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: case 15 /* NoSubstitutionTemplateLiteral */: return spanForTemplateLiteral(n); - case 206 /* ArrayBindingPattern */: + case 207 /* ArrayBindingPattern */: return spanForNode( n, /*autoCollapse*/ @@ -163290,15 +165682,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} !isBindingElement(n.parent), 23 /* OpenBracketToken */ ); - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return spanForArrowFunction(n); - case 212 /* CallExpression */: + case 213 /* CallExpression */: return spanForCallExpression(n); - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return spanForParenthesizedExpression(n); - case 274 /* NamedImports */: - case 278 /* NamedExports */: - case 299 /* AssertClause */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: + case 300 /* AssertClause */: return spanForNamedImportsOrExportsOrAssertClause(n); } function spanForNamedImportsOrExportsOrAssertClause(node) { @@ -163419,7 +165811,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} node, sourceFile, /*autoCollapse*/ - node.kind !== 218 /* ArrowFunction */ + node.kind !== 219 /* ArrowFunction */ ); } function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { @@ -163501,7 +165893,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return getRenameInfoError(wouldRenameNodeModules); } const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 166 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; + const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; const displayName = specifierName || typeChecker.symbolToString(symbol); const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol); return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), node, sourceFile); @@ -163787,10 +166179,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 214 /* TaggedTemplateExpression */) { + } else if (isTemplateHead(node) && parent2.parent.kind === 215 /* TaggedTemplateExpression */) { const templateExpression = parent2; const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 227 /* TemplateExpression */); + Debug.assert(templateExpression.kind === 228 /* TemplateExpression */); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { @@ -163867,17 +166259,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getContextualSignatureLocationInfo(node, sourceFile, position, checker) { const { parent: parent2 } = node; switch (parent2.kind) { - case 216 /* ParenthesizedExpression */: - case 173 /* MethodDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 217 /* ParenthesizedExpression */: + case 174 /* MethodDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: const info = getArgumentOrParameterListInfo(node, position, sourceFile); if (!info) return void 0; const { argumentIndex, argumentCount, argumentsSpan } = info; const contextualType = isMethodDeclaration(parent2) ? checker.getContextualTypeForObjectLiteralElement(parent2) : checker.getContextualType(parent2); return contextualType && { contextualType, argumentIndex, argumentCount, argumentsSpan }; - case 225 /* BinaryExpression */: { + case 226 /* BinaryExpression */: { const highestBinary = getHighestBinary(parent2); const contextualType2 = checker.getContextualType(highestBinary); const argumentIndex2 = node.kind === 21 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; @@ -163951,7 +166343,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const template = taggedTemplate.template; const applicableSpanStart = template.getStart(); let applicableSpanEnd = template.getEnd(); - if (template.kind === 227 /* TemplateExpression */) { + if (template.kind === 228 /* TemplateExpression */) { const lastSpan = last(template.templateSpans); if (lastSpan.literal.getFullWidth() === 0) { applicableSpanEnd = skipTrivia( @@ -164264,7 +166656,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 148 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 58 /* QuestionToken */); const groupedWithBrackets = groupChildren( groupedWithPlusMinusTokens, - ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 167 /* TypeParameter */ || kind === 24 /* CloseBracketToken */ + ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 24 /* CloseBracketToken */ ); return [ openBraceToken, @@ -164275,7 +166667,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (isPropertySignature(node)) { const children = groupChildren(node.getChildren(), (child) => child === node.name || contains(node.modifiers, child)); - const firstJSDocChild = ((_a = children[0]) == null ? void 0 : _a.kind) === 326 /* JSDoc */ ? children[0] : void 0; + const firstJSDocChild = ((_a = children[0]) == null ? void 0 : _a.kind) === 327 /* JSDoc */ ? children[0] : void 0; const withJSDocSeparated = firstJSDocChild ? children.slice(1) : children; const splittedChildren = splitChildren(withJSDocSeparated, ({ kind }) => kind === 59 /* ColonToken */); return firstJSDocChild ? [firstJSDocChild, createSyntaxList2(splittedChildren)] : splittedChildren; @@ -164336,19 +166728,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isListOpener(token) { const kind = token && token.kind; - return kind === 19 /* OpenBraceToken */ || kind === 23 /* OpenBracketToken */ || kind === 21 /* OpenParenToken */ || kind === 285 /* JsxOpeningElement */; + return kind === 19 /* OpenBraceToken */ || kind === 23 /* OpenBracketToken */ || kind === 21 /* OpenParenToken */ || kind === 286 /* JsxOpeningElement */; } function isListCloser(token) { const kind = token && token.kind; - return kind === 20 /* CloseBraceToken */ || kind === 24 /* CloseBracketToken */ || kind === 22 /* CloseParenToken */ || kind === 286 /* JsxClosingElement */; + return kind === 20 /* CloseBraceToken */ || kind === 24 /* CloseBracketToken */ || kind === 22 /* CloseParenToken */ || kind === 287 /* JsxClosingElement */; } function getEndPos(sourceFile, node) { switch (node.kind) { - case 347 /* JSDocParameterTag */: - case 344 /* JSDocCallbackTag */: - case 354 /* JSDocPropertyTag */: - case 352 /* JSDocTypedefTag */: - case 349 /* JSDocThisTag */: + case 348 /* JSDocParameterTag */: + case 345 /* JSDocCallbackTag */: + case 355 /* JSDocPropertyTag */: + case 353 /* JSDocTypedefTag */: + case 350 /* JSDocThisTag */: return sourceFile.getLineEndOfPosition(node.getStart()); default: return node.getEnd(); @@ -164383,7 +166775,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const flags = getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 230 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; + return getDeclarationOfKind(symbol, 231 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; } if (flags & 384 /* Enum */) return "enum" /* enumElement */; @@ -164421,6 +166813,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return "parameter" /* parameterElement */; } else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration)) { return "const" /* constElement */; + } else if (symbol.valueDeclaration && isVarUsing(symbol.valueDeclaration)) { + return "using" /* variableUsingElement */; + } else if (symbol.valueDeclaration && isVarAwaitUsing(symbol.valueDeclaration)) { + return "await using" /* variableAwaitUsingElement */; } else if (forEach(symbol.declarations, isLet)) { return "let" /* letElement */; } @@ -164488,7 +166884,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return modifiers.size > 0 ? arrayFrom(modifiers.values()).join(",") : "" /* none */; } - function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias) { + function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, type, semanticMeaning, alias) { var _a; const displayParts = []; let documentation = []; @@ -164497,7 +166893,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let symbolKind = semanticMeaning & 1 /* Value */ ? getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) : "" /* unknown */; let hasAddedSymbolInfo = false; const isThisExpression = location.kind === 110 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location); - let type; let documentationFromAlias; let tagsFromAlias; let hasMultipleSignatures = false; @@ -164509,13 +166904,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location); if (declaration) { switch (declaration.kind) { - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: symbolKind = "getter" /* memberGetAccessorElement */; break; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: symbolKind = "setter" /* memberSetAccessorElement */; break; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: symbolKind = "accessor" /* memberAccessorVariableElement */; break; default: @@ -164526,8 +166921,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } let signature; - type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (location.parent && location.parent.kind === 210 /* PropertyAccessExpression */) { + type ?? (type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location)); + if (location.parent && location.parent.kind === 211 /* PropertyAccessExpression */) { const right = location.parent.name; if (right === location || right && right.getFullWidth() === 0) { location = location.parent; @@ -164543,7 +166938,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (callExpressionLike) { signature = typeChecker.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 213 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 108 /* SuperKeyword */; + const useConstructSignatures = callExpressionLike.kind === 214 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 108 /* SuperKeyword */; const allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (signature && !contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : void 0; @@ -164606,21 +167001,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} hasMultipleSignatures = allSignatures.length > 1; } } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || // name of function declaration - location.kind === 137 /* ConstructorKeyword */ && location.parent.kind === 175 /* Constructor */) { + location.kind === 137 /* ConstructorKeyword */ && location.parent.kind === 176 /* Constructor */) { const functionDeclaration = location.parent; const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 137 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 175 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); + const allSignatures = functionDeclaration.kind === 176 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 175 /* Constructor */) { + if (functionDeclaration.kind === 176 /* Constructor */) { symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 178 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -164632,7 +167027,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 230 /* ClassExpression */)) { + if (getDeclarationOfKind(symbol, 231 /* ClassExpression */)) { pushSymbolKind("local class" /* localClassElement */); } else { displayParts.push(keywordPart(86 /* ClassKeyword */)); @@ -164671,7 +167066,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (symbolFlags & 1536 /* Module */ && !isThisExpression) { prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 266 /* ModuleDeclaration */); + const declaration = getDeclarationOfKind(symbol, 267 /* ModuleDeclaration */); const isNamespace = declaration && declaration.name && declaration.name.kind === 80 /* Identifier */; displayParts.push(keywordPart(isNamespace ? 145 /* NamespaceKeyword */ : 144 /* ModuleKeyword */)); displayParts.push(spacePart()); @@ -164689,7 +167084,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addFullSymbolName(symbol.parent, enclosingDeclaration); writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); } else { - const decl = getDeclarationOfKind(symbol, 167 /* TypeParameter */); + const decl = getDeclarationOfKind(symbol, 168 /* TypeParameter */); if (decl === void 0) return Debug.fail(); const declaration = decl.parent; @@ -164697,10 +167092,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isFunctionLike(declaration)) { addInPrefix(); const signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 179 /* ConstructSignature */) { + if (declaration.kind === 180 /* ConstructSignature */) { displayParts.push(keywordPart(105 /* NewKeyword */)); displayParts.push(spacePart()); - } else if (declaration.kind !== 178 /* CallSignature */ && declaration.name) { + } else if (declaration.kind !== 179 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); @@ -164718,7 +167113,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} symbolKind = "enum member" /* enumMemberElement */; addPrefixForAnyFunctionOrVar(symbol, "enum member"); const declaration = (_a = symbol.declarations) == null ? void 0 : _a[0]; - if ((declaration == null ? void 0 : declaration.kind) === 305 /* EnumMember */) { + if ((declaration == null ? void 0 : declaration.kind) === 306 /* EnumMember */) { const constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== void 0) { displayParts.push(spacePart()); @@ -164741,12 +167136,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (declarationName && !hasAddedSymbolInfo) { const isExternalModuleDeclaration = isModuleWithStringLiteralName(resolvedNode) && hasSyntacticModifier(resolvedNode, 2 /* Ambient */); const shouldUseAliasName = symbol.name !== "default" && !isExternalModuleDeclaration; - const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKind( + const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKindWorker( typeChecker, resolvedSymbol, getSourceFileOfNode(resolvedNode), resolvedNode, declarationName, + type, semanticMeaning, shouldUseAliasName ? symbol : resolvedSymbol ); @@ -164762,17 +167158,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (symbol.declarations) { switch (symbol.declarations[0].kind) { - case 269 /* NamespaceExportDeclaration */: + case 270 /* NamespaceExportDeclaration */: displayParts.push(keywordPart(95 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(145 /* NamespaceKeyword */)); break; - case 276 /* ExportAssignment */: + case 277 /* ExportAssignment */: displayParts.push(keywordPart(95 /* ExportKeyword */)); displayParts.push(spacePart()); displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 64 /* EqualsToken */ : 90 /* DefaultKeyword */)); break; - case 280 /* ExportSpecifier */: + case 281 /* ExportSpecifier */: displayParts.push(keywordPart(95 /* ExportKeyword */)); break; default: @@ -164782,7 +167178,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} displayParts.push(spacePart()); addFullSymbolName(symbol); forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 270 /* ImportEqualsDeclaration */) { + if (declaration.kind === 271 /* ImportEqualsDeclaration */) { const importEqualsDeclaration = declaration; if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(spacePart()); @@ -164814,7 +167210,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else { addPrefixForAnyFunctionOrVar(symbol, symbolKind); } - if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || isThisExpression) { + if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || symbolKind === "using" /* variableUsingElement */ || symbolKind === "await using" /* variableAwaitUsingElement */ || isThisExpression) { displayParts.push(punctuationPart(59 /* ColonToken */)); displayParts.push(spacePart()); if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== "index" /* indexSignatureElement */) { @@ -164850,9 +167246,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker); } if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 311 /* SourceFile */)) { + if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 312 /* SourceFile */)) { for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 225 /* BinaryExpression */) { + if (!declaration.parent || declaration.parent.kind !== 226 /* BinaryExpression */) { continue; } const rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); @@ -164964,6 +167360,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case "let" /* letElement */: case "const" /* constElement */: case "constructor" /* constructorImplementationElement */: + case "using" /* variableUsingElement */: + case "await using" /* variableAwaitUsingElement */: displayParts.push(textOrKeywordPart(symbolKind2)); return; default: @@ -164999,19 +167397,32 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addRange(displayParts, typeParameterParts); } } + function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias) { + return getSymbolDisplayPartsDocumentationAndSymbolKindWorker( + typeChecker, + symbol, + sourceFile, + enclosingDeclaration, + location, + /*type*/ + void 0, + semanticMeaning, + alias + ); + } function isLocalVariableOrFunction(symbol) { if (symbol.parent) { return false; } return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 217 /* FunctionExpression */) { + if (declaration.kind === 218 /* FunctionExpression */) { return true; } - if (declaration.kind !== 259 /* VariableDeclaration */ && declaration.kind !== 261 /* FunctionDeclaration */) { + if (declaration.kind !== 260 /* VariableDeclaration */ && declaration.kind !== 262 /* FunctionDeclaration */) { return false; } for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 311 /* SourceFile */ || parent2.kind === 267 /* ModuleBlock */) { + if (parent2.kind === 312 /* SourceFile */ || parent2.kind === 268 /* ModuleBlock */) { return false; } } @@ -165185,16 +167596,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return newEnd !== end && (trailingTriviaOption === 2 /* Include */ || isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))) ? newEnd : end; } function isSeparator(node, candidate) { - return !!candidate && !!node.parent && (candidate.kind === 28 /* CommaToken */ || candidate.kind === 27 /* SemicolonToken */ && node.parent.kind === 209 /* ObjectLiteralExpression */); + return !!candidate && !!node.parent && (candidate.kind === 28 /* CommaToken */ || candidate.kind === 27 /* SemicolonToken */ && node.parent.kind === 210 /* ObjectLiteralExpression */); } function isThisTypeAnnotatable(containingFunction) { return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); } function updateJSDocHost(parent2) { - if (parent2.kind !== 218 /* ArrowFunction */) { + if (parent2.kind !== 219 /* ArrowFunction */) { return parent2; } - const jsDocNode = parent2.parent.kind === 171 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; + const jsDocNode = parent2.parent.kind === 172 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; jsDocNode.jsDoc = parent2.jsDoc; return jsDocNode; } @@ -165203,7 +167614,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } switch (oldTag.kind) { - case 347 /* JSDocParameterTag */: { + case 348 /* JSDocParameterTag */: { const oldParam = oldTag; const newParam = newTag; return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag( @@ -165217,14 +167628,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} oldParam.comment ) : void 0; } - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: return factory.createJSDocReturnTag( /*tagName*/ void 0, newTag.typeExpression, oldTag.comment ); - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return factory.createJSDocTypeTag( /*tagName*/ void 0, @@ -165585,7 +167996,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return !isInComment(sourceFile, position) && !isInString(sourceFile, position) && !isInTemplateString(sourceFile, position) && !isInJSXText(sourceFile, position); } function needSemicolonBetween(a, b) { - return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 166 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 167 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } function deleteNode(changes, sourceFile, node, options = { leadingTriviaOption: 1 /* IncludeAll */ }) { const startPosition = getAdjustedStartPosition(sourceFile, node, options); @@ -165629,7 +168040,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} leadingTriviaOption: 0 /* Exclude */, trailingTriviaOption: 0 /* Exclude */ }; - ChangeTracker = class { + ChangeTracker = class _ChangeTracker { /** Public for tests only. Other callers should use `ChangeTracker.with`. */ constructor(newLineCharacter, formatContext) { this.newLineCharacter = newLineCharacter; @@ -165640,10 +168051,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} this.deletedNodes = []; } static fromContext(context) { - return new ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext); + return new _ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext); } static with(context, cb) { - const tracker = ChangeTracker.fromContext(context); + const tracker = _ChangeTracker.fromContext(context); cb(tracker); return tracker.getChanges(); } @@ -165778,6 +168189,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} insertNodeBefore(sourceFile, before, newNode, blankLineBetween = false, options = {}) { this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween)); } + insertNodesBefore(sourceFile, before, newNodes, blankLineBetween = false, options = {}) { + this.insertNodesAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNodes, this.getOptionsForInsertNodeBefore(before, first(newNodes), blankLineBetween)); + } insertModifierAt(sourceFile, pos, modifier, options = {}) { this.insertNodeAt(sourceFile, pos, factory.createToken(modifier), options); } @@ -165850,7 +168264,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} endNode2 = first(node.parameters); } } else { - endNode2 = (node.kind === 259 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) ?? node.name; + endNode2 = (node.kind === 260 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) ?? node.name; } this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); return true; @@ -165998,18 +168412,18 @@ ${options.prefix}` : "\n" : options.prefix } getInsertNodeAfterOptionsWorker(node) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: case 11 /* StringLiteral */: case 80 /* Identifier */: return { prefix: ", " }; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return { suffix: "," + this.newLineCharacter }; case 95 /* ExportKeyword */: return { prefix: " " }; - case 168 /* Parameter */: + case 169 /* Parameter */: return {}; default: Debug.assert(isStatement(node) || isClassOrTypeElement(node)); @@ -166018,7 +168432,7 @@ ${options.prefix}` : "\n" : options.prefix } insertName(sourceFile, node, name) { Debug.assert(!node.name); - if (node.kind === 218 /* ArrowFunction */) { + if (node.kind === 219 /* ArrowFunction */) { const arrow = findChildOfKind(node, 39 /* EqualsGreaterThanToken */, sourceFile); const lparen = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile); if (lparen) { @@ -166028,12 +168442,12 @@ ${options.prefix}` : "\n" : options.prefix this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); this.replaceRange(sourceFile, arrow, factory.createToken(22 /* CloseParenToken */)); } - if (node.body.kind !== 240 /* Block */) { + if (node.body.kind !== 241 /* Block */) { this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(19 /* OpenBraceToken */), factory.createToken(107 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); this.insertNodesAt(sourceFile, node.body.end, [factory.createToken(27 /* SemicolonToken */), factory.createToken(20 /* CloseBraceToken */)], { joiner: " " }); } } else { - const pos = findChildOfKind(node, node.kind === 217 /* FunctionExpression */ ? 100 /* FunctionKeyword */ : 86 /* ClassKeyword */, sourceFile).end; + const pos = findChildOfKind(node, node.kind === 218 /* FunctionExpression */ ? 100 /* FunctionKeyword */ : 86 /* ClassKeyword */, sourceFile).end; this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); } } @@ -166268,7 +168682,7 @@ ${options.prefix}` : "\n" : options.prefix ((_deleteDeclaration) => { function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { switch (node.kind) { - case 168 /* Parameter */: { + case 169 /* Parameter */: { const oldFunction = node.parent; if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 21 /* OpenParenToken */, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); @@ -166277,29 +168691,29 @@ ${options.prefix}` : "\n" : options.prefix } break; } - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: const isFirstImport = sourceFile.imports.length && node === first(sourceFile.imports).parent || node === find(sourceFile.statements, isAnyImportSyntax); deleteNode(changes, sourceFile, node, { leadingTriviaOption: isFirstImport ? 0 /* Exclude */ : hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; - case 207 /* BindingElement */: + case 208 /* BindingElement */: const pattern = node.parent; - const preserveComma = pattern.kind === 206 /* ArrayBindingPattern */ && node !== last(pattern.elements); + const preserveComma = pattern.kind === 207 /* ArrayBindingPattern */ && node !== last(pattern.elements); if (preserveComma) { deleteNode(changes, sourceFile, node); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 259 /* VariableDeclaration */: + case 260 /* VariableDeclaration */: deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); break; - case 167 /* TypeParameter */: + case 168 /* TypeParameter */: deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); break; - case 275 /* ImportSpecifier */: + case 276 /* ImportSpecifier */: const namedImports = node.parent; if (namedImports.elements.length === 1) { deleteImportBinding(changes, sourceFile, namedImports); @@ -166307,7 +168721,7 @@ ${options.prefix}` : "\n" : options.prefix deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } break; - case 273 /* NamespaceImport */: + case 274 /* NamespaceImport */: deleteImportBinding(changes, sourceFile, node); break; case 27 /* SemicolonToken */: @@ -166316,8 +168730,8 @@ ${options.prefix}` : "\n" : options.prefix case 100 /* FunctionKeyword */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); break; - case 262 /* ClassDeclaration */: - case 261 /* FunctionDeclaration */: + case 263 /* ClassDeclaration */: + case 262 /* FunctionDeclaration */: deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -166359,13 +168773,13 @@ ${options.prefix}` : "\n" : options.prefix const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); } else { - const importDecl = getAncestor(node, 271 /* ImportDeclaration */); + const importDecl = getAncestor(node, 272 /* ImportDeclaration */); deleteNode(changes, sourceFile, importDecl); } } function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { const { parent: parent2 } = node; - if (parent2.kind === 298 /* CatchClause */) { + if (parent2.kind === 299 /* CatchClause */) { changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 21 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 22 /* CloseParenToken */, sourceFile)); return; } @@ -166375,14 +168789,14 @@ ${options.prefix}` : "\n" : options.prefix } const gp = parent2.parent; switch (gp.kind) { - case 249 /* ForOfStatement */: - case 248 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 249 /* ForInStatement */: changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); break; - case 247 /* ForStatement */: + case 248 /* ForStatement */: deleteNode(changes, sourceFile, parent2); break; - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); break; default: @@ -166565,10 +168979,10 @@ ${options.prefix}` : "\n" : options.prefix function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 290 /* JsxAttribute */: - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: - case 284 /* JsxSelfClosingElement */: + case 291 /* JsxAttribute */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: + case 285 /* JsxSelfClosingElement */: return isKeyword(node.kind) || node.kind === 80 /* Identifier */; } } @@ -166769,7 +169183,7 @@ ${options.prefix}` : "\n" : options.prefix // src/services/formatting/rules.ts function getAllRules() { const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 164 /* LastToken */; token++) { + for (let token = 0 /* FirstToken */; token <= 165 /* LastToken */; token++) { if (token !== 1 /* EndOfFileToken */) { allTokens.push(token); } @@ -166780,12 +169194,12 @@ ${options.prefix}` : "\n" : options.prefix const anyToken = { tokens: allTokens, isSpecific: false }; const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(83 /* FirstKeyword */, 164 /* LastKeyword */); + const keywords = tokenRangeFromRange(83 /* FirstKeyword */, 165 /* LastKeyword */); const binaryOperators = tokenRangeFromRange(30 /* FirstBinaryOperator */, 79 /* LastBinaryOperator */); const binaryKeywordOperators = [ 103 /* InKeyword */, 104 /* InstanceOfKeyword */, - 164 /* OfKeyword */, + 165 /* OfKeyword */, 130 /* AsKeyword */, 142 /* IsKeyword */, 152 /* SatisfiesKeyword */ @@ -166914,7 +169328,7 @@ ${options.prefix}` : "\n" : options.prefix 153 /* SetKeyword */, 126 /* StaticKeyword */, 156 /* TypeKeyword */, - 160 /* FromKeyword */, + 161 /* FromKeyword */, 143 /* KeyOfKeyword */, 140 /* InferKeyword */ ], @@ -166925,7 +169339,7 @@ ${options.prefix}` : "\n" : options.prefix rule( "SpaceBeforeCertainTypeScriptKeywords", anyToken, - [96 /* ExtendsKeyword */, 119 /* ImplementsKeyword */, 160 /* FromKeyword */], + [96 /* ExtendsKeyword */, 119 /* ImplementsKeyword */, 161 /* FromKeyword */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */ ), @@ -167115,40 +169529,40 @@ ${options.prefix}` : "\n" : options.prefix return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; } function isForContext(context) { - return context.contextNode.kind === 247 /* ForStatement */; + return context.contextNode.kind === 248 /* ForStatement */; } function isNotForContext(context) { return !isForContext(context); } function isBinaryOpContext(context) { switch (context.contextNode.kind) { - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: return context.contextNode.operatorToken.kind !== 28 /* CommaToken */; - case 226 /* ConditionalExpression */: - case 193 /* ConditionalType */: - case 233 /* AsExpression */: - case 280 /* ExportSpecifier */: - case 275 /* ImportSpecifier */: - case 181 /* TypePredicate */: - case 191 /* UnionType */: - case 192 /* IntersectionType */: - case 237 /* SatisfiesExpression */: + case 227 /* ConditionalExpression */: + case 194 /* ConditionalType */: + case 234 /* AsExpression */: + case 281 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 182 /* TypePredicate */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: + case 238 /* SatisfiesExpression */: return true; - case 207 /* BindingElement */: - case 264 /* TypeAliasDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 276 /* ExportAssignment */: - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 305 /* EnumMember */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: + case 208 /* BindingElement */: + case 265 /* TypeAliasDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 277 /* ExportAssignment */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 306 /* EnumMember */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: return context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */; - case 248 /* ForInStatement */: - case 167 /* TypeParameter */: + case 249 /* ForInStatement */: + case 168 /* TypeParameter */: return context.currentTokenSpan.kind === 103 /* InKeyword */ || context.nextTokenSpan.kind === 103 /* InKeyword */ || context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */; - case 249 /* ForOfStatement */: - return context.currentTokenSpan.kind === 164 /* OfKeyword */ || context.nextTokenSpan.kind === 164 /* OfKeyword */; + case 250 /* ForOfStatement */: + return context.currentTokenSpan.kind === 165 /* OfKeyword */ || context.nextTokenSpan.kind === 165 /* OfKeyword */; } return false; } @@ -167160,16 +169574,16 @@ ${options.prefix}` : "\n" : options.prefix } function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; - return contextKind === 171 /* PropertyDeclaration */ || contextKind === 170 /* PropertySignature */ || contextKind === 168 /* Parameter */ || contextKind === 259 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); + return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } function isConditionalOperatorContext(context) { - return context.contextNode.kind === 226 /* ConditionalExpression */ || context.contextNode.kind === 193 /* ConditionalType */; + return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */; } function isSameLineTokenOrBeforeBlockContext(context) { return context.TokensAreOnSameLine() || isBeforeBlockContext(context); } function isBraceWrappedContext(context) { - return context.contextNode.kind === 205 /* ObjectBindingPattern */ || context.contextNode.kind === 199 /* MappedType */ || isSingleLineBlockContext(context); + return context.contextNode.kind === 206 /* ObjectBindingPattern */ || context.contextNode.kind === 200 /* MappedType */ || isSingleLineBlockContext(context); } function isBeforeMultilineBlockContext(context) { return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); @@ -167191,26 +169605,26 @@ ${options.prefix}` : "\n" : options.prefix return true; } switch (node.kind) { - case 240 /* Block */: - case 268 /* CaseBlock */: - case 209 /* ObjectLiteralExpression */: - case 267 /* ModuleBlock */: + case 241 /* Block */: + case 269 /* CaseBlock */: + case 210 /* ObjectLiteralExpression */: + case 268 /* ModuleBlock */: return true; } return false; } function isFunctionDeclContext(context) { switch (context.contextNode.kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 178 /* CallSignature */: - case 217 /* FunctionExpression */: - case 175 /* Constructor */: - case 218 /* ArrowFunction */: - case 263 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 179 /* CallSignature */: + case 218 /* FunctionExpression */: + case 176 /* Constructor */: + case 219 /* ArrowFunction */: + case 264 /* InterfaceDeclaration */: return true; } return false; @@ -167219,39 +169633,39 @@ ${options.prefix}` : "\n" : options.prefix return !isFunctionDeclContext(context); } function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 261 /* FunctionDeclaration */ || context.contextNode.kind === 217 /* FunctionExpression */; + return context.contextNode.kind === 262 /* FunctionDeclaration */ || context.contextNode.kind === 218 /* FunctionExpression */; } function isTypeScriptDeclWithBlockContext(context) { return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); } function nodeIsTypeScriptDeclWithBlockContext(node) { switch (node.kind) { - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 186 /* TypeLiteral */: - case 266 /* ModuleDeclaration */: - case 277 /* ExportDeclaration */: - case 278 /* NamedExports */: - case 271 /* ImportDeclaration */: - case 274 /* NamedImports */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 187 /* TypeLiteral */: + case 267 /* ModuleDeclaration */: + case 278 /* ExportDeclaration */: + case 279 /* NamedExports */: + case 272 /* ImportDeclaration */: + case 275 /* NamedImports */: return true; } return false; } function isAfterCodeBlockContext(context) { switch (context.currentTokenParent.kind) { - case 262 /* ClassDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 298 /* CatchClause */: - case 267 /* ModuleBlock */: - case 254 /* SwitchStatement */: + case 263 /* ClassDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 299 /* CatchClause */: + case 268 /* ModuleBlock */: + case 255 /* SwitchStatement */: return true; - case 240 /* Block */: { + case 241 /* Block */: { const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 218 /* ArrowFunction */ && blockParent.kind !== 217 /* FunctionExpression */) { + if (!blockParent || blockParent.kind !== 219 /* ArrowFunction */ && blockParent.kind !== 218 /* FunctionExpression */) { return true; } } @@ -167260,29 +169674,29 @@ ${options.prefix}` : "\n" : options.prefix } function isControlDeclContext(context) { switch (context.contextNode.kind) { - case 244 /* IfStatement */: - case 254 /* SwitchStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 246 /* WhileStatement */: - case 257 /* TryStatement */: - case 245 /* DoStatement */: - case 253 /* WithStatement */: - case 298 /* CatchClause */: + case 245 /* IfStatement */: + case 255 /* SwitchStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 247 /* WhileStatement */: + case 258 /* TryStatement */: + case 246 /* DoStatement */: + case 254 /* WithStatement */: + case 299 /* CatchClause */: return true; default: return false; } } function isObjectContext(context) { - return context.contextNode.kind === 209 /* ObjectLiteralExpression */; + return context.contextNode.kind === 210 /* ObjectLiteralExpression */; } function isFunctionCallContext(context) { - return context.contextNode.kind === 212 /* CallExpression */; + return context.contextNode.kind === 213 /* CallExpression */; } function isNewContext(context) { - return context.contextNode.kind === 213 /* NewExpression */; + return context.contextNode.kind === 214 /* NewExpression */; } function isFunctionCallOrNewContext(context) { return isFunctionCallContext(context) || isNewContext(context); @@ -167297,10 +169711,10 @@ ${options.prefix}` : "\n" : options.prefix return context.nextTokenSpan.kind !== 22 /* CloseParenToken */; } function isArrowFunctionContext(context) { - return context.contextNode.kind === 218 /* ArrowFunction */; + return context.contextNode.kind === 219 /* ArrowFunction */; } function isImportTypeContext(context) { - return context.contextNode.kind === 204 /* ImportType */; + return context.contextNode.kind === 205 /* ImportType */; } function isNonJsxSameLineTokenContext(context) { return context.TokensAreOnSameLine() && context.contextNode.kind !== 12 /* JsxText */; @@ -167309,19 +169723,19 @@ ${options.prefix}` : "\n" : options.prefix return context.contextNode.kind !== 12 /* JsxText */; } function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 283 /* JsxElement */ && context.contextNode.kind !== 287 /* JsxFragment */; + return context.contextNode.kind !== 284 /* JsxElement */ && context.contextNode.kind !== 288 /* JsxFragment */; } function isJsxExpressionContext(context) { - return context.contextNode.kind === 293 /* JsxExpression */ || context.contextNode.kind === 292 /* JsxSpreadAttribute */; + return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 290 /* JsxAttribute */; + return context.nextTokenParent.kind === 291 /* JsxAttribute */; } function isJsxAttributeContext(context) { - return context.contextNode.kind === 290 /* JsxAttribute */; + return context.contextNode.kind === 291 /* JsxAttribute */; } function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 284 /* JsxSelfClosingElement */; + return context.contextNode.kind === 285 /* JsxSelfClosingElement */; } function isNotBeforeBlockInFunctionDeclarationContext(context) { return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); @@ -167333,44 +169747,44 @@ ${options.prefix}` : "\n" : options.prefix while (node && isExpression(node)) { node = node.parent; } - return node && node.kind === 169 /* Decorator */; + return node && node.kind === 170 /* Decorator */; } function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 260 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; + return context.currentTokenParent.kind === 261 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; } function isNotFormatOnEnter(context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; } function isModuleDeclContext(context) { - return context.contextNode.kind === 266 /* ModuleDeclaration */; + return context.contextNode.kind === 267 /* ModuleDeclaration */; } function isObjectTypeContext(context) { - return context.contextNode.kind === 186 /* TypeLiteral */; + return context.contextNode.kind === 187 /* TypeLiteral */; } function isConstructorSignatureContext(context) { - return context.contextNode.kind === 179 /* ConstructSignature */; + return context.contextNode.kind === 180 /* ConstructSignature */; } function isTypeArgumentOrParameterOrAssertion(token, parent2) { if (token.kind !== 30 /* LessThanToken */ && token.kind !== 32 /* GreaterThanToken */) { return false; } switch (parent2.kind) { - case 182 /* TypeReference */: - case 215 /* TypeAssertionExpression */: - case 264 /* TypeAliasDeclaration */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 232 /* ExpressionWithTypeArguments */: + case 183 /* TypeReference */: + case 216 /* TypeAssertionExpression */: + case 265 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 233 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -167380,31 +169794,31 @@ ${options.prefix}` : "\n" : options.prefix return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); } function isTypeAssertionContext(context) { - return context.contextNode.kind === 215 /* TypeAssertionExpression */; + return context.contextNode.kind === 216 /* TypeAssertionExpression */; } function isNonTypeAssertionContext(context) { return !isTypeAssertionContext(context); } function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 116 /* VoidKeyword */ && context.currentTokenParent.kind === 221 /* VoidExpression */; + return context.currentTokenSpan.kind === 116 /* VoidKeyword */ && context.currentTokenParent.kind === 222 /* VoidExpression */; } function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 228 /* YieldExpression */ && context.contextNode.expression !== void 0; + return context.contextNode.kind === 229 /* YieldExpression */ && context.contextNode.expression !== void 0; } function isNonNullAssertionContext(context) { - return context.contextNode.kind === 234 /* NonNullExpression */; + return context.contextNode.kind === 235 /* NonNullExpression */; } function isNotStatementConditionContext(context) { return !isStatementConditionContext(context); } function isStatementConditionContext(context) { switch (context.contextNode.kind) { - case 244 /* IfStatement */: - case 247 /* ForStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 245 /* DoStatement */: - case 246 /* WhileStatement */: + case 245 /* IfStatement */: + case 248 /* ForStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 246 /* DoStatement */: + case 247 /* WhileStatement */: return true; default: return false; @@ -167430,16 +169844,16 @@ ${options.prefix}` : "\n" : options.prefix if (startLine === endLine) { return nextTokenKind === 20 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; } - if (nextTokenKind === 239 /* SemicolonClassElement */ || nextTokenKind === 27 /* SemicolonToken */) { + if (nextTokenKind === 240 /* SemicolonClassElement */ || nextTokenKind === 27 /* SemicolonToken */) { return false; } - if (context.contextNode.kind === 263 /* InterfaceDeclaration */ || context.contextNode.kind === 264 /* TypeAliasDeclaration */) { + if (context.contextNode.kind === 264 /* InterfaceDeclaration */ || context.contextNode.kind === 265 /* TypeAliasDeclaration */) { return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 21 /* OpenParenToken */; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; } - return context.currentTokenParent.kind !== 247 /* ForStatement */ && context.currentTokenParent.kind !== 241 /* EmptyStatement */ && context.currentTokenParent.kind !== 239 /* SemicolonClassElement */ && nextTokenKind !== 23 /* OpenBracketToken */ && nextTokenKind !== 21 /* OpenParenToken */ && nextTokenKind !== 40 /* PlusToken */ && nextTokenKind !== 41 /* MinusToken */ && nextTokenKind !== 44 /* SlashToken */ && nextTokenKind !== 14 /* RegularExpressionLiteral */ && nextTokenKind !== 28 /* CommaToken */ && nextTokenKind !== 227 /* TemplateExpression */ && nextTokenKind !== 16 /* TemplateHead */ && nextTokenKind !== 15 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 25 /* DotToken */; + return context.currentTokenParent.kind !== 248 /* ForStatement */ && context.currentTokenParent.kind !== 242 /* EmptyStatement */ && context.currentTokenParent.kind !== 240 /* SemicolonClassElement */ && nextTokenKind !== 23 /* OpenBracketToken */ && nextTokenKind !== 21 /* OpenParenToken */ && nextTokenKind !== 40 /* PlusToken */ && nextTokenKind !== 41 /* MinusToken */ && nextTokenKind !== 44 /* SlashToken */ && nextTokenKind !== 14 /* RegularExpressionLiteral */ && nextTokenKind !== 28 /* CommaToken */ && nextTokenKind !== 228 /* TemplateExpression */ && nextTokenKind !== 16 /* TemplateHead */ && nextTokenKind !== 15 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 25 /* DotToken */; } function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); @@ -167520,7 +169934,7 @@ ${options.prefix}` : "\n" : options.prefix return map2; } function getRuleBucketIndex(row, column) { - Debug.assert(row <= 164 /* LastKeyword */ && column <= 164 /* LastKeyword */, "Must compute formatting context from tokens"); + Debug.assert(row <= 165 /* LastKeyword */ && column <= 165 /* LastKeyword */, "Must compute formatting context from tokens"); return row * mapRowLength + column; } function addRule(rules, rule2, specificTokens, constructionState, rulesBucketIndex) { @@ -167550,7 +169964,7 @@ ${options.prefix}` : "\n" : options.prefix init_ts_formatting(); maskBitSize = 5; mask = 31; - mapRowLength = 164 /* LastToken */ + 1; + mapRowLength = 165 /* LastToken */ + 1; RulesPosition = ((RulesPosition2) => { RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; @@ -167642,17 +170056,17 @@ ${options.prefix}` : "\n" : options.prefix } function isListElement(parent2, node) { switch (parent2.kind) { - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: return rangeContainsRange(parent2.members, node); - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: const body = parent2.body; - return !!body && body.kind === 267 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 311 /* SourceFile */: - case 240 /* Block */: - case 267 /* ModuleBlock */: + return !!body && body.kind === 268 /* ModuleBlock */ && rangeContainsRange(body.statements, node); + case 312 /* SourceFile */: + case 241 /* Block */: + case 268 /* ModuleBlock */: return rangeContainsRange(parent2.statements, node); - case 298 /* CatchClause */: + case 299 /* CatchClause */: return rangeContainsRange(parent2.block.statements, node); } return false; @@ -167684,11 +170098,11 @@ ${options.prefix}` : "\n" : options.prefix if (index >= sorted.length) { return false; } - const error = sorted[index]; - if (r.end <= error.start) { + const error2 = sorted[index]; + if (r.end <= error2.start) { return false; } - if (startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { + if (startEndOverlapsWithStartEnd(r.pos, r.end, error2.start, error2.start + error2.length)) { return true; } index++; @@ -167793,7 +170207,8 @@ ${options.prefix}` : "\n" : options.prefix } processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta); } - if (!formattingScanner.isOnToken()) { + const remainingTrivia = formattingScanner.getCurrentLeadingTrivia(); + if (remainingTrivia) { const indentation = SmartIndenter.nodeWillIndentChild( options, enclosingNode, @@ -167803,25 +170218,30 @@ ${options.prefix}` : "\n" : options.prefix /*indentByDefault*/ false ) ? initialIndentation + options.indentSize : initialIndentation; - const leadingTrivia = formattingScanner.getCurrentLeadingTrivia(); - if (leadingTrivia) { - indentTriviaItems( - leadingTrivia, - indentation, - /*indentNextTokenOrTrivia*/ - false, - (item) => processRange( + indentTriviaItems( + remainingTrivia, + indentation, + /*indentNextTokenOrTrivia*/ + true, + (item) => { + processRange( item, sourceFile.getLineAndCharacterOfPosition(item.pos), enclosingNode, enclosingNode, /*dynamicIndentation*/ void 0 - ) - ); - if (options.trimTrailingWhitespace !== false) { - trimTrailingWhitespacesForRemainingRange(leadingTrivia); + ); + insertIndentation( + item.pos, + indentation, + /*lineAdded*/ + false + ); } + ); + if (options.trimTrailingWhitespace !== false) { + trimTrailingWhitespacesForRemainingRange(remainingTrivia); } } if (previousRange && formattingScanner.getTokenFullStart() >= originalRange.end) { @@ -167884,24 +170304,24 @@ ${options.prefix}` : "\n" : options.prefix return modifier.kind; } switch (node.kind) { - case 262 /* ClassDeclaration */: + case 263 /* ClassDeclaration */: return 86 /* ClassKeyword */; - case 263 /* InterfaceDeclaration */: + case 264 /* InterfaceDeclaration */: return 120 /* InterfaceKeyword */; - case 261 /* FunctionDeclaration */: + case 262 /* FunctionDeclaration */: return 100 /* FunctionKeyword */; - case 265 /* EnumDeclaration */: - return 265 /* EnumDeclaration */; - case 176 /* GetAccessor */: + case 266 /* EnumDeclaration */: + return 266 /* EnumDeclaration */; + case 177 /* GetAccessor */: return 139 /* GetKeyword */; - case 177 /* SetAccessor */: + case 178 /* SetAccessor */: return 153 /* SetKeyword */; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: if (node.asteriskToken) { return 42 /* AsteriskToken */; } - case 171 /* PropertyDeclaration */: - case 168 /* Parameter */: + case 172 /* PropertyDeclaration */: + case 169 /* Parameter */: const name = getNameOfDeclaration(node); if (name) { return name.kind; @@ -167951,15 +170371,15 @@ ${options.prefix}` : "\n" : options.prefix case 44 /* SlashToken */: case 32 /* GreaterThanToken */: switch (container.kind) { - case 285 /* JsxOpeningElement */: - case 286 /* JsxClosingElement */: - case 284 /* JsxSelfClosingElement */: + case 286 /* JsxOpeningElement */: + case 287 /* JsxClosingElement */: + case 285 /* JsxSelfClosingElement */: return false; } break; case 23 /* OpenBracketToken */: case 24 /* CloseBracketToken */: - if (container.kind !== 199 /* MappedType */) { + if (container.kind !== 200 /* MappedType */) { return false; } break; @@ -168060,11 +170480,11 @@ ${options.prefix}` : "\n" : options.prefix return inheritedIndentation; } } - const effectiveParentStartLine = child.kind === 169 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + const effectiveParentStartLine = child.kind === 170 /* Decorator */ ? childStartLine : undecoratedParentStartLine; const childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; - if (isFirstListItem && parent2.kind === 208 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + if (isFirstListItem && parent2.kind === 209 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { inheritedIndentation = childIndentation.indentation; } return inheritedIndentation; @@ -168485,50 +170905,50 @@ ${options.prefix}` : "\n" : options.prefix } function getOpenTokenForList(node, list) { switch (node.kind) { - case 175 /* Constructor */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 218 /* ArrowFunction */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 176 /* Constructor */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 219 /* ArrowFunction */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: if (node.typeParameters === list) { return 30 /* LessThanToken */; } else if (node.parameters === list) { return 21 /* OpenParenToken */; } break; - case 212 /* CallExpression */: - case 213 /* NewExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: if (node.typeArguments === list) { return 30 /* LessThanToken */; } else if (node.arguments === list) { return 21 /* OpenParenToken */; } break; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: if (node.typeParameters === list) { return 30 /* LessThanToken */; } break; - case 182 /* TypeReference */: - case 214 /* TaggedTemplateExpression */: - case 185 /* TypeQuery */: - case 232 /* ExpressionWithTypeArguments */: - case 204 /* ImportType */: + case 183 /* TypeReference */: + case 215 /* TaggedTemplateExpression */: + case 186 /* TypeQuery */: + case 233 /* ExpressionWithTypeArguments */: + case 205 /* ImportType */: if (node.typeArguments === list) { return 30 /* LessThanToken */; } break; - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return 19 /* OpenBraceToken */; } return 0 /* Unknown */; @@ -168628,11 +171048,11 @@ ${options.prefix}` : "\n" : options.prefix } const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 19 /* OpenBraceToken */ && currentToken.parent.kind === 209 /* ObjectLiteralExpression */; + const isObjectLiteral = currentToken.kind === 19 /* OpenBraceToken */ && currentToken.parent.kind === 210 /* ObjectLiteralExpression */; if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { return getBlockIndent(sourceFile, position, options); } - if (precedingToken.kind === 28 /* CommaToken */ && precedingToken.parent.kind !== 225 /* BinaryExpression */) { + if (precedingToken.kind === 28 /* CommaToken */ && precedingToken.parent.kind !== 226 /* BinaryExpression */) { const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { return actualIndentation; @@ -168640,7 +171060,7 @@ ${options.prefix}` : "\n" : options.prefix } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [217 /* FunctionExpression */, 218 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -168782,7 +171202,7 @@ ${options.prefix}` : "\n" : options.prefix } } function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 311 /* SourceFile */ || !parentAndChildShareLine); + const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 312 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -168820,7 +171240,7 @@ ${options.prefix}` : "\n" : options.prefix } SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 244 /* IfStatement */ && parent2.elseStatement === child) { + if (parent2.kind === 245 /* IfStatement */ && parent2.elseStatement === child) { const elseKeyword = findChildOfKind(parent2, 93 /* ElseKeyword */, sourceFile); Debug.assert(elseKeyword !== void 0); const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -168871,42 +171291,42 @@ ${options.prefix}` : "\n" : options.prefix } function getListByRange(start, end, node, sourceFile) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return getList(node.typeArguments); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return getList(node.properties); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return getList(node.elements); - case 186 /* TypeLiteral */: + case 187 /* TypeLiteral */: return getList(node.members); - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: return getList(node.typeParameters) || getList(node.parameters); - case 176 /* GetAccessor */: + case 177 /* GetAccessor */: return getList(node.parameters); - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 351 /* JSDocTemplateTag */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 352 /* JSDocTemplateTag */: return getList(node.typeParameters); - case 213 /* NewExpression */: - case 212 /* CallExpression */: + case 214 /* NewExpression */: + case 213 /* CallExpression */: return getList(node.typeArguments) || getList(node.arguments); - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return getList(node.declarations); - case 274 /* NamedImports */: - case 278 /* NamedExports */: + case 275 /* NamedImports */: + case 279 /* NamedExports */: return getList(node.elements); - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return getList(node.elements); } function getList(list) { @@ -168929,7 +171349,7 @@ ${options.prefix}` : "\n" : options.prefix return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); } function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 260 /* VariableDeclarationList */) { + if (node.parent && node.parent.kind === 261 /* VariableDeclarationList */) { return -1 /* Unknown */; } const containingList = getContainingList(node, sourceFile); @@ -168990,96 +171410,96 @@ ${options.prefix}` : "\n" : options.prefix function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { const childKind = child ? child.kind : 0 /* Unknown */; switch (parent2.kind) { - case 243 /* ExpressionStatement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: - case 208 /* ArrayLiteralExpression */: - case 240 /* Block */: - case 267 /* ModuleBlock */: - case 209 /* ObjectLiteralExpression */: - case 186 /* TypeLiteral */: - case 199 /* MappedType */: - case 188 /* TupleType */: - case 216 /* ParenthesizedExpression */: - case 210 /* PropertyAccessExpression */: - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 242 /* VariableStatement */: - case 276 /* ExportAssignment */: - case 252 /* ReturnStatement */: - case 226 /* ConditionalExpression */: - case 206 /* ArrayBindingPattern */: - case 205 /* ObjectBindingPattern */: - case 285 /* JsxOpeningElement */: - case 288 /* JsxOpeningFragment */: - case 284 /* JsxSelfClosingElement */: - case 293 /* JsxExpression */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 168 /* Parameter */: - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 195 /* ParenthesizedType */: - case 214 /* TaggedTemplateExpression */: - case 222 /* AwaitExpression */: - case 278 /* NamedExports */: - case 274 /* NamedImports */: - case 280 /* ExportSpecifier */: - case 275 /* ImportSpecifier */: - case 171 /* PropertyDeclaration */: - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 244 /* ExpressionStatement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: + case 209 /* ArrayLiteralExpression */: + case 241 /* Block */: + case 268 /* ModuleBlock */: + case 210 /* ObjectLiteralExpression */: + case 187 /* TypeLiteral */: + case 200 /* MappedType */: + case 189 /* TupleType */: + case 217 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 243 /* VariableStatement */: + case 277 /* ExportAssignment */: + case 253 /* ReturnStatement */: + case 227 /* ConditionalExpression */: + case 207 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 286 /* JsxOpeningElement */: + case 289 /* JsxOpeningFragment */: + case 285 /* JsxSelfClosingElement */: + case 294 /* JsxExpression */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 169 /* Parameter */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 196 /* ParenthesizedType */: + case 215 /* TaggedTemplateExpression */: + case 223 /* AwaitExpression */: + case 279 /* NamedExports */: + case 275 /* NamedImports */: + case 281 /* ExportSpecifier */: + case 276 /* ImportSpecifier */: + case 172 /* PropertyDeclaration */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return true; - case 268 /* CaseBlock */: + case 269 /* CaseBlock */: return settings.indentSwitchCase ?? true; - case 259 /* VariableDeclaration */: - case 302 /* PropertyAssignment */: - case 225 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 209 /* ObjectLiteralExpression */) { + case 260 /* VariableDeclaration */: + case 303 /* PropertyAssignment */: + case 226 /* BinaryExpression */: + if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 210 /* ObjectLiteralExpression */) { return rangeIsOnOneLine(sourceFile, child); } - if (parent2.kind === 225 /* BinaryExpression */ && sourceFile && child && childKind === 283 /* JsxElement */) { + if (parent2.kind === 226 /* BinaryExpression */ && sourceFile && child && childKind === 284 /* JsxElement */) { const parentStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, parent2.pos)).line; const childStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, child.pos)).line; return parentStartLine !== childStartLine; } - if (parent2.kind !== 225 /* BinaryExpression */) { + if (parent2.kind !== 226 /* BinaryExpression */) { return true; } break; - case 245 /* DoStatement */: - case 246 /* WhileStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 244 /* IfStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - return childKind !== 240 /* Block */; - case 218 /* ArrowFunction */: - if (sourceFile && childKind === 216 /* ParenthesizedExpression */) { + case 246 /* DoStatement */: + case 247 /* WhileStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 245 /* IfStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + return childKind !== 241 /* Block */; + case 219 /* ArrowFunction */: + if (sourceFile && childKind === 217 /* ParenthesizedExpression */) { return rangeIsOnOneLine(sourceFile, child); } - return childKind !== 240 /* Block */; - case 277 /* ExportDeclaration */: - return childKind !== 278 /* NamedExports */; - case 271 /* ImportDeclaration */: - return childKind !== 272 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 274 /* NamedImports */; - case 283 /* JsxElement */: - return childKind !== 286 /* JsxClosingElement */; - case 287 /* JsxFragment */: - return childKind !== 289 /* JsxClosingFragment */; - case 192 /* IntersectionType */: - case 191 /* UnionType */: - if (childKind === 186 /* TypeLiteral */ || childKind === 188 /* TupleType */) { + return childKind !== 241 /* Block */; + case 278 /* ExportDeclaration */: + return childKind !== 279 /* NamedExports */; + case 272 /* ImportDeclaration */: + return childKind !== 273 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 275 /* NamedImports */; + case 284 /* JsxElement */: + return childKind !== 287 /* JsxClosingElement */; + case 288 /* JsxFragment */: + return childKind !== 290 /* JsxClosingFragment */; + case 193 /* IntersectionType */: + case 192 /* UnionType */: + if (childKind === 187 /* TypeLiteral */ || childKind === 189 /* TupleType */) { return false; } break; @@ -169089,11 +171509,11 @@ ${options.prefix}` : "\n" : options.prefix SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; function isControlFlowEndingStatement(kind, parent2) { switch (kind) { - case 252 /* ReturnStatement */: - case 256 /* ThrowStatement */: - case 250 /* ContinueStatement */: - case 251 /* BreakStatement */: - return parent2.kind !== 240 /* Block */; + case 253 /* ReturnStatement */: + case 257 /* ThrowStatement */: + case 251 /* ContinueStatement */: + case 252 /* BreakStatement */: + return parent2.kind !== 241 /* Block */; default: return false; } @@ -169203,11 +171623,11 @@ ${options.prefix}` : "\n" : options.prefix function getTypeScriptVersion() { return typeScriptVersion2 ?? (typeScriptVersion2 = new Version(version)); } - function formatDeprecationMessage(name, error, errorAfter, since, message) { - let deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: "; + function formatDeprecationMessage(name, error2, errorAfter, since, message) { + let deprecationMessage = error2 ? "DeprecationError: " : "DeprecationWarning: "; deprecationMessage += `'${name}' `; deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated"; - deprecationMessage += error ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : "."; + deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : "."; deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : ""; return deprecationMessage; } @@ -169245,9 +171665,9 @@ ${options.prefix}` : "\n" : options.prefix const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter; const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter; const since = typeof options.since === "string" ? new Version(options.since) : options.since ?? warnAfter; - const error = options.error || errorAfter && version2.compareTo(errorAfter) >= 0; + const error2 = options.error || errorAfter && version2.compareTo(errorAfter) >= 0; const warn = !warnAfter || version2.compareTo(warnAfter) >= 0; - return error ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop; + return error2 ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop; } function wrapFunction(deprecation, func) { return function() { @@ -169327,9 +171747,9 @@ ${options.prefix}` : "\n" : options.prefix init_ts5(); init_deprecate(); addObjectAllocatorPatcher((objectAllocator2) => { - const Identifier74 = objectAllocator2.getIdentifierConstructor(); - if (!hasProperty(Identifier74.prototype, "originalKeywordKind")) { - Object.defineProperty(Identifier74.prototype, "originalKeywordKind", { + const Identifier78 = objectAllocator2.getIdentifierConstructor(); + if (!hasProperty(Identifier78.prototype, "originalKeywordKind")) { + Object.defineProperty(Identifier78.prototype, "originalKeywordKind", { get: deprecate(function() { return identifierToKeywordKind(this); }, { @@ -169341,10 +171761,10 @@ ${options.prefix}` : "\n" : options.prefix }) }); } - if (!hasProperty(Identifier74.prototype, "isInJSDocNamespace")) { - Object.defineProperty(Identifier74.prototype, "isInJSDocNamespace", { + if (!hasProperty(Identifier78.prototype, "isInJSDocNamespace")) { + Object.defineProperty(Identifier78.prototype, "isInJSDocNamespace", { get: deprecate(function() { - return this.flags & 2048 /* IdentifierIsInJSDocNamespace */ ? true : void 0; + return this.flags & 4096 /* IdentifierIsInJSDocNamespace */ ? true : void 0; }, { name: "isInJSDocNamespace", since: "5.0", @@ -169394,6 +171814,7 @@ ${options.prefix}` : "\n" : options.prefix CompletionTriggerKind: () => CompletionTriggerKind, Completions: () => ts_Completions_exports, ConfigFileProgramReloadLevel: () => ConfigFileProgramReloadLevel, + ContainerFlags: () => ContainerFlags, ContextFlags: () => ContextFlags, CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, @@ -169423,6 +171844,8 @@ ${options.prefix}` : "\n" : options.prefix GetLiteralTextFlags: () => GetLiteralTextFlags, GoToDefinition: () => ts_GoToDefinition_exports, HighlightSpanKind: () => HighlightSpanKind, + IdentifierNameMap: () => IdentifierNameMap, + IdentifierNameMultiMap: () => IdentifierNameMultiMap, ImportKind: () => ImportKind, ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, IndentStyle: () => IndentStyle, @@ -169527,6 +171950,7 @@ ${options.prefix}` : "\n" : options.prefix WatchLogLevel: () => WatchLogLevel, WatchType: () => WatchType, accessPrivateIdentifier: () => accessPrivateIdentifier, + addDisposableResourceHelper: () => addDisposableResourceHelper, addEmitFlags: () => addEmitFlags, addEmitHelper: () => addEmitHelper, addEmitHelpers: () => addEmitHelpers, @@ -169606,6 +172030,9 @@ ${options.prefix}` : "\n" : options.prefix changesAffectingProgramStructure: () => changesAffectingProgramStructure, childIsDecorated: () => childIsDecorated, classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, + classHasClassThisAssignment: () => classHasClassThisAssignment, + classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, + classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, classPrivateFieldInHelper: () => classPrivateFieldInHelper, @@ -169703,6 +172130,8 @@ ${options.prefix}` : "\n" : options.prefix createCacheWithRedirects: () => createCacheWithRedirects, createCacheableExportInfoMap: () => createCacheableExportInfoMap, createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, + createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, + createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, createClassifier: () => createClassifier, createCommentDirectivesMap: () => createCommentDirectivesMap, createCompilerDiagnostic: () => createCompilerDiagnostic, @@ -169835,6 +172264,7 @@ ${options.prefix}` : "\n" : options.prefix displayPart: () => displayPart, displayPartsToString: () => displayPartsToString, disposeEmitNodes: () => disposeEmitNodes, + disposeResourcesHelper: () => disposeResourcesHelper, documentSpansEqual: () => documentSpansEqual, dumpTracingLegend: () => dumpTracingLegend, elementAt: () => elementAt, @@ -169912,7 +172342,7 @@ ${options.prefix}` : "\n" : options.prefix findPackageJsons: () => findPackageJsons, findPrecedingMatchingToken: () => findPrecedingMatchingToken, findPrecedingToken: () => findPrecedingToken, - findSuperStatementIndex: () => findSuperStatementIndex, + findSuperStatementIndexPath: () => findSuperStatementIndexPath, findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition, findUseStrictPrologue: () => findUseStrictPrologue, first: () => first, @@ -169987,6 +172417,7 @@ ${options.prefix}` : "\n" : options.prefix getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, getAssignedName: () => getAssignedName, + getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, getAssignmentTargetKind: () => getAssignmentTargetKind, @@ -170014,8 +172445,10 @@ ${options.prefix}` : "\n" : options.prefix getConditions: () => getConditions, getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, getConstantValue: () => getConstantValue, + getContainerFlags: () => getContainerFlags, getContainerNode: () => getContainerNode, getContainingClass: () => getContainingClass, + getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators, getContainingClassStaticBlock: () => getContainingClassStaticBlock, getContainingFunction: () => getContainingFunction, getContainingFunctionDeclaration: () => getContainingFunctionDeclaration, @@ -170073,7 +172506,9 @@ ${options.prefix}` : "\n" : options.prefix getEmitModuleKind: () => getEmitModuleKind, getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, getEmitScriptTarget: () => getEmitScriptTarget, + getEmitStandardClassFields: () => getEmitStandardClassFields, getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer, + getEnclosingContainer: () => getEnclosingContainer, getEncodedSemanticClassifications: () => getEncodedSemanticClassifications, getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications, getEndLinePosition: () => getEndLinePosition, @@ -170291,6 +172726,7 @@ ${options.prefix}` : "\n" : options.prefix getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression, getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode, getPropertyNameForUniqueESSymbol: () => getPropertyNameForUniqueESSymbol, + getPropertyNameFromType: () => getPropertyNameFromType, getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement, getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement, getPropertySymbolsFromContextualType: () => getPropertySymbolsFromContextualType, @@ -170471,6 +172907,8 @@ ${options.prefix}` : "\n" : options.prefix indexOfNode: () => indexOfNode, indicesOf: () => indicesOf, inferredTypesContainingFile: () => inferredTypesContainingFile, + injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing, + injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing, insertImports: () => insertImports, insertLeadingStatement: () => insertLeadingStatement, insertSorted: () => insertSorted, @@ -170573,8 +173011,10 @@ ${options.prefix}` : "\n" : options.prefix isClassExpression: () => isClassExpression, isClassLike: () => isClassLike, isClassMemberModifier: () => isClassMemberModifier, + isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, isClassOrTypeElement: () => isClassOrTypeElement, isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration, + isClassThisAssignmentBlock: () => isClassThisAssignmentBlock, isCollapsedRange: () => isCollapsedRange, isColonToken: () => isColonToken, isCommaExpression: () => isCommaExpression, @@ -170620,6 +173060,7 @@ ${options.prefix}` : "\n" : options.prefix isDiagnosticWithLocation: () => isDiagnosticWithLocation, isDiskPathRoot: () => isDiskPathRoot, isDoStatement: () => isDoStatement, + isDocumentRegistryEntry: () => isDocumentRegistryEntry, isDotDotDotToken: () => isDotDotDotToken, isDottedName: () => isDottedName, isDynamicName: () => isDynamicName, @@ -170670,6 +173111,7 @@ ${options.prefix}` : "\n" : options.prefix isExternalModuleReference: () => isExternalModuleReference, isExternalModuleSymbol: () => isExternalModuleSymbol, isExternalOrCommonJsModule: () => isExternalOrCommonJsModule, + isFileLevelReservedGeneratedIdentifier: () => isFileLevelReservedGeneratedIdentifier, isFileLevelUniqueName: () => isFileLevelUniqueName, isFileProbablyExternalModule: () => isFileProbablyExternalModule, isFirstDeclarationOfSymbolParameter: () => isFirstDeclarationOfSymbolParameter, @@ -170740,6 +173182,7 @@ ${options.prefix}` : "\n" : options.prefix isInString: () => isInString, isInTemplateString: () => isInTemplateString, isInTopLevelContext: () => isInTopLevelContext, + isInTypeQuery: () => isInTypeQuery, isIncrementalCompilation: () => isIncrementalCompilation, isIndexSignatureDeclaration: () => isIndexSignatureDeclaration, isIndexedAccessTypeNode: () => isIndexedAccessTypeNode, @@ -171117,6 +173560,7 @@ ${options.prefix}` : "\n" : options.prefix isTypeQueryNode: () => isTypeQueryNode, isTypeReferenceNode: () => isTypeReferenceNode, isTypeReferenceType: () => isTypeReferenceType, + isTypeUsableAsPropertyName: () => isTypeUsableAsPropertyName, isUMDExportSymbol: () => isUMDExportSymbol, isUnaryExpression: () => isUnaryExpression, isUnaryExpressionWithWrite: () => isUnaryExpressionWithWrite, @@ -171131,7 +173575,9 @@ ${options.prefix}` : "\n" : options.prefix isValidESSymbolDeclaration: () => isValidESSymbolDeclaration, isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite, isValueSignatureDeclaration: () => isValueSignatureDeclaration, + isVarAwaitUsing: () => isVarAwaitUsing, isVarConst: () => isVarConst, + isVarUsing: () => isVarUsing, isVariableDeclaration: () => isVariableDeclaration, isVariableDeclarationInVariableStatement: () => isVariableDeclarationInVariableStatement, isVariableDeclarationInitializedToBareOrAccessedRequire: () => isVariableDeclarationInitializedToBareOrAccessedRequire, @@ -171543,6 +173989,7 @@ ${options.prefix}` : "\n" : options.prefix transformJsx: () => transformJsx, transformLegacyDecorators: () => transformLegacyDecorators, transformModule: () => transformModule, + transformNamedEvaluation: () => transformNamedEvaluation, transformNodeModule: () => transformNodeModule, transformNodes: () => transformNodes, transformSystemModule: () => transformSystemModule, diff --git a/node_modules/typescript/lib/typingsInstaller.js b/node_modules/typescript/lib/typingsInstaller.js index a1cec18754..e765ab854c 100644 --- a/node_modules/typescript/lib/typingsInstaller.js +++ b/node_modules/typescript/lib/typingsInstaller.js @@ -53,8 +53,8 @@ var fs = __toESM(require("fs")); var path = __toESM(require("path")); // src/compiler/corePublic.ts -var versionMajorMinor = "5.1"; -var version = "5.1.6"; +var versionMajorMinor = "5.2"; +var version = "5.2.2"; // src/compiler/core.ts var emptyArray = []; @@ -507,7 +507,7 @@ function identity(x) { function toLowerCase(x) { return x.toLowerCase(); } -var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; +var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; function toFileNameLowerCase(x) { return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x; } @@ -759,8 +759,8 @@ function unorderedRemoveFirstItemWhere(array, predicate) { } return false; } -function createGetCanonicalFileName(useCaseSensitiveFileNames) { - return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; +function createGetCanonicalFileName(useCaseSensitiveFileNames2) { + return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase; } function patternText({ prefix, suffix }) { return `${prefix}*${suffix}`; @@ -1067,7 +1067,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return func.name; } else { const text = Function.prototype.toString.call(func); - const match = /^function\s+([\w\$]+)\s*\(/.exec(text); + const match = /^function\s+([\w$]+)\s*\(/.exec(text); return match ? match[1] : ""; } } @@ -1141,6 +1141,15 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, ); } Debug2.formatSnippetKind = formatSnippetKind; + function formatScriptKind(kind) { + return formatEnum( + kind, + ScriptKind, + /*isFlags*/ + false + ); + } + Debug2.formatScriptKind = formatScriptKind; function formatNodeFlags(flags) { return formatEnum( flags, @@ -1841,13 +1850,13 @@ ${lanes.join("\n")} })(Debug || (Debug = {})); // src/compiler/semver.ts -var versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; +var versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; var prereleaseRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i; var prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i; var buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i; var buildPartRegExp = /^[a-z0-9-]+$/i; var numericIdentifierRegExp = /^(0|[1-9]\d*)$/; -var _Version = class { +var _Version = class _Version { constructor(major, minor = 0, patch = 0, prerelease = "", build = "") { if (typeof major === "string") { const result = Debug.checkDefined(tryParseComponents(major), "Invalid version"); @@ -1911,8 +1920,8 @@ var _Version = class { return result; } }; +_Version.zero = new _Version(0, 0, 0, ["0"]); var Version = _Version; -Version.zero = new _Version(0, 0, 0, ["0"]); function tryParseComponents(text) { const match = versionRegExp.exec(text); if (!match) @@ -1959,14 +1968,14 @@ function comparePrereleaseIdentifiers(left, right) { } return compareValues(left.length, right.length); } -var VersionRange = class { +var VersionRange = class _VersionRange { constructor(spec) { this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray; } static tryParse(text) { const sets = parseRange(text); if (sets) { - const range = new VersionRange(""); + const range = new _VersionRange(""); range._alternatives = sets; return range; } @@ -2652,210 +2661,211 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["UndefinedKeyword"] = 157] = "UndefinedKeyword"; SyntaxKind4[SyntaxKind4["UniqueKeyword"] = 158] = "UniqueKeyword"; SyntaxKind4[SyntaxKind4["UnknownKeyword"] = 159] = "UnknownKeyword"; - SyntaxKind4[SyntaxKind4["FromKeyword"] = 160] = "FromKeyword"; - SyntaxKind4[SyntaxKind4["GlobalKeyword"] = 161] = "GlobalKeyword"; - SyntaxKind4[SyntaxKind4["BigIntKeyword"] = 162] = "BigIntKeyword"; - SyntaxKind4[SyntaxKind4["OverrideKeyword"] = 163] = "OverrideKeyword"; - SyntaxKind4[SyntaxKind4["OfKeyword"] = 164] = "OfKeyword"; - SyntaxKind4[SyntaxKind4["QualifiedName"] = 165] = "QualifiedName"; - SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 166] = "ComputedPropertyName"; - SyntaxKind4[SyntaxKind4["TypeParameter"] = 167] = "TypeParameter"; - SyntaxKind4[SyntaxKind4["Parameter"] = 168] = "Parameter"; - SyntaxKind4[SyntaxKind4["Decorator"] = 169] = "Decorator"; - SyntaxKind4[SyntaxKind4["PropertySignature"] = 170] = "PropertySignature"; - SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 171] = "PropertyDeclaration"; - SyntaxKind4[SyntaxKind4["MethodSignature"] = 172] = "MethodSignature"; - SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 173] = "MethodDeclaration"; - SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 174] = "ClassStaticBlockDeclaration"; - SyntaxKind4[SyntaxKind4["Constructor"] = 175] = "Constructor"; - SyntaxKind4[SyntaxKind4["GetAccessor"] = 176] = "GetAccessor"; - SyntaxKind4[SyntaxKind4["SetAccessor"] = 177] = "SetAccessor"; - SyntaxKind4[SyntaxKind4["CallSignature"] = 178] = "CallSignature"; - SyntaxKind4[SyntaxKind4["ConstructSignature"] = 179] = "ConstructSignature"; - SyntaxKind4[SyntaxKind4["IndexSignature"] = 180] = "IndexSignature"; - SyntaxKind4[SyntaxKind4["TypePredicate"] = 181] = "TypePredicate"; - SyntaxKind4[SyntaxKind4["TypeReference"] = 182] = "TypeReference"; - SyntaxKind4[SyntaxKind4["FunctionType"] = 183] = "FunctionType"; - SyntaxKind4[SyntaxKind4["ConstructorType"] = 184] = "ConstructorType"; - SyntaxKind4[SyntaxKind4["TypeQuery"] = 185] = "TypeQuery"; - SyntaxKind4[SyntaxKind4["TypeLiteral"] = 186] = "TypeLiteral"; - SyntaxKind4[SyntaxKind4["ArrayType"] = 187] = "ArrayType"; - SyntaxKind4[SyntaxKind4["TupleType"] = 188] = "TupleType"; - SyntaxKind4[SyntaxKind4["OptionalType"] = 189] = "OptionalType"; - SyntaxKind4[SyntaxKind4["RestType"] = 190] = "RestType"; - SyntaxKind4[SyntaxKind4["UnionType"] = 191] = "UnionType"; - SyntaxKind4[SyntaxKind4["IntersectionType"] = 192] = "IntersectionType"; - SyntaxKind4[SyntaxKind4["ConditionalType"] = 193] = "ConditionalType"; - SyntaxKind4[SyntaxKind4["InferType"] = 194] = "InferType"; - SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 195] = "ParenthesizedType"; - SyntaxKind4[SyntaxKind4["ThisType"] = 196] = "ThisType"; - SyntaxKind4[SyntaxKind4["TypeOperator"] = 197] = "TypeOperator"; - SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 198] = "IndexedAccessType"; - SyntaxKind4[SyntaxKind4["MappedType"] = 199] = "MappedType"; - SyntaxKind4[SyntaxKind4["LiteralType"] = 200] = "LiteralType"; - SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 201] = "NamedTupleMember"; - SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 202] = "TemplateLiteralType"; - SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 203] = "TemplateLiteralTypeSpan"; - SyntaxKind4[SyntaxKind4["ImportType"] = 204] = "ImportType"; - SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 205] = "ObjectBindingPattern"; - SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 206] = "ArrayBindingPattern"; - SyntaxKind4[SyntaxKind4["BindingElement"] = 207] = "BindingElement"; - SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 208] = "ArrayLiteralExpression"; - SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 209] = "ObjectLiteralExpression"; - SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 210] = "PropertyAccessExpression"; - SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 211] = "ElementAccessExpression"; - SyntaxKind4[SyntaxKind4["CallExpression"] = 212] = "CallExpression"; - SyntaxKind4[SyntaxKind4["NewExpression"] = 213] = "NewExpression"; - SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 214] = "TaggedTemplateExpression"; - SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 215] = "TypeAssertionExpression"; - SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 216] = "ParenthesizedExpression"; - SyntaxKind4[SyntaxKind4["FunctionExpression"] = 217] = "FunctionExpression"; - SyntaxKind4[SyntaxKind4["ArrowFunction"] = 218] = "ArrowFunction"; - SyntaxKind4[SyntaxKind4["DeleteExpression"] = 219] = "DeleteExpression"; - SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 220] = "TypeOfExpression"; - SyntaxKind4[SyntaxKind4["VoidExpression"] = 221] = "VoidExpression"; - SyntaxKind4[SyntaxKind4["AwaitExpression"] = 222] = "AwaitExpression"; - SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 223] = "PrefixUnaryExpression"; - SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 224] = "PostfixUnaryExpression"; - SyntaxKind4[SyntaxKind4["BinaryExpression"] = 225] = "BinaryExpression"; - SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 226] = "ConditionalExpression"; - SyntaxKind4[SyntaxKind4["TemplateExpression"] = 227] = "TemplateExpression"; - SyntaxKind4[SyntaxKind4["YieldExpression"] = 228] = "YieldExpression"; - SyntaxKind4[SyntaxKind4["SpreadElement"] = 229] = "SpreadElement"; - SyntaxKind4[SyntaxKind4["ClassExpression"] = 230] = "ClassExpression"; - SyntaxKind4[SyntaxKind4["OmittedExpression"] = 231] = "OmittedExpression"; - SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 232] = "ExpressionWithTypeArguments"; - SyntaxKind4[SyntaxKind4["AsExpression"] = 233] = "AsExpression"; - SyntaxKind4[SyntaxKind4["NonNullExpression"] = 234] = "NonNullExpression"; - SyntaxKind4[SyntaxKind4["MetaProperty"] = 235] = "MetaProperty"; - SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 236] = "SyntheticExpression"; - SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 237] = "SatisfiesExpression"; - SyntaxKind4[SyntaxKind4["TemplateSpan"] = 238] = "TemplateSpan"; - SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 239] = "SemicolonClassElement"; - SyntaxKind4[SyntaxKind4["Block"] = 240] = "Block"; - SyntaxKind4[SyntaxKind4["EmptyStatement"] = 241] = "EmptyStatement"; - SyntaxKind4[SyntaxKind4["VariableStatement"] = 242] = "VariableStatement"; - SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 243] = "ExpressionStatement"; - SyntaxKind4[SyntaxKind4["IfStatement"] = 244] = "IfStatement"; - SyntaxKind4[SyntaxKind4["DoStatement"] = 245] = "DoStatement"; - SyntaxKind4[SyntaxKind4["WhileStatement"] = 246] = "WhileStatement"; - SyntaxKind4[SyntaxKind4["ForStatement"] = 247] = "ForStatement"; - SyntaxKind4[SyntaxKind4["ForInStatement"] = 248] = "ForInStatement"; - SyntaxKind4[SyntaxKind4["ForOfStatement"] = 249] = "ForOfStatement"; - SyntaxKind4[SyntaxKind4["ContinueStatement"] = 250] = "ContinueStatement"; - SyntaxKind4[SyntaxKind4["BreakStatement"] = 251] = "BreakStatement"; - SyntaxKind4[SyntaxKind4["ReturnStatement"] = 252] = "ReturnStatement"; - SyntaxKind4[SyntaxKind4["WithStatement"] = 253] = "WithStatement"; - SyntaxKind4[SyntaxKind4["SwitchStatement"] = 254] = "SwitchStatement"; - SyntaxKind4[SyntaxKind4["LabeledStatement"] = 255] = "LabeledStatement"; - SyntaxKind4[SyntaxKind4["ThrowStatement"] = 256] = "ThrowStatement"; - SyntaxKind4[SyntaxKind4["TryStatement"] = 257] = "TryStatement"; - SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 258] = "DebuggerStatement"; - SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 259] = "VariableDeclaration"; - SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 260] = "VariableDeclarationList"; - SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 261] = "FunctionDeclaration"; - SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 262] = "ClassDeclaration"; - SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 263] = "InterfaceDeclaration"; - SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 264] = "TypeAliasDeclaration"; - SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 265] = "EnumDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 266] = "ModuleDeclaration"; - SyntaxKind4[SyntaxKind4["ModuleBlock"] = 267] = "ModuleBlock"; - SyntaxKind4[SyntaxKind4["CaseBlock"] = 268] = "CaseBlock"; - SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 269] = "NamespaceExportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 270] = "ImportEqualsDeclaration"; - SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 271] = "ImportDeclaration"; - SyntaxKind4[SyntaxKind4["ImportClause"] = 272] = "ImportClause"; - SyntaxKind4[SyntaxKind4["NamespaceImport"] = 273] = "NamespaceImport"; - SyntaxKind4[SyntaxKind4["NamedImports"] = 274] = "NamedImports"; - SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 275] = "ImportSpecifier"; - SyntaxKind4[SyntaxKind4["ExportAssignment"] = 276] = "ExportAssignment"; - SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 277] = "ExportDeclaration"; - SyntaxKind4[SyntaxKind4["NamedExports"] = 278] = "NamedExports"; - SyntaxKind4[SyntaxKind4["NamespaceExport"] = 279] = "NamespaceExport"; - SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 280] = "ExportSpecifier"; - SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 281] = "MissingDeclaration"; - SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 282] = "ExternalModuleReference"; - SyntaxKind4[SyntaxKind4["JsxElement"] = 283] = "JsxElement"; - SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 284] = "JsxSelfClosingElement"; - SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 285] = "JsxOpeningElement"; - SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 286] = "JsxClosingElement"; - SyntaxKind4[SyntaxKind4["JsxFragment"] = 287] = "JsxFragment"; - SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 288] = "JsxOpeningFragment"; - SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 289] = "JsxClosingFragment"; - SyntaxKind4[SyntaxKind4["JsxAttribute"] = 290] = "JsxAttribute"; - SyntaxKind4[SyntaxKind4["JsxAttributes"] = 291] = "JsxAttributes"; - SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 292] = "JsxSpreadAttribute"; - SyntaxKind4[SyntaxKind4["JsxExpression"] = 293] = "JsxExpression"; - SyntaxKind4[SyntaxKind4["JsxNamespacedName"] = 294] = "JsxNamespacedName"; - SyntaxKind4[SyntaxKind4["CaseClause"] = 295] = "CaseClause"; - SyntaxKind4[SyntaxKind4["DefaultClause"] = 296] = "DefaultClause"; - SyntaxKind4[SyntaxKind4["HeritageClause"] = 297] = "HeritageClause"; - SyntaxKind4[SyntaxKind4["CatchClause"] = 298] = "CatchClause"; - SyntaxKind4[SyntaxKind4["AssertClause"] = 299] = "AssertClause"; - SyntaxKind4[SyntaxKind4["AssertEntry"] = 300] = "AssertEntry"; - SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 301] = "ImportTypeAssertionContainer"; - SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 302] = "PropertyAssignment"; - SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 303] = "ShorthandPropertyAssignment"; - SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 304] = "SpreadAssignment"; - SyntaxKind4[SyntaxKind4["EnumMember"] = 305] = "EnumMember"; - SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 306] = "UnparsedPrologue"; - SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 307] = "UnparsedPrepend"; - SyntaxKind4[SyntaxKind4["UnparsedText"] = 308] = "UnparsedText"; - SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 309] = "UnparsedInternalText"; - SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 310] = "UnparsedSyntheticReference"; - SyntaxKind4[SyntaxKind4["SourceFile"] = 311] = "SourceFile"; - SyntaxKind4[SyntaxKind4["Bundle"] = 312] = "Bundle"; - SyntaxKind4[SyntaxKind4["UnparsedSource"] = 313] = "UnparsedSource"; - SyntaxKind4[SyntaxKind4["InputFiles"] = 314] = "InputFiles"; - SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 315] = "JSDocTypeExpression"; - SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 316] = "JSDocNameReference"; - SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 317] = "JSDocMemberName"; - SyntaxKind4[SyntaxKind4["JSDocAllType"] = 318] = "JSDocAllType"; - SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 319] = "JSDocUnknownType"; - SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 320] = "JSDocNullableType"; - SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 321] = "JSDocNonNullableType"; - SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 322] = "JSDocOptionalType"; - SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 323] = "JSDocFunctionType"; - SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 324] = "JSDocVariadicType"; - SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 325] = "JSDocNamepathType"; - SyntaxKind4[SyntaxKind4["JSDoc"] = 326] = "JSDoc"; - SyntaxKind4[SyntaxKind4["JSDocComment"] = 326 /* JSDoc */] = "JSDocComment"; - SyntaxKind4[SyntaxKind4["JSDocText"] = 327] = "JSDocText"; - SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 328] = "JSDocTypeLiteral"; - SyntaxKind4[SyntaxKind4["JSDocSignature"] = 329] = "JSDocSignature"; - SyntaxKind4[SyntaxKind4["JSDocLink"] = 330] = "JSDocLink"; - SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 331] = "JSDocLinkCode"; - SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 332] = "JSDocLinkPlain"; - SyntaxKind4[SyntaxKind4["JSDocTag"] = 333] = "JSDocTag"; - SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 334] = "JSDocAugmentsTag"; - SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 335] = "JSDocImplementsTag"; - SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 336] = "JSDocAuthorTag"; - SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 337] = "JSDocDeprecatedTag"; - SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 338] = "JSDocClassTag"; - SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 339] = "JSDocPublicTag"; - SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 340] = "JSDocPrivateTag"; - SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 341] = "JSDocProtectedTag"; - SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 342] = "JSDocReadonlyTag"; - SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 343] = "JSDocOverrideTag"; - SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 344] = "JSDocCallbackTag"; - SyntaxKind4[SyntaxKind4["JSDocOverloadTag"] = 345] = "JSDocOverloadTag"; - SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 346] = "JSDocEnumTag"; - SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 347] = "JSDocParameterTag"; - SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 348] = "JSDocReturnTag"; - SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 349] = "JSDocThisTag"; - SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 350] = "JSDocTypeTag"; - SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 351] = "JSDocTemplateTag"; - SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 352] = "JSDocTypedefTag"; - SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 353] = "JSDocSeeTag"; - SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 354] = "JSDocPropertyTag"; - SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 355] = "JSDocThrowsTag"; - SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 356] = "JSDocSatisfiesTag"; - SyntaxKind4[SyntaxKind4["SyntaxList"] = 357] = "SyntaxList"; - SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 358] = "NotEmittedStatement"; - SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression"; - SyntaxKind4[SyntaxKind4["CommaListExpression"] = 360] = "CommaListExpression"; - SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression"; - SyntaxKind4[SyntaxKind4["Count"] = 362] = "Count"; + SyntaxKind4[SyntaxKind4["UsingKeyword"] = 160] = "UsingKeyword"; + SyntaxKind4[SyntaxKind4["FromKeyword"] = 161] = "FromKeyword"; + SyntaxKind4[SyntaxKind4["GlobalKeyword"] = 162] = "GlobalKeyword"; + SyntaxKind4[SyntaxKind4["BigIntKeyword"] = 163] = "BigIntKeyword"; + SyntaxKind4[SyntaxKind4["OverrideKeyword"] = 164] = "OverrideKeyword"; + SyntaxKind4[SyntaxKind4["OfKeyword"] = 165] = "OfKeyword"; + SyntaxKind4[SyntaxKind4["QualifiedName"] = 166] = "QualifiedName"; + SyntaxKind4[SyntaxKind4["ComputedPropertyName"] = 167] = "ComputedPropertyName"; + SyntaxKind4[SyntaxKind4["TypeParameter"] = 168] = "TypeParameter"; + SyntaxKind4[SyntaxKind4["Parameter"] = 169] = "Parameter"; + SyntaxKind4[SyntaxKind4["Decorator"] = 170] = "Decorator"; + SyntaxKind4[SyntaxKind4["PropertySignature"] = 171] = "PropertySignature"; + SyntaxKind4[SyntaxKind4["PropertyDeclaration"] = 172] = "PropertyDeclaration"; + SyntaxKind4[SyntaxKind4["MethodSignature"] = 173] = "MethodSignature"; + SyntaxKind4[SyntaxKind4["MethodDeclaration"] = 174] = "MethodDeclaration"; + SyntaxKind4[SyntaxKind4["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; + SyntaxKind4[SyntaxKind4["Constructor"] = 176] = "Constructor"; + SyntaxKind4[SyntaxKind4["GetAccessor"] = 177] = "GetAccessor"; + SyntaxKind4[SyntaxKind4["SetAccessor"] = 178] = "SetAccessor"; + SyntaxKind4[SyntaxKind4["CallSignature"] = 179] = "CallSignature"; + SyntaxKind4[SyntaxKind4["ConstructSignature"] = 180] = "ConstructSignature"; + SyntaxKind4[SyntaxKind4["IndexSignature"] = 181] = "IndexSignature"; + SyntaxKind4[SyntaxKind4["TypePredicate"] = 182] = "TypePredicate"; + SyntaxKind4[SyntaxKind4["TypeReference"] = 183] = "TypeReference"; + SyntaxKind4[SyntaxKind4["FunctionType"] = 184] = "FunctionType"; + SyntaxKind4[SyntaxKind4["ConstructorType"] = 185] = "ConstructorType"; + SyntaxKind4[SyntaxKind4["TypeQuery"] = 186] = "TypeQuery"; + SyntaxKind4[SyntaxKind4["TypeLiteral"] = 187] = "TypeLiteral"; + SyntaxKind4[SyntaxKind4["ArrayType"] = 188] = "ArrayType"; + SyntaxKind4[SyntaxKind4["TupleType"] = 189] = "TupleType"; + SyntaxKind4[SyntaxKind4["OptionalType"] = 190] = "OptionalType"; + SyntaxKind4[SyntaxKind4["RestType"] = 191] = "RestType"; + SyntaxKind4[SyntaxKind4["UnionType"] = 192] = "UnionType"; + SyntaxKind4[SyntaxKind4["IntersectionType"] = 193] = "IntersectionType"; + SyntaxKind4[SyntaxKind4["ConditionalType"] = 194] = "ConditionalType"; + SyntaxKind4[SyntaxKind4["InferType"] = 195] = "InferType"; + SyntaxKind4[SyntaxKind4["ParenthesizedType"] = 196] = "ParenthesizedType"; + SyntaxKind4[SyntaxKind4["ThisType"] = 197] = "ThisType"; + SyntaxKind4[SyntaxKind4["TypeOperator"] = 198] = "TypeOperator"; + SyntaxKind4[SyntaxKind4["IndexedAccessType"] = 199] = "IndexedAccessType"; + SyntaxKind4[SyntaxKind4["MappedType"] = 200] = "MappedType"; + SyntaxKind4[SyntaxKind4["LiteralType"] = 201] = "LiteralType"; + SyntaxKind4[SyntaxKind4["NamedTupleMember"] = 202] = "NamedTupleMember"; + SyntaxKind4[SyntaxKind4["TemplateLiteralType"] = 203] = "TemplateLiteralType"; + SyntaxKind4[SyntaxKind4["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; + SyntaxKind4[SyntaxKind4["ImportType"] = 205] = "ImportType"; + SyntaxKind4[SyntaxKind4["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; + SyntaxKind4[SyntaxKind4["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; + SyntaxKind4[SyntaxKind4["BindingElement"] = 208] = "BindingElement"; + SyntaxKind4[SyntaxKind4["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; + SyntaxKind4[SyntaxKind4["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; + SyntaxKind4[SyntaxKind4["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; + SyntaxKind4[SyntaxKind4["ElementAccessExpression"] = 212] = "ElementAccessExpression"; + SyntaxKind4[SyntaxKind4["CallExpression"] = 213] = "CallExpression"; + SyntaxKind4[SyntaxKind4["NewExpression"] = 214] = "NewExpression"; + SyntaxKind4[SyntaxKind4["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; + SyntaxKind4[SyntaxKind4["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; + SyntaxKind4[SyntaxKind4["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; + SyntaxKind4[SyntaxKind4["FunctionExpression"] = 218] = "FunctionExpression"; + SyntaxKind4[SyntaxKind4["ArrowFunction"] = 219] = "ArrowFunction"; + SyntaxKind4[SyntaxKind4["DeleteExpression"] = 220] = "DeleteExpression"; + SyntaxKind4[SyntaxKind4["TypeOfExpression"] = 221] = "TypeOfExpression"; + SyntaxKind4[SyntaxKind4["VoidExpression"] = 222] = "VoidExpression"; + SyntaxKind4[SyntaxKind4["AwaitExpression"] = 223] = "AwaitExpression"; + SyntaxKind4[SyntaxKind4["PrefixUnaryExpression"] = 224] = "PrefixUnaryExpression"; + SyntaxKind4[SyntaxKind4["PostfixUnaryExpression"] = 225] = "PostfixUnaryExpression"; + SyntaxKind4[SyntaxKind4["BinaryExpression"] = 226] = "BinaryExpression"; + SyntaxKind4[SyntaxKind4["ConditionalExpression"] = 227] = "ConditionalExpression"; + SyntaxKind4[SyntaxKind4["TemplateExpression"] = 228] = "TemplateExpression"; + SyntaxKind4[SyntaxKind4["YieldExpression"] = 229] = "YieldExpression"; + SyntaxKind4[SyntaxKind4["SpreadElement"] = 230] = "SpreadElement"; + SyntaxKind4[SyntaxKind4["ClassExpression"] = 231] = "ClassExpression"; + SyntaxKind4[SyntaxKind4["OmittedExpression"] = 232] = "OmittedExpression"; + SyntaxKind4[SyntaxKind4["ExpressionWithTypeArguments"] = 233] = "ExpressionWithTypeArguments"; + SyntaxKind4[SyntaxKind4["AsExpression"] = 234] = "AsExpression"; + SyntaxKind4[SyntaxKind4["NonNullExpression"] = 235] = "NonNullExpression"; + SyntaxKind4[SyntaxKind4["MetaProperty"] = 236] = "MetaProperty"; + SyntaxKind4[SyntaxKind4["SyntheticExpression"] = 237] = "SyntheticExpression"; + SyntaxKind4[SyntaxKind4["SatisfiesExpression"] = 238] = "SatisfiesExpression"; + SyntaxKind4[SyntaxKind4["TemplateSpan"] = 239] = "TemplateSpan"; + SyntaxKind4[SyntaxKind4["SemicolonClassElement"] = 240] = "SemicolonClassElement"; + SyntaxKind4[SyntaxKind4["Block"] = 241] = "Block"; + SyntaxKind4[SyntaxKind4["EmptyStatement"] = 242] = "EmptyStatement"; + SyntaxKind4[SyntaxKind4["VariableStatement"] = 243] = "VariableStatement"; + SyntaxKind4[SyntaxKind4["ExpressionStatement"] = 244] = "ExpressionStatement"; + SyntaxKind4[SyntaxKind4["IfStatement"] = 245] = "IfStatement"; + SyntaxKind4[SyntaxKind4["DoStatement"] = 246] = "DoStatement"; + SyntaxKind4[SyntaxKind4["WhileStatement"] = 247] = "WhileStatement"; + SyntaxKind4[SyntaxKind4["ForStatement"] = 248] = "ForStatement"; + SyntaxKind4[SyntaxKind4["ForInStatement"] = 249] = "ForInStatement"; + SyntaxKind4[SyntaxKind4["ForOfStatement"] = 250] = "ForOfStatement"; + SyntaxKind4[SyntaxKind4["ContinueStatement"] = 251] = "ContinueStatement"; + SyntaxKind4[SyntaxKind4["BreakStatement"] = 252] = "BreakStatement"; + SyntaxKind4[SyntaxKind4["ReturnStatement"] = 253] = "ReturnStatement"; + SyntaxKind4[SyntaxKind4["WithStatement"] = 254] = "WithStatement"; + SyntaxKind4[SyntaxKind4["SwitchStatement"] = 255] = "SwitchStatement"; + SyntaxKind4[SyntaxKind4["LabeledStatement"] = 256] = "LabeledStatement"; + SyntaxKind4[SyntaxKind4["ThrowStatement"] = 257] = "ThrowStatement"; + SyntaxKind4[SyntaxKind4["TryStatement"] = 258] = "TryStatement"; + SyntaxKind4[SyntaxKind4["DebuggerStatement"] = 259] = "DebuggerStatement"; + SyntaxKind4[SyntaxKind4["VariableDeclaration"] = 260] = "VariableDeclaration"; + SyntaxKind4[SyntaxKind4["VariableDeclarationList"] = 261] = "VariableDeclarationList"; + SyntaxKind4[SyntaxKind4["FunctionDeclaration"] = 262] = "FunctionDeclaration"; + SyntaxKind4[SyntaxKind4["ClassDeclaration"] = 263] = "ClassDeclaration"; + SyntaxKind4[SyntaxKind4["InterfaceDeclaration"] = 264] = "InterfaceDeclaration"; + SyntaxKind4[SyntaxKind4["TypeAliasDeclaration"] = 265] = "TypeAliasDeclaration"; + SyntaxKind4[SyntaxKind4["EnumDeclaration"] = 266] = "EnumDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleDeclaration"] = 267] = "ModuleDeclaration"; + SyntaxKind4[SyntaxKind4["ModuleBlock"] = 268] = "ModuleBlock"; + SyntaxKind4[SyntaxKind4["CaseBlock"] = 269] = "CaseBlock"; + SyntaxKind4[SyntaxKind4["NamespaceExportDeclaration"] = 270] = "NamespaceExportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportEqualsDeclaration"] = 271] = "ImportEqualsDeclaration"; + SyntaxKind4[SyntaxKind4["ImportDeclaration"] = 272] = "ImportDeclaration"; + SyntaxKind4[SyntaxKind4["ImportClause"] = 273] = "ImportClause"; + SyntaxKind4[SyntaxKind4["NamespaceImport"] = 274] = "NamespaceImport"; + SyntaxKind4[SyntaxKind4["NamedImports"] = 275] = "NamedImports"; + SyntaxKind4[SyntaxKind4["ImportSpecifier"] = 276] = "ImportSpecifier"; + SyntaxKind4[SyntaxKind4["ExportAssignment"] = 277] = "ExportAssignment"; + SyntaxKind4[SyntaxKind4["ExportDeclaration"] = 278] = "ExportDeclaration"; + SyntaxKind4[SyntaxKind4["NamedExports"] = 279] = "NamedExports"; + SyntaxKind4[SyntaxKind4["NamespaceExport"] = 280] = "NamespaceExport"; + SyntaxKind4[SyntaxKind4["ExportSpecifier"] = 281] = "ExportSpecifier"; + SyntaxKind4[SyntaxKind4["MissingDeclaration"] = 282] = "MissingDeclaration"; + SyntaxKind4[SyntaxKind4["ExternalModuleReference"] = 283] = "ExternalModuleReference"; + SyntaxKind4[SyntaxKind4["JsxElement"] = 284] = "JsxElement"; + SyntaxKind4[SyntaxKind4["JsxSelfClosingElement"] = 285] = "JsxSelfClosingElement"; + SyntaxKind4[SyntaxKind4["JsxOpeningElement"] = 286] = "JsxOpeningElement"; + SyntaxKind4[SyntaxKind4["JsxClosingElement"] = 287] = "JsxClosingElement"; + SyntaxKind4[SyntaxKind4["JsxFragment"] = 288] = "JsxFragment"; + SyntaxKind4[SyntaxKind4["JsxOpeningFragment"] = 289] = "JsxOpeningFragment"; + SyntaxKind4[SyntaxKind4["JsxClosingFragment"] = 290] = "JsxClosingFragment"; + SyntaxKind4[SyntaxKind4["JsxAttribute"] = 291] = "JsxAttribute"; + SyntaxKind4[SyntaxKind4["JsxAttributes"] = 292] = "JsxAttributes"; + SyntaxKind4[SyntaxKind4["JsxSpreadAttribute"] = 293] = "JsxSpreadAttribute"; + SyntaxKind4[SyntaxKind4["JsxExpression"] = 294] = "JsxExpression"; + SyntaxKind4[SyntaxKind4["JsxNamespacedName"] = 295] = "JsxNamespacedName"; + SyntaxKind4[SyntaxKind4["CaseClause"] = 296] = "CaseClause"; + SyntaxKind4[SyntaxKind4["DefaultClause"] = 297] = "DefaultClause"; + SyntaxKind4[SyntaxKind4["HeritageClause"] = 298] = "HeritageClause"; + SyntaxKind4[SyntaxKind4["CatchClause"] = 299] = "CatchClause"; + SyntaxKind4[SyntaxKind4["AssertClause"] = 300] = "AssertClause"; + SyntaxKind4[SyntaxKind4["AssertEntry"] = 301] = "AssertEntry"; + SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; + SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 303] = "PropertyAssignment"; + SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; + SyntaxKind4[SyntaxKind4["SpreadAssignment"] = 305] = "SpreadAssignment"; + SyntaxKind4[SyntaxKind4["EnumMember"] = 306] = "EnumMember"; + SyntaxKind4[SyntaxKind4["UnparsedPrologue"] = 307] = "UnparsedPrologue"; + SyntaxKind4[SyntaxKind4["UnparsedPrepend"] = 308] = "UnparsedPrepend"; + SyntaxKind4[SyntaxKind4["UnparsedText"] = 309] = "UnparsedText"; + SyntaxKind4[SyntaxKind4["UnparsedInternalText"] = 310] = "UnparsedInternalText"; + SyntaxKind4[SyntaxKind4["UnparsedSyntheticReference"] = 311] = "UnparsedSyntheticReference"; + SyntaxKind4[SyntaxKind4["SourceFile"] = 312] = "SourceFile"; + SyntaxKind4[SyntaxKind4["Bundle"] = 313] = "Bundle"; + SyntaxKind4[SyntaxKind4["UnparsedSource"] = 314] = "UnparsedSource"; + SyntaxKind4[SyntaxKind4["InputFiles"] = 315] = "InputFiles"; + SyntaxKind4[SyntaxKind4["JSDocTypeExpression"] = 316] = "JSDocTypeExpression"; + SyntaxKind4[SyntaxKind4["JSDocNameReference"] = 317] = "JSDocNameReference"; + SyntaxKind4[SyntaxKind4["JSDocMemberName"] = 318] = "JSDocMemberName"; + SyntaxKind4[SyntaxKind4["JSDocAllType"] = 319] = "JSDocAllType"; + SyntaxKind4[SyntaxKind4["JSDocUnknownType"] = 320] = "JSDocUnknownType"; + SyntaxKind4[SyntaxKind4["JSDocNullableType"] = 321] = "JSDocNullableType"; + SyntaxKind4[SyntaxKind4["JSDocNonNullableType"] = 322] = "JSDocNonNullableType"; + SyntaxKind4[SyntaxKind4["JSDocOptionalType"] = 323] = "JSDocOptionalType"; + SyntaxKind4[SyntaxKind4["JSDocFunctionType"] = 324] = "JSDocFunctionType"; + SyntaxKind4[SyntaxKind4["JSDocVariadicType"] = 325] = "JSDocVariadicType"; + SyntaxKind4[SyntaxKind4["JSDocNamepathType"] = 326] = "JSDocNamepathType"; + SyntaxKind4[SyntaxKind4["JSDoc"] = 327] = "JSDoc"; + SyntaxKind4[SyntaxKind4["JSDocComment"] = 327 /* JSDoc */] = "JSDocComment"; + SyntaxKind4[SyntaxKind4["JSDocText"] = 328] = "JSDocText"; + SyntaxKind4[SyntaxKind4["JSDocTypeLiteral"] = 329] = "JSDocTypeLiteral"; + SyntaxKind4[SyntaxKind4["JSDocSignature"] = 330] = "JSDocSignature"; + SyntaxKind4[SyntaxKind4["JSDocLink"] = 331] = "JSDocLink"; + SyntaxKind4[SyntaxKind4["JSDocLinkCode"] = 332] = "JSDocLinkCode"; + SyntaxKind4[SyntaxKind4["JSDocLinkPlain"] = 333] = "JSDocLinkPlain"; + SyntaxKind4[SyntaxKind4["JSDocTag"] = 334] = "JSDocTag"; + SyntaxKind4[SyntaxKind4["JSDocAugmentsTag"] = 335] = "JSDocAugmentsTag"; + SyntaxKind4[SyntaxKind4["JSDocImplementsTag"] = 336] = "JSDocImplementsTag"; + SyntaxKind4[SyntaxKind4["JSDocAuthorTag"] = 337] = "JSDocAuthorTag"; + SyntaxKind4[SyntaxKind4["JSDocDeprecatedTag"] = 338] = "JSDocDeprecatedTag"; + SyntaxKind4[SyntaxKind4["JSDocClassTag"] = 339] = "JSDocClassTag"; + SyntaxKind4[SyntaxKind4["JSDocPublicTag"] = 340] = "JSDocPublicTag"; + SyntaxKind4[SyntaxKind4["JSDocPrivateTag"] = 341] = "JSDocPrivateTag"; + SyntaxKind4[SyntaxKind4["JSDocProtectedTag"] = 342] = "JSDocProtectedTag"; + SyntaxKind4[SyntaxKind4["JSDocReadonlyTag"] = 343] = "JSDocReadonlyTag"; + SyntaxKind4[SyntaxKind4["JSDocOverrideTag"] = 344] = "JSDocOverrideTag"; + SyntaxKind4[SyntaxKind4["JSDocCallbackTag"] = 345] = "JSDocCallbackTag"; + SyntaxKind4[SyntaxKind4["JSDocOverloadTag"] = 346] = "JSDocOverloadTag"; + SyntaxKind4[SyntaxKind4["JSDocEnumTag"] = 347] = "JSDocEnumTag"; + SyntaxKind4[SyntaxKind4["JSDocParameterTag"] = 348] = "JSDocParameterTag"; + SyntaxKind4[SyntaxKind4["JSDocReturnTag"] = 349] = "JSDocReturnTag"; + SyntaxKind4[SyntaxKind4["JSDocThisTag"] = 350] = "JSDocThisTag"; + SyntaxKind4[SyntaxKind4["JSDocTypeTag"] = 351] = "JSDocTypeTag"; + SyntaxKind4[SyntaxKind4["JSDocTemplateTag"] = 352] = "JSDocTemplateTag"; + SyntaxKind4[SyntaxKind4["JSDocTypedefTag"] = 353] = "JSDocTypedefTag"; + SyntaxKind4[SyntaxKind4["JSDocSeeTag"] = 354] = "JSDocSeeTag"; + SyntaxKind4[SyntaxKind4["JSDocPropertyTag"] = 355] = "JSDocPropertyTag"; + SyntaxKind4[SyntaxKind4["JSDocThrowsTag"] = 356] = "JSDocThrowsTag"; + SyntaxKind4[SyntaxKind4["JSDocSatisfiesTag"] = 357] = "JSDocSatisfiesTag"; + SyntaxKind4[SyntaxKind4["SyntaxList"] = 358] = "SyntaxList"; + SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 359] = "NotEmittedStatement"; + SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 360] = "PartiallyEmittedExpression"; + SyntaxKind4[SyntaxKind4["CommaListExpression"] = 361] = "CommaListExpression"; + SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 362] = "SyntheticReferenceExpression"; + SyntaxKind4[SyntaxKind4["Count"] = 363] = "Count"; SyntaxKind4[SyntaxKind4["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment"; SyntaxKind4[SyntaxKind4["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment"; SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment"; @@ -2863,15 +2873,15 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["FirstReservedWord"] = 83 /* BreakKeyword */] = "FirstReservedWord"; SyntaxKind4[SyntaxKind4["LastReservedWord"] = 118 /* WithKeyword */] = "LastReservedWord"; SyntaxKind4[SyntaxKind4["FirstKeyword"] = 83 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind4[SyntaxKind4["LastKeyword"] = 164 /* OfKeyword */] = "LastKeyword"; + SyntaxKind4[SyntaxKind4["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; SyntaxKind4[SyntaxKind4["FirstFutureReservedWord"] = 119 /* ImplementsKeyword */] = "FirstFutureReservedWord"; SyntaxKind4[SyntaxKind4["LastFutureReservedWord"] = 127 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 181 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind4[SyntaxKind4["LastTypeNode"] = 204 /* ImportType */] = "LastTypeNode"; + SyntaxKind4[SyntaxKind4["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; + SyntaxKind4[SyntaxKind4["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; SyntaxKind4[SyntaxKind4["FirstPunctuation"] = 19 /* OpenBraceToken */] = "FirstPunctuation"; SyntaxKind4[SyntaxKind4["LastPunctuation"] = 79 /* CaretEqualsToken */] = "LastPunctuation"; SyntaxKind4[SyntaxKind4["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind4[SyntaxKind4["LastToken"] = 164 /* LastKeyword */] = "LastToken"; + SyntaxKind4[SyntaxKind4["LastToken"] = 165 /* LastKeyword */] = "LastToken"; SyntaxKind4[SyntaxKind4["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; SyntaxKind4[SyntaxKind4["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; SyntaxKind4[SyntaxKind4["FirstLiteralToken"] = 9 /* NumericLiteral */] = "FirstLiteralToken"; @@ -2880,56 +2890,59 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["LastTemplateToken"] = 18 /* TemplateTail */] = "LastTemplateToken"; SyntaxKind4[SyntaxKind4["FirstBinaryOperator"] = 30 /* LessThanToken */] = "FirstBinaryOperator"; SyntaxKind4[SyntaxKind4["LastBinaryOperator"] = 79 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind4[SyntaxKind4["FirstStatement"] = 242 /* VariableStatement */] = "FirstStatement"; - SyntaxKind4[SyntaxKind4["LastStatement"] = 258 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind4[SyntaxKind4["FirstNode"] = 165 /* QualifiedName */] = "FirstNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 315 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 356 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 333 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 356 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; + SyntaxKind4[SyntaxKind4["FirstStatement"] = 243 /* VariableStatement */] = "FirstStatement"; + SyntaxKind4[SyntaxKind4["LastStatement"] = 259 /* DebuggerStatement */] = "LastStatement"; + SyntaxKind4[SyntaxKind4["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocNode"] = 316 /* JSDocTypeExpression */] = "FirstJSDocNode"; + SyntaxKind4[SyntaxKind4["LastJSDocNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocNode"; + SyntaxKind4[SyntaxKind4["FirstJSDocTagNode"] = 334 /* JSDocTag */] = "FirstJSDocTagNode"; + SyntaxKind4[SyntaxKind4["LastJSDocTagNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; SyntaxKind4[SyntaxKind4["FirstContextualKeyword"] = 128 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 164 /* OfKeyword */] = "LastContextualKeyword"; + SyntaxKind4[SyntaxKind4["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; return SyntaxKind4; })(SyntaxKind || {}); var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { NodeFlags3[NodeFlags3["None"] = 0] = "None"; NodeFlags3[NodeFlags3["Let"] = 1] = "Let"; NodeFlags3[NodeFlags3["Const"] = 2] = "Const"; - NodeFlags3[NodeFlags3["NestedNamespace"] = 4] = "NestedNamespace"; - NodeFlags3[NodeFlags3["Synthesized"] = 8] = "Synthesized"; - NodeFlags3[NodeFlags3["Namespace"] = 16] = "Namespace"; - NodeFlags3[NodeFlags3["OptionalChain"] = 32] = "OptionalChain"; - NodeFlags3[NodeFlags3["ExportContext"] = 64] = "ExportContext"; - NodeFlags3[NodeFlags3["ContainsThis"] = 128] = "ContainsThis"; - NodeFlags3[NodeFlags3["HasImplicitReturn"] = 256] = "HasImplicitReturn"; - NodeFlags3[NodeFlags3["HasExplicitReturn"] = 512] = "HasExplicitReturn"; - NodeFlags3[NodeFlags3["GlobalAugmentation"] = 1024] = "GlobalAugmentation"; - NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 2048] = "HasAsyncFunctions"; - NodeFlags3[NodeFlags3["DisallowInContext"] = 4096] = "DisallowInContext"; - NodeFlags3[NodeFlags3["YieldContext"] = 8192] = "YieldContext"; - NodeFlags3[NodeFlags3["DecoratorContext"] = 16384] = "DecoratorContext"; - NodeFlags3[NodeFlags3["AwaitContext"] = 32768] = "AwaitContext"; - NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 65536] = "DisallowConditionalTypesContext"; - NodeFlags3[NodeFlags3["ThisNodeHasError"] = 131072] = "ThisNodeHasError"; - NodeFlags3[NodeFlags3["JavaScriptFile"] = 262144] = "JavaScriptFile"; - NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 524288] = "ThisNodeOrAnySubNodesHasError"; - NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 1048576] = "HasAggregatedChildData"; - NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 2097152] = "PossiblyContainsDynamicImport"; - NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 4194304] = "PossiblyContainsImportMeta"; - NodeFlags3[NodeFlags3["JSDoc"] = 8388608] = "JSDoc"; - NodeFlags3[NodeFlags3["Ambient"] = 16777216] = "Ambient"; - NodeFlags3[NodeFlags3["InWithStatement"] = 33554432] = "InWithStatement"; - NodeFlags3[NodeFlags3["JsonFile"] = 67108864] = "JsonFile"; - NodeFlags3[NodeFlags3["TypeCached"] = 134217728] = "TypeCached"; - NodeFlags3[NodeFlags3["Deprecated"] = 268435456] = "Deprecated"; - NodeFlags3[NodeFlags3["BlockScoped"] = 3] = "BlockScoped"; - NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 768] = "ReachabilityCheckFlags"; - NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 2816] = "ReachabilityAndEmitFlags"; - NodeFlags3[NodeFlags3["ContextFlags"] = 50720768] = "ContextFlags"; - NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 40960] = "TypeExcludesFlags"; - NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 6291456] = "PermanentlySetIncrementalFlags"; - NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 128 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; - NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 2048 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; + NodeFlags3[NodeFlags3["Using"] = 4] = "Using"; + NodeFlags3[NodeFlags3["AwaitUsing"] = 6] = "AwaitUsing"; + NodeFlags3[NodeFlags3["NestedNamespace"] = 8] = "NestedNamespace"; + NodeFlags3[NodeFlags3["Synthesized"] = 16] = "Synthesized"; + NodeFlags3[NodeFlags3["Namespace"] = 32] = "Namespace"; + NodeFlags3[NodeFlags3["OptionalChain"] = 64] = "OptionalChain"; + NodeFlags3[NodeFlags3["ExportContext"] = 128] = "ExportContext"; + NodeFlags3[NodeFlags3["ContainsThis"] = 256] = "ContainsThis"; + NodeFlags3[NodeFlags3["HasImplicitReturn"] = 512] = "HasImplicitReturn"; + NodeFlags3[NodeFlags3["HasExplicitReturn"] = 1024] = "HasExplicitReturn"; + NodeFlags3[NodeFlags3["GlobalAugmentation"] = 2048] = "GlobalAugmentation"; + NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 4096] = "HasAsyncFunctions"; + NodeFlags3[NodeFlags3["DisallowInContext"] = 8192] = "DisallowInContext"; + NodeFlags3[NodeFlags3["YieldContext"] = 16384] = "YieldContext"; + NodeFlags3[NodeFlags3["DecoratorContext"] = 32768] = "DecoratorContext"; + NodeFlags3[NodeFlags3["AwaitContext"] = 65536] = "AwaitContext"; + NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 131072] = "DisallowConditionalTypesContext"; + NodeFlags3[NodeFlags3["ThisNodeHasError"] = 262144] = "ThisNodeHasError"; + NodeFlags3[NodeFlags3["JavaScriptFile"] = 524288] = "JavaScriptFile"; + NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 1048576] = "ThisNodeOrAnySubNodesHasError"; + NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 2097152] = "HasAggregatedChildData"; + NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 4194304] = "PossiblyContainsDynamicImport"; + NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 8388608] = "PossiblyContainsImportMeta"; + NodeFlags3[NodeFlags3["JSDoc"] = 16777216] = "JSDoc"; + NodeFlags3[NodeFlags3["Ambient"] = 33554432] = "Ambient"; + NodeFlags3[NodeFlags3["InWithStatement"] = 67108864] = "InWithStatement"; + NodeFlags3[NodeFlags3["JsonFile"] = 134217728] = "JsonFile"; + NodeFlags3[NodeFlags3["TypeCached"] = 268435456] = "TypeCached"; + NodeFlags3[NodeFlags3["Deprecated"] = 536870912] = "Deprecated"; + NodeFlags3[NodeFlags3["BlockScoped"] = 7] = "BlockScoped"; + NodeFlags3[NodeFlags3["Constant"] = 6] = "Constant"; + NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 1536] = "ReachabilityCheckFlags"; + NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 5632] = "ReachabilityAndEmitFlags"; + NodeFlags3[NodeFlags3["ContextFlags"] = 101441536] = "ContextFlags"; + NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 81920] = "TypeExcludesFlags"; + NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 12582912] = "PermanentlySetIncrementalFlags"; + NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 256 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; + NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 4096 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; return NodeFlags3; })(NodeFlags || {}); var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { @@ -3180,7 +3193,8 @@ var SignatureFlags = /* @__PURE__ */ ((SignatureFlags4) => { SignatureFlags4[SignatureFlags4["IsOuterCallChain"] = 16] = "IsOuterCallChain"; SignatureFlags4[SignatureFlags4["IsUntypedSignatureInJSFile"] = 32] = "IsUntypedSignatureInJSFile"; SignatureFlags4[SignatureFlags4["IsNonInferrable"] = 64] = "IsNonInferrable"; - SignatureFlags4[SignatureFlags4["PropagatingFlags"] = 39] = "PropagatingFlags"; + SignatureFlags4[SignatureFlags4["IsSignatureCandidateForOverloadFailure"] = 128] = "IsSignatureCandidateForOverloadFailure"; + SignatureFlags4[SignatureFlags4["PropagatingFlags"] = 167] = "PropagatingFlags"; SignatureFlags4[SignatureFlags4["CallChainFlags"] = 24] = "CallChainFlags"; return SignatureFlags4; })(SignatureFlags || {}); @@ -3200,6 +3214,17 @@ var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => { ModuleResolutionKind2[ModuleResolutionKind2["Bundler"] = 100] = "Bundler"; return ModuleResolutionKind2; })(ModuleResolutionKind || {}); +var ScriptKind = /* @__PURE__ */ ((ScriptKind3) => { + ScriptKind3[ScriptKind3["Unknown"] = 0] = "Unknown"; + ScriptKind3[ScriptKind3["JS"] = 1] = "JS"; + ScriptKind3[ScriptKind3["JSX"] = 2] = "JSX"; + ScriptKind3[ScriptKind3["TS"] = 3] = "TS"; + ScriptKind3[ScriptKind3["TSX"] = 4] = "TSX"; + ScriptKind3[ScriptKind3["External"] = 5] = "External"; + ScriptKind3[ScriptKind3["JSON"] = 6] = "JSON"; + ScriptKind3[ScriptKind3["Deferred"] = 7] = "Deferred"; + return ScriptKind3; +})(ScriptKind || {}); var TransformFlags = /* @__PURE__ */ ((TransformFlags3) => { TransformFlags3[TransformFlags3["None"] = 0] = "None"; TransformFlags3[TransformFlags3["ContainsTypeScript"] = 1] = "ContainsTypeScript"; @@ -3562,10 +3587,10 @@ function createDynamicPriorityPollingWatchFile(host) { pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval)); } } -function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) { +function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) { const fileWatcherCallbacks = createMultiMap(); const dirWatchers = /* @__PURE__ */ new Map(); - const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames); + const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2); return nonPollingWatchFile; function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) { const filePath = toCanonicalName(fileName); @@ -3641,8 +3666,8 @@ function createFixedChunkSizePollingWatchFile(host) { pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue"); } } -function createSingleWatcherPerName(cache, useCaseSensitiveFileNames, name, callback, createWatcher) { - const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); +function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) { + const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); const path2 = toCanonicalFileName(name); const existing = cache.get(path2); if (existing) { @@ -3691,7 +3716,7 @@ function sysLog(s) { } function createDirectoryWatcherSupportingRecursive({ watchDirectory, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, getAccessibleSortedChildDirectories, fileSystemEntryExists, @@ -3703,8 +3728,8 @@ function createDirectoryWatcherSupportingRecursive({ const callbackCache = createMultiMap(); const cacheToUpdateChildWatches = /* @__PURE__ */ new Map(); let timerToUpdateChildWatches; - const filePathComparer = getStringComparer(!useCaseSensitiveFileNames); - const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames); + const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2); + const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2); return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options); function createDirectoryWatcher(dirName, options, callback) { const dirPath = toCanonicalFilePath(dirName); @@ -3871,12 +3896,12 @@ function createDirectoryWatcherSupportingRecursive({ } } function isIgnoredPath(path2, options) { - return some(ignoredPaths, (searchPath) => isInPath(path2, searchPath)) || isIgnoredByWatchOptions(path2, options, useCaseSensitiveFileNames, getCurrentDirectory); + return some(ignoredPaths, (searchPath) => isInPath(path2, searchPath)) || isIgnoredByWatchOptions(path2, options, useCaseSensitiveFileNames2, getCurrentDirectory); } function isInPath(path2, searchPath) { if (stringContains(path2, searchPath)) return true; - if (useCaseSensitiveFileNames) + if (useCaseSensitiveFileNames2) return false; return stringContains(toCanonicalFilePath(path2), searchPath); } @@ -3894,14 +3919,14 @@ function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModi } }; } -function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames, getCurrentDirectory) { - return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames, getCurrentDirectory())); +function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) { + return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames2, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2, getCurrentDirectory())); } -function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory) { +function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) { return (eventName, relativeFileName) => { if (eventName === "rename") { const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName)); - if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames, getCurrentDirectory)) { + if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) { callback(fileName); } } @@ -3914,7 +3939,7 @@ function createSystemWatchFunctions({ clearTimeout: clearTimeout2, fsWatchWorker, fileSystemEntryExists, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fsSupportsRecursiveFsWatch, getAccessibleSortedChildDirectories, @@ -3986,7 +4011,7 @@ function createSystemWatchFunctions({ ); case 5 /* UseFsEventsOnParentDirectory */: if (!nonPollingWatchFile) { - nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames); + nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2); } return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options)); default: @@ -4035,7 +4060,7 @@ function createSystemWatchFunctions({ return fsWatch( directoryName, 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), + createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), recursive, 500 /* Medium */, getFallbackOptions(options) @@ -4043,7 +4068,7 @@ function createSystemWatchFunctions({ } if (!hostRecursiveDirectoryWatcher) { hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({ - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fileSystemEntryExists, getAccessibleSortedChildDirectories, @@ -4089,7 +4114,7 @@ function createSystemWatchFunctions({ return fsWatch( directoryName, 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), + createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), recursive, 500 /* Medium */, getFallbackOptions(watchDirectoryOptions) @@ -4117,7 +4142,7 @@ function createSystemWatchFunctions({ function pollingWatchFile(fileName, callback, pollingInterval, options) { return createSingleWatcherPerName( pollingWatches, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, fileName, callback, (cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options) @@ -4126,7 +4151,7 @@ function createSystemWatchFunctions({ function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) { return createSingleWatcherPerName( recursive ? fsWatchesRecursive : fsWatches, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, fileOrDirectory, callback, (cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions) @@ -4254,7 +4279,7 @@ var sys = (() => { const Buffer2 = require("buffer").Buffer; const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin"; const platform = _os.platform(); - const useCaseSensitiveFileNames = isFileSystemCaseSensitive(); + const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive(); const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync; const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename; const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin"; @@ -4265,7 +4290,7 @@ var sys = (() => { setTimeout, clearTimeout, fsWatchWorker, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, getCurrentDirectory, fileSystemEntryExists, // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows @@ -4282,7 +4307,7 @@ var sys = (() => { const nodeSystem = { args: process.argv.slice(2), newLine: _os.EOL, - useCaseSensitiveFileNames, + useCaseSensitiveFileNames: useCaseSensitiveFileNames2, write(s) { process.stdout.write(s); }, @@ -4347,7 +4372,7 @@ var sys = (() => { disableCPUProfiler, cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"), realpath, - debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)), + debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay, tryEnableSourceMapsForHost() { try { require("source-map-support").install(); @@ -4411,12 +4436,12 @@ var sys = (() => { for (const node of profile.nodes) { if (node.callFrame.url) { const url = normalizeSlashes(node.callFrame.url); - if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames)) { + if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) { node.callFrame.url = getRelativePathToDirectoryOrUrl( fileUrlRoot, url, fileUrlRoot, - createGetCanonicalFileName(useCaseSensitiveFileNames), + createGetCanonicalFileName(useCaseSensitiveFileNames2), /*isAbsolutePathAnUrl*/ true ); @@ -4596,7 +4621,7 @@ var sys = (() => { } } function readDirectory(path2, extensions, excludes, includes, depth) { - return matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); + return matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); } function fileSystemEntryExists(path2, entryKind) { const originalStackTraceLimit = Error.stackTraceLimit; @@ -5113,6 +5138,7 @@ var Diagnostics = { Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, 1 /* Error */, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, 1 /* Error */, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: diag(1065, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065", "The return type of an async function or method must be the global Promise type."), In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, 1 /* Error */, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, 1 /* Error */, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, 1 /* Error */, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), @@ -5142,6 +5168,7 @@ var Diagnostics = { A_return_statement_can_only_be_used_within_a_function_body: diag(1108, 1 /* Error */, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), Expression_expected: diag(1109, 1 /* Error */, "Expression_expected_1109", "Expression expected."), Type_expected: diag(1110, 1 /* Error */, "Type_expected_1110", "Type expected."), + Private_field_0_must_be_declared_in_an_enclosing_class: diag(1111, 1 /* Error */, "Private_field_0_must_be_declared_in_an_enclosing_class_1111", "Private field '{0}' must be declared in an enclosing class."), A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, 1 /* Error */, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), Duplicate_label_0: diag(1114, 1 /* Error */, "Duplicate_label_0_1114", "Duplicate label '{0}'."), A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, 1 /* Error */, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), @@ -5176,9 +5203,8 @@ var Diagnostics = { Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, 1 /* Error */, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, 1 /* Error */, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, 1 /* Error */, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), - const_declarations_must_be_initialized: diag(1155, 1 /* Error */, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."), - const_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."), - let_declarations_can_only_be_declared_inside_a_block: diag(1157, 1 /* Error */, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."), + _0_declarations_must_be_initialized: diag(1155, 1 /* Error */, "_0_declarations_must_be_initialized_1155", "'{0}' declarations must be initialized."), + _0_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "_0_declarations_can_only_be_declared_inside_a_block_1156", "'{0}' declarations can only be declared inside a block."), Unterminated_template_literal: diag(1160, 1 /* Error */, "Unterminated_template_literal_1160", "Unterminated template literal."), Unterminated_regular_expression_literal: diag(1161, 1 /* Error */, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), An_object_member_cannot_be_declared_optional: diag(1162, 1 /* Error */, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), @@ -5360,8 +5386,6 @@ var Diagnostics = { Class_constructor_may_not_be_a_generator: diag(1368, 1 /* Error */, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), Did_you_mean_0: diag(1369, 3 /* Message */, "Did_you_mean_0_1369", "Did you mean '{0}'?"), This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, 1 /* Error */, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."), - Convert_to_type_only_import: diag(1373, 3 /* 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, 3 /* 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, 1 /* 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."), _0_was_imported_here: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."), _0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."), @@ -5465,6 +5489,11 @@ var Diagnostics = { Escape_sequence_0_is_not_allowed: diag(1488, 1 /* Error */, "Escape_sequence_0_is_not_allowed_1488", "Escape sequence '{0}' is not allowed."), Decimals_with_leading_zeros_are_not_allowed: diag(1489, 1 /* Error */, "Decimals_with_leading_zeros_are_not_allowed_1489", "Decimals with leading zeros are not allowed."), File_appears_to_be_binary: diag(1490, 1 /* Error */, "File_appears_to_be_binary_1490", "File appears to be binary."), + _0_modifier_cannot_appear_on_a_using_declaration: diag(1491, 1 /* Error */, "_0_modifier_cannot_appear_on_a_using_declaration_1491", "'{0}' modifier cannot appear on a 'using' declaration."), + _0_declarations_may_not_have_binding_patterns: diag(1492, 1 /* Error */, "_0_declarations_may_not_have_binding_patterns_1492", "'{0}' declarations may not have binding patterns."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), + The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), + _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* 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, 1 /* 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( @@ -5559,7 +5588,6 @@ var Diagnostics = { This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, 1 /* Error */, "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}'."), Type_0_does_not_satisfy_the_constraint_1: diag(2344, 1 /* Error */, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, 1 /* Error */, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), - Call_target_does_not_contain_any_signatures: diag(2346, 1 /* Error */, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), Untyped_function_calls_may_not_accept_type_arguments: diag(2347, 1 /* Error */, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, 1 /* Error */, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), This_expression_is_not_callable: diag(2349, 1 /* Error */, "This_expression_is_not_callable_2349", "This expression is not callable."), @@ -6011,6 +6039,11 @@ var Diagnostics = { A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: diag(2846, 1 /* Error */, "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"), The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression: diag(2848, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848", "The right-hand side of an 'instanceof' expression must not be an instantiation expression."), Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1: diag(2849, 1 /* Error */, "Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849", "Target signature provides too few arguments. Expected {0} or more, but got {1}."), + The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined: diag(2850, 1 /* Error */, "The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850", "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: diag(2851, 1 /* Error */, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), + await_using_statements_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(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* 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, 1 /* 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, 1 /* 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}'."), @@ -6164,7 +6197,6 @@ var Diagnostics = { Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: diag(5081, 1 /* Error */, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: diag(5082, 1 /* Error */, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), Cannot_read_file_0: diag(5083, 1 /* Error */, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), - Tuple_members_must_all_have_names_or_all_not_have_names: diag(5084, 1 /* Error */, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."), A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, 1 /* Error */, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, 1 /* Error */, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, 1 /* Error */, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), @@ -6187,6 +6219,8 @@ var Diagnostics = { Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), + Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."), + Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."), Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), @@ -6567,6 +6601,8 @@ var Diagnostics = { Resolved_under_condition_0: diag(6414, 3 /* Message */, "Resolved_under_condition_0_6414", "Resolved under condition '{0}'."), Failed_to_resolve_under_condition_0: diag(6415, 3 /* Message */, "Failed_to_resolve_under_condition_0_6415", "Failed to resolve under condition '{0}'."), Exiting_conditional_exports: diag(6416, 3 /* Message */, "Exiting_conditional_exports_6416", "Exiting conditional exports."), + Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: diag(6417, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", "Searching all ancestor node_modules directories for preferred extensions: {0}."), + Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: diag(6418, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", "Searching all ancestor node_modules directories for fallback extensions: {0}."), The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* Message */, "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_this_index_signature: diag(6501, 3 /* Message */, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, 3 /* Message */, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), @@ -6805,6 +6841,7 @@ var Diagnostics = { Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, 1 /* Error */, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, 1 /* Error */, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, 1 /* Error */, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), + Signature_declarations_can_only_be_used_in_TypeScript_files: diag(8017, 1 /* Error */, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."), Report_errors_in_js_files: diag(8019, 3 /* Message */, "Report_errors_in_js_files_8019", "Report errors in .js files."), JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, 1 /* Error */, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, 1 /* Error */, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), @@ -7079,6 +7116,14 @@ var Diagnostics = { Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."), Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"), Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"), + Use_import_type: diag(95180, 3 /* Message */, "Use_import_type_95180", "Use 'import type'"), + Use_type_0: diag(95181, 3 /* Message */, "Use_type_0_95181", "Use 'type {0}'"), + Fix_all_with_type_only_imports: diag(95182, 3 /* Message */, "Fix_all_with_type_only_imports_95182", "Fix all with type-only imports"), + Cannot_move_statements_to_the_selected_file: diag(95183, 3 /* Message */, "Cannot_move_statements_to_the_selected_file_95183", "Cannot move statements to the selected file"), + Inline_variable: diag(95184, 3 /* Message */, "Inline_variable_95184", "Inline variable"), + Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."), + Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."), + Add_missing_comma_for_object_member_completion_0: diag(95187, 3 /* Message */, "Add_missing_comma_for_object_member_completion_0_95187", "Add missing comma for object member completion '{0}'."), No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* 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, 1 /* 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, 1 /* 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?"), @@ -7105,8 +7150,8 @@ var Diagnostics = { Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, 3 /* Message */, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, 1 /* Error */, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, 1 /* Error */, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), - Await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."), - For_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."), + await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "await_expression_cannot_be_used_inside_a_class_static_block_18037", "'await' expression cannot be used inside a class static block."), + for_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "for_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'for await' loops cannot be used inside a class static block."), Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, 1 /* Error */, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, 1 /* Error */, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, 1 /* Error */, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), @@ -7120,7 +7165,8 @@ var Diagnostics = { The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."), Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"), - Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type.") + Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."), + await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block.") }; // src/compiler/scanner.ts @@ -7137,7 +7183,7 @@ var textToKeywordObj = { as: 130 /* AsKeyword */, asserts: 131 /* AssertsKeyword */, assert: 132 /* AssertKeyword */, - bigint: 162 /* BigIntKeyword */, + bigint: 163 /* BigIntKeyword */, boolean: 136 /* BooleanKeyword */, break: 83 /* BreakKeyword */, case: 84 /* CaseKeyword */, @@ -7158,7 +7204,7 @@ var textToKeywordObj = { false: 97 /* FalseKeyword */, finally: 98 /* FinallyKeyword */, for: 99 /* ForKeyword */, - from: 160 /* FromKeyword */, + from: 161 /* FromKeyword */, function: 100 /* FunctionKeyword */, get: 139 /* GetKeyword */, if: 101 /* IfKeyword */, @@ -7183,11 +7229,11 @@ var textToKeywordObj = { private: 123 /* PrivateKeyword */, protected: 124 /* ProtectedKeyword */, public: 125 /* PublicKeyword */, - override: 163 /* OverrideKeyword */, + override: 164 /* OverrideKeyword */, out: 147 /* OutKeyword */, readonly: 148 /* ReadonlyKeyword */, require: 149 /* RequireKeyword */, - global: 161 /* GlobalKeyword */, + global: 162 /* GlobalKeyword */, return: 107 /* ReturnKeyword */, satisfies: 152 /* SatisfiesKeyword */, set: 153 /* SetKeyword */, @@ -7205,6 +7251,7 @@ var textToKeywordObj = { undefined: 157 /* UndefinedKeyword */, unique: 158 /* UniqueKeyword */, unknown: 159 /* UnknownKeyword */, + using: 160 /* UsingKeyword */, var: 115 /* VarKeyword */, void: 116 /* VoidKeyword */, while: 117 /* WhileKeyword */, @@ -7212,7 +7259,7 @@ var textToKeywordObj = { yield: 127 /* YieldKeyword */, async: 134 /* AsyncKeyword */, await: 135 /* AwaitKeyword */, - of: 164 /* OfKeyword */ + of: 165 /* OfKeyword */ }; var textToKeyword = new Map(Object.entries(textToKeywordObj)); var textToToken = new Map(Object.entries({ @@ -7845,7 +7892,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan if (withMinus) start2--; error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal); - return { type: 9 /* NumericLiteral */, value: tokenValue }; + return 9 /* NumericLiteral */; } } else { mainFragment = scanNumberFragment(); @@ -7885,20 +7932,18 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } if (tokenFlags & 8192 /* ContainsLeadingZero */) { error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2); - return { type: 9 /* NumericLiteral */, value: "" + +result }; + tokenValue = "" + +result; + return 9 /* NumericLiteral */; } if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) { checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */)); - return { - type: 9 /* NumericLiteral */, - value: "" + +result - // if value is not an integer, it can be safely coerced to a number - }; + tokenValue = "" + +result; + return 9 /* NumericLiteral */; } else { tokenValue = result; const type = checkBigIntSuffix(); checkForIdentifierStartAfterNumericLiteral(start2); - return { type, value: tokenValue }; + return type; } } function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) { @@ -8507,7 +8552,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return token = 41 /* MinusToken */; case 46 /* dot */: if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = scanNumber().value; + scanNumber(); return token = 9 /* NumericLiteral */; } if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { @@ -8625,8 +8670,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan case 55 /* _7 */: case 56 /* _8 */: case 57 /* _9 */: - ({ type: token, value: tokenValue } = scanNumber()); - return token; + return token = scanNumber(); case 58 /* colon */: pos++; return token = 59 /* ColonToken */; @@ -9322,7 +9366,7 @@ function findAncestor(node, callback) { return void 0; } function isParseTreeNode(node) { - return (node.flags & 8 /* Synthesized */) === 0; + return (node.flags & 16 /* Synthesized */) === 0; } function getParseTreeNode(node, nodeTest) { if (node === void 0 || isParseTreeNode(node)) { @@ -9361,30 +9405,30 @@ function nameForNamelessJSDocTypedef(declaration) { return getDeclarationIdentifier(hostNode); } switch (hostNode.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); } break; - case 243 /* ExpressionStatement */: + case 244 /* ExpressionStatement */: let expr = hostNode.expression; - if (expr.kind === 225 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { + if (expr.kind === 226 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { expr = expr.left; } switch (expr.kind) { - case 210 /* PropertyAccessExpression */: + case 211 /* PropertyAccessExpression */: return expr.name; - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const arg = expr.argumentExpression; if (isIdentifier(arg)) { return arg; } } break; - case 216 /* ParenthesizedExpression */: { + case 217 /* ParenthesizedExpression */: { return getDeclarationIdentifier(hostNode.expression); } - case 255 /* LabeledStatement */: { + case 256 /* LabeledStatement */: { if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { return getDeclarationIdentifier(hostNode.statement); } @@ -9406,16 +9450,16 @@ function getNonAssignedNameOfDeclaration(declaration) { switch (declaration.kind) { case 80 /* Identifier */: return declaration; - case 354 /* JSDocPropertyTag */: - case 347 /* JSDocParameterTag */: { + case 355 /* JSDocPropertyTag */: + case 348 /* JSDocParameterTag */: { const { name } = declaration; - if (name.kind === 165 /* QualifiedName */) { + if (name.kind === 166 /* QualifiedName */) { return name.right; } break; } - case 212 /* CallExpression */: - case 225 /* BinaryExpression */: { + case 213 /* CallExpression */: + case 226 /* BinaryExpression */: { const expr2 = declaration; switch (getAssignmentDeclarationKind(expr2)) { case 1 /* ExportsProperty */: @@ -9431,15 +9475,15 @@ function getNonAssignedNameOfDeclaration(declaration) { return void 0; } } - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return getNameOfJSDocTypedef(declaration); - case 346 /* JSDocEnumTag */: + case 347 /* JSDocEnumTag */: return nameForNamelessJSDocTypedef(declaration); - case 276 /* ExportAssignment */: { + case 277 /* ExportAssignment */: { const { expression } = declaration; return isIdentifier(expression) ? expression : void 0; } - case 211 /* ElementAccessExpression */: + case 212 /* ElementAccessExpression */: const expr = declaration; if (isBindableStaticElementAccessExpression(expr)) { return expr.argumentExpression; @@ -9598,29 +9642,29 @@ function isMemberName(node) { return node.kind === 80 /* Identifier */ || node.kind === 81 /* PrivateIdentifier */; } function isPropertyAccessChain(node) { - return isPropertyAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isPropertyAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isElementAccessChain(node) { - return isElementAccessExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isElementAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isCallChain(node) { - return isCallExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isCallExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isOptionalChain(node) { const kind = node.kind; - return !!(node.flags & 32 /* OptionalChain */) && (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */ || kind === 212 /* CallExpression */ || kind === 234 /* NonNullExpression */); + return !!(node.flags & 64 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 235 /* NonNullExpression */); } function skipPartiallyEmittedExpressions(node) { return skipOuterExpressions(node, 8 /* PartiallyEmittedExpressions */); } function isNonNullChain(node) { - return isNonNullExpression(node) && !!(node.flags & 32 /* OptionalChain */); + return isNonNullExpression(node) && !!(node.flags & 64 /* OptionalChain */); } function isNamedExportBindings(node) { - return node.kind === 279 /* NamespaceExport */ || node.kind === 278 /* NamedExports */; + return node.kind === 280 /* NamespaceExport */ || node.kind === 279 /* NamedExports */; } function isNodeKind(kind) { - return kind >= 165 /* FirstNode */; + return kind >= 166 /* FirstNode */; } function isNodeArray(array) { return hasProperty(array, "pos") && hasProperty(array, "end"); @@ -9668,7 +9712,7 @@ function isModifierKind(token) { case 148 /* ReadonlyKeyword */: case 126 /* StaticKeyword */: case 147 /* OutKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return true; } return false; @@ -9677,35 +9721,35 @@ function isParameterPropertyModifier(kind) { return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 163 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; + return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; } function isModifier(node) { return isModifierKind(node.kind); } function isEntityName(node) { const kind = node.kind; - return kind === 165 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; } function isPropertyName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 166 /* ComputedPropertyName */; + return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; } function isBindingName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 205 /* ObjectBindingPattern */ || kind === 206 /* ArrayBindingPattern */; + return kind === 80 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; } function isFunctionLike(node) { return !!node && isFunctionLikeKind(node.kind); } function isFunctionLikeDeclarationKind(kind) { switch (kind) { - case 261 /* FunctionDeclaration */: - case 173 /* MethodDeclaration */: - case 175 /* Constructor */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: + case 262 /* FunctionDeclaration */: + case 174 /* MethodDeclaration */: + case 176 /* Constructor */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: return true; default: return false; @@ -9713,14 +9757,14 @@ function isFunctionLikeDeclarationKind(kind) { } function isFunctionLikeKind(kind) { switch (kind) { - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 329 /* JSDocSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 183 /* FunctionType */: - case 323 /* JSDocFunctionType */: - case 184 /* ConstructorType */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 330 /* JSDocSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 184 /* FunctionType */: + case 324 /* JSDocFunctionType */: + case 185 /* ConstructorType */: return true; default: return isFunctionLikeDeclarationKind(kind); @@ -9728,16 +9772,16 @@ function isFunctionLikeKind(kind) { } function isClassElement(node) { const kind = node.kind; - return kind === 175 /* Constructor */ || kind === 171 /* PropertyDeclaration */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 180 /* IndexSignature */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 239 /* SemicolonClassElement */; + return kind === 176 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 240 /* SemicolonClassElement */; } function isAccessor(node) { - return node && (node.kind === 176 /* GetAccessor */ || node.kind === 177 /* SetAccessor */); + return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); } function isMethodOrAccessor(node) { switch (node.kind) { - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return true; default: return false; @@ -9748,19 +9792,19 @@ function isModifierLike(node) { } function isTypeElement(node) { const kind = node.kind; - return kind === 179 /* ConstructSignature */ || kind === 178 /* CallSignature */ || kind === 170 /* PropertySignature */ || kind === 172 /* MethodSignature */ || kind === 180 /* IndexSignature */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function isObjectLiteralElementLike(node) { const kind = node.kind; - return kind === 302 /* PropertyAssignment */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 304 /* SpreadAssignment */ || kind === 173 /* MethodDeclaration */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */; + return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 305 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; } function isTypeNode(node) { return isTypeNodeKind(node.kind); } function isFunctionOrConstructorTypeNode(node) { switch (node.kind) { - case 183 /* FunctionType */: - case 184 /* ConstructorType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: return true; } return false; @@ -9768,49 +9812,49 @@ function isFunctionOrConstructorTypeNode(node) { function isBindingPattern(node) { if (node) { const kind = node.kind; - return kind === 206 /* ArrayBindingPattern */ || kind === 205 /* ObjectBindingPattern */; + return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; } return false; } function isAssignmentPattern(node) { const kind = node.kind; - return kind === 208 /* ArrayLiteralExpression */ || kind === 209 /* ObjectLiteralExpression */; + return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; } function isArrayBindingElement(node) { const kind = node.kind; - return kind === 207 /* BindingElement */ || kind === 231 /* OmittedExpression */; + return kind === 208 /* BindingElement */ || kind === 232 /* OmittedExpression */; } function isDeclarationBindingElement(bindingElement) { switch (bindingElement.kind) { - case 259 /* VariableDeclaration */: - case 168 /* Parameter */: - case 207 /* BindingElement */: + case 260 /* VariableDeclaration */: + case 169 /* Parameter */: + case 208 /* BindingElement */: return true; } return false; } function isTemplateLiteral(node) { const kind = node.kind; - return kind === 227 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; + return kind === 228 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; } function isLeftHandSideExpression(node) { return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); } function isLeftHandSideExpressionKind(kind) { switch (kind) { - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 213 /* NewExpression */: - case 212 /* CallExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: - case 214 /* TaggedTemplateExpression */: - case 208 /* ArrayLiteralExpression */: - case 216 /* ParenthesizedExpression */: - case 209 /* ObjectLiteralExpression */: - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 214 /* NewExpression */: + case 213 /* CallExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: + case 215 /* TaggedTemplateExpression */: + case 209 /* ArrayLiteralExpression */: + case 217 /* ParenthesizedExpression */: + case 210 /* ObjectLiteralExpression */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: case 80 /* Identifier */: case 81 /* PrivateIdentifier */: case 14 /* RegularExpressionLiteral */: @@ -9818,17 +9862,17 @@ function isLeftHandSideExpressionKind(kind) { case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: + case 228 /* TemplateExpression */: case 97 /* FalseKeyword */: case 106 /* NullKeyword */: case 110 /* ThisKeyword */: case 112 /* TrueKeyword */: case 108 /* SuperKeyword */: - case 234 /* NonNullExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 235 /* MetaProperty */: + case 235 /* NonNullExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 236 /* MetaProperty */: case 102 /* ImportKeyword */: - case 281 /* MissingDeclaration */: + case 282 /* MissingDeclaration */: return true; default: return false; @@ -9839,13 +9883,13 @@ function isUnaryExpression(node) { } function isUnaryExpressionKind(kind) { switch (kind) { - case 223 /* PrefixUnaryExpression */: - case 224 /* PostfixUnaryExpression */: - case 219 /* DeleteExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 222 /* AwaitExpression */: - case 215 /* TypeAssertionExpression */: + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + case 220 /* DeleteExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 223 /* AwaitExpression */: + case 216 /* TypeAssertionExpression */: return true; default: return isLeftHandSideExpressionKind(kind); @@ -9856,7 +9900,7 @@ function isLiteralTypeLiteral(node) { case 106 /* NullKeyword */: case 112 /* TrueKeyword */: case 97 /* FalseKeyword */: - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: return true; default: return isLiteralExpression(node); @@ -9867,16 +9911,16 @@ function isExpression(node) { } function isExpressionKind(kind) { switch (kind) { - case 226 /* ConditionalExpression */: - case 228 /* YieldExpression */: - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 229 /* SpreadElement */: - case 233 /* AsExpression */: - case 231 /* OmittedExpression */: - case 360 /* CommaListExpression */: - case 359 /* PartiallyEmittedExpression */: - case 237 /* SatisfiesExpression */: + case 227 /* ConditionalExpression */: + case 229 /* YieldExpression */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 230 /* SpreadElement */: + case 234 /* AsExpression */: + case 232 /* OmittedExpression */: + case 361 /* CommaListExpression */: + case 360 /* PartiallyEmittedExpression */: + case 238 /* SatisfiesExpression */: return true; default: return isUnaryExpressionKind(kind); @@ -9890,24 +9934,24 @@ function isForInitializer(node) { } function isModuleBody(node) { const kind = node.kind; - return kind === 267 /* ModuleBlock */ || kind === 266 /* ModuleDeclaration */ || kind === 80 /* Identifier */; + return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */ || kind === 80 /* Identifier */; } function isNamedImportBindings(node) { const kind = node.kind; - return kind === 274 /* NamedImports */ || kind === 273 /* NamespaceImport */; + return kind === 275 /* NamedImports */ || kind === 274 /* NamespaceImport */; } function isDeclarationKind(kind) { - return kind === 218 /* ArrowFunction */ || kind === 207 /* BindingElement */ || kind === 262 /* ClassDeclaration */ || kind === 230 /* ClassExpression */ || kind === 174 /* ClassStaticBlockDeclaration */ || kind === 175 /* Constructor */ || kind === 265 /* EnumDeclaration */ || kind === 305 /* EnumMember */ || kind === 280 /* ExportSpecifier */ || kind === 261 /* FunctionDeclaration */ || kind === 217 /* FunctionExpression */ || kind === 176 /* GetAccessor */ || kind === 272 /* ImportClause */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 275 /* ImportSpecifier */ || kind === 263 /* InterfaceDeclaration */ || kind === 290 /* JsxAttribute */ || kind === 173 /* MethodDeclaration */ || kind === 172 /* MethodSignature */ || kind === 266 /* ModuleDeclaration */ || kind === 269 /* NamespaceExportDeclaration */ || kind === 273 /* NamespaceImport */ || kind === 279 /* NamespaceExport */ || kind === 168 /* Parameter */ || kind === 302 /* PropertyAssignment */ || kind === 171 /* PropertyDeclaration */ || kind === 170 /* PropertySignature */ || kind === 177 /* SetAccessor */ || kind === 303 /* ShorthandPropertyAssignment */ || kind === 264 /* TypeAliasDeclaration */ || kind === 167 /* TypeParameter */ || kind === 259 /* VariableDeclaration */ || kind === 352 /* JSDocTypedefTag */ || kind === 344 /* JSDocCallbackTag */ || kind === 354 /* JSDocPropertyTag */; + return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 176 /* Constructor */ || kind === 266 /* EnumDeclaration */ || kind === 306 /* EnumMember */ || kind === 281 /* ExportSpecifier */ || kind === 262 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 273 /* ImportClause */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 276 /* ImportSpecifier */ || kind === 264 /* InterfaceDeclaration */ || kind === 291 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 267 /* ModuleDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 274 /* NamespaceImport */ || kind === 280 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 303 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 265 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 260 /* VariableDeclaration */ || kind === 353 /* JSDocTypedefTag */ || kind === 345 /* JSDocCallbackTag */ || kind === 355 /* JSDocPropertyTag */; } function isDeclarationStatementKind(kind) { - return kind === 261 /* FunctionDeclaration */ || kind === 281 /* MissingDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 269 /* NamespaceExportDeclaration */; + return kind === 262 /* FunctionDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 270 /* NamespaceExportDeclaration */; } function isStatementKindButNotDeclarationKind(kind) { - return kind === 251 /* BreakStatement */ || kind === 250 /* ContinueStatement */ || kind === 258 /* DebuggerStatement */ || kind === 245 /* DoStatement */ || kind === 243 /* ExpressionStatement */ || kind === 241 /* EmptyStatement */ || kind === 248 /* ForInStatement */ || kind === 249 /* ForOfStatement */ || kind === 247 /* ForStatement */ || kind === 244 /* IfStatement */ || kind === 255 /* LabeledStatement */ || kind === 252 /* ReturnStatement */ || kind === 254 /* SwitchStatement */ || kind === 256 /* ThrowStatement */ || kind === 257 /* TryStatement */ || kind === 242 /* VariableStatement */ || kind === 246 /* WhileStatement */ || kind === 253 /* WithStatement */ || kind === 358 /* NotEmittedStatement */; + return kind === 252 /* BreakStatement */ || kind === 251 /* ContinueStatement */ || kind === 259 /* DebuggerStatement */ || kind === 246 /* DoStatement */ || kind === 244 /* ExpressionStatement */ || kind === 242 /* EmptyStatement */ || kind === 249 /* ForInStatement */ || kind === 250 /* ForOfStatement */ || kind === 248 /* ForStatement */ || kind === 245 /* IfStatement */ || kind === 256 /* LabeledStatement */ || kind === 253 /* ReturnStatement */ || kind === 255 /* SwitchStatement */ || kind === 257 /* ThrowStatement */ || kind === 258 /* TryStatement */ || kind === 243 /* VariableStatement */ || kind === 247 /* WhileStatement */ || kind === 254 /* WithStatement */ || kind === 359 /* NotEmittedStatement */; } function isDeclaration(node) { - if (node.kind === 167 /* TypeParameter */) { - return node.parent && node.parent.kind !== 351 /* JSDocTemplateTag */ || isInJSFile(node); + if (node.kind === 168 /* TypeParameter */) { + return node.parent && node.parent.kind !== 352 /* JSDocTemplateTag */ || isInJSFile(node); } return isDeclarationKind(node.kind); } @@ -9916,10 +9960,10 @@ function isStatement(node) { return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); } function isBlockStatement(node) { - if (node.kind !== 240 /* Block */) + if (node.kind !== 241 /* Block */) return false; if (node.parent !== void 0) { - if (node.parent.kind === 257 /* TryStatement */ || node.parent.kind === 298 /* CatchClause */) { + if (node.parent.kind === 258 /* TryStatement */ || node.parent.kind === 299 /* CatchClause */) { return false; } } @@ -9927,34 +9971,34 @@ function isBlockStatement(node) { } function isStatementOrBlock(node) { const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 240 /* Block */; + return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 241 /* Block */; } function isModuleReference(node) { const kind = node.kind; - return kind === 282 /* ExternalModuleReference */ || kind === 165 /* QualifiedName */ || kind === 80 /* Identifier */; + return kind === 283 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; } function isJsxTagNameExpression(node) { const kind = node.kind; - return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 210 /* PropertyAccessExpression */ || kind === 294 /* JsxNamespacedName */; + return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 211 /* PropertyAccessExpression */ || kind === 295 /* JsxNamespacedName */; } function isJsxChild(node) { const kind = node.kind; - return kind === 283 /* JsxElement */ || kind === 293 /* JsxExpression */ || kind === 284 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 287 /* JsxFragment */; + return kind === 284 /* JsxElement */ || kind === 294 /* JsxExpression */ || kind === 285 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 288 /* JsxFragment */; } function isJsxAttributeLike(node) { const kind = node.kind; - return kind === 290 /* JsxAttribute */ || kind === 292 /* JsxSpreadAttribute */; + return kind === 291 /* JsxAttribute */ || kind === 293 /* JsxSpreadAttribute */; } function isStringLiteralOrJsxExpression(node) { const kind = node.kind; - return kind === 11 /* StringLiteral */ || kind === 293 /* JsxExpression */; + return kind === 11 /* StringLiteral */ || kind === 294 /* JsxExpression */; } function isCaseOrDefaultClause(node) { const kind = node.kind; - return kind === 295 /* CaseClause */ || kind === 296 /* DefaultClause */; + return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */; } function isJSDocNode(node) { - return node.kind >= 315 /* FirstJSDocNode */ && node.kind <= 356 /* LastJSDocNode */; + return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 357 /* LastJSDocNode */; } function hasJSDocNodes(node) { if (!canHaveJSDoc(node)) @@ -10025,19 +10069,19 @@ function packageIdToString(packageId) { } function containsParseError(node) { aggregateChildData(node); - return (node.flags & 524288 /* ThisNodeOrAnySubNodesHasError */) !== 0; + return (node.flags & 1048576 /* ThisNodeOrAnySubNodesHasError */) !== 0; } function aggregateChildData(node) { - if (!(node.flags & 1048576 /* HasAggregatedChildData */)) { - const thisNodeOrAnySubNodesHasError = (node.flags & 131072 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); + if (!(node.flags & 2097152 /* HasAggregatedChildData */)) { + const thisNodeOrAnySubNodesHasError = (node.flags & 262144 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); if (thisNodeOrAnySubNodesHasError) { - node.flags |= 524288 /* ThisNodeOrAnySubNodesHasError */; + node.flags |= 1048576 /* ThisNodeOrAnySubNodesHasError */; } - node.flags |= 1048576 /* HasAggregatedChildData */; + node.flags |= 2097152 /* HasAggregatedChildData */; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 311 /* SourceFile */) { + while (node && node.kind !== 312 /* SourceFile */) { node = node.parent; } return node; @@ -10092,10 +10136,10 @@ function isModuleWithStringLiteralName(node) { return isModuleDeclaration(node) && node.name.kind === 11 /* StringLiteral */; } function isGlobalScopeAugmentation(module2) { - return !!(module2.flags & 1024 /* GlobalAugmentation */); + return !!(module2.flags & 2048 /* GlobalAugmentation */); } function isComputedNonLiteralName(name) { - return name.kind === 166 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); + return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); } function tryGetTextOfPropertyName(name) { var _a; @@ -10107,11 +10151,11 @@ function tryGetTextOfPropertyName(name) { case 9 /* NumericLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: return escapeLeadingUnderscores(name.text); - case 166 /* ComputedPropertyName */: + case 167 /* ComputedPropertyName */: if (isStringOrNumericLiteralLike(name.expression)) return escapeLeadingUnderscores(name.expression.text); return void 0; - case 294 /* JsxNamespacedName */: + case 295 /* JsxNamespacedName */: return getEscapedTextOfJsxNamespacedName(name); default: return Debug.assertNever(name); @@ -10149,7 +10193,7 @@ function getSpanOfTokenAtPosition(sourceFile, pos) { } function getErrorSpanForArrowFunction(sourceFile, node) { const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 240 /* Block */) { + if (node.body && node.body.kind === 241 /* Block */) { const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); if (startLine < endLine) { @@ -10161,7 +10205,7 @@ function getErrorSpanForArrowFunction(sourceFile, node) { function getErrorSpanForNode(sourceFile, node) { let errorNode = node; switch (node.kind) { - case 311 /* SourceFile */: { + case 312 /* SourceFile */: { const pos2 = skipTrivia( sourceFile.text, 0, @@ -10173,43 +10217,43 @@ function getErrorSpanForNode(sourceFile, node) { } return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 259 /* VariableDeclaration */: - case 207 /* BindingElement */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 263 /* InterfaceDeclaration */: - case 266 /* ModuleDeclaration */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 264 /* TypeAliasDeclaration */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 273 /* NamespaceImport */: + case 260 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 264 /* InterfaceDeclaration */: + case 267 /* ModuleDeclaration */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 265 /* TypeAliasDeclaration */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 274 /* NamespaceImport */: errorNode = node.name; break; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return getErrorSpanForArrowFunction(sourceFile, node); - case 295 /* CaseClause */: - case 296 /* DefaultClause */: { + case 296 /* CaseClause */: + case 297 /* DefaultClause */: { const start = skipTrivia(sourceFile.text, node.pos); const end = node.statements.length > 0 ? node.statements[0].pos : node.end; return createTextSpanFromBounds(start, end); } - case 252 /* ReturnStatement */: - case 228 /* YieldExpression */: { + case 253 /* ReturnStatement */: + case 229 /* YieldExpression */: { const pos2 = skipTrivia(sourceFile.text, node.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 237 /* SatisfiesExpression */: { + case 238 /* SatisfiesExpression */: { const pos2 = skipTrivia(sourceFile.text, node.expression.end); return getSpanOfTokenAtPosition(sourceFile, pos2); } - case 356 /* JSDocSatisfiesTag */: { + case 357 /* JSDocSatisfiesTag */: { const pos2 = skipTrivia(sourceFile.text, node.tagName.pos); return getSpanOfTokenAtPosition(sourceFile, pos2); } @@ -10236,7 +10280,7 @@ function isJsonSourceFile(file) { return file.scriptKind === 6 /* JSON */; } function isPrologueDirective(node) { - return node.kind === 243 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; + return node.kind === 244 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; } function isCustomPrologue(node) { return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); @@ -10251,34 +10295,34 @@ function isHoistedVariableStatement(node) { return isCustomPrologue(node) && isVariableStatement(node) && every(node.declarationList.declarations, isHoistedVariable); } function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 168 /* Parameter */ || node.kind === 167 /* TypeParameter */ || node.kind === 217 /* FunctionExpression */ || node.kind === 218 /* ArrowFunction */ || node.kind === 216 /* ParenthesizedExpression */ || node.kind === 259 /* VariableDeclaration */ || node.kind === 280 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); + const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 260 /* VariableDeclaration */ || node.kind === 281 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); } function isVariableLike(node) { if (node) { switch (node.kind) { - case 207 /* BindingElement */: - case 305 /* EnumMember */: - case 168 /* Parameter */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 303 /* ShorthandPropertyAssignment */: - case 259 /* VariableDeclaration */: + case 208 /* BindingElement */: + case 306 /* EnumMember */: + case 169 /* Parameter */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 304 /* ShorthandPropertyAssignment */: + case 260 /* VariableDeclaration */: return true; } } return false; } function isFunctionBlock(node) { - return node && node.kind === 240 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 241 /* Block */ && isFunctionLike(node.parent); } function isSuperProperty(node) { const kind = node.kind; - return (kind === 210 /* PropertyAccessExpression */ || kind === 211 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; + return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; } function isInJSFile(node) { - return !!node && !!(node.flags & 262144 /* JavaScriptFile */); + return !!node && !!(node.flags & 524288 /* JavaScriptFile */); } function isStringDoubleQuoted(str, sourceFile) { return getSourceTextOfNodeFromSourceFile(sourceFile, str).charCodeAt(0) === 34 /* doubleQuote */; @@ -10427,12 +10471,12 @@ function getSourceOfDefaultedAssignment(node) { } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { - case 242 /* VariableStatement */: + case 243 /* VariableStatement */: const v = getSingleVariableOfVariableStatement(node); return v && v.initializer; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return node.initializer; - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return node.initializer; } } @@ -10440,76 +10484,76 @@ function getSingleVariableOfVariableStatement(node) { return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 266 /* ModuleDeclaration */ ? node.body : void 0; + return isModuleDeclaration(node) && node.body && node.body.kind === 267 /* ModuleDeclaration */ ? node.body : void 0; } function canHaveJSDoc(node) { switch (node.kind) { - case 218 /* ArrowFunction */: - case 225 /* BinaryExpression */: - case 240 /* Block */: - case 251 /* BreakStatement */: - case 178 /* CallSignature */: - case 295 /* CaseClause */: - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: - case 174 /* ClassStaticBlockDeclaration */: - case 175 /* Constructor */: - case 184 /* ConstructorType */: - case 179 /* ConstructSignature */: - case 250 /* ContinueStatement */: - case 258 /* DebuggerStatement */: - case 245 /* DoStatement */: - case 211 /* ElementAccessExpression */: - case 241 /* EmptyStatement */: + case 219 /* ArrowFunction */: + case 226 /* BinaryExpression */: + case 241 /* Block */: + case 252 /* BreakStatement */: + case 179 /* CallSignature */: + case 296 /* CaseClause */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: + case 175 /* ClassStaticBlockDeclaration */: + case 176 /* Constructor */: + case 185 /* ConstructorType */: + case 180 /* ConstructSignature */: + case 251 /* ContinueStatement */: + case 259 /* DebuggerStatement */: + case 246 /* DoStatement */: + case 212 /* ElementAccessExpression */: + case 242 /* EmptyStatement */: case 1 /* EndOfFileToken */: - case 265 /* EnumDeclaration */: - case 305 /* EnumMember */: - case 276 /* ExportAssignment */: - case 277 /* ExportDeclaration */: - case 280 /* ExportSpecifier */: - case 243 /* ExpressionStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 261 /* FunctionDeclaration */: - case 217 /* FunctionExpression */: - case 183 /* FunctionType */: - case 176 /* GetAccessor */: + case 266 /* EnumDeclaration */: + case 306 /* EnumMember */: + case 277 /* ExportAssignment */: + case 278 /* ExportDeclaration */: + case 281 /* ExportSpecifier */: + case 244 /* ExpressionStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 262 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 184 /* FunctionType */: + case 177 /* GetAccessor */: case 80 /* Identifier */: - case 244 /* IfStatement */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 323 /* JSDocFunctionType */: - case 329 /* JSDocSignature */: - case 255 /* LabeledStatement */: - case 173 /* MethodDeclaration */: - case 172 /* MethodSignature */: - case 266 /* ModuleDeclaration */: - case 201 /* NamedTupleMember */: - case 269 /* NamespaceExportDeclaration */: - case 209 /* ObjectLiteralExpression */: - case 168 /* Parameter */: - case 216 /* ParenthesizedExpression */: - case 210 /* PropertyAccessExpression */: - case 302 /* PropertyAssignment */: - case 171 /* PropertyDeclaration */: - case 170 /* PropertySignature */: - case 252 /* ReturnStatement */: - case 239 /* SemicolonClassElement */: - case 177 /* SetAccessor */: - case 303 /* ShorthandPropertyAssignment */: - case 304 /* SpreadAssignment */: - case 254 /* SwitchStatement */: - case 256 /* ThrowStatement */: - case 257 /* TryStatement */: - case 264 /* TypeAliasDeclaration */: - case 167 /* TypeParameter */: - case 259 /* VariableDeclaration */: - case 242 /* VariableStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: + case 245 /* IfStatement */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 324 /* JSDocFunctionType */: + case 330 /* JSDocSignature */: + case 256 /* LabeledStatement */: + case 174 /* MethodDeclaration */: + case 173 /* MethodSignature */: + case 267 /* ModuleDeclaration */: + case 202 /* NamedTupleMember */: + case 270 /* NamespaceExportDeclaration */: + case 210 /* ObjectLiteralExpression */: + case 169 /* Parameter */: + case 217 /* ParenthesizedExpression */: + case 211 /* PropertyAccessExpression */: + case 303 /* PropertyAssignment */: + case 172 /* PropertyDeclaration */: + case 171 /* PropertySignature */: + case 253 /* ReturnStatement */: + case 240 /* SemicolonClassElement */: + case 178 /* SetAccessor */: + case 304 /* ShorthandPropertyAssignment */: + case 305 /* SpreadAssignment */: + case 255 /* SwitchStatement */: + case 257 /* ThrowStatement */: + case 258 /* TryStatement */: + case 265 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 260 /* VariableDeclaration */: + case 243 /* VariableStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: return true; default: return false; @@ -10525,11 +10569,11 @@ function getJSDocCommentsAndTags(hostNode, noCache) { if (hasJSDocNodes(node)) { result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); } - if (node.kind === 168 /* Parameter */) { + if (node.kind === 169 /* Parameter */) { result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); break; } - if (node.kind === 167 /* TypeParameter */) { + if (node.kind === 168 /* TypeParameter */) { result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); break; } @@ -10549,7 +10593,7 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent = node.parent; - if (parent.kind === 302 /* PropertyAssignment */ || parent.kind === 276 /* ExportAssignment */ || parent.kind === 171 /* PropertyDeclaration */ || parent.kind === 243 /* ExpressionStatement */ && node.kind === 210 /* PropertyAccessExpression */ || parent.kind === 252 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { + if (parent.kind === 303 /* PropertyAssignment */ || parent.kind === 277 /* ExportAssignment */ || parent.kind === 172 /* PropertyDeclaration */ || parent.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { return parent; } else if (parent.parent && (getSingleVariableOfVariableStatement(parent.parent) === node || isBinaryExpression(parent) && parent.operatorToken.kind === 64 /* EqualsToken */)) { return parent.parent; @@ -10562,7 +10606,7 @@ function skipParentheses(node, excludeJSDocTypeAssertions) { return skipOuterExpressions(node, flags); } function isKeyword(token) { - return 83 /* FirstKeyword */ <= token && token <= 164 /* LastKeyword */; + return 83 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; } function isPunctuation(token) { return 19 /* FirstPunctuation */ <= token && token <= 79 /* LastPunctuation */; @@ -10577,7 +10621,7 @@ function isSignedNumericLiteral(node) { return isPrefixUnaryExpression(node) && (node.operator === 40 /* PlusToken */ || node.operator === 41 /* MinusToken */) && isNumericLiteral(node.operand); } function isDynamicName(name) { - if (!(name.kind === 166 /* ComputedPropertyName */ || name.kind === 211 /* ElementAccessExpression */)) { + if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { return false; } const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; @@ -10591,22 +10635,22 @@ function nodeIsSynthesized(range) { } function getExpressionAssociativity(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 213 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; return getOperatorAssociativity(expression.kind, operator, hasArguments); } function getOperatorAssociativity(kind, operator, hasArguments) { switch (kind) { - case 213 /* NewExpression */: + case 214 /* NewExpression */: return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 223 /* PrefixUnaryExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 222 /* AwaitExpression */: - case 226 /* ConditionalExpression */: - case 228 /* YieldExpression */: + case 224 /* PrefixUnaryExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 223 /* AwaitExpression */: + case 227 /* ConditionalExpression */: + case 229 /* YieldExpression */: return 1 /* Right */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (operator) { case 43 /* AsteriskAsteriskToken */: case 64 /* EqualsToken */: @@ -10632,13 +10676,13 @@ function getOperatorAssociativity(kind, operator, hasArguments) { } function getExpressionPrecedence(expression) { const operator = getOperator(expression); - const hasArguments = expression.kind === 213 /* NewExpression */ && expression.arguments !== void 0; + const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; return getOperatorPrecedence(expression.kind, operator, hasArguments); } function getOperator(expression) { - if (expression.kind === 225 /* BinaryExpression */) { + if (expression.kind === 226 /* BinaryExpression */) { return expression.operatorToken.kind; - } else if (expression.kind === 223 /* PrefixUnaryExpression */ || expression.kind === 224 /* PostfixUnaryExpression */) { + } else if (expression.kind === 224 /* PrefixUnaryExpression */ || expression.kind === 225 /* PostfixUnaryExpression */) { return expression.operator; } else { return expression.kind; @@ -10646,15 +10690,15 @@ function getOperator(expression) { } function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { switch (nodeKind) { - case 360 /* CommaListExpression */: + case 361 /* CommaListExpression */: return 0 /* Comma */; - case 229 /* SpreadElement */: + case 230 /* SpreadElement */: return 1 /* Spread */; - case 228 /* YieldExpression */: + case 229 /* YieldExpression */: return 2 /* Yield */; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: return 4 /* Conditional */; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: switch (operatorKind) { case 28 /* CommaToken */: return 0 /* Comma */; @@ -10678,27 +10722,27 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { default: return getBinaryOperatorPrecedence(operatorKind); } - case 215 /* TypeAssertionExpression */: - case 234 /* NonNullExpression */: - case 223 /* PrefixUnaryExpression */: - case 220 /* TypeOfExpression */: - case 221 /* VoidExpression */: - case 219 /* DeleteExpression */: - case 222 /* AwaitExpression */: + case 216 /* TypeAssertionExpression */: + case 235 /* NonNullExpression */: + case 224 /* PrefixUnaryExpression */: + case 221 /* TypeOfExpression */: + case 222 /* VoidExpression */: + case 220 /* DeleteExpression */: + case 223 /* AwaitExpression */: return 16 /* Unary */; - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: return 17 /* Update */; - case 212 /* CallExpression */: + case 213 /* CallExpression */: return 18 /* LeftHandSide */; - case 213 /* NewExpression */: + case 214 /* NewExpression */: return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 214 /* TaggedTemplateExpression */: - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: - case 235 /* MetaProperty */: + case 215 /* TaggedTemplateExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: + case 236 /* MetaProperty */: return 19 /* Member */; - case 233 /* AsExpression */: - case 237 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 238 /* SatisfiesExpression */: return 11 /* Relational */; case 110 /* ThisKeyword */: case 108 /* SuperKeyword */: @@ -10710,19 +10754,19 @@ function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { case 9 /* NumericLiteral */: case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: - case 208 /* ArrayLiteralExpression */: - case 209 /* ObjectLiteralExpression */: - case 217 /* FunctionExpression */: - case 218 /* ArrowFunction */: - case 230 /* ClassExpression */: + case 209 /* ArrayLiteralExpression */: + case 210 /* ObjectLiteralExpression */: + case 218 /* FunctionExpression */: + case 219 /* ArrowFunction */: + case 231 /* ClassExpression */: case 14 /* RegularExpressionLiteral */: case 15 /* NoSubstitutionTemplateLiteral */: - case 227 /* TemplateExpression */: - case 216 /* ParenthesizedExpression */: - case 231 /* OmittedExpression */: - case 283 /* JsxElement */: - case 284 /* JsxSelfClosingElement */: - case 287 /* JsxFragment */: + case 228 /* TemplateExpression */: + case 217 /* ParenthesizedExpression */: + case 232 /* OmittedExpression */: + case 284 /* JsxElement */: + case 285 /* JsxSelfClosingElement */: + case 288 /* JsxFragment */: return 20 /* Primary */; default: return -1 /* Invalid */; @@ -10845,7 +10889,7 @@ function getSelectedSyntacticModifierFlags(node, flags) { return getSyntacticModifierFlags(node) & flags; } function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 164 /* LastToken */) { + if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { return 0 /* None */; } if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { @@ -10888,7 +10932,7 @@ function getEffectiveModifierFlagsNoCache(node) { } function getSyntacticModifierFlagsNoCache(node) { let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */; - if (node.flags & 4 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 2048 /* IdentifierIsInJSDocNamespace */) { + if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { flags |= 1 /* Export */; } return flags; @@ -10928,13 +10972,13 @@ function modifierToFlag(token) { return 512 /* Async */; case 148 /* ReadonlyKeyword */: return 64 /* Readonly */; - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: return 16384 /* Override */; case 103 /* InKeyword */: return 32768 /* In */; case 147 /* OutKeyword */: return 65536 /* Out */; - case 169 /* Decorator */: + case 170 /* Decorator */: return 131072 /* Decorator */; } return 0 /* None */; @@ -10996,36 +11040,36 @@ function getLastChild(node) { return lastChild; } function isTypeNodeKind(kind) { - return kind >= 181 /* FirstTypeNode */ && kind <= 204 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 162 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 232 /* ExpressionWithTypeArguments */ || kind === 318 /* JSDocAllType */ || kind === 319 /* JSDocUnknownType */ || kind === 320 /* JSDocNullableType */ || kind === 321 /* JSDocNonNullableType */ || kind === 322 /* JSDocOptionalType */ || kind === 323 /* JSDocFunctionType */ || kind === 324 /* JSDocVariadicType */; + return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 163 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 233 /* ExpressionWithTypeArguments */ || kind === 319 /* JSDocAllType */ || kind === 320 /* JSDocUnknownType */ || kind === 321 /* JSDocNullableType */ || kind === 322 /* JSDocNonNullableType */ || kind === 323 /* JSDocOptionalType */ || kind === 324 /* JSDocFunctionType */ || kind === 325 /* JSDocVariadicType */; } function isAccessExpression(node) { - return node.kind === 210 /* PropertyAccessExpression */ || node.kind === 211 /* ElementAccessExpression */; + return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; } function getLeftmostExpression(node, stopAtCallExpressions) { while (true) { switch (node.kind) { - case 224 /* PostfixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: node = node.operand; continue; - case 225 /* BinaryExpression */: + case 226 /* BinaryExpression */: node = node.left; continue; - case 226 /* ConditionalExpression */: + case 227 /* ConditionalExpression */: node = node.condition; continue; - case 214 /* TaggedTemplateExpression */: + case 215 /* TaggedTemplateExpression */: node = node.tag; continue; - case 212 /* CallExpression */: + case 213 /* CallExpression */: if (stopAtCallExpressions) { return node; } - case 233 /* AsExpression */: - case 211 /* ElementAccessExpression */: - case 210 /* PropertyAccessExpression */: - case 234 /* NonNullExpression */: - case 359 /* PartiallyEmittedExpression */: - case 237 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 212 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 235 /* NonNullExpression */: + case 360 /* PartiallyEmittedExpression */: + case 238 /* SatisfiesExpression */: node = node.expression; continue; } @@ -11258,7 +11302,10 @@ function getResolveJsonModule(compilerOptions) { } return getEmitModuleResolutionKind(compilerOptions) === 100 /* Bundler */; } -var reservedCharacterPattern = /[^\w\s\/]/g; +function getAllowJSCompilerOption(compilerOptions) { + return compilerOptions.allowJs === void 0 ? !!compilerOptions.checkJs : compilerOptions.allowJs; +} +var reservedCharacterPattern = /[^\w\s/]/g; var wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; var commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; var implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`; @@ -11367,7 +11414,7 @@ function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragm function replaceWildcardCharacter(match, singleAsteriskRegexFragment) { return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match; } -function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { +function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) { path2 = normalizePath(path2); currentDirectory = normalizePath(currentDirectory); const absolutePath = combinePaths(currentDirectory, path2); @@ -11376,22 +11423,22 @@ function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileN includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"), excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"), - basePaths: getBasePaths(path2, includes, useCaseSensitiveFileNames) + basePaths: getBasePaths(path2, includes, useCaseSensitiveFileNames2) }; } -function getRegexFromPattern(pattern, useCaseSensitiveFileNames) { - return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i"); +function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) { + return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i"); } -function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath) { +function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) { path2 = normalizePath(path2); currentDirectory = normalizePath(currentDirectory); - const patterns = getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames, currentDirectory); - const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames)); - const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames); - const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames); + const patterns = getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames2, currentDirectory); + const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2)); + const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2); + const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2); const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]]; const visited = /* @__PURE__ */ new Map(); - const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames); + const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2); for (const basePath of patterns.basePaths) { visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); } @@ -11433,7 +11480,7 @@ function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileN } } } -function getBasePaths(path2, includes, useCaseSensitiveFileNames) { +function getBasePaths(path2, includes, useCaseSensitiveFileNames2) { const basePaths = [path2]; if (includes) { const includeBasePaths = []; @@ -11441,9 +11488,9 @@ function getBasePaths(path2, includes, useCaseSensitiveFileNames) { const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path2, include)); includeBasePaths.push(getIncludeBasePath(absolute)); } - includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames)); + includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2)); for (const includeBasePath of includeBasePaths) { - if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path2, !useCaseSensitiveFileNames))) { + if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path2, !useCaseSensitiveFileNames2))) { basePaths.push(includeBasePath); } } @@ -11661,7 +11708,7 @@ function setParentRecursive(rootNode, incremental) { } function isJsxAttributeName(node) { const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 294 /* JsxNamespacedName */; + return kind === 80 /* Identifier */ || kind === 295 /* JsxNamespacedName */; } function getEscapedTextOfJsxNamespacedName(node) { return `${node.namespace.escapedText}:${idText(node.name)}`; @@ -11791,16 +11838,16 @@ function createParenthesizerRules(factory2) { return parenthesizerRule; } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(225 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(225 /* BinaryExpression */, binaryOperator); + const binaryOperatorPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, binaryOperator); + const binaryOperatorAssociativity = getOperatorAssociativity(226 /* BinaryExpression */, binaryOperator); const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 218 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { + if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { return true; } const operandPrecedence = getExpressionPrecedence(emittedOperand); switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 228 /* YieldExpression */) { + if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 229 /* YieldExpression */) { return false; } return true; @@ -11834,7 +11881,7 @@ function createParenthesizerRules(factory2) { if (isLiteralKind(node.kind)) { return node.kind; } - if (node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { + if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { if (node.cachedLiteralKind !== void 0) { return node.cachedLiteralKind; } @@ -11847,7 +11894,7 @@ function createParenthesizerRules(factory2) { } function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 216 /* ParenthesizedExpression */) { + if (skipped.kind === 217 /* ParenthesizedExpression */) { return operand; } return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; @@ -11873,7 +11920,7 @@ function createParenthesizerRules(factory2) { return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; } function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(226 /* ConditionalExpression */, 58 /* QuestionToken */); + const conditionalPrecedence = getOperatorPrecedence(227 /* ConditionalExpression */, 58 /* QuestionToken */); const emittedCondition = skipPartiallyEmittedExpressions(condition); const conditionPrecedence = getExpressionPrecedence(emittedCondition); if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { @@ -11894,8 +11941,8 @@ function createParenthesizerRules(factory2) { /*stopAtCallExpressions*/ false ).kind) { - case 230 /* ClassExpression */: - case 217 /* FunctionExpression */: + case 231 /* ClassExpression */: + case 218 /* FunctionExpression */: needsParens = true; } } @@ -11908,16 +11955,16 @@ function createParenthesizerRules(factory2) { true ); switch (leftmostExpr.kind) { - case 212 /* CallExpression */: + case 213 /* CallExpression */: return factory2.createParenthesizedExpression(expression); - case 213 /* NewExpression */: + case 214 /* NewExpression */: return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; } return parenthesizeLeftSideOfAccess(expression); } function parenthesizeLeftSideOfAccess(expression, optionalChain) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 213 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { + if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { return expression; } return setTextRange(factory2.createParenthesizedExpression(expression), expression); @@ -11935,7 +11982,7 @@ function createParenthesizerRules(factory2) { function parenthesizeExpressionForDisallowedComma(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(225 /* BinaryExpression */, 28 /* CommaToken */); + const commaPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, 28 /* CommaToken */); return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); } function parenthesizeExpressionOfExpressionStatement(expression) { @@ -11943,7 +11990,7 @@ function createParenthesizerRules(factory2) { if (isCallExpression(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 217 /* FunctionExpression */ || kind === 218 /* ArrowFunction */) { + if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { const updated = factory2.updateCallExpression( emittedExpression, setTextRange(factory2.createParenthesizedExpression(callee), callee), @@ -11958,7 +12005,7 @@ function createParenthesizerRules(factory2) { /*stopAtCallExpressions*/ false ).kind; - if (leftmostExpressionKind === 209 /* ObjectLiteralExpression */ || leftmostExpressionKind === 217 /* FunctionExpression */) { + if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { return setTextRange(factory2.createParenthesizedExpression(expression), expression); } return expression; @@ -11968,31 +12015,31 @@ function createParenthesizerRules(factory2) { body, /*stopAtCallExpressions*/ false - ).kind === 209 /* ObjectLiteralExpression */)) { + ).kind === 210 /* ObjectLiteralExpression */)) { return setTextRange(factory2.createParenthesizedExpression(body), body); } return body; } function parenthesizeCheckTypeOfConditionalType(checkType) { switch (checkType.kind) { - case 183 /* FunctionType */: - case 184 /* ConstructorType */: - case 193 /* ConditionalType */: + case 184 /* FunctionType */: + case 185 /* ConstructorType */: + case 194 /* ConditionalType */: return factory2.createParenthesizedType(checkType); } return checkType; } function parenthesizeExtendsTypeOfConditionalType(extendsType) { switch (extendsType.kind) { - case 193 /* ConditionalType */: + case 194 /* ConditionalType */: return factory2.createParenthesizedType(extendsType); } return extendsType; } function parenthesizeConstituentTypeOfUnionType(type) { switch (type.kind) { - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeCheckTypeOfConditionalType(type); @@ -12002,8 +12049,8 @@ function createParenthesizerRules(factory2) { } function parenthesizeConstituentTypeOfIntersectionType(type) { switch (type.kind) { - case 191 /* UnionType */: - case 192 /* IntersectionType */: + case 192 /* UnionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfUnionType(type); @@ -12013,23 +12060,23 @@ function createParenthesizerRules(factory2) { } function parenthesizeOperandOfTypeOperator(type) { switch (type.kind) { - case 192 /* IntersectionType */: + case 193 /* IntersectionType */: return factory2.createParenthesizedType(type); } return parenthesizeConstituentTypeOfIntersectionType(type); } function parenthesizeOperandOfReadonlyTypeOperator(type) { switch (type.kind) { - case 197 /* TypeOperator */: + case 198 /* TypeOperator */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); } function parenthesizeNonArrayTypeOfPostfixType(type) { switch (type.kind) { - case 194 /* InferType */: - case 197 /* TypeOperator */: - case 185 /* TypeQuery */: + case 195 /* InferType */: + case 198 /* TypeOperator */: + case 186 /* TypeQuery */: return factory2.createParenthesizedType(type); } return parenthesizeOperandOfTypeOperator(type); @@ -12114,6 +12161,7 @@ function createNodeConverters(factory2) { return { convertToFunctionBlock, convertToFunctionExpression, + convertToClassExpression, convertToArrayAssignmentElement, convertToObjectAssignmentElement, convertToAssignmentPattern, @@ -12131,10 +12179,11 @@ function createNodeConverters(factory2) { return body; } function convertToFunctionExpression(node) { + var _a; if (!node.body) return Debug.fail(`Cannot convert a FunctionDeclaration without a body`); const updated = factory2.createFunctionExpression( - getModifiers(node), + (_a = getModifiers(node)) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), node.asteriskToken, node.name, node.typeParameters, @@ -12153,6 +12202,26 @@ function createNodeConverters(factory2) { } return updated; } + function convertToClassExpression(node) { + var _a; + const updated = factory2.createClassExpression( + (_a = node.modifiers) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), + node.name, + node.typeParameters, + node.heritageClauses, + node.members + ); + setOriginalNode(updated, node); + setTextRange(updated, node); + if (getStartsOnNewLine(node)) { + setStartsOnNewLine( + updated, + /*newLine*/ + true + ); + } + return updated; + } function convertToArrayAssignmentElement(element) { if (isBindingElement(element)) { if (element.dotDotDotToken) { @@ -12187,11 +12256,11 @@ function createNodeConverters(factory2) { } function convertToAssignmentPattern(node) { switch (node.kind) { - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return convertToArrayAssignmentPattern(node); - case 205 /* ObjectBindingPattern */: - case 209 /* ObjectLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 210 /* ObjectLiteralExpression */: return convertToObjectAssignmentPattern(node); } } @@ -12229,6 +12298,7 @@ function createNodeConverters(factory2) { var nullNodeConverters = { convertToFunctionBlock: notImplemented, convertToFunctionExpression: notImplemented, + convertToClassExpression: notImplemented, convertToArrayAssignmentElement: notImplemented, convertToObjectAssignmentElement: notImplemented, convertToAssignmentPattern: notImplemented, @@ -12538,40 +12608,40 @@ function createNodeFactory(flags, baseFactory2) { updateExternalModuleReference, // lazily load factory members for JSDoc types with similar structure get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(318 /* JSDocAllType */); + return getJSDocPrimaryTypeCreateFunction(319 /* JSDocAllType */); }, get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(319 /* JSDocUnknownType */); + return getJSDocPrimaryTypeCreateFunction(320 /* JSDocUnknownType */); }, get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(322 /* JSDocNonNullableType */); }, get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNonNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(322 /* JSDocNonNullableType */); }, get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(320 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNullableType */); }, get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(320 /* JSDocNullableType */); + return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNullableType */); }, get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(322 /* JSDocOptionalType */); + return getJSDocUnaryTypeCreateFunction(323 /* JSDocOptionalType */); }, get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(322 /* JSDocOptionalType */); + return getJSDocUnaryTypeUpdateFunction(323 /* JSDocOptionalType */); }, get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(324 /* JSDocVariadicType */); + return getJSDocUnaryTypeCreateFunction(325 /* JSDocVariadicType */); }, get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(324 /* JSDocVariadicType */); + return getJSDocUnaryTypeUpdateFunction(325 /* JSDocVariadicType */); }, get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocNamepathType */); + return getJSDocUnaryTypeCreateFunction(326 /* JSDocNamepathType */); }, get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocNamepathType */); + return getJSDocUnaryTypeUpdateFunction(326 /* JSDocNamepathType */); }, createJSDocFunctionType, updateJSDocFunctionType, @@ -12611,82 +12681,82 @@ function createNodeFactory(flags, baseFactory2) { updateJSDocLinkPlain, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocTypeTag */); + return getJSDocTypeLikeTagCreateFunction(351 /* JSDocTypeTag */); }, get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocTypeTag */); + return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocTypeTag */); }, get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(348 /* JSDocReturnTag */); + return getJSDocTypeLikeTagCreateFunction(349 /* JSDocReturnTag */); }, get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(348 /* JSDocReturnTag */); + return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocReturnTag */); }, get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(349 /* JSDocThisTag */); + return getJSDocTypeLikeTagCreateFunction(350 /* JSDocThisTag */); }, get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocThisTag */); + return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocThisTag */); }, get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(336 /* JSDocAuthorTag */); + return getJSDocSimpleTagCreateFunction(337 /* JSDocAuthorTag */); }, get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(336 /* JSDocAuthorTag */); + return getJSDocSimpleTagUpdateFunction(337 /* JSDocAuthorTag */); }, get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocClassTag */); + return getJSDocSimpleTagCreateFunction(339 /* JSDocClassTag */); }, get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocClassTag */); + return getJSDocSimpleTagUpdateFunction(339 /* JSDocClassTag */); }, get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocPublicTag */); + return getJSDocSimpleTagCreateFunction(340 /* JSDocPublicTag */); }, get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocPublicTag */); + return getJSDocSimpleTagUpdateFunction(340 /* JSDocPublicTag */); }, get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocPrivateTag */); + return getJSDocSimpleTagCreateFunction(341 /* JSDocPrivateTag */); }, get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocPrivateTag */); + return getJSDocSimpleTagUpdateFunction(341 /* JSDocPrivateTag */); }, get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocProtectedTag */); + return getJSDocSimpleTagCreateFunction(342 /* JSDocProtectedTag */); }, get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocProtectedTag */); + return getJSDocSimpleTagUpdateFunction(342 /* JSDocProtectedTag */); }, get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocReadonlyTag */); + return getJSDocSimpleTagCreateFunction(343 /* JSDocReadonlyTag */); }, get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocReadonlyTag */); + return getJSDocSimpleTagUpdateFunction(343 /* JSDocReadonlyTag */); }, get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocOverrideTag */); + return getJSDocSimpleTagCreateFunction(344 /* JSDocOverrideTag */); }, get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocOverrideTag */); + return getJSDocSimpleTagUpdateFunction(344 /* JSDocOverrideTag */); }, get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagCreateFunction(338 /* JSDocDeprecatedTag */); }, get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocDeprecatedTag */); + return getJSDocSimpleTagUpdateFunction(338 /* JSDocDeprecatedTag */); }, get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(355 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagCreateFunction(356 /* JSDocThrowsTag */); }, get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(355 /* JSDocThrowsTag */); + return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocThrowsTag */); }, get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(356 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagCreateFunction(357 /* JSDocSatisfiesTag */); }, get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocSatisfiesTag */); + return getJSDocTypeLikeTagUpdateFunction(357 /* JSDocSatisfiesTag */); }, createJSDocEnumTag, updateJSDocEnumTag, @@ -12861,6 +12931,7 @@ function createNodeFactory(flags, baseFactory2) { createExportDefault, createExternalModuleExport, createTypeCheck, + createIsNotTypeCheck, createMethodCall, createGlobalMethodCall, createFunctionBindCall, @@ -12892,7 +12963,8 @@ function createNodeFactory(flags, baseFactory2) { ensureUseStrict, liftToBlock, mergeLexicalEnvironment, - updateModifiers + updateModifiers, + updateModifierLike }; forEach(nodeFactoryPatchers, (fn) => fn(factory2)); return factory2; @@ -13050,11 +13122,11 @@ function createNodeFactory(flags, baseFactory2) { } const node = createBaseIdentifier(escapeLeadingUnderscores(text)); if (hasExtendedUnicodeEscape) - node.flags |= 128 /* IdentifierHasExtendedUnicodeEscape */; + node.flags |= 256 /* IdentifierHasExtendedUnicodeEscape */; if (node.escapedText === "await") { node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */; } - if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) { + if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { node.transformFlags |= 1024 /* ContainsES2015 */; } return node; @@ -13149,7 +13221,7 @@ function createNodeFactory(flags, baseFactory2) { return baseFactory2.createBaseTokenNode(kind); } function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 164 /* LastToken */, "Invalid token"); + Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* LastToken */, "Invalid token"); Debug.assert(token <= 15 /* FirstTemplateToken */ || token >= 18 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); Debug.assert(token <= 9 /* FirstLiteralToken */ || token >= 15 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); Debug.assert(token !== 80 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); @@ -13159,6 +13231,9 @@ function createNodeFactory(flags, baseFactory2) { case 134 /* AsyncKeyword */: transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; break; + case 160 /* UsingKeyword */: + transformFlags = 4 /* ContainsESNext */; + break; case 125 /* PublicKeyword */: case 123 /* PrivateKeyword */: case 124 /* ProtectedKeyword */: @@ -13168,12 +13243,12 @@ function createNodeFactory(flags, baseFactory2) { case 87 /* ConstKeyword */: case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 146 /* NeverKeyword */: case 151 /* ObjectKeyword */: case 103 /* InKeyword */: case 147 /* OutKeyword */: - case 163 /* OverrideKeyword */: + case 164 /* OverrideKeyword */: case 154 /* StringKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: @@ -13241,7 +13316,7 @@ function createNodeFactory(flags, baseFactory2) { if (flags2 & 32 /* Static */) result.push(createModifier(126 /* StaticKeyword */)); if (flags2 & 16384 /* Override */) - result.push(createModifier(163 /* OverrideKeyword */)); + result.push(createModifier(164 /* OverrideKeyword */)); if (flags2 & 64 /* Readonly */) result.push(createModifier(148 /* ReadonlyKeyword */)); if (flags2 & 128 /* Accessor */) @@ -13255,7 +13330,7 @@ function createNodeFactory(flags, baseFactory2) { return result.length ? result : void 0; } function createQualifiedName(left, right) { - const node = createBaseNode(165 /* QualifiedName */); + const node = createBaseNode(166 /* QualifiedName */); node.left = left; node.right = asName(right); node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); @@ -13266,7 +13341,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; } function createComputedPropertyName(expression) { - const node = createBaseNode(166 /* ComputedPropertyName */); + const node = createBaseNode(167 /* ComputedPropertyName */); node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; return node; @@ -13275,7 +13350,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; } function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(167 /* TypeParameter */); + const node = createBaseDeclaration(168 /* TypeParameter */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.constraint = constraint; @@ -13289,7 +13364,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.default !== defaultType ? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node) : node; } function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { - const node = createBaseDeclaration(168 /* Parameter */); + const node = createBaseDeclaration(169 /* Parameter */); node.modifiers = asNodeArray(modifiers); node.dotDotDotToken = dotDotDotToken; node.name = asName(name); @@ -13308,7 +13383,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; } function createDecorator(expression) { - const node = createBaseNode(169 /* Decorator */); + const node = createBaseNode(170 /* Decorator */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -13321,7 +13396,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDecorator(expression), node) : node; } function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(170 /* PropertySignature */); + const node = createBaseDeclaration(171 /* PropertySignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.type = type; @@ -13341,14 +13416,14 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(171 /* PropertyDeclaration */); + const node = createBaseDeclaration(172 /* PropertyDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.type = type; node.initializer = asInitializer(initializer); - const isAmbient = node.flags & 16777216 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; + const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; node.jsDoc = void 0; return node; @@ -13357,7 +13432,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; } function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(172 /* MethodSignature */); + const node = createBaseDeclaration(173 /* MethodSignature */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.questionToken = questionToken; @@ -13375,7 +13450,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; } function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(173 /* MethodDeclaration */); + const node = createBaseDeclaration(174 /* MethodDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -13412,7 +13487,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(174 /* ClassStaticBlockDeclaration */); + const node = createBaseDeclaration(175 /* ClassStaticBlockDeclaration */); node.body = body; node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; node.modifiers = void 0; @@ -13433,7 +13508,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(175 /* Constructor */); + const node = createBaseDeclaration(176 /* Constructor */); node.modifiers = asNodeArray(modifiers); node.parameters = createNodeArray(parameters); node.body = body; @@ -13459,7 +13534,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(176 /* GetAccessor */); + const node = createBaseDeclaration(177 /* GetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -13490,7 +13565,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(177 /* SetAccessor */); + const node = createBaseDeclaration(178 /* SetAccessor */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.parameters = createNodeArray(parameters); @@ -13522,7 +13597,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(178 /* CallSignature */); + const node = createBaseDeclaration(179 /* CallSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -13537,7 +13612,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; } function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(179 /* ConstructSignature */); + const node = createBaseDeclaration(180 /* ConstructSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -13552,7 +13627,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; } function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(180 /* IndexSignature */); + const node = createBaseDeclaration(181 /* IndexSignature */); node.modifiers = asNodeArray(modifiers); node.parameters = asNodeArray(parameters); node.type = type; @@ -13567,7 +13642,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; } function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(203 /* TemplateLiteralTypeSpan */); + const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); node.type = type; node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; @@ -13580,7 +13655,7 @@ function createNodeFactory(flags, baseFactory2) { return createToken(kind); } function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(181 /* TypePredicate */); + const node = createBaseNode(182 /* TypePredicate */); node.assertsModifier = assertsModifier; node.parameterName = asName(parameterName); node.type = type; @@ -13591,7 +13666,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; } function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(182 /* TypeReference */); + const node = createBaseNode(183 /* TypeReference */); node.typeName = asName(typeName); node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); node.transformFlags = 1 /* ContainsTypeScript */; @@ -13601,7 +13676,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; } function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(183 /* FunctionType */); + const node = createBaseDeclaration(184 /* FunctionType */); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); node.type = type; @@ -13626,7 +13701,7 @@ function createNodeFactory(flags, baseFactory2) { return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); } function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(184 /* ConstructorType */); + const node = createBaseDeclaration(185 /* ConstructorType */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = asNodeArray(parameters); @@ -13657,7 +13732,7 @@ function createNodeFactory(flags, baseFactory2) { return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); } function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(185 /* TypeQuery */); + const node = createBaseNode(186 /* TypeQuery */); node.exprName = exprName; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.transformFlags = 1 /* ContainsTypeScript */; @@ -13667,7 +13742,7 @@ function createNodeFactory(flags, baseFactory2) { return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; } function createTypeLiteralNode(members) { - const node = createBaseDeclaration(186 /* TypeLiteral */); + const node = createBaseDeclaration(187 /* TypeLiteral */); node.members = createNodeArray(members); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13676,7 +13751,7 @@ function createNodeFactory(flags, baseFactory2) { return node.members !== members ? update(createTypeLiteralNode(members), node) : node; } function createArrayTypeNode(elementType) { - const node = createBaseNode(187 /* ArrayType */); + const node = createBaseNode(188 /* ArrayType */); node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13685,7 +13760,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; } function createTupleTypeNode(elements) { - const node = createBaseNode(188 /* TupleType */); + const node = createBaseNode(189 /* TupleType */); node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13694,7 +13769,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; } function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(201 /* NamedTupleMember */); + const node = createBaseDeclaration(202 /* NamedTupleMember */); node.dotDotDotToken = dotDotDotToken; node.name = name; node.questionToken = questionToken; @@ -13707,7 +13782,7 @@ function createNodeFactory(flags, baseFactory2) { return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; } function createOptionalTypeNode(type) { - const node = createBaseNode(189 /* OptionalType */); + const node = createBaseNode(190 /* OptionalType */); node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13716,7 +13791,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createOptionalTypeNode(type), node) : node; } function createRestTypeNode(type) { - const node = createBaseNode(190 /* RestType */); + const node = createBaseNode(191 /* RestType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13734,19 +13809,19 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; } function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(191 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); + return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function updateUnionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); } function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(192 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); + return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function updateIntersectionTypeNode(node, types) { return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); } function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(193 /* ConditionalType */); + const node = createBaseNode(194 /* ConditionalType */); node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); node.trueType = trueType; @@ -13760,7 +13835,7 @@ function createNodeFactory(flags, baseFactory2) { return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; } function createInferTypeNode(typeParameter) { - const node = createBaseNode(194 /* InferType */); + const node = createBaseNode(195 /* InferType */); node.typeParameter = typeParameter; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13769,7 +13844,7 @@ function createNodeFactory(flags, baseFactory2) { return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; } function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(202 /* TemplateLiteralType */); + const node = createBaseNode(203 /* TemplateLiteralType */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags = 1 /* ContainsTypeScript */; @@ -13779,7 +13854,7 @@ function createNodeFactory(flags, baseFactory2) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(204 /* ImportType */); + const node = createBaseNode(205 /* ImportType */); node.argument = argument; node.assertions = assertions; node.qualifier = qualifier; @@ -13792,7 +13867,7 @@ function createNodeFactory(flags, baseFactory2) { return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { - const node = createBaseNode(195 /* ParenthesizedType */); + const node = createBaseNode(196 /* ParenthesizedType */); node.type = type; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13801,12 +13876,12 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createParenthesizedType(type), node) : node; } function createThisTypeNode() { - const node = createBaseNode(196 /* ThisType */); + const node = createBaseNode(197 /* ThisType */); node.transformFlags = 1 /* ContainsTypeScript */; return node; } function createTypeOperatorNode(operator, type) { - const node = createBaseNode(197 /* TypeOperator */); + const node = createBaseNode(198 /* TypeOperator */); node.operator = operator; node.type = operator === 148 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); node.transformFlags = 1 /* ContainsTypeScript */; @@ -13816,7 +13891,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; } function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(198 /* IndexedAccessType */); + const node = createBaseNode(199 /* IndexedAccessType */); node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); node.indexType = indexType; node.transformFlags = 1 /* ContainsTypeScript */; @@ -13826,7 +13901,7 @@ function createNodeFactory(flags, baseFactory2) { return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; } function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(199 /* MappedType */); + const node = createBaseDeclaration(200 /* MappedType */); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; node.nameType = nameType; @@ -13842,7 +13917,7 @@ function createNodeFactory(flags, baseFactory2) { return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; } function createLiteralTypeNode(literal) { - const node = createBaseNode(200 /* LiteralType */); + const node = createBaseNode(201 /* LiteralType */); node.literal = literal; node.transformFlags = 1 /* ContainsTypeScript */; return node; @@ -13851,7 +13926,7 @@ function createNodeFactory(flags, baseFactory2) { return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; } function createObjectBindingPattern(elements) { - const node = createBaseNode(205 /* ObjectBindingPattern */); + const node = createBaseNode(206 /* ObjectBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { @@ -13863,7 +13938,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; } function createArrayBindingPattern(elements) { - const node = createBaseNode(206 /* ArrayBindingPattern */); + const node = createBaseNode(207 /* ArrayBindingPattern */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; return node; @@ -13872,7 +13947,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; } function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(207 /* BindingElement */); + const node = createBaseDeclaration(208 /* BindingElement */); node.dotDotDotToken = dotDotDotToken; node.propertyName = asName(propertyName); node.name = asName(name); @@ -13885,7 +13960,7 @@ function createNodeFactory(flags, baseFactory2) { return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; } function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(208 /* ArrayLiteralExpression */); + const node = createBaseNode(209 /* ArrayLiteralExpression */); const lastElement = elements && lastOrUndefined(elements); const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); @@ -13897,7 +13972,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; } function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(209 /* ObjectLiteralExpression */); + const node = createBaseDeclaration(210 /* ObjectLiteralExpression */); node.properties = createNodeArray(properties); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.properties); @@ -13908,7 +13983,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; } function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(210 /* PropertyAccessExpression */); + const node = createBaseDeclaration(211 /* PropertyAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; @@ -13949,16 +14024,16 @@ function createNodeFactory(flags, baseFactory2) { questionDotToken, asName(name) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updatePropertyAccessChain(node, expression, questionDotToken, name) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; } function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(211 /* ElementAccessExpression */); + const node = createBaseDeclaration(212 /* ElementAccessExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.argumentExpression = argumentExpression; @@ -13999,16 +14074,16 @@ function createNodeFactory(flags, baseFactory2) { questionDotToken, asExpression(index) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; } function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(212 /* CallExpression */); + const node = createBaseDeclaration(213 /* CallExpression */); node.expression = expression; node.questionDotToken = questionDotToken; node.typeArguments = typeArguments; @@ -14056,16 +14131,16 @@ function createNodeFactory(flags, baseFactory2) { asNodeArray(typeArguments), parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)) ); - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node.transformFlags |= 32 /* ContainsES2020 */; return node; } function updateCallChain(node, expression, questionDotToken, typeArguments, argumentsArray) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; } function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(213 /* NewExpression */); + const node = createBaseDeclaration(214 /* NewExpression */); node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); node.typeArguments = asNodeArray(typeArguments); node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; @@ -14079,7 +14154,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; } function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(214 /* TaggedTemplateExpression */); + const node = createBaseNode(215 /* TaggedTemplateExpression */); node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( tag, /*optionalChain*/ @@ -14100,7 +14175,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; } function createTypeAssertion(type, expression) { - const node = createBaseNode(215 /* TypeAssertionExpression */); + const node = createBaseNode(216 /* TypeAssertionExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -14110,7 +14185,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; } function createParenthesizedExpression(expression) { - const node = createBaseNode(216 /* ParenthesizedExpression */); + const node = createBaseNode(217 /* ParenthesizedExpression */); node.expression = expression; node.transformFlags = propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -14120,7 +14195,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; } function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(217 /* FunctionExpression */); + const node = createBaseDeclaration(218 /* FunctionExpression */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -14145,7 +14220,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; } function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(218 /* ArrowFunction */); + const node = createBaseDeclaration(219 /* ArrowFunction */); node.modifiers = asNodeArray(modifiers); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); @@ -14167,7 +14242,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; } function createDeleteExpression(expression) { - const node = createBaseNode(219 /* DeleteExpression */); + const node = createBaseNode(220 /* DeleteExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -14176,7 +14251,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; } function createTypeOfExpression(expression) { - const node = createBaseNode(220 /* TypeOfExpression */); + const node = createBaseNode(221 /* TypeOfExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -14185,7 +14260,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; } function createVoidExpression(expression) { - const node = createBaseNode(221 /* VoidExpression */); + const node = createBaseNode(222 /* VoidExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression); return node; @@ -14194,7 +14269,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createVoidExpression(expression), node) : node; } function createAwaitExpression(expression) { - const node = createBaseNode(222 /* AwaitExpression */); + const node = createBaseNode(223 /* AwaitExpression */); node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; return node; @@ -14203,7 +14278,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; } function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(223 /* PrefixUnaryExpression */); + const node = createBaseNode(224 /* PrefixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -14216,7 +14291,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; } function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(224 /* PostfixUnaryExpression */); + const node = createBaseNode(225 /* PostfixUnaryExpression */); node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); @@ -14229,7 +14304,7 @@ function createNodeFactory(flags, baseFactory2) { return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; } function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(225 /* BinaryExpression */); + const node = createBaseDeclaration(226 /* BinaryExpression */); const operatorToken = asToken(operator); const operatorKind = operatorToken.kind; node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); @@ -14262,7 +14337,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; } function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(226 /* ConditionalExpression */); + const node = createBaseNode(227 /* ConditionalExpression */); node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); node.questionToken = questionToken ?? createToken(58 /* QuestionToken */); node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); @@ -14275,7 +14350,7 @@ function createNodeFactory(flags, baseFactory2) { return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; } function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(227 /* TemplateExpression */); + const node = createBaseNode(228 /* TemplateExpression */); node.head = head; node.templateSpans = createNodeArray(templateSpans); node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; @@ -14350,7 +14425,7 @@ function createNodeFactory(flags, baseFactory2) { } function createYieldExpression(asteriskToken, expression) { Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(228 /* YieldExpression */); + const node = createBaseNode(229 /* YieldExpression */); node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.asteriskToken = asteriskToken; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; @@ -14360,7 +14435,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; } function createSpreadElement(expression) { - const node = createBaseNode(229 /* SpreadElement */); + const node = createBaseNode(230 /* SpreadElement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; return node; @@ -14369,7 +14444,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadElement(expression), node) : node; } function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(230 /* ClassExpression */); + const node = createBaseDeclaration(231 /* ClassExpression */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -14383,10 +14458,10 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createOmittedExpression() { - return createBaseNode(231 /* OmittedExpression */); + return createBaseNode(232 /* OmittedExpression */); } function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(232 /* ExpressionWithTypeArguments */); + const node = createBaseNode(233 /* ExpressionWithTypeArguments */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -14400,7 +14475,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; } function createAsExpression(expression, type) { - const node = createBaseNode(233 /* AsExpression */); + const node = createBaseNode(234 /* AsExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -14410,7 +14485,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; } function createNonNullExpression(expression) { - const node = createBaseNode(234 /* NonNullExpression */); + const node = createBaseNode(235 /* NonNullExpression */); node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -14426,7 +14501,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; } function createSatisfiesExpression(expression, type) { - const node = createBaseNode(237 /* SatisfiesExpression */); + const node = createBaseNode(238 /* SatisfiesExpression */); node.expression = expression; node.type = type; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; @@ -14436,8 +14511,8 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; } function createNonNullChain(expression) { - const node = createBaseNode(234 /* NonNullExpression */); - node.flags |= 32 /* OptionalChain */; + const node = createBaseNode(235 /* NonNullExpression */); + node.flags |= 64 /* OptionalChain */; node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( expression, /*optionalChain*/ @@ -14447,11 +14522,11 @@ function createNodeFactory(flags, baseFactory2) { return node; } function updateNonNullChain(node, expression) { - Debug.assert(!!(node.flags & 32 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); + Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); return node.expression !== expression ? update(createNonNullChain(expression), node) : node; } function createMetaProperty(keywordToken, name) { - const node = createBaseNode(235 /* MetaProperty */); + const node = createBaseNode(236 /* MetaProperty */); node.keywordToken = keywordToken; node.name = name; node.transformFlags |= propagateChildFlags(node.name); @@ -14472,7 +14547,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; } function createTemplateSpan(expression, literal) { - const node = createBaseNode(238 /* TemplateSpan */); + const node = createBaseNode(239 /* TemplateSpan */); node.expression = expression; node.literal = literal; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; @@ -14482,12 +14557,12 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; } function createSemicolonClassElement() { - const node = createBaseNode(239 /* SemicolonClassElement */); + const node = createBaseNode(240 /* SemicolonClassElement */); node.transformFlags |= 1024 /* ContainsES2015 */; return node; } function createBlock(statements, multiLine) { - const node = createBaseNode(240 /* Block */); + const node = createBaseNode(241 /* Block */); node.statements = createNodeArray(statements); node.multiLine = multiLine; node.transformFlags |= propagateChildrenFlags(node.statements); @@ -14500,7 +14575,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; } function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(242 /* VariableStatement */); + const node = createBaseNode(243 /* VariableStatement */); node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); @@ -14515,12 +14590,12 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; } function createEmptyStatement() { - const node = createBaseNode(241 /* EmptyStatement */); + const node = createBaseNode(242 /* EmptyStatement */); node.jsDoc = void 0; return node; } function createExpressionStatement(expression) { - const node = createBaseNode(243 /* ExpressionStatement */); + const node = createBaseNode(244 /* ExpressionStatement */); node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -14531,7 +14606,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; } function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(244 /* IfStatement */); + const node = createBaseNode(245 /* IfStatement */); node.expression = expression; node.thenStatement = asEmbeddedStatement(thenStatement); node.elseStatement = asEmbeddedStatement(elseStatement); @@ -14544,7 +14619,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; } function createDoStatement(statement, expression) { - const node = createBaseNode(245 /* DoStatement */); + const node = createBaseNode(246 /* DoStatement */); node.statement = asEmbeddedStatement(statement); node.expression = expression; node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); @@ -14556,7 +14631,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; } function createWhileStatement(expression, statement) { - const node = createBaseNode(246 /* WhileStatement */); + const node = createBaseNode(247 /* WhileStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -14568,7 +14643,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; } function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(247 /* ForStatement */); + const node = createBaseNode(248 /* ForStatement */); node.initializer = initializer; node.condition = condition; node.incrementor = incrementor; @@ -14584,7 +14659,7 @@ function createNodeFactory(flags, baseFactory2) { return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; } function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(248 /* ForInStatement */); + const node = createBaseNode(249 /* ForInStatement */); node.initializer = initializer; node.expression = expression; node.statement = asEmbeddedStatement(statement); @@ -14599,7 +14674,7 @@ function createNodeFactory(flags, baseFactory2) { return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; } function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(249 /* ForOfStatement */); + const node = createBaseNode(250 /* ForOfStatement */); node.awaitModifier = awaitModifier; node.initializer = initializer; node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); @@ -14617,7 +14692,7 @@ function createNodeFactory(flags, baseFactory2) { return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; } function createContinueStatement(label) { - const node = createBaseNode(250 /* ContinueStatement */); + const node = createBaseNode(251 /* ContinueStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -14628,7 +14703,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createContinueStatement(label), node) : node; } function createBreakStatement(label) { - const node = createBaseNode(251 /* BreakStatement */); + const node = createBaseNode(252 /* BreakStatement */); node.label = asName(label); node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -14639,7 +14714,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label ? update(createBreakStatement(label), node) : node; } function createReturnStatement(expression) { - const node = createBaseNode(252 /* ReturnStatement */); + const node = createBaseNode(253 /* ReturnStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; node.jsDoc = void 0; @@ -14650,7 +14725,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createReturnStatement(expression), node) : node; } function createWithStatement(expression, statement) { - const node = createBaseNode(253 /* WithStatement */); + const node = createBaseNode(254 /* WithStatement */); node.expression = expression; node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); @@ -14662,7 +14737,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; } function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(254 /* SwitchStatement */); + const node = createBaseNode(255 /* SwitchStatement */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.caseBlock = caseBlock; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); @@ -14675,7 +14750,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; } function createLabeledStatement(label, statement) { - const node = createBaseNode(255 /* LabeledStatement */); + const node = createBaseNode(256 /* LabeledStatement */); node.label = asName(label); node.statement = asEmbeddedStatement(statement); node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); @@ -14687,7 +14762,7 @@ function createNodeFactory(flags, baseFactory2) { return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; } function createThrowStatement(expression) { - const node = createBaseNode(256 /* ThrowStatement */); + const node = createBaseNode(257 /* ThrowStatement */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.jsDoc = void 0; @@ -14698,7 +14773,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createThrowStatement(expression), node) : node; } function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(257 /* TryStatement */); + const node = createBaseNode(258 /* TryStatement */); node.tryBlock = tryBlock; node.catchClause = catchClause; node.finallyBlock = finallyBlock; @@ -14711,13 +14786,13 @@ function createNodeFactory(flags, baseFactory2) { return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; } function createDebuggerStatement() { - const node = createBaseNode(258 /* DebuggerStatement */); + const node = createBaseNode(259 /* DebuggerStatement */); node.jsDoc = void 0; node.flowNode = void 0; return node; } function createVariableDeclaration(name, exclamationToken, type, initializer) { - const node = createBaseDeclaration(259 /* VariableDeclaration */); + const node = createBaseDeclaration(260 /* VariableDeclaration */); node.name = asName(name); node.exclamationToken = exclamationToken; node.type = type; @@ -14730,20 +14805,23 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; } function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(260 /* VariableDeclarationList */); - node.flags |= flags2 & 3 /* BlockScoped */; + const node = createBaseNode(261 /* VariableDeclarationList */); + node.flags |= flags2 & 7 /* BlockScoped */; node.declarations = createNodeArray(declarations); node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - if (flags2 & 3 /* BlockScoped */) { + if (flags2 & 7 /* BlockScoped */) { node.transformFlags |= 1024 /* ContainsES2015 */ | 262144 /* ContainsBlockScopedBinding */; } + if (flags2 & 4 /* Using */) { + node.transformFlags |= 4 /* ContainsESNext */; + } return node; } function updateVariableDeclarationList(node, declarations) { return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; } function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(261 /* FunctionDeclaration */); + const node = createBaseDeclaration(262 /* FunctionDeclaration */); node.modifiers = asNodeArray(modifiers); node.asteriskToken = asteriskToken; node.name = asName(name); @@ -14779,7 +14857,7 @@ function createNodeFactory(flags, baseFactory2) { return finishUpdateBaseSignatureDeclaration(updated, original); } function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(262 /* ClassDeclaration */); + const node = createBaseDeclaration(263 /* ClassDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -14800,7 +14878,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(263 /* InterfaceDeclaration */); + const node = createBaseDeclaration(264 /* InterfaceDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -14814,7 +14892,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; } function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(264 /* TypeAliasDeclaration */); + const node = createBaseDeclaration(265 /* TypeAliasDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.typeParameters = asNodeArray(typeParameters); @@ -14829,7 +14907,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; } function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(265 /* EnumDeclaration */); + const node = createBaseDeclaration(266 /* EnumDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.members = createNodeArray(members); @@ -14842,9 +14920,9 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; } function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(266 /* ModuleDeclaration */); + const node = createBaseDeclaration(267 /* ModuleDeclaration */); node.modifiers = asNodeArray(modifiers); - node.flags |= flags2 & (16 /* Namespace */ | 4 /* NestedNamespace */ | 1024 /* GlobalAugmentation */); + node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); node.name = name; node.body = body; if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { @@ -14862,7 +14940,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; } function createModuleBlock(statements) { - const node = createBaseNode(267 /* ModuleBlock */); + const node = createBaseNode(268 /* ModuleBlock */); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildrenFlags(node.statements); node.jsDoc = void 0; @@ -14872,7 +14950,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createModuleBlock(statements), node) : node; } function createCaseBlock(clauses) { - const node = createBaseNode(268 /* CaseBlock */); + const node = createBaseNode(269 /* CaseBlock */); node.clauses = createNodeArray(clauses); node.transformFlags |= propagateChildrenFlags(node.clauses); node.locals = void 0; @@ -14883,7 +14961,7 @@ function createNodeFactory(flags, baseFactory2) { return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; } function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(269 /* NamespaceExportDeclaration */); + const node = createBaseDeclaration(270 /* NamespaceExportDeclaration */); node.name = asName(name); node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; node.modifiers = void 0; @@ -14900,7 +14978,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(270 /* ImportEqualsDeclaration */); + const node = createBaseDeclaration(271 /* ImportEqualsDeclaration */); node.modifiers = asNodeArray(modifiers); node.name = asName(name); node.isTypeOnly = isTypeOnly; @@ -14917,7 +14995,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(271 /* ImportDeclaration */); + const node = createBaseNode(272 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; @@ -14931,7 +15009,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(272 /* ImportClause */); + const node = createBaseDeclaration(273 /* ImportClause */); node.isTypeOnly = isTypeOnly; node.name = name; node.namedBindings = namedBindings; @@ -14946,7 +15024,7 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; } function createAssertClause(elements, multiLine) { - const node = createBaseNode(299 /* AssertClause */); + const node = createBaseNode(300 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; node.transformFlags |= 4 /* ContainsESNext */; @@ -14956,7 +15034,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; } function createAssertEntry(name, value) { - const node = createBaseNode(300 /* AssertEntry */); + const node = createBaseNode(301 /* AssertEntry */); node.name = name; node.value = value; node.transformFlags |= 4 /* ContainsESNext */; @@ -14966,7 +15044,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; } function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(301 /* ImportTypeAssertionContainer */); + const node = createBaseNode(302 /* ImportTypeAssertionContainer */); node.assertClause = clause; node.multiLine = multiLine; return node; @@ -14975,7 +15053,7 @@ function createNodeFactory(flags, baseFactory2) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } function createNamespaceImport(name) { - const node = createBaseDeclaration(273 /* NamespaceImport */); + const node = createBaseDeclaration(274 /* NamespaceImport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -14985,7 +15063,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceImport(name), node) : node; } function createNamespaceExport(name) { - const node = createBaseDeclaration(279 /* NamespaceExport */); + const node = createBaseDeclaration(280 /* NamespaceExport */); node.name = name; node.transformFlags |= propagateChildFlags(node.name) | 32 /* ContainsES2020 */; node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -14995,7 +15073,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createNamespaceExport(name), node) : node; } function createNamedImports(elements) { - const node = createBaseNode(274 /* NamedImports */); + const node = createBaseNode(275 /* NamedImports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -15005,7 +15083,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedImports(elements), node) : node; } function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(275 /* ImportSpecifier */); + const node = createBaseDeclaration(276 /* ImportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = propertyName; node.name = name; @@ -15017,7 +15095,7 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createExportAssignment(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(276 /* ExportAssignment */); + const node = createBaseDeclaration(277 /* ExportAssignment */); node.modifiers = asNodeArray(modifiers); node.isExportEquals = isExportEquals; node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( @@ -15035,7 +15113,7 @@ function createNodeFactory(flags, baseFactory2) { return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node; } function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(277 /* ExportDeclaration */); + const node = createBaseDeclaration(278 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; @@ -15058,7 +15136,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createNamedExports(elements) { - const node = createBaseNode(278 /* NamedExports */); + const node = createBaseNode(279 /* NamedExports */); node.elements = createNodeArray(elements); node.transformFlags |= propagateChildrenFlags(node.elements); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -15068,7 +15146,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createNamedExports(elements), node) : node; } function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(280 /* ExportSpecifier */); + const node = createBaseNode(281 /* ExportSpecifier */); node.isTypeOnly = isTypeOnly; node.propertyName = asName(propertyName); node.name = asName(name); @@ -15081,12 +15159,12 @@ function createNodeFactory(flags, baseFactory2) { return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; } function createMissingDeclaration() { - const node = createBaseDeclaration(281 /* MissingDeclaration */); + const node = createBaseDeclaration(282 /* MissingDeclaration */); node.jsDoc = void 0; return node; } function createExternalModuleReference(expression) { - const node = createBaseNode(282 /* ExternalModuleReference */); + const node = createBaseNode(283 /* ExternalModuleReference */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; @@ -15118,7 +15196,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; } function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(323 /* JSDocFunctionType */); + const node = createBaseDeclaration(324 /* JSDocFunctionType */); node.parameters = asNodeArray(parameters); node.type = type; node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); @@ -15132,7 +15210,7 @@ function createNodeFactory(flags, baseFactory2) { return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; } function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(328 /* JSDocTypeLiteral */); + const node = createBaseDeclaration(329 /* JSDocTypeLiteral */); node.jsDocPropertyTags = asNodeArray(propertyTags); node.isArrayType = isArrayType; return node; @@ -15141,7 +15219,7 @@ function createNodeFactory(flags, baseFactory2) { return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; } function createJSDocTypeExpression(type) { - const node = createBaseNode(315 /* JSDocTypeExpression */); + const node = createBaseNode(316 /* JSDocTypeExpression */); node.type = type; return node; } @@ -15149,7 +15227,7 @@ function createNodeFactory(flags, baseFactory2) { return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; } function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(329 /* JSDocSignature */); + const node = createBaseDeclaration(330 /* JSDocSignature */); node.typeParameters = asNodeArray(typeParameters); node.parameters = createNodeArray(parameters); node.type = type; @@ -15178,7 +15256,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(351 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); + const node = createBaseJSDocTag(352 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); node.constraint = constraint; node.typeParameters = createNodeArray(typeParameters); return node; @@ -15187,7 +15265,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; } function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(352 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); + const node = createBaseJSDocTagDeclaration(353 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -15199,7 +15277,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(347 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); + const node = createBaseJSDocTagDeclaration(348 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -15210,7 +15288,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(354 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); + const node = createBaseJSDocTagDeclaration(355 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); node.typeExpression = typeExpression; node.name = name; node.isNameFirst = !!isNameFirst; @@ -15221,7 +15299,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; } function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(344 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); + const node = createBaseJSDocTagDeclaration(345 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); node.typeExpression = typeExpression; node.fullName = fullName; node.name = getJSDocTypeAliasName(fullName); @@ -15233,7 +15311,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; } function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(345 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); + const node = createBaseJSDocTag(346 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); node.typeExpression = typeExpression; return node; } @@ -15241,7 +15319,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; } function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(334 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); + const node = createBaseJSDocTag(335 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); node.class = className; return node; } @@ -15249,12 +15327,12 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; } function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(335 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); + const node = createBaseJSDocTag(336 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); node.class = className; return node; } function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(353 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); + const node = createBaseJSDocTag(354 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); node.name = name; return node; } @@ -15262,7 +15340,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; } function createJSDocNameReference(name) { - const node = createBaseNode(316 /* JSDocNameReference */); + const node = createBaseNode(317 /* JSDocNameReference */); node.name = name; return node; } @@ -15270,7 +15348,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocNameReference(name), node) : node; } function createJSDocMemberName(left, right) { - const node = createBaseNode(317 /* JSDocMemberName */); + const node = createBaseNode(318 /* JSDocMemberName */); node.left = left; node.right = right; node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); @@ -15280,7 +15358,7 @@ function createNodeFactory(flags, baseFactory2) { return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; } function createJSDocLink(name, text) { - const node = createBaseNode(330 /* JSDocLink */); + const node = createBaseNode(331 /* JSDocLink */); node.name = name; node.text = text; return node; @@ -15289,7 +15367,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLink(name, text), node) : node; } function createJSDocLinkCode(name, text) { - const node = createBaseNode(331 /* JSDocLinkCode */); + const node = createBaseNode(332 /* JSDocLinkCode */); node.name = name; node.text = text; return node; @@ -15298,7 +15376,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; } function createJSDocLinkPlain(name, text) { - const node = createBaseNode(332 /* JSDocLinkPlain */); + const node = createBaseNode(333 /* JSDocLinkPlain */); node.name = name; node.text = text; return node; @@ -15325,14 +15403,14 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; } function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(333 /* JSDocTag */, tagName, comment); + const node = createBaseJSDocTag(334 /* JSDocTag */, tagName, comment); return node; } function updateJSDocUnknownTag(node, tagName, comment) { return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; } function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(346 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(346 /* JSDocEnumTag */)), comment); + const node = createBaseJSDocTagDeclaration(347 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(347 /* JSDocEnumTag */)), comment); node.typeExpression = typeExpression; node.locals = void 0; node.nextContainer = void 0; @@ -15342,7 +15420,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; } function createJSDocText(text) { - const node = createBaseNode(327 /* JSDocText */); + const node = createBaseNode(328 /* JSDocText */); node.text = text; return node; } @@ -15350,7 +15428,7 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text ? update(createJSDocText(text), node) : node; } function createJSDocComment(comment, tags) { - const node = createBaseNode(326 /* JSDoc */); + const node = createBaseNode(327 /* JSDoc */); node.comment = comment; node.tags = asNodeArray(tags); return node; @@ -15359,7 +15437,7 @@ function createNodeFactory(flags, baseFactory2) { return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; } function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(283 /* JsxElement */); + const node = createBaseNode(284 /* JsxElement */); node.openingElement = openingElement; node.children = createNodeArray(children); node.closingElement = closingElement; @@ -15370,7 +15448,7 @@ function createNodeFactory(flags, baseFactory2) { return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; } function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(284 /* JsxSelfClosingElement */); + const node = createBaseNode(285 /* JsxSelfClosingElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -15384,7 +15462,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; } function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(285 /* JsxOpeningElement */); + const node = createBaseNode(286 /* JsxOpeningElement */); node.tagName = tagName; node.typeArguments = asNodeArray(typeArguments); node.attributes = attributes; @@ -15398,7 +15476,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; } function createJsxClosingElement(tagName) { - const node = createBaseNode(286 /* JsxClosingElement */); + const node = createBaseNode(287 /* JsxClosingElement */); node.tagName = tagName; node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; return node; @@ -15407,7 +15485,7 @@ function createNodeFactory(flags, baseFactory2) { return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; } function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(287 /* JsxFragment */); + const node = createBaseNode(288 /* JsxFragment */); node.openingFragment = openingFragment; node.children = createNodeArray(children); node.closingFragment = closingFragment; @@ -15428,17 +15506,17 @@ function createNodeFactory(flags, baseFactory2) { return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; } function createJsxOpeningFragment() { - const node = createBaseNode(288 /* JsxOpeningFragment */); + const node = createBaseNode(289 /* JsxOpeningFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxJsxClosingFragment() { - const node = createBaseNode(289 /* JsxClosingFragment */); + const node = createBaseNode(290 /* JsxClosingFragment */); node.transformFlags |= 2 /* ContainsJsx */; return node; } function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(290 /* JsxAttribute */); + const node = createBaseDeclaration(291 /* JsxAttribute */); node.name = name; node.initializer = initializer; node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; @@ -15448,7 +15526,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; } function createJsxAttributes(properties) { - const node = createBaseDeclaration(291 /* JsxAttributes */); + const node = createBaseDeclaration(292 /* JsxAttributes */); node.properties = createNodeArray(properties); node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; return node; @@ -15457,7 +15535,7 @@ function createNodeFactory(flags, baseFactory2) { return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; } function createJsxSpreadAttribute(expression) { - const node = createBaseNode(292 /* JsxSpreadAttribute */); + const node = createBaseNode(293 /* JsxSpreadAttribute */); node.expression = expression; node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; return node; @@ -15466,7 +15544,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; } function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(293 /* JsxExpression */); + const node = createBaseNode(294 /* JsxExpression */); node.dotDotDotToken = dotDotDotToken; node.expression = expression; node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; @@ -15476,7 +15554,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; } function createJsxNamespacedName(namespace, name) { - const node = createBaseNode(294 /* JsxNamespacedName */); + const node = createBaseNode(295 /* JsxNamespacedName */); node.namespace = namespace; node.name = name; node.transformFlags |= propagateChildFlags(node.namespace) | propagateChildFlags(node.name) | 2 /* ContainsJsx */; @@ -15486,7 +15564,7 @@ function createNodeFactory(flags, baseFactory2) { return node.namespace !== namespace || node.name !== name ? update(createJsxNamespacedName(namespace, name), node) : node; } function createCaseClause(expression, statements) { - const node = createBaseNode(295 /* CaseClause */); + const node = createBaseNode(296 /* CaseClause */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.statements = createNodeArray(statements); node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); @@ -15497,7 +15575,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; } function createDefaultClause(statements) { - const node = createBaseNode(296 /* DefaultClause */); + const node = createBaseNode(297 /* DefaultClause */); node.statements = createNodeArray(statements); node.transformFlags = propagateChildrenFlags(node.statements); return node; @@ -15506,7 +15584,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements ? update(createDefaultClause(statements), node) : node; } function createHeritageClause(token, types) { - const node = createBaseNode(297 /* HeritageClause */); + const node = createBaseNode(298 /* HeritageClause */); node.token = token; node.types = createNodeArray(types); node.transformFlags |= propagateChildrenFlags(node.types); @@ -15526,7 +15604,7 @@ function createNodeFactory(flags, baseFactory2) { return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; } function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(298 /* CatchClause */); + const node = createBaseNode(299 /* CatchClause */); node.variableDeclaration = asVariableDeclaration(variableDeclaration); node.block = block; node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); @@ -15538,7 +15616,7 @@ function createNodeFactory(flags, baseFactory2) { return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; } function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(302 /* PropertyAssignment */); + const node = createBaseDeclaration(303 /* PropertyAssignment */); node.name = asName(name); node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); @@ -15560,7 +15638,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(303 /* ShorthandPropertyAssignment */); + const node = createBaseDeclaration(304 /* ShorthandPropertyAssignment */); node.name = asName(name); node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; @@ -15584,7 +15662,7 @@ function createNodeFactory(flags, baseFactory2) { return update(updated, original); } function createSpreadAssignment(expression) { - const node = createBaseDeclaration(304 /* SpreadAssignment */); + const node = createBaseDeclaration(305 /* SpreadAssignment */); node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; node.jsDoc = void 0; @@ -15594,7 +15672,7 @@ function createNodeFactory(flags, baseFactory2) { return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; } function createEnumMember(name, initializer) { - const node = createBaseDeclaration(305 /* EnumMember */); + const node = createBaseDeclaration(306 /* EnumMember */); node.name = asName(name); node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; @@ -15605,7 +15683,7 @@ function createNodeFactory(flags, baseFactory2) { return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; } function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(311 /* SourceFile */); + const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); node.statements = createNodeArray(statements); node.endOfFileToken = endOfFileToken; node.flags |= flags2; @@ -15675,7 +15753,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneRedirectedSourceFile(source) { const node = createRedirectedSourceFile(source.redirectInfo); - node.flags |= source.flags & ~8 /* Synthesized */; + node.flags |= source.flags & ~16 /* Synthesized */; node.fileName = source.fileName; node.path = source.path; node.resolvedPath = source.resolvedPath; @@ -15686,8 +15764,8 @@ function createNodeFactory(flags, baseFactory2) { return node; } function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(311 /* SourceFile */); - node.flags |= source.flags & ~8 /* Synthesized */; + const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); + node.flags |= source.flags & ~16 /* Synthesized */; for (const p in source) { if (hasProperty(node, p) || !hasProperty(source, p)) { continue; @@ -15720,7 +15798,7 @@ function createNodeFactory(flags, baseFactory2) { return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; } function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(312 /* Bundle */); + const node = createBaseNode(313 /* Bundle */); node.prepends = prepends; node.sourceFiles = sourceFiles; node.syntheticFileReferences = void 0; @@ -15733,7 +15811,7 @@ function createNodeFactory(flags, baseFactory2) { return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; } function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(313 /* UnparsedSource */); + const node = createBaseNode(314 /* UnparsedSource */); node.prologues = prologues; node.syntheticReferences = syntheticReferences; node.texts = texts; @@ -15750,48 +15828,48 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createUnparsedPrologue(data) { - return createBaseUnparsedNode(306 /* UnparsedPrologue */, data); + return createBaseUnparsedNode(307 /* UnparsedPrologue */, data); } function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(307 /* UnparsedPrepend */, data); + const node = createBaseUnparsedNode(308 /* UnparsedPrepend */, data); node.texts = texts; return node; } function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 309 /* UnparsedInternalText */ : 308 /* UnparsedText */, data); + return createBaseUnparsedNode(internal ? 310 /* UnparsedInternalText */ : 309 /* UnparsedText */, data); } function createUnparsedSyntheticReference(section) { - const node = createBaseNode(310 /* UnparsedSyntheticReference */); + const node = createBaseNode(311 /* UnparsedSyntheticReference */); node.data = section.data; node.section = section; return node; } function createInputFiles() { - const node = createBaseNode(314 /* InputFiles */); + const node = createBaseNode(315 /* InputFiles */); node.javascriptText = ""; node.declarationText = ""; return node; } function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(236 /* SyntheticExpression */); + const node = createBaseNode(237 /* SyntheticExpression */); node.type = type; node.isSpread = isSpread; node.tupleNameSource = tupleNameSource; return node; } function createSyntaxList(children) { - const node = createBaseNode(357 /* SyntaxList */); + const node = createBaseNode(358 /* SyntaxList */); node._children = children; return node; } function createNotEmittedStatement(original) { - const node = createBaseNode(358 /* NotEmittedStatement */); + const node = createBaseNode(359 /* NotEmittedStatement */); node.original = original; setTextRange(node, original); return node; } function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(359 /* PartiallyEmittedExpression */); + const node = createBaseNode(360 /* PartiallyEmittedExpression */); node.expression = expression; node.original = original; node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; @@ -15813,7 +15891,7 @@ function createNodeFactory(flags, baseFactory2) { return node; } function createCommaListExpression(elements) { - const node = createBaseNode(360 /* CommaListExpression */); + const node = createBaseNode(361 /* CommaListExpression */); node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); node.transformFlags |= propagateChildrenFlags(node.elements); return node; @@ -15822,7 +15900,7 @@ function createNodeFactory(flags, baseFactory2) { return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; } function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(361 /* SyntheticReferenceExpression */); + const node = createBaseNode(362 /* SyntheticReferenceExpression */); node.expression = expression; node.thisArg = thisArg; node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); @@ -15833,7 +15911,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneGeneratedIdentifier(node) { const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); @@ -15841,7 +15919,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneIdentifier(node) { const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.jsDoc = node.jsDoc; clone2.flowNode = node.flowNode; clone2.symbol = node.symbol; @@ -15854,7 +15932,7 @@ function createNodeFactory(flags, baseFactory2) { } function cloneGeneratedPrivateIdentifier(node) { const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); @@ -15862,7 +15940,7 @@ function createNodeFactory(flags, baseFactory2) { } function clonePrivateIdentifier(node) { const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); return clone2; @@ -15887,7 +15965,7 @@ function createNodeFactory(flags, baseFactory2) { return clonePrivateIdentifier(node); } const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); - clone2.flags |= node.flags & ~8 /* Synthesized */; + clone2.flags |= node.flags & ~16 /* Synthesized */; clone2.transformFlags = node.transformFlags; setOriginalNode(clone2, node); for (const key in node) { @@ -15980,7 +16058,10 @@ function createNodeFactory(flags, baseFactory2) { ); } function createTypeCheck(value, tag) { - return tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + return tag === "null" ? factory2.createStrictEquality(value, createNull()) : tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); + } + function createIsNotTypeCheck(value, tag) { + return tag === "null" ? factory2.createStrictInequality(value, createNull()) : tag === "undefined" ? factory2.createStrictInequality(value, createVoidZero()) : factory2.createStrictInequality(createTypeOfExpression(value), createStringLiteral(tag)); } function createMethodCall(object, methodName, argumentsList) { if (isCallChain(object)) { @@ -16055,17 +16136,17 @@ function createNodeFactory(flags, baseFactory2) { } function updateOuterExpression(outerExpression, expression) { switch (outerExpression.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: return updateParenthesizedExpression(outerExpression, expression); - case 215 /* TypeAssertionExpression */: + case 216 /* TypeAssertionExpression */: return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 233 /* AsExpression */: + case 234 /* AsExpression */: return updateAsExpression(outerExpression, expression, outerExpression.type); - case 237 /* SatisfiesExpression */: + case 238 /* SatisfiesExpression */: return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return updateNonNullExpression(outerExpression, expression); - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return updatePartiallyEmittedExpression(outerExpression, expression); } } @@ -16105,13 +16186,13 @@ function createNodeFactory(flags, baseFactory2) { case 10 /* BigIntLiteral */: case 11 /* StringLiteral */: return false; - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: const elements = target.elements; if (elements.length === 0) { return false; } return true; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return target.properties.length > 0; default: return true; @@ -16374,6 +16455,9 @@ function createNodeFactory(flags, baseFactory2) { } return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); } + function updateModifierLike(node, modifierArray) { + return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); + } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; } @@ -16422,43 +16506,43 @@ function updateWithOriginal(updated, original) { } function getDefaultTagNameForKind(kind) { switch (kind) { - case 350 /* JSDocTypeTag */: + case 351 /* JSDocTypeTag */: return "type"; - case 348 /* JSDocReturnTag */: + case 349 /* JSDocReturnTag */: return "returns"; - case 349 /* JSDocThisTag */: + case 350 /* JSDocThisTag */: return "this"; - case 346 /* JSDocEnumTag */: + case 347 /* JSDocEnumTag */: return "enum"; - case 336 /* JSDocAuthorTag */: + case 337 /* JSDocAuthorTag */: return "author"; - case 338 /* JSDocClassTag */: + case 339 /* JSDocClassTag */: return "class"; - case 339 /* JSDocPublicTag */: + case 340 /* JSDocPublicTag */: return "public"; - case 340 /* JSDocPrivateTag */: + case 341 /* JSDocPrivateTag */: return "private"; - case 341 /* JSDocProtectedTag */: + case 342 /* JSDocProtectedTag */: return "protected"; - case 342 /* JSDocReadonlyTag */: + case 343 /* JSDocReadonlyTag */: return "readonly"; - case 343 /* JSDocOverrideTag */: + case 344 /* JSDocOverrideTag */: return "override"; - case 351 /* JSDocTemplateTag */: + case 352 /* JSDocTemplateTag */: return "template"; - case 352 /* JSDocTypedefTag */: + case 353 /* JSDocTypedefTag */: return "typedef"; - case 347 /* JSDocParameterTag */: + case 348 /* JSDocParameterTag */: return "param"; - case 354 /* JSDocPropertyTag */: + case 355 /* JSDocPropertyTag */: return "prop"; - case 344 /* JSDocCallbackTag */: + case 345 /* JSDocCallbackTag */: return "callback"; - case 345 /* JSDocOverloadTag */: + case 346 /* JSDocOverloadTag */: return "overload"; - case 334 /* JSDocAugmentsTag */: + case 335 /* JSDocAugmentsTag */: return "augments"; - case 335 /* JSDocImplementsTag */: + case 336 /* JSDocImplementsTag */: return "implements"; default: return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); @@ -16542,70 +16626,70 @@ function aggregateChildrenFlags(children) { children.transformFlags = subtreeFlags; } function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 181 /* FirstTypeNode */ && kind <= 204 /* LastTypeNode */) { + if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { return -2 /* TypeExcludes */; } switch (kind) { - case 212 /* CallExpression */: - case 213 /* NewExpression */: - case 208 /* ArrayLiteralExpression */: + case 213 /* CallExpression */: + case 214 /* NewExpression */: + case 209 /* ArrayLiteralExpression */: return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 266 /* ModuleDeclaration */: + case 267 /* ModuleDeclaration */: return -1941676032 /* ModuleExcludes */; - case 168 /* Parameter */: + case 169 /* Parameter */: return -2147483648 /* ParameterExcludes */; - case 218 /* ArrowFunction */: + case 219 /* ArrowFunction */: return -2072174592 /* ArrowFunctionExcludes */; - case 217 /* FunctionExpression */: - case 261 /* FunctionDeclaration */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: return -1937940480 /* FunctionExcludes */; - case 260 /* VariableDeclarationList */: + case 261 /* VariableDeclarationList */: return -2146893824 /* VariableDeclarationListExcludes */; - case 262 /* ClassDeclaration */: - case 230 /* ClassExpression */: + case 263 /* ClassDeclaration */: + case 231 /* ClassExpression */: return -2147344384 /* ClassExcludes */; - case 175 /* Constructor */: + case 176 /* Constructor */: return -1937948672 /* ConstructorExcludes */; - case 171 /* PropertyDeclaration */: + case 172 /* PropertyDeclaration */: return -2013249536 /* PropertyExcludes */; - case 173 /* MethodDeclaration */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: return -2005057536 /* MethodOrAccessorExcludes */; case 133 /* AnyKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 146 /* NeverKeyword */: case 154 /* StringKeyword */: case 151 /* ObjectKeyword */: case 136 /* BooleanKeyword */: case 155 /* SymbolKeyword */: case 116 /* VoidKeyword */: - case 167 /* TypeParameter */: - case 170 /* PropertySignature */: - case 172 /* MethodSignature */: - case 178 /* CallSignature */: - case 179 /* ConstructSignature */: - case 180 /* IndexSignature */: - case 263 /* InterfaceDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 168 /* TypeParameter */: + case 171 /* PropertySignature */: + case 173 /* MethodSignature */: + case 179 /* CallSignature */: + case 180 /* ConstructSignature */: + case 181 /* IndexSignature */: + case 264 /* InterfaceDeclaration */: + case 265 /* TypeAliasDeclaration */: return -2 /* TypeExcludes */; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return -2147278848 /* ObjectLiteralExcludes */; - case 298 /* CatchClause */: + case 299 /* CatchClause */: return -2147418112 /* CatchClauseExcludes */; - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: return -2147450880 /* BindingPatternExcludes */; - case 215 /* TypeAssertionExpression */: - case 237 /* SatisfiesExpression */: - case 233 /* AsExpression */: - case 359 /* PartiallyEmittedExpression */: - case 216 /* ParenthesizedExpression */: + case 216 /* TypeAssertionExpression */: + case 238 /* SatisfiesExpression */: + case 234 /* AsExpression */: + case 360 /* PartiallyEmittedExpression */: + case 217 /* ParenthesizedExpression */: case 108 /* SuperKeyword */: return -2147483648 /* OuterExpressionExcludes */; - case 210 /* PropertyAccessExpression */: - case 211 /* ElementAccessExpression */: + case 211 /* PropertyAccessExpression */: + case 212 /* ElementAccessExpression */: return -2147483648 /* PropertyAccessExcludes */; default: return -2147483648 /* NodeExcludes */; @@ -16613,7 +16697,7 @@ function getTransformFlagsSubtreeExclusions(kind) { } var baseFactory = createBaseNodeFactory(); function makeSynthetic(node) { - node.flags |= 8 /* Synthesized */; + node.flags |= 16 /* Synthesized */; return node; } var syntheticFactory = { @@ -16625,11 +16709,13 @@ var syntheticFactory = { }; var factory = createNodeFactory(4 /* NoIndentationOnFreshPropertyAccess */, syntheticFactory); function setOriginalNode(node, original) { - node.original = original; - if (original) { - const emitNode = original.emitNode; - if (emitNode) - node.emitNode = mergeEmitNode(emitNode, node.emitNode); + if (node.original !== original) { + node.original = original; + if (original) { + const emitNode = original.emitNode; + if (emitNode) + node.emitNode = mergeEmitNode(emitNode, node.emitNode); + } } return node; } @@ -16645,35 +16731,53 @@ function mergeEmitNode(sourceEmitNode, destEmitNode) { constantValue, helpers, startsOnNewLine, - snippetElement + snippetElement, + classThis, + assignedName } = sourceEmitNode; if (!destEmitNode) destEmitNode = {}; - if (leadingComments) - destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); - if (trailingComments) - destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); - if (flags) + if (flags) { destEmitNode.flags = flags; - if (internalFlags) + } + if (internalFlags) { destEmitNode.internalFlags = internalFlags & ~8 /* Immutable */; - if (commentRange) + } + if (leadingComments) { + destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); + } + if (trailingComments) { + destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); + } + if (commentRange) { destEmitNode.commentRange = commentRange; - if (sourceMapRange) + } + if (sourceMapRange) { destEmitNode.sourceMapRange = sourceMapRange; - if (tokenSourceMapRanges) + } + if (tokenSourceMapRanges) { destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges); - if (constantValue !== void 0) + } + if (constantValue !== void 0) { destEmitNode.constantValue = constantValue; + } if (helpers) { for (const helper of helpers) { destEmitNode.helpers = appendIfUnique(destEmitNode.helpers, helper); } } - if (startsOnNewLine !== void 0) + if (startsOnNewLine !== void 0) { destEmitNode.startsOnNewLine = startsOnNewLine; - if (snippetElement !== void 0) + } + if (snippetElement !== void 0) { destEmitNode.snippetElement = snippetElement; + } + if (classThis) { + destEmitNode.classThis = classThis; + } + if (assignedName) { + destEmitNode.assignedName = assignedName; + } return destEmitNode; } function mergeTokenSourceMapRanges(sourceRanges, destRanges) { @@ -16689,7 +16793,7 @@ function mergeTokenSourceMapRanges(sourceRanges, destRanges) { function getOrCreateEmitNode(node) { if (!node.emitNode) { if (isParseTreeNode(node)) { - if (node.kind === 311 /* SourceFile */) { + if (node.kind === 312 /* SourceFile */) { return node.emitNode = { annotatedNodes: [node] }; } const sourceFile = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node))) ?? Debug.fail("Could not determine parsed source file."); @@ -16828,6 +16932,9 @@ function isPrivateIdentifier(node) { function isExportModifier(node) { return node.kind === 95 /* ExportKeyword */; } +function isDefaultModifier(node) { + return node.kind === 90 /* DefaultKeyword */; +} function isAsyncModifier(node) { return node.kind === 134 /* AsyncKeyword */; } @@ -16847,340 +16954,340 @@ function isImportKeyword(node) { return node.kind === 102 /* ImportKeyword */; } function isComputedPropertyName(node) { - return node.kind === 166 /* ComputedPropertyName */; + return node.kind === 167 /* ComputedPropertyName */; } function isTypeParameterDeclaration(node) { - return node.kind === 167 /* TypeParameter */; + return node.kind === 168 /* TypeParameter */; } function isParameter(node) { - return node.kind === 168 /* Parameter */; + return node.kind === 169 /* Parameter */; } function isDecorator(node) { - return node.kind === 169 /* Decorator */; + return node.kind === 170 /* Decorator */; } function isPropertySignature(node) { - return node.kind === 170 /* PropertySignature */; + return node.kind === 171 /* PropertySignature */; } function isPropertyDeclaration(node) { - return node.kind === 171 /* PropertyDeclaration */; + return node.kind === 172 /* PropertyDeclaration */; } function isMethodSignature(node) { - return node.kind === 172 /* MethodSignature */; + return node.kind === 173 /* MethodSignature */; } function isMethodDeclaration(node) { - return node.kind === 173 /* MethodDeclaration */; + return node.kind === 174 /* MethodDeclaration */; } function isConstructorDeclaration(node) { - return node.kind === 175 /* Constructor */; + return node.kind === 176 /* Constructor */; } function isGetAccessorDeclaration(node) { - return node.kind === 176 /* GetAccessor */; + return node.kind === 177 /* GetAccessor */; } function isSetAccessorDeclaration(node) { - return node.kind === 177 /* SetAccessor */; + return node.kind === 178 /* SetAccessor */; } function isCallSignatureDeclaration(node) { - return node.kind === 178 /* CallSignature */; + return node.kind === 179 /* CallSignature */; } function isConstructSignatureDeclaration(node) { - return node.kind === 179 /* ConstructSignature */; + return node.kind === 180 /* ConstructSignature */; } function isIndexSignatureDeclaration(node) { - return node.kind === 180 /* IndexSignature */; + return node.kind === 181 /* IndexSignature */; } function isTypePredicateNode(node) { - return node.kind === 181 /* TypePredicate */; + return node.kind === 182 /* TypePredicate */; } function isTypeReferenceNode(node) { - return node.kind === 182 /* TypeReference */; + return node.kind === 183 /* TypeReference */; } function isFunctionTypeNode(node) { - return node.kind === 183 /* FunctionType */; + return node.kind === 184 /* FunctionType */; } function isConstructorTypeNode(node) { - return node.kind === 184 /* ConstructorType */; + return node.kind === 185 /* ConstructorType */; } function isTypeQueryNode(node) { - return node.kind === 185 /* TypeQuery */; + return node.kind === 186 /* TypeQuery */; } function isTypeLiteralNode(node) { - return node.kind === 186 /* TypeLiteral */; + return node.kind === 187 /* TypeLiteral */; } function isArrayTypeNode(node) { - return node.kind === 187 /* ArrayType */; + return node.kind === 188 /* ArrayType */; } function isTupleTypeNode(node) { - return node.kind === 188 /* TupleType */; + return node.kind === 189 /* TupleType */; } function isNamedTupleMember(node) { - return node.kind === 201 /* NamedTupleMember */; + return node.kind === 202 /* NamedTupleMember */; } function isOptionalTypeNode(node) { - return node.kind === 189 /* OptionalType */; + return node.kind === 190 /* OptionalType */; } function isRestTypeNode(node) { - return node.kind === 190 /* RestType */; + return node.kind === 191 /* RestType */; } function isUnionTypeNode(node) { - return node.kind === 191 /* UnionType */; + return node.kind === 192 /* UnionType */; } function isIntersectionTypeNode(node) { - return node.kind === 192 /* IntersectionType */; + return node.kind === 193 /* IntersectionType */; } function isConditionalTypeNode(node) { - return node.kind === 193 /* ConditionalType */; + return node.kind === 194 /* ConditionalType */; } function isInferTypeNode(node) { - return node.kind === 194 /* InferType */; + return node.kind === 195 /* InferType */; } function isParenthesizedTypeNode(node) { - return node.kind === 195 /* ParenthesizedType */; + return node.kind === 196 /* ParenthesizedType */; } function isThisTypeNode(node) { - return node.kind === 196 /* ThisType */; + return node.kind === 197 /* ThisType */; } function isTypeOperatorNode(node) { - return node.kind === 197 /* TypeOperator */; + return node.kind === 198 /* TypeOperator */; } function isIndexedAccessTypeNode(node) { - return node.kind === 198 /* IndexedAccessType */; + return node.kind === 199 /* IndexedAccessType */; } function isMappedTypeNode(node) { - return node.kind === 199 /* MappedType */; + return node.kind === 200 /* MappedType */; } function isLiteralTypeNode(node) { - return node.kind === 200 /* LiteralType */; + return node.kind === 201 /* LiteralType */; } function isImportTypeNode(node) { - return node.kind === 204 /* ImportType */; + return node.kind === 205 /* ImportType */; } function isTemplateLiteralTypeSpan(node) { - return node.kind === 203 /* TemplateLiteralTypeSpan */; + return node.kind === 204 /* TemplateLiteralTypeSpan */; } function isObjectBindingPattern(node) { - return node.kind === 205 /* ObjectBindingPattern */; + return node.kind === 206 /* ObjectBindingPattern */; } function isArrayBindingPattern(node) { - return node.kind === 206 /* ArrayBindingPattern */; + return node.kind === 207 /* ArrayBindingPattern */; } function isBindingElement(node) { - return node.kind === 207 /* BindingElement */; + return node.kind === 208 /* BindingElement */; } function isArrayLiteralExpression(node) { - return node.kind === 208 /* ArrayLiteralExpression */; + return node.kind === 209 /* ArrayLiteralExpression */; } function isObjectLiteralExpression(node) { - return node.kind === 209 /* ObjectLiteralExpression */; + return node.kind === 210 /* ObjectLiteralExpression */; } function isPropertyAccessExpression(node) { - return node.kind === 210 /* PropertyAccessExpression */; + return node.kind === 211 /* PropertyAccessExpression */; } function isElementAccessExpression(node) { - return node.kind === 211 /* ElementAccessExpression */; + return node.kind === 212 /* ElementAccessExpression */; } function isCallExpression(node) { - return node.kind === 212 /* CallExpression */; + return node.kind === 213 /* CallExpression */; } function isTaggedTemplateExpression(node) { - return node.kind === 214 /* TaggedTemplateExpression */; + return node.kind === 215 /* TaggedTemplateExpression */; } function isParenthesizedExpression(node) { - return node.kind === 216 /* ParenthesizedExpression */; + return node.kind === 217 /* ParenthesizedExpression */; } function isFunctionExpression(node) { - return node.kind === 217 /* FunctionExpression */; + return node.kind === 218 /* FunctionExpression */; } function isArrowFunction(node) { - return node.kind === 218 /* ArrowFunction */; + return node.kind === 219 /* ArrowFunction */; } function isVoidExpression(node) { - return node.kind === 221 /* VoidExpression */; + return node.kind === 222 /* VoidExpression */; } function isPrefixUnaryExpression(node) { - return node.kind === 223 /* PrefixUnaryExpression */; + return node.kind === 224 /* PrefixUnaryExpression */; } function isBinaryExpression(node) { - return node.kind === 225 /* BinaryExpression */; + return node.kind === 226 /* BinaryExpression */; } function isSpreadElement(node) { - return node.kind === 229 /* SpreadElement */; + return node.kind === 230 /* SpreadElement */; } function isClassExpression(node) { - return node.kind === 230 /* ClassExpression */; + return node.kind === 231 /* ClassExpression */; } function isOmittedExpression(node) { - return node.kind === 231 /* OmittedExpression */; + return node.kind === 232 /* OmittedExpression */; } function isExpressionWithTypeArguments(node) { - return node.kind === 232 /* ExpressionWithTypeArguments */; + return node.kind === 233 /* ExpressionWithTypeArguments */; } function isNonNullExpression(node) { - return node.kind === 234 /* NonNullExpression */; + return node.kind === 235 /* NonNullExpression */; } function isMetaProperty(node) { - return node.kind === 235 /* MetaProperty */; + return node.kind === 236 /* MetaProperty */; } function isCommaListExpression(node) { - return node.kind === 360 /* CommaListExpression */; + return node.kind === 361 /* CommaListExpression */; } function isTemplateSpan(node) { - return node.kind === 238 /* TemplateSpan */; + return node.kind === 239 /* TemplateSpan */; } function isBlock(node) { - return node.kind === 240 /* Block */; + return node.kind === 241 /* Block */; } function isVariableStatement(node) { - return node.kind === 242 /* VariableStatement */; + return node.kind === 243 /* VariableStatement */; } function isExpressionStatement(node) { - return node.kind === 243 /* ExpressionStatement */; + return node.kind === 244 /* ExpressionStatement */; } function isLabeledStatement(node) { - return node.kind === 255 /* LabeledStatement */; + return node.kind === 256 /* LabeledStatement */; } function isVariableDeclaration(node) { - return node.kind === 259 /* VariableDeclaration */; + return node.kind === 260 /* VariableDeclaration */; } function isVariableDeclarationList(node) { - return node.kind === 260 /* VariableDeclarationList */; + return node.kind === 261 /* VariableDeclarationList */; } function isFunctionDeclaration(node) { - return node.kind === 261 /* FunctionDeclaration */; + return node.kind === 262 /* FunctionDeclaration */; } function isClassDeclaration(node) { - return node.kind === 262 /* ClassDeclaration */; + return node.kind === 263 /* ClassDeclaration */; } function isInterfaceDeclaration(node) { - return node.kind === 263 /* InterfaceDeclaration */; + return node.kind === 264 /* InterfaceDeclaration */; } function isTypeAliasDeclaration(node) { - return node.kind === 264 /* TypeAliasDeclaration */; + return node.kind === 265 /* TypeAliasDeclaration */; } function isEnumDeclaration(node) { - return node.kind === 265 /* EnumDeclaration */; + return node.kind === 266 /* EnumDeclaration */; } function isModuleDeclaration(node) { - return node.kind === 266 /* ModuleDeclaration */; + return node.kind === 267 /* ModuleDeclaration */; } function isCaseBlock(node) { - return node.kind === 268 /* CaseBlock */; + return node.kind === 269 /* CaseBlock */; } function isImportEqualsDeclaration(node) { - return node.kind === 270 /* ImportEqualsDeclaration */; + return node.kind === 271 /* ImportEqualsDeclaration */; } function isImportDeclaration(node) { - return node.kind === 271 /* ImportDeclaration */; + return node.kind === 272 /* ImportDeclaration */; } function isImportClause(node) { - return node.kind === 272 /* ImportClause */; + return node.kind === 273 /* ImportClause */; } function isImportTypeAssertionContainer(node) { - return node.kind === 301 /* ImportTypeAssertionContainer */; + return node.kind === 302 /* ImportTypeAssertionContainer */; } function isAssertClause(node) { - return node.kind === 299 /* AssertClause */; + return node.kind === 300 /* AssertClause */; } function isAssertEntry(node) { - return node.kind === 300 /* AssertEntry */; + return node.kind === 301 /* AssertEntry */; } function isImportSpecifier(node) { - return node.kind === 275 /* ImportSpecifier */; + return node.kind === 276 /* ImportSpecifier */; } function isExportAssignment(node) { - return node.kind === 276 /* ExportAssignment */; + return node.kind === 277 /* ExportAssignment */; } function isExportDeclaration(node) { - return node.kind === 277 /* ExportDeclaration */; + return node.kind === 278 /* ExportDeclaration */; } function isExportSpecifier(node) { - return node.kind === 280 /* ExportSpecifier */; + return node.kind === 281 /* ExportSpecifier */; } function isNotEmittedStatement(node) { - return node.kind === 358 /* NotEmittedStatement */; + return node.kind === 359 /* NotEmittedStatement */; } function isExternalModuleReference(node) { - return node.kind === 282 /* ExternalModuleReference */; + return node.kind === 283 /* ExternalModuleReference */; } function isJsxOpeningElement(node) { - return node.kind === 285 /* JsxOpeningElement */; + return node.kind === 286 /* JsxOpeningElement */; } function isJsxClosingElement(node) { - return node.kind === 286 /* JsxClosingElement */; + return node.kind === 287 /* JsxClosingElement */; } function isJsxOpeningFragment(node) { - return node.kind === 288 /* JsxOpeningFragment */; + return node.kind === 289 /* JsxOpeningFragment */; } function isJsxClosingFragment(node) { - return node.kind === 289 /* JsxClosingFragment */; + return node.kind === 290 /* JsxClosingFragment */; } function isJsxAttributes(node) { - return node.kind === 291 /* JsxAttributes */; + return node.kind === 292 /* JsxAttributes */; } function isJsxNamespacedName(node) { - return node.kind === 294 /* JsxNamespacedName */; + return node.kind === 295 /* JsxNamespacedName */; } function isDefaultClause(node) { - return node.kind === 296 /* DefaultClause */; + return node.kind === 297 /* DefaultClause */; } function isHeritageClause(node) { - return node.kind === 297 /* HeritageClause */; + return node.kind === 298 /* HeritageClause */; } function isCatchClause(node) { - return node.kind === 298 /* CatchClause */; + return node.kind === 299 /* CatchClause */; } function isPropertyAssignment(node) { - return node.kind === 302 /* PropertyAssignment */; + return node.kind === 303 /* PropertyAssignment */; } function isEnumMember(node) { - return node.kind === 305 /* EnumMember */; + return node.kind === 306 /* EnumMember */; } function isSourceFile(node) { - return node.kind === 311 /* SourceFile */; + return node.kind === 312 /* SourceFile */; } function isJSDocTypeExpression(node) { - return node.kind === 315 /* JSDocTypeExpression */; + return node.kind === 316 /* JSDocTypeExpression */; } function isJSDocNullableType(node) { - return node.kind === 320 /* JSDocNullableType */; + return node.kind === 321 /* JSDocNullableType */; } function isJSDocFunctionType(node) { - return node.kind === 323 /* JSDocFunctionType */; + return node.kind === 324 /* JSDocFunctionType */; } function isJSDoc(node) { - return node.kind === 326 /* JSDoc */; + return node.kind === 327 /* JSDoc */; } function isJSDocPublicTag(node) { - return node.kind === 339 /* JSDocPublicTag */; + return node.kind === 340 /* JSDocPublicTag */; } function isJSDocPrivateTag(node) { - return node.kind === 340 /* JSDocPrivateTag */; + return node.kind === 341 /* JSDocPrivateTag */; } function isJSDocProtectedTag(node) { - return node.kind === 341 /* JSDocProtectedTag */; + return node.kind === 342 /* JSDocProtectedTag */; } function isJSDocReadonlyTag(node) { - return node.kind === 342 /* JSDocReadonlyTag */; + return node.kind === 343 /* JSDocReadonlyTag */; } function isJSDocOverrideTag(node) { - return node.kind === 343 /* JSDocOverrideTag */; + return node.kind === 344 /* JSDocOverrideTag */; } function isJSDocDeprecatedTag(node) { - return node.kind === 337 /* JSDocDeprecatedTag */; + return node.kind === 338 /* JSDocDeprecatedTag */; } function isJSDocParameterTag(node) { - return node.kind === 347 /* JSDocParameterTag */; + return node.kind === 348 /* JSDocParameterTag */; } function isJSDocReturnTag(node) { - return node.kind === 348 /* JSDocReturnTag */; + return node.kind === 349 /* JSDocReturnTag */; } function isJSDocTypeTag(node) { - return node.kind === 350 /* JSDocTypeTag */; + return node.kind === 351 /* JSDocTypeTag */; } function isJSDocTemplateTag(node) { - return node.kind === 351 /* JSDocTemplateTag */; + return node.kind === 352 /* JSDocTemplateTag */; } function isJSDocSatisfiesTag(node) { - return node.kind === 356 /* JSDocSatisfiesTag */; + return node.kind === 357 /* JSDocSatisfiesTag */; } // src/compiler/factory/utilities.ts @@ -17203,7 +17310,7 @@ function findUseStrictPrologue(statements) { return void 0; } function isCommaExpression(node) { - return node.kind === 225 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; + return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; } function isCommaSequence(node) { return isCommaExpression(node) || isCommaListExpression(node); @@ -17213,19 +17320,19 @@ function isJSDocTypeAssertion(node) { } function isOuterExpression(node, kinds = 15 /* All */) { switch (node.kind) { - case 216 /* ParenthesizedExpression */: + case 217 /* ParenthesizedExpression */: if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { return false; } return (kinds & 1 /* Parentheses */) !== 0; - case 215 /* TypeAssertionExpression */: - case 233 /* AsExpression */: - case 232 /* ExpressionWithTypeArguments */: - case 237 /* SatisfiesExpression */: + case 216 /* TypeAssertionExpression */: + case 234 /* AsExpression */: + case 233 /* ExpressionWithTypeArguments */: + case 238 /* SatisfiesExpression */: return (kinds & 2 /* TypeAssertions */) !== 0; - case 234 /* NonNullExpression */: + case 235 /* NonNullExpression */: return (kinds & 4 /* NonNullAssertions */) !== 0; - case 359 /* PartiallyEmittedExpression */: + case 360 /* PartiallyEmittedExpression */: return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; } return false; @@ -17249,11 +17356,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } if (isObjectLiteralElementLike(bindingElement)) { switch (bindingElement.kind) { - case 302 /* PropertyAssignment */: + case 303 /* PropertyAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 303 /* ShorthandPropertyAssignment */: + case 304 /* ShorthandPropertyAssignment */: return bindingElement.name; - case 304 /* SpreadAssignment */: + case 305 /* SpreadAssignment */: return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return void 0; @@ -17272,11 +17379,11 @@ function getTargetOfBindingOrAssignmentElement(bindingElement) { } function getElementsOfBindingOrAssignmentPattern(name) { switch (name.kind) { - case 205 /* ObjectBindingPattern */: - case 206 /* ArrayBindingPattern */: - case 208 /* ArrayLiteralExpression */: + case 206 /* ObjectBindingPattern */: + case 207 /* ArrayBindingPattern */: + case 209 /* ArrayLiteralExpression */: return name.elements; - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: return name.properties; } } @@ -17509,7 +17616,7 @@ function setTextRange(range, location) { } function canHaveModifiers(node) { const kind = node.kind; - return kind === 167 /* TypeParameter */ || kind === 168 /* Parameter */ || kind === 170 /* PropertySignature */ || kind === 171 /* PropertyDeclaration */ || kind === 172 /* MethodSignature */ || kind === 173 /* MethodDeclaration */ || kind === 175 /* Constructor */ || kind === 176 /* GetAccessor */ || kind === 177 /* SetAccessor */ || kind === 180 /* IndexSignature */ || kind === 184 /* ConstructorType */ || kind === 217 /* FunctionExpression */ || kind === 218 /* ArrowFunction */ || kind === 230 /* ClassExpression */ || kind === 242 /* VariableStatement */ || kind === 261 /* FunctionDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 277 /* ExportDeclaration */; + return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 231 /* ClassExpression */ || kind === 243 /* VariableStatement */ || kind === 262 /* FunctionDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 278 /* ExportDeclaration */; } // src/compiler/parser.ts @@ -17552,7 +17659,7 @@ function isAnExternalModuleIndicatorNode(node) { return canHaveModifiers(node) && hasModifierOfKind(node, 95 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { - return sourceFile.flags & 4194304 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; + return sourceFile.flags & 8388608 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; } function walkTreeForImportMeta(node) { return isImportMeta(node) ? node : forEachChild(node, walkTreeForImportMeta); @@ -17564,428 +17671,428 @@ function isImportMeta(node) { return isMetaProperty(node) && node.keywordToken === 102 /* ImportKeyword */ && node.name.escapedText === "meta"; } var forEachChildTable = { - [165 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { + [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [167 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { + [168 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); }, - [303 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { + [304 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); }, - [304 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { + [305 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [168 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { + [169 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [171 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { + [172 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [170 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { + [171 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [302 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { + [303 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); }, - [259 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { + [260 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); }, - [207 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { + [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [180 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { + [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [184 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { + [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [183 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { + [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [178 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [179 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [173 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { + [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, + [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, + [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [172 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { + [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [175 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { + [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [176 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { + [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [177 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { + [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [261 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { + [262 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [217 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { + [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); }, - [218 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { + [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); }, - [174 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { + [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); }, - [182 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { + [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [181 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { + [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); }, - [185 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { + [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [186 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { + [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.members); }, - [187 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { + [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.elementType); }, - [188 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { + [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [191 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [192 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [193 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { + [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, + [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, + [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); }, - [194 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { + [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.typeParameter); }, - [204 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { + [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [301 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { + [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); }, - [195 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [197 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { + [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, + [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, + [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); }, - [199 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { + [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); }, - [200 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { + [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.literal); }, - [201 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { + [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); }, - [205 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [206 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [208 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { + [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, + [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [209 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { + [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [210 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { + [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); }, - [211 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { + [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); }, - [212 /* CallExpression */]: forEachChildInCallOrNewExpression, - [213 /* NewExpression */]: forEachChildInCallOrNewExpression, - [214 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { + [213 /* CallExpression */]: forEachChildInCallOrNewExpression, + [214 /* NewExpression */]: forEachChildInCallOrNewExpression, + [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); }, - [215 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { + [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); }, - [216 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { + [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [219 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { + [220 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [220 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { + [221 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [221 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { + [222 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [223 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { + [224 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [228 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { + [229 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); }, - [222 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { + [223 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [224 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { + [225 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.operand); }, - [225 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { + [226 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); }, - [233 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { + [234 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [234 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { + [235 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [237 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { + [238 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); }, - [235 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { + [236 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [226 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { + [227 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); }, - [229 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { + [230 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [240 /* Block */]: forEachChildInBlock, - [267 /* ModuleBlock */]: forEachChildInBlock, - [311 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { + [241 /* Block */]: forEachChildInBlock, + [268 /* ModuleBlock */]: forEachChildInBlock, + [312 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); }, - [242 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { + [243 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); }, - [260 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { + [261 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.declarations); }, - [243 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { + [244 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [244 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { + [245 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); }, - [245 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { + [246 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); }, - [246 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { + [247 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [247 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { + [248 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); }, - [248 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { + [249 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [249 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { + [250 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [250 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [251 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [252 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { + [251 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, + [252 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, + [253 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [253 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { + [254 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); }, - [254 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { + [255 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); }, - [268 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { + [269 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.clauses); }, - [295 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { + [296 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); }, - [296 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { + [297 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.statements); }, - [255 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { + [256 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); }, - [256 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { + [257 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [257 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { + [258 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); }, - [298 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { + [299 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); }, - [169 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { + [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [262 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [230 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [263 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { + [263 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, + [231 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, + [264 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); }, - [264 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { + [265 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); }, - [265 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { + [266 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); }, - [305 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { + [306 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [266 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { + [267 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); }, - [270 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { + [271 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, - [271 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { + [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [272 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { + [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [299 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [300 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, - [269 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { + [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); }, - [273 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { + [274 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [279 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { + [280 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [274 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [278 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [277 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { + [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, + [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, + [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); }, - [275 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [280 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [276 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { + [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, + [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, + [277 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); }, - [227 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { + [228 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [238 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { + [239 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); }, - [202 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { + [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); }, - [203 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { + [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); }, - [166 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { + [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [297 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { + [298 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.types); }, - [232 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { + [233 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); }, - [282 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { + [283 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [281 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { + [282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.modifiers); }, - [360 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { + [361 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [283 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { + [284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); }, - [287 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { + [288 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); }, - [284 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [285 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [291 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { + [285 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [286 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, + [292 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.properties); }, - [290 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { + [291 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); }, - [292 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { + [293 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); }, - [293 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { + [294 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); }, - [286 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { + [287 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.tagName); }, - [294 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { + [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.namespace) || visitNode2(cbNode, node.name); }, - [189 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [190 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [315 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [320 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [322 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { + [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [316 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [322 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [321 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [323 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [325 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, + [324 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); }, - [326 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { + [327 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); }, - [353 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { + [354 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [316 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { + [317 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name); }, - [317 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { + [318 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); }, - [347 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [354 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [336 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { + [348 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, + [355 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, + [337 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [335 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { + [336 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [334 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { + [335 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [351 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { + [352 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [352 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 315 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); + [353 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { + return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 316 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); }, - [344 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { + [345 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); }, - [348 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [350 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [349 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [356 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [355 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [345 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [329 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { + [349 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, + [351 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, + [350 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, + [347 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, + [357 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, + [356 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, + [346 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, + [330 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); }, - [330 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [331 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [332 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [328 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { + [331 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, + [332 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, + [333 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, + [329 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { return forEach(node.jsDocPropertyTags, cbNode); }, - [333 /* JSDocTag */]: forEachChildInJSDocTag, - [338 /* JSDocClassTag */]: forEachChildInJSDocTag, - [339 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [340 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [341 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [342 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [337 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [343 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [359 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression + [334 /* JSDocTag */]: forEachChildInJSDocTag, + [339 /* JSDocClassTag */]: forEachChildInJSDocTag, + [340 /* JSDocPublicTag */]: forEachChildInJSDocTag, + [341 /* JSDocPrivateTag */]: forEachChildInJSDocTag, + [342 /* JSDocProtectedTag */]: forEachChildInJSDocTag, + [343 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, + [338 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, + [344 /* JSDocOverrideTag */]: forEachChildInJSDocTag, + [360 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression }; function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); @@ -18040,7 +18147,7 @@ function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.expression); } function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 164 /* LastToken */) { + if (node === void 0 || node.kind <= 165 /* LastToken */) { return; } const fn = forEachChildTable[node.kind]; @@ -18075,7 +18182,7 @@ function forEachChildRecursively(rootNode, cbNode, cbNodes) { continue; return res; } - if (current.kind >= 165 /* FirstNode */) { + if (current.kind >= 166 /* FirstNode */) { for (const child of gatherPossibleChildren(current)) { queue.push(child); parents.push(current); @@ -18108,7 +18215,7 @@ var Parser; /*skipTrivia*/ true ); - var disallowInAndDecoratorContext = 4096 /* DisallowInContext */ | 16384 /* DecoratorContext */; + var disallowInAndDecoratorContext = 8192 /* DisallowInContext */ | 32768 /* DecoratorContext */; var NodeConstructor2; var TokenConstructor2; var IdentifierConstructor2; @@ -18353,10 +18460,10 @@ var Parser; switch (scriptKind) { case 1 /* JS */: case 2 /* JSX */: - contextFlags = 262144 /* JavaScriptFile */; + contextFlags = 524288 /* JavaScriptFile */; break; case 6 /* JSON */: - contextFlags = 262144 /* JavaScriptFile */ | 67108864 /* JsonFile */; + contextFlags = 524288 /* JavaScriptFile */ | 134217728 /* JsonFile */; break; default: contextFlags = 0 /* None */; @@ -18388,13 +18495,14 @@ var Parser; function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) { const isDeclarationFile = isDeclarationFileName(fileName); if (isDeclarationFile) { - contextFlags |= 16777216 /* Ambient */; + contextFlags |= 33554432 /* Ambient */; } sourceFlags = contextFlags; nextToken(); const statements = parseList(0 /* SourceElements */, parseStatement); Debug.assert(token() === 1 /* EndOfFileToken */); - const endOfFileToken = addJSDocComment(parseTokenNode()); + const endHasJSDoc = hasPrecedingJSDocComment(); + const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc); const sourceFile = createSourceFile2(fileName, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator2); processCommentPragmas(sourceFile, sourceText); processPragmasIntoFields(sourceFile, reportPragmaDiagnostic); @@ -18414,18 +18522,18 @@ var Parser; parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic)); } } - function withJSDoc(node, hasJSDoc) { - return hasJSDoc ? addJSDocComment(node) : node; - } let hasDeprecatedTag = false; - function addJSDocComment(node) { + function withJSDoc(node, hasJSDoc) { + if (!hasJSDoc) { + return node; + } Debug.assert(!node.jsDoc); const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), (comment) => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos)); if (jsDoc.length) node.jsDoc = jsDoc; if (hasDeprecatedTag) { hasDeprecatedTag = false; - node.flags |= 268435456 /* Deprecated */; + node.flags |= 536870912 /* Deprecated */; } return node; } @@ -18450,7 +18558,7 @@ var Parser; } speculationHelper(() => { const savedContextFlags = contextFlags; - contextFlags |= 32768 /* AwaitContext */; + contextFlags |= 65536 /* AwaitContext */; scanner.resetTokenState(nextStatement.pos); nextToken(); while (token() !== 1 /* EndOfFileToken */) { @@ -18485,7 +18593,7 @@ var Parser; syntaxCursor = savedSyntaxCursor; return factory2.updateSourceFile(sourceFile, setTextRange(factoryCreateNodeArray(statements), sourceFile.statements)); function containsPossibleTopLevelAwait(node) { - return !(node.flags & 32768 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); + return !(node.flags & 65536 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); } function findNextStatementWithAwait(statements2, start2) { for (let i = start2; i < statements2.length; i++) { @@ -18549,16 +18657,16 @@ var Parser; } } function setDisallowInContext(val) { - setContextFlag(val, 4096 /* DisallowInContext */); + setContextFlag(val, 8192 /* DisallowInContext */); } function setYieldContext(val) { - setContextFlag(val, 8192 /* YieldContext */); + setContextFlag(val, 16384 /* YieldContext */); } function setDecoratorContext(val) { - setContextFlag(val, 16384 /* DecoratorContext */); + setContextFlag(val, 32768 /* DecoratorContext */); } function setAwaitContext(val) { - setContextFlag(val, 32768 /* AwaitContext */); + setContextFlag(val, 65536 /* AwaitContext */); } function doOutsideOfContext(context, func) { const contextFlagsToClear = context & contextFlags; @@ -18597,52 +18705,52 @@ var Parser; return func(); } function allowInAnd(func) { - return doOutsideOfContext(4096 /* DisallowInContext */, func); + return doOutsideOfContext(8192 /* DisallowInContext */, func); } function disallowInAnd(func) { - return doInsideOfContext(4096 /* DisallowInContext */, func); + return doInsideOfContext(8192 /* DisallowInContext */, func); } function allowConditionalTypesAnd(func) { - return doOutsideOfContext(65536 /* DisallowConditionalTypesContext */, func); + return doOutsideOfContext(131072 /* DisallowConditionalTypesContext */, func); } function disallowConditionalTypesAnd(func) { - return doInsideOfContext(65536 /* DisallowConditionalTypesContext */, func); + return doInsideOfContext(131072 /* DisallowConditionalTypesContext */, func); } function doInYieldContext(func) { - return doInsideOfContext(8192 /* YieldContext */, func); + return doInsideOfContext(16384 /* YieldContext */, func); } function doInDecoratorContext(func) { - return doInsideOfContext(16384 /* DecoratorContext */, func); + return doInsideOfContext(32768 /* DecoratorContext */, func); } function doInAwaitContext(func) { - return doInsideOfContext(32768 /* AwaitContext */, func); + return doInsideOfContext(65536 /* AwaitContext */, func); } function doOutsideOfAwaitContext(func) { - return doOutsideOfContext(32768 /* AwaitContext */, func); + return doOutsideOfContext(65536 /* AwaitContext */, func); } function doInYieldAndAwaitContext(func) { - return doInsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + return doInsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); } function doOutsideOfYieldAndAwaitContext(func) { - return doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */, func); + return doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); } function inContext(flags) { return (contextFlags & flags) !== 0; } function inYieldContext() { - return inContext(8192 /* YieldContext */); + return inContext(16384 /* YieldContext */); } function inDisallowInContext() { - return inContext(4096 /* DisallowInContext */); + return inContext(8192 /* DisallowInContext */); } function inDisallowConditionalTypesContext() { - return inContext(65536 /* DisallowConditionalTypesContext */); + return inContext(131072 /* DisallowConditionalTypesContext */); } function inDecoratorContext() { - return inContext(16384 /* DecoratorContext */); + return inContext(32768 /* DecoratorContext */); } function inAwaitContext() { - return inContext(32768 /* AwaitContext */); + return inContext(65536 /* AwaitContext */); } function parseErrorAtCurrentToken(message, ...args) { return parseErrorAt(scanner.getTokenStart(), scanner.getTokenEnd(), message, ...args); @@ -18966,7 +19074,7 @@ var Parser; } if (parseErrorBeforeNextFinishedNode) { parseErrorBeforeNextFinishedNode = false; - node.flags |= 131072 /* ThisNodeHasError */; + node.flags |= 262144 /* ThisNodeHasError */; } return node; } @@ -18995,7 +19103,7 @@ var Parser; "", /*isSingleQuote*/ void 0 - ) : kind === 281 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); + ) : kind === 282 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); return finishNode(result, pos); } function internIdentifier(text) { @@ -19212,6 +19320,9 @@ var Parser; case 22 /* HeritageClauses */: return isHeritageClause2(); case 23 /* ImportOrExportSpecifiers */: + if (token() === 161 /* FromKeyword */ && lookAhead(nextTokenIsStringLiteral)) { + return false; + } return tokenIsIdentifierOrKeyword(token()); case 13 /* JsxAttributes */: return tokenIsIdentifierOrKeyword(token()) || token() === 19 /* OpenBraceToken */; @@ -19368,7 +19479,7 @@ var Parser; if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { return void 0; } - const nodeContextFlags = node.flags & 50720768 /* ContextFlags */; + const nodeContextFlags = node.flags & 101441536 /* ContextFlags */; if (nodeContextFlags !== contextFlags) { return void 0; } @@ -19426,14 +19537,14 @@ var Parser; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 175 /* Constructor */: - case 180 /* IndexSignature */: - case 176 /* GetAccessor */: - case 177 /* SetAccessor */: - case 171 /* PropertyDeclaration */: - case 239 /* SemicolonClassElement */: + case 176 /* Constructor */: + case 181 /* IndexSignature */: + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 172 /* PropertyDeclaration */: + case 240 /* SemicolonClassElement */: return true; - case 173 /* MethodDeclaration */: + case 174 /* MethodDeclaration */: const methodDeclaration = node; const nameIsConstructor = methodDeclaration.name.kind === 80 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; return !nameIsConstructor; @@ -19444,8 +19555,8 @@ var Parser; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 295 /* CaseClause */: - case 296 /* DefaultClause */: + case 296 /* CaseClause */: + case 297 /* DefaultClause */: return true; } } @@ -19454,65 +19565,65 @@ var Parser; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 261 /* FunctionDeclaration */: - case 242 /* VariableStatement */: - case 240 /* Block */: - case 244 /* IfStatement */: - case 243 /* ExpressionStatement */: - case 256 /* ThrowStatement */: - case 252 /* ReturnStatement */: - case 254 /* SwitchStatement */: - case 251 /* BreakStatement */: - case 250 /* ContinueStatement */: - case 248 /* ForInStatement */: - case 249 /* ForOfStatement */: - case 247 /* ForStatement */: - case 246 /* WhileStatement */: - case 253 /* WithStatement */: - case 241 /* EmptyStatement */: - case 257 /* TryStatement */: - case 255 /* LabeledStatement */: - case 245 /* DoStatement */: - case 258 /* DebuggerStatement */: - case 271 /* ImportDeclaration */: - case 270 /* ImportEqualsDeclaration */: - case 277 /* ExportDeclaration */: - case 276 /* ExportAssignment */: - case 266 /* ModuleDeclaration */: - case 262 /* ClassDeclaration */: - case 263 /* InterfaceDeclaration */: - case 265 /* EnumDeclaration */: - case 264 /* TypeAliasDeclaration */: + case 262 /* FunctionDeclaration */: + case 243 /* VariableStatement */: + case 241 /* Block */: + case 245 /* IfStatement */: + case 244 /* ExpressionStatement */: + case 257 /* ThrowStatement */: + case 253 /* ReturnStatement */: + case 255 /* SwitchStatement */: + case 252 /* BreakStatement */: + case 251 /* ContinueStatement */: + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + case 248 /* ForStatement */: + case 247 /* WhileStatement */: + case 254 /* WithStatement */: + case 242 /* EmptyStatement */: + case 258 /* TryStatement */: + case 256 /* LabeledStatement */: + case 246 /* DoStatement */: + case 259 /* DebuggerStatement */: + case 272 /* ImportDeclaration */: + case 271 /* ImportEqualsDeclaration */: + case 278 /* ExportDeclaration */: + case 277 /* ExportAssignment */: + case 267 /* ModuleDeclaration */: + case 263 /* ClassDeclaration */: + case 264 /* InterfaceDeclaration */: + case 266 /* EnumDeclaration */: + case 265 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 305 /* EnumMember */; + return node.kind === 306 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 179 /* ConstructSignature */: - case 172 /* MethodSignature */: - case 180 /* IndexSignature */: - case 170 /* PropertySignature */: - case 178 /* CallSignature */: + case 180 /* ConstructSignature */: + case 173 /* MethodSignature */: + case 181 /* IndexSignature */: + case 171 /* PropertySignature */: + case 179 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 259 /* VariableDeclaration */) { + if (node.kind !== 260 /* VariableDeclaration */) { return false; } const variableDeclarator = node; return variableDeclarator.initializer === void 0; } function isReusableParameter(node) { - if (node.kind !== 168 /* Parameter */) { + if (node.kind !== 169 /* Parameter */) { return false; } const parameter = node; @@ -19570,6 +19681,9 @@ var Parser; case 22 /* HeritageClauses */: return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_expected); case 23 /* ImportOrExportSpecifiers */: + if (token() === 161 /* FromKeyword */) { + return parseErrorAtCurrentToken(Diagnostics._0_expected, "}"); + } return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case 13 /* JsxAttributes */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); @@ -19849,14 +19963,14 @@ var Parser; } function typeHasArrowFunctionBlockingParseError(node) { switch (node.kind) { - case 182 /* TypeReference */: + case 183 /* TypeReference */: return nodeIsMissing(node.typeName); - case 183 /* FunctionType */: - case 184 /* ConstructorType */: { + case 184 /* FunctionType */: + case 185 /* ConstructorType */: { const { parameters, type } = node; return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); } - case 195 /* ParenthesizedType */: + case 196 /* ParenthesizedType */: return typeHasArrowFunctionBlockingParseError(node.type); default: return false; @@ -20148,7 +20262,7 @@ var Parser; function parseSignatureMember(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 179 /* ConstructSignature */) { + if (kind === 180 /* ConstructSignature */) { parseExpected(105 /* NewKeyword */); } const typeParameters = parseTypeParameters(); @@ -20159,7 +20273,7 @@ var Parser; true ); parseTypeMemberSemicolon(); - const node = kind === 178 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); + const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); } function isIndexSignature() { @@ -20244,10 +20358,10 @@ var Parser; } function parseTypeMember() { if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { - return parseSignatureMember(178 /* CallSignature */); + return parseSignatureMember(179 /* CallSignature */); } if (token() === 105 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(179 /* ConstructSignature */); + return parseSignatureMember(180 /* ConstructSignature */); } const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); @@ -20256,10 +20370,10 @@ var Parser; false ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 4 /* Type */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 4 /* Type */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 4 /* Type */); } if (isIndexSignature()) { return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); @@ -20468,7 +20582,7 @@ var Parser; return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos); } function parseImportType() { - sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); const isTypeOf = parseOptional(114 /* TypeOfKeyword */); parseExpected(102 /* ImportKeyword */); @@ -20493,7 +20607,7 @@ var Parser; case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 155 /* SymbolKeyword */: case 136 /* BooleanKeyword */: case 157 /* UndefinedKeyword */: @@ -20559,7 +20673,7 @@ var Parser; case 159 /* UnknownKeyword */: case 154 /* StringKeyword */: case 150 /* NumberKeyword */: - case 162 /* BigIntKeyword */: + case 163 /* BigIntKeyword */: case 136 /* BooleanKeyword */: case 148 /* ReadonlyKeyword */: case 155 /* SymbolKeyword */: @@ -20805,8 +20919,8 @@ var Parser; return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); } function parseType() { - if (contextFlags & 40960 /* TypeExcludesFlags */) { - return doOutsideOfContext(40960 /* TypeExcludesFlags */, parseType); + if (contextFlags & 81920 /* TypeExcludesFlags */) { + return doOutsideOfContext(81920 /* TypeExcludesFlags */, parseType); } if (isStartOfFunctionTypeOrConstructorType()) { return parseFunctionOrConstructorType(); @@ -20927,12 +21041,14 @@ var Parser; return arrowExpression; } const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); if (expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) { return parseSimpleArrowFunctionExpression( pos, expr, allowReturnTypeInArrowFunction, + hasJSDoc, /*asyncModifier*/ void 0 ); @@ -20978,7 +21094,7 @@ var Parser; ), pos); } } - function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, asyncModifier) { + function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier) { Debug.assert(token() === 39 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); const parameter = factory2.createParameterDeclaration( /*modifiers*/ @@ -21011,7 +21127,7 @@ var Parser; equalsGreaterThanToken, body ); - return addJSDocComment(finishNode(node, pos)); + return withJSDoc(finishNode(node, pos), hasJSDoc); } function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { const triState = isParenthesizedArrowFunctionExpression(); @@ -21139,9 +21255,10 @@ var Parser; if (token() === 134 /* AsyncKeyword */) { if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { const pos = getNodePos(); + const hasJSDoc = hasPrecedingJSDocComment(); const asyncModifier = parseModifiersForArrowFunction(); const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); - return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, asyncModifier); + return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier); } } return void 0; @@ -21195,7 +21312,7 @@ var Parser; return void 0; } let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 195 /* ParenthesizedType */) { + while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { unwrappedType = unwrappedType.type; } const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); @@ -21258,7 +21375,7 @@ var Parser; return parseBinaryExpressionRest(precedence, leftOperand, pos); } function isInOrOfKeyword(t) { - return t === 103 /* InKeyword */ || t === 164 /* OfKeyword */; + return t === 103 /* InKeyword */ || t === 165 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand, pos) { while (true) { @@ -21340,7 +21457,7 @@ var Parser; if (token() === 43 /* AsteriskAsteriskToken */) { const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 215 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { Debug.assert(isKeywordOrPunctuation(unaryOperator)); @@ -21427,13 +21544,13 @@ var Parser; let expression; if (token() === 102 /* ImportKeyword */) { if (lookAhead(nextTokenIsOpenParenOrLessThan)) { - sourceFlags |= 2097152 /* PossiblyContainsDynamicImport */; + sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; expression = parseTokenNode(); } else if (lookAhead(nextTokenIsDot)) { nextToken(); nextToken(); expression = finishNode(factory2.createMetaProperty(102 /* ImportKeyword */, parseIdentifierName()), pos); - sourceFlags |= 4194304 /* PossiblyContainsImportMeta */; + sourceFlags |= 8388608 /* PossiblyContainsImportMeta */; } else { expression = parseMemberExpressionOrHigher(); } @@ -21480,11 +21597,11 @@ var Parser; const pos = getNodePos(); const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); let result; - if (opening.kind === 285 /* JsxOpeningElement */) { + if (opening.kind === 286 /* JsxOpeningElement */) { let children = parseJsxChildren(opening); let closingElement; const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 283 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { + if ((lastChild == null ? void 0 : lastChild.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { const end = lastChild.children.end; const newLast = finishNode( factory2.createJsxElement( @@ -21508,10 +21625,10 @@ var Parser; } } result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 288 /* JsxOpeningFragment */) { + } else if (opening.kind === 289 /* JsxOpeningFragment */) { result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); } else { - Debug.assert(opening.kind === 284 /* JsxSelfClosingElement */); + Debug.assert(opening.kind === 285 /* JsxSelfClosingElement */); result = opening; } if (!mustBeUnary && inExpressionContext && token() === 30 /* LessThanToken */) { @@ -21584,7 +21701,7 @@ var Parser; if (!child) break; list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 283 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { + if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { break; } } @@ -21603,7 +21720,7 @@ var Parser; return finishNode(factory2.createJsxOpeningFragment(), pos); } const tagName = parseJsxElementName(); - const typeArguments = (contextFlags & 262144 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; + const typeArguments = (contextFlags & 524288 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; const attributes = parseJsxAttributes(); let node; if (token() === 32 /* GreaterThanToken */) { @@ -21781,17 +21898,17 @@ var Parser; return token() === 29 /* QuestionDotToken */ && lookAhead(nextTokenIsIdentifierOrKeywordOrOpenBracketOrTemplate); } function tryReparseOptionalChain(node) { - if (node.flags & 32 /* OptionalChain */) { + if (node.flags & 64 /* OptionalChain */) { return true; } if (isNonNullExpression(node)) { let expr = node.expression; - while (isNonNullExpression(expr) && !(expr.flags & 32 /* OptionalChain */)) { + while (isNonNullExpression(expr) && !(expr.flags & 64 /* OptionalChain */)) { expr = expr.expression; } - if (expr.flags & 32 /* OptionalChain */) { + if (expr.flags & 64 /* OptionalChain */) { while (isNonNullExpression(node)) { - node.flags |= 32 /* OptionalChain */; + node.flags |= 64 /* OptionalChain */; node = node.expression; } return true; @@ -21857,7 +21974,7 @@ var Parser; continue; } if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 232 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( + expression = !questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( pos, expression, questionDotToken, @@ -21896,8 +22013,8 @@ var Parser; true ) ); - if (questionDotToken || tag.flags & 32 /* OptionalChain */) { - tagExpression.flags |= 32 /* OptionalChain */; + if (questionDotToken || tag.flags & 64 /* OptionalChain */) { + tagExpression.flags |= 64 /* OptionalChain */; } tagExpression.questionDotToken = questionDotToken; return finishNode(tagExpression, pos); @@ -21920,7 +22037,7 @@ var Parser; } } if (typeArguments || token() === 21 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (!questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -21949,7 +22066,7 @@ var Parser; return result; } function parseTypeArgumentsInExpression() { - if ((contextFlags & 262144 /* JavaScriptFile */) !== 0) { + if ((contextFlags & 524288 /* JavaScriptFile */) !== 0) { return void 0; } if (reScanLessThanToken() !== 30 /* LessThanToken */) { @@ -22081,10 +22198,10 @@ var Parser; true ); if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); } const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); const tokenIsIdentifier = isIdentifier2(); @@ -22178,7 +22295,7 @@ var Parser; false ); let typeArguments; - if (expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (expression.kind === 233 /* ExpressionWithTypeArguments */) { typeArguments = expression.typeArguments; expression = expression.expression; } @@ -22288,7 +22405,7 @@ var Parser; parseExpected(21 /* OpenParenToken */); let initializer; if (token() !== 27 /* SemicolonToken */) { - if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */) { + if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -22298,7 +22415,7 @@ var Parser; } } let node; - if (awaitToken ? parseExpected(164 /* OfKeyword */) : parseOptional(164 /* OfKeyword */)) { + if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( /*allowReturnTypeInArrowFunction*/ true @@ -22322,10 +22439,10 @@ var Parser; function parseBreakOrContinueStatement(kind) { const pos = getNodePos(); const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 251 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); + parseExpected(kind === 252 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); const label = canParseSemicolon() ? void 0 : parseIdentifier(); parseSemicolon(); - const node = kind === 251 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); + const node = kind === 252 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseReturnStatement() { @@ -22344,7 +22461,7 @@ var Parser; const openParenParsed = parseExpected(21 /* OpenParenToken */); const expression = allowInAnd(parseExpression); parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition); - const statement = doInsideOfContext(33554432 /* InWithStatement */, parseStatement); + const statement = doInsideOfContext(67108864 /* InWithStatement */, parseStatement); return withJSDoc(finishNode(factory2.createWithStatement(expression, statement), pos), hasJSDoc); } function parseCaseClause() { @@ -22484,6 +22601,10 @@ var Parser; case 86 /* ClassKeyword */: case 94 /* EnumKeyword */: return true; + case 160 /* UsingKeyword */: + return isUsingDeclaration(); + case 135 /* AwaitKeyword */: + return isAwaitUsingDeclaration(); case 120 /* InterfaceKeyword */: case 156 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); @@ -22498,12 +22619,16 @@ var Parser; case 124 /* ProtectedKeyword */: case 125 /* PublicKeyword */: case 148 /* ReadonlyKeyword */: + const previousToken = token(); nextToken(); if (scanner.hasPrecedingLineBreak()) { return false; } + if (previousToken === 138 /* DeclareKeyword */ && token() === 156 /* TypeKeyword */) { + return true; + } continue; - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: nextToken(); return token() === 19 /* OpenBraceToken */ || token() === 80 /* Identifier */ || token() === 95 /* ExportKeyword */; case 102 /* ImportKeyword */: @@ -22536,6 +22661,7 @@ var Parser; case 19 /* OpenBraceToken */: case 115 /* VarKeyword */: case 121 /* LetKeyword */: + case 160 /* UsingKeyword */: case 100 /* FunctionKeyword */: case 86 /* ClassKeyword */: case 94 /* EnumKeyword */: @@ -22565,7 +22691,7 @@ var Parser; case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: case 156 /* TypeKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: return true; case 129 /* AccessorKeyword */: case 125 /* PublicKeyword */: @@ -22585,6 +22711,36 @@ var Parser; function isLetDeclaration() { return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuring); } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf() { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine( + /*disallowOf*/ + true + ); + } + function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf) { + nextToken(); + if (disallowOf && token() === 165 /* OfKeyword */) + return false; + return (isBindingIdentifier() || token() === 19 /* OpenBraceToken */) && !scanner.hasPrecedingLineBreak(); + } + function isUsingDeclaration() { + return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); + } + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { + return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine( + /*disallowOf*/ + true + ); + } + function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) { + if (nextToken() === 160 /* UsingKeyword */) { + return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); + } + return false; + } + function isAwaitUsingDeclaration() { + return lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine); + } function parseStatement() { switch (token()) { case 27 /* SemicolonToken */: @@ -22611,6 +22767,26 @@ var Parser; ); } break; + case 135 /* AwaitKeyword */: + if (isAwaitUsingDeclaration()) { + return parseVariableStatement( + getNodePos(), + hasPrecedingJSDocComment(), + /*modifiers*/ + void 0 + ); + } + break; + case 160 /* UsingKeyword */: + if (isUsingDeclaration()) { + return parseVariableStatement( + getNodePos(), + hasPrecedingJSDocComment(), + /*modifiers*/ + void 0 + ); + } + break; case 100 /* FunctionKeyword */: return parseFunctionDeclaration( getNodePos(), @@ -22634,9 +22810,9 @@ var Parser; case 99 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 88 /* ContinueKeyword */: - return parseBreakOrContinueStatement(250 /* ContinueStatement */); + return parseBreakOrContinueStatement(251 /* ContinueStatement */); case 83 /* BreakKeyword */: - return parseBreakOrContinueStatement(251 /* BreakStatement */); + return parseBreakOrContinueStatement(252 /* BreakStatement */); case 107 /* ReturnKeyword */: return parseReturnStatement(); case 118 /* WithKeyword */: @@ -22670,7 +22846,7 @@ var Parser; case 129 /* AccessorKeyword */: case 126 /* StaticKeyword */: case 148 /* ReadonlyKeyword */: - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -22695,15 +22871,15 @@ var Parser; return node; } for (const m of modifiers) { - m.flags |= 16777216 /* Ambient */; + m.flags |= 33554432 /* Ambient */; } - return doInsideOfContext(16777216 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); + return doInsideOfContext(33554432 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); } else { return parseDeclarationWorker(pos, hasJSDoc, modifiers); } } function tryReuseAmbientDeclaration(pos) { - return doInsideOfContext(16777216 /* Ambient */, () => { + return doInsideOfContext(33554432 /* Ambient */, () => { const node = currentNode(parsingContext, pos); if (node) { return consumeNode(node); @@ -22715,6 +22891,8 @@ var Parser; case 115 /* VarKeyword */: case 121 /* LetKeyword */: case 87 /* ConstKeyword */: + case 160 /* UsingKeyword */: + case 135 /* AwaitKeyword */: return parseVariableStatement(pos, hasJSDoc, modifiersIn); case 100 /* FunctionKeyword */: return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); @@ -22726,7 +22904,7 @@ var Parser; return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); case 94 /* EnumKeyword */: return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 161 /* GlobalKeyword */: + case 162 /* GlobalKeyword */: case 144 /* ModuleKeyword */: case 145 /* NamespaceKeyword */: return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); @@ -22746,7 +22924,7 @@ var Parser; default: if (modifiersIn) { const missing = createMissingNode( - 281 /* MissingDeclaration */, + 282 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Declaration_expected @@ -22758,6 +22936,9 @@ var Parser; return void 0; } } + function nextTokenIsStringLiteral() { + return nextToken() === 11 /* StringLiteral */; + } function nextTokenIsIdentifierOrStringLiteralOnSameLine() { nextToken(); return !scanner.hasPrecedingLineBreak() && (isIdentifier2() || token() === 11 /* StringLiteral */); @@ -22810,14 +22991,14 @@ var Parser; function parseObjectBindingPattern() { const pos = getNodePos(); parseExpected(19 /* OpenBraceToken */); - const elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); + const elements = allowInAnd(() => parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement)); parseExpected(20 /* CloseBraceToken */); return finishNode(factory2.createObjectBindingPattern(elements), pos); } function parseArrayBindingPattern() { const pos = getNodePos(); parseExpected(23 /* OpenBracketToken */); - const elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); + const elements = allowInAnd(() => parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement)); parseExpected(24 /* CloseBracketToken */); return finishNode(factory2.createArrayBindingPattern(elements), pos); } @@ -22864,12 +23045,20 @@ var Parser; case 87 /* ConstKeyword */: flags |= 2 /* Const */; break; + case 160 /* UsingKeyword */: + flags |= 4 /* Using */; + break; + case 135 /* AwaitKeyword */: + Debug.assert(isAwaitUsingDeclaration()); + flags |= 6 /* AwaitUsing */; + nextToken(); + break; default: Debug.fail(); } nextToken(); let declarations; - if (token() === 164 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { declarations = createMissingList(); } else { const savedDisallowIn = inDisallowInContext(); @@ -22975,7 +23164,7 @@ var Parser; function parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken) { const exclamationToken = !questionToken && !scanner.hasPrecedingLineBreak() ? parseOptionalToken(54 /* ExclamationToken */) : void 0; const type = parseTypeAnnotation(); - const initializer = doOutsideOfContext(8192 /* YieldContext */ | 32768 /* AwaitContext */ | 4096 /* DisallowInContext */, parseInitializer); + const initializer = doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */ | 8192 /* DisallowInContext */, parseInitializer); parseSemicolonAfterPropertyName(name, type, initializer); const node = factory2.createPropertyDeclaration( modifiers, @@ -23015,7 +23204,7 @@ var Parser; false ); const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 176 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); + const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); node.typeParameters = typeParameters; if (isSetAccessorDeclaration(node)) node.type = type; @@ -23181,10 +23370,10 @@ var Parser; return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); } if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 176 /* GetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); } if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* SetAccessor */, 0 /* None */); + return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); } if (token() === 137 /* ConstructorKeyword */ || token() === 11 /* StringLiteral */) { const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); @@ -23199,9 +23388,9 @@ var Parser; const isAmbient = some(modifiers, isDeclareModifier); if (isAmbient) { for (const m of modifiers) { - m.flags |= 16777216 /* Ambient */; + m.flags |= 33554432 /* Ambient */; } - return doInsideOfContext(16777216 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); + return doInsideOfContext(33554432 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); } else { return parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers); } @@ -23232,10 +23421,10 @@ var Parser; true ); if (token() === 86 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 230 /* ClassExpression */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 231 /* ClassExpression */); } const missing = createMissingNode( - 281 /* MissingDeclaration */, + 282 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, Diagnostics.Expression_expected @@ -23250,11 +23439,11 @@ var Parser; hasPrecedingJSDocComment(), /*modifiers*/ void 0, - 230 /* ClassExpression */ + 231 /* ClassExpression */ ); } function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 262 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 263 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { const savedAwaitContext = inAwaitContext(); @@ -23275,7 +23464,7 @@ var Parser; members = createMissingList(); } setAwaitContext(savedAwaitContext); - const node = kind === 262 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); + const node = kind === 263 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseNameOfClassDeclarationOrExpression() { @@ -23301,7 +23490,7 @@ var Parser; function parseExpressionWithTypeArguments() { const pos = getNodePos(); const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 232 /* ExpressionWithTypeArguments */) { + if (expression.kind === 233 /* ExpressionWithTypeArguments */) { return expression; } const typeArguments = tryParseTypeArguments(); @@ -23327,6 +23516,9 @@ var Parser; } function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { parseExpected(156 /* TypeKeyword */); + if (scanner.hasPrecedingLineBreak()) { + parseErrorAtCurrentToken(Diagnostics.Line_break_not_permitted_here); + } const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(64 /* EqualsToken */); @@ -23367,7 +23559,7 @@ var Parser; return finishNode(factory2.createModuleBlock(statements), pos); } function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) { - const namespaceFlag = flags & 16 /* Namespace */; + const namespaceFlag = flags & 32 /* Namespace */; const name = parseIdentifier(); const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration( getNodePos(), @@ -23375,7 +23567,7 @@ var Parser; false, /*modifiers*/ void 0, - 4 /* NestedNamespace */ | namespaceFlag + 8 /* NestedNamespace */ | namespaceFlag ) : parseModuleBlock(); const node = factory2.createModuleDeclaration(modifiers, name, body, flags); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -23383,9 +23575,9 @@ var Parser; function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; let name; - if (token() === 161 /* GlobalKeyword */) { + if (token() === 162 /* GlobalKeyword */) { name = parseIdentifier(); - flags |= 1024 /* GlobalAugmentation */; + flags |= 2048 /* GlobalAugmentation */; } else { name = parseLiteralNode(); name.text = internIdentifier(name.text); @@ -23401,10 +23593,10 @@ var Parser; } function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { let flags = 0; - if (token() === 161 /* GlobalKeyword */) { + if (token() === 162 /* GlobalKeyword */) { return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); } else if (parseOptional(145 /* NamespaceKeyword */)) { - flags |= 16 /* Namespace */; + flags |= 32 /* Namespace */; } else { parseExpected(144 /* ModuleKeyword */); if (token() === 11 /* StringLiteral */) { @@ -23442,7 +23634,7 @@ var Parser; identifier = parseIdentifier(); } let isTypeOnly = false; - if (token() !== 160 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { + if (token() !== 161 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { isTypeOnly = true; identifier = isIdentifier2() ? parseIdentifier() : void 0; } @@ -23454,7 +23646,7 @@ var Parser; token() === 42 /* AsteriskToken */ || // import * token() === 19 /* OpenBraceToken */) { importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(160 /* FromKeyword */); + parseExpected(161 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); let assertClause; @@ -23519,7 +23711,7 @@ var Parser; return token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */; } function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 28 /* CommaToken */ || token() === 160 /* FromKeyword */; + return token() === 28 /* CommaToken */ || token() === 161 /* FromKeyword */; } function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { parseExpected(64 /* EqualsToken */); @@ -23532,7 +23724,7 @@ var Parser; function parseImportClause(identifier, pos, isTypeOnly) { let namedBindings; if (!identifier || parseOptional(28 /* CommaToken */)) { - namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(274 /* NamedImports */); + namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(275 /* NamedImports */); } return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); } @@ -23568,15 +23760,15 @@ var Parser; } function parseNamedImportsOrExports(kind) { const pos = getNodePos(); - const node = kind === 274 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); + const node = kind === 275 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); return finishNode(node, pos); } function parseExportSpecifier() { const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(280 /* ExportSpecifier */), hasJSDoc); + return withJSDoc(parseImportOrExportSpecifier(281 /* ExportSpecifier */), hasJSDoc); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(275 /* ImportSpecifier */); + return parseImportOrExportSpecifier(276 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { const pos = getNodePos(); @@ -23620,10 +23812,10 @@ var Parser; parseExpected(130 /* AsKeyword */); name = parseNameWithKeywordCheck(); } - if (kind === 275 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 276 /* ImportSpecifier */ && checkIdentifierIsKeyword) { parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); } - const node = kind === 275 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); + const node = kind === 276 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); return finishNode(node, pos); function parseNameWithKeywordCheck() { checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); @@ -23650,12 +23842,12 @@ var Parser; if (parseOptional(130 /* AsKeyword */)) { exportClause = parseNamespaceExport(namespaceExportPos); } - parseExpected(160 /* FromKeyword */); + parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } else { - exportClause = parseNamedImportsOrExports(278 /* NamedExports */); - if (token() === 160 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner.hasPrecedingLineBreak()) { - parseExpected(160 /* FromKeyword */); + exportClause = parseNamedImportsOrExports(279 /* NamedExports */); + if (token() === 161 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner.hasPrecedingLineBreak()) { + parseExpected(161 /* FromKeyword */); moduleSpecifier = parseModuleSpecifier(); } } @@ -23760,7 +23952,7 @@ var Parser; function parseJSDocTypeExpression(mayOmitBraces) { const pos = getNodePos(); const hasBrace = (mayOmitBraces ? parseOptional : parseExpected)(19 /* OpenBraceToken */); - const type = doInsideOfContext(8388608 /* JSDoc */, parseJSDocType); + const type = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); if (!mayOmitBraces || hasBrace) { parseExpectedJSDoc(20 /* CloseBraceToken */); } @@ -23799,7 +23991,7 @@ var Parser; void 0, 1 /* JS */ ); - const jsDoc = doInsideOfContext(8388608 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); + const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); const sourceFile = { languageVariant: 0 /* Standard */, text: content }; const diagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); clearState(); @@ -23810,9 +24002,9 @@ var Parser; const saveToken = currentToken; const saveParseDiagnosticsLength = parseDiagnostics.length; const saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; - const comment = doInsideOfContext(8388608 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); + const comment = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); setParent(comment, parent); - if (contextFlags & 262144 /* JavaScriptFile */) { + if (contextFlags & 524288 /* JavaScriptFile */) { if (!jsDocDiagnostics) { jsDocDiagnostics = []; } @@ -24293,7 +24485,7 @@ var Parser; switch (node.kind) { case 151 /* ObjectKeyword */: return true; - case 187 /* ArrayType */: + case 188 /* ArrayType */: return isObjectOrObjectArrayTypeReference(node.elementType); default: return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; @@ -24309,7 +24501,7 @@ var Parser; typeExpression = tryParseTypeExpression(); } const comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); - const nestedTypeLiteral = target !== 4 /* CallbackParameter */ && parseNestedTypeLiteral(typeExpression, name, target, indent2); + const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent2); if (nestedTypeLiteral) { typeExpression = nestedTypeLiteral; isNameFirst = true; @@ -24323,14 +24515,14 @@ var Parser; let child; let children; while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { - if (child.kind === 347 /* JSDocParameterTag */ || child.kind === 354 /* JSDocPropertyTag */) { + if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) { children = append(children, child); - } else if (child.kind === 351 /* JSDocTemplateTag */) { + } else if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); } } if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 187 /* ArrayType */), pos); + const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); return finishNode(factory2.createJSDocTypeExpression(literal), pos); } } @@ -24465,11 +24657,11 @@ var Parser; let jsDocPropertyTags; let hasChildren = false; while (child = tryParse(() => parseChildPropertyTag(indent2))) { - if (child.kind === 351 /* JSDocTemplateTag */) { + if (child.kind === 352 /* JSDocTemplateTag */) { break; } hasChildren = true; - if (child.kind === 350 /* JSDocTypeTag */) { + if (child.kind === 351 /* JSDocTypeTag */) { if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { @@ -24484,7 +24676,7 @@ var Parser; } } if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 187 /* ArrayType */; + const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); end2 = typeExpression.end; @@ -24513,12 +24705,12 @@ var Parser; void 0, typeNameOrNamespaceName, body, - nested ? 4 /* NestedNamespace */ : void 0 + nested ? 8 /* NestedNamespace */ : void 0 ); return finishNode(jsDocNamespaceNode, start2); } if (nested) { - typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */; + typeNameOrNamespaceName.flags |= 4096 /* IdentifierIsInJSDocNamespace */; } return typeNameOrNamespaceName; } @@ -24527,7 +24719,7 @@ var Parser; let child; let parameters; while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent2))) { - if (child.kind === 351 /* JSDocTemplateTag */) { + if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); break; } @@ -24540,7 +24732,7 @@ var Parser; const returnTag = tryParse(() => { if (parseOptionalJsdoc(60 /* AtToken */)) { const tag = parseTag(indent2); - if (tag && tag.kind === 348 /* JSDocReturnTag */) { + if (tag && tag.kind === 349 /* JSDocReturnTag */) { return tag; } } @@ -24595,7 +24787,7 @@ var Parser; case 60 /* AtToken */: if (canParseTag) { const child = tryParseChildTag(target, indent2); - if (child && (child.kind === 347 /* JSDocParameterTag */ || child.kind === 354 /* JSDocPropertyTag */) && target !== 4 /* CallbackParameter */ && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -24660,7 +24852,7 @@ var Parser; if (isBracketed) { skipWhitespace(); parseExpected(64 /* EqualsToken */); - defaultType = doInsideOfContext(8388608 /* JSDoc */, parseJSDocType); + defaultType = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); parseExpected(24 /* CloseBracketToken */); } if (nodeIsMissing(name)) { @@ -25228,7 +25420,7 @@ function getNamedArgRegEx(name) { return result; } var tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/im; -var singleLinePragmaRegEx = /^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im; +var singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im; function extractPragmas(pragmas, range, text) { const tripleSlash = range.kind === 2 /* SingleLineCommentTrivia */ && tripleSlashXMLCommentStartRegEx.exec(text); if (tripleSlash) { @@ -25320,7 +25512,7 @@ function tagNamesAreEquivalent(lhs, rhs) { if (lhs.kind === 110 /* ThisKeyword */) { return true; } - if (lhs.kind === 294 /* JsxNamespacedName */) { + if (lhs.kind === 295 /* JsxNamespacedName */) { return lhs.namespace.escapedText === rhs.namespace.escapedText && lhs.name.escapedText === rhs.name.escapedText; } return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); @@ -25368,6 +25560,7 @@ var libEntries = [ ["es2015.symbol", "lib.es2015.symbol.d.ts"], ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], ["es2016.array.include", "lib.es2016.array.include.d.ts"], + ["es2017.date", "lib.es2017.date.d.ts"], ["es2017.object", "lib.es2017.object.d.ts"], ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], ["es2017.string", "lib.es2017.string.d.ts"], @@ -25403,14 +25596,18 @@ var libEntries = [ ["es2022.string", "lib.es2022.string.d.ts"], ["es2022.regexp", "lib.es2022.regexp.d.ts"], ["es2023.array", "lib.es2023.array.d.ts"], + ["es2023.collection", "lib.es2023.collection.d.ts"], ["esnext.array", "lib.es2023.array.d.ts"], + ["esnext.collection", "lib.es2023.collection.d.ts"], ["esnext.symbol", "lib.es2019.symbol.d.ts"], ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], ["esnext.intl", "lib.esnext.intl.d.ts"], + ["esnext.disposable", "lib.esnext.disposable.d.ts"], ["esnext.bigint", "lib.es2020.bigint.d.ts"], ["esnext.string", "lib.es2022.string.d.ts"], ["esnext.promise", "lib.es2021.promise.d.ts"], ["esnext.weakref", "lib.es2021.weakref.d.ts"], + ["esnext.decorators", "lib.esnext.decorators.d.ts"], ["decorators", "lib.decorators.d.ts"], ["decorators.legacy", "lib.decorators.legacy.d.ts"] ]; @@ -25818,6 +26015,7 @@ var commandOptionsWithoutBuild = [ { name: "checkJs", type: "boolean", + affectsModuleResolution: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, @@ -26044,7 +26242,7 @@ var commandOptionsWithoutBuild = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any, - defaultValueDescription: false + defaultValueDescription: Diagnostics.false_unless_strict_is_set }, { name: "alwaysStrict", @@ -26915,7 +27113,7 @@ var typeAcquisitionDeclaration = { function convertConfigFileToObject(sourceFile, errors, jsonConversionNotifier) { var _a; const rootExpression = (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression; - if (rootExpression && rootExpression.kind !== 209 /* ObjectLiteralExpression */) { + if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { errors.push(createDiagnosticForNodeInSourceFile( sourceFile, rootExpression, @@ -26955,7 +27153,7 @@ function convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConv var _a; const result = returnValue ? {} : void 0; for (const element of node.properties) { - if (element.kind !== 302 /* PropertyAssignment */) { + if (element.kind !== 303 /* PropertyAssignment */) { errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); continue; } @@ -27000,15 +27198,15 @@ function convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConv return valueExpression.text; case 9 /* NumericLiteral */: return Number(valueExpression.text); - case 223 /* PrefixUnaryExpression */: + case 224 /* PrefixUnaryExpression */: if (valueExpression.operator !== 41 /* MinusToken */ || valueExpression.operand.kind !== 9 /* NumericLiteral */) { break; } return -Number(valueExpression.operand.text); - case 209 /* ObjectLiteralExpression */: + case 210 /* ObjectLiteralExpression */: const objectLiteralExpression = valueExpression; return convertObjectLiteralExpressionToJson(objectLiteralExpression, option); - case 208 /* ArrayLiteralExpression */: + case 209 /* ArrayLiteralExpression */: return convertArrayLiteralExpressionToJson( valueExpression.elements, option && option.element @@ -27037,17 +27235,17 @@ function invalidDotDotAfterRecursiveWildcard(s) { const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../"); return lastDotIndex > wildcardIndex; } -function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) { +function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) { return matchesExcludeWorker( pathToCheck, filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)), - useCaseSensitiveFileNames, + useCaseSensitiveFileNames2, currentDirectory ); } -function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) { +function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) { const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude"); - const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames); + const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2); if (!excludeRegex) return false; if (excludeRegex.test(pathToCheck)) @@ -27254,8 +27452,8 @@ function getPackageJsonTypesVersionsPaths(typesVersions) { } var nodeModulesAtTypes = combinePaths("node_modules", "@types"); function arePathsEqual(path1, path2, host) { - const useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; - return comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0 /* EqualTo */; + const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; + return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */; } function getOriginalAndResolvedFileName(fileName, host, traceEnabled) { const resolvedFileName = realPath(fileName, host, traceEnabled); @@ -28063,6 +28261,9 @@ function loadModuleFromSelfNameReference(extensions, moduleName, directory, stat } const trailingParts = parts.slice(nameParts.length); const subpath = !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`; + if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) { + return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference); + } const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference); @@ -28410,13 +28611,10 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec function combineDirectoryPath(root, dir) { return ensureTrailingDirectorySeparator(combinePaths(root, dir)); } - function useCaseSensitiveFileNames() { - return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); - } function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { var _a, _b, _c, _d; - if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames()) : true)) { - const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames }); + if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { + const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses = []; if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName)); @@ -28445,7 +28643,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec for (const commonSourceDirGuess of commonSourceDirGuesses) { const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess); for (const candidateDir of candidateDirectories) { - if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames())) { + if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) { const pathFragment = finalPath.slice(candidateDir.length + 1); const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment); const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */]; @@ -28455,7 +28653,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec for (const possibleExt of inputExts) { if (!extensionIsOk(extensions, possibleExt)) continue; - const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames()); + const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state)); if (state.host.fileExists(possibleInputWithInputExtension)) { return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField( extensions, @@ -28529,11 +28727,13 @@ function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); if (priorityExtensions) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, formatExtensions(priorityExtensions)); const result = lookup(priorityExtensions); if (result) return result; } if (secondaryExtensions && !typesScopeOnly) { + traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0, formatExtensions(secondaryExtensions)); return lookup(secondaryExtensions); } function lookup(extensions2) { @@ -28810,6 +29010,9 @@ function traceIfEnabled(state, diagnostic, ...args) { trace(state.host, diagnostic, ...args); } } +function useCaseSensitiveFileNames(state) { + return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); +} // src/compiler/checker.ts var nextNodeId = 1; @@ -28911,6 +29114,7 @@ var CheckMode = /* @__PURE__ */ ((CheckMode3) => { CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; CheckMode3[CheckMode3["IsForStringLiteralArgumentCompletions"] = 32] = "IsForStringLiteralArgumentCompletions"; CheckMode3[CheckMode3["RestBindingElement"] = 64] = "RestBindingElement"; + CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly"; return CheckMode3; })(CheckMode || {}); var SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => { @@ -28941,7 +29145,7 @@ function isNotAccessor(declaration) { return !isAccessor(declaration); } function isNotOverload(declaration) { - return declaration.kind !== 261 /* FunctionDeclaration */ && declaration.kind !== 173 /* MethodDeclaration */ || !!declaration.body; + return declaration.kind !== 262 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; } var JsxNames; ((JsxNames2) => { @@ -29183,21 +29387,21 @@ function visitIterationBody(body, visitor, context, nodeVisitor = visitNode) { return updated; } var visitEachChildTable = { - [165 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) ); }, - [166 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateComputedPropertyName( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Signature elements - [167 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29206,7 +29410,7 @@ var visitEachChildTable = { nodeVisitor(node.default, visitor, isTypeNode) ); }, - [168 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29217,14 +29421,14 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [169 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDecorator( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Type elements - [170 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertySignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29233,7 +29437,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [171 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updatePropertyDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29244,7 +29448,7 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [172 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodSignature( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29255,7 +29459,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [173 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMethodDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29268,7 +29472,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [175 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29276,7 +29480,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [176 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateGetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29286,7 +29490,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [177 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSetAccessorDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29295,7 +29499,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [174 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { context.startLexicalEnvironment(); context.suspendLexicalEnvironment(); return context.factory.updateClassStaticBlockDeclaration( @@ -29303,7 +29507,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [178 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCallSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -29311,7 +29515,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [179 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructSignature( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -29319,7 +29523,7 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [180 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexSignature( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29328,7 +29532,7 @@ var visitEachChildTable = { ); }, // Types - [181 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypePredicateNode( node, nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), @@ -29336,14 +29540,14 @@ var visitEachChildTable = { nodeVisitor(node.type, visitor, isTypeNode) ); }, - [182 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeReferenceNode( node, Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [183 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateFunctionTypeNode( node, nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), @@ -29351,7 +29555,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [184 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConstructorTypeNode( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29360,56 +29564,56 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [185 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeQueryNode( node, Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [186 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTypeLiteralNode( node, nodesVisitor(node.members, visitor, isTypeElement) ); }, - [187 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateArrayTypeNode( node, Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) ); }, - [188 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateTupleTypeNode( node, nodesVisitor(node.elements, visitor, isTypeNode) ); }, - [189 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateOptionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [190 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateRestTypeNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [191 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateUnionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [192 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateIntersectionTypeNode( node, nodesVisitor(node.types, visitor, isTypeNode) ); }, - [193 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateConditionalTypeNode( node, Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), @@ -29418,13 +29622,13 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) ); }, - [194 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInferTypeNode( node, Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) ); }, - [204 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), @@ -29434,14 +29638,14 @@ var visitEachChildTable = { node.isTypeOf ); }, - [301 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [302 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportTypeAssertionContainer( node, Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), node.multiLine ); }, - [201 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -29450,26 +29654,26 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [195 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedType( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [197 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOperatorNode( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [198 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIndexedAccessTypeNode( node, Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) ); }, - [199 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateMappedTypeNode( node, tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, @@ -29480,20 +29684,20 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [200 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLiteralTypeNode( node, Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) ); }, - [202 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralType( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) ); }, - [203 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateLiteralTypeSpan( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), @@ -29501,19 +29705,19 @@ var visitEachChildTable = { ); }, // Binding patterns - [205 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectBindingPattern( node, nodesVisitor(node.elements, visitor, isBindingElement) ); }, - [206 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayBindingPattern( node, nodesVisitor(node.elements, visitor, isArrayBindingElement) ); }, - [207 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBindingElement( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, @@ -29523,19 +29727,19 @@ var visitEachChildTable = { ); }, // Expression - [208 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateArrayLiteralExpression( node, nodesVisitor(node.elements, visitor, isExpression) ); }, - [209 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateObjectLiteralExpression( node, nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) ); }, - [210 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29547,7 +29751,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) ); }, - [211 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return isElementAccessChain(node) ? context.factory.updateElementAccessChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29559,7 +29763,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) ); }, - [212 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return isCallChain(node) ? context.factory.updateCallChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29573,7 +29777,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [213 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNewExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29581,7 +29785,7 @@ var visitEachChildTable = { nodesVisitor(node.arguments, visitor, isExpression) ); }, - [214 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTaggedTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), @@ -29589,20 +29793,20 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) ); }, - [215 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAssertion( node, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [216 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateParenthesizedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [217 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionExpression( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29614,7 +29818,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [218 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateArrowFunction( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29625,43 +29829,43 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [219 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [220 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDeleteExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [220 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [221 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeOfExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [221 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [222 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVoidExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [222 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [223 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAwaitExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [223 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [224 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePrefixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [224 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [225 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePostfixUnaryExpression( node, Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) ); }, - [225 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [226 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateBinaryExpression( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), @@ -29669,7 +29873,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) ); }, - [226 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [227 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateConditionalExpression( node, Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), @@ -29679,27 +29883,27 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) ); }, - [227 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [228 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateExpression( node, Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), nodesVisitor(node.templateSpans, visitor, isTemplateSpan) ); }, - [228 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [229 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateYieldExpression( node, tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, nodeVisitor(node.expression, visitor, isExpression) ); }, - [229 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [230 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadElement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [230 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [231 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29709,28 +29913,28 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [232 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [233 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionWithTypeArguments( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.typeArguments, visitor, isTypeNode) ); }, - [233 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [234 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAsExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [237 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [238 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSatisfiesExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [234 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [235 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return isOptionalChain(node) ? context.factory.updateNonNullChain( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) @@ -29739,14 +29943,14 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [235 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [236 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, // Misc - [238 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [239 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTemplateSpan( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29754,26 +29958,26 @@ var visitEachChildTable = { ); }, // Element - [240 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [241 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [242 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [243 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateVariableStatement( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) ); }, - [243 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [244 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExpressionStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [244 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [245 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateIfStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), @@ -29781,21 +29985,21 @@ var visitEachChildTable = { nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) ); }, - [245 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [246 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateDoStatement( node, visitIterationBody(node.statement, visitor, context, nodeVisitor), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [246 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [247 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWhileStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [247 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [248 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForStatement( node, nodeVisitor(node.initializer, visitor, isForInitializer), @@ -29804,7 +30008,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [248 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [249 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateForInStatement( node, Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), @@ -29812,7 +30016,7 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [249 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [250 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateForOfStatement( node, tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, @@ -29821,52 +30025,52 @@ var visitEachChildTable = { visitIterationBody(node.statement, visitor, context, nodeVisitor) ); }, - [250 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [251 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [251 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [252 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, nodeVisitor(node.label, visitor, isIdentifier) ); }, - [252 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [253 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateReturnStatement( node, nodeVisitor(node.expression, visitor, isExpression) ); }, - [253 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [254 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateWithStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [254 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [255 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSwitchStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) ); }, - [255 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [256 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, - [256 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [257 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateThrowStatement( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [257 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [258 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), @@ -29874,7 +30078,7 @@ var visitEachChildTable = { nodeVisitor(node.finallyBlock, visitor, isBlock) ); }, - [259 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { + [260 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateVariableDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), @@ -29883,13 +30087,13 @@ var visitEachChildTable = { nodeVisitor(node.initializer, visitor, isExpression) ); }, - [260 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [261 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateVariableDeclarationList( node, nodesVisitor(node.declarations, visitor, isVariableDeclaration) ); }, - [261 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { + [262 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { return context.factory.updateFunctionDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), @@ -29901,7 +30105,7 @@ var visitEachChildTable = { visitFunctionBody(node.body, visitor, context, nodeVisitor) ); }, - [262 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [263 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29911,7 +30115,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isClassElement) ); }, - [263 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [264 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29921,7 +30125,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isTypeElement) ); }, - [264 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [265 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29930,7 +30134,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); }, - [265 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [266 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29938,7 +30142,7 @@ var visitEachChildTable = { nodesVisitor(node.members, visitor, isEnumMember) ); }, - [266 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [267 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateModuleDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29946,25 +30150,25 @@ var visitEachChildTable = { nodeVisitor(node.body, visitor, isModuleBody) ); }, - [267 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [268 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateModuleBlock( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [268 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [269 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCaseBlock( node, nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) ); }, - [269 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [270 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [270 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [271 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportEqualsDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29973,7 +30177,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, - [271 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [272 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -29982,21 +30186,21 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [299 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateAssertClause( node, nodesVisitor(node.elements, visitor, isAssertEntry), node.multiLine ); }, - [300 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateAssertEntry( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, - [272 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [273 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportClause( node, node.isTypeOnly, @@ -30004,25 +30208,25 @@ var visitEachChildTable = { nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, - [273 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [274 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [279 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [280 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [274 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [275 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedImports( node, nodesVisitor(node.elements, visitor, isImportSpecifier) ); }, - [275 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [276 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateImportSpecifier( node, node.isTypeOnly, @@ -30030,14 +30234,14 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [276 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [277 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportAssignment( node, nodesVisitor(node.modifiers, visitor, isModifierLike), Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [277 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [278 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), @@ -30047,13 +30251,13 @@ var visitEachChildTable = { nodeVisitor(node.assertClause, visitor, isAssertClause) ); }, - [278 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateNamedExports( node, nodesVisitor(node.elements, visitor, isExportSpecifier) ); }, - [280 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [281 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExportSpecifier( node, node.isTypeOnly, @@ -30062,14 +30266,14 @@ var visitEachChildTable = { ); }, // Module references - [282 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [283 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateExternalModuleReference( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // JSX - [283 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [284 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxElement( node, Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), @@ -30077,7 +30281,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) ); }, - [284 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [285 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSelfClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -30085,7 +30289,7 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [285 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [286 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxOpeningElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), @@ -30093,20 +30297,20 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) ); }, - [286 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [287 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxClosingElement( node, Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) ); }, - [294 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxNamespacedName( node, Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier)), Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) ); }, - [287 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [288 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxFragment( node, Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), @@ -30114,52 +30318,52 @@ var visitEachChildTable = { Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) ); }, - [290 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [291 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttribute( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isJsxAttributeName)), nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) ); }, - [291 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [292 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateJsxAttributes( node, nodesVisitor(node.properties, visitor, isJsxAttributeLike) ); }, - [292 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [293 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxSpreadAttribute( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [293 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [294 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxExpression( node, nodeVisitor(node.expression, visitor, isExpression) ); }, // Clauses - [295 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { + [296 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCaseClause( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), nodesVisitor(node.statements, visitor, isStatement) ); }, - [296 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [297 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateDefaultClause( node, nodesVisitor(node.statements, visitor, isStatement) ); }, - [297 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [298 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateHeritageClause( node, nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) ); }, - [298 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [299 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), @@ -30167,28 +30371,28 @@ var visitEachChildTable = { ); }, // Property assignments - [302 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [303 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) ); }, - [303 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [304 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, - [304 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [305 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateSpreadAssignment( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, // Enum - [305 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [306 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateEnumMember( node, Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), @@ -30196,20 +30400,20 @@ var visitEachChildTable = { ); }, // Top-level nodes - [311 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { + [312 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile( node, visitLexicalEnvironment(node.statements, visitor, context) ); }, // Transformation nodes - [359 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + [360 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updatePartiallyEmittedExpression( node, Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) ); }, - [360 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [361 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateCommaListExpression( node, nodesVisitor(node.elements, visitor, isExpression) @@ -30606,7 +30810,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([ Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code, Diagnostics.Duplicate_label_0.code, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, - Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block.code, + Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code, @@ -30636,14 +30840,17 @@ var plainJSErrors = /* @__PURE__ */ new Set([ Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind.code, Diagnostics._0_modifier_cannot_be_used_here.code, Diagnostics._0_modifier_must_precede_1_modifier.code, - Diagnostics.const_declarations_can_only_be_declared_inside_a_block.code, - Diagnostics.const_declarations_must_be_initialized.code, + Diagnostics._0_declarations_can_only_be_declared_inside_a_block.code, + Diagnostics._0_declarations_must_be_initialized.code, Diagnostics.extends_clause_already_seen.code, - Diagnostics.let_declarations_can_only_be_declared_inside_a_block.code, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code, Diagnostics.Class_constructor_may_not_be_a_generator.code, Diagnostics.Class_constructor_may_not_be_an_accessor.code, - Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code + Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class.code, + // Type errors + Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code ]); // src/compiler/builderState.ts diff --git a/node_modules/typescript/package.json b/node_modules/typescript/package.json index 4cab0c188d..af95500262 100644 --- a/node_modules/typescript/package.json +++ b/node_modules/typescript/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "5.1.6", + "version": "5.2.2", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ @@ -40,7 +40,7 @@ ], "devDependencies": { "@esfx/canceltoken": "^1.0.0", - "@octokit/rest": "latest", + "@octokit/rest": "^19.0.13", "@types/chai": "^4.3.4", "@types/fs-extra": "^9.0.13", "@types/glob": "^8.1.0", @@ -51,19 +51,19 @@ "@types/node": "latest", "@types/source-map-support": "^0.5.6", "@types/which": "^2.0.1", - "@typescript-eslint/eslint-plugin": "^5.33.1", - "@typescript-eslint/parser": "^5.33.1", - "@typescript-eslint/utils": "^5.33.1", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "@typescript-eslint/utils": "^6.0.0", "azure-devops-node-api": "^12.0.0", + "c8": "^7.14.0", "chai": "^4.3.7", "chalk": "^4.1.2", "chokidar": "^3.5.3", "del": "^6.1.1", "diff": "^5.1.0", - "esbuild": "^0.17.2", + "esbuild": "^0.18.1", "eslint": "^8.22.0", "eslint-formatter-autolinkable-stylish": "^1.2.0", - "eslint-plugin-import": "^2.26.0", "eslint-plugin-local": "^1.0.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^10.0.0", diff --git a/package-lock.json b/package-lock.json index f6c21530c5..debb05d892 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "codeql", - "version": "2.21.5", + "version": "2.21.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "codeql", - "version": "2.21.5", + "version": "2.21.6", "license": "MIT", "dependencies": { "@actions/artifact": "^1.1.1", @@ -20,7 +20,7 @@ "@octokit/plugin-retry": "^5.0.2", "@octokit/types": "^11.1.0", "@schemastore/package": "0.0.10", - "@types/uuid": "^9.0.2", + "@types/uuid": "^9.0.3", "adm-zip": "^0.5.10", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", @@ -43,22 +43,22 @@ "@types/get-folder-size": "^2.0.0", "@types/js-yaml": "^4.0.5", "@types/node": "16.11.22", - "@types/semver": "^7.5.0", + "@types/semver": "^7.5.1", "@types/sinon": "^10.0.16", - "@typescript-eslint/eslint-plugin": "^6.4.1", - "@typescript-eslint/parser": "^6.4.1", + "@typescript-eslint/eslint-plugin": "^6.5.0", + "@typescript-eslint/parser": "^6.6.0", "ava": "^5.3.1", - "eslint": "^8.47.0", + "eslint": "^8.48.0", "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-filenames": "^1.3.2", - "eslint-plugin-github": "^4.9.2", + "eslint-plugin-github": "^4.10.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-no-async-foreach": "^0.1.1", "micromatch": "4.0.5", "nock": "^13.3.3", "removeNPMAbsolutePaths": "3.0.1", "sinon": "^15.2.0", - "typescript": "^5.1.6" + "typescript": "^5.2.2" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -505,9 +505,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", - "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz", + "integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -957,9 +957,9 @@ } }, "node_modules/@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.1.tgz", + "integrity": "sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==", "dev": true }, "node_modules/@types/sinon": { @@ -986,21 +986,21 @@ } }, "node_modules/@types/uuid": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.2.tgz", - "integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ==" + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.3.tgz", + "integrity": "sha512-taHQQH/3ZyI3zP8M/puluDEIEvtQHVYcC6y3N8ijFtAd28+Ey/G4sg1u2gB01S8MwybLOKAp9/yCMu/uR5l3Ug==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.1.tgz", - "integrity": "sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.5.0.tgz", + "integrity": "sha512-2pktILyjvMaScU6iK3925uvGU87E+N9rh372uGZgiMYwafaw9SXq86U04XPq3UH6tzRvNgBsub6x2DacHc33lw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.4.1", - "@typescript-eslint/type-utils": "6.4.1", - "@typescript-eslint/utils": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "@typescript-eslint/scope-manager": "6.5.0", + "@typescript-eslint/type-utils": "6.5.0", + "@typescript-eslint/utils": "6.5.0", + "@typescript-eslint/visitor-keys": "6.5.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -1026,15 +1026,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.1.tgz", - "integrity": "sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.6.0.tgz", + "integrity": "sha512-setq5aJgUwtzGrhW177/i+DMLqBaJbdwGj2CPIVFFLE0NCliy5ujIdLHd2D1ysmlmsjdL2GWW+hR85neEfc12w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.4.1", - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/typescript-estree": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "@typescript-eslint/scope-manager": "6.6.0", + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/typescript-estree": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", "debug": "^4.3.4" }, "engines": { @@ -1053,14 +1053,88 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.6.0.tgz", + "integrity": "sha512-pT08u5W/GT4KjPUmEtc2kSYvrH8x89cVzkA0Sy2aaOUIw6YxOIjA8ilwLr/1fLjOedX1QAuBpG9XggWqIIfERw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.6.0.tgz", + "integrity": "sha512-CB6QpJQ6BAHlJXdwUmiaXDBmTqIE2bzGTDLADgvqtHWuhfNP3rAOK7kAgRMAET5rDRr9Utt+qAzRBdu3AhR3sg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.6.0.tgz", + "integrity": "sha512-hMcTQ6Al8MP2E6JKBAaSxSVw5bDhdmbCEhGW/V8QXkb9oNsFkA4SBuOMYVPxD3jbtQ4R/vSODBsr76R6fP3tbA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.6.0", + "@typescript-eslint/visitor-keys": "6.6.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.6.0.tgz", + "integrity": "sha512-L61uJT26cMOfFQ+lMZKoJNbAEckLe539VhTxiGHrWl5XSKQgA0RTBZJW2HFPy5T0ZvPVSD93QsrTKDkfNwJGyQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.6.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.1.tgz", - "integrity": "sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.5.0.tgz", + "integrity": "sha512-A8hZ7OlxURricpycp5kdPTH3XnjG85UpJS6Fn4VzeoH4T388gQJ/PGP4ole5NfKt4WDVhmLaQ/dBLNDC4Xl/Kw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1" + "@typescript-eslint/types": "6.5.0", + "@typescript-eslint/visitor-keys": "6.5.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1071,13 +1145,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.1.tgz", - "integrity": "sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.5.0.tgz", + "integrity": "sha512-f7OcZOkRivtujIBQ4yrJNIuwyCQO1OjocVqntl9dgSIZAdKqicj3xFDqDOzHDlGCZX990LqhLQXWRnQvsapq8A==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.4.1", - "@typescript-eslint/utils": "6.4.1", + "@typescript-eslint/typescript-estree": "6.5.0", + "@typescript-eslint/utils": "6.5.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -1098,9 +1172,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.1.tgz", - "integrity": "sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.5.0.tgz", + "integrity": "sha512-eqLLOEF5/lU8jW3Bw+8auf4lZSbbljHR2saKnYqON12G/WsJrGeeDHWuQePoEf9ro22+JkbPfWQwKEC5WwLQ3w==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -1111,13 +1185,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.1.tgz", - "integrity": "sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.5.0.tgz", + "integrity": "sha512-q0rGwSe9e5Kk/XzliB9h2LBc9tmXX25G0833r7kffbl5437FPWb2tbpIV9wAATebC/018pGa9fwPDuvGN+LxWQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "@typescript-eslint/types": "6.5.0", + "@typescript-eslint/visitor-keys": "6.5.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1138,17 +1212,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.1.tgz", - "integrity": "sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.5.0.tgz", + "integrity": "sha512-9nqtjkNykFzeVtt9Pj6lyR9WEdd8npPhhIPM992FWVkZuS6tmxHfGVnlUcjpUP2hv8r4w35nT33mlxd+Be1ACQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.4.1", - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/typescript-estree": "6.4.1", + "@typescript-eslint/scope-manager": "6.5.0", + "@typescript-eslint/types": "6.5.0", + "@typescript-eslint/typescript-estree": "6.5.0", "semver": "^7.5.4" }, "engines": { @@ -1163,12 +1237,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.1.tgz", - "integrity": "sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.5.0.tgz", + "integrity": "sha512-yCB/2wkbv3hPsh02ZS8dFQnij9VVQXJMN/gbQsaaY+zxALkZnxa/wagvLEFsAWMPv7d7lxQmNsIzGU1w/T/WyA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.4.1", + "@typescript-eslint/types": "6.5.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2522,15 +2596,15 @@ } }, "node_modules/eslint": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", - "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz", + "integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "^8.47.0", + "@eslint/js": "8.48.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -2703,9 +2777,9 @@ } }, "node_modules/eslint-plugin-github": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.9.2.tgz", - "integrity": "sha512-osez6Sio/fLr/3QkW5HE1wbCOcmYG5030/6QIa9IcKyyfchewlecdnYcsbeUMUtdIiU9lWqhroQp2H/O7auxBA==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.10.0.tgz", + "integrity": "sha512-YKtqBtFbjih1wZNTwZjtLPEG6B/4ySMa38fgOo/rbMJpNKO3+OaKzwwOYkeKx/FapM/4MsTP9ExqUcDV+dkixA==", "dev": true, "dependencies": { "@github/browserslist-config": "^1.0.0", @@ -6056,9 +6130,9 @@ } }, "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index f660b2ee09..a31d31e3d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codeql", - "version": "2.21.5", + "version": "2.21.6", "private": true, "description": "CodeQL action", "scripts": { @@ -32,7 +32,7 @@ "@octokit/plugin-retry": "^5.0.2", "@octokit/types": "^11.1.0", "@schemastore/package": "0.0.10", - "@types/uuid": "^9.0.2", + "@types/uuid": "^9.0.3", "adm-zip": "^0.5.10", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", @@ -58,22 +58,22 @@ "@types/get-folder-size": "^2.0.0", "@types/js-yaml": "^4.0.5", "@types/node": "16.11.22", - "@types/semver": "^7.5.0", + "@types/semver": "^7.5.1", "@types/sinon": "^10.0.16", - "@typescript-eslint/eslint-plugin": "^6.4.1", - "@typescript-eslint/parser": "^6.4.1", + "@typescript-eslint/eslint-plugin": "^6.5.0", + "@typescript-eslint/parser": "^6.6.0", "ava": "^5.3.1", - "eslint": "^8.47.0", + "eslint": "^8.48.0", "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-filenames": "^1.3.2", - "eslint-plugin-github": "^4.9.2", + "eslint-plugin-github": "^4.10.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-no-async-foreach": "^0.1.1", "micromatch": "4.0.5", "nock": "^13.3.3", "removeNPMAbsolutePaths": "3.0.1", "sinon": "^15.2.0", - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "overrides": { "@actions/tool-cache": { diff --git a/pr-checks/checks/submit-sarif-failure.yml b/pr-checks/checks/submit-sarif-failure.yml index 3d9ae73fef..eba3b2220f 100644 --- a/pr-checks/checks/submit-sarif-failure.yml +++ b/pr-checks/checks/submit-sarif-failure.yml @@ -15,7 +15,7 @@ env: CODEQL_ACTION_TESTING_ENVIRONMENT: codeql-action-pr-checks steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./init with: languages: javascript diff --git a/pr-checks/checks/with-checkout-path.yml b/pr-checks/checks/with-checkout-path.yml index f6fecca0d4..42564c64ea 100644 --- a/pr-checks/checks/with-checkout-path.yml +++ b/pr-checks/checks/with-checkout-path.yml @@ -3,7 +3,7 @@ description: "Checks that a custom `checkout_path` will find the proper commit_o steps: # Check out the actions repo again, but at a different location. # choose an arbitrary SHA so that we can later test that the commit_oid is not from main - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6 path: x/y/z/some-path diff --git a/pr-checks/sync.py b/pr-checks/sync.py index dd8118036b..ee8055605b 100644 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -70,7 +70,7 @@ def writeHeader(checkStream): steps = [ { 'name': 'Check out repository', - 'uses': 'actions/checkout@v3' + 'uses': 'actions/checkout@v4' }, { 'name': 'Prepare test', diff --git a/src/actions-util.test.ts b/src/actions-util.test.ts index 6dcfb86ef1..00070c978c 100644 --- a/src/actions-util.test.ts +++ b/src/actions-util.test.ts @@ -1,6 +1,7 @@ import * as fs from "fs"; import * as path from "path"; +import * as core from "@actions/core"; import test from "ava"; import * as sinon from "sinon"; @@ -267,3 +268,50 @@ test("isAnalyzingDefaultBranch()", async (t) => { getAdditionalInputStub.restore(); }); }); + +test("determineMergeBaseCommitOid non-pullrequest", async (t) => { + const infoStub = sinon.stub(core, "info"); + + process.env["GITHUB_EVENT_NAME"] = "hucairz"; + process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a"; + const result = await actionsUtil.determineMergeBaseCommitOid(__dirname); + t.deepEqual(result, undefined); + t.deepEqual(0, infoStub.callCount); + + infoStub.restore(); +}); + +test("determineMergeBaseCommitOid no error", async (t) => { + const infoStub = sinon.stub(core, "info"); + + process.env["GITHUB_EVENT_NAME"] = "pull_request"; + process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a"; + await actionsUtil.determineMergeBaseCommitOid(path.join(__dirname, "../..")); + t.deepEqual(1, infoStub.callCount); + t.assert( + infoStub.firstCall.args[0].startsWith( + "The checkout path provided to the action does not appear to be a git repository.", + ), + ); + + infoStub.restore(); +}); + +test("determineMergeBaseCommitOid other error", async (t) => { + const infoStub = sinon.stub(core, "info"); + + process.env["GITHUB_EVENT_NAME"] = "pull_request"; + process.env["GITHUB_SHA"] = "100912429fab4cb230e66ffb11e738ac5194e73a"; + const result = await actionsUtil.determineMergeBaseCommitOid( + path.join(__dirname, "../../i-dont-exist"), + ); + t.deepEqual(result, undefined); + t.deepEqual(1, infoStub.callCount); + t.assert( + infoStub.firstCall.args[0].startsWith( + "Failed to call git to determine merge base.", + ), + ); + + infoStub.restore(); +}); diff --git a/src/actions-util.ts b/src/actions-util.ts index e0851cb184..c6428f4874 100644 --- a/src/actions-util.ts +++ b/src/actions-util.ts @@ -63,6 +63,7 @@ export const getCommitOid = async function ( // the merge commit, which must mean that git is available. // Even if this does go wrong, it's not a huge problem for the alerts to // reported on the merge commit. + let stderr = ""; try { let commitOid = ""; await new toolrunner.ToolRunner( @@ -75,7 +76,7 @@ export const getCommitOid = async function ( commitOid += data.toString(); }, stderr: (data) => { - process.stderr.write(data); + stderr += data.toString(); }, }, cwd: checkoutPath, @@ -83,11 +84,17 @@ export const getCommitOid = async function ( ).exec(); return commitOid.trim(); } catch (e) { - core.info( - "Could not determine current commit SHA using git. Continuing with data from user input or environment.", - ); - core.debug(`Reason: ${(e as Error).message}`); - core.debug((e as Error).stack || "NO STACK"); + if (stderr.includes("not a git repository")) { + core.info( + "Could not determine current commit SHA using git. Continuing with data from user input or environment. " + + "The checkout path provided to the action does not appear to be a git repository.", + ); + } else { + core.info( + `Could not determine current commit SHA using git. Continuing with data from user input or environment. ${stderr}`, + ); + } + return getOptionalInput("sha") || getRequiredEnvParam("GITHUB_SHA"); } }; @@ -96,15 +103,17 @@ export const getCommitOid = async function ( * If the action was triggered by a pull request, determine the commit sha of the merge base. * Returns undefined if run by other triggers or the merge base cannot be determined. */ -export const determineMergeBaseCommitOid = async function (): Promise< - string | undefined -> { +export const determineMergeBaseCommitOid = async function ( + checkoutPathOverride?: string, +): Promise { if (getWorkflowEventName() !== "pull_request") { return undefined; } const mergeSha = getRequiredEnvParam("GITHUB_SHA"); - const checkoutPath = getOptionalInput("checkout_path"); + const checkoutPath = + checkoutPathOverride ?? getOptionalInput("checkout_path"); + let stderr = ""; try { let commitOid = ""; @@ -129,7 +138,7 @@ export const determineMergeBaseCommitOid = async function (): Promise< } }, stderr: (data) => { - process.stderr.write(data); + stderr += data.toString(); }, }, cwd: checkoutPath, @@ -146,10 +155,17 @@ export const determineMergeBaseCommitOid = async function (): Promise< } return undefined; } catch (e) { - core.info( - `Failed to call git to determine merge base. Continuing with data from environment: ${e}`, - ); - core.info((e as Error).stack || "NO STACK"); + if (stderr.includes("not a git repository")) { + core.info( + "The checkout path provided to the action does not appear to be a git repository. " + + "Will calculate the merge base on the server.", + ); + } else { + core.info( + `Failed to call git to determine merge base. Will calculate the merge base on ` + + `the server. Reason: ${stderr}`, + ); + } return undefined; } }; diff --git a/src/analyze-action.ts b/src/analyze-action.ts index 27e511dd0a..c0276d734e 100644 --- a/src/analyze-action.ts +++ b/src/analyze-action.ts @@ -19,7 +19,7 @@ import { getCodeQL } from "./codeql"; import { Config, getConfig, getMlPoweredJsQueriesStatus } from "./config-utils"; import { uploadDatabases } from "./database-upload"; import { EnvVar } from "./environment"; -import { Feature, Features } from "./feature-flags"; +import { Features } from "./feature-flags"; import { Language } from "./languages"; import { getActionsLogger, Logger } from "./logging"; import { parseRepositoryNwo } from "./repository"; @@ -168,6 +168,9 @@ async function runAutobuildIfLegacyGoWorkflow(config: Config, logger: Logger) { } return; } + logger.debug( + "Running Go autobuild because extraction output (TRAP files) for Go code has not been found.", + ); await runAutobuild(Language.go, config, logger); } @@ -203,7 +206,7 @@ async function run() { } if (hasBadExpectErrorInput()) { - throw new Error( + throw new util.UserError( "`expect-error` input parameter is for internal use only. It should only be set by codeql-action or a fork.", ); } @@ -230,7 +233,6 @@ async function run() { const memory = util.getMemoryFlag( actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"], - await features.getValue(Feature.ScalingReservedRamEnabled), ); await runAutobuildIfLegacyGoWorkflow(config, logger); @@ -278,6 +280,7 @@ async function run() { actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger, + { considerInvalidRequestUserError: false }, ); core.setOutput("sarif-id", uploadResult.sarifID); } else { diff --git a/src/api-compatibility.json b/src/api-compatibility.json index 76a44b4f50..d8c82c6acd 100644 --- a/src/api-compatibility.json +++ b/src/api-compatibility.json @@ -1 +1 @@ -{"maximumVersion": "3.10", "minimumVersion": "3.6"} +{"maximumVersion": "3.11", "minimumVersion": "3.6"} diff --git a/src/codeql.ts b/src/codeql.ts index a15e3de173..10a4247397 100644 --- a/src/codeql.ts +++ b/src/codeql.ts @@ -325,6 +325,11 @@ export const CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = "2.13.1"; */ export const CODEQL_VERSION_RESOLVE_ENVIRONMENT = "2.13.4"; +/** + * Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration. + */ +export const CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2"; + /** * Set up CodeQL CLI access. * @@ -576,7 +581,10 @@ export async function getCodeQLForCmd( } if ( - await features.getValue(Feature.LanguageBaselineConfigEnabled, this) + await util.codeQlVersionAbove( + this, + CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG, + ) ) { extraArgs.push("--calculate-language-specific-baseline"); } diff --git a/src/defaults.json b/src/defaults.json index 9e5bd88fbe..0006047097 100644 --- a/src/defaults.json +++ b/src/defaults.json @@ -1,6 +1,6 @@ { - "bundleVersion": "codeql-bundle-v2.14.3", - "cliVersion": "2.14.3", - "priorBundleVersion": "codeql-bundle-v2.14.2", - "priorCliVersion": "2.14.2" + "bundleVersion": "codeql-bundle-v2.14.4", + "cliVersion": "2.14.4", + "priorBundleVersion": "codeql-bundle-v2.14.3", + "priorCliVersion": "2.14.3" } diff --git a/src/environment.ts b/src/environment.ts index 8ddea06c48..cd65f68ee2 100644 --- a/src/environment.ts +++ b/src/environment.ts @@ -37,6 +37,12 @@ export enum EnvVar { ODASA_TRACER_CONFIGURATION = "ODASA_TRACER_CONFIGURATION", + /** + * What percentage of the total amount of RAM over 8 GB that the Action should reserve for the + * system. + */ + SCALING_RESERVED_RAM_PERCENTAGE = "CODEQL_ACTION_SCALING_RESERVED_RAM_PERCENTAGE", + /** Whether to suppress the warning if the current CLI will soon be unsupported. */ SUPPRESS_DEPRECATED_SOON_WARNING = "CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING", diff --git a/src/feature-flags.ts b/src/feature-flags.ts index 83a2c4aa29..0d62c806b7 100644 --- a/src/feature-flags.ts +++ b/src/feature-flags.ts @@ -28,11 +28,6 @@ export const CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.14.0"; */ export const CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0"; -/** - * Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration. - */ -export const CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2"; - export interface CodeQLDefaultVersionInfo { cliVersion: string; tagName: string; @@ -60,10 +55,8 @@ export enum Feature { DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled", EvaluatorIntraLayerParallelismEnabled = "evaluator_intra_layer_parallelism_enabled", ExportDiagnosticsEnabled = "export_diagnostics_enabled", - LanguageBaselineConfigEnabled = "language_baseline_config_enabled", MlPoweredQueriesEnabled = "ml_powered_queries_enabled", QaTelemetryEnabled = "qa_telemetry_enabled", - ScalingReservedRamEnabled = "scaling_reserved_ram_enabled", UploadFailedSarifEnabled = "upload_failed_sarif_enabled", } @@ -101,11 +94,6 @@ export const featureConfig: Record< minimumVersion: "2.12.4", defaultValue: true, }, - [Feature.LanguageBaselineConfigEnabled]: { - envVar: "CODEQL_ACTION_LANGUAGE_BASELINE_CONFIG", - minimumVersion: CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG, - defaultValue: false, - }, [Feature.MlPoweredQueriesEnabled]: { envVar: "CODEQL_ML_POWERED_QUERIES", minimumVersion: undefined, @@ -116,11 +104,6 @@ export const featureConfig: Record< minimumVersion: undefined, defaultValue: false, }, - [Feature.ScalingReservedRamEnabled]: { - envVar: "CODEQL_ACTION_SCALING_RESERVED_RAM", - minimumVersion: undefined, - defaultValue: false, - }, [Feature.UploadFailedSarifEnabled]: { envVar: "CODEQL_ACTION_UPLOAD_FAILED_SARIF", minimumVersion: "2.11.3", diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts index e78e782e7f..225e8843ba 100644 --- a/src/init-action-post-helper.ts +++ b/src/init-action-post-helper.ts @@ -98,6 +98,7 @@ async function maybeUploadFailedSarif( checkoutPath, category, logger, + { considerInvalidRequestUserError: false }, ); await uploadLib.waitForProcessing( repositoryNwo, diff --git a/src/init-action.ts b/src/init-action.ts index 3d0f1e6ddf..39ef014ec3 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -332,10 +332,7 @@ async function run() { core.exportVariable( "CODEQL_RAM", process.env["CODEQL_RAM"] || - getMemoryFlagValue( - getOptionalInput("ram"), - await features.getValue(Feature.ScalingReservedRamEnabled), - ).toString(), + getMemoryFlagValue(getOptionalInput("ram")).toString(), ); core.exportVariable( "CODEQL_THREADS", diff --git a/src/upload-lib.ts b/src/upload-lib.ts index 10c402f8de..8228570166 100644 --- a/src/upload-lib.ts +++ b/src/upload-lib.ts @@ -33,7 +33,7 @@ function combineSarifFiles(sarifFiles: string[]): SarifFile { if (combinedSarif.version === null) { combinedSarif.version = sarifObject.version; } else if (combinedSarif.version !== sarifObject.version) { - throw new Error( + throw new InvalidRequestError( `Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`, ); } @@ -155,40 +155,58 @@ export function findSarifFilesInDir(sarifPath: string): string[] { return sarifFiles; } -// Uploads a single sarif file or a directory of sarif files -// depending on what the path happens to refer to. +/** + * Uploads a single SARIF file or a directory of SARIF files depending on what `sarifPath` refers + * to. + * + * @param considerInvalidRequestUserError Whether an invalid request, for example one with a + * `sarifPath` that does not exist, should be considered a + * user error. + */ export async function uploadFromActions( sarifPath: string, checkoutPath: string, category: string | undefined, logger: Logger, + { + considerInvalidRequestUserError, + }: { considerInvalidRequestUserError: boolean }, ): Promise { - return await uploadFiles( - getSarifFilePaths(sarifPath), - parseRepositoryNwo(util.getRequiredEnvParam("GITHUB_REPOSITORY")), - await actionsUtil.getCommitOid(checkoutPath), - await actionsUtil.getRef(), - await api.getAnalysisKey(), - category, - util.getRequiredEnvParam("GITHUB_WORKFLOW"), - actionsUtil.getWorkflowRunID(), - actionsUtil.getWorkflowRunAttempt(), - checkoutPath, - actionsUtil.getRequiredInput("matrix"), - logger, - ); + try { + return await uploadFiles( + getSarifFilePaths(sarifPath), + parseRepositoryNwo(util.getRequiredEnvParam("GITHUB_REPOSITORY")), + await actionsUtil.getCommitOid(checkoutPath), + await actionsUtil.getRef(), + await api.getAnalysisKey(), + category, + util.getRequiredEnvParam("GITHUB_WORKFLOW"), + actionsUtil.getWorkflowRunID(), + actionsUtil.getWorkflowRunAttempt(), + checkoutPath, + actionsUtil.getRequiredInput("matrix"), + logger, + ); + } catch (e) { + if (e instanceof InvalidRequestError && considerInvalidRequestUserError) { + throw new UserError(e.message); + } + throw e; + } } function getSarifFilePaths(sarifPath: string) { if (!fs.existsSync(sarifPath)) { - throw new Error(`Path does not exist: ${sarifPath}`); + throw new InvalidRequestError(`Path does not exist: ${sarifPath}`); } let sarifFiles: string[]; if (fs.lstatSync(sarifPath).isDirectory()) { sarifFiles = findSarifFilesInDir(sarifPath); if (sarifFiles.length === 0) { - throw new Error(`No SARIF files found to upload in "${sarifPath}".`); + throw new InvalidRequestError( + `No SARIF files found to upload in "${sarifPath}".`, + ); } } else { sarifFiles = [sarifPath]; @@ -203,17 +221,19 @@ function countResultsInSarif(sarif: string): number { try { parsedSarif = JSON.parse(sarif); } catch (e) { - throw new Error( + throw new InvalidRequestError( `Invalid SARIF. JSON syntax error: ${wrapError(e).message}`, ); } if (!Array.isArray(parsedSarif.runs)) { - throw new Error("Invalid SARIF. Missing 'runs' array."); + throw new InvalidRequestError("Invalid SARIF. Missing 'runs' array."); } for (const run of parsedSarif.runs) { if (!Array.isArray(run.results)) { - throw new Error("Invalid SARIF. Missing 'results' array in run."); + throw new InvalidRequestError( + "Invalid SARIF. Missing 'results' array in run.", + ); } numResults += run.results.length; } @@ -253,7 +273,7 @@ export function validateSarifFileSchema(sarifFilePath: string, logger: Logger) { // Set the main error message to the stacks of all the errors. // This should be of a manageable size and may even give enough to fix the error. const sarifErrors = errors.map((e) => `- ${e.stack}`); - throw new Error( + throw new InvalidRequestError( `Unable to upload "${sarifFilePath}" as it is not valid SARIF:\n${sarifErrors.join( "\n", )}`, @@ -475,7 +495,7 @@ export async function waitForProcessing( const message = `Code Scanning could not process the submitted SARIF file:\n${response.data.errors}`; throw shouldConsiderAsUserError(response.data.errors as string[]) ? new UserError(message) - : new Error(message); + : new InvalidRequestError(message); } else { util.assertNever(status); } @@ -552,7 +572,7 @@ export function validateUniqueCategory(sarif: SarifFile): void { for (const [category, { id, tool }] of Object.entries(categories)) { const sentinelEnvVar = `CODEQL_UPLOAD_SARIF_${category}`; if (process.env[sentinelEnvVar]) { - throw new Error( + throw new InvalidRequestError( "Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. " + "The easiest fix is to specify a unique value for the `category` input. If .runs[].automationDetails.id is specified " + "in the sarif file, that will take precedence over your configured `category`. " + @@ -564,7 +584,7 @@ export function validateUniqueCategory(sarif: SarifFile): void { } /** - * Santizes a string to be used as an environment variable name. + * Sanitizes a string to be used as an environment variable name. * This will replace all non-alphanumeric characters with underscores. * There could still be some false category clashes if two uploads * occur that differ only in their non-alphanumeric characters. This is @@ -614,3 +634,12 @@ export function pruneInvalidResults( } return { ...sarif, runs: newRuns }; } + +/** + * An error that occurred due to an invalid SARIF upload request. + */ +class InvalidRequestError extends Error { + constructor(message: string) { + super(message); + } +} diff --git a/src/upload-sarif-action.ts b/src/upload-sarif-action.ts index cde8dc3287..a7550623d5 100644 --- a/src/upload-sarif-action.ts +++ b/src/upload-sarif-action.ts @@ -63,6 +63,7 @@ async function run() { actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), logger, + { considerInvalidRequestUserError: true }, ); core.setOutput("sarif-id", uploadResult.sarifID); diff --git a/src/util.test.ts b/src/util.test.ts index bd2e13c734..2a96c84b63 100644 --- a/src/util.test.ts +++ b/src/util.test.ts @@ -4,6 +4,7 @@ import path from "path"; import test from "ava"; +import { EnvVar } from "./environment"; import { getRunnerLogger } from "./logging"; import { getRecordingLogger, LoggedMessage, setupTests } from "./testing-utils"; import * as util from "./util"; @@ -25,42 +26,43 @@ const GET_MEMORY_FLAG_TESTS = [ totalMemoryMb: 8 * 1024, platform: "linux", expectedMemoryValue: 7 * 1024, - expectedMemoryValueWithScaling: 7 * 1024, }, { input: undefined, totalMemoryMb: 8 * 1024, platform: "win32", expectedMemoryValue: 6.5 * 1024, - expectedMemoryValueWithScaling: 6.5 * 1024, }, { input: "", totalMemoryMb: 8 * 1024, platform: "linux", expectedMemoryValue: 7 * 1024, - expectedMemoryValueWithScaling: 7 * 1024, }, { input: "512", totalMemoryMb: 8 * 1024, platform: "linux", expectedMemoryValue: 512, - expectedMemoryValueWithScaling: 512, }, { input: undefined, totalMemoryMb: 64 * 1024, platform: "linux", - expectedMemoryValue: 63 * 1024, - expectedMemoryValueWithScaling: 61644, // Math.floor(1024 * (64 - 1 - 0.05 * (64 - 8))) + expectedMemoryValue: 61644, // Math.floor(1024 * (64 - 1 - 0.05 * (64 - 8))) }, { input: undefined, totalMemoryMb: 64 * 1024, platform: "win32", - expectedMemoryValue: 62.5 * 1024, - expectedMemoryValueWithScaling: 61132, // Math.floor(1024 * (64 - 1.5 - 0.05 * (64 - 8))) + expectedMemoryValue: 61132, // Math.floor(1024 * (64 - 1.5 - 0.05 * (64 - 8))) + }, + { + input: undefined, + totalMemoryMb: 64 * 1024, + platform: "linux", + expectedMemoryValue: 58777, // Math.floor(1024 * (64 - 1 - 0.1 * (64 - 8))) + reservedPercentageValue: "10", }, ]; @@ -69,33 +71,29 @@ for (const { totalMemoryMb, platform, expectedMemoryValue, - expectedMemoryValueWithScaling, + reservedPercentageValue, } of GET_MEMORY_FLAG_TESTS) { - test( - `Memory flag value is ${expectedMemoryValue} without scaling and ${expectedMemoryValueWithScaling} with scaling ` + - `for ${ - input ?? "no user input" - } on ${platform} with ${totalMemoryMb} MB total system RAM`, - async (t) => { - for (const withScaling of [true, false]) { - const flag = util.getMemoryFlagValueForPlatform( - input, - totalMemoryMb * 1024 * 1024, - platform, - withScaling, - ); - t.deepEqual( - flag, - withScaling ? expectedMemoryValueWithScaling : expectedMemoryValue, - ); - } - }, - ); + test(`Memory flag value is ${expectedMemoryValue} for ${ + input ?? "no user input" + } on ${platform} with ${totalMemoryMb} MB total system RAM${ + reservedPercentageValue + ? ` and reserved percentage env var set to ${reservedPercentageValue}` + : "" + }`, async (t) => { + process.env[EnvVar.SCALING_RESERVED_RAM_PERCENTAGE] = + reservedPercentageValue || undefined; + const flag = util.getMemoryFlagValueForPlatform( + input, + totalMemoryMb * 1024 * 1024, + platform, + ); + t.deepEqual(flag, expectedMemoryValue); + }); } test("getMemoryFlag() throws if the ram input is < 0 or NaN", async (t) => { for (const input of ["-1", "hello!"]) { - t.throws(() => util.getMemoryFlag(input, false)); + t.throws(() => util.getMemoryFlag(input)); } }); diff --git a/src/util.ts b/src/util.ts index 53e8cdaae8..fa2d277974 100644 --- a/src/util.ts +++ b/src/util.ts @@ -37,6 +37,11 @@ export const DEFAULT_DEBUG_ARTIFACT_NAME = "debug-artifacts"; */ export const DEFAULT_DEBUG_DATABASE_NAME = "db"; +/** + * The default fraction of the total RAM above 8 GB that should be reserved for the system. + */ +const DEFAULT_RESERVED_RAM_SCALING_FACTOR = 0.05; + export interface SarifFile { version?: string | null; runs: SarifRun[]; @@ -155,19 +160,26 @@ export async function withTmpDir( function getSystemReservedMemoryMegaBytes( totalMemoryMegaBytes: number, platform: string, - isScalingReservedRamEnabled: boolean, ): number { // Windows needs more memory for OS processes. const fixedAmount = 1024 * (platform === "win32" ? 1.5 : 1); - if (isScalingReservedRamEnabled) { - // Reserve an additional 5% of the amount of memory above 8 GB, since the amount used by the - // kernel for page tables scales with the size of physical memory. - const scaledAmount = 0.05 * Math.max(totalMemoryMegaBytes - 8 * 1024, 0); - return fixedAmount + scaledAmount; - } else { - return fixedAmount; + // Reserve an additional percentage of the amount of memory above 8 GB, since the amount used by + // the kernel for page tables scales with the size of physical memory. + const scaledAmount = + getReservedRamScaleFactor() * Math.max(totalMemoryMegaBytes - 8 * 1024, 0); + return fixedAmount + scaledAmount; +} + +function getReservedRamScaleFactor(): number { + const envVar = Number.parseInt( + process.env[EnvVar.SCALING_RESERVED_RAM_PERCENTAGE] || "", + 10, + ); + if (envVar < 0 || envVar > 100 || Number.isNaN(envVar)) { + return DEFAULT_RESERVED_RAM_SCALING_FACTOR; } + return envVar / 100; } /** @@ -181,7 +193,6 @@ export function getMemoryFlagValueForPlatform( userInput: string | undefined, totalMemoryBytes: number, platform: string, - isScalingReservedRamEnabled: boolean, ): number { let memoryToUseMegaBytes: number; if (userInput) { @@ -194,7 +205,6 @@ export function getMemoryFlagValueForPlatform( const reservedMemoryMegaBytes = getSystemReservedMemoryMegaBytes( totalMemoryMegaBytes, platform, - isScalingReservedRamEnabled, ); memoryToUseMegaBytes = totalMemoryMegaBytes - reservedMemoryMegaBytes; } @@ -208,15 +218,11 @@ export function getMemoryFlagValueForPlatform( * * @returns {number} the amount of RAM to use, in megabytes */ -export function getMemoryFlagValue( - userInput: string | undefined, - isScalingReservedRamEnabled: boolean, -): number { +export function getMemoryFlagValue(userInput: string | undefined): number { return getMemoryFlagValueForPlatform( userInput, os.totalmem(), process.platform, - isScalingReservedRamEnabled, ); } @@ -227,11 +233,8 @@ export function getMemoryFlagValue( * * @returns string */ -export function getMemoryFlag( - userInput: string | undefined, - isScalingReservedRamEnabled: boolean, -): string { - const megabytes = getMemoryFlagValue(userInput, isScalingReservedRamEnabled); +export function getMemoryFlag(userInput: string | undefined): string { + const megabytes = getMemoryFlagValue(userInput); return `--ram=${megabytes}`; }